CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Post-processing of dynamic subgrid-scale model coefficient (https://www.cfd-online.com/Forums/openfoam-programming-development/238056-post-processing-dynamic-subgrid-scale-model-coefficient.html)

Teresa Sun August 20, 2021 04:41

Post-processing of dynamic subgrid-scale model coefficient
 
Dear friends,

I want to plot the dynamic Smagorinsky model coefficient cD which changes over time and space. The software that I am using is OpenFoam/v2006. what I have tried is as follow:

in system/controlDict:

application pimpleFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 1000;

deltaT 0.2;

writeControl timeStep;

writeInterval 200;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

functions
{
fieldAverage1
{
type fieldAverage;
libs (fieldFunctionObjects);
writeControl writeTime;

fields
(
U
{
mean on;
prime2Mean on;
base time;
}

p
{
mean on;
prime2Mean on;
base time;
}
);
}

valueAverage1
{
// Mandatory entries
type valueAverage;
libs (fieldFunctionObjects);
functionObject dynamicQRCoeffs;
fields (cD);

// Optional entries
resetOnRestart false;
window 1;

// Optional (inherited) entries
writePrecision 10;
writeToFile true;
useUserTime true;

region region0;
enabled true;
log true;
timeStart 0;
timeEnd 1000;
executeControl timeStep;
executeInterval 1;
writeControl writeTime;
writeInterval -1;
}

}
the results in directory postProcessing/valueAverage1/0/valueAveragw.dat are:
# Value averages
# Time cD
0.2 n/a
0.4 n/a
0.6 n/a
0.8 n/a
1 n/a
.
.
.
.
.
.
.

Does anyone know how to write the dynamicSmagrosky model coefficient into time directories like U and P, then plot it?

Best regards,
Teresa


All times are GMT -4. The time now is 15:22.