|
[Sponsors] |
April 7, 2016, 16:42 |
Modifying Turbulence Model Coefficients
|
#1 |
New Member
Join Date: Apr 2012
Posts: 9
Rep Power: 14 |
I'm working with the v2f RAS model. Ultimately, I'd like to be able to modify the model's coefficients without having to recompile.
The two files, v2f.C and v2f.H, found in the directory, /src/turbulenceModels/incompressible/RAS/v2f/, seem to contain everything I need to make the changes. v2f.C contains a section called "Constructors" and looks like this Code:
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // v2f::v2f ( const volVectorField& U, const surfaceScalarField& phi, transportModel& transport, const word& turbulenceModelName, const word& modelName ) : RASModel(modelName, U, phi, transport, turbulenceModelName), Cmu_ ( dimensioned<scalar>::lookupOrAddToDict ( "Cmu", coeffDict_, 0.22 ) ), CmuKEps_ ( dimensioned<scalar>::lookupOrAddToDict ( "CmuKEps", coeffDict_, 0.09 ) ), ... 7.2.1 Model coefficients The coefficients for the RAS turbulence models are given default values in their respective source code. If the user wishes to override these default values, then they can do so by adding a sub-dictionary entry to the RAS sub-dictionary file, whose keyword name is that of the model with Coeffs appended, e.g. kEpsilonCoeffs for the kEpsilon model. If the printCoeffs switch is on in the RAS sub-dictionary, an example of the relevant …Coeffs dictionary is printed to standard output when the model is created at the beginning of a run. The user can simply copy this into the RAS sub-dictionary file and edit the entries as required. And the v2f.H file contains the following in the header: Code:
\verbatim v2fCoeffs { Cmu 0.22; CmuKEps 0.09; C1 1.4; C2 0.3; CL 0.23; Ceta 70; Ceps2 1.9; sigmaEps 1.3; sigmaK 1; } \endverbatim So, I guess my real question is: what is the easiest way to modify these coefficients? And, does this require that I compile the RAS directory (using the Allwmake found in the /src/turbulenceModels/incompressible/ directory, parallel to the /RAS/ directory)? Thanks! |
|
April 8, 2016, 03:21 |
|
#2 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
You don't need to change the code at all to modify these values. Just add the v2fCoeffs into the file where you select the turbulence model. Note that a dictionary never refers to a code file, but a configuration file.
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
April 8, 2016, 11:53 |
|
#3 | |
New Member
Join Date: Apr 2012
Posts: 9
Rep Power: 14 |
Quote:
Code:
FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object RASProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // RASModel v2f; v2fCoeffs { Cmu 0.221; CmuKEps 0.091; C1 1.41; C2 0.31; CL 0.231; Ceta 701; Ceps2 1.91; sigmaEps 1.31; sigmaK 1.1; } turbulence on; printCoeffs on; // ************************************************************************* // |
||
August 31, 2016, 07:06 |
|
#4 |
New Member
larmes
Join Date: Aug 2016
Posts: 26
Rep Power: 10 |
Just wondering but in which cases would you need to modify them?
|
|
August 31, 2016, 12:10 |
|
#5 |
New Member
Join Date: Apr 2012
Posts: 9
Rep Power: 14 |
Just looking to see if there is some room to improve the values of the constants in various RANS models. Working with flows that are transitioning in/out of turbulent states, where RANS models can have some trouble predicting the physics of the flow.
|
|
September 1, 2016, 04:44 |
|
#6 |
New Member
larmes
Join Date: Aug 2016
Posts: 26
Rep Power: 10 |
sounds good thanks!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fluent :- turbulence Model | prince_pahariaa | FLUENT | 9 | May 20, 2016 04:41 |
Overflow Error in Multiphase Modelling with Two Continuous Fluids | ashtonJ | CFX | 6 | August 11, 2014 15:32 |
Spalarat - Allmaras turbulence model | saisanthoshm88 | Main CFD Forum | 1 | June 16, 2014 17:33 |
question about turbulence model selection and sensitivity | karananand | Main CFD Forum | 1 | February 26, 2010 05:41 |
Discussion: Reason of Turbulence!! | Wen Long | Main CFD Forum | 3 | May 15, 2009 10:52 |