Ubuntu9.10 install OpenFOAM

Source: Internet
Author: User
1. Create the "OpenFOAM" folder under Ubuntu9.10 user's home directory, which must be created under the main folder. This makes the subsequent environment variable settings very simple and is also officially recommended. 2. Download five official installation files. Download a total size of MB. Be sure to download the full version. Otherwise, an error is returned! Copy the five files to the OpenFOAM folder and decompress each software package using tarxzf. Decompress the files in the following order: the OpenFOAM-1.6 directory is generated after decompression.

1. Create the "OpenFOAM" folder in the Ubuntu 9.10 user's home directory, which must be created under the main folder. The subsequent environment variable settings are very simple and are officially recommended.

2. Download five official installation files. Download a total size of MB. Be sure to download the full version. Otherwise, an error is returned!

Copy the five files to the OpenFOAM folder and decompress each software package using tar xzf. Decompress the files in the following order: the OpenFOAM-1.6 directory is generated after decompression.

OpenFOAM-1.6.General.gtgz (source code)

OpenFOAM-1.6.linuxGcc4DPOpt.gtgz (Double Precision)

OpenFOAM-1.6.linuxGcc4SPOpt.gtgz (precision)

3. install necessary compilation software packages. You only need the sudo apt-get install + package name. Gcc 4.3.4, g ++ 4.3.4, zlib1g-dev; flex ++; bison; binutils-dev; python; qt4-designer; cmake. Of course, if gcc and g ++ are available in the system, you do not need to install version 4.3.4. However, we recommend that you use version 4.3.x for compiling. You can enter/usr/bin, use ln-s gcc gcc-4.3.4 and ln-s g ++-4.3.4 to change the default gcc and g ++ versions of the system.

4. modify the configuration file:

For AMD64CPU, the $ WM_64 parameter must be enabled. Perform the following operations on the terminal:

Gedit ~ /. Bashrc

Then, add the following directly in the first line:

Export WM_64 = "on" 64-bit system is set to on. Otherwise, leave it blank.

To make these changes take effect, you must provide these changes to bashrc.

.~ /. Bashrc Note: Here is. Space ~ /...

Echo $ SHELL check sh type. If it is bash, open ~ /OpenFOAM/OpenFOAM-1.6/etc/setting. sh

# Select compiler installation

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# CompilerInstall = OpenFOAM | System

CompilerInstall = set System to System and compile it by default.

Save and exit.

Now you need to set the environment variables for correct file read/write. The environment variables are stored in ~ /OpenFOAM/OpenFOAM-1.6/

Enter gedit ~ on the terminal ~ /. Bashrc & open the file and enter:

.~ /OpenFOAM/OpenFOAM-1.6/etc/bashrc save and exit.

To make these changes take effect, you must provide these changes to bashrc.

.~ /. Bashrc Note: Here is. Space ~ /...

The environment variable has been updated. Enter the following command to confirm that echo $ PATH shows that some newly added directories have appeared.

5. Compile the source code (skip this step if you want to directly use the downloaded binary Program)

Go to the directory: cd ~ /OpenFOAM/OpenFOAM-1.6/

./Allwmake starts compilation, which is a long wait...

6. test whether the installation is successful. Find the foamInstallationTest file in the directory below and run

~ /OpenFOAM/OpenFOAM-1.6/bin

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.