tutorials/incompressibleFluid/pitzDailySteady: Added strainRate coded functionObject
to demonstrate how easy it is to add field post-processing to cases.
This commit is contained in:
@ -63,6 +63,8 @@ functions
|
|||||||
)
|
)
|
||||||
|
|
||||||
#includeFunc writeObjects(kEpsilon:G)
|
#includeFunc writeObjects(kEpsilon:G)
|
||||||
|
|
||||||
|
#includeFunc strainRate(writeControl=writeTime)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -0,0 +1,32 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
type coded;
|
||||||
|
|
||||||
|
// Load the library containing the 'coded' functionObject
|
||||||
|
libs ("libutilityFunctionObjects.so");
|
||||||
|
|
||||||
|
name strainRate;
|
||||||
|
|
||||||
|
codeInclude
|
||||||
|
#{
|
||||||
|
#include "fvcGrad.H"
|
||||||
|
#};
|
||||||
|
|
||||||
|
codeWrite
|
||||||
|
#{
|
||||||
|
const volVectorField& U(mesh().lookupObject<volVectorField>("U"));
|
||||||
|
|
||||||
|
volScalarField::New
|
||||||
|
(
|
||||||
|
"strainRate",
|
||||||
|
sqrt(2.0)*mag(symm(fvc::grad(U)))
|
||||||
|
)->write();
|
||||||
|
#};
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user