35template<
class CloudType>
42 this->subModelProperties(),
51 this->subModelProperties(),
58template<
class CloudType>
66 if (YSupplied.
size() !=
Y.size())
69 << YName <<
" supplied, but size is not compatible with "
70 <<
"parcel composition: " <<
nl <<
" "
71 << YName <<
"(" << YSupplied.
size() <<
") vs required composition "
72 << YName <<
"(" <<
Y.size() <<
")" <<
nl
78template<
class CloudType>
81 CloudType::cloudReset(c);
83 compositionModel_.reset(c.compositionModel_.ptr());
90template<
class CloudType>
91Foam::ReactingCloud<CloudType>::ReactingCloud
103 cloudCopyPtr_(nullptr),
104 constProps_(this->particleProperties()),
105 compositionModel_(nullptr),
106 phaseChangeModel_(nullptr),
115 parcelType::readFields(*
this, this->
composition());
159template<
class CloudType>
160Foam::ReactingCloud<CloudType>::ReactingCloud
162 ReactingCloud<CloudType>& c,
168 cloudCopyPtr_(nullptr),
206template<
class CloudType>
207Foam::ReactingCloud<CloudType>::ReactingCloud
211 const ReactingCloud<CloudType>& c
216 cloudCopyPtr_(nullptr),
218 compositionModel_(c.compositionModel_->clone()),
219 phaseChangeModel_(nullptr),
226template<
class CloudType>
230 const scalar lagrangianDt
233 CloudType::setParcelThermoProperties(parcel, lagrangianDt);
239template<
class CloudType>
243 const scalar lagrangianDt,
244 const bool fullyDescribed
247 CloudType::checkParcelProperties(parcel, lagrangianDt, fullyDescribed);
251 checkSuppliedComposition
260 parcel.mass0() = parcel.mass();
264template<
class CloudType>
277template<
class CloudType>
281 cloudCopyPtr_.clear();
285template<
class CloudType>
288 CloudType::resetSourceTerms();
296template<
class CloudType>
299 const ReactingCloud<CloudType>& cloudOldTime
302 CloudType::relaxSources(cloudOldTime);
308 dsfType& rhoT = rhoTrans_[fieldi];
309 const dsfType& rhoT0 = cloudOldTime.rhoTrans()[fieldi];
310 this->
relax(rhoT, rhoT0,
"rho");
315template<
class CloudType>
318 CloudType::scaleSources();
325 this->scale(rhoT,
"rho");
330template<
class CloudType>
333 if (this->solution().canEvolve())
335 typename parcelType::trackingData
td(*
this);
342template<
class CloudType>
351template<
class CloudType>
360template<
class CloudType>
370template<
class CloudType>
const word cloudName(propsDict.get< word >("cloud"))
const uniformDimensionedVectorField & g
void deleteLostParticles()
Remove lost particles from cloud and delete.
virtual void writeFields() const
Write the field data for the cloud of particles Dummy at.
void autoMap(const mapPolyMesh &)
Remap the cells of particles corresponding to the.
void cloudReset(const Cloud< ParticleType > &c)
Reset the particles.
Templated reacting parcel composition model class Consists of carrier species (via thermo package),...
label size() const noexcept
The number of elements in list.
const word & cloudName() const
const IOdictionary & particleProperties() const
const fvMesh & mesh() const
DimensionedField< scalar, volMesh > Internal
@ NO_REGISTER
Do not request registration (bool: false).
@ REGISTER
Request registration (bool: true).
@ NO_READ
Nothing to be read.
@ READ_IF_PRESENT
Reading is optional [identical to LAZY_READ].
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const objectRegistry & db() const noexcept
Return the local objectRegistry.
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
Templated phase change model class.
Templated base class for reacting cloud.
autoPtr< PhaseChangeModel< ReactingCloud< CloudType > > > phaseChangeModel_
Reacting phase change model.
PtrList< volScalarField::Internal > rhoTrans_
Mass transfer fields - one per carrier phase specie.
void setModels()
Set cloud sub-models.
void storeState()
Store the current cloud state.
void setParcelThermoProperties(parcelType &parcel, const scalar lagrangianDt)
Set parcel thermo properties.
const CompositionModel< ReactingCloud< CloudType > > & composition() const
Return const access to reacting composition model.
void checkParcelProperties(parcelType &parcel, const scalar lagrangianDt, const bool fullyDescribed)
Check parcel properties.
void cloudReset(ReactingCloud< CloudType > &c)
Reset state of cloud.
void scaleSources()
Apply scaling to (transient) cloud sources.
void checkSuppliedComposition(const scalarField &YSupplied, const scalarField &Y, const word &YName)
Check that size of a composition field is valid.
CloudType::particleType parcelType
Type of parcel the cloud was instantiated for.
volScalarField::Internal & rhoTrans(const label i)
Return reference to mass source for field i.
virtual void writeFields() const
Write the field data for the cloud.
virtual void autoMap(const mapPolyMesh &)
Remap the cells of particles corresponding to the.
virtual autoPtr< Cloud< parcelType > > clone(const word &name)
Construct and return clone based on (this) with new name.
void evolve()
Evolve the cloud.
const PhaseChangeModel< ReactingCloud< CloudType > > & phaseChange() const
Return const access to reacting phase change model.
parcelType::constantProperties constProps_
Parcel constant properties.
void relaxSources(const ReactingCloud< CloudType > &cloudOldTime)
Apply relaxation to (steady state) cloud sources.
autoPtr< CompositionModel< ReactingCloud< CloudType > > > compositionModel_
Reacting composition model.
void info()
Print cloud information.
void restoreState()
Reset the current cloud to the previously stored state.
void resetSourceTerms()
Reset the cloud source terms.
virtual void writeObjects(objectRegistry &obr) const
Write particle fields as objects into the obr registry.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
const basicSpecieMixture & carrier() const
Return reference to the gaseous components.
void size(const label n)
Older name for setAddressableSize.
const speciesTable & species() const
Return the table of species.
virtual void writeObjects(objectRegistry &obr) const
Write particle fields as objects into the obr registry.
Mesh data needed to do the Finite Volume discretisation.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Registry of regIOobjects.
const Time & time() const noexcept
Return time registry.
Virtual abstract base class for templated ReactingCloud.
reactingCloud()=default
Null constructor.
Selector class for relaxation factors, solver type and solution.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for handling words, derived from Foam::string.
basicSpecieMixture & composition
PtrList< volScalarField > & Y
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
DSMCCloud< dsmcParcel > CloudType
GeometricField< vector, fvPatchField, volMesh > volVectorField
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const NameMatchPredicate &selectedFields, DynamicList< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type and store on the objectRegistry.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
constexpr char nl
The newline '\n' character (0x0a).
psiReactionThermo & thermo
#define forAll(list, i)
Loop across all elements in list.