Go to the documentation of this file.
32 template<
class CloudType>
39 template<
class CloudType>
48 Info<<
"Constructing particle injection models" <<
endl;
59 const word& model = dEntry.keyword();
62 Info<<
"Creating injector: " << model <<
endl;
98 template<
class CloudType>
110 template<
class CloudType>
117 template<
class CloudType>
120 scalar minTime = GREAT;
123 minTime =
min(minTime, this->
operator[](i).timeStart());
130 template<
class CloudType>
133 scalar maxTime = -GREAT;
136 maxTime =
max(maxTime, this->
operator[](i).timeEnd());
143 template<
class CloudType>
153 vol += this->operator[](i).volumeToInject(time0, time1);
160 template<
class CloudType>
164 scalar massTotal = 0.0;
167 scalar mt = this->operator[](i).massTotal();
168 mass += mt*this->operator[](i).averageParcelMass();
172 return mass/massTotal;
176 template<
class CloudType>
181 this->operator[](i).updateMesh();
186 template<
class CloudType>
187 template<
class TrackCloudType>
190 TrackCloudType&
cloud,
191 typename CloudType::parcelType::trackingData& td
196 this->operator[](i).inject(
cloud, td);
201 template<
class CloudType>
202 template<
class TrackCloudType>
205 TrackCloudType&
cloud,
206 typename CloudType::parcelType::trackingData& td,
207 const scalar trackTime
212 this->operator[](i).injectSteadyState(
cloud, td, trackTime);
217 template<
class CloudType>
222 this->operator[](i).info(os);
A keyword and a list of tokens is an 'entry'.
void inject(TrackCloudType &cloud, typename CloudType::parcelType::trackingData &td)
Main injection loop.
A class for handling words, derived from Foam::string.
void injectSteadyState(TrackCloudType &cloud, typename CloudType::parcelType::trackingData &td, const scalar trackTime)
Main injection loop - steady-state.
Templated injection model class.
Ostream & endl(Ostream &os)
Add newline and flush stream.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
scalar timeEnd() const
Return the maximum end-of-injection time.
#define forAll(list, i)
Loop across all elements in list.
scalar averageParcelMass()
Return the average parcel mass.
scalar volumeToInject(const scalar time0, const scalar time1)
Volume of parcels to introduce relative to SOI.
patchWriters resize(patchIds.size())
messageStream Info
Information stream (uses stdout - output is on the master only)
virtual ~InjectionModelList()
Destructor.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Templated base class for dsmc cloud.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
InjectionModelList(CloudType &owner)
Construct null from owner.
void updateMesh()
Set injector locations when mesh is updated.
A cloud is a registry collection of lagrangian particles.
virtual void info(Ostream &os)
Write injection info to stream.
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.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
List of injection models.