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

How to change coefficient(s) to re-calibrate an existing model

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 17, 2019, 10:44
Arrow How to change a coefficient to re-calibrate an existing turbulence model
  #1
New Member
 
Purn Prakash
Join Date: Nov 2018
Posts: 21
Blog Entries: 1
Rep Power: 2
purnp2 is on a distinguished road
Hello,
I am using kOmegaSST model to modify it into kOmegaBSL model (both are sub-class of kOmegaSSTBase class).
Between these two models, there is one difference where I have to change one coefficient (alphaK1 should be changed from 0.85 to 0.5). So, I want to change this value in my new model.
In the base-class (kOmegaSSTBase.C), this coefficient is defined as follows in the constructor of its class:
Code:
    alphaK1_
    (
        dimensioned<scalar>::lookupOrAddToDict
        (
            "alphaK1",
            this->coeffDict_,
            0.85
        )
    ),
One way of changing the value of this coefficient is to add the name of coefficient into the file in MainCaseDirectory/constant/turbulenceProperties. But I am looking for changing the default value from within the code of the new Turbulence model.
The above piece of code uses lookupOrAddToDict() function which is defined as follows:
Code:
Foam::dimensioned< Type > lookupOrAddToDict	
(       const word & 	name,
        dictionary & 	dict,
        const Type & 	defaultValue = Type(Zero) 
)
I have seen a few other standard models like kOmegaSSTSAS where new coefficients are added and then a read() function is added. I tried this method but it is not working for me.
Code:
       alphaK1_
    (
        dimensioned<scalar>::lookupOrAddToDict
        (
            "alphaK1",
            this->coeffDict_,
            0.501
        )
Maybe I am missing any step.

I'm attaching the current version of my kOmegaBSL.C file with this post.
Can you please suggest anything in it?
Thank you. Regards.
Purn
Attached Files
File Type: c kOmegaBSL.C (7.8 KB, 3 views)

Last edited by purnp2; May 21, 2019 at 06:00.
purnp2 is offline   Reply With Quote

Old   May 17, 2019, 19:30
Default Solution
  #2
New Member
 
Purn Prakash
Join Date: Nov 2018
Posts: 21
Blog Entries: 1
Rep Power: 2
purnp2 is on a distinguished road
One known solution is:
I need to add the coefficient in the pitzDaily/constant/turbulenceProperties of the case file which I am running.
The file should look like this:
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

simulationType RAS;

RAS
{
    // Tested with kOmegaSSTF, realizableKE, kOmega, kOmegaSST, v2f,
    // ShihQuadraticKE, LienCubicKE.
    RASModel        kOmegaBSL;

    turbulence      on;

    printCoeffs     on;

    alphaK1         0.5;
}


// ************************************************************************* //
Source:

Last edited by purnp2; May 21, 2019 at 06:03.
purnp2 is offline   Reply With Quote

Old   May 21, 2019, 06:05
Unhappy
  #3
New Member
 
Purn Prakash
Join Date: Nov 2018
Posts: 21
Blog Entries: 1
Rep Power: 2
purnp2 is on a distinguished road
Still looking for a solution on how to change the coefficient by default.
purnp2 is offline   Reply With Quote

Old   May 21, 2019, 15:13
Default
  #4
New Member
 
Purn Prakash
Join Date: Nov 2018
Posts: 21
Blog Entries: 1
Rep Power: 2
purnp2 is on a distinguished road
I found out a solution but I am not sure it the standard way of doing this.

I made another dimensionedScalar alphaK10 and then gave the value of this coefficient to the alphaK1 during run time in the correct() function.

Take a look on (line 83 to 91), and (line 160 to 162) in this updated version of my .C file.
Attached Files
File Type: c kOmegaBSL (update).C (8.4 KB, 0 views)
purnp2 is offline   Reply With Quote

Reply

Tags
coefficients, re-calibrate model

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] Explain about the coefficients in the kOmegaSSTLM turbulence Model ht2017 OpenFOAM Community Contributions 1 April 24, 2019 18:28
How to change model constants with TUI-File? Sarah_Fluent FLUENT 2 January 19, 2018 16:09
use mixture model to simulate two-phase flow with phase change dxm2008 Fluent Multiphase 5 September 7, 2016 14:15
Modifying Turbulence Model Coefficients dsh5400 OpenFOAM Pre-Processing 5 September 1, 2016 03:44
Flash Process / Problem with thermal phase change model Ridley CFX 0 July 21, 2010 07:57


All times are GMT -4. The time now is 19:09.