Public Member Functions | Private Member Functions | Private Attributes
streamLine Class Reference

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...

Inheritance diagram for streamLine:
Inheritance graph
[legend]
Collaboration diagram for streamLine:
Collaboration graph
[legend]

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...
 
- Public Member Functions inherited from streamLineBase
 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...
 
- Public Member Functions inherited from functionObjectState
 functionObjectState (const objectRegistry &obr, const word &name)
 Construct from components. More...
 
virtual ~functionObjectState ()
 Destructor. More...
 
const wordname () const
 Return the name. More...
 
bool active () const
 Return the active flag. More...
 
const IOdictionarystateDict () const
 Return access to the state dictionary. More...
 
dictionarypropertyDict ()
 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< wordobjectResultEntries () const
 Retrieve the result entries. More...
 
List< wordobjectResultEntries (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

- Protected Member Functions inherited from streamLineBase
autoPtr< indirectPrimitivePatchwallPatch () 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...
 
- Protected Member Functions inherited from functionObjectState
 functionObjectState (const functionObjectState &)
 Disallow default bitwise copy construct. More...
 
void operator= (const functionObjectState &)
 Disallow default bitwise assignment. More...
 
- Protected Attributes inherited from streamLineBase
dictionary dict_
 Input dictionary. More...
 
const objectRegistryobr_
 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< meshSearchmeshSearchPtr_
 Mesh searching enigne. More...
 
autoPtr< sampledSetsampledSetPtr_
 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...
 
- Protected Attributes inherited from functionObjectState
const word name_
 Name of model. More...
 
bool active_
 Flag to indicate whether the object is active. More...
 
IOdictionarystateDict_
 Reference to the state dictionary. More...
 

Detailed Description

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
Note
When specifying the track resolution, the trackLength OR nSubCycle option should be used
See also
Foam::functionObject Foam::OutputFilterFunctionObject Foam::sampledSet Foam::wallBoundedStreamLine Foam::streamLineBase
Source files

Definition at line 196 of file streamLine.H.

Constructor & Destructor Documentation

◆ streamLine() [1/2]

streamLine ( const streamLine )
private

Disallow default bitwise copy construct.

◆ streamLine() [2/2]

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().

Here is the call graph for this function:

◆ ~streamLine()

~streamLine ( )
virtual

Destructor.

Definition at line 138 of file streamLine.C.

Member Function Documentation

◆ operator=()

void operator= ( const streamLine )
private

Disallow default bitwise assignment.

◆ TypeName()

TypeName ( "streamLine"  )

Runtime type information.

◆ read()

void read ( const dictionary dict)
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().

Here is the call graph for this function:

◆ track()

void track ( )
virtual

Field Documentation

◆ nSubCycle_

label nSubCycle_
private

Number of subcycling steps.

Definition at line 203 of file streamLine.H.

Referenced by streamLine::track().


The documentation for this class was generated from the following files: