|
[Sponsors] |
March 13, 2024, 03:46 |
Mismatch LES resolution index and PopeIndex
|
#1 |
New Member
Join Date: Nov 2023
Posts: 2
Rep Power: 0 |
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; } 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()); } |
|
March 14, 2024, 08:10 |
|
#2 |
New Member
Join Date: Nov 2023
Posts: 2
Rep Power: 0 |
Nevermind, the equation is wrong I don't know why I added the sqrt.
The thread can be deleted |
|
Tags |
les resolution, pope index |
Thread Tools | Search this Thread |
Display Modes | |
|
|