38 namespace functionObjects
59 new streamLineParticle
63 seedPoints.
cells()[seedi],
69 if (
trackDir_ == trackDirType::BIDIRECTIONAL)
74 new streamLineParticle
78 seedPoints.
cells()[seedi],
86 label nSeeds =
returnReduce(particles.size(), sumOp<label>());
88 Log <<
" seeded " << nSeeds <<
" particles" <<
endl;
92 PtrList<interpolation<scalar>> vsInterp;
93 PtrList<interpolation<vector>> vvInterp;
95 refPtr<interpolation<vector>> UInterp
101 streamLineParticle::trackingData
td 121 particles.move(particles,
td, trackTime);
146 bool subCycling =
dict.found(
"nSubCycle");
147 bool fixedLength =
dict.found(
"trackLength");
149 if (subCycling && fixedLength)
152 <<
"Cannot both specify automatic time stepping (through '" 153 <<
"nSubCycle' specification) and fixed track length (through '" 159 if (
dict.readIfPresent(
"nSubCycle", nSubCycle_))
161 trackLength_ = VGREAT;
162 nSubCycle_ =
max(nSubCycle_, 1);
164 Info<<
" automatic track length specified through" 165 <<
" number of sub cycles : " << nSubCycle_ <<
nl
const sampledSet & sampledSetPoints() const
Demand driven construction of the sampledSet.
defineTypeNameAndDebug(ObukhovLength, 0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
constexpr char nl
The newline '\n' character (0x0a)
DynamicList< List< point > > allTracks_
All tracks. Per track the points it passed through.
scalar trackLength_
Track length.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const cellList & cells() const
refPtr< interpolation< vector > > initInterpolations(const label nSeeds, PtrList< interpolation< scalar >> &vsInterp, PtrList< interpolation< vector >> &vvInterp)
Initialise interpolators and track storage.
Abstract base-class for Time/database function objects.
List< DynamicList< scalarList > > allScalars_
Per scalarField, per track, the sampled values.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
bool read(const char *buf, int32_t &val)
Same as readInt32.
#define forAll(list, i)
Loop across all elements in list.
List< DynamicList< vectorList > > allVectors_
Per vectorField, per track, the sampled values.
trackDirType trackDir_
Whether to use +U, -U or both.
virtual bool read(const dictionary &)
Read settings.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
virtual bool read(const dictionary &)
Read the field average data.
A class for handling words, derived from Foam::string.
word cloudName_
Optional specified name of particles.
label lifeTime_
Maximum lifetime (= number of cells) of particle.
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
A Cloud of streamLine particles.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Generates streamline data by sampling a set of user-specified fields along a particle track...
messageStream Info
Information stream (stdout output on master, null elsewhere)
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
streamLine(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
const fvMesh & mesh_
Reference to the fvMesh.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
virtual void track()
Do the actual tracking to fill the track data.