99#ifndef Foam_functionObjects_extractEulerianParticles_H
100#define Foam_functionObjects_extractEulerianParticles_H
131 injectedParticleCloud
cloud_;
237 const label nRegionsNew,
262 const label localFaceI,
263 const label globalFaceI
270 TypeName(
"extractEulerianParticles");
303 virtual bool write();
Generic GeometricField class.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A HashTable to objects of type <T> with a label key.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A subset of mesh faces organised as a primitive patch.
Generates particle size information from Eulerian calculations, e.g. VoF.
virtual void accumulateParticleInfo(const surfaceScalarField &alphaf, const surfaceScalarField &phi, const labelList ®ionFaceIDs, const faceZone &fz)
Process latest region information.
virtual tmp< surfaceScalarField > phiU() const
Return the volumetric flux.
label nDiscardedParticles_
Total number of discarded particles.
label nInjectorLocations_
Number of sample locations to generate.
scalar alphaThreshold_
Value of phase fraction used to identify particle boundaries.
scalar minDiameter_
Minimum diameter (optional).
scalar collectedVolume_
Total collected volume [m3].
virtual void setBlockedFaces(const surfaceScalarField &alphaf, const faceZone &fz, boolList &blockedFaces)
Set the blocked faces, i.e. where alpha > alpha threshold value.
word UName_
Name of the velocity field, default = U.
globalIndex globalCoarseFaces_
Global coarse face addressing.
label nCollectedParticles_
Total number of collected particles.
Type faceValue(const GeometricField< Type, fvsPatchField, surfaceMesh > &field, const label localFaceI, const label globalFaceI) const
TypeName("extractEulerianParticles")
Runtime type information.
virtual void collectParticle(const scalar time, const label regioni)
Collect particles that have passed through the faceZone.
labelList patchFaceIDs_
Patch face indices where faceZone face intersect patch.
extractEulerianParticles(const word &name, const Time &runTime, const dictionary &dict)
Construct from components.
virtual ~extractEulerianParticles()=default
Destructor.
scalar maxDiameter_
Maximum diameter (optional).
injectedParticleCloud cloud_
Storage for collected particles.
Map< label > regionToParticleMap_
Map from region to index in particles_ list.
labelList regions0_
Region indices in faceZone faces from last iteration.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
word phiName_
Name of the flux field, default ="rho".
word rhoName_
Name of the density field, default = rho.
word faceZoneName_
Name of faceZone to sample.
List< eulerianParticle > particles_
Particle properties (partial, being accumulated).
virtual void initialiseBins()
Initialise the particle collection bins.
scalar discardedVolume_
Total discarded volume [m3].
word alphaName_
Name of phase fraction field.
virtual void checkFaceZone()
Check that the faceZone is valid.
label zoneID_
Index of the faceZone.
labelList fineToCoarseAddr_
Agglomeration addressing from fine to coarse (local proc only).
virtual bool execute()
Execute the function-object operations.
extractEulerianParticles(const extractEulerianParticles &)=delete
No copy construct.
void operator=(const extractEulerianParticles &)=delete
No copy assignment.
virtual bool write()
Write the function-object results.
labelList patchIDs_
Patch indices where faceZone face intersect patch.
virtual void calculateAddressing(const label nRegionsNew, const scalar time, labelList ®ionFaceIDs)
Calculate the addressing between regions between iterations Returns the number of active regions (par...
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
fvMeshFunctionObject(const fvMeshFunctionObject &)=delete
No copy construct.
const Time & time() const
Return time database.
Base class for writing single files from the function objects.
writeFile(const objectRegistry &obr, const fileName &prefix, const word &name="undefined", const bool writeToFile=true, const string &ext=".dat")
Construct from objectRegistry, prefix, fileName.
Calculates a non-overlapping list of offsets based on an input size (eg, number of cells) from differ...
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
List< label > labelList
A List of labels.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
List< bool > boolList
A List of bools.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Macros to ease declaration of run-time selection tables.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.