33template<
class CloudType>
40template<
class CloudType>
49 Info<<
"Constructing particle injection models" <<
endl;
58 for (
const entry& dEntry :
dict)
60 const word& model = dEntry.keyword();
63 Info<<
"Creating injector: " << model <<
endl;
99template<
class CloudType>
111template<
class CloudType>
114 scalar minTime = GREAT;
115 for (
const auto& model : *
this)
117 minTime =
min(minTime, model.timeStart());
124template<
class CloudType>
127 scalar maxTime = -GREAT;
128 for (
const auto& model : *
this)
130 maxTime =
max(maxTime, model.timeEnd());
137template<
class CloudType>
145 for (
auto& model : *
this)
147 vol += model.volumeToInject(time0, time1);
154template<
class CloudType>
158 scalar massTotal = 0.0;
159 for (
auto& model : *
this)
161 scalar mt = model.massTotal();
162 mass += mt*model.averageParcelMass();
170template<
class CloudType>
173 for (
auto& model : *
this)
180template<
class CloudType>
181template<
class TrackCloudType>
184 TrackCloudType& cloud,
185 typename CloudType::parcelType::trackingData&
td
188 for (
auto& model : *
this)
195template<
class CloudType>
196template<
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);
211template<
class CloudType>
214 for (
auto& model : *
this)
InjectionModelList(CloudType &owner)
Construct null from owner.
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.
scalar timeStart() const
Return the minimum start-of-injection time.
scalar averageParcelMass()
Return the average parcel mass.
void injectSteadyState(TrackCloudType &cloud, typename CloudType::parcelType::trackingData &td, const scalar trackTime)
Main injection loop - steady-state.
virtual void info()
Write injection info.
void updateMesh()
Set injector locations when mesh is updated.
scalar timeEnd() const
Return the maximum end-of-injection time.
Templated injection model class.
static autoPtr< InjectionModel< CloudType > > New(const dictionary &dict, CloudType &owner)
Selector with lookup from dictionary.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
const InjectionModel< CloudType > * set(const label i) const
constexpr PtrList() noexcept
void resize(const label newLen)
label count() const noexcept
A cloud is a registry collection of lagrangian particles.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
A keyword and a list of tokens is an 'entry'.
A class for handling words, derived from Foam::string.
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
DSMCCloud< dsmcParcel > CloudType
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
dimensionedScalar stabilise(const dimensionedScalar &x, const dimensionedScalar &y)