Public Member Functions | Private Member Functions
wallBoundedStreamLine 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, constrained to a patch. More...

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

Public Member Functions

 TypeName ("wallBoundedStreamLine")
 Runtime type information. More...
 
 wallBoundedStreamLine (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false)
 Construct for given objectRegistry and dictionary. More...
 
virtual ~wallBoundedStreamLine ()
 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

tetIndices findNearestTet (const PackedBoolList &isWallPatch, const point &seedPt, const label cellI) const
 Find wall tet on cell. More...
 
 wallBoundedStreamLine (const wallBoundedStreamLine &)
 Disallow default bitwise copy construct. More...
 
void operator= (const wallBoundedStreamLine &)
 Disallow default bitwise assignment. 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, constrained to a patch.

Example of function object specification:

wallBoundedStreamLine1
{
    type            wallBoundedStreamLine;
    functionObjectLibs ("libfieldFunctionObjects.so");
    ...
    setFormat       vtk;
    UName           UNear;
    trackForward    yes;
    fields
    (
        UNear
        p
    );
    lifeTime        10000;
    trackLength     1e-3;
    bounds          (0.2 -10 -10)(0.22 10 10);
    cloudName       particleTracks;
    seedSampleSet   patchSeed;
    patchSeedCoeffs
    {
        type        patchSeed;
        patches     (wall);
        axis        x;
        maxPoints   20000;
    }
}


Function object usage

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
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
patchSeed : seeding via patch faces
triSurfaceMeshPointSet : points according to a tri-surface mesh
See also
Foam::functionObject Foam::OutputFilterFunctionObject Foam::sampledSet Foam::streamLineBase Foam::streamLine
Source files

Definition at line 186 of file wallBoundedStreamLine.H.

Constructor & Destructor Documentation

◆ wallBoundedStreamLine() [1/2]

Disallow default bitwise copy construct.

◆ wallBoundedStreamLine() [2/2]

wallBoundedStreamLine ( 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 227 of file wallBoundedStreamLine.C.

References Foam::read().

Here is the call graph for this function:

◆ ~wallBoundedStreamLine()

~wallBoundedStreamLine ( )
virtual

Destructor.

Definition at line 246 of file wallBoundedStreamLine.C.

Member Function Documentation

◆ findNearestTet()

Foam::tetIndices findNearestTet ( const PackedBoolList isWallPatch,
const point seedPt,
const label  cellI 
) const
private

Find wall tet on cell.

Definition at line 43 of file wallBoundedStreamLine.C.

References triangle::centre(), f(), forAll, Foam::magSqr(), mesh, and Foam::sqr().

Referenced by wallBoundedStreamLine::track().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

void operator= ( const wallBoundedStreamLine )
private

Disallow default bitwise assignment.

◆ TypeName()

TypeName ( "wallBoundedStreamLine"  )

Runtime type information.

◆ read()

void read ( const dictionary dict)
virtual

◆ track()

void track ( )
virtual

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