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 Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 17, 2019, 11:44
Arrow How to change a coefficient to re-calibrate an existing turbulence model
  #1
New Member
 
Purn Prakash
Join Date: Nov 2018
Posts: 27
Blog Entries: 1
Rep Power: 8
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, 4 views)

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

Old   May 17, 2019, 20:30
Default Solution
  #2
New Member
 
Purn Prakash
Join Date: Nov 2018
Posts: 27
Blog Entries: 1
Rep Power: 8
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 07:03.
purnp2 is offline   Reply With Quote

Old   May 21, 2019, 07:05
Unhappy
  #3
New Member
 
Purn Prakash
Join Date: Nov 2018
Posts: 27
Blog Entries: 1
Rep Power: 8
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, 16:13
Default
  #4
New Member
 
Purn Prakash
Join Date: Nov 2018
Posts: 27
Blog Entries: 1
Rep Power: 8
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, 9 views)
purnp2 is offline   Reply With Quote

Reply

Tags
coefficients, re-calibrate model


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
How to change model constants with TUI-File? Sarah_Fluent FLUENT 4 August 24, 2020 01:04
[Other] Explain about the coefficients in the kOmegaSSTLM turbulence Model ht2017 OpenFOAM Community Contributions 2 April 23, 2020 04:55
use mixture model to simulate two-phase flow with phase change dxm2008 Fluent Multiphase 5 September 7, 2016 15:15
Modifying Turbulence Model Coefficients dsh5400 OpenFOAM Pre-Processing 5 September 1, 2016 04:44
Flash Process / Problem with thermal phase change model Ridley CFX 0 July 21, 2010 08:57


All times are GMT -4. The time now is 06:51.