30 template<
class CloudType>
40 inputFileName_(this->coeffDict().lookup(
"inputFile")),
41 duration_(this->readDuration(
dict, owner)),
42 parcelsPerSecond_(this->readParcelsPerSecond(
dict, owner)),
43 randomise_(
readBool(this->coeffDict().lookup(
"randomise"))),
49 owner.db().time().constant(),
55 injectorCoordinates_(0),
61 injectorCoordinates_.setSize(injectors_.size());
62 injectorCells_.
setSize(injectors_.size());
63 injectorTetFaces_.
setSize(injectors_.size());
64 injectorTetPts_.
setSize(injectors_.size());
70 template<
class CloudType>
78 inputFileName_(im.inputFileName_),
79 duration_(im.duration_),
80 parcelsPerSecond_(im.parcelsPerSecond_, false),
81 randomise_(im.randomise_),
82 injectors_(im.injectors_),
83 injectorCoordinates_(im.injectorCoordinates_),
84 injectorCells_(im.injectorCells_),
85 injectorTetFaces_(im.injectorTetFaces_),
86 injectorTetPts_(im.injectorTetPts_)
92 template<
class CloudType>
100 template<
class CloudType>
106 this->findCellAtPosition
109 injectorCoordinates_[i],
111 injectorTetFaces_[i],
118 template<
class CloudType>
122 return this->SOI_ + duration_;
126 template<
class CloudType>
134 if (time0 >= 0 && time0 < duration_)
139 injectorCells_.size()
140 *parcelsPerSecond_->integral(time0, time1)
150 template<
class CloudType>
160 if (time0 >= 0 && time0 < duration_)
164 mass += injectors_[i].mDot()*(time1 - time0);
172 template<
class CloudType>
176 const label nParcels,
193 injectorI = parcelI*injectorCells_.size()/nParcels;
196 coordinates = injectorCoordinates_[injectorI];
197 celli = injectorCells_[injectorI];
198 tetFacei = injectorTetFaces_[injectorI];
199 tetPti = injectorTetPts_[injectorI];
203 template<
class CloudType>
207 const label nParcels,
209 typename CloudType::parcelType::trackingData& td,
213 label injectorI = parcelI*injectorCells_.size()/nParcels;
216 parcel.U() = injectors_[injectorI].U();
219 parcel.d() = injectors_[injectorI].d();
222 parcel.rho() = injectors_[injectorI].rho();
225 parcel.T() = injectors_[injectorI].T();
228 parcel.Cp() = injectors_[injectorI].Cp();
231 parcel.Y() = injectors_[injectorI].Y();
234 parcel.YGas() = injectors_[injectorI].YGas();
237 parcel.YLiquid() = injectors_[injectorI].YLiquid();
240 parcel.YSolid() = injectors_[injectorI].YSolid();
244 template<
class CloudType>
#define forAll(list, i)
Loop across all elements in list.
Templated base class for dsmc cloud.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Templated injection model class.
void setSize(const label)
Reset size of List.
Particle injection sources read from look-up table. Each row corresponds to an injection site.
virtual void topoChange()
Set injector locations when mesh is updated.
virtual ~ReactingMultiphaseLookupTableInjection()
Destructor.
virtual void setProperties(const label parcelI, const label nParcels, const scalar time, typename CloudType::parcelType::trackingData &td, typename CloudType::parcelType &parcel)
Set the parcel properties.
virtual void setPositionAndCell(const label parcelI, const label nParcels, const scalar time, barycentric &coordinates, label &celli, label &tetFacei, label &tetPti, label &facei)
Set the injection position and owner cell, tetFace and tetPt.
ReactingMultiphaseLookupTableInjection(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
virtual label nParcelsToInject(const scalar time0, const scalar time1)
Number of parcels to introduce relative to SOI.
virtual bool fullyDescribed() const
Flag to identify whether model fully describes the parcel.
scalar timeEnd() const
Return the end-of-injection time.
virtual scalar massToInject(const scalar time0, const scalar time1)
Parcel mass to introduce relative to SOI.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Type sampleAB(const Type &a, const Type &b)
Return a type with components uniformly distributed between two.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
randomGenerator rndGen(653213)