Skip to content

Commit

Permalink
etc/caseDicts/postProcessing/fields/fieldAverage: New functionObject …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
Henry Weller committed Mar 12, 2020
1 parent 57f924f commit c60cef9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
17 changes: 17 additions & 0 deletions etc/caseDicts/postProcessing/fields/fieldAverage
Original file line number Diff line number Diff line change
@@ -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>);

// ************************************************************************* //
2 changes: 1 addition & 1 deletion etc/caseDicts/postProcessing/fields/writeObjects
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
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.
\*---------------------------------------------------------------------------*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,7 @@ maxDeltaT 1;

functions
{
fieldAverage1
{
#includeEtc "caseDicts/postProcessing/fields/fieldAverage.cfg"

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


Expand Down

0 comments on commit c60cef9

Please sign in to comment.