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];
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>
86 const typename CloudType::parcelType::trackingData& td,
101 const label id = volatileToGasMap_[i];
102 const scalar massVolatile0 = mass0*YVolatile0_[i];
103 const scalar massVolatile = mass*YGasEff[id];
106 done = done && (massVolatile <= residualCoeff_*massVolatile0);
109 const scalar A1 = volatileData_[i].A1();
110 const scalar E = volatileData_[i].E();
116 dMassDV[id] =
min(dt*
kappa*massVolatile, massVolatile);
119 if (done && canCombust != -1)
#define forAll(list, i)
Loop across all elements in list.
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Templated devolatilisation model class.
SingleKineticRateDevolatilisation(const dictionary &dict, CloudType &owner)
Construct from dictionary.
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.
virtual ~SingleKineticRateDevolatilisation()
Destructor.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
A list of keyword definitions, which are a keyword followed by any number of values (e....
A class for handling words, derived from string.
#define WarningInFunction
Report a warning using Foam::Warning.
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
const dimensionedScalar RR
Universal gas constant: default SI units: [J/kmol/K].
dimensionedScalar exp(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)