Merge branch 'master' of /export/shaggy2/andy/shelob/OpenFOAM/OpenFOAM-dev

This commit is contained in:
andy
2012-08-13 17:39:51 +01:00
18 changed files with 615 additions and 197 deletions

View File

@ -48,6 +48,26 @@ BEGIN {
}
/\\plaintable/ {
flag = 3;
firstRow = 1;
next;
}
/\\endplaintable/ {
if (data != "")
{
printf "<table border="0">\n";
printf data;
printf "</table>\n";
}
data = "";
flag = 0;
next;
}
{
if (flag > 0)
{
@ -88,6 +108,21 @@ BEGIN {
}
}
}
else if (flag == 3)
{
for (i = 0; i <= NF; i++)
{
if (i == 1)
{
data = (data " <td style=\"padding-left: 10px\">"$i"</td>\n");
data = (data " <td style=\"padding-left: 10px; padding-right: 10px;\">:</td>\n");
}
else if (i > 1)
{
data = (data " <td>"$i"</td>\n");
}
}
}
data = (data "</tr>\n");
firstRow = 0;
}

View File

@ -165,6 +165,9 @@ s/.*\*\//\*\//
# convert /heading in source files to bold font and add some space
s#\\heading \(.*\)#<br><b>\1</b>#g
# add a linebreak
s#\\linebreak#<br>#g
}
# -----------------------------------------------------------------------------

View File

@ -28,7 +28,7 @@ Group
grpCloudFunctionObjects
Description
This function object outputs lagrangian cloud information to a file. The
This function object outputs Lagrangian cloud information to a file. The
current outputs include:
- total current number of parcels
- total current mass of parcels
@ -37,13 +37,9 @@ Description
\verbatim
cloudInfo1
{
// Type of functionObject
type cloudInfo;
// Where to load it from (if not already in solver)
type cloudInfo;
functionObjectLibs ("libcloudFunctionObjects.so");
// Clouds to process
...
clouds
(
kinematicCloud1
@ -52,6 +48,21 @@ Description
}
\endverbatim
\heading Function object usage
\table
Property | Description | Required | Default value
type | type name: cloudInfo | yes |
clouds | list of clouds names to process |yes |
\endtable
The output data of each cloud is written to a file named \<cloudName\>.dat
SeeAlso
Foam::functionObject
Foam::OutputFilterFunctionObject
SourceFiles
cloudInfo.C
IOcloudInfo.H

View File

@ -27,9 +27,15 @@ License
\section secFunctionObjects Function objects
OpenFOAM includes a variety of \ref grpFunctionObjects that can be applied during
the calculation, or afterwards using the execFlowFunctionObjects utility. The
range of uses include:
OpenFOAM includes a collection of \ref grpFunctionObjects that offer users the
opportunity to closely manage their computational analyses. These objects can
be applied to manipulate the workflow process, and provide a mechanism to
extract predicted field and derived quantities at run-time. Alternatively,
the actions can be executed afterwards using the \c execFlowFunctionObjects
utility.
<br>
The current range of features comprises of:
- \ref grpCloudFunctionObjects
- \ref grpFieldFunctionObjects
- \ref grpForcesFunctionObjects
@ -40,31 +46,47 @@ range of uses include:
<br>
\subsection secFieldFunctionObjectUsage Using function objects
To employ function objects, additional entries are required in the
Function objects are defined by additional entries in the
$FOAM_CASE/system/controlDict input dictionary. Each object is listed in a
\c functions sub-dictionary entry, e.g.
\c functions sub-dictionary entry, e.g. for `output' type objects:
\verbatim
functions
{
myFunctionObject
myFunctionObject // user-defined name of function object entry
{
type functionObjectType;
libs ("libMyFunctionObjectlib.so");
active yes; // active by default
outputControl outputTime; // output or timeStep
outputInterval 1; // only necessary for outputControl=timeStep
region defaultRegion;
enabled yes;
timeStart 0;
timeEnd 10;
outputControl outputTime;
outputInterval 1;
...
}
}
\endverbatim
Where:
\table
Property | Description | Required | Default value
type | type of function object | yes |
libs | libraries containing object implementation | yes |
region | name of region for multi-region cases | no |
enabled | on/off switch | no | yes
timeStart| start time | no |
timeEnd | end time | no |
outputControl | when to output: either 'outputTime' or 'timeStep'| no | timeStep
outputInterval| steps between output when outputControl=timeStep | no | 1
\endtable
The sub-dictionary name \c myFunctionObject is chosen by the user, and is
often used as the name of the output folder of any generated data. The \c type
entry defines the type of function object properties that follow. Since the
function objects are packaged into separate libraries, the user must tell the
code where to find the function object implementation, identified using the
\c libs entry.
typically used as the name of the output folder for any derived data. The
\c type entry defines the type of function object properties that follow.
Since the function objects are packaged into separate libraries, the user must
tell the code where to find the function object implementation, identified
using the \c libs entry.
\*---------------------------------------------------------------------------*/

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
@ -245,7 +245,7 @@ void Foam::fieldAverage::writeAveragingProperties() const
void Foam::fieldAverage::readAveragingProperties()
{
if (cleanRestart_)
if (resetOnRestart_)
{
Info<< "fieldAverage: starting averaging at time "
<< obr_.time().timeName() << nl << endl;
@ -306,7 +306,7 @@ Foam::fieldAverage::fieldAverage
obr_(obr),
active_(true),
prevTimeIndex_(-1),
cleanRestart_(false),
resetOnRestart_(false),
resetOnOutput_(false),
faItems_(),
meanScalarFields_(),
@ -354,7 +354,7 @@ void Foam::fieldAverage::read(const dictionary& dict)
{
if (active_)
{
dict.readIfPresent("cleanRestart", cleanRestart_);
dict.readIfPresent("resetOnRestart", resetOnRestart_);
dict.readIfPresent("resetOnOutput", resetOnOutput_);
dict.lookup("fields") >> faItems_;

View File

@ -55,29 +55,21 @@ Description
\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
However, the averaging process can be restarted using the \c resetOnRestart
option.
To restart the averaging process after each calculation output time,
the \c resetOnOutput option can be applied.
To restart the averaging process after each calculation output time, use
the \c resetOnOutput option.
Example of function object specification:
\verbatim
fieldAverage1
{
// Type of functionObject
type fieldAverage;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
// Perform a clean restart?
cleanRestart true;
// Reset the averaged fields after they have been written?
...
resetOnRestart true;
resetOnOutput false;
// Fields to be averaged
fields
(
U
@ -96,9 +88,23 @@ Description
}
\endverbatim
\heading Function object usage
\table
Property | Description | Required | Default value
type | type name: fieldAverage | yes |
resetOnRestart | flag to reset the averaging on restart | yes |
resetOnOutput| flag to reset the averaging on output | yes |
fields | list of fields and averaging options | yes |
\endtable
Note
To employ the \c prime2Mean option, the \c mean option must be selecetd.
SeeAlso
Foam::functionObject
Foam::OutputFilterFunctionObject
SourceFiles
fieldAverage.C
fieldAverageTemplates.C
@ -158,10 +164,10 @@ protected:
//- Time at last call, prevents repeated averaging
label prevTimeIndex_;
//- Clean restart flag
Switch cleanRestart_;
//- Reset the averaging process on restart flag
Switch resetOnRestart_;
//- resetOnOutput flag
//- Reset the averaging process on output flag
Switch resetOnOutput_;
//- List of field average items, describing what averages to be

View File

@ -36,21 +36,15 @@ Description
\verbatim
fieldCoordinateSystemTransform1
{
// Type of functionObject
type fieldCoordinateSystemTransform;
// Where to load it from (if not already in solver)
type fieldCoordinateSystemTransform;
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
@ -77,7 +88,7 @@ class dictionary;
class mapPolyMesh;
/*---------------------------------------------------------------------------*\
Class nearWallFields Declaration
Class nearWallFields Declaration
\*---------------------------------------------------------------------------*/
class nearWallFields

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
@ -57,7 +77,7 @@ class dictionary;
class mapPolyMesh;
/*---------------------------------------------------------------------------*\
Class processorField Declaration
Class processorField Declaration
\*---------------------------------------------------------------------------*/
class processorField

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,67 +28,67 @@ 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
based on where the field is below the threshold value. These
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'
- 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)
- write graph of number of droplets per bin
- write graph of sum, average and deviation of droplet volume per bin
- write graph of sum, average and deviation of user-defined fields. For
- 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
Example of function object specification:
\verbatim
regionSizeDistribution1
{
regionSizeDistribution
{
type regionSizeDistribution;
outputControl timeStep;
outputInterval 1;
// Field to determine regions from
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
setFormat gnuplot;
}
type regionSizeDistribution;
functionObjectLibs ("libfieldFunctionObjects.so");
...
field alpha;
patches (inlet);
threshold 0.4;
fields (p U);
nBins 100;
maxDiameter 0.5e-4;
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
@ -117,7 +117,7 @@ class regionSplit;
class polyMesh;
/*---------------------------------------------------------------------------*\
Class regionSizeDistribution Declaration
Class regionSizeDistribution Declaration
\*---------------------------------------------------------------------------*/
class regionSizeDistribution

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));
type surfaceInterpolateFields;
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
@ -72,7 +85,7 @@ class dictionary;
class mapPolyMesh;
/*---------------------------------------------------------------------------*\
Class surfaceInterpolateFields Declaration
Class surfaceInterpolateFields Declaration
\*---------------------------------------------------------------------------*/
class surfaceInterpolateFields

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
@ -60,7 +100,7 @@ class dictionary;
class mapPolyMesh;
/*---------------------------------------------------------------------------*\
Class turbulenceFields Declaration
Class turbulenceFields Declaration
\*---------------------------------------------------------------------------*/
class turbulenceFields

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
@ -63,7 +128,7 @@ class meshSearch;
class sampledSet;
/*---------------------------------------------------------------------------*\
Class wallBoundedStreamLine Declaration
Class wallBoundedStreamLine Declaration
\*---------------------------------------------------------------------------*/
class wallBoundedStreamLine