32 template<
class CloudType>
35 phaseChangeModel_.reset
39 this->subModelProperties(),
46 template<
class CloudType>
57 << YName <<
" supplied, but size is not compatible with " 58 <<
"parcel composition: " <<
nl <<
" " 59 << YName <<
"(" << YSupplied.
size() <<
") vs required composition " 60 << YName <<
"(" << Y.
size() <<
")" <<
nl 66 template<
class CloudType>
69 CloudType::cloudReset(c);
77 template<
class CloudType>
80 const word& cloudName,
88 CloudType(cloudName, rho, U, g, carrierThermo,
false),
89 cloudCopyPtr_(
nullptr),
90 constProps_(this->particleProperties()),
91 phaseChangeModel_(
nullptr)
95 rhoTrans_.setSize(this->
composition().carrier().species().size());
100 this->deleteLostParticles();
114 this->
name() +
":rhoTrans_" + specieName,
117 IOobject::READ_IF_PRESENT,
126 if (this->
solution().resetSourcesOnStartup())
133 template<
class CloudType>
141 cloudCopyPtr_(
nullptr),
156 this->
name() +
":rhoTrans_" + specieName,
170 template<
class CloudType>
179 cloudCopyPtr_(
nullptr),
181 phaseChangeModel_(
nullptr),
188 template<
class CloudType>
195 template<
class CloudType>
199 const scalar lagrangianDt
202 CloudType::setParcelThermoProperties(parcel, lagrangianDt);
208 template<
class CloudType>
212 const scalar lagrangianDt,
213 const bool fullyDescribed
216 CloudType::checkParcelProperties(parcel, lagrangianDt, fullyDescribed);
220 checkSuppliedComposition
229 parcel.mass0() = parcel.mass();
233 template<
class CloudType>
246 template<
class CloudType>
249 cloudReset(cloudCopyPtr_());
250 cloudCopyPtr_.clear();
254 template<
class CloudType>
257 CloudType::resetSourceTerms();
260 rhoTrans_[i].field() = 0.0;
265 template<
class CloudType>
271 CloudType::relaxSources(cloudOldTime);
277 dsfType& rhoT = rhoTrans_[fieldi];
278 const dsfType& rhoT0 = cloudOldTime.
rhoTrans()[fieldi];
279 this->
relax(rhoT, rhoT0,
"rho");
284 template<
class CloudType>
287 CloudType::scaleSources();
293 dsfType& rhoT = rhoTrans_[fieldi];
294 this->scale(rhoT,
"rho");
299 template<
class CloudType>
304 typename parcelType::trackingData td(*
this);
306 this->
solve(*
this, td);
311 template<
class CloudType>
320 template<
class CloudType>
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.
twoPhaseChangeModel & phaseChange
void setModels()
Set cloud sub-models.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
void evolve()
Evolve the cloud.
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
A class for handling words, derived from string.
Base-class for fluid thermodynamic properties.
autoPtr< PhaseChangeModel< ReactingCloud< CloudType > > > phaseChangeModel_
Reacting phase change model.
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.
const dimensionSet dimMass
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.
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.
ReactingCloud(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.
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.