ENH: Updated function object documentation

This commit is contained in:
andy
2012-07-26 13:00:11 +01:00
parent c4665c5d69
commit 01cf1d6f9e
4 changed files with 102 additions and 32 deletions

View File

@ -33,6 +33,25 @@ Description
- total current number of parcels - total current number of parcels
- total current mass of parcels - total current mass of parcels
Example of function object specification:
\verbatim
cloudInfo1
{
// Type of functionObject
type cloudInfo;
// Where to load it from (if not already in solver)
functionObjectLibs ("libcloudFunctionObjects.so");
// Clouds to process
clouds
(
kinematicCloud1
thermoCloud1
);
}
\endverbatim
SourceFiles SourceFiles
cloudInfo.C cloudInfo.C
IOcloudInfo.H IOcloudInfo.H

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,8 +28,42 @@ Group
grpFieldFunctionObjects grpFieldFunctionObjects
Description Description
Calculates the field averages given list of fieldAverageItems, e.g. This function object calculates average quantities for a user-specified
selection of fields. Fields are entered as a list of sub-dictionaries,
which indicate the type of averages to perform, and can be updated during
the calculation. The current options include:
- \c mean: arithmetic mean:
\f[
\overline{x} = \frac{\Sigma x i}{\Sigma i}
\f]
- \c prime2Mean: prime-squared mean
\f[
\overline{x'}^2 = \frac{\Sigma (x - \overline{x}) i}{\Sigma i}
\f]
- base: average over 'time', or 'iteration' (\f$i\f$ in the above)
- window: optional averaging window, specified in 'base' units
\note
To employ the \c prime2Mean option, the \c mean option must be selecetd.
Average field names are constructed by concatenating the base field with
the averaging type, e.g. when averaging field 'U', the resultant fields
are:
- arithmetic mean field, UMean
- prime-squared field, UPrime2Mean
Information regarding the number of averaging steps, and total averaging
time are written on a per-field basis to the
\c fieldAveragingProperties dictionary, located in \<time\>/uniform
When restarting form a previous calculation, the averaging is continuous.
However, the averaging process can be restarted using the \c cleanRestart
option.
To restart the averaging process after each calculation output time,
the \c resetOnOutput option can be applied.
Example of function object specification:
\verbatim \verbatim
fieldAverage1 fieldAverage1
{ {
@ -39,16 +73,13 @@ Description
// Where to load it from (if not already in solver) // Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so"); functionObjectLibs ("libfieldFunctionObjects.so");
// Whether to perform a clean restart, or start from previous // Perform a clean restart?
// averaging info if available
cleanRestart true; cleanRestart true;
// Whether to reset the averaged fields after they have been written. // Reset the averaged fields after they have been written?
// Used to average over only the preceding write interval for transient resetOnOutput false;
// cases.
resetOnOutput true;
// Fields to be averaged. runTime modifiable! // Fields to be averaged
fields fields
( (
U U
@ -67,22 +98,10 @@ Description
} }
\endverbatim \endverbatim
Member function calcAverages() calculates the averages.
Member function fieldAverage::write() calls calcAverages(). Average
field names are constructed by concatenating the base field with the
averaging type, e.g.
- base field, U
- arithmetic mean field, UMean
- prime-squared field, UPrime2Mean
Information regarding the number of averaging steps, and total averaging
time are written on a (base) per-field basis to the
fieldAveragingProperties dictionary, located in \<time\>/uniform
SourceFiles SourceFiles
fieldAverage.C fieldAverage.C
fieldAverageTemplates.C fieldAverageTemplates.C
fieldAverageItem.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -28,8 +28,40 @@ Group
grpFieldFunctionObjects grpFieldFunctionObjects
Description Description
Transforms fields from global cartesian co-ordinates to local co-ordinate This function object transforms a user-specified selection of fields from
system global Cartesian co-ordinates to a local co-ordinate system. The fields
are run-time modifiable.
Example of function object specification:
\verbatim
fieldCoordinateSystemTransform1
{
// Type of functionObject
type fieldCoordinateSystemTransform;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
// Fields to be transformed
fields
(
U
UMean
UPrime2Mean
);
// Co-ordinate system
coordinateSystem
{
origin (0.001 0 0);
e1 (1 0.15 0);
e3 (0 0 -1);
}
}
\endverbatim
SeeAlso
Foam::coordinateSystem
SourceFiles SourceFiles
fieldCoordinateSystemTransform.C fieldCoordinateSystemTransform.C