30 template<
class CloudType>
39 inputFileName_(this->coeffDict().lookup(
"inputFile")),
40 duration_(this->coeffDict().template lookup<scalar>(
"duration")),
43 this->coeffDict().
template lookup<scalar>(
"parcelsPerSecond")
51 owner.db().time().constant(),
61 duration_ = owner.db().time().userTimeToTime(duration_);
64 injectorCells_.setSize(injectors_.size());
65 injectorTetFaces_.setSize(injectors_.size());
66 injectorTetPts_.setSize(injectors_.size());
71 this->volumeTotal_ = 0.0;
74 this->volumeTotal_ += injectors_[i].mDot()/injectors_[i].rho();
76 this->volumeTotal_ *= duration_;
80 template<
class CloudType>
87 inputFileName_(im.inputFileName_),
88 duration_(im.duration_),
89 parcelsPerSecond_(im.parcelsPerSecond_),
90 randomise_(im.randomise_),
91 injectors_(im.injectors_),
92 injectorCells_(im.injectorCells_),
93 injectorTetFaces_(im.injectorTetFaces_),
94 injectorTetPts_(im.injectorTetPts_)
100 template<
class CloudType>
107 template<
class CloudType>
113 this->findCellAtPosition
116 injectorTetFaces_[i],
124 template<
class CloudType>
127 return this->SOI_ + duration_;
131 template<
class CloudType>
138 if ((time0 >= 0.0) && (time0 < duration_))
140 return floor(injectorCells_.size()*(time1 - time0)*parcelsPerSecond_);
149 template<
class CloudType>
157 if ((time0 >= 0.0) && (time0 < duration_))
161 volume += injectors_[i].mDot()/injectors_[i].rho()*(time1 - time0);
169 template<
class CloudType>
173 const label nParcels,
184 Random& rnd = this->owner().rndGen();
189 injectorI = parcelI*injectorCells_.size()/nParcels;
192 position = injectors_[injectorI].
x();
193 cellOwner = injectorCells_[injectorI];
194 tetFacei = injectorTetFaces_[injectorI];
195 tetPti = injectorTetPts_[injectorI];
199 template<
class CloudType>
203 const label nParcels,
208 label injectorI = parcelI*injectorCells_.size()/nParcels;
211 parcel.U() = injectors_[injectorI].U();
214 parcel.d() = injectors_[injectorI].d();
217 parcel.rho() = injectors_[injectorI].rho();
220 parcel.T() = injectors_[injectorI].T();
223 parcel.Cp() = injectors_[injectorI].Cp();
226 parcel.Y() = injectors_[injectorI].Y();
230 template<
class CloudType>
237 template<
class CloudType>
scalar timeEnd() const
Return the end-of-injection time.
#define forAll(list, i)
Loop across all elements in list.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Templated injection model class.
virtual bool validInjection(const label parcelI)
Return flag to identify whether or not injection of parcelI is.
Type sampleAB(const Type &a, const Type &b)
Advance the state and return a sample of a given type from a.
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.
virtual ~ReactingLookupTableInjection()
Destructor.
virtual void topoChange()
Set injector locations when mesh is updated.
stressControl lookup("compactNormalStress") >> compactNormalStress
A class for handling words, derived from string.
Particle injection sources read from look-up table. Each row corresponds to an injection site...
ReactingLookupTableInjection(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
virtual bool fullyDescribed() const
Flag to identify whether model fully describes the parcel.
virtual void setProperties(const label parcelI, const label nParcels, const scalar time, typename CloudType::parcelType &parcel)
Set the parcel properties.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
virtual scalar volumeToInject(const scalar time0, const scalar time1)
Volume of parcels to introduce relative to SOI.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Templated base class for dsmc cloud.
virtual label parcelsToInject(const scalar time0, const scalar time1)
Number of parcels to introduce relative to SOI.