Constant folder configuration

In the constant folder, you will usually have to check and edit three files (sometimes more depending on the solver used):

  • turbulenceProperties

  • transportProperties

turbulenceProperties

Open the text file using this command:

1
gedit constant/turbulenceProperties

This file allows you to chose the type turbulence model you will be using (laminar, Reynolds averaged...) and to select the appropriate turbulence model for your case.

1
/*--------------------------------*- C++ -*----------------------------------*\
2
| =========                 |                                                 |
3
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
4
|  \\    /   O peration     | Version:  5                                     |
5
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
6
|    \\/     M anipulation  |                                                 |
7
\*---------------------------------------------------------------------------*/
8
FoamFile
9
{
10
    version     2.0;
11
    format      ascii;
12
    class       dictionary;
13
    location    "constant";
14
    object      turbulenceProperties;
15
}
16
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17
18
simulationType RAS;
19
20
RAS
21
{
22
    RASModel        realizableKE;
23
24
    turbulence      on;
25
26
    printCoeffs     on;
27
}
28
29
// ************************************************************************* //

transportProperties

Open the text file using this command:

1
gedit constant/transportProperties

This file allows to chose how your simulation will handle viscosity: Newtonian fluid or not. In case of non-Newtonian fluid, you will have to chose the appropriate rheological model.

1
/*--------------------------------*- C++ -*----------------------------------*\
2
| ========= | |
3
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4
| \\ / O peration | Version: 2.3.0 |
5
| \\ / A nd | Web: www.OpenFOAM.org |
6
| \\/ M anipulation | |
7
\*---------------------------------------------------------------------------*/
8
FoamFile
9
{
10
version 2.0;
11
format ascii;
12
class dictionary;
13
location "constant";
14
object transportProperties;
15
}
16
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17
transportModel Newtonian;
18
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
19
CrossPowerLawCoeffs
20
{
21
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
22
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
23
m m [ 0 0 1 0 0 0 0 ] 1;
24
n n [ 0 0 0 0 0 0 0 ] 1;
25
}
26
BirdCarreauCoeffs
27
{
28
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
29
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
30
k k [ 0 0 1 0 0 0 0 ] 0;
31
n n [ 0 0 0 0 0 0 0 ] 1;
32
}
33
// ************************************************************************* //