CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

k-epsilon model

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2012, 20:48
Default k-epsilon model
  #1
Member
 
yu
Join Date: Nov 2010
Posts: 39
Rep Power: 16
xiyuqiu is on a distinguished road
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
xiyuqiu is offline   Reply With Quote

Old   June 29, 2012, 02:40
Default
  #2
Member
 
Eysteinn Helgason
Join Date: Sep 2009
Location: Gothenburg, Sweden
Posts: 53
Rep Power: 17
eysteinn is on a distinguished road
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
eysteinn is offline   Reply With Quote

Old   June 29, 2012, 05:32
Default
  #3
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
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 is offline   Reply With Quote

Old   June 29, 2012, 14:35
Default
  #4
Member
 
yu
Join Date: Nov 2010
Posts: 39
Rep Power: 16
xiyuqiu is on a distinguished road
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 View Post
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;
}

Last edited by xiyuqiu; June 29, 2012 at 15:36.
xiyuqiu is offline   Reply With Quote

Old   July 2, 2012, 04:29
Default
  #5
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
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
GerhardHolzinger is offline   Reply With Quote

Old   July 2, 2012, 12:57
Default
  #6
Member
 
yu
Join Date: Nov 2010
Posts: 39
Rep Power: 16
xiyuqiu is on a distinguished road
Got it. Thanks!!!


Quote:
Originally Posted by GerhardHolzinger View Post
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
xiyuqiu is offline   Reply With Quote

Old   July 29, 2012, 03:12
Default help please
  #7
Member
 
vahid
Join Date: Feb 2012
Location: Mashhad-Iran
Posts: 80
Rep Power: 13
vahid.najafi is an unknown quantity at this point
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!!!!!!??????
vahid.najafi is offline   Reply With Quote

Old   July 29, 2012, 09:44
Default
  #8
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
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
nimasam is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Turbulence Model and limitation to Reynolds number qascapri FLUENT 0 January 24, 2011 11:48
Centrifugal Pump and Turbulence Model Michiel CFX 12 January 25, 2010 04:20
k and epsilon discretization of RNG model mehran Fidelity CFD 0 January 24, 2009 01:01
SimpleFoam k and epsilon bounded nedved OpenFOAM Running, Solving & CFD 1 November 25, 2008 21:21
K-Epsilon Model sangit Main CFD Forum 2 September 9, 2004 14:19


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