Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to install OpenFOAM in Open SUSE

Shulou Source: shulou.com Published: 2022-06-01 04:53:21 10月01日 Update

This article is about how Open SUSE installs OpenFOAM. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

1. Install Open SUSE

Download an Open SUSE from the Internet (* engraved into a disk) and install it directly with a graphical interface.

When you choose to install the software, remember to install the following packages together: gcc (compiler), python (a language needed for paraview), campe (required for compiling paraview), Qt (required for paraview). It doesn't matter if you forget to choose, you can install it with yast after the system is installed.

two。 Check the software version:

After installing Open SUSE, use the command to check whether the version of the installed software meets the OpenFOAM requirements.

Rpm-qa kernel* kernel-source gcc* make

Qmake-- version (view Qt version)

Cmake-- version (view cmake version)

If you are prompted that the command cannot be found, the software has not been installed successfully. You can install it with yast:

Must be run as an administrator: su root

Enter password: xxxx

Then yast-I xxxxxxxxx (name of the software to be installed)

3. Download the correct OpenFOAM package (assuming the installed Open SUSE system is 64-bit):

OpenFOAM-1.6.General.gtgz

OpenFOAM-1.6.linux64GccDPOpt.gtgz

ThirdParty-1.6.General.gtgz

ThirdParty-1.6.linux64Gcc.gtgz

4. Create a new folder and extract it (assuming the current user name is mark)

Under the root directory "/ home/mark/", create a new folder "OpenFOAM", Linux is case-sensitive, and copy the downloaded files to the OpenFOAM folder.

Decompress:

Locate on the command line: cd / home/mark/OpenFOAM

Then extract the file in order: tar-xvf OpenFOAM-1.6.General.gtgz

Tar-xvf ThirdParty-1.6.General.gtgz

Tar-xvf OpenFOAM-1.6.linux64GccDPOpt.gtgz

Tar-xvf ThirdParty-1.6.linux64Gcc.gtgz

After decompression, the README (E text) file will be generated under "~ / OpenFOAM/OpenFOAM-1.6/", which can be operated according to this.

5. Preparation environment

Open hidden file: (kate is a built-in text editor)

Kate / .bashrc

Add a line at the bottom:

. / home/OpenFgOAM/OpenFOAM-1.6/etc/bashrc

There is a point at the front and a space behind it. After setting it, close the text editor and run it once to update the environment

Source / .bashrc

Thank you for reading! This is the end of this article on "how to install OpenFOAM in Open SUSE". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Tags: File software version command folder content text more environment article system editor compile run select good practical successful never mind one line Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Linux Shulou Information Shulou Technology Microsoft