caseDicts/postProcessing: Added triSurfaceAverage packaged function object
This is a packaged function object that conveniently computes averages
of fields on tri-surfaces. It can be executed on the command line as
follows:
foamPostProcess -func "triSurfaceAverage(name=mid.obj, p)"
This will compute the average of the field "p" on a surface file in
"constant/geometry/mid.obj".
The calculation could also be done at run-time by adding the following
entry to the functions section of the system/controlDict
#includeFunc triSurfaceAverage(name=mid.obj, p)
This commit is contained in:
@ -0,0 +1,23 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Description
|
||||||
|
Calculates the average on a specified triangulated surface by interpolating
|
||||||
|
onto the triangles and integrating over the surface area. Triangles need to
|
||||||
|
be small (<= cell size) for an accurate result.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
name <triSurfaceFileName>;
|
||||||
|
|
||||||
|
fields (<fieldNames>);
|
||||||
|
|
||||||
|
operation areaAverage;
|
||||||
|
|
||||||
|
#includeEtc "caseDicts/postProcessing/surfaceFieldValue/triSurfaceValue.cfg"
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -398,6 +398,8 @@ surfaceFieldValueFunctions
|
|||||||
|
|
||||||
#includeFunc faceZoneFlowRate(name=f0)
|
#includeFunc faceZoneFlowRate(name=f0)
|
||||||
|
|
||||||
|
#includeFunc triSurfaceAverage(name=mid.obj, p)
|
||||||
|
|
||||||
#includeFunc triSurfaceVolumetricFlowRate(name=mid.obj)
|
#includeFunc triSurfaceVolumetricFlowRate(name=mid.obj)
|
||||||
|
|
||||||
#includeFunc triSurfaceDifference
|
#includeFunc triSurfaceDifference
|
||||||
|
|||||||
Reference in New Issue
Block a user