30 template<
class CloudType>
38 volatileData_(this->coeffDict().lookup(
"volatileData")),
39 YVolatile0_(volatileData_.size()),
40 volatileToGasMap_(volatileData_.size()),
41 residualCoeff_(this->coeffDict().template lookup<scalar>(
"residualCoeff"))
43 if (volatileData_.empty())
46 <<
"Devolatilisation model selected, but no volatiles defined" 51 Info<<
"Participating volatile species:" <<
endl;
54 const label idGas = owner.composition().idGas();
55 const scalar YGasTot = owner.composition().YMixture0()[idGas];
56 const scalarField& YGas = owner.composition().Y0(idGas);
59 const word& specieName = volatileData_[i].first();
60 const label id = owner.composition().localId(idGas, specieName);
61 volatileToGasMap_[i] = id;
62 YVolatile0_[i] = YGasTot*YGas[id];
64 Info<<
" " << specieName <<
": particle mass fraction = " 65 << YVolatile0_[i] <<
endl;
71 template<
class CloudType>
78 volatileData_(dm.volatileData_),
79 YVolatile0_(dm.YVolatile0_),
80 volatileToGasMap_(dm.volatileToGasMap_),
81 residualCoeff_(dm.residualCoeff_)
87 template<
class CloudType>
94 template<
class CloudType>
98 const typename CloudType::parcelType::trackingData& td,
113 const label id = volatileToGasMap_[i];
114 const scalar massVolatile0 = mass0*YVolatile0_[i];
115 const scalar massVolatile = mass*YGasEff[id];
118 done = done && (massVolatile <= residualCoeff_*massVolatile0);
121 const scalar A0 = volatileData_[i].second();
124 dMassDV[id] =
min(dt*A0*massVolatile0, massVolatile);
127 if (done && canCombust != -1)
#define forAll(list, i)
Loop across all elements in list.
A list of keyword definitions, which are a keyword followed by any number of values (e...
ConstantRateDevolatilisation(const dictionary &dict, CloudType &owner)
Construct from dictionary.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Constant rate devolatisation model.
virtual void calculate(const typename CloudType::parcelType &p, const typename CloudType::parcelType::trackingData &td, const scalar dt, const scalar mass0, const scalar mass, const scalar T, const scalarField &YGasEff, const scalarField &YLiquidEff, const scalarField &YSolidEff, label &canCombust, scalarField &dMassDV) const
Update model.
A class for handling words, derived from string.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
ParcelType parcelType
Type of parcel the cloud was instantiated for.
virtual ~ConstantRateDevolatilisation()
Destructor.
#define WarningInFunction
Report a warning using Foam::Warning.
Templated devolatilisation model class.
Templated base class for dsmc cloud.