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. More...
Public Member Functions | |
TypeName ("streamLine") | |
Runtime type information. More... | |
streamLine (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false) | |
Construct for given objectRegistry and dictionary. More... | |
virtual | ~streamLine () |
Destructor. More... | |
virtual void | read (const dictionary &) |
Read settings. More... | |
virtual void | track () |
Do the actual tracking to fill the track data. More... | |
![]() | |
TypeName ("streamLineBase") | |
Runtime type information. More... | |
streamLineBase (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false) | |
Construct for given objectRegistry and dictionary. More... | |
virtual | ~streamLineBase () |
Destructor. More... | |
virtual void | execute () |
Execute the averaging. More... | |
virtual void | end () |
Execute the averaging at the final time-loop, currently does nothing. More... | |
virtual void | timeSet () |
Called when time was set at the end of the Time::operator++. More... | |
virtual void | write () |
Track and write. More... | |
virtual void | updateMesh (const mapPolyMesh &) |
Update for changes of mesh. More... | |
virtual void | movePoints (const polyMesh &) |
Update for mesh point-motion. More... | |
![]() | |
functionObjectState (const objectRegistry &obr, const word &name) | |
Construct from components. More... | |
virtual | ~functionObjectState () |
Destructor. More... | |
const word & | name () const |
Return the name. More... | |
bool | active () const |
Return the active flag. More... | |
const IOdictionary & | stateDict () const |
Return access to the state dictionary. More... | |
dictionary & | propertyDict () |
Return access to the property dictionary. More... | |
template<class Type > | |
bool | setActive () |
Set the active status by querying objectRegistry type. More... | |
bool | foundProperty (const word &entryName) const |
Return true if the property exists. More... | |
template<class Type > | |
Type | getProperty (const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const |
Retrieve generic property. More... | |
template<class Type > | |
void | getProperty (const word &entryName, Type &value) const |
Retrieve generic property. More... | |
template<class Type > | |
void | setProperty (const word &entryName, const Type &value) |
Add generic property. More... | |
template<class Type > | |
Type | getObjectProperty (const word &objectName, const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const |
Retrieve generic property from named object. More... | |
template<class Type > | |
void | getObjectProperty (const word &objectName, const word &entryName, Type &value) const |
Retrieve generic property from named object. More... | |
template<class Type > | |
void | setObjectProperty (const word &objectName, const word &entryName, const Type &value) |
Add generic property from named object. More... | |
template<class Type > | |
void | setResult (const word &entryName, const Type &value) |
Add result. More... | |
template<class Type > | |
void | setObjectResult (const word &objectName, const word &entryName, const Type &value) |
Add result from named object. More... | |
template<class Type > | |
Type | getResult (const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const |
Retrieve result. More... | |
template<class Type > | |
Type | getObjectResult (const word &objectName, const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const |
Retrieve result from named object. More... | |
template<class Type > | |
void | getObjectResult (const word &objectName, const word &entryName, Type &value) const |
Retrieve result from named object. More... | |
word | resultType (const word &entryName) const |
Retrieve the result type. More... | |
word | objectResultType (const word &objectName, const word &entryName) const |
Return the type of result. More... | |
List< word > | objectResultEntries () const |
Retrieve the result entries. More... | |
List< word > | objectResultEntries (const word &objectName) const |
Return result entries for named object. More... | |
Private Member Functions | |
streamLine (const streamLine &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const streamLine &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
label | nSubCycle_ |
Number of subcycling steps. More... | |
Additional Inherited Members | |
![]() | |
autoPtr< indirectPrimitivePatch > | wallPatch () const |
Construct patch out of all wall patch faces. More... | |
void | initInterpolations (const label nSeeds, label &UIndex, PtrList< volScalarField > &vsFlds, PtrList< interpolation< scalar > > &vsInterp, PtrList< volVectorField > &vvFlds, PtrList< interpolation< vector > > &vvInterp) |
Initialise fields, interpolators and track storage. More... | |
void | storePoint (const label trackI, const scalar w, const label leftI, const label rightI, DynamicList< point > &newTrack, DynamicList< List< scalar > > &newScalars, DynamicList< List< vector > > &newVectors) const |
Generate point and values by interpolating from existing values. More... | |
void | trimToBox (const treeBoundBox &bb, const label trackI, PtrList< DynamicList< point > > &newTracks, PtrList< DynamicList< scalarList > > &newScalars, PtrList< DynamicList< vectorList > > &newVectors) const |
Trim and possibly split a track. More... | |
void | trimToBox (const treeBoundBox &bb) |
Trim tracks to bounding box. More... | |
![]() | |
functionObjectState (const functionObjectState &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const functionObjectState &) |
Disallow default bitwise assignment. More... | |
![]() | |
dictionary | dict_ |
Input dictionary. More... | |
const objectRegistry & | obr_ |
Database this class is registered to. More... | |
bool | loadFromFiles_ |
Load fields from files (not from objectRegistry) More... | |
Switch | log_ |
Switch to send output to Info as well as to file. More... | |
wordList | fields_ |
List of fields to sample. More... | |
word | UName_ |
Field to transport particle with. More... | |
word | interpolationScheme_ |
Interpolation scheme to use. More... | |
bool | trackForward_ |
Whether to use +u or -u. More... | |
label | lifeTime_ |
Maximum lifetime (= number of cells) of particle. More... | |
scalar | trackLength_ |
Track length. More... | |
boundBox | bounds_ |
Optional trimming of tracks. More... | |
word | cloudName_ |
Optional specified name of particles. More... | |
word | seedSet_ |
Type of seed. More... | |
wordList | scalarNames_ |
Names of scalar fields. More... | |
wordList | vectorNames_ |
Names of vector fields. More... | |
autoPtr< meshSearch > | meshSearchPtr_ |
Mesh searching enigne. More... | |
autoPtr< sampledSet > | sampledSetPtr_ |
Seed set engine. More... | |
word | sampledSetAxis_ |
Axis of the sampled points to output. More... | |
autoPtr< writer< scalar > > | scalarFormatterPtr_ |
File writer for scalar data. More... | |
autoPtr< writer< vector > > | vectorFormatterPtr_ |
File writer for vector data. More... | |
DynamicList< List< point > > | allTracks_ |
All tracks. Per track the points it passed through. More... | |
List< DynamicList< scalarList > > | allScalars_ |
Per scalarField, per track, the sampled values. More... | |
List< DynamicList< vectorList > > | allVectors_ |
Per vectorField, per track, the sampled values. More... | |
![]() | |
const word | name_ |
Name of model. More... | |
bool | active_ |
Flag to indicate whether the object is active. More... | |
IOdictionary & | stateDict_ |
Reference to the state dictionary. More... | |
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:
streamLine1 { type streamLine; functionObjectLibs ("libfieldFunctionObjects.so"); ... setFormat vtk; UName U; trackForward yes; fields ( U p ); lifeTime 10000; trackLength 1e-3; nSubCycle 5; bounds (0.2 -10 -10)(0.22 10 10); 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; } }
Function object usage
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 | |
log | Log to standard output | no | yes |
bounds | Bounding box to trim tracks | no | greatBox |
seedSampleSet | seeding method (see below) | yes |
Where seedSampleSet
is typically one of
uniform | : | uniform particle seeding |
cloud | : | cloud of points |
triSurfaceMeshPointSet | : | points according to a tri-surface mesh |
trackLength
OR nSubCycle
option should be usedDefinition at line 196 of file streamLine.H.
|
private |
Disallow default bitwise copy construct.
streamLine | ( | const word & | name, |
const objectRegistry & | obr, | ||
const dictionary & | dict, | ||
const bool | loadFromFiles = false |
||
) |
Construct for given objectRegistry and dictionary.
Allow the possibility to load fields from files
Definition at line 119 of file streamLine.C.
References Foam::read().
|
virtual |
Destructor.
Definition at line 138 of file streamLine.C.
|
private |
Disallow default bitwise assignment.
TypeName | ( | "streamLine" | ) |
Runtime type information.
|
virtual |
Read settings.
Reimplemented from streamLineBase.
Definition at line 144 of file streamLine.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::found(), Foam::Info, Foam::nl, streamLineBase::read(), and dictionary::readIfPresent().
|
virtual |
Do the actual tracking to fill the track data.
Implements streamLineBase.
Definition at line 41 of file streamLine.C.
References Cloud::addParticle(), streamLineBase::allScalars_, streamLineBase::allTracks_, streamLineBase::allVectors_, sampledSet::cells(), streamLineBase::cloudName_, Foam::endl(), forAll, Foam::Info, streamLineBase::initInterpolations(), streamLineBase::lifeTime_, streamLineBase::log_, mesh, Cloud::move(), streamLine::nSubCycle_, streamLineBase::obr_, Foam::returnReduce(), streamLineBase::sampledSetPtr_, Cloud::size(), Foam::sqrt(), streamLineBase::trackForward_, and streamLineBase::trackLength_.
|
private |
Number of subcycling steps.
Definition at line 203 of file streamLine.H.
Referenced by streamLine::track().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.