Go to the documentation of this file.
34 template<
class CloudType>
43 positionsFile_(this->coeffDict().
lookup(
"positionsFile")),
49 owner.db().time().constant(),
55 diameters_(positions_.size()),
56 injectorCells_(positions_.size(), -1),
57 injectorTetFaces_(positions_.size(), -1),
58 injectorTetPts_(positions_.size(), -1),
59 U0_(this->coeffDict().
lookup(
"U0")),
64 this->coeffDict().subDict(
"sizeDistribution"),
70 this->coeffDict().lookupOrDefault(
"ignoreOutOfBounds",
false)
78 diameters_[i] = sizeDistribution_->sample();
82 this->volumeTotal_ =
sum(
pow3(diameters_))*
pi/6.0;
86 template<
class CloudType>
107 template<
class CloudType>
114 template<
class CloudType>
125 !this->findCellAtPosition
128 injectorTetFaces_[pI],
148 Info<<
" " << nRejected
149 <<
" particles ignored, out of bounds" <<
endl;
154 template<
class CloudType>
163 template<
class CloudType>
170 if ((0.0 >= time0) && (0.0 < time1))
172 return positions_.size();
181 template<
class CloudType>
189 if ((0.0 >= time0) && (0.0 < time1))
191 return this->volumeTotal_;
200 template<
class CloudType>
212 position = positions_[parcelI];
213 cellOwner = injectorCells_[parcelI];
214 tetFaceI = injectorTetFaces_[parcelI];
215 tetPtI = injectorTetPts_[parcelI];
219 template<
class CloudType>
232 parcel.d() = diameters_[parcelI];
236 template<
class CloudType>
243 template<
class CloudType>
scalarList diameters_
Field of parcel diameters.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
A class for handling words, derived from string.
virtual void updateMesh()
Set injector locations when mesh is updated.
#define forAll(list, i)
Loop across all elements in list.
virtual void setProperties(const label parcelI, const label nParcels, const scalar time, typename CloudType::parcelType &parcel)
Set the parcel properties.
virtual bool validInjection(const label parcelI)
Return flag to identify whether or not injection of parcelI is.
Switch ignoreOutOfBounds_
Flag to suppress errors if particle injection site is out-of-bounds.
Templated injection model class.
static autoPtr< distributionModel > New(const dictionary &dict, cachedRandom &rndGen)
Selector.
virtual label parcelsToInject(const scalar time0, const scalar time1)
Number of parcels to introduce relative to SOI.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const word positionsFile_
Name of file containing positions data.
Random & rndGen()
Return refernce to the random object.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual bool fullyDescribed() const
Flag to identify whether model fully describes the parcel.
dimensionedScalar pow3(const dimensionedScalar &ds)
const fvMesh & mesh() const
Return refernce to the mesh.
virtual scalar volumeToInject(const scalar time0, const scalar time1)
Volume of parcels to introduce relative to SOI.
Templated base class for dsmc cloud.
labelList injectorCells_
List of cell labels corresponding to injector positions.
A list of keyword definitions, which are a keyword followed by any number of values (e....
labelList injectorTetFaces_
List of tetFace labels corresponding to injector positions.
vectorIOField positions_
Field of parcel positions.
labelList injectorTetPts_
List of tetPt labels corresponding to injector positions.
const vector U0_
Initial parcel velocity.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
void inplaceSubset(const UList< T > &select, const T &value, ListType &)
Inplace extract elements of List when select is a certain value.
scalar timeEnd() const
Return the end-of-injection time.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
ManualInjection(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
virtual ~ManualInjection()
Destructor.
const autoPtr< distributionModels::distributionModel > sizeDistribution_
Parcel size distribution model.
stressControl lookup("compactNormalStress") >> compactNormalStress
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.