etc/caseDicts/postProcessing/fields/fieldAverage: New functionObject configuration file for field averaging

to support the more convenient #includeFunc specification in both

    #includeFunc fieldAverage(U.air, U.water, alpha.air, p)

and

    #includeFunc fieldAverage(fields = (U.air, U.water, alpha.air, p))

forms.
This commit is contained in:
Henry Weller
2020-03-12 10:11:36 +00:00
parent 57f924feef
commit c60cef9027
3 changed files with 19 additions and 13 deletions

View File

@ -0,0 +1,17 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
-------------------------------------------------------------------------------
Description
Calculates and writes the time averages of given list of fields.
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/fields/fieldAverage.cfg"
fields (<field_names>);
// ************************************************************************* //

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Description Description
Writes out specified objects, e.g. fields, stored on the case database. Writes the specified objects, e.g. fields, stored in the case database.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -53,18 +53,7 @@ maxDeltaT 1;
functions functions
{ {
fieldAverage1 #includeFunc fieldAverage(U.air, U.water, alpha.air, p)
{
#includeEtc "caseDicts/postProcessing/fields/fieldAverage.cfg"
fields
(
U.air
U.water
alpha.air
p
);
}
} }