CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Initial values and boundary condition for LES simulation of a box (https://www.cfd-online.com/Forums/openfoam-solving/204720-initial-values-boundary-condition-les-simulation-box.html)

SaddamH July 30, 2018 13:20

Initial values and boundary condition for LES simulation of a box
 
Hello everybody,


I am trying to simulate a case using LES turbulent approach, my case is in 3D where I have a box placed inside a rectangular parallelepiped on its bottom surface. Each side of the box is 0.1 meter length and the parallelepiped is 2 X 1 X 0.5 meter. I am using dynamicKEqn as LES model and I want to simulate the case with initial velocity field being (1 0 0) at the inlet, the box is placed 0.2 meter far from the inlet leaving 1.8 meter for the wake region.


I checked online for the boundary conditions that I should use and I found that I should use fixedvalue for inlet and inletoutlet for the outlet, but I have doubt about the values and the type of conditions I should use for nut and k.


Here are the nut and k in the zero folder
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 0.000384;

boundaryField
{
inlet
{
type fixedValue;
value $internalField;
}

outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
sides
{
type fixedValue;
value uniform 0;
}
top
{
type zeroGradient;
}

bottom
{
type zeroGradient;
}

box
{
type fixedValue;
value uniform 0;
}
}

// ************************************************** *********************** //










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

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

internalField uniform 0.001;

boundaryField
{
inlet
{
type fixedValue;
value $internalField;
}

outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
sides
{
type fixedValue;
value uniform 0;
}
top
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
box
{
type nutkWallFunction;
value uniform 0;
}
}


// ************************************************** *********************** //


The physical viscosity is 10-5 and so Re = 10^4



I am particularly confused about the values of nut and k, I computed the value of k using the indications mentioned in this page https://www.cfd-online.com/Wiki/Turb...ary_conditions


where I supposed that Re_dh is just the same as Re (meaning that I supposed dh to be d the length of any side of the box)
second thing what about the use of the wall function for nut is it ok to have zero value on the box ?


Note that my mesh is coarse but once I verify the correctness of the boundary and initial setting I will run the same case on 8 times more cells mesh but on the cluster as my laptop does not afford running it.


Thank you very much for your help.

Santiago July 31, 2018 03:21

Quote:

Originally Posted by SaddamH (Post 700963)
Hello everybody,


I am trying to simulate a case using LES turbulent approach, my case is in 3D where I have a box placed inside a rectangular parallelepiped on its bottom surface. Each side of the box is 0.1 meter length and the parallelepiped is 2 X 1 X 0.5 meter. I am using dynamicKEqn as LES model and I want to simulate the case with initial velocity field being (1 0 0) at the inlet, the box is placed 0.2 meter far from the inlet leaving 1.8 meter for the wake region.


I checked online for the boundary conditions that I should use and I found that I should use fixedvalue for inlet and inletoutlet for the outlet, but I have doubt about the values and the type of conditions I should use for nut and k.


Here are the nut and k in the zero folder
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 0.000384;

boundaryField
{
inlet
{
type fixedValue;
value $internalField;
}

outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
sides
{
type fixedValue;
value uniform 0;
}
top
{
type zeroGradient;
}

bottom
{
type zeroGradient;
}

box
{
type fixedValue;
value uniform 0;
}
}

// ************************************************** *********************** //










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

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

internalField uniform 0.001;

boundaryField
{
inlet
{
type fixedValue;
value $internalField;
}

outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
sides
{
type fixedValue;
value uniform 0;
}
top
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
box
{
type nutkWallFunction;
value uniform 0;
}
}


// ************************************************** *********************** //


The physical viscosity is 10-5 and so Re = 10^4



I am particularly confused about the values of nut and k, I computed the value of k using the indications mentioned in this page https://www.cfd-online.com/Wiki/Turb...ary_conditions


where I supposed that Re_dh is just the same as Re (meaning that I supposed dh to be d the length of any side of the box)
second thing what about the use of the wall function for nut is it ok to have zero value on the box ?


Note that my mesh is coarse but once I verify the correctness of the boundary and initial setting I will run the same case on 8 times more cells mesh but on the cluster as my laptop does not afford running it.


Thank you very much for your help.

Kappa represents the subgrid scale turbulent kinetic energy. The instructions you followed are for setting k when you model the whole energy spectrum, so in principle is not correct. Besides, you are setting a uniform inlet, thus superposing subgrid "turbulence" to a laminar uniform flow seems counterintuitive.

Setting k for the inlet depends entirely on how you produce your boundary data. For instance, if you map your inlet from DNS data then k is zero at the inlet. Instead, if the data you map comes from LES then you should be able also to map the k sgs to the inlet as well.

Advise: much of you know for turbulence in RANS is useless for LES, except if you are using hybrid methods.


All times are GMT -4. The time now is 13:31.