These additions mean that the volume-weighted average or volume integral
of a field can be conveniently post-processed. This can be done
interactively using foamPostProcess:
foamPostProcess -func "volAverage(U)"
foamPostProcess -func "volIntegrate(rho)"
Or at run-time by adding to the functions sub-section of the
controlDict:
#includeFunc volAverage(U)
#includeFunc volIntegrate(rho)
18 lines
721 B
C++
18 lines
721 B
C++
/*--------------------------------*- C++ -*----------------------------------*\
|
|
========= |
|
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
\\ / O peration | Website: https://openfoam.org
|
|
\\ / A nd | Version: dev
|
|
\\/ M anipulation |
|
|
-------------------------------------------------------------------------------
|
|
Description
|
|
Writes out the volume integral of one or more fields.
|
|
|
|
\*---------------------------------------------------------------------------*/
|
|
|
|
#includeEtc "caseDicts/postProcessing/volFieldValue/volIntegrate.cfg"
|
|
|
|
fields (<fieldNames>);
|
|
|
|
// ************************************************************************* //
|