33 template<
class CloudType>
36 devolatilisationModel_.reset
40 this->subModelProperties(),
45 surfaceReactionModel_.reset
49 this->subModelProperties(),
56 template<
class CloudType>
62 CloudType::cloudReset(
c);
64 devolatilisationModel_.reset(
c.devolatilisationModel_.ptr());
65 surfaceReactionModel_.reset(
c.surfaceReactionModel_.ptr());
67 dMassDevolatilisation_ =
c.dMassDevolatilisation_;
68 dMassSurfaceReaction_ =
c.dMassSurfaceReaction_;
74 template<
class CloudType>
86 cloudCopyPtr_(nullptr),
87 constProps_(this->particleProperties()),
88 devolatilisationModel_(nullptr),
89 surfaceReactionModel_(nullptr),
90 dMassDevolatilisation_(0.0),
91 dMassSurfaceReaction_(0.0)
101 if (this->
solution().resetSourcesOnStartup())
108 template<
class CloudType>
116 cloudCopyPtr_(nullptr),
117 constProps_(
c.constProps_),
118 devolatilisationModel_(
c.devolatilisationModel_->
clone()),
119 surfaceReactionModel_(
c.surfaceReactionModel_->
clone()),
120 dMassDevolatilisation_(
c.dMassDevolatilisation_),
121 dMassSurfaceReaction_(
c.dMassSurfaceReaction_)
125 template<
class CloudType>
134 cloudCopyPtr_(nullptr),
136 devolatilisationModel_(nullptr),
137 surfaceReactionModel_(nullptr),
138 dMassDevolatilisation_(0.0),
139 dMassSurfaceReaction_(0.0)
145 template<
class CloudType>
152 template<
class CloudType>
158 CloudType::setParcelThermoProperties(parcel);
160 label idGas = this->composition().idGas();
161 label idLiquid = this->composition().idLiquid();
162 label idSolid = this->composition().idSolid();
164 parcel.YGas() = this->composition().Y0(idGas);
165 parcel.YLiquid() = this->composition().Y0(idLiquid);
166 parcel.YSolid() = this->composition().Y0(idSolid);
170 template<
class CloudType>
174 const label injectori
177 CloudType::checkParcelProperties(parcel, injectori);
179 parcel.mass0() = parcel.mass();
181 if (injectori != -1 && this->injectors()[injectori].fullyDescribed())
183 label idGas = this->composition().idGas();
184 label idLiquid = this->composition().idLiquid();
185 label idSolid = this->composition().idSolid();
187 this->checkSuppliedComposition
190 this->composition().Y0(idGas),
193 this->checkSuppliedComposition
196 this->composition().Y0(idLiquid),
199 this->checkSuppliedComposition
202 this->composition().Y0(idSolid),
209 template<
class CloudType>
222 template<
class CloudType>
225 cloudReset(cloudCopyPtr_());
226 cloudCopyPtr_.clear();
230 template<
class CloudType>
233 CloudType::resetSourceTerms();
237 template<
class CloudType>
242 typename parcelType::trackingData td(*
this);
244 this->
solve(*
this, td);
249 template<
class CloudType>
254 this->devolatilisation().info(
Info);
255 this->surfaceReaction().info(
Info);
259 template<
class CloudType>
262 if (this->compositionModel_.valid())
264 CloudType::particleType::writeFields(*
this, this->composition());
268 CloudType::particleType::writeFields(*
this);
void deleteLostParticles()
Remove lost particles from cloud and delete.
Templated base class for dsmc cloud.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
void info() const
Print cloud information.
Templated devolatilisation model class.
Generic GeometricField class.
Templated base class for multiphase reacting cloud.
void setModels()
Set cloud sub-models.
void storeState()
Store the current cloud state.
ReactingMultiphaseCloud(const word &cloudName, const volScalarField &rho, const volVectorField &U, const dimensionedVector &g, const fluidThermo &carrierThermo, const bool readFields=true)
Construct given carrier fields and thermo.
virtual void writeFields() const
Write the field data for the cloud.
void evolve()
Evolve the cloud.
void info()
Print cloud information.
void restoreState()
Reset the current cloud to the previously stored state.
void cloudReset(ReactingMultiphaseCloud< CloudType > &c)
Reset state of cloud.
void checkParcelProperties(parcelType &parcel, const label injectori)
Check parcel properties.
void resetSourceTerms()
Reset the cloud source terms.
void setParcelThermoProperties(parcelType &parcel)
Set parcel thermo properties.
virtual ~ReactingMultiphaseCloud()
Destructor.
Templated surface reaction model class.
Base-class for fluid thermodynamic properties.
Mesh data needed to do the Finite Volume discretisation.
Selector class for relaxation factors, solver type and solution.
A class for handling words, derived from string.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
const dimensionedScalar c
Speed of light in a vacuum.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const bool)
Return a word representation of a bool.
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.
SolverPerformance< Type > solve(fvMatrix< Type > &, const word &)
Solve returning the solution statistics given convergence tolerance.
const word cloudName(propsDict.lookup("cloudName"))