OpenFOAM: Difference between revisions

Jump to navigation Jump to search
Marked this version for translation
No edit summary
(Marked this version for translation)
Line 2: Line 2:
<translate>
<translate>


<!--T:1-->
[[Category:Software]]
[[Category:Software]]
The OpenFOAM (Open Field Operation and Manipulation) CFD Toolbox is a free, open source software package for computational fluid dynamics. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics.
The OpenFOAM (Open Field Operation and Manipulation) CFD Toolbox is a free, open source software package for computational fluid dynamics. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics.


===Modulefiles===
===Modulefiles=== <!--T:2-->
{{Command|module load openfoam}} will give you a recent version.
{{Command|module load openfoam}} will give you a recent version.


<!--T:3-->
The OpenFOAM development community is divided into two parts:
The OpenFOAM development community is divided into two parts:
* The OpenFOAM Foundation Ltd., with web sites [https://openfoam.org/ openfoam.org] and [https://cfd.direct/ cfd.direct]
* The OpenFOAM Foundation Ltd., with web sites [https://openfoam.org/ openfoam.org] and [https://cfd.direct/ cfd.direct]
Line 13: Line 15:
Up to version 2.3.1, released in December 2014, the release histories appear to be the same. Compute Canada module names after 2.3.1 which begin with "v" are derived from the .com branch; those beginning with a digit are derived from the .org branch (for example, <tt>openfoam/v1712</tt>).
Up to version 2.3.1, released in December 2014, the release histories appear to be the same. Compute Canada module names after 2.3.1 which begin with "v" are derived from the .com branch; those beginning with a digit are derived from the .org branch (for example, <tt>openfoam/v1712</tt>).


<!--T:4-->
See [[Utiliser_des_modules/en| Using modules]] for more on module commands.
See [[Utiliser_des_modules/en| Using modules]] for more on module commands.


===Documentation===
===Documentation=== <!--T:5-->
[https://www.openfoam.com/documentation/ OpenFOAM.com documentation] and [https://cfd.direct/openfoam/user-guide/ CFD Direct user guide].
[https://www.openfoam.com/documentation/ OpenFOAM.com documentation] and [https://cfd.direct/openfoam/user-guide/ CFD Direct user guide].


===Usage===
===Usage=== <!--T:6-->
OpenFOAM requires substantial preparation of your environment. In order to run OpenFOAM commands (such as <code>paraFoam</code>, <code>blockMesh</code>, etc), you must load a [[Using modules| modulefile]].
OpenFOAM requires substantial preparation of your environment. In order to run OpenFOAM commands (such as <code>paraFoam</code>, <code>blockMesh</code>, etc), you must load a [[Using modules| modulefile]].


<!--T:7-->
Here is an example of a serial submission script for OpenFOAM 5.0:
Here is an example of a serial submission script for OpenFOAM 5.0:
{{File
{{File
Line 30: Line 34:
#SBATCH --account=def-someuser
#SBATCH --account=def-someuser


<!--T:8-->
module purge
module purge
module load openfoam/5.0
module load openfoam/5.0


<!--T:9-->
blockMesh
blockMesh
icoFoam
icoFoam
}}
}}


<!--T:10-->
Here is an example of a parallel submission script:
Here is an example of a parallel submission script:
{{File
{{File
Line 48: Line 55:
#SBATCH --time=0-00:10          # time (DD-HH:MM)
#SBATCH --time=0-00:10          # time (DD-HH:MM)


<!--T:11-->
module purge
module purge
module load openfoam/5.0
module load openfoam/5.0


<!--T:12-->
decomposePar
decomposePar
blockMesh
blockMesh
Line 57: Line 66:
}}
}}


<!--T:13-->
Mesh preparation (<code>blockMesh</code>) may be fast enough to be done at the command line (see [[Running jobs]]).  The solver (<code>icoFoam</code> and others) is usually the most expensive step and should always be submitted as a Slurm job except in very small test cases or tutorials.
Mesh preparation (<code>blockMesh</code>) may be fast enough to be done at the command line (see [[Running jobs]]).  The solver (<code>icoFoam</code> and others) is usually the most expensive step and should always be submitted as a Slurm job except in very small test cases or tutorials.


===Performance===
===Performance=== <!--T:14-->
OpenFOAM can emit a lot of debugging information in very frequent small writes (e.g. hundreds per second). This may lead to poor performance on our network file systems. If you are in stable production and don't need the debug output, you can reduce or disable it with:
OpenFOAM can emit a lot of debugging information in very frequent small writes (e.g. hundreds per second). This may lead to poor performance on our network file systems. If you are in stable production and don't need the debug output, you can reduce or disable it with:
{{Commands
{{Commands
Line 66: Line 76:
}}
}}


<!--T:15-->
Then edit the <code>debugSwitches</code> dictionary in <code>$HOME/.OpenFOAM/$WM_PROJECT_VERSION/controlDict</code>, changing flags from values >0 to 0.  ''(Contribution from C. Lane)''
Then edit the <code>debugSwitches</code> dictionary in <code>$HOME/.OpenFOAM/$WM_PROJECT_VERSION/controlDict</code>, changing flags from values >0 to 0.  ''(Contribution from C. Lane)''


</translate>
</translate>
Bureaucrats, cc_docs_admin, cc_staff
2,879

edits

Navigation menu