<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.aperturelab.science/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Argonon</id>
	<title>Sapienza Rocket Team - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.aperturelab.science/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Argonon"/>
	<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php/Special:Contributions/Argonon"/>
	<updated>2026-04-11T18:19:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=179</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=179"/>
		<updated>2025-06-14T11:20:53Z</updated>

		<summary type="html">&lt;p&gt;Argonon: /* Constant Directory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 0 directory ===&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;# include&#039;&#039;&#039;&#039;&#039; command simply copy and past the given file&#039;s content. So in the &amp;quot;Include/initialConditions&amp;quot;, for example, we wrote all initial conditions for the case, like velocity, pressure ecc... and then import it into U file. The &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; key set the field value, the &#039;&#039;&#039;&#039;&#039;$&#039;&#039;&#039;&#039;&#039; symbol get the associated value.  &lt;br /&gt;
&lt;br /&gt;
=== Constant Directory ===&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/user-guide/5-models-and-physical-properties/5.2-thermophysical-models transportProperties]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-turbulence.html turbulenceProperties]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/user-guide/5-models-and-physical-properties/5.2-thermophysical-models transportProperties]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-turbulence.html turbulenceProperties]&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
=== System directory ===&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-applications-solvers-incompressible-simpleFoam.html simpleFoam]&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-forces-force-coeffs.html forceCoeffs]&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;br /&gt;
&lt;br /&gt;
=== Run your case : ===&lt;br /&gt;
We are finally ready to start the simulation. In the case directory, you will find two files named &#039;&#039;&#039;&#039;&#039;Allrun&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;Allclean&#039;&#039;&#039;&#039;&#039;. These are bash scripts that enable the user to clean up the case and initiate the simulation by typing:  &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/Allclean&lt;br /&gt;
/Allrun&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If these file are not executable, run the following command:  &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/chmod +x /All*&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
However, it&#039;s beneficial to learn how to perform these actions manually:  &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cp ./0.orig ./0&lt;br /&gt;
decomposePar&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;cp ./0.orig ./0&#039;&#039;&#039; simply copy the 0.orig directory in the same path and rename it in 0. That is necessary because OpenFOAM search 0 and not 0.orig.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;decomposePa&#039;&#039;&#039;r start the decomposition of the case, splitting the mesh and apply boundaries, in order to parallelize the process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above command run the case in parallel. &#039;&#039;N&#039;&#039; are your core numbers, &#039;&#039;methodName&#039;&#039; is the method selected in the &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039; file. In this example we are using &#039;&#039;&#039;&#039;&#039;simpleFoam&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
if mpi is not installed it is possible to get it with the following commands&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo update&lt;br /&gt;
sudo apt-get install openmpi&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you are finally running your first simulation in OpenFOAM!&lt;br /&gt;
&lt;br /&gt;
=== Post processing ===&lt;br /&gt;
When the simulation end, we are ready to give a look. On the console run this command: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
reconstrucPar -latestTime&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This recompose your last iteration from processor directories. &lt;br /&gt;
&lt;br /&gt;
Last command needed it &amp;lt;syntaxhighlight line=&amp;quot;1&amp;quot; lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
paraFoam&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will load mesh and result in [https://www.paraview.org/ paraview]. If it is not installed on your device, it is possible to obtain with &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo update&lt;br /&gt;
sudo apt install paraview&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=178</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=178"/>
		<updated>2025-06-14T11:16:23Z</updated>

		<summary type="html">&lt;p&gt;Argonon: /* Constant Directory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 0 directory ===&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;# include&#039;&#039;&#039;&#039;&#039; command simply copy and past the given file&#039;s content. So in the &amp;quot;Include/initialConditions&amp;quot;, for example, we wrote all initial conditions for the case, like velocity, pressure ecc... and then import it into U file. The &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; key set the field value, the &#039;&#039;&#039;&#039;&#039;$&#039;&#039;&#039;&#039;&#039; symbol get the associated value.  &lt;br /&gt;
&lt;br /&gt;
=== Constant Directory ===&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
=== System directory ===&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-applications-solvers-incompressible-simpleFoam.html simpleFoam]&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-forces-force-coeffs.html forceCoeffs]&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;br /&gt;
&lt;br /&gt;
=== Run your case : ===&lt;br /&gt;
We are finally ready to start the simulation. In the case directory, you will find two files named &#039;&#039;&#039;&#039;&#039;Allrun&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;Allclean&#039;&#039;&#039;&#039;&#039;. These are bash scripts that enable the user to clean up the case and initiate the simulation by typing:  &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/Allclean&lt;br /&gt;
/Allrun&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If these file are not executable, run the following command:  &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/chmod +x /All*&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
However, it&#039;s beneficial to learn how to perform these actions manually:  &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cp ./0.orig ./0&lt;br /&gt;
decomposePar&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;cp ./0.orig ./0&#039;&#039;&#039; simply copy the 0.orig directory in the same path and rename it in 0. That is necessary because OpenFOAM search 0 and not 0.orig.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;decomposePa&#039;&#039;&#039;r start the decomposition of the case, splitting the mesh and apply boundaries, in order to parallelize the process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above command run the case in parallel. &#039;&#039;N&#039;&#039; are your core numbers, &#039;&#039;methodName&#039;&#039; is the method selected in the &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039; file. In this example we are using &#039;&#039;&#039;&#039;&#039;simpleFoam&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
if mpi is not installed it is possible to get it with the following commands&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo update&lt;br /&gt;
sudo apt-get install openmpi&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you are finally running your first simulation in OpenFOAM!&lt;br /&gt;
&lt;br /&gt;
=== Post processing ===&lt;br /&gt;
When the simulation end, we are ready to give a look. On the console run this command: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
reconstrucPar -latestTime&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This recompose your last iteration from processor directories. &lt;br /&gt;
&lt;br /&gt;
Last command needed it &amp;lt;syntaxhighlight line=&amp;quot;1&amp;quot; lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
paraFoam&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will load mesh and result in [https://www.paraview.org/ paraview]. If it is not installed on your device, it is possible to obtain with &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo update&lt;br /&gt;
sudo apt install paraview&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Linux_Introduction&amp;diff=177</id>
		<title>Linux Introduction</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Linux_Introduction&amp;diff=177"/>
		<updated>2025-06-14T11:08:53Z</updated>

		<summary type="html">&lt;p&gt;Argonon: /* Installing Debian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:GUI vm2.png|thumb|301x301px|Gui of VM Box]]&lt;br /&gt;
&lt;br /&gt;
=== Installing VM-Box Oracle ===&lt;br /&gt;
[[File:Creazione vm1.png|thumb]]&lt;br /&gt;
In this section will guide you through the installation of Debian 12 using Oracle VM VirtualBox. First, download the Debian 12 ISO image by visiting the official website of [https://www.debian.org/distrib/ Debian] and selecting the appropriate file. Next, install [https://www.oracle.com/it/virtualization/technologies/vm/downloads/virtualbox-downloads.html Oracle VM VirtualBox] from the following link (insert link) and follow the installation instructions provided. Once the installation is complete, launch the software. You should see an interface similar to the one shown in the image beside this text.&lt;br /&gt;
&lt;br /&gt;
=== Upload ISO file ===&lt;br /&gt;
Your next step is to upload the ISO file downloaded in the previous section. Press the &#039;&#039;&#039;&#039;&#039;New&#039;&#039;&#039;&#039;&#039; button and a pop up as showed on the left will appear. Select a name and on &#039;&#039;&#039;&#039;&#039;ISO image&#039;&#039;&#039;&#039;&#039; select the downloaded file. For the next steps: &lt;br /&gt;
&lt;br /&gt;
# Update &#039;&#039;&#039;&#039;&#039;User&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;Password&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
# Allocate &#039;&#039;&#039;&#039;&#039;ram&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;core number&#039;&#039;&#039;&#039;&#039; based on your pc &lt;br /&gt;
# [[File:GUI vm1.png|thumb]]Allocate &#039;&#039;&#039;&#039;&#039;at least 60-80 GB&#039;&#039;&#039;&#039;&#039; of solid memory&lt;br /&gt;
&lt;br /&gt;
After that you should see your new machine in the main window. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Installing Debian ===&lt;br /&gt;
Now it&#039;s time to launch your virtual machine. During the initial startup, the VM will begin the Debian installation process and prompt you to enter some information , in particular save the &#039;&#039;&#039;&#039;&#039;Root password and your User name and password&#039;&#039;&#039;&#039;&#039;. The most important step is to &#039;&#039;&#039;&#039;&#039;install Debian as the primary operating system&#039;&#039;&#039;&#039;&#039; within the VM, not as a dual-boot partition. Don’t worry,this won&#039;t affect your Windows installation, as everything is contained within the virtual environment. At a certain point, Debian will ask you to choose a desktop environment. We recommend selecting the &#039;&#039;&#039;&#039;&#039;KDE desktop&#039;&#039;&#039;&#039;&#039; due to its visual and functional similarity to Windows.&lt;br /&gt;
&lt;br /&gt;
=== Installing Debian as dual-boot ===&lt;br /&gt;
If you prefer not to use a virtual machine, you can install Debian as a dual-boot system on your PC, or you can remove Windows entirely to unlock the full potential of Debian.&lt;br /&gt;
&lt;br /&gt;
The process is relatively straightforward. First, you’ll need a USB drive, which must be formatted with the Debian ISO image. A tool like [https://etcher.balena.io/ balenaEtcher]can be used for this purpose. Once the USB is ready, you’ll need to create a new partition on your hard drive. Keep in mind that &#039;&#039;&#039;&#039;&#039;Debian typically requires 20–25 GB&#039;&#039;&#039;&#039;&#039; after installation. We recommend allocating &#039;&#039;&#039;&#039;&#039;100–150 GB&#039;&#039;&#039;&#039;&#039; of storage space (&#039;&#039;&#039;HDD&#039;&#039;&#039; or &#039;&#039;&#039;SSD&#039;&#039;&#039;) for optimal performance.&lt;br /&gt;
&lt;br /&gt;
Next, insert the prepared USB drive, reboot your PC, and boot from the USB. To do this, press &#039;&#039;&#039;F12&#039;&#039;&#039;, &#039;&#039;&#039;F2&#039;&#039;&#039;, or the appropriate key for your system during startup to access the BIOS/boot menu and select the USB device.&lt;br /&gt;
&lt;br /&gt;
Debian will then begin the installation process. This time, make sure to choose &#039;&#039;&#039;&#039;&#039;dual-boot installation&#039;&#039;&#039;&#039;&#039;, not &amp;quot;use entire disk&amp;quot; or &amp;quot;replace existing OS,&amp;quot; as that would remove Windows. Select the new partition you created earlier for Debian. From this point onward, the installation steps are the same as described in the virtual machine section.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=176</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=176"/>
		<updated>2025-06-14T11:07:04Z</updated>

		<summary type="html">&lt;p&gt;Argonon: /* Run your case : */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 0 directory ===&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
The # include command simply copy and past the given file&#039;s content. So in the &amp;quot;Include/initialConditions&amp;quot;, for example, we wrote all initial conditions for the case, like velocity, pressure ecc... and then import it into U file. In particular we have &amp;quot;flowVelocity: xxxx&amp;quot; and the $flowVelocity command get the value xxxx.  &lt;br /&gt;
&lt;br /&gt;
=== Constant Directory ===&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
=== System directory ===&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-applications-solvers-incompressible-simpleFoam.html simpleFoam]&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-forces-force-coeffs.html forceCoeffs]&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;br /&gt;
&lt;br /&gt;
=== Run your case : ===&lt;br /&gt;
We are finally ready to start the simulation. In the case directory, you will find two files named &#039;&#039;&#039;&#039;&#039;Allrun&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;Allclean&#039;&#039;&#039;&#039;&#039;. These are bash scripts that enable the user to clean up the case and initiate the simulation by typing:  &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/Allclean&lt;br /&gt;
/Allrun&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If these file are not executable, run the following command:  &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/chmod +x /All*&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
However, it&#039;s beneficial to learn how to perform these actions manually:  &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cp ./0.orig ./0&lt;br /&gt;
decomposePar&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;cp ./0.orig ./0&#039;&#039;&#039; simply copy the 0.orig directory in the same path and rename it in 0. That is necessary because OpenFOAM search 0 and not 0.orig.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;decomposePa&#039;&#039;&#039;r start the decomposition of the case, splitting the mesh and apply boundaries, in order to parallelize the process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above command run the case in parallel. &#039;&#039;N&#039;&#039; are your core numbers, &#039;&#039;methodName&#039;&#039; is the method selected in the &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039; file. In this example we are using &#039;&#039;&#039;&#039;&#039;simpleFoam&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
if mpi is not installed it is possible to get it with the following commands&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo update&lt;br /&gt;
sudo apt-get install openmpi&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you are finally running your first simulation in OpenFOAM!&lt;br /&gt;
&lt;br /&gt;
=== Post processing ===&lt;br /&gt;
When the simulation end, we are ready to give a look. On the console run this command: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
reconstrucPar -latestTime&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This recompose your last iteration from processor directories. &lt;br /&gt;
&lt;br /&gt;
Last command needed it &amp;lt;syntaxhighlight line=&amp;quot;1&amp;quot; lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
paraFoam&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will load mesh and result in [https://www.paraview.org/ paraview]. If it is not installed on your device, it is possible to obtain with &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo update&lt;br /&gt;
sudo apt install paraview&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=175</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=175"/>
		<updated>2025-06-14T11:04:43Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 0 directory ===&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
The # include command simply copy and past the given file&#039;s content. So in the &amp;quot;Include/initialConditions&amp;quot;, for example, we wrote all initial conditions for the case, like velocity, pressure ecc... and then import it into U file. In particular we have &amp;quot;flowVelocity: xxxx&amp;quot; and the $flowVelocity command get the value xxxx.  &lt;br /&gt;
&lt;br /&gt;
=== Constant Directory ===&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
=== System directory ===&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-applications-solvers-incompressible-simpleFoam.html simpleFoam]&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-forces-force-coeffs.html forceCoeffs]&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;br /&gt;
&lt;br /&gt;
=== Run your case : ===&lt;br /&gt;
We are finally ready to start the simulation. In the case directory, you will find two files named &#039;&#039;&#039;&#039;&#039;Allrun&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;Allclean&#039;&#039;&#039;&#039;&#039;. These are bash scripts that enable the user to clean up the case and initiate the simulation. However, it&#039;s beneficial to learn how to perform these actions manually. &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cp ./0.orig ./0&lt;br /&gt;
decomposePar&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;cp ./0.orig ./0&#039;&#039;&#039; simply copy the 0.orig directory in the same path and rename it in 0. That is necessary because OpenFOAM search 0 and not 0.orig.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;decomposePa&#039;&#039;&#039;r start the decomposition of the case, splitting the mesh and apply boundaries, in order to parallelize the process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above command run the case in parallel. &#039;&#039;N&#039;&#039; are your core numbers, &#039;&#039;methodName&#039;&#039; is the method selected in the &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039; file. In this example we are using &#039;&#039;&#039;&#039;&#039;simpleFoam&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
if mpi is not installed it is possible to get it with the following commands&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo update&lt;br /&gt;
sudo apt-get install openmpi&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you are finally running your first simulation in OpenFOAM!&lt;br /&gt;
&lt;br /&gt;
=== Post processing ===&lt;br /&gt;
When the simulation end, we are ready to give a look. On the console run this command: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
reconstrucPar -latestTime&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This recompose your last iteration from processor directories. &lt;br /&gt;
&lt;br /&gt;
Last command needed it &amp;lt;syntaxhighlight line=&amp;quot;1&amp;quot; lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
paraFoam&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will load mesh and result in [https://www.paraview.org/ paraview]. If it is not installed on your device, it is possible to obtain with &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo update&lt;br /&gt;
sudo apt install paraview&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=174</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=174"/>
		<updated>2025-06-14T11:04:21Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 0 directory ===&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
The # include command simply copy and past the given file&#039;s content. So in the &amp;quot;Include/InitialConditions&amp;quot;, for example, we wrote all initial conditions for the case, like velocity, pressure ecc... and then import it into U file. In particular we have &amp;quot;FlowVelocity: xxxx&amp;quot; and the $FlowVelocity command get the value xxxx.  &lt;br /&gt;
&lt;br /&gt;
=== Constant Directory ===&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
=== System directory ===&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-applications-solvers-incompressible-simpleFoam.html simpleFoam]&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-forces-force-coeffs.html forceCoeffs]&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;br /&gt;
&lt;br /&gt;
=== Run your case : ===&lt;br /&gt;
We are finally ready to start the simulation. In the case directory, you will find two files named &#039;&#039;&#039;&#039;&#039;Allrun&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;Allclean&#039;&#039;&#039;&#039;&#039;. These are bash scripts that enable the user to clean up the case and initiate the simulation. However, it&#039;s beneficial to learn how to perform these actions manually. &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cp ./0.orig ./0&lt;br /&gt;
decomposePar&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;cp ./0.orig ./0&#039;&#039;&#039; simply copy the 0.orig directory in the same path and rename it in 0. That is necessary because OpenFOAM search 0 and not 0.orig.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;decomposePa&#039;&#039;&#039;r start the decomposition of the case, splitting the mesh and apply boundaries, in order to parallelize the process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above command run the case in parallel. &#039;&#039;N&#039;&#039; are your core numbers, &#039;&#039;methodName&#039;&#039; is the method selected in the &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039; file. In this example we are using &#039;&#039;&#039;&#039;&#039;simpleFoam&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
if mpi is not installed it is possible to get it with the following commands&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo update&lt;br /&gt;
sudo apt-get install openmpi&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you are finally running your first simulation in OpenFOAM!&lt;br /&gt;
&lt;br /&gt;
=== Post processing ===&lt;br /&gt;
When the simulation end, we are ready to give a look. On the console run this command: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
reconstrucPar -latestTime&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This recompose your last iteration from processor directories. &lt;br /&gt;
&lt;br /&gt;
Last command needed it &amp;lt;syntaxhighlight line=&amp;quot;1&amp;quot; lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
paraFoam&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will load mesh and result in [https://www.paraview.org/ paraview]. If it is not installed on your device, it is possible to obtain with &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo update&lt;br /&gt;
sudo apt install paraview&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=173</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=173"/>
		<updated>2025-06-14T11:02:57Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 0 directory ===&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
The # include command simply copy and past the given file&#039;s content. So in the &amp;quot;Include/InitialConditions2, for example, we wrote all initial conditions for the case, like velocity, pressure ecc... . This &lt;br /&gt;
&lt;br /&gt;
=== Constant Directory ===&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
=== System directory ===&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-applications-solvers-incompressible-simpleFoam.html simpleFoam]&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-forces-force-coeffs.html forceCoeffs]&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;br /&gt;
&lt;br /&gt;
=== Run your case : ===&lt;br /&gt;
We are finally ready to start the simulation. In the case directory, you will find two files named &#039;&#039;&#039;&#039;&#039;Allrun&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;Allclean&#039;&#039;&#039;&#039;&#039;. These are bash scripts that enable the user to clean up the case and initiate the simulation. However, it&#039;s beneficial to learn how to perform these actions manually. &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cp ./0.orig ./0&lt;br /&gt;
decomposePar&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;cp ./0.orig ./0&#039;&#039;&#039; simply copy the 0.orig directory in the same path and rename it in 0. That is necessary because OpenFOAM search 0 and not 0.orig.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;decomposePa&#039;&#039;&#039;r start the decomposition of the case, splitting the mesh and apply boundaries, in order to parallelize the process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above command run the case in parallel. &#039;&#039;N&#039;&#039; are your core numbers, &#039;&#039;methodName&#039;&#039; is the method selected in the &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039; file. In this example we are using &#039;&#039;&#039;&#039;&#039;simpleFoam&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
if mpi is not installed it is possible to get it with the following commands&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo update&lt;br /&gt;
sudo apt-get install openmpi&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you are finally running your first simulation in OpenFOAM!&lt;br /&gt;
&lt;br /&gt;
=== Post processing ===&lt;br /&gt;
When the simulation end, we are ready to give a look. On the console run this command: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
reconstrucPar -latestTime&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This recompose your last iteration from processor directories. &lt;br /&gt;
&lt;br /&gt;
Last command needed it &amp;lt;syntaxhighlight line=&amp;quot;1&amp;quot; lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
paraFoam&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will load mesh and result in [https://www.paraview.org/ paraview]. If it is not installed on your device, it is possible to obtain with &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo update&lt;br /&gt;
sudo apt install paraview&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Linux_Introduction&amp;diff=172</id>
		<title>Linux Introduction</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Linux_Introduction&amp;diff=172"/>
		<updated>2025-06-13T16:51:34Z</updated>

		<summary type="html">&lt;p&gt;Argonon: /* Installing VM-Box Oracle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:GUI vm2.png|thumb|301x301px|Gui of VM Box]]&lt;br /&gt;
&lt;br /&gt;
=== Installing VM-Box Oracle ===&lt;br /&gt;
[[File:Creazione vm1.png|thumb]]&lt;br /&gt;
In this section will guide you through the installation of Debian 12 using Oracle VM VirtualBox. First, download the Debian 12 ISO image by visiting the official website of [https://www.debian.org/distrib/ Debian] and selecting the appropriate file. Next, install [https://www.oracle.com/it/virtualization/technologies/vm/downloads/virtualbox-downloads.html Oracle VM VirtualBox] from the following link (insert link) and follow the installation instructions provided. Once the installation is complete, launch the software. You should see an interface similar to the one shown in the image beside this text.&lt;br /&gt;
&lt;br /&gt;
=== Upload ISO file ===&lt;br /&gt;
Your next step is to upload the ISO file downloaded in the previous section. Press the &#039;&#039;&#039;&#039;&#039;New&#039;&#039;&#039;&#039;&#039; button and a pop up as showed on the left will appear. Select a name and on &#039;&#039;&#039;&#039;&#039;ISO image&#039;&#039;&#039;&#039;&#039; select the downloaded file. For the next steps: &lt;br /&gt;
&lt;br /&gt;
# Update &#039;&#039;&#039;&#039;&#039;User&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;Password&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
# Allocate &#039;&#039;&#039;&#039;&#039;ram&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;core number&#039;&#039;&#039;&#039;&#039; based on your pc &lt;br /&gt;
# [[File:GUI vm1.png|thumb]]Allocate &#039;&#039;&#039;&#039;&#039;at least 60-80 GB&#039;&#039;&#039;&#039;&#039; of solid memory&lt;br /&gt;
&lt;br /&gt;
After that you should see your new machine in the main window. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Installing Debian ===&lt;br /&gt;
Now it&#039;s time to launch your virtual machine. During the initial startup, the VM will begin the Debian installation process and prompt you to enter some information. The most important step is to &#039;&#039;&#039;&#039;&#039;install Debian as the primary operating system&#039;&#039;&#039;&#039;&#039; within the VM, not as a dual-boot partition. Don’t worry,this won&#039;t affect your Windows installation, as everything is contained within the virtual environment. At a certain point, Debian will ask you to choose a desktop environment. We recommend selecting the &#039;&#039;&#039;&#039;&#039;KDE desktop&#039;&#039;&#039;&#039;&#039; due to its visual and functional similarity to Windows.&lt;br /&gt;
&lt;br /&gt;
=== Installing Debian as dual-boot ===&lt;br /&gt;
If you prefer not to use a virtual machine, you can install Debian as a dual-boot system on your PC, or you can remove Windows entirely to unlock the full potential of Debian.&lt;br /&gt;
&lt;br /&gt;
The process is relatively straightforward. First, you’ll need a USB drive, which must be formatted with the Debian ISO image. A tool like [https://etcher.balena.io/ balenaEtcher]can be used for this purpose. Once the USB is ready, you’ll need to create a new partition on your hard drive. Keep in mind that &#039;&#039;&#039;&#039;&#039;Debian typically requires 20–25 GB&#039;&#039;&#039;&#039;&#039; after installation. We recommend allocating &#039;&#039;&#039;&#039;&#039;100–150 GB&#039;&#039;&#039;&#039;&#039; of storage space (&#039;&#039;&#039;HDD&#039;&#039;&#039; or &#039;&#039;&#039;SSD&#039;&#039;&#039;) for optimal performance.&lt;br /&gt;
&lt;br /&gt;
Next, insert the prepared USB drive, reboot your PC, and boot from the USB. To do this, press &#039;&#039;&#039;F12&#039;&#039;&#039;, &#039;&#039;&#039;F2&#039;&#039;&#039;, or the appropriate key for your system during startup to access the BIOS/boot menu and select the USB device.&lt;br /&gt;
&lt;br /&gt;
Debian will then begin the installation process. This time, make sure to choose &#039;&#039;&#039;&#039;&#039;dual-boot installation&#039;&#039;&#039;&#039;&#039;, not &amp;quot;use entire disk&amp;quot; or &amp;quot;replace existing OS,&amp;quot; as that would remove Windows. Select the new partition you created earlier for Debian. From this point onward, the installation steps are the same as described in the virtual machine section.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Linux_Introduction&amp;diff=171</id>
		<title>Linux Introduction</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Linux_Introduction&amp;diff=171"/>
		<updated>2025-06-13T16:51:04Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:GUI vm2.png|thumb|301x301px|Gui of VM Box]]&lt;br /&gt;
&lt;br /&gt;
== Installing VM-Box Oracle ==&lt;br /&gt;
[[File:Creazione vm1.png|thumb]]&lt;br /&gt;
In this section will guide you through the installation of Debian 12 using Oracle VM VirtualBox. First, download the Debian 12 ISO image by visiting the official website of [https://www.debian.org/distrib/ Debian] and selecting the appropriate file. Next, install [https://www.oracle.com/it/virtualization/technologies/vm/downloads/virtualbox-downloads.html Oracle VM VirtualBox] from the following link (insert link) and follow the installation instructions provided. Once the installation is complete, launch the software. You should see an interface similar to the one shown in the image beside this text.&lt;br /&gt;
&lt;br /&gt;
=== Upload ISO file ===&lt;br /&gt;
Your next step is to upload the ISO file downloaded in the previous section. Press the &#039;&#039;&#039;&#039;&#039;New&#039;&#039;&#039;&#039;&#039; button and a pop up as showed on the left will appear. Select a name and on &#039;&#039;&#039;&#039;&#039;ISO image&#039;&#039;&#039;&#039;&#039; select the downloaded file. For the next steps: &lt;br /&gt;
&lt;br /&gt;
# Update &#039;&#039;&#039;&#039;&#039;User&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;Password&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
# Allocate &#039;&#039;&#039;&#039;&#039;ram&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;core number&#039;&#039;&#039;&#039;&#039; based on your pc &lt;br /&gt;
# [[File:GUI vm1.png|thumb]]Allocate &#039;&#039;&#039;&#039;&#039;at least 60-80 GB&#039;&#039;&#039;&#039;&#039; of solid memory&lt;br /&gt;
&lt;br /&gt;
After that you should see your new machine in the main window. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Installing Debian ===&lt;br /&gt;
Now it&#039;s time to launch your virtual machine. During the initial startup, the VM will begin the Debian installation process and prompt you to enter some information. The most important step is to &#039;&#039;&#039;&#039;&#039;install Debian as the primary operating system&#039;&#039;&#039;&#039;&#039; within the VM, not as a dual-boot partition. Don’t worry,this won&#039;t affect your Windows installation, as everything is contained within the virtual environment. At a certain point, Debian will ask you to choose a desktop environment. We recommend selecting the &#039;&#039;&#039;&#039;&#039;KDE desktop&#039;&#039;&#039;&#039;&#039; due to its visual and functional similarity to Windows.&lt;br /&gt;
&lt;br /&gt;
=== Installing Debian as dual-boot ===&lt;br /&gt;
If you prefer not to use a virtual machine, you can install Debian as a dual-boot system on your PC, or you can remove Windows entirely to unlock the full potential of Debian.&lt;br /&gt;
&lt;br /&gt;
The process is relatively straightforward. First, you’ll need a USB drive, which must be formatted with the Debian ISO image. A tool like [https://etcher.balena.io/ balenaEtcher]can be used for this purpose. Once the USB is ready, you’ll need to create a new partition on your hard drive. Keep in mind that &#039;&#039;&#039;&#039;&#039;Debian typically requires 20–25 GB&#039;&#039;&#039;&#039;&#039; after installation. We recommend allocating &#039;&#039;&#039;&#039;&#039;100–150 GB&#039;&#039;&#039;&#039;&#039; of storage space (&#039;&#039;&#039;HDD&#039;&#039;&#039; or &#039;&#039;&#039;SSD&#039;&#039;&#039;) for optimal performance.&lt;br /&gt;
&lt;br /&gt;
Next, insert the prepared USB drive, reboot your PC, and boot from the USB. To do this, press &#039;&#039;&#039;F12&#039;&#039;&#039;, &#039;&#039;&#039;F2&#039;&#039;&#039;, or the appropriate key for your system during startup to access the BIOS/boot menu and select the USB device.&lt;br /&gt;
&lt;br /&gt;
Debian will then begin the installation process. This time, make sure to choose &#039;&#039;&#039;&#039;&#039;dual-boot installation&#039;&#039;&#039;&#039;&#039;, not &amp;quot;use entire disk&amp;quot; or &amp;quot;replace existing OS,&amp;quot; as that would remove Windows. Select the new partition you created earlier for Debian. From this point onward, the installation steps are the same as described in the virtual machine section.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Aerodynamics&amp;diff=170</id>
		<title>Aerodynamics</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Aerodynamics&amp;diff=170"/>
		<updated>2025-06-13T16:50:19Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Department: ==&lt;br /&gt;
[[File:Arodinamic Logo.jpg|thumb|180x180px|Aerodynamic department logo]]&lt;br /&gt;
The Aerodynamics department of SRT &#039;&#039;[https://www.sasa-aerospace.it/rocket-team/ (Sapienza Rocket Team)]&#039;&#039; aim to study and analyze the air flow around the rocket-model. The goal of these studies is to predict the position of [https://www.grc.nasa.gov/www/k-12/VirtualAero/BottleRocket/airplane/cp.html Center of Pressure] &#039;&#039;(CoP),&#039;&#039; as well as all aerodynamics force coefficients, body force coefficients and  and the overall pressure distribution around the rocket.  &lt;br /&gt;
&lt;br /&gt;
The Center of Pressure  is the point where the aerodynamic forces acting on a body are concentrated. Understanding where this point is located and how it shifts along the rocket allows for the evaluation of moments, which is essential for assessing static stability. &lt;br /&gt;
&lt;br /&gt;
Aerodynamic coefficients, such as the [https://www.grc.nasa.gov/www/k-12/VirtualAero/BottleRocket/airplane/dragco.html Drag Coefficient] &#039;&#039;(CD)&#039;&#039; and [https://www.grc.nasa.gov/www/k-12/VirtualAero/BottleRocket/airplane/liftco.html Lift Coefficient] &#039;&#039;(CL)&#039;&#039;, are important for estimating a rocket&#039;s behavior. For example, evaluating the drag coefficient (CD) is crucial for predicting the apogee reached by the rocket, especially when the body does not have an Angle of Attack &#039;&#039;(AoA&#039;&#039;).  &lt;br /&gt;
&lt;br /&gt;
In summary, all of these studies are essential for predicting the behavior of the rocket model during its flight. They also help evaluate the appropriate materials and structure to use. Both of these studies are conducted by the [[Mission Analysis]] and [[Structures]] departments.  &lt;br /&gt;
&lt;br /&gt;
== Preliminary Studies: ==  &lt;br /&gt;
&lt;br /&gt;
== CFD Simulation with OpenFOAM: ==&lt;br /&gt;
 &lt;br /&gt;
This section provides a practical approach to CFD. The following pages will guide you through setting up a simulation step-by-step for different cases, all conducted in  [https://www.openfoam.com/ OpenFOAM], an open-source software written in C++. &lt;br /&gt;
&lt;br /&gt;
Before getting started, you can install OpenFOAM [https://develop.openfoam.com/Development/openfoam/-/wikis/precompiled/debian here], which is designed for Linux environment, such as Ubuntu or Debian. If you are working on Windows, OpenFOAM is also available through the [https://develop.openfoam.com/Development/openfoam/-/wikis/precompiled/windows WSL Virtual Machine](Windows Subsystem for Linux).&lt;br /&gt;
&lt;br /&gt;
==== OpenFOAM ====&lt;br /&gt;
&lt;br /&gt;
* [[Linux Introduction|Linux Installing]]&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* Run in Batch&lt;br /&gt;
&lt;br /&gt;
==== Meshing ====&lt;br /&gt;
&lt;br /&gt;
* [[ANSA]]&lt;br /&gt;
* cfMesh&lt;br /&gt;
* Salome&lt;br /&gt;
&lt;br /&gt;
==== Steady-State Simulations : ====&lt;br /&gt;
* Compressible:&lt;br /&gt;
** [[Subsonic]]&lt;br /&gt;
** [[Sonic]]&lt;br /&gt;
** [[Supersonic]]&lt;br /&gt;
* Uncompressible:&lt;br /&gt;
** [[Subsonic]]&lt;br /&gt;
&lt;br /&gt;
==== Transient Simulations : ====&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Aerodynamics&amp;diff=169</id>
		<title>Aerodynamics</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Aerodynamics&amp;diff=169"/>
		<updated>2025-06-13T16:49:22Z</updated>

		<summary type="html">&lt;p&gt;Argonon: /* OpenFOAM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Department: ==&lt;br /&gt;
[[File:Arodinamic Logo.jpg|thumb|180x180px|Aerodynamic department logo]]&lt;br /&gt;
The Aerodynamics department of SRT &#039;&#039;[https://www.sasa-aerospace.it/rocket-team/ (Sapienza Rocket Team)]&#039;&#039; aim to study and analyze the air flow around the rocket-model. The goal of these studies is to predict the position of [https://www.grc.nasa.gov/www/k-12/VirtualAero/BottleRocket/airplane/cp.html Center of Pressure] &#039;&#039;(CoP),&#039;&#039; as well as all aerodynamics force coefficients, body force coefficients and  and the overall pressure distribution around the rocket.  &lt;br /&gt;
&lt;br /&gt;
The Center of Pressure  is the point where the aerodynamic forces acting on a body are concentrated. Understanding where this point is located and how it shifts along the rocket allows for the evaluation of moments, which is essential for assessing static stability. &lt;br /&gt;
&lt;br /&gt;
Aerodynamic coefficients, such as the [https://www.grc.nasa.gov/www/k-12/VirtualAero/BottleRocket/airplane/dragco.html Drag Coefficient] &#039;&#039;(CD)&#039;&#039; and [https://www.grc.nasa.gov/www/k-12/VirtualAero/BottleRocket/airplane/liftco.html Lift Coefficient] &#039;&#039;(CL)&#039;&#039;, are important for estimating a rocket&#039;s behavior. For example, evaluating the drag coefficient (CD) is crucial for predicting the apogee reached by the rocket, especially when the body does not have an Angle of Attack &#039;&#039;(AoA&#039;&#039;).  &lt;br /&gt;
&lt;br /&gt;
In summary, all of these studies are essential for predicting the behavior of the rocket model during its flight. They also help evaluate the appropriate materials and structure to use. Both of these studies are conducted by the [[Mission Analysis]] and [[Structures]] departments.  &lt;br /&gt;
&lt;br /&gt;
== Preliminary Studies: ==  &lt;br /&gt;
&lt;br /&gt;
== CFD Simulation with OpenFOAM: ==&lt;br /&gt;
 &lt;br /&gt;
This section provides a practical approach to CFD. The following pages will guide you through setting up a simulation step-by-step for different cases, all conducted in  [https://www.openfoam.com/ OpenFOAM], an open-source software written in C++. &lt;br /&gt;
&lt;br /&gt;
Before getting started, you can install OpenFOAM [https://develop.openfoam.com/Development/openfoam/-/wikis/precompiled/debian here], which is designed for Linux environment, such as Ubuntu or Debian. If you are working on Windows, OpenFOAM is also available through the [https://develop.openfoam.com/Development/openfoam/-/wikis/precompiled/windows WSL Virtual Machine](Windows Subsystem for Linux).&lt;br /&gt;
&lt;br /&gt;
==== OpenFOAM ====&lt;br /&gt;
&lt;br /&gt;
* [[Linux Introduction]]&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* Run in Batch&lt;br /&gt;
&lt;br /&gt;
==== Meshing ====&lt;br /&gt;
&lt;br /&gt;
* [[ANSA]]&lt;br /&gt;
* cfMesh&lt;br /&gt;
* Salome&lt;br /&gt;
&lt;br /&gt;
==== Steady-State Simulations : ====&lt;br /&gt;
* Compressible:&lt;br /&gt;
** [[Subsonic]]&lt;br /&gt;
** [[Sonic]]&lt;br /&gt;
** [[Supersonic]]&lt;br /&gt;
* Uncompressible:&lt;br /&gt;
** [[Subsonic]]&lt;br /&gt;
&lt;br /&gt;
==== Transient Simulations : ====&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Linux_Introduction&amp;diff=168</id>
		<title>Linux Introduction</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Linux_Introduction&amp;diff=168"/>
		<updated>2025-06-13T16:47:12Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:GUI vm2.png|thumb|301x301px|Gui of VM Box]]&lt;br /&gt;
&lt;br /&gt;
=== Installing VM-Box Oracle ===&lt;br /&gt;
[[File:Creazione vm1.png|thumb]]&lt;br /&gt;
In this section will guide you through the installation of Debian 12 using Oracle VM VirtualBox. First, download the Debian 12 ISO image by visiting the official website of [https://www.debian.org/distrib/ Debian] and selecting the appropriate file. Next, install [https://www.oracle.com/it/virtualization/technologies/vm/downloads/virtualbox-downloads.html Oracle VM VirtualBox] from the following link (insert link) and follow the installation instructions provided. Once the installation is complete, launch the software. You should see an interface similar to the one shown in the image beside this text.&lt;br /&gt;
&lt;br /&gt;
=== Upload ISO file ===&lt;br /&gt;
Your next step is to upload the ISO file downloaded in the previous section. Press the &#039;&#039;&#039;&#039;&#039;New&#039;&#039;&#039;&#039;&#039; button and a pop up as showed on the left will appear. Select a name and on &#039;&#039;&#039;&#039;&#039;ISO image&#039;&#039;&#039;&#039;&#039; select the downloaded file. For the next steps: &lt;br /&gt;
&lt;br /&gt;
# Update &#039;&#039;&#039;&#039;&#039;User&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;Password&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
# Allocate &#039;&#039;&#039;&#039;&#039;ram&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;core number&#039;&#039;&#039;&#039;&#039; based on your pc &lt;br /&gt;
# [[File:GUI vm1.png|thumb]]Allocate &#039;&#039;&#039;&#039;&#039;at least 60-80 GB&#039;&#039;&#039;&#039;&#039; of solid memory&lt;br /&gt;
&lt;br /&gt;
After that you should see your new machine in the main window. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Installing Debian ===&lt;br /&gt;
Now it&#039;s time to launch your virtual machine. During the initial startup, the VM will begin the Debian installation process and prompt you to enter some information. The most important step is to &#039;&#039;&#039;&#039;&#039;install Debian as the primary operating system&#039;&#039;&#039;&#039;&#039; within the VM, not as a dual-boot partition. Don’t worry,this won&#039;t affect your Windows installation, as everything is contained within the virtual environment. At a certain point, Debian will ask you to choose a desktop environment. We recommend selecting the &#039;&#039;&#039;&#039;&#039;KDE desktop&#039;&#039;&#039;&#039;&#039; due to its visual and functional similarity to Windows.&lt;br /&gt;
&lt;br /&gt;
=== Installing Debian as dual-boot ===&lt;br /&gt;
If you prefer not to use a virtual machine, you can install Debian as a dual-boot system on your PC, or you can remove Windows entirely to unlock the full potential of Debian.&lt;br /&gt;
&lt;br /&gt;
The process is relatively straightforward. First, you’ll need a USB drive, which must be formatted with the Debian ISO image. A tool like [https://etcher.balena.io/ balenaEtcher]can be used for this purpose. Once the USB is ready, you’ll need to create a new partition on your hard drive. Keep in mind that &#039;&#039;&#039;&#039;&#039;Debian typically requires 20–25 GB&#039;&#039;&#039;&#039;&#039; after installation. We recommend allocating &#039;&#039;&#039;&#039;&#039;100–150 GB&#039;&#039;&#039;&#039;&#039; of storage space (&#039;&#039;&#039;HDD&#039;&#039;&#039; or &#039;&#039;&#039;SSD&#039;&#039;&#039;) for optimal performance.&lt;br /&gt;
&lt;br /&gt;
Next, insert the prepared USB drive, reboot your PC, and boot from the USB. To do this, press &#039;&#039;&#039;F12&#039;&#039;&#039;, &#039;&#039;&#039;F2&#039;&#039;&#039;, or the appropriate key for your system during startup to access the BIOS/boot menu and select the USB device.&lt;br /&gt;
&lt;br /&gt;
Debian will then begin the installation process. This time, make sure to choose &#039;&#039;&#039;&#039;&#039;dual-boot installation&#039;&#039;&#039;&#039;&#039;, not &amp;quot;use entire disk&amp;quot; or &amp;quot;replace existing OS,&amp;quot; as that would remove Windows. Select the new partition you created earlier for Debian. From this point onward, the installation steps are the same as described in the virtual machine section.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Linux_Introduction&amp;diff=167</id>
		<title>Linux Introduction</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Linux_Introduction&amp;diff=167"/>
		<updated>2025-06-13T16:25:19Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:GUI vm2.png|thumb|301x301px|Gui of VM Box]]&lt;br /&gt;
&lt;br /&gt;
=== Installing VM-Box Oracle ===&lt;br /&gt;
[[File:Creazione vm1.png|thumb]]&lt;br /&gt;
In this section will guide you through the installation of Debian 12 using Oracle VM VirtualBox. First, download the Debian 12 ISO image by visiting the official website of [https://www.debian.org/distrib/ Debian] and selecting the appropriate file. Next, install [https://www.oracle.com/it/virtualization/technologies/vm/downloads/virtualbox-downloads.html Oracle VM VirtualBox] from the following link (insert link) and follow the installation instructions provided. Once the installation is complete, launch the software. You should see an interface similar to the one shown in the image beside this text.&lt;br /&gt;
&lt;br /&gt;
=== Upload ISO file ===&lt;br /&gt;
Your next step is to upload the ISO file downloaded in the previous section. Press the &#039;&#039;&#039;&#039;&#039;New&#039;&#039;&#039;&#039;&#039; button and a pop up as showed on the left will appear. Select a name and on &#039;&#039;&#039;&#039;&#039;ISO image&#039;&#039;&#039;&#039;&#039; select the downloaded file. For the next steps: &lt;br /&gt;
&lt;br /&gt;
# Update &#039;&#039;&#039;&#039;&#039;User&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;Password&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
# Allocate &#039;&#039;&#039;&#039;&#039;ram&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;core number&#039;&#039;&#039;&#039;&#039; based on your pc &lt;br /&gt;
# [[File:GUI vm1.png|thumb]]Allocate &#039;&#039;&#039;&#039;&#039;at least 60-80 GB&#039;&#039;&#039;&#039;&#039; of solid memory&lt;br /&gt;
&lt;br /&gt;
After that you should see your new machine in the main window. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Installing Debian ===&lt;br /&gt;
Now it&#039;s time to launch your VM. During your first launch the VM will install debian and will ask you some info. The most important thing is to install debian as main OS and not as a partition. This will not delete Windows because you are installing it in a VM. At some point Debian will ask  which Desktop you want. We advice to use KDE Desktop, because it&#039;s preatty&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=File:Creazione_vm1.png&amp;diff=166</id>
		<title>File:Creazione vm1.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=File:Creazione_vm1.png&amp;diff=166"/>
		<updated>2025-06-13T16:13:16Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;a&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Linux_Introduction&amp;diff=165</id>
		<title>Linux Introduction</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Linux_Introduction&amp;diff=165"/>
		<updated>2025-06-13T15:59:49Z</updated>

		<summary type="html">&lt;p&gt;Argonon: Created page with &amp;quot;=== Installing Linux Debian === In this section will guide you through the installation of Debian 12 using Oracle VM VirtualBox. First, download the Debian 12 ISO image by visiting the official website of [https://www.debian.org/distrib/ Debian] and selecting the appropriate file. Next, install [https://www.oracle.com/it/virtualization/technologies/vm/downloads/virtualbox-downloads.html Oracle VM VirtualBox] from the following link (insert link) and follow the installati...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Installing Linux Debian ===&lt;br /&gt;
In this section will guide you through the installation of Debian 12 using Oracle VM VirtualBox. First, download the Debian 12 ISO image by visiting the official website of [https://www.debian.org/distrib/ Debian] and selecting the appropriate file. Next, install [https://www.oracle.com/it/virtualization/technologies/vm/downloads/virtualbox-downloads.html Oracle VM VirtualBox] from the following link (insert link) and follow the installation instructions provided. Once the installation is complete, launch the software—you should see an interface similar to the one shown in the image beside this text.&lt;br /&gt;
[[File:GUI vm1.png|thumb|625x625px|Gui of VM Box]]&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=File:GUI_vm1.png&amp;diff=164</id>
		<title>File:GUI vm1.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=File:GUI_vm1.png&amp;diff=164"/>
		<updated>2025-06-13T15:59:04Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;a&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=File:GUI_vm2.png&amp;diff=163</id>
		<title>File:GUI vm2.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=File:GUI_vm2.png&amp;diff=163"/>
		<updated>2025-06-13T15:58:29Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;a&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=ANSA&amp;diff=131</id>
		<title>ANSA</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=ANSA&amp;diff=131"/>
		<updated>2025-04-29T20:56:01Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction : ===&lt;br /&gt;
ANSA is the pre-processing suite made by &#039;&#039;[https://www.beta-cae.com/ BETA-CAE].&#039;&#039; This suite offer several instruments to make 3D models and meshes. In these pages we will see how generate different meshes and how which one should be use. &lt;br /&gt;
&lt;br /&gt;
This guide is based on ANSA-2025, where the GUI is changed from its previous versions. &lt;br /&gt;
&lt;br /&gt;
=== Overview : ===&lt;br /&gt;
This is an overview of the new GUI of CFD suite : &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see the lateral menu has moved in the top and some macros on the left, like the &#039;&#039;&#039;&#039;&#039;PIDs&#039;&#039;&#039;&#039;&#039; or the &#039;&#039;&#039;&#039;&#039;batch mesh .&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== CAD import and fix : ===&lt;br /&gt;
First thing is to import the CAD. This is simply made&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=130</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=130"/>
		<updated>2025-04-29T20:53:36Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 0 directory ===&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
=== Constant Directory ===&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
=== System directory ===&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-applications-solvers-incompressible-simpleFoam.html simpleFoam]&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-forces-force-coeffs.html forceCoeffs]&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;br /&gt;
&lt;br /&gt;
=== Run your case : ===&lt;br /&gt;
We are finally ready to start the simulation. In the case directory, you will find two files named &#039;&#039;&#039;&#039;&#039;Allrun&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;Allclean&#039;&#039;&#039;&#039;&#039;. These are bash scripts that enable the user to clean up the case and initiate the simulation. However, it&#039;s beneficial to learn how to perform these actions manually. &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cp ./0.orig ./0&lt;br /&gt;
decomposePar&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;cp ./0.orig ./0&#039;&#039;&#039; simply copy the 0.orig directory in the same path and rename it in 0. That is necessary because OpenFOAM search 0 and not 0.orig.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;decomposePa&#039;&#039;&#039;r start the decomposition of the case, splitting the mesh and apply boundaries, in order to parallelize the process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The above command run the case in parallel. &#039;&#039;N&#039;&#039; are your core numbers, &#039;&#039;methodName&#039;&#039; is the method selected in the &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039; file. In this example we are using &#039;&#039;&#039;&#039;&#039;simpleFoam&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
if mpi is not installed it is possible to get it with the following commands&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo update&lt;br /&gt;
sudo apt-get install openmpi&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you are finally running your first simulation in OpenFOAM!&lt;br /&gt;
&lt;br /&gt;
=== Post processing ===&lt;br /&gt;
When the simulation end, we are ready to give a look. On the console run this command: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
reconstrucPar -latestTime&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This recompose your last iteration from processor directories. &lt;br /&gt;
&lt;br /&gt;
Last command needed it &amp;lt;syntaxhighlight line=&amp;quot;1&amp;quot; lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
paraFoam&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will load mesh and result in [https://www.paraview.org/ paraview]. If it is not installed on your device, it is possible to obtain with &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo update&lt;br /&gt;
sudo apt install paraview&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Aerodynamics&amp;diff=129</id>
		<title>Aerodynamics</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Aerodynamics&amp;diff=129"/>
		<updated>2025-04-29T20:51:40Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Department: ==&lt;br /&gt;
[[File:Arodinamic Logo.jpg|thumb|180x180px|Aerodynamic department logo]]&lt;br /&gt;
The Aerodynamics department of SRT &#039;&#039;[https://www.sasa-aerospace.it/rocket-team/ (Sapienza Rocket Team)]&#039;&#039; aim to study and analyze the air flow around the rocket-model. The goal of these studies is to predict the position of [https://www.grc.nasa.gov/www/k-12/VirtualAero/BottleRocket/airplane/cp.html Center of Pressure] &#039;&#039;(CoP),&#039;&#039; as well as all aerodynamics force coefficients, body force coefficients and  and the overall pressure distribution around the rocket.  &lt;br /&gt;
&lt;br /&gt;
The Center of Pressure  is the point where the aerodynamic forces acting on a body are concentrated. Understanding where this point is located and how it shifts along the rocket allows for the evaluation of moments, which is essential for assessing static stability. &lt;br /&gt;
&lt;br /&gt;
Aerodynamic coefficients, such as the [https://www.grc.nasa.gov/www/k-12/VirtualAero/BottleRocket/airplane/dragco.html Drag Coefficient] &#039;&#039;(CD)&#039;&#039; and [https://www.grc.nasa.gov/www/k-12/VirtualAero/BottleRocket/airplane/liftco.html Lift Coefficient] &#039;&#039;(CL)&#039;&#039;, are important for estimating a rocket&#039;s behavior. For example, evaluating the drag coefficient (CD) is crucial for predicting the apogee reached by the rocket, especially when the body does not have an Angle of Attack &#039;&#039;(AoA&#039;&#039;).  &lt;br /&gt;
&lt;br /&gt;
In summary, all of these studies are essential for predicting the behavior of the rocket model during its flight. They also help evaluate the appropriate materials and structure to use. Both of these studies are conducted by the [[Mission Analysis]] and [[Structures]] departments.  &lt;br /&gt;
&lt;br /&gt;
== Preliminary Studies: ==  &lt;br /&gt;
&lt;br /&gt;
== CFD Simulation with OpenFOAM: ==&lt;br /&gt;
 &lt;br /&gt;
This section provides a practical approach to CFD. The following pages will guide you through setting up a simulation step-by-step for different cases, all conducted in  [https://www.openfoam.com/ OpenFOAM], an open-source software written in C++. &lt;br /&gt;
&lt;br /&gt;
Before getting started, you can install OpenFOAM [https://develop.openfoam.com/Development/openfoam/-/wikis/precompiled/debian here], which is designed for Linux environment, such as Ubuntu or Debian. If you are working on Windows, OpenFOAM is also available through the [https://develop.openfoam.com/Development/openfoam/-/wikis/precompiled/windows WSL Virtual Machine](Windows Subsystem for Linux).&lt;br /&gt;
&lt;br /&gt;
==== OpenFOAM ====&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* Run in Batch&lt;br /&gt;
&lt;br /&gt;
==== Meshing ====&lt;br /&gt;
&lt;br /&gt;
* [[ANSA]]&lt;br /&gt;
* cfMesh&lt;br /&gt;
* Salome&lt;br /&gt;
&lt;br /&gt;
==== Steady-State Simulations : ====&lt;br /&gt;
* Compressible:&lt;br /&gt;
** [[Subsonic]]&lt;br /&gt;
** [[Sonic]]&lt;br /&gt;
** [[Supersonic]]&lt;br /&gt;
* Uncompressible:&lt;br /&gt;
** [[Subsonic]]&lt;br /&gt;
&lt;br /&gt;
==== Transient Simulations : ====&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=ANSA&amp;diff=128</id>
		<title>ANSA</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=ANSA&amp;diff=128"/>
		<updated>2025-04-29T20:51:30Z</updated>

		<summary type="html">&lt;p&gt;Argonon: Created page with &amp;quot;=== Introduction : === ANSA is the pre-processing suite made by &amp;#039;&amp;#039;[https://www.beta-cae.com/ BETA-CAE].&amp;#039;&amp;#039; This suite offer several instruments to make 3D models and meshes. In these pages we will see how generate different meshes and how which one should be use.   This guide is based on ANSA-2025, where the GUI is changed from its previous versions.   === Overview : === This is an overview of the new GUI of CFD suite :     As we can see the lateral menu has moved in the...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction : ===&lt;br /&gt;
ANSA is the pre-processing suite made by &#039;&#039;[https://www.beta-cae.com/ BETA-CAE].&#039;&#039; This suite offer several instruments to make 3D models and meshes. In these pages we will see how generate different meshes and how which one should be use. &lt;br /&gt;
&lt;br /&gt;
This guide is based on ANSA-2025, where the GUI is changed from its previous versions. &lt;br /&gt;
&lt;br /&gt;
=== Overview : ===&lt;br /&gt;
This is an overview of the new GUI of CFD suite : &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see the lateral menu has moved in the top and some macros on the left, like the &#039;&#039;&#039;&#039;&#039;PIDs&#039;&#039;&#039;&#039;&#039; or the &#039;&#039;&#039;&#039;&#039;batch mesh&#039;&#039;&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Aerodynamics&amp;diff=113</id>
		<title>Aerodynamics</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Aerodynamics&amp;diff=113"/>
		<updated>2025-04-14T20:15:50Z</updated>

		<summary type="html">&lt;p&gt;Argonon: /* OpenFOAM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Department: ==&lt;br /&gt;
[[File:Arodinamic Logo.jpg|thumb|180x180px|Aerodynamic department logo]]&lt;br /&gt;
The Aerodynamics department of SRT &#039;&#039;[https://www.sasa-aerospace.it/rocket-team/ (Sapienza Rocket Team)]&#039;&#039; aim to study and analyze the air flow around the rocket-model. The goal of these studies is to predict the position of [https://www.grc.nasa.gov/www/k-12/VirtualAero/BottleRocket/airplane/cp.html Center of Pressure] &#039;&#039;(CoP),&#039;&#039; as well as all aerodynamics force coefficients, body force coefficients and  and the overall pressure distribution around the rocket.  &lt;br /&gt;
&lt;br /&gt;
The Center of Pressure  is the point where the aerodynamic forces acting on a body are concentrated. Understanding where this point is located and how it shifts along the rocket allows for the evaluation of moments, which is essential for assessing static stability. &lt;br /&gt;
&lt;br /&gt;
Aerodynamic coefficients, such as the [https://www.grc.nasa.gov/www/k-12/VirtualAero/BottleRocket/airplane/dragco.html Drag Coefficient] &#039;&#039;(CD)&#039;&#039; and [https://www.grc.nasa.gov/www/k-12/VirtualAero/BottleRocket/airplane/liftco.html Lift Coefficient] &#039;&#039;(CL)&#039;&#039;, are important for estimating a rocket&#039;s behavior. For example, evaluating the drag coefficient (CD) is crucial for predicting the apogee reached by the rocket, especially when the body does not have an Angle of Attack &#039;&#039;(AoA&#039;&#039;).  &lt;br /&gt;
&lt;br /&gt;
In summary, all of these studies are essential for predicting the behavior of the rocket model during its flight. They also help evaluate the appropriate materials and structure to use. Both of these studies are conducted by the [[Mission Analysis]] and [[Structures]] departments.  &lt;br /&gt;
&lt;br /&gt;
== Preliminary Studies: ==  &lt;br /&gt;
&lt;br /&gt;
== CFD Simulation with OpenFOAM: ==&lt;br /&gt;
 &lt;br /&gt;
This section provides a practical approach to CFD. The following pages will guide you through setting up a simulation step-by-step for different cases, all conducted in  [https://www.openfoam.com/ OpenFOAM], an open-source software written in C++. &lt;br /&gt;
&lt;br /&gt;
Before getting started, you can install OpenFOAM [https://develop.openfoam.com/Development/openfoam/-/wikis/precompiled/debian here], which is designed for Linux environment, such as Ubuntu or Debian. If you are working on Windows, OpenFOAM is also available through the [https://develop.openfoam.com/Development/openfoam/-/wikis/precompiled/windows WSL Virtual Machine](Windows Subsystem for Linux).&lt;br /&gt;
&lt;br /&gt;
==== OpenFOAM ====&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* Run in Batch&lt;br /&gt;
&lt;br /&gt;
==== Meshing ====&lt;br /&gt;
&lt;br /&gt;
* ANSA&lt;br /&gt;
* cfMesh&lt;br /&gt;
* Salome&lt;br /&gt;
&lt;br /&gt;
==== Steady-State Simulations : ====&lt;br /&gt;
* Compressible:&lt;br /&gt;
** [[Subsonic]]&lt;br /&gt;
** [[Sonic]]&lt;br /&gt;
** [[Supersonic]]&lt;br /&gt;
* Uncompressible:&lt;br /&gt;
** [[Subsonic]]&lt;br /&gt;
&lt;br /&gt;
==== Transient Simulations : ====&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=112</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=112"/>
		<updated>2025-04-14T19:45:32Z</updated>

		<summary type="html">&lt;p&gt;Argonon: /* Run your case : */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 0 directory ===&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
=== Constant Directory ===&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
=== System directory ===&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-applications-solvers-incompressible-simpleFoam.html simpleFoam]&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-forces-force-coeffs.html forceCoeffs]&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;br /&gt;
&lt;br /&gt;
=== Run your case : ===&lt;br /&gt;
We are finally ready to start the simulation. In the case directory, you will find two files named &#039;&#039;&#039;&#039;&#039;Allrun&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;Allclean&#039;&#039;&#039;&#039;&#039;. These are bash scripts that enable the user to clean up the case and initiate the simulation. However, it&#039;s beneficial to learn how to perform these actions manually. &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cp ./0.orig ./0&lt;br /&gt;
decomposePar&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;cp ./0.orig ./0&#039;&#039;&#039; simply copy the 0.orig directory in the same path and rename it in 0. That is necessary because OpenFOAM search 0 and not 0.orig.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;decomposePa&#039;&#039;&#039;r start the decomposition of the case, splitting the mesh and apply boundaries, in order to parallelize the process.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&#039;&#039;&#039; run the case in parallel. &#039;&#039;N&#039;&#039; are your core numbers, &#039;&#039;methodName&#039;&#039; is the method selected in the &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039; file. In this example we are using &#039;&#039;&#039;&#039;&#039;simpleFoam&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
if mpi is not installed it is possible to get it with the following commands&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo update&lt;br /&gt;
sudo apt-get install openmpi&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you are finally running your first simulation in OpenFOAM!&lt;br /&gt;
&lt;br /&gt;
=== Post processing ===&lt;br /&gt;
When the simulation end, we are ready to give a look. On the console run this command: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
reconstrucPar -latestTime&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This recompose your last iteration from processor directories. &lt;br /&gt;
&lt;br /&gt;
Last command needed it &amp;lt;syntaxhighlight line=&amp;quot;1&amp;quot; lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
paraFoam&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will load mesh and result in [https://www.paraview.org/ paraview]. If it is not installed on your device, it is possible to obtain with &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo update&lt;br /&gt;
sudo apt install paraview&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=111</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=111"/>
		<updated>2025-04-14T19:39:49Z</updated>

		<summary type="html">&lt;p&gt;Argonon: /* Run your case : */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 0 directory ===&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
=== Constant Directory ===&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
=== System directory ===&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-applications-solvers-incompressible-simpleFoam.html simpleFoam]&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-forces-force-coeffs.html forceCoeffs]&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;br /&gt;
&lt;br /&gt;
=== Run your case : ===&lt;br /&gt;
We are finally ready to start the simulation. In the case directory, you will find two files named &#039;&#039;&#039;&#039;&#039;Allrun&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;Allclean&#039;&#039;&#039;&#039;&#039;. These are bash scripts that enable the user to clean up the case and initiate the simulation. However, it&#039;s beneficial to learn how to perform these actions manually. &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cp ./0.orig ./0&lt;br /&gt;
decomposePar&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;cp ./0.orig ./0&#039;&#039;&#039; simply copy the 0.orig directory in the same path and rename it in 0. That is necessary because OpenFOAM search 0 and not 0.orig.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;decomposePa&#039;&#039;&#039;r start the decomposition of the case, splitting the mesh and apply boundaries, in order to parallelize the process.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&#039;&#039;&#039; run the case in parallel. &#039;&#039;N&#039;&#039; are your core numbers, &#039;&#039;methodName&#039;&#039; is the method selected in the &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039; file. In this example we are using &#039;&#039;&#039;&#039;&#039;simpleFoam&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you are finally running your first simulation in OpenFOAM!&lt;br /&gt;
&lt;br /&gt;
=== Post processing ===&lt;br /&gt;
When the simulation end, we are ready to give a look. On the console run this command: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
reconstrucPar -latestTime&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This recompose your last iteration from processor directories. &lt;br /&gt;
&lt;br /&gt;
Last command needed it &amp;lt;syntaxhighlight line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
paraFoam&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will load mesh and result in [https://www.paraview.org/ paraview]. If it is not installed on your device, it is possible to obtain with &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sudo upgrade &lt;br /&gt;
sudo apt install paraview&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=110</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=110"/>
		<updated>2025-04-14T19:26:26Z</updated>

		<summary type="html">&lt;p&gt;Argonon: /* Run your case : */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 0 directory ===&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
=== Constant Directory ===&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
=== System directory ===&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-applications-solvers-incompressible-simpleFoam.html simpleFoam]&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-forces-force-coeffs.html forceCoeffs]&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;br /&gt;
&lt;br /&gt;
=== Run your case : ===&lt;br /&gt;
We are finally ready to start the simulation. In the case directory, you will find two files named &#039;&#039;&#039;&#039;&#039;Allrun&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;Allclean&#039;&#039;&#039;&#039;&#039;. These are bash scripts that enable the user to clean up the case and initiate the simulation. However, it&#039;s beneficial to learn how to perform these actions manually. &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cp ./0.orig ./0&lt;br /&gt;
decomposePar&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;cp ./0.orig ./0&#039;&#039;&#039; simply copy the 0.orig directory in the same path and rename it in 0. That is necessary because OpenFOAM search 0 and not 0.orig.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;decomposePa&#039;&#039;&#039;r start the decomposition of the case, splitting the mesh and apply boundaries, in order to parallelize the process.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&#039;&#039;&#039; run the case in parallel. &#039;&#039;N&#039;&#039; are your core numbers, &#039;&#039;methodName&#039;&#039; is the method selected in the &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039; file. In this example we are using &#039;&#039;&#039;&#039;&#039;simpleFoam&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you are finally running your first simulation in OpenFOAM!&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=109</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=109"/>
		<updated>2025-04-14T19:22:57Z</updated>

		<summary type="html">&lt;p&gt;Argonon: /* Run your case : */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 0 directory ===&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
=== Constant Directory ===&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
=== System directory ===&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-applications-solvers-incompressible-simpleFoam.html simpleFoam]&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-forces-force-coeffs.html forceCoeffs]&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;br /&gt;
&lt;br /&gt;
=== Run your case : ===&lt;br /&gt;
Finally we are ready to run the simulation. in the case directory there are two files named &amp;quot;Allrun&amp;quot; and &amp;quot;Allclean&amp;quot;. Both are bash executives that allow the user to clean-up the case and start it, but for now it&#039;s better understand which commands must be used. &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cp ./0.orig ./0&lt;br /&gt;
decomposePar&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;cp ./0.orig ./0&#039;&#039;&#039; simply copy the 0.orig directory in the same path and rename it in 0. That is necessary because OpenFOAM search 0 and not 0.orig.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;decomposePa&#039;&#039;&#039;r start the decomposition of the case, splitting the mesh and apply boundaries, in order to parallelize the process.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&#039;&#039;&#039; run the case in parallel. &#039;&#039;N&#039;&#039; are your core numbers, &#039;&#039;methodName&#039;&#039; is the method selected in the &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039; file. In this example we are using &#039;&#039;&#039;&#039;&#039;simpleFoam&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you are finally running your first simulation in OpenFOAM!&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=108</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=108"/>
		<updated>2025-04-14T19:21:33Z</updated>

		<summary type="html">&lt;p&gt;Argonon: /* Run your case : */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 0 directory ===&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
=== Constant Directory ===&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
=== System directory ===&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-applications-solvers-incompressible-simpleFoam.html simpleFoam]&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-forces-force-coeffs.html forceCoeffs]&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;br /&gt;
&lt;br /&gt;
=== Run your case : ===&lt;br /&gt;
Finally we are ready to run the simulation. in the case directory there are two files named &amp;quot;Allrun&amp;quot; and &amp;quot;Allclean&amp;quot;. Both are bash executives that allow the user to clean-up the case and start it, but for now it&#039;s better understand which commands must be used. &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cp ./0.orig ./0&lt;br /&gt;
decomposePar&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;1&#039;&#039;&#039; cp ./0.orig ./0 simply copy the 0.orig directory in the same path and rename it in 0. That is necessary because OpenFOAM search 0 and not 0.orig.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2&#039;&#039;&#039; decomposePar start the decomposition of the case, splitting the mesh and apply boundaries, in order to parallelize the process.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3&#039;&#039;&#039; mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel run the case in parallel. N are your core numbers, methodName is the method selected in the controlDict file. In this example we are using simpleFoam.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you are finally running your first simulation in OpenFOAM!&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=107</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=107"/>
		<updated>2025-04-14T19:20:01Z</updated>

		<summary type="html">&lt;p&gt;Argonon: /* Run your case : */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 0 directory ===&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
=== Constant Directory ===&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
=== System directory ===&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-applications-solvers-incompressible-simpleFoam.html simpleFoam]&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-forces-force-coeffs.html forceCoeffs]&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;br /&gt;
&lt;br /&gt;
=== Run your case : ===&lt;br /&gt;
Finally we are ready to run the simulation. in the case directory there are two files named &amp;quot;Allrun&amp;quot; and &amp;quot;Allclean&amp;quot;. Both are bash executives that allow the user to clean-up the case and start it, but for now it&#039;s better understand which commands must be used. &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cp ./0.orig ./0&lt;br /&gt;
decomposePar&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*cp ./0.orig ./0 simply copy the 0.orig directory in the same path and rename it in 0. That is necessary because OpenFOAM search 0 and not 0.orig.&lt;br /&gt;
* decomposePar start the decomposition of the case, splitting the mesh and apply boundaries, in order to parallelize the process.&lt;br /&gt;
* mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel run the case in parallel. N are your core numbers, methodName is the method selected in the controlDict file. In this example we are using simpleFoam.&lt;br /&gt;
&lt;br /&gt;
Now you are finally running your first simulation in OpenFOAM!&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=106</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=106"/>
		<updated>2025-04-14T19:19:26Z</updated>

		<summary type="html">&lt;p&gt;Argonon: /* Run your case : */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 0 directory ===&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
=== Constant Directory ===&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
=== System directory ===&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-applications-solvers-incompressible-simpleFoam.html simpleFoam]&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-forces-force-coeffs.html forceCoeffs]&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;br /&gt;
&lt;br /&gt;
=== Run your case : ===&lt;br /&gt;
Finally we are ready to run the simulation. in the case directory there are two files named &amp;quot;Allrun&amp;quot; and &amp;quot;Allclean&amp;quot;. Both are bash executives that allow the user to clean-up the case and start it, but for now it&#039;s better understand which commands must be used. &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cp ./0.orig ./0&lt;br /&gt;
decomposePar&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# cp ./0.orig ./0 simply copy the 0.orig directory in the same path and rename it in 0. That is necessary because OpenFOAM search 0 and not 0.orig.&lt;br /&gt;
# decomposePar start the decomposition of the case, splitting the mesh and apply boundaries, in order to parallelize the process.&lt;br /&gt;
# mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel run the case in parallel. N are your core numbers, methodName is the method selected in the controlDict file. In this example we are using simpleFoam.&lt;br /&gt;
&lt;br /&gt;
Now you are finally running your first simulation in OpenFOAM!&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=105</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=105"/>
		<updated>2025-04-14T19:18:50Z</updated>

		<summary type="html">&lt;p&gt;Argonon: /* Run your case : */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 0 directory ===&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
=== Constant Directory ===&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
=== System directory ===&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-applications-solvers-incompressible-simpleFoam.html simpleFoam]&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-forces-force-coeffs.html forceCoeffs]&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;br /&gt;
&lt;br /&gt;
=== Run your case : ===&lt;br /&gt;
Finally we are ready to run the simulation. in the case directory there are two files named &amp;quot;Allrun&amp;quot; and &amp;quot;Allclean&amp;quot;. Both are bash executives that allow the user to clean-up the case and start it, but for now it&#039;s better understand which commands must be used. &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cp ./0.orig ./0&lt;br /&gt;
decomposePar&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;cp ./0.orig ./0 simply copy the 0.orig directory in the same path and rename it in 0. That is necessary because OpenFOAM search 0 and not 0.orig. &lt;br /&gt;
&lt;br /&gt;
decomposePar start the decomposition of the case, splitting the mesh and apply boundaries, in order to parallelize the process. &lt;br /&gt;
&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel run the case in parallel. N are your core numbers, methodName is the method selected in the controlDict file. In this example we are using simpleFoam. &lt;br /&gt;
&lt;br /&gt;
Now you are finally running your first simulation in OpenFOAM!&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=104</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=104"/>
		<updated>2025-04-14T19:14:39Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 0 directory ===&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
=== Constant Directory ===&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
=== System directory ===&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-applications-solvers-incompressible-simpleFoam.html simpleFoam]&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-forces-force-coeffs.html forceCoeffs]&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;br /&gt;
&lt;br /&gt;
=== Run your case : ===&lt;br /&gt;
Finally we are ready to run the simulation. in the case directory there are two files named &amp;quot;Allrun&amp;quot; and &amp;quot;Allclean&amp;quot;. Both are bash executives that allow the user to clean-up the case and start it, but for now it&#039;s better understand which commands must be used. &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cp ./0.orig ./0&lt;br /&gt;
decomposePar&lt;br /&gt;
mpirun -np &amp;quot;N&amp;quot; &amp;quot;methodName&amp;quot; -parallel&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=103</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=103"/>
		<updated>2025-04-14T19:06:12Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 0 directory ===&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
=== Constant Directory ===&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
=== System directory ===&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-applications-solvers-incompressible-simpleFoam.html simpleFoam]&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-forces-force-coeffs.html forceCoeffs]&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=102</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=102"/>
		<updated>2025-04-13T10:07:50Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 0 directory ==&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
== Constant Directory ==&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
== System directory ==&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-controldict.html controlDict]&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-applications-solvers-incompressible-simpleFoam.html simpleFoam]&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-forces-force-coeffs.html forceCoeffs]&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvschemes.html fvSchemes]&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/guide-case-system-fvsolution.html fvSolution]&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;[https://www.openfoam.com/documentation/guides/latest/doc/openfoam-guide-parallel.html decomposePar]&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=101</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=101"/>
		<updated>2025-04-11T23:12:03Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 0 directory ==&lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
== Constant Directory ==&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
== System directory ==&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;fvSchemes&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;fvSolution&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;decomposePar&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;simpleFoam&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;forceCoeffs&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;fvSchemes&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;fvSolution&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;decomposePar&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=100</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=100"/>
		<updated>2025-04-11T23:10:59Z</updated>

		<summary type="html">&lt;p&gt;Argonon: /* Constant Directory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 0 directory ==&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
== Constant Directory ==&lt;br /&gt;
[[File:Turbulentproperties image.png|thumb|300x300px]]The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
== System directory ==&lt;br /&gt;
[[File:ControlDict image.png|thumb|257x257px]]&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: [[File:DecomposePar image.png|thumb|244x244px]]&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;fvSchemes&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;fvSolution&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;decomposePar&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;simpleFoam&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;forceCoeffs&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;fvSchemes&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;fvSolution&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;decomposePar&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=99</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=99"/>
		<updated>2025-04-11T23:06:21Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 0 directory ==&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
== Constant Directory ==&lt;br /&gt;
The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;[[File:Turbulentproperties image.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
== System directory ==&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: &lt;br /&gt;
[[File:ControlDict image.png|thumb]]&lt;br /&gt;
* [[File:DecomposePar image.png|thumb]]&#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;fvSchemes&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;fvSolution&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;decomposePar&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;simpleFoam&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;forceCoeffs&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;fvSchemes&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;fvSolution&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;decomposePar&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=File:Turbulentproperties_image.png&amp;diff=98</id>
		<title>File:Turbulentproperties image.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=File:Turbulentproperties_image.png&amp;diff=98"/>
		<updated>2025-04-11T23:04:16Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=File:ControlDict_image.png&amp;diff=97</id>
		<title>File:ControlDict image.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=File:ControlDict_image.png&amp;diff=97"/>
		<updated>2025-04-11T23:03:48Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=File:DecomposePar_image.png&amp;diff=96</id>
		<title>File:DecomposePar image.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=File:DecomposePar_image.png&amp;diff=96"/>
		<updated>2025-04-11T23:02:37Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=95</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=95"/>
		<updated>2025-04-11T22:59:30Z</updated>

		<summary type="html">&lt;p&gt;Argonon: /* System direcotry */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 0 directory ==&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
== Constant Directory ==&lt;br /&gt;
The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
== System directory ==&lt;br /&gt;
The system directory can contain many files. In particular, you can create your own script in C++ using the OpenFOAM library to achieve complete customization. The main files of interest are: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;fvSchemes&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;fvSolution&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;decomposePar&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While there are additional files needed to create the mesh or collect information about the solution, exploring these files is not the focus of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It specifies the simulation method ,here &#039;&#039;&#039;simpleFoam&#039;&#039;&#039; is the &#039;&#039;SIMPLE&#039;&#039; method, along with other important details such as the iteration number, start and end times of the simulation, and more. The function key allow the user to add existing function, like &#039;&#039;&#039;forceCoeffs&#039;&#039;&#039; , to evaluate aerodynamics coefficients in a specific reference system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;fvSchemes&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;fvSolution&#039;&#039;&#039;&#039;&#039; contains the divergence schemes for all the fields, gradients, flux, etc., as well as the solvers for each field, complete with various controls on residuals, tolerances, and other parameters.  We will not delve deeply into these two files, as they are quite complex and not the focus of this section.&lt;br /&gt;
&lt;br /&gt;
Lastly, the &#039;&#039;&#039;&#039;&#039;decomposePar&#039;&#039;&#039;,&#039;&#039; allow the user to decompose the case in different part using various methods. In this example the  &#039;&#039;&#039;&#039;&#039;hierarchical&#039;&#039;&#039;&#039;&#039;  method is employed, specifying how many pieces the case should be split into.  This decomposition aims to parallelize the process across CPU cores, thereby speeding up the solution.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=94</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=94"/>
		<updated>2025-04-11T22:42:51Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 0 directory ==&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;p&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;nut&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;k&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;omega&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
== Constant Directory ==&lt;br /&gt;
The constant directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;ObjectFile - &amp;quot;polyMesh&amp;quot;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last element in the list simply represent a 3D object or an already meshed object for OpenFOAM, underling that we need a specific mesh file/files for this software.&lt;br /&gt;
&lt;br /&gt;
The other two file, &#039;&#039;&#039;&#039;&#039;transportProperties&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; , contains respectively the fluid physic properties, such dynamic viscosity or in general transport constant, and the turbulence model. On the left are showed images for both files. &lt;br /&gt;
&lt;br /&gt;
In this example the &#039;&#039;&#039;&#039;&#039;turbulenceProperties&#039;&#039;&#039;&#039;&#039; file is set with a &#039;&#039;&#039;RAS&#039;&#039;&#039; (&#039;&#039;Reynolds Averaged Simulation&#039;&#039;) and the model selected is  kOmegaSST. Values of k and omega are setted in the 0 directory, in the same name files. &lt;br /&gt;
&lt;br /&gt;
== System direcotry ==&lt;br /&gt;
the system directory can contain a lot of files, in particular it is possible to create your own script made in C++ with OpenFOAM library to achive a complete customization. By the way the main files are : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;fvSchemes&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;fvSolution&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&#039;&#039;decomposePar&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
All other files are needed to create the mesh or obtain information about the solution, but explore those files is not the purpose of this page. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;&#039;&#039;controlDict&#039;&#039;&#039;&#039;&#039; is the core of the simulation. It contains the name of the method, in this case simpleFoam is the SIMPLE method, and other stuff like iteration number, start and end time of the simulation,&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=93</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=93"/>
		<updated>2025-04-11T21:58:44Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 0 directory ==&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;U&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;p&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;nut&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;k&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;omega&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
__NEWSECTIONLINK__&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=92</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=92"/>
		<updated>2025-04-11T21:58:30Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 0 directory ==&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;U&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;p&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;nut&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;k&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;omega&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
__INDEX__&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=91</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=91"/>
		<updated>2025-04-11T21:56:57Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 0 directory: ==&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;U&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;p&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;nut&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;k&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;omega&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=90</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=90"/>
		<updated>2025-04-11T21:53:30Z</updated>

		<summary type="html">&lt;p&gt;Argonon: /* Your First Case: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam : ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
=== Your First Case: ===&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 0 directory: ==&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;U&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;p&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;nut&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;k&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;omega&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=89</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=89"/>
		<updated>2025-04-11T21:53:22Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam : ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
== Your First Case: ==&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 0 directory: ==&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;U&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;p&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;nut&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;k&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;omega&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=85</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=85"/>
		<updated>2025-04-11T17:32:03Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam : ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
== Your First Case: ==&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 0 directory: ==&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;U&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;p&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;nut&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;k&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;omega&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
[[File:U_file_photo.png|thumb|410x410px]]&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=84</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=84"/>
		<updated>2025-04-11T17:31:44Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam : ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
== Your First Case: ==&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 0 directory: ==&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;U&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;p&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;nut&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;k&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;omega&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the right show how the file is structured. &lt;br /&gt;
[[File:U_file_photo.png|thumb|424x424px]]&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=83</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=83"/>
		<updated>2025-04-11T17:31:06Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam : ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
== Your First Case: ==&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 0 directory: ==&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;U&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;p&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;nut&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;k&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;omega&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the left show how the file is structured. &lt;br /&gt;
[[File:U_file_photo.png|thumb|424x424px]]&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
	<entry>
		<id>http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=82</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="http://wiki.aperturelab.science/index.php?title=Getting_Started&amp;diff=82"/>
		<updated>2025-04-11T17:30:21Z</updated>

		<summary type="html">&lt;p&gt;Argonon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Step in OpenFoam : ==&lt;br /&gt;
Once you have installed OpenFOAM, hopefully without losing your mind, you can start its environment by typing in the terminal   &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
openfoamXXXX&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;where XXXX is the version selected during the download. &lt;br /&gt;
&lt;br /&gt;
From now on, the journey begins. &lt;br /&gt;
&lt;br /&gt;
== Your First Case: ==&lt;br /&gt;
To run your first simulation, it is essential to understand how the software operates. Each simulation is organized into several sub-folders: &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;Simulation_1&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;constant&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;&amp;quot;system&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The 0 directory contains specifications for the boundary fields, including patch type and initial values.  &lt;br /&gt;
&lt;br /&gt;
The constant directory houses the geometry, mesh and files that define constant values, such as fluid or turbulence properties.&lt;br /&gt;
&lt;br /&gt;
The system directory hold all the instruction needed, including the Solver, numeric schemes, number of iterations, multi-processing options, and more.&lt;br /&gt;
&lt;br /&gt;
This is a brief overview of how a general case is structured in OpenFOAM.  Below an illustration of how the directory should look. To clarify the upcoming paragraphs, we will use a tutorial located in the OpenFOAM sub-directory. You can access it by typing the following commands in your terminal :    &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;cd $FOAM_TUTORIALS&lt;br /&gt;
cd incompressible/simpleFoam/motorBike/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 0 directory: ==&lt;br /&gt;
The 0 directory contain the following files : &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;&amp;quot;0.orig&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;U&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;p&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;nut&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;k&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;omega&#039;&#039;&#039;&lt;br /&gt;
There is also another directory &amp;quot;include&amp;quot;, but for now ignore it.  &lt;br /&gt;
The image on the left show how the file is structured. &lt;br /&gt;
[[File:U_file_photo.png|thumb|424x424px]]&lt;br /&gt;
In particular the image is referred to the U file, but all of them have the same structure. The file is like a key-value dictionary where the first key encountered is &#039;&#039;&#039;&#039;&#039;dimension&#039;&#039;&#039;&#039;&#039;, following &#039;&#039;&#039;&#039;&#039;internalField&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;boundaryField&#039;&#039;&#039;&#039;&#039; (we skipped the &amp;quot;#include&amp;quot; for now) .  The dimension, as we can imagine, define the physical dimensional unit of the field. The array [ ... ] has 7 slots that represent 7 different units in this order: &lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+OpenFOAM Dimensional Field Units&lt;br /&gt;
|No.&lt;br /&gt;
|Property&lt;br /&gt;
|SI unit&lt;br /&gt;
|USCS unit&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Mass&lt;br /&gt;
|kilogram (kg)&lt;br /&gt;
|pound-mass (lbm)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Length&lt;br /&gt;
|metre (m)&lt;br /&gt;
|foot (ft)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Time&lt;br /&gt;
|second (s)&lt;br /&gt;
|second (s)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Temperature&lt;br /&gt;
|Kelvin (K)&lt;br /&gt;
|degree Rankine (R)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Quantity&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|mole (mol)&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Current&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|ampere (A)&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Luminous intensity&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|candela (cd)&lt;br /&gt;
|}&lt;br /&gt;
The number given to the array represent the order of the dimension, for example &amp;lt;math&amp;gt;m\over s&amp;lt;/math&amp;gt; is [0 1 -1 0 0 0 0].&lt;br /&gt;
&lt;br /&gt;
Internal field key represent the value of the field at the beginning. &lt;br /&gt;
&lt;br /&gt;
The boundary field key contains all the boundary conditions defined in the mesh. Each of them need a type and the relative options. Here is linked the [https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions standard boundary conditions] list for OpenFOAM.&lt;/div&gt;</summary>
		<author><name>Argonon</name></author>
	</entry>
</feed>