https://wiki.ubuntu.org.cn/api.php?action=feedcontributions&user=HsChen07&feedformat=atomUbuntu中文 - 用户贡献 [zh-hans]2024-03-29T13:40:56Z用户贡献MediaWiki 1.26.3https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=75609UbuntuHelp:OpenFOAM/zh2008-01-11T12:45:57Z<p>HsChen07:</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算流体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)【本教程为那些对学习、应用、实验计算流体动力学(CFD)感兴趣的工程师、科学家和学生而创作】, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions.【CFD采用数值逼近方法来求解控制自然流动的偏微分方程(如Navier-Stokes等),只要满足Navier-Stokes方程的连续性方程,就能求解出服从指定和初始条件下的流动现象】 This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. 【这在实践中有着极大的重要性,任何流体现象在进行真实试验之前都可以在计算机上进行模拟/建模】For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. 【例如,在进行缩尺样机风洞测试之前,你可以通过计算模拟技术来验证一个新的飞机设计方案】Thus a wide range of experimental conditions can be fully tested and corrected on the fly...【因而可以在实验中对各种飞行状态进行全面的测试和校正】<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. 【由于流动控制基本方程是偏微分方程,数值逼近求解方法非常复杂,一个简单问题的求解都需要几分钟,如果遇到更加复杂的问题,求解需要几天来得到一个结果……CFD通常不是运行在PC上的,而是专门运行在专门用于求解这类问题的高性能终端计算机上】Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.【当然这不是阻止你用,你可以在你的计算机上安装本软件,并求解简单的几何状态,为了求解容易做大量假设】<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.【世界上已经存在一些CFD的商业程序如Fluent, COMSOL, CFD-RC, CFD-ADAPCO,但它们是非常昂贵的。然而,也有一些免费的选择如ELMER Multiphysics, OpenFOAM 等。使用CFD软件从来都有点复杂,需要对给定问题的物理现象有深入的理解,并有较好的数学背景】<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal: '''如果要把它安装在 AMD64 系统上,必须把参数 $WM_64打开。在终端下按如下操作进行:'''<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following: '''然后,在 Java 段上面我直接添加了下面几句:'''<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank 64位系统设为 on, 否则留空即可<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect. '''完后为了使这些变化生效,你必须把这些变化提供给 bashrc。'''<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/... '''注意这里是 .空格~/...'''<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)'''(基于测试安装的个人电脑的配置)'''<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)'''AMD Athlon XP LV 1500+ (或相当及更好更高的配置,可以是Intel的或苹果的PowerPC'''<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)'''640MB内存(网站上未提及,大家都知道越多越好)'''<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc'''有1GB可用硬盘空间,这是必须的,文件解压后占用750MB,另外还要留出实例、教程、网格等的存储空间'''<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br><br />
<br />
&nbsp; '''宽带连接(压缩文件平均有约50到100MB),当然也可以用拨号连接下载48小时,这取决于你……'''<br><br />
<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
<br />
'''&nbsp; Ubuntu LINUX 5.10 Breeze Badger 核心版本号是2.6.12-9-386,如果你下载的是64位(AMD64)版就用64位内核'''<br />
<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
<br />
'''&nbsp; 尚未在更高或更低的内核版本上测试,所以如果你的内核不是该版本,你需要试着测试一下'''<br />
<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
'''&nbsp; 不能保证它能在其他LINUX发行版上正常运行'''<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above) '''检查系统要求(上面已列出)'''<br />
<br />
2 * Enter to OpenFOAM web page '''进入OpenFOAM网页'''<br />
<br />
* http://www.openfoam.org<br />
or '''或'''<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download '''点击下载'''<br />
<br />
4 * Select your version '''选择你想要下载的版本'''<br />
<br />
5 * Dowload all the packages to your Desktop (very advance LINUX users can avoid obvious steps) '''把程序包下载到你的桌面(LINUX高级用户可跳过这些简单步骤)'''<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username> '''其中~/就是主文件夹,如 /home/<用户名>'''<br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours... '''注意,这里需要记住LINUX对大小写敏感,一个小小的错误就能耽搁你好几个小时'''<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site ''' 第二,我都是在我的主文件夹~/下进行所有安装的,这是“官方”网站上建议的选择'''<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir ''' 在~/下用mkdir命令建立一个叫做OpenFOAM的文件夹'''<br />
<br />
copy''' 复制'''<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM''' 它们都在~/Desktop(桌面)上,将其复制到刚刚建立的 ~/OpenFOAM下'''<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive) ''' 用mkdir命令建立如下文件夹(注意LINUX对大小写敏感)'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy''' 复制'''<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux ''' 将其从 ~/Desktop 复制到 ~/OpenFOAM/linux'''<br />
9 * untar avery single file in the following order ''' 按照下面的顺序解压各文件:'''<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing ''' 解压命令格式'''<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename> tar -xzvf <文件名><br />
</nowiki></pre><br />
<br />
This takes a bit of time ''' 这个过程需要一些时间'''<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM ''' 完后你就会在~/OpenFOAM 下看到几个新目录'''<br />
<br />
11 * now look for foamSystemCheck ''' 现在找一下foamSystemCheck'''<br />
which is located at ''' 它位于'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format ''' 这是一个我们要运行的shell脚本,但首先我们得将它变成可执行的格式'''<br />
<br />
type''' 输入'''<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type ''' 回车,然后输入'''<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type''' 回车,再输入'''<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter ''' 回车'''<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!) ''' 这时shell脚本将调用一些命令来检查是否满足安装的最低要求,主机、用户名、Linux 版本及网络连接等等,如果在处理的最后会报一些错,就忽略它报告的那些关于ssh或rsh的警告或致命错误,对于仅仅安装来说这没必要(不管它报告给你了什么,尽管忽略!!!)'''<br />
<br />
type ''' 输入'''<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter''' 回车'''<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in''' 现在你须要为文件的正确读写设置环境变量,环境变量的设置存储在'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well''' 因为我在UBUNTU下用的是默认配置,我的 shell 是 BASH, 文件编辑器是 gedit, 也可以用 VIM'''<br />
<br />
type''' 输入'''<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)''' (如果你不确定自己用的是哪个 shell 环境,按照你的 shell 的格式要求编辑如下文件)'''<br />
<br />
now type''' 输入'''<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type''' 进入 gedit 编辑环境后输入'''<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......''' 注意是‘点’,空格~/.......'''<br />
select file>save''' 点 文件>保存'''<br />
and then file>quit''' 然后点 文件>退出'''<br />
<br />
now update the environment typing''' 现在更新环境,输入'''<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......''' 注意是'点',空格~/.......'''<br />
<br />
the environment variables are updated, you can see this if you type'''环境变量更新了,输入以下命令可以确认'''<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at&nbsp;&nbsp;&nbsp; '''在下面的目录下找到文件foamInstallationTest'''<br><br />
<pre>~/OpenFOAM/OpenFOAM-1.3/bin<br />
</pre> <br />
in the same way, this file is a shell script&nbsp;&nbsp;&nbsp;&nbsp; '''同样的,该文件也是一个shell脚本'''<br><br />
<br />
type&nbsp;&nbsp;&nbsp;&nbsp; '''输入'''<br><br />
<pre>chmod -v 555 foamInstallationTest<br />
</pre> <br />
press enter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''回车'''<br><br />
<br />
now you don't need to export the path, since you have already done it...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''现在你不必输出路径了,因为它已经实现了'''<br><br />
<br />
now type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''输入'''<br><br />
<pre>foamInstallationTest<br />
</pre> <br />
press enter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''回车'''<br><br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
'''这里shell脚本确定各路径并指定它们的变量(路径PATH),这个个过程也要用一定的时间。但你将会在最后看到一个错误,像这样:'''<br />
<br />
test_rsh unsuccessful_conection_refused* test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
'''就此版本而言,这个错误是正常的,你可以安全的忽略,完后OpenFOAM就可以运行了'''<br />
<br />
=== Getting started with OpenFOAM 开始 OpenFOAM 之旅 ===<br />
<br />
Library documentation is included in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''库文档位于'''<br><br />
<pre>~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</pre> <br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
'''在这里你会找到若干教程和实例的PDF文件,简单阅读后你就能开始立即建模了'''<br />
<br />
=== Troubleshooting 常见问题 ===<br />
<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<br />
'''在64位Dapper系统上安装时,我碰巧遇上了默认JAVA目录(JAVA_HOME)的问题,JAVA_PATH原定义路径是:'''<br />
<pre>/home/&lt;username&gt;/OpenFOAM/&lt;architecture&gt;/j2sdk1.4.2_05<br />
</pre> <br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<br />
'''这里在OpenFOAM路径後应该是OpenFOAM-1.3路径。纠正方法是,打开一个终端,然後:'''<br />
<pre>gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</pre> <br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<br />
'''然後,浏览到Java一节,在# Linux Workstation subsection 後编辑export JAVA_HOME 行,如下:'''<br />
<pre>export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</pre> <br />
Then save and close, and source your bashrc<br />
<br />
'''保存并关闭,source 你的bashrc(不知道怎么翻译,译者注)'''<br />
<pre>. ~/.bashrc<br />
</pre> <br />
N.B. it is . space ~/....<br />
<br />
'''注意是:&nbsp; 空格~/……'''<br />
<br />
=== Acknowledgements 致谢 ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
<br />
'''感谢OpenFOAM CFD 开发团队在通用许可证(GPL)下发布这个软件'''<br />
<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
<br />
'''感谢Ubuntu团队在这个操作系统上付出的巨大辛劳'''<br />
<br />
* Thank you for reading this wiki<br />
<br />
'''感谢你阅读本维基'''<br />
<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
'''本维基基于我先前在Ubuntu论坛上的帖子(……有兴趣点原文链接吧)'''<br />
<br />
* * * * * derjames * * * * *<br />
<br />
----<br />
<br />
[[Category:CategoryCleanup]] [[Category:CategoryScience]] [[Category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=75608UbuntuHelp:OpenFOAM/zh2008-01-11T12:42:36Z<p>HsChen07:</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算流体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)【本教程为那些对学习、应用、实验计算流体动力学(CFD)感兴趣的工程师、科学家和学生而创作】, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions.【CFD采用数值逼近方法来求解控制自然流动的偏微分方程(如Navier-Stokes等),只要满足Navier-Stokes方程的连续性方程,就能求解出服从指定和初始条件下的流动现象】 This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. 【这在实践中有着极大的重要性,任何流体现象在进行真实试验之前都可以在计算机上进行模拟/建模】For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. 【例如,在进行缩尺样机风洞测试之前,你可以通过计算模拟技术来验证一个新的飞机设计方案】Thus a wide range of experimental conditions can be fully tested and corrected on the fly...【因而可以在实验中对各种飞行状态进行全面的测试和校正】<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. 【由于流动控制基本方程是偏微分方程,数值逼近求解方法非常复杂,一个简单问题的求解都需要几分钟,如果遇到更加复杂的问题,求解需要几天来得到一个结果……CFD通常不是运行在PC上的,而是专门运行在专门用于求解这类问题的高性能终端计算机上】Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.【当然这不是阻止你用,你可以在你的计算机上安装本软件,并求解简单的几何状态,为了求解容易做大量假设】<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.【世界上已经存在一些CFD的商业程序如Fluent, COMSOL, CFD-RC, CFD-ADAPCO,但它们是非常昂贵的。然而,也有一些免费的选择如ELMER Multiphysics, OpenFOAM 等。使用CFD软件从来都有点复杂,需要对给定问题的物理现象有深入的理解,并有较好的数学背景】<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal: '''如果要把它安装在 AMD64 系统上,必须把参数 $WM_64打开。在终端下按如下操作进行:'''<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following: '''然后,在 Java 段上面我直接添加了下面几句:'''<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank 64位系统设为 on, 否则留空即可<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect. '''完后为了使这些变化生效,你必须把这些变化提供给 bashrc。'''<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/... '''注意这里是 .空格~/...'''<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)'''(基于测试安装的个人电脑的配置)'''<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)'''AMD Athlon XP LV 1500+ (或相当及更好更高的配置,可以是Intel的或苹果的PowerPC'''<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)'''640MB内存(网站上未提及,大家都知道越多越好)'''<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc'''有1GB可用硬盘空间,这是必须的,文件解压后占用750MB,另外还要留出实例、教程、网格等的存储空间'''<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br><br />
<br />
&nbsp; '''宽带连接(压缩文件平均有约50到100MB),当然也可以用拨号连接下载48小时,这取决于你……'''<br><br />
<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
<br />
'''&nbsp; Ubuntu LINUX 5.10 Breeze Badger 核心版本号是2.6.12-9-386,如果你下载的是64位(AMD64)版就用64位内核'''<br />
<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
<br />
'''&nbsp; 尚未在更高或更低的内核版本上测试,所以如果你的内核不是该版本,你需要试着测试一下'''<br />
<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
'''&nbsp; 不能保证它能在其他LINUX发行版上正常运行'''<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above) '''检查系统要求(上面已列出)'''<br />
<br />
2 * Enter to OpenFOAM web page '''进入OpenFOAM网页'''<br />
<br />
* http://www.openfoam.org<br />
or '''或'''<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download '''点击下载'''<br />
<br />
4 * Select your version '''选择你想要下载的版本'''<br />
<br />
5 * Dowload all the packages to your Desktop (very advance LINUX users can avoid obvious steps) '''把程序包下载到你的桌面(LINUX高级用户可跳过这些简单步骤)'''<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username> '''其中~/就是主文件夹,如 /home/<用户名>'''<br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours... '''注意,这里需要记住LINUX对大小写敏感,一个小小的错误就能耽搁你好几个小时'''<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site ''' 第二,我都是在我的主文件夹~/下进行所有安装的,这是“官方”网站上建议的选择'''<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir ''' 在~/下用mkdir命令建立一个叫做OpenFOAM的文件夹'''<br />
<br />
copy''' 复制'''<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM''' 它们都在~/Desktop(桌面)上,将其复制到刚刚建立的 ~/OpenFOAM下'''<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive) ''' 用mkdir命令建立如下文件夹(注意LINUX对大小写敏感)'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy''' 复制'''<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux ''' 将其从 ~/Desktop 复制到 ~/OpenFOAM/linux'''<br />
9 * untar avery single file in the following order ''' 按照下面的顺序解压各文件:'''<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing ''' 解压命令格式'''<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename> tar -xzvf <文件名><br />
</nowiki></pre><br />
<br />
This takes a bit of time ''' 这个过程需要一些时间'''<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM ''' 完后你就会在~/OpenFOAM 下看到几个新目录'''<br />
<br />
11 * now look for foamSystemCheck ''' 现在找一下foamSystemCheck'''<br />
which is located at ''' 它位于'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format ''' 这是一个我们要运行的shell脚本,但首先我们得将它变成可执行的格式'''<br />
<br />
type''' 输入'''<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type ''' 回车,然后输入'''<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type''' 回车,再输入'''<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter ''' 回车'''<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!) ''' 这时shell脚本将调用一些命令来检查是否满足安装的最低要求,主机、用户名、Linux 版本及网络连接等等,如果在处理的最后会报一些错,就忽略它报告的那些关于ssh或rsh的警告或致命错误,对于仅仅安装来说这没必要(不管它报告给你了什么,尽管忽略!!!)'''<br />
<br />
type ''' 输入'''<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter''' 回车'''<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in''' 现在你须要为文件的正确读写设置环境变量,环境变量的设置存储在'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well''' 因为我在UBUNTU下用的是默认配置,我的 shell 是 BASH, 文件编辑器是 gedit, 也可以用 VIM'''<br />
<br />
type''' 输入'''<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)''' (如果你不确定自己用的是哪个 shell 环境,按照你的 shell 的格式要求编辑如下文件)'''<br />
<br />
now type''' 输入'''<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type''' 进入 gedit 编辑环境后输入'''<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......''' 注意是‘点’,空格~/.......'''<br />
select file>save''' 点 文件>保存'''<br />
and then file>quit''' 然后点 文件>退出'''<br />
<br />
now update the environment typing''' 现在更新环境,输入'''<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......''' 注意是'点',空格~/.......'''<br />
<br />
the environment variables are updated, you can see this if you type'''环境变量更新了,输入以下命令可以确认'''<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at&nbsp;&nbsp;&nbsp; '''在下面的目录下找到文件foamInstallationTest'''<br><br />
<pre>~/OpenFOAM/OpenFOAM-1.3/bin<br />
</pre> <br />
in the same way, this file is a shell script&nbsp;&nbsp;&nbsp;&nbsp; '''同样的,该文件也是一个shell脚本'''<br><br />
<br />
type&nbsp;&nbsp;&nbsp;&nbsp; '''输入'''<br><br />
<pre>chmod -v 555 foamInstallationTest<br />
</pre> <br />
press enter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''回车'''<br><br />
<br />
now you don't need to export the path, since you have already done it...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''现在你不必输出路径了,因为它已经实现了'''<br><br />
<br />
now type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''输入'''<br><br />
<pre>foamInstallationTest<br />
</pre> <br />
press enter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''回车'''<br><br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
'''这里shell脚本确定各路径并指定它们的变量(路径PATH),这个个过程也要用一定的时间。但你将会在最后看到一个错误,像这样:'''<br />
<br />
test_rsh unsuccessful_conection_refused* test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
'''就此版本而言,这个错误是正常的,你可以安全的忽略,完后OpenFOAM就可以运行了'''<br />
<br />
=== Getting started with OpenFOAM 开始 OpenFOAM 之旅 ===<br />
<br />
Library documentation is included in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''库文档位于'''<br><br />
<pre>~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</pre> <br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
'''在这里你会找到若干教程和实例的PDF文件,简单阅读后你就能开始立即建模了'''<br />
<br />
=== Troubleshooting 常见问题 ===<br />
<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<br />
'''在64位Dapper系统上安装时,我碰巧遇上了默认JAVA目录(JAVA_HOME)的问题,JAVA_PATH原定义路径是:'''<br />
<pre>/home/&lt;username&gt;/OpenFOAM/&lt;architecture&gt;/j2sdk1.4.2_05<br />
</pre> <br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<br />
'''这里在OpenFOAM路径後应该是OpenFOAM-1.3路径。纠正方法是,打开一个终端,然後:'''<br />
<pre>gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</pre> <br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<br />
'''然後,浏览到Java一节,在# Linux Workstation subsection 後编辑export JAVA_HOME 行,如下:'''<br />
<pre>export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</pre> <br />
Then save and close, and source your bashrc<br />
<br />
'''保存并关闭,source 你的bashrc(不知道怎么翻译,译者注)'''<br />
<pre>. ~/.bashrc<br />
</pre> <br />
N.B. it is . space ~/....<br />
<br />
'''注意是:&nbsp; 空格~/……'''<br />
<br />
=== Acknowledgements 致谢 ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
<br />
感谢OpenFOAM CFD 开发团队使它在通用许可证(GPL)下可得<br />
<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
<br />
感谢Ubuntu团队在这个操作系统上付出的巨大辛劳<br />
<br />
* Thank you for reading this wiki<br />
<br />
感谢你阅读本维基<br />
<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
本维基基于我先前在Ubuntu论坛上的帖子<br />
<br />
* * * * * derjames * * * * *<br />
<br />
----<br />
<br />
[[Category:CategoryCleanup]] [[Category:CategoryScience]] [[Category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=75607UbuntuHelp:OpenFOAM/zh2008-01-11T12:36:21Z<p>HsChen07:</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算流体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)【本教程为那些对学习、应用、实验计算流体动力学(CFD)感兴趣的工程师、科学家和学生而创作】, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions.【CFD采用数值逼近方法来求解控制自然流动的偏微分方程(如Navier-Stokes等),只要满足Navier-Stokes方程的连续性方程,就能求解出服从指定和初始条件下的流动现象】 This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. 【这在实践中有着极大的重要性,任何流体现象在进行真实试验之前都可以在计算机上进行模拟/建模】For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. 【例如,在进行缩尺样机风洞测试之前,你可以通过计算模拟技术来验证一个新的飞机设计方案】Thus a wide range of experimental conditions can be fully tested and corrected on the fly...【因而可以在实验中对各种飞行状态进行全面的测试和校正】<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. 【由于流动控制基本方程是偏微分方程,数值逼近求解方法非常复杂,一个简单问题的求解都需要几分钟,如果遇到更加复杂的问题,求解需要几天来得到一个结果……CFD通常不是运行在PC上的,而是专门运行在专门用于求解这类问题的高性能终端计算机上】Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.【当然这不是阻止你用,你可以在你的计算机上安装本软件,并求解简单的几何状态,为了求解容易做大量假设】<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.【世界上已经存在一些CFD的商业程序如Fluent, COMSOL, CFD-RC, CFD-ADAPCO,但它们是非常昂贵的。然而,也有一些免费的选择如ELMER Multiphysics, OpenFOAM 等。使用CFD软件从来都有点复杂,需要对给定问题的物理现象有深入的理解,并有较好的数学背景】<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal: '''如果要把它安装在 AMD64 系统上,必须把参数 $WM_64打开。在终端下按如下操作进行:'''<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following: '''然后,在 Java 段上面我直接添加了下面几句:'''<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank 64位系统设为 on, 否则留空即可<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect. '''完后为了使这些变化生效,你必须把这些变化提供给 bashrc。'''<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/... '''注意这里是 .空格~/...'''<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)'''(基于测试安装的个人电脑的配置)'''<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)'''AMD Athlon XP LV 1500+ (或相当及更好更高的配置,可以是Intel的或苹果的PowerPC'''<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)'''640MB内存(网站上未提及,大家都知道越多越好)'''<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc'''有1GB可用硬盘空间,这是必须的,文件解压后占用750MB,另外还要留出实例、教程、网格等的存储空间'''<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br><br />
<br />
&nbsp; '''宽带连接(压缩文件平均有约50到100MB),当然也可以用拨号连接下载48小时,这取决于你……'''<br><br />
<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
<br />
'''&nbsp; Ubuntu LINUX 5.10 Breeze Badger 核心版本号是2.6.12-9-386,如果你下载的是64位(AMD64)版就用64位内核'''<br />
<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
<br />
'''&nbsp; 尚未在更高或更低的内核版本上测试,所以如果你的内核不是该版本,你需要试着测试一下'''<br />
<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
'''&nbsp; 不能保证它能在其他LINUX发行版上正常运行'''<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above) '''检查系统要求(上面已列出)'''<br />
<br />
2 * Enter to OpenFOAM web page '''进入OpenFOAM网页'''<br />
<br />
* http://www.openfoam.org<br />
or '''或'''<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download '''点击下载'''<br />
<br />
4 * Select your version '''选择你想要下载的版本'''<br />
<br />
5 * Dowload all the packages to your Desktop (very advance LINUX users can avoid obvious steps) '''把程序包下载到你的桌面(LINUX高级用户可跳过这些简单步骤)'''<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username> '''其中~/就是主文件夹,如 /home/<用户名>'''<br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours... '''注意,这里需要记住LINUX对大小写敏感,一个小小的错误就能耽搁你好几个小时'''<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site ''' 第二,我都是在我的主文件夹~/下进行所有安装的,这是“官方”网站上建议的选择'''<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir ''' 在~/下用mkdir命令建立一个叫做OpenFOAM的文件夹'''<br />
<br />
copy''' 复制'''<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM''' 它们都在~/Desktop(桌面)上,将其复制到刚刚建立的 ~/OpenFOAM下'''<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive) ''' 用mkdir命令建立如下文件夹(注意LINUX对大小写敏感)'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy''' 复制'''<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux ''' 将其从 ~/Desktop 复制到 ~/OpenFOAM/linux'''<br />
9 * untar avery single file in the following order ''' 按照下面的顺序解压各文件:'''<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing ''' 解压命令格式'''<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename> tar -xzvf <文件名><br />
</nowiki></pre><br />
<br />
This takes a bit of time ''' 这个过程需要一些时间'''<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM ''' 完后你就会在~/OpenFOAM 下看到几个新目录'''<br />
<br />
11 * now look for foamSystemCheck ''' 现在找一下foamSystemCheck'''<br />
which is located at ''' 它位于'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format ''' 这是一个我们要运行的shell脚本,但首先我们得将它变成可执行的格式'''<br />
<br />
type''' 输入'''<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type ''' 回车,然后输入'''<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type''' 回车,再输入'''<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter ''' 回车'''<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!) ''' 这时shell脚本将调用一些命令来检查是否满足安装的最低要求,主机、用户名、Linux 版本及网络连接等等,如果在处理的最后会报一些错,就忽略它报告的那些关于ssh或rsh的警告或致命错误,对于仅仅安装来说这没必要(不管它报告给你了什么,尽管忽略!!!)'''<br />
<br />
type ''' 输入'''<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter''' 回车'''<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in''' 现在你须要为文件的正确读写设置环境变量,环境变量的设置存储在'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well''' 因为我在UBUNTU下用的是默认配置,我的 shell 是 BASH, 文件编辑器是 gedit, 也可以用 VIM'''<br />
<br />
type''' 输入'''<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)''' (如果你不确定自己用的是哪个 shell 环境,按照你的 shell 的格式要求编辑如下文件)'''<br />
<br />
now type''' 输入'''<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type''' 进入 gedit 编辑环境后输入'''<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......''' 注意是‘点’,空格~/.......'''<br />
select file>save''' 点 文件>保存'''<br />
and then file>quit''' 然后点 文件>退出'''<br />
<br />
now update the environment typing''' 现在更新环境,输入'''<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......''' 注意是'点',空格~/.......'''<br />
<br />
the environment variables are updated, you can see this if you type'''环境变量更新了,输入以下命令可以确认'''<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at&nbsp;&nbsp;&nbsp; '''在下面的目录下找到文件foamInstallationTest'''<br><br />
<pre>~/OpenFOAM/OpenFOAM-1.3/bin<br />
</pre> <br />
in the same way, this file is a shell script&nbsp;&nbsp;&nbsp;&nbsp; '''同样的,该文件也是一个shell脚本'''<br><br />
<br />
type&nbsp;&nbsp;&nbsp;&nbsp; '''输入'''<br><br />
<pre>chmod -v 555 foamInstallationTest<br />
</pre> <br />
press enter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''回车'''<br><br />
<br />
now you don't need to export the path, since you have already done it...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''现在你不必输出路径了,因为它已经实现了'''<br><br />
<br />
now type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''输入'''<br><br />
<pre>foamInstallationTest<br />
</pre> <br />
press enter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''回车'''<br><br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
'''这里shell脚本确定各路径并指定它们的变量(路径PATH),这个个过程也要用一定的时间。但你将会在最后看到一个错误,像这样:'''<br />
<br />
test_rsh unsuccessful_conection_refused* test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
'''就此版本而言,这个错误是正常的,你可以安全的忽略,完后OpenFOAM就可以运行了'''<br />
<br />
=== Getting started with OpenFOAM 开始 OpenFOAM 之旅 ===<br />
<br />
Library documentation is included in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''库文档位于'''<br><br />
<pre>~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</pre> <br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
'''在这里你会找到若干教程和实例的PDF文件,简单阅读后你就能开始立即建模了'''<br />
<br />
=== Troubleshooting 常见问题 ===<br />
<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<br />
'''在64位Dapper系统上安装时,我碰巧遇上了默认JAVA目录(JAVA_HOME)的问题,JAVA_PATH原定义路径是:'''<br />
<pre>/home/&lt;username&gt;/OpenFOAM/&lt;architecture&gt;/j2sdk1.4.2_05<br />
</pre> <br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<br />
'''这里在OpenFOAM路径後应该是OpenFOAM-1.3路径。纠正方法是,打开一个终端,然後:'''<br />
<pre>gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</pre> <br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<br />
'''然後,浏览到Java一节,在# Linux Workstation subsection 後编辑export JAVA_HOME 行,如下:'''<br />
<pre>export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</pre> <br />
Then save and close, and source your bashrc<br />
<br />
'''保存并关闭,source 你的bashrc(不知道怎么翻译,译者注)'''<br />
<pre>. ~/.bashrc<br />
</pre> <br />
N.B. it is . space ~/....<br />
<br />
'''注意是:&nbsp; 空格~/……'''<br />
<br />
=== Acknowledgements 致谢 ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=75606UbuntuHelp:OpenFOAM/zh2008-01-11T12:35:52Z<p>HsChen07:</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算流体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)【本教程为那些对学习、应用、实验计算流体动力学(CFD)感兴趣的工程师、科学家和学生而创作】, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions.【CFD采用数值逼近方法来求解控制自然流动的偏微分方程(如Navier-Stokes等),只要满足Navier-Stokes方程的连续性方程,就能求解出服从指定和初始条件下的流动现象】 This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. 【这在实践中有着极大的重要性,任何流体现象在进行真实试验之前都可以在计算机上进行模拟/建模】For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. 【例如,在进行缩尺样机风洞测试之前,你可以通过计算模拟技术来验证一个新的飞机设计方案】Thus a wide range of experimental conditions can be fully tested and corrected on the fly...【因而可以在实验中对各种飞行状态进行全面的测试和校正】<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. 【由于流动控制基本方程是偏微分方程,数值逼近求解方法非常复杂,一个简单问题的求解都需要几分钟,如果遇到更加复杂的问题,求解需要几天来得到一个结果……CFD通常不是运行在PC上的,而是专门运行在专门用于求解这类问题的高性能终端计算机上】Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.【当然这不是阻止你用,你可以在你的计算机上安装本软件,并求解简单的几何状态,为了求解容易做大量假设】<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.【世界上已经存在一些CFD的商业程序如Fluent, COMSOL, CFD-RC, CFD-ADAPCO,但它们是非常昂贵的。然而,也有一些免费的选择如ELMER Multiphysics, OpenFOAM 等。使用CFD软件从来都有点复杂,需要对给定问题的物理现象有深入的理解,并有较好的数学背景】<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal: '''如果要把它安装在 AMD64 系统上,必须把参数 $WM_64打开。在终端下按如下操作进行:'''<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following: '''然后,在 Java 段上面我直接添加了下面几句:'''<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank 64位系统设为 on, 否则留空即可<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect. '''完后为了使这些变化生效,你必须把这些变化提供给 bashrc。'''<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/... '''注意这里是 .空格~/...'''<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)'''(基于测试安装的个人电脑的配置)'''<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)'''AMD Athlon XP LV 1500+ (或相当及更好更高的配置,可以是Intel的或苹果的PowerPC'''<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)'''640MB内存(网站上未提及,大家都知道越多越好)'''<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc'''有1GB可用硬盘空间,这是必须的,文件解压后占用750MB,另外还要留出实例、教程、网格等的存储空间'''<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br><br />
<br />
&nbsp; '''宽带连接(压缩文件平均有约50到100MB),当然也可以用拨号连接下载48小时,这取决于你……'''<br><br />
<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
<br />
'''&nbsp; Ubuntu LINUX 5.10 Breeze Badger 核心版本号是2.6.12-9-386,如果你下载的是64位(AMD64)版就用64位内核'''<br />
<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
<br />
'''&nbsp; 尚未在更高或更低的内核版本上测试,所以如果你的内核不是该版本,你需要试着测试一下'''<br />
<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
'''&nbsp; 不能保证它能在其他LINUX发行版上正常运行'''<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above) '''检查系统要求(上面已列出)'''<br />
<br />
2 * Enter to OpenFOAM web page '''进入OpenFOAM网页'''<br />
<br />
* http://www.openfoam.org<br />
or '''或'''<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download '''点击下载'''<br />
<br />
4 * Select your version '''选择你想要下载的版本'''<br />
<br />
5 * Dowload all the packages to your Desktop (very advance LINUX users can avoid obvious steps) '''把程序包下载到你的桌面(LINUX高级用户可跳过这些简单步骤)'''<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username> '''其中~/就是主文件夹,如 /home/<用户名>'''<br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours... '''注意,这里需要记住LINUX对大小写敏感,一个小小的错误就能耽搁你好几个小时'''<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site ''' 第二,我都是在我的主文件夹~/下进行所有安装的,这是“官方”网站上建议的选择'''<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir ''' 在~/下用mkdir命令建立一个叫做OpenFOAM的文件夹'''<br />
<br />
copy''' 复制'''<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM''' 它们都在~/Desktop(桌面)上,将其复制到刚刚建立的 ~/OpenFOAM下'''<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive) ''' 用mkdir命令建立如下文件夹(注意LINUX对大小写敏感)'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy''' 复制'''<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux ''' 将其从 ~/Desktop 复制到 ~/OpenFOAM/linux'''<br />
9 * untar avery single file in the following order ''' 按照下面的顺序解压各文件:'''<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing ''' 解压命令格式'''<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename> tar -xzvf <文件名><br />
</nowiki></pre><br />
<br />
This takes a bit of time ''' 这个过程需要一些时间'''<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM ''' 完后你就会在~/OpenFOAM 下看到几个新目录'''<br />
<br />
11 * now look for foamSystemCheck ''' 现在找一下foamSystemCheck'''<br />
which is located at ''' 它位于'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format ''' 这是一个我们要运行的shell脚本,但首先我们得将它变成可执行的格式'''<br />
<br />
type''' 输入'''<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type ''' 回车,然后输入'''<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type''' 回车,再输入'''<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter ''' 回车'''<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!) ''' 这时shell脚本将调用一些命令来检查是否满足安装的最低要求,主机、用户名、Linux 版本及网络连接等等,如果在处理的最后会报一些错,就忽略它报告的那些关于ssh或rsh的警告或致命错误,对于仅仅安装来说这没必要(不管它报告给你了什么,尽管忽略!!!)'''<br />
<br />
type ''' 输入'''<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter''' 回车'''<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in''' 现在你须要为文件的正确读写设置环境变量,环境变量的设置存储在'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well''' 因为我在UBUNTU下用的是默认配置,我的 shell 是 BASH, 文件编辑器是 gedit, 也可以用 VIM'''<br />
<br />
type''' 输入'''<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)''' (如果你不确定自己用的是哪个 shell 环境,按照你的 shell 的格式要求编辑如下文件)'''<br />
<br />
now type''' 输入'''<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type''' 进入 gedit 编辑环境后输入'''<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......''' 注意是‘点’,空格~/.......'''<br />
select file>save''' 点 文件>保存'''<br />
and then file>quit''' 然后点 文件>退出'''<br />
<br />
now update the environment typing''' 现在更新环境,输入'''<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......''' 注意是'点',空格~/.......'''<br />
<br />
the environment variables are updated, you can see this if you type'''环境变量更新了,输入以下命令可以确认'''<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at&nbsp;&nbsp;&nbsp; '''在下面的目录下找到文件foamInstallationTest'''<br><br />
<pre>~/OpenFOAM/OpenFOAM-1.3/bin<br />
</pre> <br />
in the same way, this file is a shell script&nbsp;&nbsp;&nbsp;&nbsp; '''同样的,该文件也是一个shell脚本'''<br><br />
<br />
type&nbsp;&nbsp;&nbsp;&nbsp; '''输入'''<br><br />
<pre>chmod -v 555 foamInstallationTest<br />
</pre> <br />
press enter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''回车'''<br><br />
<br />
now you don't need to export the path, since you have already done it...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''现在你不必输出路径了,因为它已经实现了'''<br><br />
<br />
now type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''输入'''<br><br />
<pre>foamInstallationTest<br />
</pre> <br />
press enter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''回车'''<br><br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
'''这里shell脚本确定各路径并指定它们的变量(路径PATH),这个个过程也要用一定的时间。但你将会在最后看到一个错误,像这样:'''<br />
<br />
test_rsh unsuccessful_conection_refused* test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
'''就此版本而言,这个错误是正常的,你可以安全的忽略,完后OpenFOAM就可以运行了'''<br />
<br />
=== Getting started with OpenFOAM 开始 OpenFOAM 之旅 ===<br />
<br />
Library documentation is included in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''库文档位于'''<br><br />
<pre>~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</pre> <br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
'''在这里你会找到若干教程和实例的PDF文件,简单阅读后你就能开始立即建模了'''<br />
<br />
=== Troubleshooting 常见问题 ===<br />
<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<br />
'''在64位Dapper系统上安装时,我碰巧遇上了默认JAVA目录(JAVA_HOME)的问题,JAVA_PATH原定义路径是:'''<br />
<pre>/home/&lt;username&gt;/OpenFOAM/&lt;architecture&gt;/j2sdk1.4.2_05<br />
</pre> <br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<br />
'''这里在OpenFOAM路径后应该是OpenFOAM-1.3路径。纠正方法是,打开一个终端,然后:'''<br />
<pre>gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</pre> <br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<br />
'''然后,浏览到Java一节,在# Linux Workstation subsection 后编辑export JAVA_HOME 行,如下:'''<br />
<pre>export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</pre> <br />
Then save and close, and source your bashrc<br />
<br />
保存并关闭,source 你的bashrc(不知道怎么翻译,译者注)<br />
<pre>. ~/.bashrc<br />
</pre> <br />
N.B. it is . space ~/....<br />
<br />
注意是:&nbsp; 空格~/……<br />
<br />
=== Acknowledgements 致谢 ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=75605UbuntuHelp:OpenFOAM/zh2008-01-11T12:24:00Z<p>HsChen07:</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算流体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)【本教程为那些对学习、应用、实验计算流体动力学(CFD)感兴趣的工程师、科学家和学生而创作】, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions.【CFD采用数值逼近方法来求解控制自然流动的偏微分方程(如Navier-Stokes等),只要满足Navier-Stokes方程的连续性方程,就能求解出服从指定和初始条件下的流动现象】 This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. 【这在实践中有着极大的重要性,任何流体现象在进行真实试验之前都可以在计算机上进行模拟/建模】For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. 【例如,在进行缩尺样机风洞测试之前,你可以通过计算模拟技术来验证一个新的飞机设计方案】Thus a wide range of experimental conditions can be fully tested and corrected on the fly...【因而可以在实验中对各种飞行状态进行全面的测试和校正】<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. 【由于流动控制基本方程是偏微分方程,数值逼近求解方法非常复杂,一个简单问题的求解都需要几分钟,如果遇到更加复杂的问题,求解需要几天来得到一个结果……CFD通常不是运行在PC上的,而是专门运行在专门用于求解这类问题的高性能终端计算机上】Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.【当然这不是阻止你用,你可以在你的计算机上安装本软件,并求解简单的几何状态,为了求解容易做大量假设】<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.【世界上已经存在一些CFD的商业程序如Fluent, COMSOL, CFD-RC, CFD-ADAPCO,但它们是非常昂贵的。然而,也有一些免费的选择如ELMER Multiphysics, OpenFOAM 等。使用CFD软件从来都有点复杂,需要对给定问题的物理现象有深入的理解,并有较好的数学背景】<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal: '''如果要把它安装在 AMD64 系统上,必须把参数 $WM_64打开。在终端下按如下操作进行:'''<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following: '''然后,在 Java 段上面我直接添加了下面几句:'''<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank 64位系统设为 on, 否则留空即可<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect. '''完后为了使这些变化生效,你必须把这些变化提供给 bashrc。'''<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/... '''注意这里是 .空格~/...'''<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)'''(基于测试安装的个人电脑的配置)'''<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)'''AMD Athlon XP LV 1500+ (或相当及更好更高的配置,可以是Intel的或苹果的PowerPC'''<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)'''640MB内存(网站上未提及,大家都知道越多越好)'''<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc'''有1GB可用硬盘空间,这是必须的,文件解压后占用750MB,另外还要留出实例、教程、网格等的存储空间'''<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br><br />
<br />
&nbsp; '''宽带连接(压缩文件平均有约50到100MB),当然也可以用拨号连接下载48小时,这取决于你……'''<br><br />
<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
<br />
'''&nbsp; Ubuntu LINUX 5.10 Breeze Badger 核心版本号是2.6.12-9-386,如果你下载的是64位(AMD64)版就用64位内核'''<br />
<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
<br />
'''&nbsp; 尚未在更高或更低的内核版本上测试,所以如果你的内核不是该版本,你需要试着测试一下'''<br />
<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
'''&nbsp; 不能保证它能在其他LINUX发行版上正常运行'''<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above) '''检查系统要求(上面已列出)'''<br />
<br />
2 * Enter to OpenFOAM web page '''进入OpenFOAM网页'''<br />
<br />
* http://www.openfoam.org<br />
or '''或'''<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download '''点击下载'''<br />
<br />
4 * Select your version '''选择你想要下载的版本'''<br />
<br />
5 * Dowload all the packages to your Desktop (very advance LINUX users can avoid obvious steps) '''把程序包下载到你的桌面(LINUX高级用户可跳过这些简单步骤)'''<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username> '''其中~/就是主文件夹,如 /home/<用户名>'''<br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours... '''注意,这里需要记住LINUX对大小写敏感,一个小小的错误就能耽搁你好几个小时'''<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site ''' 第二,我都是在我的主文件夹~/下进行所有安装的,这是“官方”网站上建议的选择'''<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir ''' 在~/下用mkdir命令建立一个叫做OpenFOAM的文件夹'''<br />
<br />
copy''' 复制'''<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM''' 它们都在~/Desktop(桌面)上,将其复制到刚刚建立的 ~/OpenFOAM下'''<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive) ''' 用mkdir命令建立如下文件夹(注意LINUX对大小写敏感)'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy''' 复制'''<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux ''' 将其从 ~/Desktop 复制到 ~/OpenFOAM/linux'''<br />
9 * untar avery single file in the following order ''' 按照下面的顺序解压各文件:'''<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing ''' 解压命令格式'''<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename> tar -xzvf <文件名><br />
</nowiki></pre><br />
<br />
This takes a bit of time ''' 这个过程需要一些时间'''<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM ''' 完后你就会在~/OpenFOAM 下看到几个新目录'''<br />
<br />
11 * now look for foamSystemCheck ''' 现在找一下foamSystemCheck'''<br />
which is located at ''' 它位于'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format ''' 这是一个我们要运行的shell脚本,但首先我们得将它变成可执行的格式'''<br />
<br />
type''' 输入'''<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type ''' 回车,然后输入'''<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type''' 回车,再输入'''<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter ''' 回车'''<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!) ''' 这时shell脚本将调用一些命令来检查是否满足安装的最低要求,主机、用户名、Linux 版本及网络连接等等,如果在处理的最后会报一些错,就忽略它报告的那些关于ssh或rsh的警告或致命错误,对于仅仅安装来说这没必要(不管它报告给你了什么,尽管忽略!!!)'''<br />
<br />
type ''' 输入'''<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter''' 回车'''<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in''' 现在你须要为文件的正确读写设置环境变量,环境变量的设置存储在'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well''' 因为我在UBUNTU下用的是默认配置,我的 shell 是 BASH, 文件编辑器是 gedit, 也可以用 VIM'''<br />
<br />
type''' 输入'''<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)''' (如果你不确定自己用的是哪个 shell 环境,按照你的 shell 的格式要求编辑如下文件)'''<br />
<br />
now type''' 输入'''<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type''' 进入 gedit 编辑环境后输入'''<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......''' 注意是‘点’,空格~/.......'''<br />
select file>save''' 点 文件>保存'''<br />
and then file>quit''' 然后点 文件>退出'''<br />
<br />
now update the environment typing''' 现在更新环境,输入'''<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......''' 注意是'点',空格~/.......'''<br />
<br />
the environment variables are updated, you can see this if you type'''环境变量更新了,输入以下命令可以确认'''<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at&nbsp;&nbsp;&nbsp; '''在下面的目录下找到文件foamInstallationTest'''<br><br />
<pre>~/OpenFOAM/OpenFOAM-1.3/bin<br />
</pre> <br />
in the same way, this file is a shell script&nbsp;&nbsp;&nbsp;&nbsp; '''同样的,该文件也是一个shell脚本'''<br><br />
<br />
type&nbsp;&nbsp;&nbsp;&nbsp; '''输入'''<br><br />
<pre>chmod -v 555 foamInstallationTest<br />
</pre> <br />
press enter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''回车'''<br><br />
<br />
now you don't need to export the path, since you have already done it...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''现在你不必输出路径了,因为它已经实现了'''<br><br />
<br />
now type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''输入'''<br><br />
<pre>foamInstallationTest<br />
</pre> <br />
press enter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''回车'''<br><br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
'''这里shell脚本确定各路径并指定它们的变量(路径PATH),这个个过程也要用一定的时间。但你将会在最后看到一个错误,像这样:'''<br />
<br />
test_rsh unsuccessful_conection_refused* test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
'''就此版本而言,这个错误是正常的,你可以安全的忽略,完后OpenFOAM就可以运行了'''<br />
<br />
=== Getting started with OpenFOAM 开始 OpenFOAM 之旅 ===<br />
<br />
Library documentation is included in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''库文档位于'''<br><br />
<pre>~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</pre> <br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
'''在这里你会找到若干教程和实例的PDF文件,简单阅读后你就能开始立即建模了'''<br />
<br />
=== Troubleshooting 常见问题 ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements 致谢 ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=75604UbuntuHelp:OpenFOAM/zh2008-01-11T12:20:03Z<p>HsChen07:</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算流体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)【本教程为那些对学习、应用、实验计算流体动力学(CFD)感兴趣的工程师、科学家和学生而创作】, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions.【CFD采用数值逼近方法来求解控制自然流动的偏微分方程(如Navier-Stokes等),只要满足Navier-Stokes方程的连续性方程,就能求解出服从指定和初始条件下的流动现象】 This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. 【这在实践中有着极大的重要性,任何流体现象在进行真实试验之前都可以在计算机上进行模拟/建模】For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. 【例如,在进行缩尺样机风洞测试之前,你可以通过计算模拟技术来验证一个新的飞机设计方案】Thus a wide range of experimental conditions can be fully tested and corrected on the fly...【因而可以在实验中对各种飞行状态进行全面的测试和校正】<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. 【由于流动控制基本方程是偏微分方程,数值逼近求解方法非常复杂,一个简单问题的求解都需要几分钟,如果遇到更加复杂的问题,求解需要几天来得到一个结果……CFD通常不是运行在PC上的,而是专门运行在专门用于求解这类问题的高性能终端计算机上】Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.【当然这不是阻止你用,你可以在你的计算机上安装本软件,并求解简单的几何状态,为了求解容易做大量假设】<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.【世界上已经存在一些CFD的商业程序如Fluent, COMSOL, CFD-RC, CFD-ADAPCO,但它们是非常昂贵的。然而,也有一些免费的选择如ELMER Multiphysics, OpenFOAM 等。使用CFD软件从来都有点复杂,需要对给定问题的物理现象有深入的理解,并有较好的数学背景】<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal: '''如果要把它安装在 AMD64 系统上,必须把参数 $WM_64打开。在终端下按如下操作进行:'''<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following: '''然后,在 Java 段上面我直接添加了下面几句:'''<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank 64位系统设为 on, 否则留空即可<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect. '''完后为了使这些变化生效,你必须把这些变化提供给 bashrc。'''<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/... '''注意这里是 .空格~/...'''<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)'''(基于测试安装的个人电脑的配置)'''<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)'''AMD Athlon XP LV 1500+ (或相当及更好更高的配置,可以是Intel的或苹果的PowerPC'''<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)'''640MB内存(网站上未提及,大家都知道越多越好)'''<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc'''有1GB可用硬盘空间,这是必须的,文件解压后占用750MB,另外还要留出实例、教程、网格等的存储空间'''<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br><br />
<br />
&nbsp; '''宽带连接(压缩文件平均有约50到100MB),当然也可以用拨号连接下载48小时,这取决于你……'''<br><br />
<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
<br />
'''&nbsp; Ubuntu LINUX 5.10 Breeze Badger 核心版本号是2.6.12-9-386,如果你下载的是64位(AMD64)版就用64位内核'''<br />
<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
<br />
'''&nbsp; 尚未在更高或更低的内核版本上测试,所以如果你的内核不是该版本,你需要试着测试一下'''<br />
<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
'''&nbsp; 不能保证它能在其他LINUX发行版上正常运行'''<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above) '''检查系统要求(上面已列出)'''<br />
<br />
2 * Enter to OpenFOAM web page '''进入OpenFOAM网页'''<br />
<br />
* http://www.openfoam.org<br />
or '''或'''<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download '''点击下载'''<br />
<br />
4 * Select your version '''选择你想要下载的版本'''<br />
<br />
5 * Dowload all the packages to your Desktop (very advance LINUX users can avoid obvious steps) '''把程序包下载到你的桌面(LINUX高级用户可跳过这些简单步骤)'''<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username> '''其中~/就是主文件夹,如 /home/<用户名>'''<br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours... '''注意,这里需要记住LINUX对大小写敏感,一个小小的错误就能耽搁你好几个小时'''<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site ''' 第二,我都是在我的主文件夹~/下进行所有安装的,这是“官方”网站上建议的选择'''<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir ''' 在~/下用mkdir命令建立一个叫做OpenFOAM的文件夹'''<br />
<br />
copy''' 复制'''<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM''' 它们都在~/Desktop(桌面)上,将其复制到刚刚建立的 ~/OpenFOAM下'''<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive) ''' 用mkdir命令建立如下文件夹(注意LINUX对大小写敏感)'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy''' 复制'''<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux ''' 将其从 ~/Desktop 复制到 ~/OpenFOAM/linux'''<br />
9 * untar avery single file in the following order ''' 按照下面的顺序解压各文件:'''<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing ''' 解压命令格式'''<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename> tar -xzvf <文件名><br />
</nowiki></pre><br />
<br />
This takes a bit of time ''' 这个过程需要一些时间'''<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM ''' 完后你就会在~/OpenFOAM 下看到几个新目录'''<br />
<br />
11 * now look for foamSystemCheck ''' 现在找一下foamSystemCheck'''<br />
which is located at ''' 它位于'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format ''' 这是一个我们要运行的shell脚本,但首先我们得将它变成可执行的格式'''<br />
<br />
type''' 输入'''<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type ''' 回车,然后输入'''<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type''' 回车,再输入'''<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter ''' 回车'''<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!) ''' 这时shell脚本将调用一些命令来检查是否满足安装的最低要求,主机、用户名、Linux 版本及网络连接等等,如果在处理的最后会报一些错,就忽略它报告的那些关于ssh或rsh的警告或致命错误,对于仅仅安装来说这没必要(不管它报告给你了什么,尽管忽略!!!)'''<br />
<br />
type ''' 输入'''<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter''' 回车'''<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in''' 现在你须要为文件的正确读写设置环境变量,环境变量的设置存储在'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well''' 因为我在UBUNTU下用的是默认配置,我的 shell 是 BASH, 文件编辑器是 gedit, 也可以用 VIM'''<br />
<br />
type''' 输入'''<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)''' (如果你不确定自己用的是哪个 shell 环境,按照你的 shell 的格式要求编辑如下文件)'''<br />
<br />
now type''' 输入'''<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type''' 进入 gedit 编辑环境后输入'''<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......''' 注意是‘点’,空格~/.......'''<br />
select file>save''' 点 文件>保存'''<br />
and then file>quit''' 然后点 文件>退出'''<br />
<br />
now update the environment typing''' 现在更新环境,输入'''<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......''' 注意是'点',空格~/.......'''<br />
<br />
the environment variables are updated, you can see this if you type'''环境变量更新了,输入以下命令可以确认'''<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at&nbsp;&nbsp;&nbsp; '''在下面的目录下找到文件foamInstallationTest'''<br><br />
<pre>~/OpenFOAM/OpenFOAM-1.3/bin<br />
</pre> <br />
in the same way, this file is a shell script&nbsp;&nbsp;&nbsp;&nbsp; '''同样的,该文件也是一个shell脚本'''<br><br />
<br />
type&nbsp;&nbsp;&nbsp;&nbsp; '''输入'''<br><br />
<pre>chmod -v 555 foamInstallationTest<br />
</pre> <br />
press enter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''回车'''<br><br />
<br />
now you don't need to export the path, since you have already done it...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''现在你不必输出路径了,因为它已经实现了'''<br><br />
<br />
now type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''输入'''<br><br />
<pre>foamInstallationTest<br />
</pre> <br />
press enter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''回车'''<br><br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
'''这里shell脚本确定各路径并指定它们的变量(路径PATH),这个个过程也要用一定的时间。但你将会在最后看到一个错误,像这样:'''<br />
<br />
test_rsh unsuccessful_conection_refused* test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
'''就此版本而言,这个错误是正常的,你可以安全的忽略,完后OpenFOAM就可以运行了'''<br />
<br />
=== Getting started with OpenFOAM 开始 OpenFOAM 之旅 ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting 常见问题 ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements 致谢 ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=75602UbuntuHelp:OpenFOAM/zh2008-01-11T11:59:37Z<p>HsChen07:</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算流体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)【本教程为那些对学习、应用、实验计算流体动力学(CFD)感兴趣的工程师、科学家和学生而创作】, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions.【CFD采用数值逼近方法来求解控制自然流动的偏微分方程(如Navier-Stokes等),只要满足Navier-Stokes方程的连续性方程,就能求解出服从指定和初始条件下的流动现象】 This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. 【这在实践中有着极大的重要性,任何流体现象在进行真实试验之前都可以在计算机上进行模拟/建模】For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. 【例如,在进行缩尺样机风洞测试之前,你可以通过计算模拟技术来验证一个新的飞机设计方案】Thus a wide range of experimental conditions can be fully tested and corrected on the fly...【因而可以在实验中对各种飞行状态进行全面的测试和校正】<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. 【由于流动控制基本方程是偏微分方程,数值逼近求解方法非常复杂,一个简单问题的求解都需要几分钟,如果遇到更加复杂的问题,求解需要几天来得到一个结果……CFD通常不是运行在PC上的,而是专门运行在专门用于求解这类问题的高性能终端计算机上】Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.【当然这不是阻止你用,你可以在你的计算机上安装本软件,并求解简单的几何状态,为了求解容易做大量假设】<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.【世界上已经存在一些CFD的商业程序如Fluent, COMSOL, CFD-RC, CFD-ADAPCO,但它们是非常昂贵的。然而,也有一些免费的选择如ELMER Multiphysics, OpenFOAM 等。使用CFD软件从来都有点复杂,需要对给定问题的物理现象有深入的理解,并有较好的数学背景】<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal: '''如果要把它安装在 AMD64 系统上,必须把参数 $WM_64打开。在终端下按如下操作进行:'''<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following: '''然后,在 Java 段上面我直接添加了下面几句:'''<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank 64位系统设为 on, 否则留空即可<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect. '''完后为了使这些变化生效,你必须把这些变化提供给 bashrc。'''<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/... '''注意这里是 .空格~/...'''<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)'''(基于测试安装的个人电脑的配置)'''<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)'''AMD Athlon XP LV 1500+ (或相当及更好更高的配置,可以是Intel的或苹果的PowerPC'''<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)'''640MB内存(网站上未提及,大家都知道越多越好)'''<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc'''有1GB可用硬盘空间,这是必须的,文件解压后占用750MB,另外还要留出实例、教程、网格等的存储空间'''<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br><br />
<br />
&nbsp; '''宽带连接(压缩文件平均有约50到100MB),当然也可以用拨号连接下载48小时,这取决于你……'''<br><br />
<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
<br />
'''&nbsp; Ubuntu LINUX 5.10 Breeze Badger 核心版本号是2.6.12-9-386,如果你下载的是64位(AMD64)版就用64位内核'''<br />
<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
<br />
'''&nbsp; 尚未在更高或更低的内核版本上测试,所以如果你的内核不是该版本,你需要试着测试一下'''<br />
<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
'''&nbsp; 不能保证它能在其他LINUX发行版上正常运行'''<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above) '''检查系统要求(上面已列出)'''<br />
<br />
2 * Enter to OpenFOAM web page '''进入OpenFOAM网页'''<br />
<br />
* http://www.openfoam.org<br />
or '''或'''<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download '''点击下载'''<br />
<br />
4 * Select your version '''选择你想要下载的版本'''<br />
<br />
5 * Dowload all the packages to your Desktop (very advance LINUX users can avoid obvious steps) '''把程序包下载到你的桌面(LINUX高级用户可跳过这些简单步骤)'''<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username> '''其中~/就是主文件夹,如 /home/<用户名>'''<br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours... '''注意,这里需要记住LINUX对大小写敏感,一个小小的错误就能耽搁你好几个小时'''<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site ''' 第二,我都是在我的主文件夹~/下进行所有安装的,这是“官方”网站上建议的选择'''<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir ''' 在~/下用mkdir命令建立一个叫做OpenFOAM的文件夹'''<br />
<br />
copy''' 复制'''<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM''' 它们都在~/Desktop(桌面)上,将其复制到刚刚建立的 ~/OpenFOAM下'''<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive) ''' 用mkdir命令建立如下文件夹(注意LINUX对大小写敏感)'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy''' 复制'''<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux ''' 将其从 ~/Desktop 复制到 ~/OpenFOAM/linux'''<br />
9 * untar avery single file in the following order ''' 按照下面的顺序解压各文件:'''<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing ''' 解压命令格式'''<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename> tar -xzvf <文件名><br />
</nowiki></pre><br />
<br />
This takes a bit of time ''' 这个过程需要一些时间'''<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM ''' 完后你就会在~/OpenFOAM 下看到几个新目录'''<br />
<br />
11 * now look for foamSystemCheck ''' 现在找一下foamSystemCheck'''<br />
which is located at ''' 它位于'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format ''' 这是一个我们要运行的shell脚本,但首先我们得将它变成可执行的格式'''<br />
<br />
type''' 输入'''<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type ''' 回车,然后输入'''<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type''' 回车,再输入'''<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter ''' 回车'''<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!) ''' 这时shell脚本将调用一些命令来检查是否满足安装的最低要求,主机、用户名、Linux 版本及网络连接等等,如果在处理的最后会报一些错,就忽略它报告的那些关于ssh或rsh的警告或致命错误,对于仅仅安装来说这没必要(不管它报告给你了什么,尽管忽略!!!)'''<br />
<br />
type ''' 输入'''<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter''' 回车'''<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in''' 现在你须要为文件的正确读写设置环境变量,环境变量的设置存储在'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well''' 因为我在UBUNTU下用的是默认配置,我的 shell 是 BASH, 文件编辑器是 gedit, 也可以用 VIM'''<br />
<br />
type''' 输入'''<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)''' (如果你不确定自己用的是哪个 shell 环境,按照你的 shell 的格式要求编辑如下文件)'''<br />
<br />
now type''' 输入'''<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type''' 进入 gedit 编辑环境后输入'''<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......''' 注意是‘点’,空格~/.......'''<br />
select file>save''' 点 文件>保存'''<br />
and then file>quit''' 然后点 文件>退出'''<br />
<br />
now update the environment typing''' 现在更新环境,输入'''<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......''' 注意是'点',空格~/.......'''<br />
<br />
the environment variables are updated, you can see this if you type'''环境变量更新了,输入以下命令可以确认'''<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM 开始 OpenFOAM 之旅 ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting 常见问题 ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements 致谢 ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:32bit_and_64bit/zh&diff=73804UbuntuHelp:32bit and 64bit/zh2007-12-08T04:26:30Z<p>HsChen07:</p>
<hr />
<div>{{From|https://help.ubuntu.com/community/32bit_and_64bit}}<br />
{{Languages|UbuntuHelp:32bit_and_64bit}}<br />
{{Translator|水妖上邪}}<br />
<br />
== 64-bit 与 32-bit ==<br />
<br />
Most computers run in 32 bit. Processors capable running 64-bit mode are AMD's Athlon x64, FX, X2 processors, Intel's Itanium and Xeon, Intel Core 2, Pentium D, some versions of Pentium 4 and Celeron D. For AMD processors, if the processor supports AMD64, and for Intel processors, if the processor supports EM64T (which is Intel's version of AMD64), the processor is capable of running in 64-bit mode.<br />
* What about "G5" PowerPC chips? Or SPARC64, MIPS64, etc. (Note: Linux works on EVERYTHING! :) )<br />
大多数计算机目前都是32位的。能够运行64位模式的处理器有AMD 的速龙 x64,FX,X2, Intel的Itanium与Xeon,Intel的Core 2, 奔腾 D, 奔腾 4 与赛扬 D 部分型号。 如果一个AMD处理器支持AMD64,而一个Intel处理器支持EM64T(Intel与AMD64相当的处理器),那么这个处理器就能够运行在64位模式下。<br />
<br />
*那么 “G5” PowerPC 芯片呢? 或者 SPRC64,MIPS64等等?(提示:Linux几乎能够运行在任何东西上:))<br />
=== What is it?这是什么意思 ===<br />
<br />
32 bit and 64 bit is really the size (or width) of a chunk of memory (more accurately, the memory registers) in the computer.<br />
A 32 bit computer has a word size of 32 bit, this limits the memory to a very very large number (4 GB of physical ram in practice). A 64 bit computer will handle a literally enormous amount of<br />
memory (about 128 GB of physical ram).<br />
<br />
32位与64位实际上是计算机存储寄存器的大小或宽度。 一台32位计算机的字节宽度是32位,它的寻址能力非常大(4GB 的物理内存)。 而一台64位计算机的寻址能力简直就是惊人的(大约是120GB物理内存)。<br />
<br />
We are moving towards a world where information is stored in a terabyte. A few<br />
of these will store all the programs of your favourite TV station for a number<br />
of years. When you are moving this amount of data and compressing it to store<br />
it more efficiently then you need the extra power 64 bit allows.<br />
<br />
我们正在步入一个信息以TB单位存储的世界。 某些计算机将能够存储好几年的你所喜爱的电视节目。当我们想移动如此大量的数据并对其进行压缩以便更有效率地存储数据时,我们需要64位处理器所提供的强大能力。<br />
<br />
=== Which is better 何者更好? ===<br />
<br />
A 64 bit processor is the way of the future, and it is worth mentioning that AMD's 64-bit processors function fine in a 32-bit environment. One might still recommend staying with 32-bit software because the 32-bit software has more support, but that is changing. Within 10 years one would expect most computers to be 64 bit however one might believe that between now and then the average person will have another 2 computers (one every 5 years).<br />
<br />
64位处理器代表了未来。值得一提的是,AMD的64位处理器在32位的环境下也运转良好。有人可能建议继续使用32位的软件,因为32位软件的支持更好,但情况在发生变化。我们可以设想在10年时间内有更多的计算机是64位的,但有理由认为在这个时间段内多数人都将拥有另外两台计算机(每五年一台)。<br />
<br />
The bottom line is that for free software it is not that important. Code can be converted between the two because it is source code so that most things 'just work'. The unfortunate thing is that it is actually a little tricky converting some programs from 32 to 64 bit and therefore some programs cannot run in native 64 bit mode. They can run in an emulated mode but this will be a little slower. There is even the case when code that works in 64 bit actually runs slower because of the magic in the processor differences.<br />
<br />
问题在于对自由软件来说这并不重要。软件代码可以互转,因为使用的是源代码,所以大多数软件都“还不错”。不幸的是,要将有的程序从32位转换为64位实际上有些麻烦,所以某些程序无法在真正的64位模式运行。这些程序可以在模拟的模式下工作,但稍微慢一些。某些代码在64位环境下实际运行速度甚至更慢,这是由于处理器的微妙差异造成的。<br />
<br />
On processors that support AMD64 or EM64T, performance might be slightly higher in 64-bit mode than in 32-bit mode. The (technical) reason for this is that in 64-bit mode the processor has more and wider registers available, which means that programs compiled for 64-bit mode can run more efficiently.<br />
<br />
如果使用支持AMD64或EM64T的处理器,64位模式的效率可能比32位模式略高。其(技术)原因是,在64位模式下处理器可用的寄存器更多、位数更宽,这意味着为64位模式编译的程序可以更高效地运行。<br />
<br />
=== How to make 32 bit work on a 64 bit machine 怎样在64位机器上运行32位===<br />
<br />
At this time, those with a 64 bit processor have the option of installing the 64 bit version of Ubuntu.<br />
<br />
目前,拥有64位处理器的用户也可以安装64位的Ubuntu系统。<br />
<br />
Not all software is available in the 64 bit environment. In particular non-free items are usually 32 bit. For example the Flash plugin is a 32 bit program.<br />
<br />
并非所有软件在64位环境下都可用,尤其是,非免费的程序通常都是32位。例如Flash插件就是32位程序。<br />
<br />
Some programs can be run in the 64 bit version of Ubuntu by using the 32 bit libraries.<br />
<br />
有的程序可在64位Ubuntu下运行,不过要使用32位的库。<br />
<br />
You can use [[UbuntuHelp:Rootsudo|sudo]] and [[UbuntuHelp:AptGetHowTo|apt-get]] to install these libraries.<br />
<br />
可以使用[[UbuntuHelp:Rootsudo|sudo]]和[[UbuntuHelp:AptGetHowTo|apt-get]]来安装这些库。<br />
<pre><nowiki><br />
sudo apt-get install ia32-libs*<br />
</nowiki></pre><br />
One can also use the [[UbuntuHelp:SynapticHowto|Synaptic package manager]] to install the 32 bit libraries.<br />
<br />
也可以用[[UbuntuHelp:SynapticHowto|Synaptic package manager]]安装32位库。<br />
<br />
Another option is to create a 32 bit environment with [[UbuntuHelp:DebootstrapChroot|chroot]]<br />
<br />
还有个办法是用[[UbuntuHelp:DebootstrapChroot|chroot]]建立一个32位环境。<br />
<br />
<br />
===附注:x86_64与AMD64===<br />
<br />
“x86-64”,有时会简称为“x64”,是64位微处理器架构及其相应指令集的一种,也是Intel x86架构的延伸产品。“x64”最先由AMD设计,推出时被称为“AMD64”,其后也为英特尔所采用,现时英特尔称之为“Intel 64”,在之前曾使用过Clackamas Technology (CT)、IA-32e及EM64T。外界多使用 "x86-64" 或 "x64" 去称呼此64位架构,从而保持中立,不偏袒任何厂商。<br />
----<br />
[[category:CategoryCleanup]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28589UbuntuHelp:OpenFOAM/zh2007-09-06T07:18:25Z<p>HsChen07:/* System requirements 系统要求 */</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)本教程为那些对学习、应用、实验计算液体力学(CFD)感兴趣的工程师、科学家和学生而创作, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal: '''如果要把它安装在 AMD64 系统上,必须把参数 $WM_64打开。在终端下按如下操作进行:'''<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following: '''然后,在 Java 段上面我直接添加了下面几句:'''<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank 64位系统设为 on, 否则留空即可<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect. '''完后为了使这些变化生效,你必须把这些变化提供给 bashrc。'''<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/... '''注意这里是 .空格~/...'''<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)''' (基于测试安装的个人电脑的配置)'''<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)''' AMD Athlon XP LV 1500+ (或相当及更好更高的配置,可以是Intel的或苹果的PowerPC'''<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)''' 640MB内存(网站上未提及,大家都知道越多越好)'''<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc''' 有1GB可用硬盘空间,这是必须的,文件解压'''<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above) '''检查系统要求(上面已列出)'''<br />
<br />
2 * Enter to OpenFOAM web page '''进入OpenFOAM网页'''<br />
<br />
* http://www.openfoam.org<br />
or '''或'''<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download '''点击下载'''<br />
<br />
4 * Select your version '''选择你想要下载的版本'''<br />
<br />
5 * Dowload all the packages to your Desktop (very advance LINUX users can avoid obvious steps) '''把程序包下载到你的桌面(LINUX高级用户可跳过这些简单步骤)'''<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username> '''其中~/就是主文件夹,如 /home/<用户名>'''<br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours... '''注意,这里需要记住LINUX对大小写敏感,一个小小的错误就能耽搁你好几个小时'''<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site ''' 第二,我都是在我的主文件夹~/下进行所有安装的,这是“官方”网站上建议的选择'''<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir ''' 在~/下用mkdir命令建立一个叫做OpenFOAM的文件夹'''<br />
<br />
copy''' 复制'''<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM''' 它们都在~/Desktop(桌面)上,将其复制到刚刚建立的 ~/OpenFOAM下'''<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive) ''' 用mkdir命令建立如下文件夹(注意LINUX对大小写敏感)'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy''' 复制'''<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux ''' 将其从 ~/Desktop 复制到 ~/OpenFOAM/linux'''<br />
9 * untar avery single file in the following order ''' 按照下面的顺序解压各文件:'''<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing ''' 解压命令格式'''<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename> tar -xzvf <文件名><br />
</nowiki></pre><br />
<br />
This takes a bit of time ''' 这个过程需要一些时间'''<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM ''' 完后你就会在~/OpenFOAM 下看到几个新目录'''<br />
<br />
11 * now look for foamSystemCheck ''' 现在找一下foamSystemCheck'''<br />
which is located at ''' 它位于'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format ''' 这是一个我们要运行的shell脚本,但首先我们得将它变成可执行的格式'''<br />
<br />
type''' 输入'''<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type ''' 回车,然后输入'''<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type''' 回车,再输入'''<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter ''' 回车'''<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!) ''' 这时shell脚本将调用一些命令来检查是否满足安装的最低要求,主机、用户名、Linux 版本及网络连接等等,如果在处理的最后会报一些错,就忽略它报告的那些关于ssh或rsh的警告或致命错误,对于仅仅安装来说这没必要(不管它报告给你了什么,尽管忽略!!!)'''<br />
<br />
type ''' 输入'''<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter''' 回车'''<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in''' 现在你须要为文件的正确读写设置环境变量,环境变量的设置存储在'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well''' 因为我在UBUNTU下用的是默认配置,我的 shell 是 BASH, 文件编辑器是 gedit, 也可以用 VIM'''<br />
<br />
type''' 输入'''<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)''' (如果你不确定自己用的是哪个 shell 环境,按照你的 shell 的格式要求编辑如下文件)'''<br />
<br />
now type''' 输入'''<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type''' 进入 gedit 编辑环境后输入'''<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......''' 注意是‘点’,空格~/.......'''<br />
select file>save''' 点 文件>保存'''<br />
and then file>quit''' 然后点 文件>退出'''<br />
<br />
now update the environment typing''' 现在更新环境,输入'''<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......''' 注意是'点',空格~/.......'''<br />
<br />
the environment variables are updated, you can see this if you type'''环境变量更新了,输入以下命令可以确认'''<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM 开始 OpenFOAM 之旅 ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting 常见问题 ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements 致谢 ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28497UbuntuHelp:OpenFOAM/zh2007-08-22T14:59:36Z<p>HsChen07:/* Step by step instructions 一步一步教你安装 */</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)本教程为那些对学习、应用、实验计算液体力学(CFD)感兴趣的工程师、科学家和学生而创作, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal: '''如果要把它安装在 AMD64 系统上,必须把参数 $WM_64打开。在终端下按如下操作进行:'''<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following: '''然后,在 Java 段上面我直接添加了下面几句:'''<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank 64位系统设为 on, 否则留空即可<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect. '''完后为了使这些变化生效,你必须把这些变化提供给 bashrc。'''<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/... '''注意这里是 .空格~/...'''<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above) '''检查系统要求(上面已列出)'''<br />
<br />
2 * Enter to OpenFOAM web page '''进入OpenFOAM网页'''<br />
<br />
* http://www.openfoam.org<br />
or '''或'''<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download '''点击下载'''<br />
<br />
4 * Select your version '''选择你想要下载的版本'''<br />
<br />
5 * Dowload all the packages to your Desktop (very advance LINUX users can avoid obvious steps) '''把程序包下载到你的桌面(LINUX高级用户可跳过这些简单步骤)'''<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username> '''其中~/就是主文件夹,如 /home/<用户名>'''<br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours... '''注意,这里需要记住LINUX对大小写敏感,一个小小的错误就能耽搁你好几个小时'''<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site ''' 第二,我都是在我的主文件夹~/下进行所有安装的,这是“官方”网站上建议的选择'''<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir ''' 在~/下用mkdir命令建立一个叫做OpenFOAM的文件夹'''<br />
<br />
copy''' 复制'''<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM''' 它们都在~/Desktop(桌面)上,将其复制到刚刚建立的 ~/OpenFOAM下'''<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive) ''' 用mkdir命令建立如下文件夹(注意LINUX对大小写敏感)'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy''' 复制'''<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux ''' 将其从 ~/Desktop 复制到 ~/OpenFOAM/linux'''<br />
9 * untar avery single file in the following order ''' 按照下面的顺序解压各文件:'''<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing ''' 解压命令格式'''<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename> tar -xzvf <文件名><br />
</nowiki></pre><br />
<br />
This takes a bit of time ''' 这个过程需要一些时间'''<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM ''' 完后你就会在~/OpenFOAM 下看到几个新目录'''<br />
<br />
11 * now look for foamSystemCheck ''' 现在找一下foamSystemCheck'''<br />
which is located at ''' 它位于'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format ''' 这是一个我们要运行的shell脚本,但首先我们得将它变成可执行的格式'''<br />
<br />
type''' 输入'''<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type ''' 回车,然后输入'''<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type''' 回车,再输入'''<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter ''' 回车'''<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!) ''' 这时shell脚本将调用一些命令来检查是否满足安装的最低要求,主机、用户名、Linux 版本及网络连接等等,如果在处理的最后会报一些错,就忽略它报告的那些关于ssh或rsh的警告或致命错误,对于仅仅安装来说这没必要(不管它报告给你了什么,尽管忽略!!!)'''<br />
<br />
type ''' 输入'''<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter''' 回车'''<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in''' 现在你须要为文件的正确读写设置环境变量,环境变量的设置存储在'''<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well''' 因为我在UBUNTU下用的是默认配置,我的 shell 是 BASH, 文件编辑器是 gedit, 也可以用 VIM'''<br />
<br />
type''' 输入'''<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)''' (如果你不确定自己用的是哪个 shell 环境,按照你的 shell 的格式要求编辑如下文件)'''<br />
<br />
now type''' 输入'''<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type''' 进入 gedit 编辑环境后输入'''<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......''' 注意是‘点’,空格~/.......'''<br />
select file>save''' 点 文件>保存'''<br />
and then file>quit''' 然后点 文件>退出'''<br />
<br />
now update the environment typing''' 现在更新环境,输入'''<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......''' 注意是'点',空格~/.......'''<br />
<br />
the environment variables are updated, you can see this if you type'''环境变量更新了,输入以下命令可以确认'''<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM 开始 OpenFOAM 之旅 ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting 常见问题 ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements 致谢 ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28496UbuntuHelp:OpenFOAM/zh2007-08-22T12:46:36Z<p>HsChen07:/* AMD64 Systems 对于AMD64系统 */</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)本教程为那些对学习、应用、实验计算液体力学(CFD)感兴趣的工程师、科学家和学生而创作, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal: '''如果要把它安装在 AMD64 系统上,必须把参数 $WM_64打开。在终端下按如下操作进行:'''<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following: '''然后,在 Java 段上面我直接添加了下面几句:'''<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank 64位系统设为 on, 否则留空即可<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect. '''完后为了使这些变化生效,你必须把这些变化提供给 bashrc。'''<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/... '''注意这里是 .空格~/...'''<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above) 检查系统要求(上面已列出)<br />
<br />
2 * Enter to OpenFOAM web page 进入OpenFOAM网页<br />
<br />
* http://www.openfoam.org<br />
or 或<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download 点击下载<br />
<br />
4 * Select your version 选择你想要下载的版本<br />
<br />
5 * Dowload all the packages to your Desktop (very advance LINUX users can avoid obvious steps) 把程序包下载到你的桌面(LINUX高级用户可跳过这些简单步骤)<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username> 其中~/就是主文件夹,如 /home/<用户名><br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours... 注意,这里需要记住LINUX对大小写敏感,一个小小的错误就能耽搁你好几个小时<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site 第二,我都是在我的主文件夹~/下进行所有安装的,这是“官方”网站上建议的选择<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir 在~/下用mkdir命令建立一个叫做OpenFOAM的文件夹<br />
<br />
copy 复制<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM 它们都在~/Desktop(桌面)上,将其复制到刚刚建立的 ~/OpenFOAM下<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive) 用mkdir命令建立如下文件夹(注意LINUX对大小写敏感)<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy 复制<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux 将其从 ~/Desktop 复制到 ~/OpenFOAM/linux<br />
9 * untar avery single file in the following order 按照下面的顺序解压各文件:<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing 解压命令格式<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename> tar -xzvf <文件名><br />
</nowiki></pre><br />
<br />
This takes a bit of time 这个过程需要一些时间<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM 完后你就会在~/OpenFOAM 下看到几个新目录<br />
<br />
11 * now look for foamSystemCheck 现在找一下foamSystemCheck<br />
which is located at 它位于<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format 这是一个我们要运行的shell脚本,但首先我们得将它变成可执行的格式<br />
<br />
type 输入<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type 回车,然后输入<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type 回车,再输入<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter 回车<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!) 这时shell脚本将调用一些命令来检查是否满足安装的最低要求,主机、用户名、Linux 版本及网络连接等等,如果在处理的最后会报一些错,就忽略它报告的那些关于ssh或rsh的警告或致命错误,对于仅仅安装来说这没必要(不管它报告给你了什么,尽管忽略!!!)<br />
<br />
type 输入<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter 回车<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well<br />
<br />
type<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......<br />
select file>save<br />
and then file>quit<br />
<br />
now update the environment typing<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......<br />
<br />
the environment variables are updated, you can see this if you type<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM 开始 OpenFOAM 之旅 ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting 常见问题 ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements 致谢 ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28495UbuntuHelp:OpenFOAM/zh2007-08-22T12:24:44Z<p>HsChen07:/* AMD64 Systems '''对于AMD64系统''' */</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)本教程为那些对学习、应用、实验计算液体力学(CFD)感兴趣的工程师、科学家和学生而创作, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal: '''如果要把它安装在 AMD64 系统上,必须把参数 $WM_64打开。在终端下按如下操作进行:'''<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following: '''然后,在 Java 段上面我直接添加了下面几句:'''<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank '''64位系统设为 on, 否则留空即可'''<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect. '''完后为了使这些变化生效,你必须把这些变化提供给 bashrc。'''<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/... '''注意这里是 .空格~/...'''<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above) 检查系统要求(上面已列出)<br />
<br />
2 * Enter to OpenFOAM web page 进入OpenFOAM网页<br />
<br />
* http://www.openfoam.org<br />
or 或<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download 点击下载<br />
<br />
4 * Select your version 选择你想要下载的版本<br />
<br />
5 * Dowload all the packages to your Desktop (very advance LINUX users can avoid obvious steps) 把程序包下载到你的桌面(LINUX高级用户可跳过这些简单步骤)<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username> 其中~/就是主文件夹,如 /home/<用户名><br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours... 注意,这里需要记住LINUX对大小写敏感,一个小小的错误就能耽搁你好几个小时<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site 第二,我都是在我的主文件夹~/下进行所有安装的,这是“官方”网站上建议的选择<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir 在~/下用mkdir命令建立一个叫做OpenFOAM的文件夹<br />
<br />
copy 复制<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM 它们都在~/Desktop(桌面)上,将其复制到刚刚建立的 ~/OpenFOAM下<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive) 用mkdir命令建立如下文件夹(注意LINUX对大小写敏感)<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy 复制<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux 将其从 ~/Desktop 复制到 ~/OpenFOAM/linux<br />
9 * untar avery single file in the following order 按照下面的顺序解压各文件:<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing 解压命令格式<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename> tar -xzvf <文件名><br />
</nowiki></pre><br />
<br />
This takes a bit of time 这个过程需要一些时间<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM 完后你就会在~/OpenFOAM 下看到几个新目录<br />
<br />
11 * now look for foamSystemCheck 现在找一下foamSystemCheck<br />
which is located at 它位于<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format 这是一个我们要运行的shell脚本,但首先我们得将它变成可执行的格式<br />
<br />
type 输入<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type 回车,然后输入<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type 回车,再输入<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter 回车<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!) 这时shell脚本将调用一些命令来检查是否满足安装的最低要求,主机、用户名、Linux 版本及网络连接等等,如果在处理的最后会报一些错,就忽略它报告的那些关于ssh或rsh的警告或致命错误,对于仅仅安装来说这没必要(不管它报告给你了什么,尽管忽略!!!)<br />
<br />
type 输入<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter 回车<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well<br />
<br />
type<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......<br />
select file>save<br />
and then file>quit<br />
<br />
now update the environment typing<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......<br />
<br />
the environment variables are updated, you can see this if you type<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM 开始 OpenFOAM 之旅 ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting 常见问题 ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements 致谢 ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28431UbuntuHelp:OpenFOAM/zh2007-08-15T06:03:27Z<p>HsChen07:/* Step by step instructions 一步一步教你安装 */</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)本教程为那些对学习、应用、实验计算液体力学(CFD)感兴趣的工程师、科学家和学生而创作, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following:<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect.<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/...<br />
<br />
注意这里是 .空格~/...<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above) 检查系统要求(上面已列出)<br />
<br />
2 * Enter to OpenFOAM web page 进入OpenFOAM网页<br />
<br />
* http://www.openfoam.org<br />
or 或<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download 点击下载<br />
<br />
4 * Select your version 选择你想要下载的版本<br />
<br />
5 * Dowload all the packages to your Desktop (very advance LINUX users can avoid obvious steps) 把程序包下载到你的桌面(LINUX高级用户可跳过这些简单步骤)<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username> 其中~/就是主文件夹,如 /home/<用户名><br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours... 注意,这里需要记住LINUX对大小写敏感,一个小小的错误就能耽搁你好几个小时<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site 第二,我都是在我的主文件夹~/下进行所有安装的,这是“官方”网站上建议的选择<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir 在~/下用mkdir命令建立一个叫做OpenFOAM的文件夹<br />
<br />
copy 复制<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM 它们都在~/Desktop(桌面)上,将其复制到刚刚建立的 ~/OpenFOAM下<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive) 用mkdir命令建立如下文件夹(注意LINUX对大小写敏感)<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy 复制<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux 将其从 ~/Desktop 复制到 ~/OpenFOAM/linux<br />
9 * untar avery single file in the following order 按照下面的顺序解压各文件:<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing 解压命令格式<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename> tar -xzvf <文件名><br />
</nowiki></pre><br />
<br />
This takes a bit of time 这个过程需要一些时间<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM 完后你就会在~/OpenFOAM 下看到几个新目录<br />
<br />
11 * now look for foamSystemCheck 现在找一下foamSystemCheck<br />
which is located at 它位于<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format 这是一个我们要运行的shell脚本,但首先我们得将它变成可执行的格式<br />
<br />
type 输入<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type 回车,然后输入<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type 回车,再输入<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter 回车<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!) 这时shell脚本将调用一些命令来检查是否满足安装的最低要求,主机、用户名、Linux 版本及网络连接等等,如果在处理的最后会报一些错,就忽略它报告的那些关于ssh或rsh的警告或致命错误,对于仅仅安装来说这没必要(不管它报告给你了什么,尽管忽略!!!)<br />
<br />
type 输入<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter 回车<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well<br />
<br />
type<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......<br />
select file>save<br />
and then file>quit<br />
<br />
now update the environment typing<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......<br />
<br />
the environment variables are updated, you can see this if you type<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM 开始 OpenFOAM 之旅 ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting 常见问题 ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements 致谢 ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28412UbuntuHelp:OpenFOAM/zh2007-08-13T16:30:20Z<p>HsChen07:/* Step by step instructions 一步一步教你安装 */</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)本教程为那些对学习、应用、实验计算液体力学(CFD)感兴趣的工程师、科学家和学生而创作, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following:<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect.<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/...<br />
<br />
注意这里是 .空格~/...<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above) 检查系统要求(上面已列出)<br />
<br />
2 * Enter to OpenFOAM web page 进入OpenFOAM网页<br />
<br />
* http://www.openfoam.org<br />
or 或<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download 点击下载<br />
<br />
4 * Select your version 选择你想要下载的版本<br />
<br />
5 * Dowload all the packages to your Desktop (very advance LINUX users can avoid obvious steps) 把程序包下载到你的桌面(LINUX高级用户可忽略这些简单步骤)<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username> 其中~/就是主文件夹,如 /home/<用户名><br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours... 注意,这里需要记住LINUX对大小写敏感,一个小小的错误就能耽搁你好几个小时<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site 第二,我都是在我的主文件夹~/下进行所有安装的,这是“官方”网站上建议的选择<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir 在~/下用mkdir命令建立一个叫做OpenFOAM的文件夹<br />
<br />
copy 复制<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM 它们都在~/Desktop(桌面)上,将其复制到刚刚建立的 ~/OpenFOAM下<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive) 用mkdir命令建立如下文件夹(注意LINUX对大小写敏感)<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy 复制<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux 将其从 ~/Desktop 复制到 ~/OpenFOAM/linux<br />
9 * untar avery single file in the following order 按照下面的顺序解压各文件:<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing 解压命令格式<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename> tar -xzvf <文件名><br />
</nowiki></pre><br />
<br />
This takes a bit of time 这个过程需要一些时间<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM 完后你就会在~/OpenFOAM 下看到几个新目录<br />
<br />
11 * now look for foamSystemCheck 现在找一下foamSystemCheck<br />
which is located at 它位于<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format 这是一个我们要运行的shell脚本,但首先我们得将它变成可执行的格式<br />
<br />
type 输入<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type 回车,然后输入<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type 回车,再输入<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter 回车<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!) 这时shell脚本将调用一些命令来检查是否满足安装的最低要求,主机、用户名、Linux 版本及网络连接等等,如果在处理的最后会报一些错,就忽略它报告的那些关于ssh或rsh的警告或致命错误,对于仅仅安装来说这没必要(不管它报告给你了什么,尽管忽略!!!)<br />
<br />
type 输入<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter 回车<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well<br />
<br />
type<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......<br />
select file>save<br />
and then file>quit<br />
<br />
now update the environment typing<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......<br />
<br />
the environment variables are updated, you can see this if you type<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM 开始 OpenFOAM 之旅 ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting 常见问题 ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements 致谢 ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28411UbuntuHelp:OpenFOAM/zh2007-08-13T15:52:54Z<p>HsChen07:/* AMD64 Systems 对于AMD64系统 */</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)本教程为那些对学习、应用、实验计算液体力学(CFD)感兴趣的工程师、科学家和学生而创作, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following:<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect.<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/...<br />
<br />
注意这里是 .空格~/...<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above)<br />
<br />
2 * Enter to OpenFOAM web page<br />
<br />
* http://www.openfoam.org<br />
or<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download<br />
4 * Select your version<br />
5 * Dowload all the packges to your Desktop (very advance LINUX users can avoid obvious steps)<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username><br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours...<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir<br />
<br />
copy<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive)<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux<br />
<br />
9 * untar avery single file in the following order<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename><br />
</nowiki></pre><br />
<br />
This takes a bit of time<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM<br />
<br />
11 * now look for foamSystemCheck<br />
which is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!)<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well<br />
<br />
type<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......<br />
select file>save<br />
and then file>quit<br />
<br />
now update the environment typing<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......<br />
<br />
the environment variables are updated, you can see this if you type<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM 开始 OpenFOAM 之旅 ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting 常见问题 ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements 致谢 ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28410UbuntuHelp:OpenFOAM/zh2007-08-13T15:51:55Z<p>HsChen07:/* AMD64 Systems 对于AMD64系统 */</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)本教程为那些对学习、应用、实验计算液体力学(CFD)感兴趣的工程师、科学家和学生而创作, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following:<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect.<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/...<br />
注意这里是 .空格~/...<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above)<br />
<br />
2 * Enter to OpenFOAM web page<br />
<br />
* http://www.openfoam.org<br />
or<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download<br />
4 * Select your version<br />
5 * Dowload all the packges to your Desktop (very advance LINUX users can avoid obvious steps)<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username><br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours...<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir<br />
<br />
copy<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive)<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux<br />
<br />
9 * untar avery single file in the following order<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename><br />
</nowiki></pre><br />
<br />
This takes a bit of time<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM<br />
<br />
11 * now look for foamSystemCheck<br />
which is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!)<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well<br />
<br />
type<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......<br />
select file>save<br />
and then file>quit<br />
<br />
now update the environment typing<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......<br />
<br />
the environment variables are updated, you can see this if you type<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM 开始 OpenFOAM 之旅 ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting 常见问题 ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements 致谢 ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28409UbuntuHelp:OpenFOAM/zh2007-08-13T15:43:57Z<p>HsChen07:/* Getting started with OpenFOAM 开始 OpenFOAM 之旅 */</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)本教程为那些对学习、应用、实验计算液体力学(CFD)感兴趣的工程师、科学家和学生而创作, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following:<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect.<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/...<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above)<br />
<br />
2 * Enter to OpenFOAM web page<br />
<br />
* http://www.openfoam.org<br />
or<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download<br />
4 * Select your version<br />
5 * Dowload all the packges to your Desktop (very advance LINUX users can avoid obvious steps)<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username><br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours...<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir<br />
<br />
copy<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive)<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux<br />
<br />
9 * untar avery single file in the following order<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename><br />
</nowiki></pre><br />
<br />
This takes a bit of time<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM<br />
<br />
11 * now look for foamSystemCheck<br />
which is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!)<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well<br />
<br />
type<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......<br />
select file>save<br />
and then file>quit<br />
<br />
now update the environment typing<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......<br />
<br />
the environment variables are updated, you can see this if you type<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM 开始 OpenFOAM 之旅 ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting 常见问题 ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements 致谢 ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28408UbuntuHelp:OpenFOAM/zh2007-08-13T15:42:15Z<p>HsChen07:/* Troubleshooting 常见问题 */</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)本教程为那些对学习、应用、实验计算液体力学(CFD)感兴趣的工程师、科学家和学生而创作, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following:<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect.<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/...<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above)<br />
<br />
2 * Enter to OpenFOAM web page<br />
<br />
* http://www.openfoam.org<br />
or<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download<br />
4 * Select your version<br />
5 * Dowload all the packges to your Desktop (very advance LINUX users can avoid obvious steps)<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username><br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours...<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir<br />
<br />
copy<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive)<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux<br />
<br />
9 * untar avery single file in the following order<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename><br />
</nowiki></pre><br />
<br />
This takes a bit of time<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM<br />
<br />
11 * now look for foamSystemCheck<br />
which is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!)<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well<br />
<br />
type<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......<br />
select file>save<br />
and then file>quit<br />
<br />
now update the environment typing<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......<br />
<br />
the environment variables are updated, you can see this if you type<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting 常见问题 ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements 致谢 ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28407UbuntuHelp:OpenFOAM/zh2007-08-13T15:41:43Z<p>HsChen07:/* Acknowledgements 致谢 */</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)本教程为那些对学习、应用、实验计算液体力学(CFD)感兴趣的工程师、科学家和学生而创作, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following:<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect.<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/...<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above)<br />
<br />
2 * Enter to OpenFOAM web page<br />
<br />
* http://www.openfoam.org<br />
or<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download<br />
4 * Select your version<br />
5 * Dowload all the packges to your Desktop (very advance LINUX users can avoid obvious steps)<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username><br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours...<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir<br />
<br />
copy<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive)<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux<br />
<br />
9 * untar avery single file in the following order<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename><br />
</nowiki></pre><br />
<br />
This takes a bit of time<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM<br />
<br />
11 * now look for foamSystemCheck<br />
which is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!)<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well<br />
<br />
type<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......<br />
select file>save<br />
and then file>quit<br />
<br />
now update the environment typing<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......<br />
<br />
the environment variables are updated, you can see this if you type<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements 致谢 ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28406UbuntuHelp:OpenFOAM/zh2007-08-13T15:40:59Z<p>HsChen07:/* Testing the installation 测试安装是否成功 */</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)本教程为那些对学习、应用、实验计算液体力学(CFD)感兴趣的工程师、科学家和学生而创作, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following:<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect.<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/...<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above)<br />
<br />
2 * Enter to OpenFOAM web page<br />
<br />
* http://www.openfoam.org<br />
or<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download<br />
4 * Select your version<br />
5 * Dowload all the packges to your Desktop (very advance LINUX users can avoid obvious steps)<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username><br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours...<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir<br />
<br />
copy<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive)<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux<br />
<br />
9 * untar avery single file in the following order<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename><br />
</nowiki></pre><br />
<br />
This takes a bit of time<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM<br />
<br />
11 * now look for foamSystemCheck<br />
which is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!)<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well<br />
<br />
type<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......<br />
select file>save<br />
and then file>quit<br />
<br />
now update the environment typing<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......<br />
<br />
the environment variables are updated, you can see this if you type<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation 测试安装是否成功 ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28405UbuntuHelp:OpenFOAM/zh2007-08-13T15:39:17Z<p>HsChen07:/* Step by step instructions 一步一步教你安装 */</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)本教程为那些对学习、应用、实验计算液体力学(CFD)感兴趣的工程师、科学家和学生而创作, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following:<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect.<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/...<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions 一步一步教你安装 ===<br />
<br />
1 * Check system requirements (listed above)<br />
<br />
2 * Enter to OpenFOAM web page<br />
<br />
* http://www.openfoam.org<br />
or<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download<br />
4 * Select your version<br />
5 * Dowload all the packges to your Desktop (very advance LINUX users can avoid obvious steps)<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username><br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours...<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir<br />
<br />
copy<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive)<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux<br />
<br />
9 * untar avery single file in the following order<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename><br />
</nowiki></pre><br />
<br />
This takes a bit of time<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM<br />
<br />
11 * now look for foamSystemCheck<br />
which is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!)<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well<br />
<br />
type<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......<br />
select file>save<br />
and then file>quit<br />
<br />
now update the environment typing<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......<br />
<br />
the environment variables are updated, you can see this if you type<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
=== Testing the installation ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28404UbuntuHelp:OpenFOAM/zh2007-08-13T15:38:18Z<p>HsChen07:/* System requirements 系统要求 */</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)本教程为那些对学习、应用、实验计算液体力学(CFD)感兴趣的工程师、科学家和学生而创作, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following:<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect.<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/...<br />
<br />
=== System requirements 系统要求 ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions ===<br />
<br />
1 * Check system requirements (listed above)<br />
<br />
2 * Enter to OpenFOAM web page<br />
<br />
* http://www.openfoam.org<br />
or<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download<br />
4 * Select your version<br />
5 * Dowload all the packges to your Desktop (very advance LINUX users can avoid obvious steps)<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username><br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours...<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir<br />
<br />
copy<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive)<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux<br />
<br />
9 * untar avery single file in the following order<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename><br />
</nowiki></pre><br />
<br />
This takes a bit of time<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM<br />
<br />
11 * now look for foamSystemCheck<br />
which is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!)<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well<br />
<br />
type<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......<br />
select file>save<br />
and then file>quit<br />
<br />
now update the environment typing<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......<br />
<br />
the environment variables are updated, you can see this if you type<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
<br />
=== Testing the installation ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28403UbuntuHelp:OpenFOAM/zh2007-08-13T15:37:12Z<p>HsChen07:/* AMD64 Systems 对于AMD64系统 */</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)本教程为那些对学习、应用、实验计算液体力学(CFD)感兴趣的工程师、科学家和学生而创作, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems 对于AMD64系统 ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following:<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect.<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/...<br />
<br />
=== System requirements ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions ===<br />
<br />
1 * Check system requirements (listed above)<br />
<br />
2 * Enter to OpenFOAM web page<br />
<br />
* http://www.openfoam.org<br />
or<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download<br />
4 * Select your version<br />
5 * Dowload all the packges to your Desktop (very advance LINUX users can avoid obvious steps)<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username><br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours...<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir<br />
<br />
copy<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive)<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux<br />
<br />
9 * untar avery single file in the following order<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename><br />
</nowiki></pre><br />
<br />
This takes a bit of time<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM<br />
<br />
11 * now look for foamSystemCheck<br />
which is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!)<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well<br />
<br />
type<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......<br />
select file>save<br />
and then file>quit<br />
<br />
now update the environment typing<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......<br />
<br />
the environment variables are updated, you can see this if you type<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
<br />
=== Testing the installation ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28402UbuntuHelp:OpenFOAM/zh2007-08-13T15:35:33Z<p>HsChen07:/* Introduction 简介 */</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD)本教程为那些对学习、应用、实验计算液体力学(CFD)感兴趣的工程师、科学家和学生而创作, CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following:<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect.<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/...<br />
<br />
<br />
=== System requirements ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions ===<br />
<br />
1 * Check system requirements (listed above)<br />
<br />
2 * Enter to OpenFOAM web page<br />
<br />
* http://www.openfoam.org<br />
or<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download<br />
4 * Select your version<br />
5 * Dowload all the packges to your Desktop (very advance LINUX users can avoid obvious steps)<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username><br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours...<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir<br />
<br />
copy<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive)<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux<br />
<br />
9 * untar avery single file in the following order<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename><br />
</nowiki></pre><br />
<br />
This takes a bit of time<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM<br />
<br />
11 * now look for foamSystemCheck<br />
which is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!)<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well<br />
<br />
type<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......<br />
select file>save<br />
and then file>quit<br />
<br />
now update the environment typing<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......<br />
<br />
the environment variables are updated, you can see this if you type<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
<br />
=== Testing the installation ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28400UbuntuHelp:OpenFOAM/zh2007-08-13T15:30:26Z<p>HsChen07:</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD), CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following:<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect.<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/...<br />
<br />
<br />
=== System requirements ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions ===<br />
<br />
1 * Check system requirements (listed above)<br />
<br />
2 * Enter to OpenFOAM web page<br />
<br />
* http://www.openfoam.org<br />
or<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download<br />
4 * Select your version<br />
5 * Dowload all the packges to your Desktop (very advance LINUX users can avoid obvious steps)<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username><br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours...<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir<br />
<br />
copy<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive)<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux<br />
<br />
9 * untar avery single file in the following order<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename><br />
</nowiki></pre><br />
<br />
This takes a bit of time<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM<br />
<br />
11 * now look for foamSystemCheck<br />
which is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!)<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well<br />
<br />
type<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......<br />
select file>save<br />
and then file>quit<br />
<br />
now update the environment typing<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......<br />
<br />
the environment variables are updated, you can see this if you type<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
<br />
=== Testing the installation ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28399UbuntuHelp:OpenFOAM/zh2007-08-13T15:30:04Z<p>HsChen07:</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
目录 [http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD), CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following:<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect.<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/...<br />
<br />
<br />
=== System requirements ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions ===<br />
<br />
1 * Check system requirements (listed above)<br />
<br />
2 * Enter to OpenFOAM web page<br />
<br />
* http://www.openfoam.org<br />
or<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download<br />
4 * Select your version<br />
5 * Dowload all the packges to your Desktop (very advance LINUX users can avoid obvious steps)<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username><br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours...<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir<br />
<br />
copy<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive)<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux<br />
<br />
9 * untar avery single file in the following order<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename><br />
</nowiki></pre><br />
<br />
This takes a bit of time<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM<br />
<br />
11 * now look for foamSystemCheck<br />
which is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!)<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well<br />
<br />
type<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......<br />
select file>save<br />
and then file>quit<br />
<br />
now update the environment typing<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......<br />
<br />
the environment variables are updated, you can see this if you type<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
<br />
=== Testing the installation ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28398UbuntuHelp:OpenFOAM/zh2007-08-13T15:28:48Z<p>HsChen07:/* How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件*/</p>
<hr />
<div>文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
目录 [http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
* 1 How to install OpenFOAM CFD software<br />
如何安装OpenFOAM 计算液体力学软件<br />
o 1.1 Introduction<br />
o 1.1 简介<br />
o 1.2 AMD64 Systems<br />
o1.2 AMD64系统<br />
o 1.3 System requirements<br />
o1.3 对系统的要求<br />
o 1.4 Step by step instructions<br />
o1.4 分步指导<br />
o 1.5 Testing the installation<br />
o1.5 测试安装是否成功<br />
o 1.6 Getting started with OpenFOAM<br />
o1.6 开始使用OpenFOAM<br />
o 1.7 Troubleshooting<br />
o1.7 常见问题<br />
o 1.8 Acknowledgements<br />
o1.8 鸣谢<br />
<br />
<br />
<br />
== How to install OpenFOAM CFD software 怎样安装OpenFOAM计算液体力学软件 ==<br />
=== Introduction 简介 ===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD), CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following:<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect.<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/...<br />
<br />
<br />
=== System requirements ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions ===<br />
<br />
1 * Check system requirements (listed above)<br />
<br />
2 * Enter to OpenFOAM web page<br />
<br />
* http://www.openfoam.org<br />
or<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download<br />
4 * Select your version<br />
5 * Dowload all the packges to your Desktop (very advance LINUX users can avoid obvious steps)<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username><br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours...<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir<br />
<br />
copy<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive)<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux<br />
<br />
9 * untar avery single file in the following order<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename><br />
</nowiki></pre><br />
<br />
This takes a bit of time<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM<br />
<br />
11 * now look for foamSystemCheck<br />
which is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!)<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well<br />
<br />
type<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......<br />
select file>save<br />
and then file>quit<br />
<br />
now update the environment typing<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......<br />
<br />
the environment variables are updated, you can see this if you type<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
<br />
=== Testing the installation ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28397UbuntuHelp:OpenFOAM/zh2007-08-13T15:25:24Z<p>HsChen07:</p>
<hr />
<div> 文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
目录 [http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
* 1 How to install OpenFOAM CFD software<br />
如何安装OpenFOAM 计算液体力学软件<br />
o 1.1 Introduction<br />
o 1.1 简介<br />
o 1.2 AMD64 Systems<br />
o1.2 AMD64系统<br />
o 1.3 System requirements<br />
o1.3 对系统的要求<br />
o 1.4 Step by step instructions<br />
o1.4 分步指导<br />
o 1.5 Testing the installation<br />
o1.5 测试安装是否成功<br />
o 1.6 Getting started with OpenFOAM<br />
o1.6 开始使用OpenFOAM<br />
o 1.7 Troubleshooting<br />
o1.7 常见问题<br />
o 1.8 Acknowledgements<br />
o1.8 鸣谢<br />
<br />
<br />
<br />
== How to install OpenFOAM CFD software ==<br />
==怎样安装OpenFOAM计算液体力学软件==<br />
=== Introduction ===<br />
===简介===<br />
<br />
This HowTo is aimed to all Engineers, Scientist, Students interested in learning/applying/experimenting Computational Fluids Dynamics (CFD), CFD uses numerical approximation to the partial differential equations that govern flow of fluids in nature (i.e. Navier-Stokes equation, etc) the solution of the Navier-Stokes equation once it comply with the requirements of the Continuity equation gives the behavior of the fluids subject to the given boundary and initial conditions. This has a tremendous importance since practically any fluid can be simulated/modelled in a computer before doing any 'real life' experiment. For example you can test the design of a new aircraft using computational techniques before even build a small scale prototype for wind tunnel testing. Thus a wide range of experimental conditions can be fully tested and corrected on the fly...<br />
Since the basic equations (full) that govern fluid flow are in form of PDEs, the numerical methods to approximate the solution are complex, a very simple problem can be solved in a couple of minutes however if the problem is much more complicated the solver can take days in find a solution... in general CFD is not intended for common PCs but for high end computers designed to tackle this kind of problems. Of course this cannot stop you, you can install this software in your computer and 'play' with simple geometries and doing a lot of assumptions to solve a given problem more easily.<br />
There are several CFD brands out there like Fluent, COMSOL, CFD-RC, CFD-ADAPCO, (which are quite expensive though) ... however there are also free alternatives like ELMER Multiphysics, OpenFOAM and many others.<br />
Inherently CFD software is a bit complicated to use, it requires a deep understanding of the physical phenomena involved in given problem, and a good mathematical background.<br />
<br />
=== AMD64 Systems ===<br />
If you are installing this on an AMD64 system, it is necessary to set the parameter $WM_64 to "on". To achieve this, do the following in a terminal:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, I added directly above the Java section, the following:<br />
<pre><nowiki><br />
# 64 Bit Machine set to on else set to blank<br />
WM_64="on"<br />
</nowiki></pre><br />
<br />
After doing so you must source your bashrc to make sure the changes take effect.<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/...<br />
<br />
<br />
=== System requirements ===<br />
<br />
(based on the specs of the PC tested for the installation)<br />
<br />
* AMD Athlon XP LV 1500+ (or equivalent or higher or better or Intel or PowerPC)<br />
* 640 MB (The web page states nothing, but everybody knows the more, the better)<br />
* 1 GB hard drive available, this is a must, uncompressed files takes 750 MB, plus the cases, tutorials, grids, etc<br />
* Broadband conection (the compressed files are from 50 to 100 MB average) of course you can use dial up and wait 48 hours to download it, it's up to you...<br />
* Ubuntu LINUX 5.10 Breeze Badger Kernel version 2.6.12-9-386, if you download the AMD64 version then use the 64bit LINUX kernel<br />
* Not tested on kernel versions above or below (you should try to do this if this is not yor kernel version)<br />
* Not sure if this would work on other LINUX distributions<br />
<br />
=== Step by step instructions ===<br />
<br />
1 * Check system requirements (listed above)<br />
<br />
2 * Enter to OpenFOAM web page<br />
<br />
* http://www.openfoam.org<br />
or<br />
* http://www.opencfd.co.uk<br />
<br />
3 * Click on download<br />
4 * Select your version<br />
5 * Dowload all the packges to your Desktop (very advance LINUX users can avoid obvious steps)<br />
<br />
<pre><nowiki><br />
~/Desktop<br />
</nowiki></pre><br />
<br />
where ~/ is the home folder for example /home/<username><br />
<br />
N.B from this point it is necesary to remenber that LINUX is CASE SENSITIVE, a mistake can delay you some hours...<br />
<br />
second I did install everything in my home folder which is ~/ it is the recommended option from the web site<br />
<br />
<br />
6 * create a folder caller OpenFOAM in ~/ using mkdir<br />
<br />
copy<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
<br />
which are on ~/Desktop to the folder you've just created ~/OpenFOAM<br />
<br />
7 * create the following folder using mkdir (remember LINUX is case sensitive)<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/linux<br />
</nowiki></pre><br />
<br />
8 * copy<br />
<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
* which are in ~/Desktop to ~/OpenFOAM/linux<br />
<br />
9 * untar avery single file in the following order<br />
<br />
* OpenFOAM-1.3.General.gtgz<br />
* OpenFOAM-1.3.linuxGcc4DPOpt.gtgz<br />
* OpenFOAM-1.3.linuxGcc4SPOpt.gtgz<br />
* gcc-4.1.0.linux.tgz<br />
* paraview-2.4.2.linux.tgz<br />
* j2sdk1.4.2_05.linux.tgz<br />
<br />
typing<br />
<br />
<pre><nowiki><br />
tar -xzvf <filename><br />
</nowiki></pre><br />
<br />
This takes a bit of time<br />
<br />
10 * after finishing you will see new directories created in ~/OpenFOAM<br />
<br />
11 * now look for foamSystemCheck<br />
which is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
this is a shell script that we have to execute, however we need to change it to an executable format<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
[[UbuntuHelp:export PATH=$PATH:~/OpenFOAM/OpenFOAM-1.3/bin/]]<br />
</nowiki></pre><br />
<br />
press enter, then type<br />
<br />
<pre><nowiki><br />
foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
At this time, the shell script will call some functions to check if your system comply with the minimum requirements for the installation, Host, username, Linux version, and Network conectivity, however at the end of the process some error occur, just ignore any warning or fatal error about ssh or rsh, this is not needed for the stand alone installation (It doesn't matter what it tells you, just ignore it!!!)<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 755 foamSystemCheck<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
12 * * * * * *<br />
Now you have to set the environment variables for a correct file access, the environment variable settings are stored in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3<br />
</nowiki></pre><br />
<br />
since I am using the default options in UBUNTU, my shell is BASH and my text editor is gedit, you can use VIM as well<br />
<br />
type<br />
<br />
<pre><nowiki><br />
echo $SHELL<br />
</nowiki></pre><br />
<br />
(if you are not sure which shell you are using and edit the following files according to your shell syntax)<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
gedit ~/.bashrc &<br />
</nowiki></pre><br />
<br />
once in gedit type<br />
<br />
<pre><nowiki><br />
. ~/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/bashrc<br />
</nowiki></pre><br />
<br />
N.B. it is 'dot', space~/.......<br />
select file>save<br />
and then file>quit<br />
<br />
now update the environment typing<br />
<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is 'dot', space ~/.......<br />
<br />
the environment variables are updated, you can see this if you type<br />
<br />
<pre><nowiki><br />
echo $PATH<br />
</nowiki></pre><br />
<br />
<br />
=== Testing the installation ===<br />
<br />
13 **** look for foamInstallationTest which it is located at<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/bin<br />
</nowiki></pre><br />
<br />
in the same way, this file is a shell script<br />
<br />
type<br />
<br />
<pre><nowiki><br />
chmod -v 555 foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
now you don't need to export the path, since you have already done it...<br />
<br />
now type<br />
<br />
<pre><nowiki><br />
foamInstallationTest<br />
</nowiki></pre><br />
<br />
press enter<br />
<br />
here the shell scrip verifies every directory and assigns to each of them an environment variable (PATH), also this takes a bit of time. However you will see an error at the end of the process, something like this:<br />
<br />
test_rsh unsuccessful_conection_refused*<br />
test_ssh unsuccessful_conection_refused*<br />
<br />
FATAL: No remote shell available (etc....)<br />
<br />
For the stand alone version, this message is normal and you can safely ignore it, just after this OpenFOAM is ready to run<br />
<br />
=== Getting started with OpenFOAM ===<br />
<br />
Library documentation is included in<br />
<br />
<pre><nowiki><br />
~/OpenFOAM/OpenFOAM-1.3/doc/Guides-a4<br />
</nowiki></pre><br />
<br />
you will find there some PDFs with tutorials and very useful examples, after a short reading you can start modelling right away.<br />
<br />
=== Troubleshooting ===<br />
When installing this on a Dapper 64-bit system, I ran into the problem that the default JAVA_HOME, and therefore JAVA_PATH were directed to the following:<br />
<pre><nowiki><br />
/home/<username>/OpenFOAM/<architecture>/j2sdk1.4.2_05<br />
</nowiki></pre><br />
where there should be an OpenFOAM-1.3 directory after the OpenFOAM directory. To fix this, I opened a terminal and did the following:<br />
<pre><nowiki><br />
gedit ~/OpenFOAM/OpenFOAM-1.3/.bashrc<br />
</nowiki></pre><br />
Then, browse to the Java section, under the # Linux Workstation subsection, edit the export JAVA_HOME line to look like the following:<br />
<pre><nowiki><br />
export JAVA_HOME=$WM_PROJECT_INST_DIR/OpenFOAM-1.3/$WM_ARCH/j2sdk1.4.2_05<br />
</nowiki></pre><br />
Then save and close, and source your bashrc<br />
<pre><nowiki><br />
. ~/.bashrc<br />
</nowiki></pre><br />
N.B. it is . space ~/....<br />
<br />
=== Acknowledgements ===<br />
<br />
* Thank you to the OpenFOAM CFD developement team for making it available under the GLP.<br />
* Thank you to Ubuntu Team for the great effort in this Operating System<br />
* Thank you for reading this wiki<br />
* This wiki is based in my previous Ubuntu Forum Thread [http://ubuntuforums.org/showthread.php?t=156298 ScientificUbuntu Installing OpenFOAM CFD Software]<br />
<br />
* * * * * derjames * * * * *<br />
----<br />
[[category:CategoryCleanup]] [[category:CategoryScience]]<br />
<br />
[[category:UbuntuHelp]]</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28394UbuntuHelp:OpenFOAM/zh2007-08-13T14:44:09Z<p>HsChen07:</p>
<hr />
<div> 文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
目录 [http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
* 1 How to install OpenFOAM CFD software<br />
如何安装OpenFOAM 计算液体力学软件<br />
o 1.1 Introduction<br />
o 1.1 简介<br />
o 1.2 AMD64 Systems<br />
o1.2 AMD64系统<br />
o 1.3 System requirements<br />
o1.3 对系统的要求<br />
o 1.4 Step by step instructions<br />
o1.4 分步指导<br />
o 1.5 Testing the installation<br />
o1.5 测试安装是否成功<br />
o 1.6 Getting started with OpenFOAM<br />
o1.6 开始使用OpenFOAM<br />
o 1.7 Troubleshooting<br />
o1.7 常见问题<br />
o 1.8 Acknowledgements<br />
o1.8 鸣谢<br />
<br />
[编辑] How to install OpenFOAM CFD software<br />
怎样安装OpenFOAM计算液体力学软件<br />
[编辑] Introduction <br />
简介</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28393UbuntuHelp:OpenFOAM/zh2007-08-13T14:40:29Z<p>HsChen07:</p>
<hr />
<div> 文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
目录<br />
[http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&action=edit 编辑]<br />
<br />
* 1 How to install OpenFOAM CFD software<br />
如何安装OpenFOAM 计算液体力学软件<br />
o 1.1 Introduction<br />
o 1.1 简介<br />
o 1.2 AMD64 Systems<br />
o1.2 AMD64系统<br />
o 1.3 System requirements<br />
o1.3 对系统的要求<br />
o 1.4 Step by step instructions<br />
o1.4 分步指导<br />
o 1.5 Testing the installation<br />
o1.5 测试安装是否成功<br />
o 1.6 Getting started with OpenFOAM<br />
o1.6 开始使用OpenFOAM<br />
o 1.7 Troubleshooting<br />
o1.7 常见问题<br />
o 1.8 Acknowledgements<br />
o1.8 鸣谢<br />
<br />
[编辑] How to install OpenFOAM CFD software<br />
怎样安装OpenFOAM计算液体力学软件<br />
[编辑] Introduction <br />
简介</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28392UbuntuHelp:OpenFOAM/zh2007-08-13T14:38:23Z<p>HsChen07:</p>
<hr />
<div> 文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
<br />
翻译人员: HsChen07<br />
<br />
<br />
目录<br />
[隐藏]<br />
<br />
* 1 How to install OpenFOAM CFD software<br />
如何安装OpenFOAM 计算液体力学软件<br />
o 1.1 Introduction<br />
o 1.1 简介<br />
o 1.2 AMD64 Systems<br />
o1.2 AMD64系统<br />
o 1.3 System requirements<br />
o1.3 对系统的要求<br />
o 1.4 Step by step instructions<br />
o1.4 分步指导<br />
o 1.5 Testing the installation<br />
o1.5 测试安装是否成功<br />
o 1.6 Getting started with OpenFOAM<br />
o1.6 开始使用OpenFOAM<br />
o 1.7 Troubleshooting<br />
o1.7 常见问题<br />
o 1.8 Acknowledgements<br />
o1.8 鸣谢<br />
<br />
[编辑] How to install OpenFOAM CFD software<br />
怎样安装OpenFOAM计算液体力学软件<br />
[编辑] Introduction <br />
简介</div>HsChen07https://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM/zh&diff=28391UbuntuHelp:OpenFOAM/zh2007-08-13T14:36:45Z<p>HsChen07:新页面: 文章出处: http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM 翻译人员: HsChen07 目录 [隐藏] * 1 How to install OpenFOAM CFD software 如何安装Ope...</p>
<hr />
<div> 文章出处: <br />
<br />
http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:OpenFOAM<br />
翻译人员: <br />
<br />
HsChen07<br />
<br />
<br />
目录<br />
[隐藏]<br />
<br />
* 1 How to install OpenFOAM CFD software<br />
如何安装OpenFOAM 计算液体力学软件<br />
o 1.1 Introduction<br />
o 1.1 简介<br />
o 1.2 AMD64 Systems<br />
o1.2 AMD64系统<br />
o 1.3 System requirements<br />
o1.3 对系统的要求<br />
o 1.4 Step by step instructions<br />
o1.4 分步指导<br />
o 1.5 Testing the installation<br />
o1.5 测试安装是否成功<br />
o 1.6 Getting started with OpenFOAM<br />
o1.6 开始使用OpenFOAM<br />
o 1.7 Troubleshooting<br />
o1.7 常见问题<br />
o 1.8 Acknowledgements<br />
o1.8 鸣谢<br />
<br />
[编辑] How to install OpenFOAM CFD software<br />
怎样安装OpenFOAM计算液体力学软件<br />
[编辑] Introduction <br />
简介</div>HsChen07