30 template<
class CloudType>
39 volatileData_(this->coeffDict().lookup(
"volatileData")),
40 YVolatile0_(volatileData_.size()),
41 volatileToGasMap_(volatileData_.size()),
42 residualCoeff_(this->coeffDict().template lookup<scalar>(
"residualCoeff"))
44 if (volatileData_.empty())
47 <<
"Devolatilisation model selected, but no volatiles defined" 52 Info<<
"Participating volatile species:" <<
endl;
55 const label idGas = owner.composition().idGas();
56 const scalar YGasTot = owner.composition().YMixture0()[idGas];
57 const scalarField& YGas = owner.composition().Y0(idGas);
60 const word& specieName = volatileData_[i].name();
61 const label id = owner.composition().localId(idGas, specieName);
62 volatileToGasMap_[i] = id;
63 YVolatile0_[i] = YGasTot*YGas[id];
65 Info<<
" " << specieName <<
": particle mass fraction = " 66 << YVolatile0_[i] <<
endl;
74 template<
class CloudType>
82 template<
class CloudType>
100 const label id = volatileToGasMap_[i];
101 const scalar massVolatile0 = mass0*YVolatile0_[i];
102 const scalar massVolatile = mass*YGasEff[id];
105 done = done && (massVolatile <= residualCoeff_*massVolatile0);
108 const scalar A1 = volatileData_[i].A1();
109 const scalar E = volatileData_[i].E();
115 dMassDV[id] =
min(dt*kappa*massVolatile, massVolatile);
118 if (done && canCombust != -1)
#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...
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionedScalar RR
Universal gas constant: default SI units: [J/kmol/K].
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
dimensionedScalar exp(const dimensionedScalar &ds)
A class for handling words, derived from string.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
#define WarningInFunction
Report a warning using Foam::Warning.
Templated devolatilisation model class.
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.
virtual ~SingleKineticRateDevolatilisation()
Destructor.
Templated base class for dsmc cloud.
SingleKineticRateDevolatilisation(const dictionary &dict, CloudType &owner)
Construct from dictionary.