32 template<
class CloudType>
39 if ((time0 >= 0.0) && (time0 < duration_))
41 return round((time1 - time0)*parcelsPerSecond_);
50 template<
class CloudType>
57 if ((time0 >= 0.0) && (time0 < duration_))
59 return volumeFlowRate_().integrate(time0, time1);
70 template<
class CloudType>
78 duration_(
readScalar(this->coeffDict().lookup(
"duration"))),
79 position_(this->coeffDict().lookup(
"position")),
81 direction_(this->coeffDict().lookup(
"direction")),
84 readScalar(this->coeffDict().lookup(
"parcelsPerSecond"))
122 this->coeffDict().subDict(
"parcelPDF"),
126 tanVec1_(vector::zero),
127 tanVec2_(vector::zero)
130 direction_ /=
mag(direction_);
133 vector tangent = vector::zero;
134 scalar magTangent = 0.0;
136 while (magTangent < SMALL)
138 vector v = this->owner().rndGen().vector01();
140 tangent = v - (v & direction_)*direction_;
141 magTangent =
mag(tangent);
144 tanVec1_ = tangent/magTangent;
145 tanVec2_ = direction_^tanVec1_;
148 this->volumeTotal_ = volumeFlowRate_().integrate(0.0, duration_);
151 this->findCellAtPosition(injectorCell_, position_);
157 template<
class CloudType>
164 template<
class CloudType>
171 template<
class CloudType>
174 return this->SOI_ + duration_;
178 template<
class CloudType>
188 position = position_;
189 cellOwner = injectorCell_;
193 template<
class CloudType>
199 typename CloudType::parcelType&
parcel
205 scalar t = time - this->SOI_;
206 scalar ti = thetaInner_().value(t);
207 scalar to = thetaOuter_().value(t);
208 scalar coneAngle = this->owner().rndGen().scalar01()*(to - ti) + ti;
210 coneAngle *= deg2Rad;
211 scalar alpha =
sin(coneAngle);
212 scalar dcorr =
cos(coneAngle);
216 vector dirVec = dcorr*direction_;
218 dirVec /=
mag(dirVec);
220 parcel.U() = Umag_().value(t)*dirVec;
223 parcel.d() = parcelPDF_().sample();
227 template<
class CloudType>
234 template<
class CloudType>