CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   k-epsilon model (http://www.cfd-online.com/Forums/openfoam/103911-k-epsilon-model.html)

xiyuqiu June 28, 2012 19:48

k-epsilon model
 
Hello all,

Does anyone know what are (or where to find) the default value that OpenFoam uses in its standard k-epsilon model? Many thanks.

best

eysteinn June 29, 2012 01:40

Hi,

At least in openfoam 2.0.1 it can be found is in:
/src/turbulenceModels/incompressible/RAS/kEpsilon

Just take a look at the .H or .C file.

/Eysteinn

GerhardHolzinger June 29, 2012 04:32

This is the content of the file RASProperties:

Code:

RASModel        kEpsilon;

turbulence      on;

printCoeffs    on;


if you set printCoeffs to on, then OF will print the coefficients of the turbulence model at the beginning of the simulation.


If you want to change some values add this to RASProperties

Code:

kEpsilonCoeffs
{
    Cmu        0.09;
    C1          1.44;
    C2          1.92;
    C3          -0.33;
    sigmak      1.0;
    sigmaEps    1.11; //Original value:1.44
    Prt        1.0;
}


xiyuqiu June 29, 2012 13:35

Thank you so much. This is very helpful!! Do you also happen to know that if I would like to change those constants, where do I need to go? Are they defined in the source code? if so, if I change the values, I would need to recompiled the code, right? Or, there is a easier way to change the turbulent modeling constants. Thanks again.

best,

yu



Quote:

Originally Posted by GerhardHolzinger (Post 368837)
This is the content of the file RASProperties:

Code:

RASModel        kEpsilon;

turbulence      on;

printCoeffs    on;


if you set printCoeffs to on, then OF will print the coefficients of the turbulence model at the beginning of the simulation.


If you want to change some values add this to RASProperties

Code:

kEpsilonCoeffs
{
    Cmu        0.09;
    C1          1.44;
    C2          1.92;
    C3          -0.33;
    sigmak      1.0;
    sigmaEps    1.11; //Original value:1.44
    Prt        1.0;
}



GerhardHolzinger July 2, 2012 03:29

my second code example shows you how to manually override the default values. There is no need to change the default values in the code, if you can override them.

If you wanted to change the values right inside the code, you should look at e.g. src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C

I assume the recommended way to do a calculation with non-default model constants is to define them in RASProperties. Also, if you do a calculation with non-default model constants you should make sure the coefficients are printed at the beginning of the calculation (printCoeffs on). So you can check afterwards which values were used.

Quote:

Or, there is a easier way to change the turbulent modeling constants
The easiest way to change the turbulent model constants is to define them in RASProperties

xiyuqiu July 2, 2012 11:57

Got it. Thanks!!!


Quote:

Originally Posted by GerhardHolzinger (Post 369192)
my second code example shows you how to manually override the default values. There is no need to change the default values in the code, if you can override them.

If you wanted to change the values right inside the code, you should look at e.g. src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C

I assume the recommended way to do a calculation with non-default model constants is to define them in RASProperties. Also, if you do a calculation with non-default model constants you should make sure the coefficients are printed at the beginning of the calculation (printCoeffs on). So you can check afterwards which values were used.



The easiest way to change the turbulent model constants is to define them in RASProperties


vahid.najafi July 29, 2012 02:12

help please
 
Hello dear foamers.
I have a question, please answer this.

I want to add k(kinetic turbulence energy) in solver interPhaseChangeFoam.
for this reason, added next line in this:

const volScalarField &k=U_.db().lookupObject<volScalarField>("k")
and wmake was Successfully .

but How can I Understand that this k is the same with k(kinetic turbulence energy)???Is it true?????or not????

Because I replased M Instead k in Top Line :

const volScalarField &M=U_.db().lookupObject<volScalarField>("M")
but nothing error was not occured!!!!!!??????

nimasam July 29, 2012 08:44

this program will be compiled with no error! but do you run your case with it?
this line will be looking for volScalarField M, and if it can not find, it will give you fatal error


All times are GMT -4. The time now is 16:55.