Go to the documentation of this file.
35 template<
class CloudType>
38 compositionModel_.reset
42 this->subModelProperties(),
47 phaseChangeModel_.reset
51 this->subModelProperties(),
58 template<
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
78 template<
class CloudType>
81 CloudType::cloudReset(
c);
83 compositionModel_.reset(
c.compositionModel_.ptr());
84 phaseChangeModel_.reset(
c.phaseChangeModel_.ptr());
90 template<
class CloudType>
103 cloudCopyPtr_(
nullptr),
104 constProps_(this->particleProperties()),
105 compositionModel_(
nullptr),
106 phaseChangeModel_(
nullptr),
107 rhoTrans_(
thermo.carrier().species().size())
116 this->deleteLostParticles();
123 const word& specieName =
thermo.carrier().species()[i];
131 this->
name() +
":rhoTrans_" + specieName,
134 IOobject::READ_IF_PRESENT,
143 if (this->
solution().resetSourcesOnStartup())
150 template<
class CloudType>
159 cloudCopyPtr_(
nullptr),
160 constProps_(
c.constProps_),
161 compositionModel_(
c.compositionModel_->clone()),
162 phaseChangeModel_(
c.phaseChangeModel_->clone()),
163 rhoTrans_(
c.rhoTrans_.size())
167 const word& specieName = this->
thermo().carrier().species()[i];
175 this->
name() +
":rhoTrans_" + specieName,
189 template<
class CloudType>
199 cloudCopyPtr_(
nullptr),
201 compositionModel_(
c.compositionModel_->clone()),
202 phaseChangeModel_(
nullptr),
209 template<
class CloudType>
213 const scalar lagrangianDt
216 CloudType::setParcelThermoProperties(parcel, lagrangianDt);
222 template<
class CloudType>
226 const scalar lagrangianDt,
227 const bool fullyDescribed
230 CloudType::checkParcelProperties(parcel, lagrangianDt, fullyDescribed);
234 checkSuppliedComposition
243 parcel.mass0() = parcel.mass();
247 template<
class CloudType>
254 clone(this->
name() +
"Copy").ptr()
260 template<
class CloudType>
263 cloudReset(cloudCopyPtr_());
264 cloudCopyPtr_.clear();
268 template<
class CloudType>
271 CloudType::resetSourceTerms();
274 rhoTrans_[i].field() = 0.0;
279 template<
class CloudType>
285 CloudType::relaxSources(cloudOldTime);
291 dsfType& rhoT = rhoTrans_[fieldi];
292 const dsfType& rhoT0 = cloudOldTime.
rhoTrans()[fieldi];
293 this->
relax(rhoT, rhoT0,
"rho");
298 template<
class CloudType>
301 CloudType::scaleSources();
307 dsfType& rhoT = rhoTrans_[fieldi];
308 this->scale(rhoT,
"rho");
313 template<
class CloudType>
318 typename parcelType::trackingData td(*
this);
320 this->
solve(*
this, td);
325 template<
class CloudType>
334 template<
class CloudType>
339 this->phaseChange().info(
Info);
343 template<
class CloudType>
346 if (compositionModel_)
353 template<
class CloudType>
356 CloudType::particleType::writeObjects(*
this, this->
composition(), obr);
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Templated phase change model class.
void resetSourceTerms()
Reset the cloud source terms.
virtual void writeFields() const
Write the field data for the cloud.
Selector class for relaxation factors, solver type and solution.
const word cloudName(propsDict.get< word >("cloud"))
A class for handling words, derived from Foam::string.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
static constexpr const zero Zero
Global zero (0)
void evolve()
Evolve the cloud.
psiReactionThermo & thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
ParticleType parcelType
Parcels are just particles.
basicSpecieMixture & composition
void scaleSources()
Apply scaling to (transient) cloud sources.
#define forAll(list, i)
Loop across all elements in list.
Registry of regIOobjects.
Templated reacting parcel composition model class Consists of carrier species (via thermo package),...
volScalarField::Internal & rhoTrans(const label i)
Mass.
messageStream Info
Information stream (stdout output on master, null elsewhere)
void setModels()
Set cloud sub-models.
Virtual abstract base class for templated ReactingCloud.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
DSMCCloud< dsmcParcel > CloudType
void storeState()
Store the current cloud state.
Mesh data needed to do the Finite Volume discretisation.
const uniformDimensionedVectorField & g
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
errorManip< error > abort(error &err)
PtrList< volScalarField > & Y
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Base cloud calls templated on particle type.
virtual void autoMap(const mapPolyMesh &)
Remap the cells of particles corresponding to the.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const dimensionedScalar c
Speed of light in a vacuum.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
void restoreState()
Reset the current cloud to the previously stored state.
void checkParcelProperties(parcelType &parcel, const scalar lagrangianDt, const bool fullyDescribed)
Check parcel properties.
void info()
Print cloud information.
void setParcelThermoProperties(parcelType &parcel, const scalar lagrangianDt)
Set parcel thermo properties.
virtual void writeObjects(objectRegistry &obr) const
Write particle fields as objects into the obr registry.
void relaxSources(const ReactingCloud< CloudType > &cloudOldTime)
Apply relaxation to (steady state) cloud sources.
void checkSuppliedComposition(const scalarField &YSupplied, const scalarField &Y, const word &YName)
Check that size of a composition field is valid.
void writeFields(const fvMesh &mesh, const wordHashSet &selectedFields, const bool writeFaceFields)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Templated base class for reacting cloud.
void cloudReset(ReactingCloud< CloudType > &c)
Reset state of cloud.