Updated function object documentation

This commit is contained in:
andy
2012-08-13 17:36:58 +01:00
parent c74987549b
commit f3d8e5316c
14 changed files with 503 additions and 164 deletions

View File

@ -39,7 +39,7 @@ Description
{
type cloudInfo;
functionObjectLibs ("libcloudFunctionObjects.so");
...
clouds
(
kinematicCloud1
@ -60,8 +60,8 @@ Description
The output data of each cloud is written to a file named \<cloudName\>.dat
SeeAlso
functionObject.H
OutputFilterFunctionObject.H
Foam::functionObject
Foam::OutputFilterFunctionObject
SourceFiles
cloudInfo.C

View File

@ -67,11 +67,9 @@ Description
{
type fieldAverage;
functionObjectLibs ("libfieldFunctionObjects.so");
...
resetOnRestart true;
resetOnOutput false;
fields
(
U
@ -104,8 +102,8 @@ Note
To employ the \c prime2Mean option, the \c mean option must be selecetd.
SeeAlso
functionObject.H
OutputFilterFunctionObject.H
Foam::functionObject
Foam::OutputFilterFunctionObject
SourceFiles
fieldAverage.C

View File

@ -36,21 +36,15 @@ Description
\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);
@ -60,7 +54,17 @@ Description
}
\endverbatim
\heading Function object usage
\table
Property | Description | Required | Default value
type | type name: fieldCoordinateSystemTransform | yes |
fields | list of fields to be transformed |yes |
coordinateSystem | local co-ordinate system | yes |
\endtable
SeeAlso
Foam::functionObject
Foam::OutputFilterFunctionObject
Foam::coordinateSystem
SourceFiles

View File

@ -28,13 +28,44 @@ Group
grpFieldFunctionObjects
Description
Calculates scalar minimim and maximum field values.
This function object calculates the value and position of scalar minimim
and maximum for a list of user-specified fields. For variables with a rank
greater than zero, either the min/max of a component value or the magnitude
is reported. When operating in parallel, the processor owning the value
is also given.
For variables with rank > 0, computes the magnitude of the min/max
values.
Example of function object specification:
\verbatim
fieldMinMax1
{
type fieldMinMax;
functionObjectLibs ("libfieldFunctionObjects.so");
...
write yes;
log yes;
mode magnitude;
fields
(
U
p
);
}
\endverbatim
Data written to the file \<timeDir\>/fieldMinMax.dat
\heading Function object usage
\table
Property | Description | Required | Default value
type | type name: fieldMinMax | yes |
write | write min/max data to file | no | yes
log | write min/max data to standard output | no | no
mode | calculation mode: magnitude or component | no | magnitude
\endtable
Output data is written to the file \<timeDir\>/fieldMinMax.dat
SeeAlso
Foam::functionObject
Foam::OutputFilterFunctionObject
SourceFiles
fieldMinMax.C

View File

@ -24,39 +24,75 @@ License
Class
Foam::fieldValues::cellSource
Description
Cell source variant of field value function object. Values of user-
specified fields reported for collections of cells.
Group
grpFieldFunctionObjects
cellObj1 // Name also used to identify output folder
Description
This function object provides a 'cell source' variant of the fieldValues
function object. Given a list of user-specified fields and a selection
of mesh cells, a number of operations can be performed, such as sums,
averages and integrations.
Example of function object specification:
\verbatim
cellSource1
{
type cellSource;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
outputControl outputTime;
log true; // log to screen?
valueOutput true; // Write values at run-time output times?
source cellZone; // Type of cell source
...
log true;
valueOutput true;
source cellZone;
sourceName c0;
operation volAverage;
weightField alpha1; // optional weight field
weightField alpha1;
fields
(
p
U
);
}
\endverbatim
where operation is one of:
- none
- sum
- average
- weightedAverage
- volAverage
- volIntegrate
- CoV (Coefficient of variation: standard deviation/mean)
- min
- max
\heading Function object usage
\table
Property | Description | Required | Default value
type | type name: cellSource | yes |
log | write data to standard output | no | no
valueOutput | write the raw output values | yes |
source | cell source: see below | yes |
sourceName | name of cell source if required | no |
operation | operation to perform | yes |
weightField | name of field to apply weighting | no |
fields | list of fields to operate on | yes |
\endtable
\linebreak
Where \c source is defined by
\plaintable
cellZone | requires a 'sourceName' entry to specify the cellZone
all | all cells
\endplaintable
\linebreak
The \c operation is one of:
\plaintable
none | no operation
sum | sum
average | ensemble average
weightedAverage | weighted average
volAverage | volume weighted average
volIntegrate | volume integral
min | minimum
max | maximum
CoV | coefficient of variation: standard deviation/mean
\endplaintable
SeeAlso
Foam::fieldValues
Foam::functionObject
Foam::OutputFilterFunctionObject
SourceFiles
cellSource.C

View File

@ -24,24 +24,32 @@ License
Class
Foam::fieldValues::faceSource
Description
Face source variant of field value function object. Values of user-
specified fields reported for collections of faces.
Group
grpFieldFunctionObjects
Description
This function object provides a 'face source' variant of the fieldValues
function object. Given a list of user-specified fields and a selection
of mesh (or general surface) faces, a number of operations can be
performed, such as sums, averages and integrations.
\linebreak
For example, to calculate the volumetric or mass flux across a patch,
apply the 'sum' operator to the flux field (typically \c phi)
Example of function object specification:
\verbatim
faceObj1 // Name also used to identify output folder
faceSource1
{
type faceSource;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
outputControl outputTime;
log true; // log to screen?
valueOutput true; // Write values at run-time output times?
source faceZone; // Type of face source:
// faceZone,patch,sampledSurface
sourceName f0; // faceZone name, see below
...
log yes;
valueOutput yes;
source faceZone;
sourceName f0;
operation sum;
weightField alpha1; // optional weight field
weightField alpha1;
fields
(
p
@ -51,44 +59,66 @@ Description
}
\endverbatim
source:
- faceZone : requires a 'sourceName' entry to specify the faceZone
- patch : "" patch
- sampledSurface : requires a 'sampledSurfaceDict' subdictionary. See e.g.
sampleDict.
\heading Function object usage
\table
Property | Description | Required | Default value
type | type name: faceSource | yes |
log | write data to standard output | no | no
valueOutput | write the raw output values | yes |
source | face source: see below | yes |
sourceName | name of face source if required | no |
operation | operation to perform | yes |
weightField | name of field to apply weighting | no |
fields | list of fields to operate on | yes |
\endtable
operation is one of:
- none
- sum
- average (ensemble)
- weightedAverage
- areaAverage
- areaIntegrate
- min
- max
- CoV (Coefficient of variation: standard deviation/mean)
- areaNormalAverage (vector with first component (average of) inproduct
of value and face area vector)
- areaNormalIntegrate ( ,, ,, (sum of) ,,
\linebreak
Where \c source is defined by
\plaintable
faceZone | requires a 'sourceName' entry to specify the faceZone
patch | requires a 'sourceName' entry to specify the patch
sampledSurface | requires a 'sampledSurfaceDict' sub-dictionary
\endplaintable
For example, to calculate the volumetric or mass flux across a patch,
apply the 'sum' operator to the flux field (typically \c phi)
\linebreak
The \c operation is one of:
\plaintable
none | no operation
sum | sum
average | ensemble average
weightedAverage | weighted average
areaAverage | area weighted average
areaIntegrate | area integral
min | minimum
max | maximum
CoV | coefficient of variation: standard deviation/mean
areaNormalAverage| area weighted average in face normal direction
areaNormalIntegrate | area weighted integral in face normal directon
\endplaintable
Note
- The values reported by the areaNormalAverage and areaNormalIntegrate
operations are written as the first component of a field with the same
rank as the input field.
- faces on empty patches get ignored
- if the field is a volField the \c faceZone can only consist of boundary
faces
- all fields get oriented according to the \c faceZone (so you might
- all fields are oriented according to the \c faceZone (so you might
e.g. see negative pressure)
- using \c sampledSurfaces:
- they do not do surface fields
- not available for surface fields
- if interpolate=true they use \c interpolationCellPoint
otherwise they use cell values
- each triangle in \c sampledSurface is logically only in one cell
so interpolation will be wrong when triangles are larger than
cells. This can only happen for sampling on \c triSurfaceMesh
cells. This can only happen for sampling on a \c triSurfaceMesh
- take care when using isoSurfaces - these might have duplicate
triangles so integration might be wrong
triangles and so integration might be wrong
SeeAlso
Foam::fieldValues
Foam::functionObject
Foam::OutputFilterFunctionObject
SourceFiles
faceSource.C

View File

@ -28,30 +28,41 @@ Group
grpFieldFunctionObjects
Description
Samples near-patch volFields
This function object samples near-patch volume fields
Holds fields
- every timestep the field get updated with new values
- at write it writes the fields
so this functionObject can either be used to calculate a new field
as a postprocessing step or (since the fields are registered)
use these in another functionObject (e.g. faceSource).
Fields are stored
- every time step the field is updated with new values
- at output it writes the fields
surfaceValues
This functionObject can either be used
- to calculate a new field as a post-processing step or
- since the fields are registered, used in another functionObject
Example of function object specification:
\verbatim
nearWallFields1
{
type nearWallFields;
..
enabled true;
outputControl outputTime;
..
// Name of volField and corresponding surfaceField
functionObjectLibs ("libfieldFunctionObjects.so");
...
fields ((p pNear)(U UNear));
// Name of patch to sample
patches (movingWall);
// Distance away from the wall
distance 0.13; // distance away from wall
distance 0.13;
}
\endverbatim
\heading Function object usage
\table
Property | Description | Required | Default value
type | type name: nearWallFields | yes |
fields | list of fields with correspoding output field names | yes |
patches | list of patches to sample | yes |
distance | distance from patch to sample | yes |
\endtable
SeeAlso
Foam::functionObject
Foam::OutputFilterFunctionObject
SourceFiles
nearWallFields.C

View File

@ -28,8 +28,28 @@ Group
grpFieldFunctionObjects
Description
Writes a scalar field whose value is the local processor ID. Output
field name is processorID.
This function object writes a scalar field whose value is the local
processor ID. The output field name is 'processorID'.
Example of function object specification:
\verbatim
processorField1
{
type processorField;
functionObjectLibs ("libfieldFunctionObjects.so");
...
}
\endverbatim
\heading Function object usage
\table
Property | Description | Required | Default value
type | type name: processorField | yes |
\endtable
SeeAlso
Foam::functionObject
Foam::OutputFilterFunctionObject
SourceFiles
processorField.C

View File

@ -28,8 +28,34 @@ Group
grpFieldFunctionObjects
Description
Reads fields from the time folders and adds them to the mesh database
for further post-processing.
This function object reads fields from the time folders and adds them to
the mesh database for further post-processing.
Example of function object specification:
\verbatim
readFields1
{
type readFields;
functionObjectLibs ("libfieldFunctionObjects.so");
...
fields
(
U
p
);
}
\endverbatim
\heading Function object usage
\table
Property | Description | Required | Default value
type | type name: readFields | yes |
fields | list of fields to read | no |
\endtable
SeeAlso
Foam::functionObject
Foam::OutputFilterFunctionObject
SourceFiles
readFields.C

View File

@ -28,25 +28,24 @@ Group
grpFieldFunctionObjects
Description
Droplet size distribution calculation.
This function object creates a size distribution via interrogating a
continuous phase fraction field.
Looks up a void-fraction (alpha) field and splits the mesh into regions
Looks up a phase-fraction (alpha) field and splits the mesh into regions
based on where the field is below the threshold value. These
regions ("droplets") can now be analysed.
Regions:
- (debug) write regions as a volScalarField
- (debug) print for all regions the sum of volume and alpha*volume
- print the regions connected to a user-defined set of patches.
(in spray calculation these form the liquid core)
- print the regions with too large volume. These are the 'background'
regions.
- (debug) write regions as a volScalarField
- (debug) print for all regions the sum of volume and alpha*volume
Fields:
- write volScalarField alpha_liquidCore : alpha with outside liquid core
set to 0.
alpha_background : alpha with outside background
set to 0.
Output (volume scalar) fields include:
- alpha_liquidCore : alpha with outside liquid core set to 0
- alpha_background : alpha with outside background set to 0.
Histogram:
- determine histogram of diameter (given minDiameter, maxDiameter, nBins)
@ -55,40 +54,41 @@ Description
- write graph of sum, average and deviation of user-defined fields. For
volVectorFields these are those of the 3 components and the magnitude.
Sample input:
functions
{
regionSizeDistribution
Example of function object specification:
\verbatim
regionSizeDistribution1
{
type regionSizeDistribution;
outputControl timeStep;
outputInterval 1;
// Field to determine regions from
functionObjectLibs ("libfieldFunctionObjects.so");
...
field alpha;
// Patches that provide the liquid core
patches (inlet);
// Delimit alpha regions
threshold 0.4;
// Fields to sample (no need to include alpha)
fields (p U);
// Number of bins for histogram
nBins 100;
// Max droplet diameter
maxDiameter 0.5e-4;
//// Min droplet diameter (default is 0)
//minDiameter 0;
// Writing format
minDiameter 0;
setFormat gnuplot;
}
}
\endverbatim
\heading Function object usage
\table
Property | Description | Required | Default value
type | type name: regionSizeDistribution |yes|
field | phase field to interrogate | yes |
patches | patches from which the liquid core is identified | yes|
threshold | phase fraction applied to delimit regions | yes |
fields | fields to sample | yes |
nBins | number of bins for histogram | yes |
maxDiameter | maximum region equivalent diameter | yes |
minDiameter | minimum region equivalent diameter | no | 0
setFormat | writing format | yes |
\endtable
SeeAlso
Foam::functionObject
Foam::OutputFilterFunctionObject
SourceFiles
regionSizeDistribution.C

View File

@ -28,7 +28,72 @@ Group
grpFieldFunctionObjects
Description
Generation of streamlines. Samples along track of passive particle.
This function object generates streamline data by sampling a set of
user-specified fields along a particle track, transported by a
user-specified velocity field.
Example of function object specification:
\verbatim
streamLine1
{
type streamLine;
functionObjectLibs ("libfieldFunctionObjects.so");
...
setFormat vtk;
UName U;
trackForward yes;
fields
(
U
p
);
lifeTime 10000;
trackLength 1e-3;
nSubCycle 5;
cloudName particleTracks;
seedSampleSet uniform;
uniformCoeffs
{
type uniform;
axis x; //distance;
start (-0.0205 0.0001 0.00001);
end (-0.0205 0.0005 0.00001);
nPoints 100;
}
}
\endverbatim
\heading Function object usage
\table
Property | Description | Required | Default value
type | type name: streamLine | yes |
setFormat | output data type | yes |
UName | tracking velocity field name | yes |
fields | fields to sample | yes |
lifetime | maximum number of particle tracking steps | yes |
trackLength | tracking segment length | no |
nSubCycle | number of tracking steps per cell | no|
cloudName | cloud name to use | yes |
seedSampleSet| seeding method (see below)| yes |
\endtable
\linebreak
Where \c seedSampleSet is typically one of
\plaintable
uniform | uniform particle seeding
cloud | cloud of points
triSurfaceMeshPointSet | points according to a tri-surface mesh
\endplaintable
Note
When specifying the track resolution, the \c trackLength OR \c nSubCycle
option should be used
SeeAlso
Foam::functionObject
Foam::OutputFilterFunctionObject
Foam::sampledSet
Foam::wallBoundedStreamLine
SourceFiles
streamLine.C
@ -83,7 +148,6 @@ class streamLine
//- On/off switch
bool active_;
//- List of fields to sample
wordList fields_;
@ -130,9 +194,10 @@ class streamLine
//- Axis of the sampled points to output
word sampledSetAxis_;
//- File output writer
//- File writer for scalar data
autoPtr<writer<scalar> > scalarFormatterPtr_;
//- File writer for vector data
autoPtr<writer<vector> > vectorFormatterPtr_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,26 +27,39 @@ Class
Group grpFieldFunctionObjects
Description
Linear interpolates volFields to surfaceFields
This function object linearly interpolates volume fields to generate
surface fields
- at write it writes the fields
- it executes every time step
Fields are stored
- every time step the field is updated with new values
- at output it writes the fields
so it can either be used to calculate and write the interpolate or
(since the interpolates are registered) use some other functionObject
to work on them.
This functionObject can either be used
- to calculate a new field as a post-processing step or
- since the fields are registered, used in another functionObject
sampleSomeFields
Example of function object specification:
\verbatim
surfaceInterpolateFields1
{
type surfaceInterpolateFields;
..
enabled true;
outputControl outputTime;
..
// Name of volField and corresponding surfaceField
fields ((p pInterpolate)(U UInterpolate));
functionObjectLibs ("libfieldFunctionObjects.so");
...
fields ((p pNear)(U UNear));
}
\endverbatim
\heading Function object usage
\table
Property | Description | Required | Default value
type | type name: nearWallFields | yes |
fields | list of fields with correspoding output field names | yes |
\endtable
SeeAlso
Foam::functionObject
Foam::OutputFilterFunctionObject
SourceFiles
surfaceInterpolateFields.C

View File

@ -28,13 +28,53 @@ Group
grpFieldFunctionObjects
Description
Stores turbulence fields on the mesh database for further manipulation.
This function object stores turbulence fields on the mesh database for
further manipulation.
Fields are stored as copies of the original, with the prefix
"tubulenceModel::", e.g.
turbulenceModel::R
Example of function object specification:
\verbatim
turbulenceFields1
{
type turbulenceFields;
functionObjectLibs ("libfieldFunctionObjects.so");
...
fields
(
R
devRhoReff
);
}
\endverbatim
\heading Function object usage
\table
Property | Description | Required | Default value
type | type name: processorField | yes |
fields | fields to store (see below) | yes |
\endtable
Where \c fields can include:
\plaintable
R | Stress tensor
devRhoReff |
mut | turbulence viscosity (compressible)
muEff | effective turbulence viscosity (compressible)
alphat | turbulence thermal diffusivity (compressible)
alphaEff | effective turbulence thermal diffusivity (compressible)
devReff |
nut | turbulence viscosity (incompressible)
nuEff | effective turbulence viscosity (incompressible)
\endplaintable
SeeAlso
Foam::functionObject
Foam::OutputFilterFunctionObject
SourceFiles
turbulenceFields.C

View File

@ -28,7 +28,72 @@ Group
grpFieldFunctionObjects
Description
Generation of streamlines. Samples along track of passive particle.
This function object generates streamline data by sampling a set of
user-specified fields along a particle track, transported by a
user-specified velocity field, constrained to a patch.
Example of function object specification:
\verbatim
wallBoundedStreamLine1
{
type wallBoundedStreamLine;
functionObjectLibs ("libfieldFunctionObjects.so");
...
setFormat vtk;
UName UNear;
trackForward yes;
fields
(
UNear
p
);
lifeTime 10000;
trackLength 1e-3;
nSubCycle 5;
cloudName particleTracks;
seedSampleSet patchSeed;
patchSeedCoeffs
{
type patchSeed;
patches (wall);
axis x;
maxPoints 20000;
}
}
\endverbatim
\heading Function object usage
\table
Property | Description | Required | Default value
type | type name: wallBoundedStreamLine| yes |
setFormat | output data type | yes |
UName | tracking velocity field name | yes |
fields | fields to sample | yes |
lifetime | maximum number of particle tracking steps | yes |
trackLength | tracking segment length | no |
nSubCycle | number of tracking steps per cell | no|
cloudName | cloud name to use | yes |
seedSampleSet| seeding method (see below)| yes |
\endtable
\linebreak
Where \c seedSampleSet is typically one of
\plaintable
uniform | uniform particle seeding
cloud | cloud of points
patchSeed | seeding via patch faces
triSurfaceMeshPointSet | points according to a tri-surface mesh
\endplaintable
Note
When specifying the track resolution, the \c trackLength OR \c nSubCycle
option should be used
SeeAlso
Foam::functionObject
Foam::OutputFilterFunctionObject
Foam::sampledSet
Foam::streamLine
SourceFiles
wallBoundedStreamLine.C