33 template<
class CloudType>
40 template<
class CloudType>
49 Info<<
"Constructing particle injection models" <<
endl;
58 for (
const entry& dEntry :
dict)
60 const word& model = dEntry.keyword();
61 const dictionary& props = dEntry.dict();
63 Info<<
"Creating injector: " << model <<
endl;
72 props.get<word>(
"type"),
99 template<
class CloudType>
102 const InjectionModelList<CloudType>& iml
111 template<
class CloudType>
114 scalar minTime = GREAT;
115 for (
const auto& model : *
this)
117 minTime =
min(minTime, model.timeStart());
124 template<
class CloudType>
127 scalar maxTime = -GREAT;
128 for (
const auto& model : *
this)
130 maxTime =
max(maxTime, model.timeEnd());
137 template<
class CloudType>
145 for (
auto& model : *
this)
147 vol += model.volumeToInject(time0, time1);
154 template<
class CloudType>
158 scalar massTotal = 0.0;
159 for (
auto& model : *
this)
161 scalar mt = model.massTotal();
162 mass += mt*model.averageParcelMass();
166 return mass/massTotal;
170 template<
class CloudType>
173 for (
auto& model : *
this)
180 template<
class CloudType>
181 template<
class TrackCloudType>
184 TrackCloudType& cloud,
185 typename CloudType::parcelType::trackingData& td
188 for (
auto& model : *
this)
190 model.inject(cloud, td);
195 template<
class CloudType>
196 template<
class TrackCloudType>
199 TrackCloudType& cloud,
200 typename CloudType::parcelType::trackingData& td,
201 const scalar trackTime
204 for (
auto& model : *
this)
206 model.injectSteadyState(
cloud, td, trackTime);
211 template<
class CloudType>
214 for (
auto& model : *
this)
void inject(TrackCloudType &cloud, typename CloudType::parcelType::trackingData &td)
Main injection loop.
scalar volumeToInject(const scalar time0, const scalar time1)
Volume of parcels to introduce relative to SOI.
InjectionModelList(CloudType &owner)
Construct null from owner.
patchWriters resize(patchIds.size())
A list of keyword definitions, which are a keyword followed by a number of values (eg...
void updateMesh()
Set injector locations when mesh is updated.
void injectSteadyState(TrackCloudType &cloud, typename CloudType::parcelType::trackingData &td, const scalar trackTime)
Main injection loop - steady-state.
Templated injection model class.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
scalar timeStart() const
Return the minimum start-of-injection time.
scalar averageParcelMass()
Return the average parcel mass.
A cloud is a registry collection of lagrangian particles.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
virtual void info()
Write injection info.
messageStream Info
Information stream (stdout output on master, null elsewhere)
scalar timeEnd() const
Return the maximum end-of-injection time.
Templated base class for dsmc cloud.