Foam::SingleKineticRateDevolatilisation<CloudType>:: SingleKineticRateDevolatilisation ( const dictionary& dict, CloudType& owner ) : DevolatilisationModel<CloudType>(dict, owner, typeName), volatileData_(this->coeffDict().lookup("volatileData")), YVolatile0_(volatileData_.size()), volatileToGasMap_(volatileData_.size()), residualCoeff_(readScalar(this->coeffDict().lookup("residualCoeff"))) { if (volatileData_.empty()) { WarningIn ( "Foam::SingleKineticRateDevolatilisation<CloudType>::" "SingleKineticRateDevolatilisation" "(" "const dictionary& dict, " "CloudType& owner" ")" ) << "Devolatilisation model selected, but no volatiles defined" << nl << endl; } else { Info<< "Participating volatile species:" << endl; // Determine mapping between active volatiles and cloud gas components const label idGas = owner.composition().idGas(); const scalar YGasTot = owner.composition().YMixture0()[idGas]; const scalarField& YGas = owner.composition().Y0(idGas); forAll(volatileData_, i) { const word& specieName = volatileData_[i].name(); const label id = owner.composition().localId(idGas, specieName); volatileToGasMap_[i] = id; YVolatile0_[i] = YGasTot*YGas[id]; Info<< " " << specieName << ": particle mass fraction = " << YVolatile0_[i] << endl; } } }
Foam::COxidationKineticDiffusionLimitedRate<CloudType>:: COxidationKineticDiffusionLimitedRate ( const dictionary& dict, CloudType& owner ) : SurfaceReactionModel<CloudType>(dict, owner, typeName), Sb_(readScalar(this->coeffDict().lookup("Sb"))), C1_(readScalar(this->coeffDict().lookup("C1"))), C2_(readScalar(this->coeffDict().lookup("C2"))), E_(readScalar(this->coeffDict().lookup("E"))), CsLocalId_(-1), O2GlobalId_(owner.composition().globalCarrierId("O2")), CO2GlobalId_(owner.composition().globalCarrierId("CO2")), WC_(0.0), WO2_(0.0), HcCO2_(0.0) { // Determine Cs ids label idSolid = owner.composition().idSolid(); CsLocalId_ = owner.composition().localId(idSolid, "C"); // Set local copies of thermo properties WO2_ = owner.thermo().carrier().W(O2GlobalId_); const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_); WC_ = WCO2 - WO2_; HcCO2_ = owner.thermo().carrier().Hc(CO2GlobalId_); const scalar YCloc = owner.composition().Y0(idSolid)[CsLocalId_]; const scalar YSolidTot = owner.composition().YMixture0()[idSolid]; Info<< " C(s): particle mass fraction = " << YCloc*YSolidTot << endl; }
Foam::LiquidEvaporation<CloudType>::LiquidEvaporation ( const dictionary& dict, CloudType& owner ) : PhaseChangeModel<CloudType>(dict, owner, typeName), liquids_ ( liquidMixture::New ( owner.mesh().objectRegistry::template lookupObject<dictionary> ( owner.carrierThermo().name() ) ) ), activeLiquids_(this->coeffDict().lookup("activeLiquids")), liqToCarrierMap_(activeLiquids_.size(), -1), liqToLiqMap_(activeLiquids_.size(), -1) { if (activeLiquids_.size() == 0) { WarningIn ( "Foam::LiquidEvaporation<CloudType>::LiquidEvaporation" "(" "const dictionary& dict, " "CloudType& owner" ")" ) << "Evaporation model selected, but no active liquids defined" << nl << endl; } // Determine mapping between liquid and carrier phase species forAll(activeLiquids_, i) { liqToCarrierMap_[i] = owner.composition().globalCarrierId(activeLiquids_[i]); }
Foam::COxidationDiffusionLimitedRate<CloudType>::COxidationDiffusionLimitedRate ( const dictionary& dict, CloudType& owner ) : SurfaceReactionModel<CloudType>(dict, owner, typeName), Sb_(readScalar(this->coeffDict().lookup("Sb"))), D_(readScalar(this->coeffDict().lookup("D"))), CsLocalId_(-1), O2GlobalId_(owner.composition().carrierId("O2")), CO2GlobalId_(owner.composition().carrierId("CO2")), WC_(0.0), WO2_(0.0), HcCO2_(0.0) { // Determine Cs ids label idSolid = owner.composition().idSolid(); CsLocalId_ = owner.composition().localId(idSolid, "C"); // Set local copies of thermo properties WO2_ = owner.thermo().carrier().W(O2GlobalId_); const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_); WC_ = WCO2 - WO2_; HcCO2_ = owner.thermo().carrier().Hc(CO2GlobalId_); if (Sb_ < 0) { FatalErrorIn ( "COxidationDiffusionLimitedRate<CloudType>" "(" "const dictionary&, " "CloudType&" ")" ) << "Stoichiometry of reaction, Sb, must be greater than zero" << nl << exit(FatalError); } const scalar YCloc = owner.composition().Y0(idSolid)[CsLocalId_]; const scalar YSolidTot = owner.composition().YMixture0()[idSolid]; Info<< " C(s): particle mass fraction = " << YCloc*YSolidTot << endl; }
Foam::COxidationHurtMitchell<CloudType>::COxidationHurtMitchell ( const dictionary& dict, CloudType& owner ) : SurfaceReactionModel<CloudType>(dict, owner, typeName), Sb_(readScalar(this->coeffDict().lookup("Sb"))), CsLocalId_(-1), ashLocalId_(-1), O2GlobalId_(owner.composition().globalCarrierId("O2")), CO2GlobalId_(owner.composition().globalCarrierId("CO2")), WC_(0.0), WO2_(0.0), HcCO2_(0.0), heatOfReaction_(-1.0) { // Determine Cs and ash ids label idSolid = owner.composition().idSolid(); CsLocalId_ = owner.composition().localId(idSolid, "C"); ashLocalId_ = owner.composition().localId(idSolid, "ash", true); // Set local copies of thermo properties WO2_ = owner.thermo().carrier().W(O2GlobalId_); const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_); WC_ = WCO2 - WO2_; HcCO2_ = owner.thermo().carrier().Hc(CO2GlobalId_); const scalar YCloc = owner.composition().Y0(idSolid)[CsLocalId_]; const scalar YSolidTot = owner.composition().YMixture0()[idSolid]; Info<< " C(s): particle mass fraction = " << YCloc*YSolidTot << endl; if (this->coeffDict().readIfPresent("heatOfReaction", heatOfReaction_)) { Info<< " Using user specified heat of reaction: " << heatOfReaction_ << " [J/kg]" << endl; } }