33 template<
class CloudType>
36 compositionModel_.reset
40 this->subModelProperties(),
45 phaseChangeModel_.reset
49 this->subModelProperties(),
56 template<
class CloudType>
67 << YName <<
" supplied, but size is not compatible with " 68 <<
"parcel composition: " <<
nl <<
" " 69 << YName <<
"(" << YSupplied.
size() <<
") vs required composition " 70 << YName <<
"(" << Y.
size() <<
")" <<
nl 76 template<
class CloudType>
79 CloudType::cloudReset(c);
88 template<
class CloudType>
91 const word& cloudName,
99 CloudType(cloudName, rho, U, g, thermo,
false),
101 cloudCopyPtr_(
nullptr),
102 constProps_(this->particleProperties()),
103 compositionModel_(
nullptr),
104 phaseChangeModel_(
nullptr),
114 this->deleteLostParticles();
129 this->
name() +
":rhoTrans_" + specieName,
132 IOobject::READ_IF_PRESENT,
141 if (this->
solution().resetSourcesOnStartup())
148 template<
class CloudType>
157 cloudCopyPtr_(
nullptr),
165 const word& specieName = this->
thermo().carrier().species()[i];
173 this->
name() +
":rhoTrans_" + specieName,
187 template<
class CloudType>
197 cloudCopyPtr_(
nullptr),
201 phaseChangeModel_(
nullptr),
208 template<
class CloudType>
215 template<
class CloudType>
219 const scalar lagrangianDt
222 CloudType::setParcelThermoProperties(parcel, lagrangianDt);
224 parcel.pc() = this->
thermo().thermo().p()[parcel.cell()];
229 template<
class CloudType>
233 const scalar lagrangianDt,
234 const bool fullyDescribed
237 CloudType::checkParcelProperties(parcel, lagrangianDt, fullyDescribed);
241 checkSuppliedComposition
250 parcel.mass0() = parcel.mass();
254 template<
class CloudType>
261 clone(this->
name() +
"Copy").ptr()
267 template<
class CloudType>
270 cloudReset(cloudCopyPtr_());
271 cloudCopyPtr_.clear();
275 template<
class CloudType>
278 CloudType::resetSourceTerms();
281 rhoTrans_[i].field() = 0.0;
286 template<
class CloudType>
292 CloudType::relaxSources(cloudOldTime);
298 dsfType& rhoT = rhoTrans_[fieldi];
299 const dsfType& rhoT0 = cloudOldTime.
rhoTrans()[fieldi];
300 this->
relax(rhoT, rhoT0,
"rho");
305 template<
class CloudType>
308 CloudType::scaleSources();
314 dsfType& rhoT = rhoTrans_[fieldi];
315 this->scale(rhoT,
"rho");
320 template<
class CloudType>
325 typename parcelType::template
326 TrackingData<ReactingCloud<CloudType>> td(*
this);
333 template<
class CloudType>
342 template<
class CloudType>
347 this->phaseChange().info(
Info);
351 template<
class CloudType>
354 if (compositionModel_.valid())
356 CloudType::particleType::writeFields(*
this, this->
composition());
virtual ~ReactingCloud()
Destructor.
void resetSourceTerms()
Reset the cloud source terms.
#define forAll(list, i)
Loop across all elements in list.
DSMCCloud< dsmcParcel > CloudType
Templated phase change model class.
void storeState()
Store the current cloud state.
parcelType::constantProperties constProps_
Parcel constant properties.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const HashSet< word > &selectedFields, LIFOStack< regIOobject *> &storedObjects)
Read the selected GeometricFields of the specified type.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
basicMultiComponentMixture & composition
void size(const label)
Override size to be inconsistent with allocated storage.
void setParcelThermoProperties(parcelType &parcel, const scalar lagrangianDt)
Set parcel thermo properties.
void restoreState()
Reset the current cloud to the previously stored state.
const speciesTable & species() const
Return the table of species.
Virtual abstract base class for templated ReactingCloud.
void setModels()
Set cloud sub-models.
virtual void writeFields() const
Write the field data for the cloud.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
void evolve()
Evolve the cloud.
psiReactionThermo & thermo
A class for handling words, derived from string.
autoPtr< PhaseChangeModel< ReactingCloud< CloudType > > > phaseChangeModel_
Reacting phase change model.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package, and provides:
errorManip< error > abort(error &err)
void checkParcelProperties(parcelType &parcel, const scalar lagrangianDt, const bool fullyDescribed)
Check parcel properties.
Base cloud calls templated on particle type.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
volScalarField::Internal & rhoTrans(const label i)
Mass.
autoPtr< CompositionModel< ReactingCloud< CloudType > > > compositionModel_
Reacting composition model.
word name(const complex &)
Return a string representation of a complex.
virtual void autoMap(const mapPolyMesh &)
Remap the cells of particles corresponding to the.
void scaleSources()
Apply scaling to (transient) cloud sources.
const basicSpecieMixture & carrier() const
Return reference to the gaseous components.
Templated base class for reacting cloud.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Mesh data needed to do the Finite Volume discretisation.
void info()
Print cloud information.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
void cloudReset(ReactingCloud< CloudType > &c)
Reset state of cloud.
PtrList< volScalarField::Internal > rhoTrans_
Mass transfer fields - one per carrier phase specie.
void checkSuppliedComposition(const scalarField &YSupplied, const scalarField &Y, const word &YName)
Check that size of a composition field is valid.
Selector class for relaxation factors, solver type and solution.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Templated reacting parcel composition model class Consists of carrier species (via thermo package)...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void relaxSources(const ReactingCloud< CloudType > &cloudOldTime)
Apply relaxation to (steady state) cloud sources.