CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] run-time post processing - y+ - swakExpression (https://www.cfd-online.com/Forums/openfoam-community-contributions/134860-run-time-post-processing-y-swakexpression.html)

aylalisa May 6, 2014 09:29

run-time post processing - y+ - swakExpression
 
Dear Foamers,


can I compute a volScalarField with help of functionObjects?

yPlusLES_FO
{
type swakExpression;
valueType internalField;
variables (
"rho=998;"
"y=dist();"
"wSS=mag(wallShearStress);"
);
//accumulations (
// ?
//);
expression "(y*(sqrt(wSS)/rho)))/nu";
verbose true;
outputControlMode timeStep;
outputInterval 1;
}

If I comment out 'accumulations' I get an error but since I would like to get a volume scalar field as result I think I can not average or sum the result values?!


Each kind of support is appreciated!

Aylalisa

gschaider May 6, 2014 15:02

Quote:

Originally Posted by aylalisa (Post 490126)
Dear Foamers,


can I compute a volScalarField with help of functionObjects?

yPlusLES_FO
{
type swakExpression;
valueType internalField;
variables (
"rho=998;"
"y=dist();"
"wSS=mag(wallShearStress);"
);
//accumulations (
// ?
//);
expression "(y*(sqrt(wSS)/rho)))/nu";
verbose true;
outputControlMode timeStep;
outputInterval 1;
}

If I comment out 'accumulations' I get an error but since I would like to get a volume scalar field as result I think I can not average or sum the result values?!


Each kind of support is appreciated!

Aylalisa

swakExpression is designed to only calculate single numbers. You want a field to postprocess in paraview right? In that case use the expressionField-function object.

Anyway: y+ is a thing of the wall and therefor an internalField is not the best choice. What might be better is readAndUpdateField (have a look at Examples/other/angledDuctImplicit/system/controlDict and Examples/FromPresentations/OSCFD_cleaningTank3D/system/controlDict for examples): there you define a special field with groovyBCs (in your case the y+-expression. I think you'll want to use delta() for the distance). That field is read in and the boundary conditions are updated at every timestep. In PV you'll have to read in the patch values as well and then use "Extract Block"

aylalisa May 9, 2014 08:01

Thank you very much for your support! I'll try to follow your instructions.


All times are GMT -4. The time now is 14:29.