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),
102 constProps_(this->particleProperties()),
103 compositionModel_(NULL),
104 phaseChangeModel_(NULL),
128 this->
name() +
":rhoTrans_" + specieName,
131 IOobject::READ_IF_PRESENT,
140 if (this->
solution().resetSourcesOnStartup())
147 template<
class CloudType>
164 const word& specieName = this->
thermo().carrier().species()[i];
172 this->
name() +
":rhoTrans_" + specieName,
186 template<
class CloudType>
200 phaseChangeModel_(NULL),
207 template<
class CloudType>
214 template<
class CloudType>
218 const scalar lagrangianDt
221 CloudType::setParcelThermoProperties(parcel, lagrangianDt);
223 parcel.pc() = this->
thermo().thermo().p()[parcel.cell()];
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>
260 clone(this->
name() +
"Copy").ptr()
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::template
325 TrackingData<ReactingCloud<CloudType>> td(*
this);
332 template<
class CloudType>
345 template<
class CloudType>
350 this->phaseChange().info(
Info);
354 template<
class CloudType>
359 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.
virtual void writeFields() const
Write the field data for the cloud.
#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.
Virtual abstract base class for templated ReactingCloud.
void setModels()
Set cloud sub-models.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
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.
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.
DimensionedField< scalar, volMesh > & 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.
Templated base class for reacting cloud.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
PtrList< DimensionedField< scalar, volMesh > > rhoTrans_
Mass transfer fields - one per carrier phase specie.
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...
const basicSpecieMixture & carrier() const
Return reference to the gaseous components.
void cloudReset(ReactingCloud< CloudType > &c)
Reset state of cloud.
const speciesTable & species() const
Return the table of species.
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.