32 template<
class CloudType>
40 volatileData_(this->coeffDict().
lookup(
"volatileData")),
41 YVolatile0_(volatileData_.size()),
42 volatileToGasMap_(volatileData_.size()),
43 residualCoeff_(this->coeffDict().getScalar(
"residualCoeff"))
45 if (volatileData_.empty())
48 <<
"Devolatilisation model selected, but no volatiles defined" 53 Info<<
"Participating volatile species:" <<
endl;
56 const label idGas =
owner.composition().idGas();
57 const scalar YGasTot =
owner.composition().YMixture0()[idGas];
61 const word& specieName = volatileData_[i].first();
62 const label
id =
owner.composition().localId(idGas, specieName);
63 volatileToGasMap_[i] = id;
64 YVolatile0_[i] = YGasTot*YGas[id];
66 Info<<
" " << specieName <<
": particle mass fraction = " 67 << YVolatile0_[i] <<
endl;
73 template<
class CloudType>
76 const ConstantRateDevolatilisation<CloudType>& dm
80 volatileData_(dm.volatileData_),
81 YVolatile0_(dm.YVolatile0_),
82 volatileToGasMap_(dm.volatileToGasMap_),
83 residualCoeff_(dm.residualCoeff_)
89 template<
class CloudType>
96 template<
class CloudType>
114 const label
id = volatileToGasMap_[i];
115 const scalar massVolatile0 = mass0*YVolatile0_[i];
116 const scalar massVolatile = mass*YGasEff[id];
119 done = done && (massVolatile <= residualCoeff_*massVolatile0);
122 const scalar A0 = volatileData_[i].second();
125 dMassDV[id] =
min(dt*A0*massVolatile0, massVolatile);
128 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.
DSMCCloud< dsmcParcel > CloudType
A list of keyword definitions, which are a keyword followed by a number of values (eg...
constexpr char nl
The newline '\n' character (0x0a)
ConstantRateDevolatilisation(const dictionary &dict, CloudType &owner)
Construct from dictionary.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Lookup type of boundary radiation properties.
const CloudType & owner() const
Return const access to the owner cloud.
#define forAll(list, i)
Loop across all elements in list.
A class for handling words, derived from Foam::string.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
virtual ~ConstantRateDevolatilisation()
Destructor.
#define WarningInFunction
Report a warning using Foam::Warning.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Templated devolatilisation model class.
Templated base class for dsmc cloud.