57 #ifndef InjectedParticleInjection_H 58 #define InjectedParticleInjection_H 69 class injectedParticleCloud;
75 template<
class CloudType>
130 TypeName(
"injectedParticleInjection");
175 virtual scalar
volumeToInject(
const scalar time0,
const scalar time1);
184 const label nParcels,
196 const label nParcels,
void info()
Write injection info.
virtual bool validInjection(const label parceli)
Return flag to identify whether or not injection of parcelI is.
virtual void setPositionAndCell(const label parceli, const label nParcels, const scalar time, vector &position, label &cellOwner, label &tetFacei, label &tetPti)
Set the injection position and owner cell, tetFace and tetPt.
scalarList time_
List of injection time per particle [s].
labelList injectorTetFaces_
List of tetFace label per injector.
Switch ignoreOutOfBounds_
Flag to suppress errors if particle injection site is out-of-bounds.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
InjectedParticleInjection(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
virtual autoPtr< InjectionModel< CloudType > > clone() const
Construct and return a clone.
Templated injection model class.
scalarList diameter_
List of diameter per particle [m].
const word cloudName_
Name of cloud used to seed the new particles.
vector positionOffset_
Position offset to apply to input positions.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
const word & modelName() const
Return const access to the name of the sub-model.
const dictionary & dict() const
Return const access to the cloud dictionary.
virtual ~InjectedParticleInjection()=default
Destructor.
const CloudType & owner() const
Return const access to the owner cloud.
virtual label parcelsToInject(const scalar time0, const scalar time1)
Number of parcels to introduce relative to SOI.
Replays an set of particle data based on an injectedParticleCloud, using the assumption of one partic...
scalarList volume_
List of volume per particle [m3].
A class for handling words, derived from Foam::string.
labelList injectorCells_
List of cell label per injector.
vectorList position_
List of position per particle [m].
ParcelType parcelType
Type of parcel the cloud was instantiated for.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
scalar timeEnd() const
Return the end-of-injection time.
label currentParticlei_
Index of current particle.
labelList injectorTetPts_
List of tetPt label per injector.
vectorList U_
List of velocity per particle [m/s].
void initialise()
Initialise injectors.
virtual void setProperties(const label parceli, const label nParcels, const scalar time, typename CloudType::parcelType &parcel)
Set the parcel properties.
virtual void updateMesh()
Set injector locations when mesh is updated.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
virtual scalar volumeToInject(const scalar time0, const scalar time1)
Volume of parcels to introduce relative to SOI.
Templated base class for dsmc cloud.
virtual bool fullyDescribed() const
Flag to identify whether model fully describes the parcel.
TypeName("injectedParticleInjection")
Runtime type information.