Go to the documentation of this file.
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>
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_;
126 label nParcelsToInject = floor(nParcels);
133 && (nParcels - scalar(nParcelsToInject) > rndPos)
139 return nParcelsToInject;
148 template<
class CloudType>
155 if ((time0 >= 0.0) && (time0 < duration_))
157 return flowRateProfile_.integrate(time0, time1);
166 template<
class CloudType>
178 patchInjectionBase::setPositionAndCell
180 this->owner().
mesh(),
190 template<
class CloudType>
203 parcel.d() = sizeDistribution_->sample();
207 template<
class CloudType>
214 template<
class CloudType>
virtual bool fullyDescribed() const
Flag to identify whether model fully describes the parcel.
const vector U0_
Initial parcel velocity [m/s].
A class for handling words, derived from string.
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
virtual label parcelsToInject(const scalar time0, const scalar time1)
Number of parcels to introduce relative to SOI.
scalar duration_
Injection duration [s].
virtual bool validInjection(const label parcelI)
Return flag to identify whether or not injection of parcelI is.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Templated injection model class.
Type globalPosition(const Type &start, const Type &end)
Return a sample between start and end.
Random & rndGen()
Return refernce to the random object.
PatchInjection(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const fvMesh & mesh() const
Return refernce to the mesh.
const label parcelsPerSecond_
Number of parcels to introduce per second [].
Templated base class for dsmc cloud.
A list of keyword definitions, which are a keyword followed by any number of values (e....
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 scalar timeEnd() const
Return the end-of-injection time.
const TimeDataEntry< scalar > flowRateProfile_
Flow rate profile relative to SOI [].
const autoPtr< distributionModels::distributionModel > sizeDistribution_
Parcel size distribution model.
virtual ~PatchInjection()
Destructor.
virtual void setProperties(const label parcelI, const label nParcels, const scalar time, typename CloudType::parcelType &parcel)
Set the parcel properties.
virtual scalar volumeToInject(const scalar time0, const scalar time1)
Volume of parcels to introduce relative to SOI.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
cachedRandom rndGen(label(0), -1)
virtual void updateMesh()
Set injector locations when mesh is updated.
stressControl lookup("compactNormalStress") >> compactNormalStress