Boundary conditions definition
The 0 folder contains files corresponding to each variable computed during a simulation. You have to define there the initial conditions and boundary conditions. Here are some details for the main variables. Specific instructions are available for each case.
Velocity (U)
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 volVectorField;
13
object U;
14
}
15
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16
dimensions [0 1 -1 0 0 0 0];
17
internalField uniform (0 0 0);
18
boundaryField
19
{
20
inlet
21
{
22
type fixedValue;
23
value uniform (0.00125 0 0);
24
}
25
outlet
26
{
27
type zeroGradient;
28
}
29
walls
30
{
31
type fixedValue;
32
value uniform (0 0 0);
33
}
34
topAndBottom
35
{
36
type empty;
37
}
38
}
39
// ************************************************************************* //
Pressure
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 volScalarField;
13
object p;
14
}
15
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16
dimensions [0 2 -2 0 0 0 0];
17
internalField uniform 0;
18
boundaryField
19
{
20
inlet
21
{
22
type zeroGradient;
23
}
24
outlet
25
{
26
type fixedValue;
27
value uniform 0;
28
}
29
walls
30
{
31
type zeroGradient;
32
}
33
topAndBottom
34
{
35
type empty;
36
}
37
}
38
// ************************************************************************* //
Turbulent kinetic energy
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 volScalarField;
13
location "0";
14
object k;
15
}
16
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17
dimensions [0 2 -2 0 0 0 0];
18
internalField uniform 0.00325;
19
boundaryField
20
{
21
inlet
22
{
23
type fixedValue;
24
value uniform 0.00325;
25
}
26
outlet
27
{
28
type zeroGradient;
29
}
30
walls
31
{
32
type kqRWallFunction;
33
value uniform 0.00325;
34
}
35
topAndBottom
36
{
37
type empty;
38
}
39
}
40
// ************************************************************************* //
Turbulent kinetic energy dissipation
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 volScalarField;
13
location "0";
14
object epsilon;
15
}
16
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17
dimensions [0 2 -3 0 0 0 0];
18
internalField uniform 0.000765;
19
boundaryField
20
{
21
inlet
22
{
23
type fixedValue;
24
value uniform 0.000765;
25
}
26
outlet
27
{
28
type zeroGradient;
29
}
30
walls
31
{
32
type epsilonWallFunction;
33
value uniform 0.000765;
34
}
35
topAndBottom
36
{
37
type empty;
38
}
39
}
40
// ************************************************************************* //
Remarque :
At the walls, specific boundary conditions for turbulence like "kqRWallFunction" and "epsilonWallFunction" are specific wall functions.