foamPostProcess: New volAverage and volIntegrate packaged function objects
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)
This commit is contained in:
@ -10,7 +10,7 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#includeEtc "caseDicts/postProcessing/minMax/cellMax.cfg"
|
#includeEtc "caseDicts/postProcessing/volFieldValue/cellMax.cfg"
|
||||||
|
|
||||||
fields (<fieldNames>);
|
fields (<fieldNames>);
|
||||||
|
|
||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#includeEtc "caseDicts/postProcessing/minMax/cellMinMax.cfg"
|
#includeEtc "caseDicts/postProcessing/volFieldValue/volValue.cfg"
|
||||||
|
|
||||||
operation max;
|
operation max;
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#includeEtc "caseDicts/postProcessing/minMax/cellMaxMag.cfg"
|
#includeEtc "caseDicts/postProcessing/volFieldValue/cellMaxMag.cfg"
|
||||||
|
|
||||||
fields (<fieldNames>);
|
fields (<fieldNames>);
|
||||||
|
|
||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#includeEtc "caseDicts/postProcessing/minMax/cellMinMax.cfg"
|
#includeEtc "caseDicts/postProcessing/volFieldValue/volValue.cfg"
|
||||||
|
|
||||||
operation maxMag;
|
operation maxMag;
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#includeEtc "caseDicts/postProcessing/minMax/cellMin.cfg"
|
#includeEtc "caseDicts/postProcessing/volFieldValue/cellMin.cfg"
|
||||||
|
|
||||||
fields (<fieldNames>);
|
fields (<fieldNames>);
|
||||||
|
|
||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#includeEtc "caseDicts/postProcessing/minMax/cellMinMax.cfg"
|
#includeEtc "caseDicts/postProcessing/volFieldValue/volValue.cfg"
|
||||||
|
|
||||||
operation min;
|
operation min;
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#includeEtc "caseDicts/postProcessing/minMax/cellMinMag.cfg"
|
#includeEtc "caseDicts/postProcessing/volFieldValue/cellMinMag.cfg"
|
||||||
|
|
||||||
fields (<fieldNames>);
|
fields (<fieldNames>);
|
||||||
|
|
||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#includeEtc "caseDicts/postProcessing/minMax/cellMinMax.cfg"
|
#includeEtc "caseDicts/postProcessing/volFieldValue/volValue.cfg"
|
||||||
|
|
||||||
operation minMag;
|
operation minMag;
|
||||||
|
|
||||||
17
etc/caseDicts/postProcessing/volFieldValue/volAverage
Normal file
17
etc/caseDicts/postProcessing/volFieldValue/volAverage
Normal 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
|
||||||
|
Writes out the volume-weighted average of one or more fields.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#includeEtc "caseDicts/postProcessing/volFieldValue/volAverage.cfg"
|
||||||
|
|
||||||
|
fields (<fieldNames>);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
13
etc/caseDicts/postProcessing/volFieldValue/volAverage.cfg
Normal file
13
etc/caseDicts/postProcessing/volFieldValue/volAverage.cfg
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#includeEtc "caseDicts/postProcessing/volFieldValue/volValue.cfg"
|
||||||
|
|
||||||
|
operation volAverage;
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
17
etc/caseDicts/postProcessing/volFieldValue/volIntegrate
Normal file
17
etc/caseDicts/postProcessing/volFieldValue/volIntegrate
Normal 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
|
||||||
|
Writes out the volume integral of one or more fields.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#includeEtc "caseDicts/postProcessing/volFieldValue/volIntegrate.cfg"
|
||||||
|
|
||||||
|
fields (<fieldNames>);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
13
etc/caseDicts/postProcessing/volFieldValue/volIntegrate.cfg
Normal file
13
etc/caseDicts/postProcessing/volFieldValue/volIntegrate.cfg
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#includeEtc "caseDicts/postProcessing/volFieldValue/volValue.cfg"
|
||||||
|
|
||||||
|
operation volIntegrate;
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -267,17 +267,6 @@ lagrangianFunctions
|
|||||||
//#includeFunc dsmcFields
|
//#includeFunc dsmcFields
|
||||||
}
|
}
|
||||||
|
|
||||||
minMaxFunctions
|
|
||||||
{
|
|
||||||
#includeFunc cellMin(epsilon)
|
|
||||||
|
|
||||||
#includeFunc cellMax(k)
|
|
||||||
|
|
||||||
#includeFunc cellMinMag(U, writeLocation=yes)
|
|
||||||
|
|
||||||
#includeFunc cellMaxMag(U, writeLocation=yes)
|
|
||||||
}
|
|
||||||
|
|
||||||
numericalFunctions
|
numericalFunctions
|
||||||
{
|
{
|
||||||
#includeFunc residuals(p, U, h, k, epsilon)
|
#includeFunc residuals(p, U, h, k, epsilon)
|
||||||
@ -410,6 +399,21 @@ surfaceFieldValueFunctions
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
volFieldValueFunctions
|
||||||
|
{
|
||||||
|
#includeFunc cellMin(epsilon)
|
||||||
|
|
||||||
|
#includeFunc cellMax(k)
|
||||||
|
|
||||||
|
#includeFunc cellMinMag(U, writeLocation=yes)
|
||||||
|
|
||||||
|
#includeFunc cellMaxMag(U, writeLocation=yes)
|
||||||
|
|
||||||
|
#includeFunc volAverage(p)
|
||||||
|
|
||||||
|
#includeFunc volIntegrate(rho)
|
||||||
|
}
|
||||||
|
|
||||||
functions
|
functions
|
||||||
{
|
{
|
||||||
$combustionFunctions;
|
$combustionFunctions;
|
||||||
@ -419,7 +423,6 @@ functions
|
|||||||
$forcesFunctions;
|
$forcesFunctions;
|
||||||
$graphsFunctions;
|
$graphsFunctions;
|
||||||
$lagrangianFunctions;
|
$lagrangianFunctions;
|
||||||
$minMaxFunctions;
|
|
||||||
$numericalFunctions;
|
$numericalFunctions;
|
||||||
$pressureFunctions;
|
$pressureFunctions;
|
||||||
$probesFunctions;
|
$probesFunctions;
|
||||||
@ -427,6 +430,7 @@ functions
|
|||||||
$streamlinesFunctions;
|
$streamlinesFunctions;
|
||||||
$surfaceFunctions;
|
$surfaceFunctions;
|
||||||
$surfaceFieldValueFunctions;
|
$surfaceFieldValueFunctions;
|
||||||
|
$volFieldValueFunctions;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Reference in New Issue
Block a user