functionObjects: Update documentation

This commit is contained in:
Henry Weller 2016-07-09 22:08:11 +01:00
parent 08bd802b42
commit 6a8bac9235
11 changed files with 63 additions and 557 deletions

View File

@ -1,85 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application XXX;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 0.1;
deltaT 1e-05;
writeControl timeStep;
writeInterval 10;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
functions
{
fieldAverage1
{
// Type of functionObject
type fieldAverage;
// Where to load it from (if not already in solver)
libs ("libfieldFunctionObjects.so");
// Function object enabled flag
enabled true;
// When to output the average fields
writeControl writeTime;
// Fields to be averaged - runTime modifiable
fields
(
U
{
mean on;
prime2Mean on;
base time;
window 0.01; // optional averaging window
}
p
{
mean on;
prime2Mean on;
base time;
window 0.01; // optional averaging window
}
);
}
}
// ************************************************************************* //

View File

@ -70,11 +70,14 @@ Description
{
type fieldAverage;
libs ("libfieldFunctionObjects.so");
...
writeControl writeTime;
restartOnRestart false;
restartOnOutput false;
periodicRestart false;
restartPeriod 0.002;
fields
(
U
@ -97,13 +100,13 @@ Description
Usage
\table
Property | Description | Required | Default value
type | type name: fieldAverage | yes |
Property | Description | Required | Default value
type | type name: fieldAverage | yes |
restartOnRestart | Restart the averaging on restart | no | no
restartOnOutput | Restart the averaging on output | no | no
periodicRestart | Periodically restart the averaging | no | no
restartPeriod | Periodic restart period | conditional |
fields | list of fields and averaging options | yes |
periodicRestart | Periodically restart the averaging | no | no
restartPeriod | Periodic restart period | conditional |
fields | list of fields and averaging options | yes |
\endtable

View File

@ -1,129 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 0.5;
deltaT 0.005;
writeControl timeStep;
writeInterval 20;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
functions
{
faceObj1
{
type surfaceRegion;
libs ("libfieldFunctionObjects.so");
enabled true;
writeControl writeTime;
// Output to log&file (true) or to file only
log true;
// Output field values as well
writeFields true;
// Type of region: patch/faceZone/sampledSurface
regionType patch;
// if patch or faceZone: name of patch or faceZone
name movingWall;
//// if sampledSurface: dictionary with a sampledSurface
//// Note: will not sample surface fields.
//sampledSurfaceDict
//{
// // Sampling on triSurface
// type sampledTriSurfaceMesh;
// surface integrationPlane.stl;
// regionType cells; // sample cells or boundaryFaces
// interpolate true;
//}
// Operation: areaAverage/sum/weightedAverage ...
operation areaAverage;
fields
(
p
phi // surface fields not supported for sampledSurface
U
);
}
faceObj2
{
type surfaceRegion;
libs ("libfieldFunctionObjects.so");
enabled true;
writeControl writeTime;
log true;
writeFields true;
regionType faceZone;
name f0;
operation sum;
fields
(
phi
);
}
cellObj1
{
type volRegion;
libs ("libfieldFunctionObjects.so");
enabled true;
writeControl writeTime;
log true;
writeFields true;
regionType cellZone;
name c0;
operation volAverage;
fields
(
p
U
);
}
}
// ************************************************************************* //

View File

@ -37,20 +37,47 @@ Description
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:
Examples of function object specification:
\verbatim
movingWallPatch
{
type surfaceRegion;
libs ("libfieldFunctionObjects.so");
log true;
writeControl writeTime;
writeFields true;
regionType patch;
name movingWall;
operation areaAverage;
fields
(
p
phi
U
);
}
surfaceRegion1
{
type surfaceRegion;
libs ("libfieldFunctionObjects.so");
...
log yes;
log true;
writeControl writeTime;
writeFields true;
surfaceFormat none;
regionType faceZone;
name f0;
operation sum;
weightField alpha1;
fields
(
p

View File

@ -41,13 +41,17 @@ Description
{
type volRegion;
libs ("libfieldFunctionObjects.so");
...
log true;
writeControl writeTime;
writeFields true;
regionType cellZone;
name c0;
operation volAverage;
weightField alpha1;
fields
(
p

View File

@ -1,78 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 0.5;
deltaT 0.005;
writeControl timeStep;
writeInterval 20;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
functions
{
near
{
// Where to load it from
libs ("libfieldFunctionObjects.so");
type nearWallFields;
// Output every
writeControl writeTime; //timeStep;
//writeInterval 5;
// Fields to be sampled. Per field original name and mapped field to
// create.
// Note: fields only get updated when writing!
fields
(
(p pNear)
(U UNear)
);
// Patches to sample (regular expressions)
patches ("movingWall");
// Distance to sample
distance 0.009;
}
}
// ************************************************************************* //

View File

@ -44,9 +44,17 @@ Description
{
type nearWallFields;
libs ("libfieldFunctionObjects.so");
...
fields ((p pNear)(U UNear));
writeControl writeTime;
fields
(
(p pNear)
(U UNear)
);
patches (movingWall);
distance 0.13;
}
\endverbatim

View File

@ -1,103 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 0.5;
deltaT 0.005;
writeControl timeStep;
writeInterval 20;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
functions
{
streamLines
{
type streamLine;
// Where to load it from (if not already in solver)
libs ("libfieldFunctionObjects.so");
// Output every
writeControl writeTime;
// writeInterval 10;
setFormat vtk; // gnuplot, raw etc.
// Interpolation method. Default is cellPoint.
// interpolationScheme pointMVC;
// Tracked forwards (+U) or backwards (-U)
trackForward true;
// Names of fields to sample. Should contain above velocity field!
fields (p U);
// Steps particles can travel before being removed
lifeTime 10000;
//- Specify either absolute length of steps (trackLength) or a number
// of subcycling steps per cell (nSubCycle)
// Size of single track segment [m]
//trackLength 1e-3;
// Number of steps per cell (estimate). Set to 1 to disable
// subcycling.
nSubCycle 5;
// Cloud name to use
cloudName particleTracks;
// Seeding method.
seedSampleSet uniform; // cloud; //triSurfaceMeshPointSet;
uniformCoeffs
{
type uniform;
axis x; //distance;
start (-0.0205 0.0001 0.00001);
end (-0.0205 0.0005 0.00001);
nPoints 100;
}
}
}
// ************************************************************************* //

View File

@ -37,7 +37,9 @@ Description
{
type streamLine;
libs ("libfieldFunctionObjects.so");
...
writeControl writeTime;
setFormat vtk;
trackForward yes;
fields

View File

@ -1,148 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 0.5;
deltaT 0.005;
writeControl timeStep;
writeInterval 20;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
functions
{
readFields
{
// Where to load it from (if not already in solver)
libs ("libfieldFunctionObjects.so");
type readFields;
fields (p U k);
}
near
{
// Where to load it from
libs ("libfieldFunctionObjects.so");
type nearWallFields;
// Output every
writeControl writeTime;
//writeInterval 1;
// Fields to be sampled. Per field original name and mapped field to
// create.
fields
(
(U UNear)
);
// Patches/groups to sample (regular expressions)
patches (motorBike);
// Distance to sample
distance 0.001;
}
streamLines
{
// Where to load it from (if not already in solver)
libs ("libfieldFunctionObjects.so");
type wallBoundedStreamLine;
// Output every
writeControl timeStep; //writeTime;
// writeInterval 10;
setFormat vtk; //gnuplot; //xmgr; //raw; //jplot;
// Velocity field to use for tracking.
U UNear;
// Interpolation method. Default is cellPoint.
// interpolationScheme pointMVC;
// Tracked forwards (+U) or backwards (-U)
trackForward true;
interpolationScheme cellPoint;
// Names of fields to sample. Should contain above velocity field!
fields (p U k UNear);
// Steps particles can travel before being removed
lifeTime 100;
// Optional absolute length of steps (trackLength)
// Size of single track segment [m]
//trackLength 1e-3;
// Cloud name to use
cloudName particleTracks;
// Seeding method.
seedSampleSet patchSeed; //cloud; //triSurfaceMeshPointSet;
uniformCoeffs
{
type uniform;
axis x; //distance;
start (0.0035 0.0999 0.0001);
end (0.0035 0.0999 0.0099);
nPoints 20;
}
cloudCoeffs
{
type cloud;
axis x; //distance;
points ((0.351516548679288 -0.0116085375585099 1.24));
}
patchSeedCoeffs
{
type patchSeed;//patchCloud; //cloud; //uniform;
patches (motorBike);
axis x; //distance;
maxPoints 20000;
}
}
}
// ************************************************************************* //

View File

@ -38,19 +38,24 @@ Description
{
type wallBoundedStreamLine;
libs ("libfieldFunctionObjects.so");
...
writeControl writeTime;
setFormat vtk;
U UNear;
trackForward yes;
fields
(
UNear
p
);
lifeTime 10000;
trackLength 1e-3;
nSubCycle 5;
cloudName particleTracks;
seedSampleSet patchSeed;
patchSeedCoeffs
{