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);
228 template<
class CloudType>
232 const scalar lagrangianDt,
233 const bool fullyDescribed
236 CloudType::checkParcelProperties(parcel, lagrangianDt, fullyDescribed);
240 checkSuppliedComposition
249 parcel.mass0() = parcel.mass();
253 template<
class CloudType>
266 template<
class CloudType>
269 cloudReset(cloudCopyPtr_());
270 cloudCopyPtr_.clear();
274 template<
class CloudType>
277 CloudType::resetSourceTerms();
280 rhoTrans_[i].field() = 0.0;
285 template<
class CloudType>
291 CloudType::relaxSources(cloudOldTime);
297 dsfType& rhoT = rhoTrans_[fieldi];
298 const dsfType& rhoT0 = cloudOldTime.
rhoTrans()[fieldi];
299 this->
relax(rhoT, rhoT0,
"rho");
304 template<
class CloudType>
307 CloudType::scaleSources();
313 dsfType& rhoT = rhoTrans_[fieldi];
314 this->scale(rhoT,
"rho");
319 template<
class CloudType>
324 typename parcelType::trackingData td(*
this);
326 this->
solve(*
this, td);
331 template<
class CloudType>
340 template<
class CloudType>
345 this->phaseChange().info(
Info);
349 template<
class CloudType>
352 if (compositionModel_.valid())
354 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.
basicSpecieMixture & 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.
rhoReactionThermo & thermo
virtual void writeFields() const
Write the field data for the cloud.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
ReactingCloud(const word &cloudName, const volScalarField &rho, const volVectorField &U, const dimensionedVector &g, const SLGThermo &thermo, bool readFields=true)
Construct given carrier gas fields.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
void evolve()
Evolve the cloud.
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.