32 template<
class CloudType>
47 U0_(this->coeffDict().lookup(
"U0")),
61 this->coeffDict().subDict(
"sizeDistribution"),
66 duration_ = owner.db().time().userTimeToTime(duration_);
68 patchInjectionBase::updateMesh(owner.mesh());
71 this->volumeTotal_ = flowRateProfile_.integrate(0.0, duration_);
75 template<
class CloudType>
83 duration_(im.duration_),
84 parcelsPerSecond_(im.parcelsPerSecond_),
86 flowRateProfile_(im.flowRateProfile_),
87 sizeDistribution_(im.sizeDistribution_().clone().ptr())
93 template<
class CloudType>
100 template<
class CloudType>
103 patchInjectionBase::updateMesh(this->owner().
mesh());
107 template<
class CloudType>
110 return this->SOI_ + duration_;
114 template<
class CloudType>
121 if ((time0 >= 0.0) && (time0 < duration_))
123 scalar nParcels = (time1 - time0)*parcelsPerSecond_;
127 label nParcelsToInject = floor(nParcels);
135 nParcels - scalar(nParcelsToInject)
143 return nParcelsToInject;
152 template<
class CloudType>
159 if ((time0 >= 0.0) && (time0 < duration_))
161 return flowRateProfile_.integrate(time0, time1);
170 template<
class CloudType>
182 patchInjectionBase::setPositionAndCell
184 this->owner().
mesh(),
194 template<
class CloudType>
207 parcel.d() = sizeDistribution_->sample();
211 template<
class CloudType>
218 template<
class CloudType>
cachedRandom rndGen(label(0),-1)
virtual void setProperties(const label parcelI, const label nParcels, const scalar time, typename CloudType::parcelType &parcel)
Set the parcel properties.
virtual bool fullyDescribed() const
Flag to identify whether model fully describes the parcel.
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.
Type globalPosition(const Type &start, const Type &end)
Return a sample between start and end.
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual scalar timeEnd() const
Return the end-of-injection time.
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
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.
stressControl lookup("compactNormalStress") >> compactNormalStress
Templated injection model class.
virtual ~PatchInjection()
Destructor.
virtual label parcelsToInject(const scalar time0, const scalar time1)
Number of parcels to introduce relative to SOI.
virtual void updateMesh()
Set injector locations when mesh is updated.
PatchInjection(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
virtual bool validInjection(const label parcelI)
Return flag to identify whether or not injection of parcelI is.
Templated base class for dsmc cloud.
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.