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

Mismatch LES resolution index and PopeIndex

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 13, 2024, 03:46
Default Mismatch LES resolution index and PopeIndex
  #1
New Member
 
Join Date: Nov 2023
Posts: 2
Rep Power: 0
rcombette is on a distinguished road
Hi everyone,


I am doing LES on OpenFoam (using the dynamicKEqn and buoyantBoussinesqPimpleFoam if it matters) and as an indicator for the resolution I am trying to compare the resolved and modeled part of the turbulent kinetic energy. As the formula by Pope: Gamma = kres/(kres+ksgs).


This index can directly be calculated in OpenFoam by using in controlDict:
Code:
PopeCrit 
 {        
     type        resolutionIndex; 
     libs        (fieldFunctionObjects); 
     model       PopeIndex; 
     writeControl        writeTime; 
     includeKnum false; 
}
An additionnal term knum can be included in the equation for Gamma.


Since I could not find a lot of information about the implementation of this index in OpenFoam I wanted to check it and calculate Gamma myself.


Looking at other threads (such as: Uprime2Mean and R (LES)) I believe I can calculate it in Paraview by doing:
Gamma = kres/(kres+k)
wherein, kres = 0.5*sqrt((U_X-UMean_X)^2+(U_Y-UMean_Y)^2+(U_Z-UMean_Z)^2)


Unfortunately, these two fields do not match. They look alike in terms of space distribution but the values are different.


So my question is: what do I misunderstand ? and where does this mismatch comes from ?
And also maybe if you some of have have already used this Pope index and checked its well implementation ?


Thank you !
Robin






-----------------------------
For reference here is how the PopeIndex is coded which seems to do the same thing I do in Paraview:
Code:
bool Foam::resolutionIndexModels::PopeIndex::read(const dictionary& dict)
{
    if (!resolutionIndexModel::read(dict))
    {
        return false;
    }

    includeKnum_ = dict.getOrDefault<bool>("includeKnum", true);
    if (includeKnum_)
    {
        Cn_ = dict.getOrDefault<scalar>("Cnu", 1.0);
    }
    UName_ = dict.getOrDefault<word>("U", "U");
    UMeanName_ = dict.getOrDefault<word>("UMean", "UMean");
    kName_ = dict.getOrDefault<word>("k", "k");
    deltaName_ = dict.getOrDefault<word>("delta", "delta");

    return true;
}


bool Foam::resolutionIndexModels::PopeIndex::execute()
{
    // Calculate resolved k field
    const auto& U = getOrReadField<volVectorField>(UName_);
    const auto& UMean = getOrReadField<volVectorField>(UMeanName_);
    const volScalarField kRes(0.5*magSqr(U - UMean));

    // Calculate subgrid-scale k field
    const auto& kSgs = getOrReadField<volScalarField>(kName_);

    // Calculate total k field
    tmp<volScalarField> tkTot = kRes + kSgs;
    if (includeKnum_)
    {
        tkTot.ref() += mag(kNum());
    }
rcombette is offline   Reply With Quote

Old   March 14, 2024, 08:10
Default
  #2
New Member
 
Join Date: Nov 2023
Posts: 2
Rep Power: 0
rcombette is on a distinguished road
Nevermind, the equation is wrong I don't know why I added the sqrt.
The thread can be deleted
rcombette is offline   Reply With Quote

Reply

Tags
les resolution, pope index


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



All times are GMT -4. The time now is 16:30.