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>
112 const label id = volatileToGasMap_[i];
113 const scalar massVolatile0 = mass0*YVolatile0_[i];
114 const scalar massVolatile = mass*YGasEff[id];
117 done = done && (massVolatile <= residualCoeff_*massVolatile0);
120 const scalar A0 = volatileData_[i].second();
123 dMassDV[id] =
min(dt*A0*massVolatile0, massVolatile);
126 if (done && canCombust != -1)
virtual void calculate(const scalar dt, const scalar age, 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.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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.
A class for handling words, derived from string.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
virtual ~ConstantRateDevolatilisation()
Destructor.
#define WarningInFunction
Report a warning using Foam::Warning.
Templated devolatilisation model class.
Templated base class for dsmc cloud.