Sei sulla pagina 1di 6

8.

10 From laminar to turbulent simulation


with OpenFoam

Starting from a working laminar model. . .

i. Change governing equations to include turbulence :

Copy files fvSchemes and fvSolution


from the /system sub-directory of a turbulent tutorial ,
e.g. /tutorials/incompressible/pisoFoam/ras/cavity/system,
into your own /system directory.

ii. Select turbulence model :

Copy file turbulenceProperties from the /constant sub-directory of a


turbulent tutorial into your own /constant directory.

Choose turbulence model :

simulationType RAS;

RAS
{
RASModel kEpsilon;
turbulence on;
printCoeffs on;
}
iii. Check transport model

./constant/transportProperties :

transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 15.6e-6;

iv. Set initial and boundary conditions for turbulence

In ./0 sub-directory, add/copy k, epsilon, nut files for k, ε and ν̃


(in addition to U and p).

k (nature and initial conditions) :

(...)

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}
//* * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 1e-8;


(...)
k (boundary conditions) :

(...)

boundaryField

right
{
type zeroGradient;
}
left
{
type fixedValue;
value uniform 1e-8;
}
updown
{
}
type zeroGradient;
}
obstacle
{
type kqRWallFunction;
value uniform 1e-8;
}
frontAndBack
{
type empty;
}
// *************************************** //

Special treatment at solid boundaries based on universal law of the wall


⇒ no need to (excessively) refine the grid.
epsilon :

(...)

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object epsilon;
}
//* * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -3 0 0 0 0];

internalField uniform 1e-9;

boundaryField {

right
{
type zeroGradient;
}

obstacle
{
type epsilonWallFunction;
value uniform 1e-9;
}

(...) }
nut :
(...)

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object nut;
}
//* * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -1 0 0 0 0];

internalField uniform 0.2;

boundaryField {

right
{
type zeroGradient;
}

obstacle
{
type nutkWallFunction;
value uniform 0.2;
}

(...) }

• Not a state variable (No PDE).


• But (non zero) initial conditions required.
Rule of thumb for initial conditions :

1 Cµ0.75k1/2 Cµ k2
k = U ′2 , ε= , ν̃ =
2 ℓ ε
• Cµ = 0.09 ;

• U ′ ≈ 5-10 % of macroscopic characteristic velocity ;

• ℓ ≈ 5-10 % of macroscopic characteristic length scale ;

v. Generate and check your grid as usual using blockMeshDict


of gmsh.
vi. Check your timestep, output, post-processing, . . . in
controlDict.

Stability conditions might be more restrictive !

vii. Run the simulation using pisoFoam instead of icoFoam.

Simulate generate new epsilon, k, nut files at each time step, in addition to
p and U files.

viii. Analyse/visualize results using paraFoam.

Potrebbero piacerti anche