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

Modifying Turbulence Model Coefficients

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 3 Post By akidess
  • 1 Post By dsh5400

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   April 7, 2016, 15:42
Default Modifying Turbulence Model Coefficients
  #1
New Member
 
Join Date: Apr 2012
Posts: 9
Rep Power: 14
dsh5400 is on a distinguished road
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
        )
    ),
...
Which leads me to believe I should just modify these values as needed. However, the OpenFOAM User Guide states:

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
Which has me wondering if this is the "sub-directory entry" mentioned by the User Guide. Is something that I should move into the body of the code, and modify the values?

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!
dsh5400 is offline   Reply With Quote

 


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
Fluent :- turbulence Model prince_pahariaa FLUENT 9 May 20, 2016 03:41
Overflow Error in Multiphase Modelling with Two Continuous Fluids ashtonJ CFX 6 August 11, 2014 14:32
Spalarat - Allmaras turbulence model saisanthoshm88 Main CFD Forum 1 June 16, 2014 16:33
question about turbulence model selection and sensitivity karananand Main CFD Forum 1 February 26, 2010 04:41
Discussion: Reason of Turbulence!! Wen Long Main CFD Forum 3 May 15, 2009 09:52


All times are GMT -4. The time now is 10:37.