diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C index 8bcc94cef2..03a8c01aa6 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C @@ -26,6 +26,18 @@ License #include "ReactingMultiphaseParcel.H" +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template +const Foam::label Foam::ReactingMultiphaseParcel::GAS(0); + +template +const Foam::label Foam::ReactingMultiphaseParcel::LIQUID(1); + +template +const Foam::label Foam::ReactingMultiphaseParcel::SOLID(2); + + // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // template @@ -34,13 +46,16 @@ Foam::scalar Foam::ReactingMultiphaseParcel::cpEff ( TrackData& td, const scalar p, - const scalar T + const scalar T, + const label idG, + const label idL, + const label idS ) const { return - this->Y_[0]*td.cloud().composition().cp(0, YGas_, p, T) - + this->Y_[1]*td.cloud().composition().cp(0, YLiquid_, p, T) - + this->Y_[2]*td.cloud().composition().cp(0, YSolid_, p, T); + this->Y_[GAS]*td.cloud().composition().cp(idG, YGas_, p, T) + + this->Y_[LIQUID]*td.cloud().composition().cp(idL, YLiquid_, p, T) + + this->Y_[SOLID]*td.cloud().composition().cp(idS, YSolid_, p, T); } @@ -50,13 +65,45 @@ Foam::scalar Foam::ReactingMultiphaseParcel::HEff ( TrackData& td, const scalar p, - const scalar T + const scalar T, + const label idG, + const label idL, + const label idS ) const { return - this->Y_[0]*td.cloud().composition().H(0, YGas_, p, T) - + this->Y_[1]*td.cloud().composition().H(0, YLiquid_, p, T) - + this->Y_[2]*td.cloud().composition().H(0, YSolid_, p, T); + this->Y_[GAS]*td.cloud().composition().H(idG, YGas_, p, T) + + this->Y_[LIQUID]*td.cloud().composition().H(idL, YLiquid_, p, T) + + this->Y_[SOLID]*td.cloud().composition().H(idS, YSolid_, p, T); +} + + +template +Foam::scalar Foam::ReactingMultiphaseParcel::updateMassFractions +( + const scalar mass0, + const scalarField& dMassGas, + const scalarField& dMassLiquid, + const scalarField& dMassSolid +) +{ + scalarList& YMix = this->Y_; + + scalar dMassGasTot = sum(dMassGas); + scalar dMassLiquidTot = sum(dMassLiquid); + scalar dMassSolidTot = sum(dMassSolid); + + this->updateMassFraction(mass0*YMix[GAS], dMassGas, YGas_); + this->updateMassFraction(mass0*YMix[LIQUID], dMassLiquid, YLiquid_); + this->updateMassFraction(mass0*YMix[SOLID], dMassSolid, YSolid_); + + scalar massNew = mass0 - (dMassGasTot + dMassLiquidTot + dMassSolidTot); + + YMix[GAS] = (mass0*YMix[GAS] - dMassGas)/massNew; + YMix[LIQUID] = (mass0*YMix[LIQUID] - dMassLiquid)/massNew; + YMix[SOLID] = 1.0 - YMix[GAS] - YMix[LIQUID]; + + return massNew; } @@ -93,6 +140,7 @@ void Foam::ReactingMultiphaseParcel::calc scalarField& YMix = this->Y_; const label idG = td.cloud().composition().idGas(); const label idL = td.cloud().composition().idLiquid(); + const label idS = td.cloud().composition().idSolid(); // Initialise transfer terms @@ -105,13 +153,16 @@ void Foam::ReactingMultiphaseParcel::calc scalar dhTrans = 0.0; // Mass transfer due to phase change - scalarList dMassPC(td.cloud().gases().size(), 0.0); + scalarField dMassPC(YLiquid_.size(), 0.0); // Mass transfer due to devolatilisation - scalarList dMassDV(td.cloud().gases().size(), 0.0); + scalarField dMassDV(YGas_.size(), 0.0); // Change in carrier phase composition due to surface reactions - scalarList dMassSRc(td.cloud().gases().size(), 0.0); + scalarField dMassSRGas(YGas_.size(), 0.0); + scalarField dMassSRLiquid(YLiquid_.size(), 0.0); + scalarField dMassSRSolid(YSolid_.size(), 0.0); + scalarField dMassSRc(td.cloud().gases().size(), 0.0); // Phase change in liquid phase @@ -121,26 +172,33 @@ void Foam::ReactingMultiphaseParcel::calc scalar ShPC = calcPhaseChange(td, dt, cellI, T0, idL, YMix[idL], YLiquid_, dMassPC); - // Update particle component mass fractions - this->updateMassFraction(mass0, dMassPC, YLiquid_); - // Devolatilisation // ~~~~~~~~~~~~~~~~ // Return enthalpy source and calc mass transfer due to devolatilisation - scalar ShDV = calcDevolatilisation(td, dt, T0, mass0, idG, YMix, dMassDV); + scalar ShDV = + calcDevolatilisation(td, dt, T0, mass0, idG, YMix, dMassDV); // Surface reactions // ~~~~~~~~~~~~~~~~~ - // Mass transfer of volatile components from particle to carrier phase - const scalarList dMassMT = dMassPC + dMassDV; - // Return enthalpy source and calc mass transfer(s) due to surface reaction scalar ShSR = - calcSurfaceReactions(td, dt, cellI, T0, dMassMT, dMassSRc, dhTrans); + calcSurfaceReactions + ( + td, + dt, + cellI, + T0, + dMassPC + dMassDV, // total volatiles evolved + dMassSRGas, + dMassSRLiquid, + dMassSRSolid, + dMassSRc, + dhTrans + ); // Heat transfer @@ -154,12 +212,20 @@ void Foam::ReactingMultiphaseParcel::calc scalar T1 = calcHeatTransfer(td, dt, cellI, Sh, htc, dhTrans); + // Update component mass fractions + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + scalarField dMassGas = dMassDV + dMassSRGas; + scalarField dMassLiquid = dMassPC + dMassSRLiquid; + scalarField dMassSolid = dMassSRSolid; + + scalar mass1 = + updateMassFractions(mass0, dMassGas, dMassLiquid, dMassSolid); + + // Motion // ~~~~~~ - // Update mass (not to include cMassSR) - scalar mass1 = mass0 - sum(dMassPC) - sum(dMassDV); - // No additional forces vector Fx = vector::zero; @@ -175,10 +241,25 @@ void Foam::ReactingMultiphaseParcel::calc if (td.cloud().coupled()) { // Transfer mass lost from particle to carrier mass source - forAll(dMassMT, i) + forAll(YGas_, i) { - td.cloud().rhoTrans(i)[cellI] += - np0*(dMassPC[i] + dMassDV[i] + dMassSRc[i]); + label id = td.composition().localToGlobalGasId(GAS, i); + td.cloud().rhoTrans(id)[cellI] += np0*dMassGas[i]; + } + forAll(YLiquid_, i) + { + label id = td.composition().localToGlobalGasId(LIQUID, i); + td.cloud().rhoTrans(id)[cellI] += np0*dMassLiquid[i]; + } + // No mapping between solid components and carrier phase +// forAll(YSolid_, i) +// { +// label id = td.composition().localToGlobalGasId(SOLID, i); +// td.cloud().rhoTrans(id)[cellI] += np0*dMassSolid[i]; +// } + forAll(dMassSRc, i) + { + td.cloud().rhoTrans(i)[cellI] += np0*dMassSRc[i]; } // Update momentum transfer @@ -203,13 +284,29 @@ void Foam::ReactingMultiphaseParcel::calc { td.keepParticle = false; - // Absorb particle(s) into carrier phase - forAll(dMassMT, i) + if (td.cloud().coupled()) { - td.cloud().rhoTrans(i)[cellI] += np0*dMassMT[i]; + // Absorb particle(s) into carrier phase + forAll(YGas_, i) + { + label id = td.composition().localToGlobalGasId(GAS, i); + td.cloud().rhoTrans(id)[cellI] += np0*dMassGas[i]; + } + forAll(YLiquid_, i) + { + label id = td.composition().localToGlobalGasId(LIQUID, i); + td.cloud().rhoTrans(id)[cellI] += np0*dMassLiquid[i]; + } + // No mapping between solid components and carrier phase +// forAll(YSolid_, i) +// { +// label id = td.composition().localToGlobalGasId(SOLID, i); +// td.cloud().rhoTrans(id)[cellI] += np0*dMassSolid[i]; +// } + + td.cloud().hTrans()[cellI] += np0*mass1*HEff(td, pc, T1, idG, idL, idS); + td.cloud().UTrans()[cellI] += np0*mass1*U1; } - td.cloud().hTrans()[cellI] += np0*mass1*HEff(td, pc, T1); - td.cloud().UTrans()[cellI] += np0*mass1*U1; } @@ -220,7 +317,7 @@ void Foam::ReactingMultiphaseParcel::calc { this->U_ = U1; this->T_ = T1; - this->cp_ = cpEff(td, pc, T1); + this->cp_ = cpEff(td, pc, T1, idG, idL, idS); // Update particle density or diameter if (td.constProps().constantVolume()) @@ -244,8 +341,8 @@ Foam::scalar Foam::ReactingMultiphaseParcel::calcDevolatilisation const scalar T, const scalar mass, const label idVolatile, - scalarField& YMixture, - scalarList& dMassDV + const scalarField& YMixture, + scalarList& dMass ) { // Check that model is active, and that the parcel temperature is @@ -268,15 +365,10 @@ Foam::scalar Foam::ReactingMultiphaseParcel::calcDevolatilisation mass, T, td.cloud().composition().YMixture0()[idVolatile], - YMixture[0], + YMixture[GAS], canCombust_ ); - // Update (total) mass fractions - YMixture[0] = (YMixture[0]*mass - dMassTot)/(mass - dMassTot); - YMixture[1] = YMixture[1]*mass/(mass - dMassTot); - YMixture[2] = 1.0 - YMixture[0] - YMixture[1]; - // Add to cummulative mass transfer forAll (YGas_, i) { @@ -284,7 +376,7 @@ Foam::scalar Foam::ReactingMultiphaseParcel::calcDevolatilisation // Volatiles mass transfer scalar volatileMass = YGas_[i]*dMassTot; - dMassDV[id] += volatileMass; + dMass[i] += volatileMass; } td.cloud().addToMassDevolatilisation(dMassTot); @@ -301,7 +393,10 @@ Foam::scalar Foam::ReactingMultiphaseParcel::calcSurfaceReactions const scalar dt, const label cellI, const scalar T, - const scalarList& dMassMT, + const scalarList& dMassVolatile, + scalarField& dMassSRGas, + scalarField& dMassSRLiquid, + scalarField& dMassSRSolid, scalarList& dMassSRc, scalar& dhTrans ) @@ -312,8 +407,7 @@ Foam::scalar Foam::ReactingMultiphaseParcel::calcSurfaceReactions return; } - // Update mass transfer(s) - // - Also updates Y()'s + // Update surface reactions scalar HReaction = td.cloud().surfaceReaction().calculate ( dt, @@ -324,13 +418,15 @@ Foam::scalar Foam::ReactingMultiphaseParcel::calcSurfaceReactions this->pc_, this->rhoc_, this->mass(), - dMassMT, YGas_, YLiquid_, YSolid_, this->Y_, - dMassSRc, - HReaction + dMassVolatile, + dMassSRGas, + dMassSRLiquid, + dMassSRSolid, + dMassSRc ); // Heat of reaction divided between particle and carrier phase by the diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H index 35ff4f296b..e213ddace8 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H @@ -149,17 +149,49 @@ private: //- Return the mixture effective specific heat capacity template - scalar cpEff(TrackData& td, const scalar p, const scalar T) const; + scalar cpEff + ( + TrackData& td, + const scalar p, + const scalar T, + const label idG, + const label idL, + const label idS + ) const; //- Return the mixture effective enthalpy template - scalar HEff(TrackData& td, const scalar p, const scalar T) const; + scalar HEff + ( + TrackData& td, + const scalar p, + const scalar T, + const label idG, + const label idL, + const label idS + ) const; + + //- Update the mass fractions (Y, YGas, YLiquid, YSolid) + scalar updateMassFractions + ( + const scalar mass0, + const scalarField& dMassGas, + const scalarField& dMassLiquid, + const scalarField& dMassSolid + ); protected: // Protected data + // IDs of phases in parent phase list + + static const label GAS; + static const label LIQUID; + static const label SOLID; + + // Parcel properties //- Mass fractions of gases [] @@ -187,8 +219,8 @@ protected: const scalar T, const scalar mass, const label idVolatile, - scalarField& YMixture, - scalarList& dMassDV + const scalarField& YMixture, + scalarList& dMass ); //- Calculate surface reactions @@ -199,7 +231,10 @@ protected: const scalar dt, const label cellI, const scalar T, - const scalarList& dMassMT, + const scalarList& dMassVolatile, + scalarField& dMassSRGas, + scalarField& dMassSRLiquid, + scalarField& dMassSRSolid, scalarList& dMassSRc, scalar& dhTrans ); diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C index 9756082ae8..cbb952181c 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C @@ -69,9 +69,9 @@ Foam::ReactingMultiphaseParcel::ReactingMultiphaseParcel // scale the mass fractions const scalarList& YMix = this->Y_; - YGas_ /= YMix[0] + ROOTVSMALL; - YLiquid_ /= YMix[1] + ROOTVSMALL; - YSolid_ /= YMix[2] + ROOTVSMALL; + YGas_ /= YMix[GAS] + ROOTVSMALL; + YLiquid_ /= YMix[LIQUID] + ROOTVSMALL; + YSolid_ /= YMix[SOLID] + ROOTVSMALL; } // Check state of Istream @@ -134,7 +134,7 @@ void Foam::ReactingMultiphaseParcel::readFields forAllIter(typename Cloud, c, iter) { ReactingMultiphaseParcel& p = iter(); - p.YGas_[j] = YGas[i++]/(p.Y()[0] + ROOTVSMALL); + p.YGas_[j] = YGas[i++]/(p.Y()[GAS] + ROOTVSMALL); } } // Populate YLiquid for each parcel @@ -153,7 +153,7 @@ void Foam::ReactingMultiphaseParcel::readFields forAllIter(typename Cloud, c, iter) { ReactingMultiphaseParcel& p = iter(); - p.YLiquid_[j] = YLiquid[i++]/(p.Y()[1] + ROOTVSMALL); + p.YLiquid_[j] = YLiquid[i++]/(p.Y()[LIQUID] + ROOTVSMALL); } } // Populate YSolid for each parcel @@ -172,7 +172,7 @@ void Foam::ReactingMultiphaseParcel::readFields forAllIter(typename Cloud, c, iter) { ReactingMultiphaseParcel& p = iter(); - p.YSolid_[j] = YSolid[i++]/(p.Y()[2] + ROOTVSMALL); + p.YSolid_[j] = YSolid[i++]/(p.Y()[SOLID] + ROOTVSMALL); } } } @@ -211,7 +211,7 @@ void Foam::ReactingMultiphaseParcel::writeFields forAllConstIter(typename Cloud, c, iter) { const ReactingMultiphaseParcel& p0 = iter(); - YGas[i++] = p0.YGas()[j]*p0.Y()[0]; + YGas[i++] = p0.YGas()[j]*p0.Y()[GAS]; } YGas.write(); @@ -235,7 +235,7 @@ void Foam::ReactingMultiphaseParcel::writeFields forAllConstIter(typename Cloud, c, iter) { const ReactingMultiphaseParcel& p0 = iter(); - YLiquid[i++] = p0.YLiquid()[j]*p0.Y()[1]; + YLiquid[i++] = p0.YLiquid()[j]*p0.Y()[LIQUID]; } YLiquid.write(); @@ -259,7 +259,7 @@ void Foam::ReactingMultiphaseParcel::writeFields forAllConstIter(typename Cloud, c, iter) { const ReactingMultiphaseParcel& p0 = iter(); - YSolid[i++] = p0.YSolid()[j]*p0.Y()[2]; + YSolid[i++] = p0.YSolid()[j]*p0.Y()[SOLID]; } YSolid.write(); diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C index b751f5c9eb..4ff61b6602 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C @@ -157,7 +157,8 @@ void Foam::ReactingParcel::calc // Absorb particle(s) into carrier phase forAll(Y_, i) { - td.cloud().rhoTrans(i)[cellI] += np0*mass1*Y_[i]; + label id = td.composition().localToGlobalGasId(0, i); + td.cloud().rhoTrans(id)[cellI] += np0*mass1*Y_[i]; } td.cloud().UTrans()[cellI] += np0*mass1*U1; scalar HEff = td.cloud().composition().H(0, Y_, pc_, T1); diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C index df2b1d9f6d..99d6fcfd0d 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C @@ -44,7 +44,7 @@ const Foam::NamedEnum // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::phaseProperties::setGlobalGasIds +void Foam::phaseProperties::setGlobalIds ( const PtrList& YGas ) @@ -111,6 +111,27 @@ void Foam::phaseProperties::setGlobalIds(const wordList& globalNames) } +void Foam::phaseProperties::setGlobalGasIds +( + const PtrList& YGas +) +{ + forAll(names_, i) + { + forAll (YGas, j) + { + word specieName = YGas[j].name(); + + if (specieName == names_[i]) + { + globalGasIds_[i] = j; + break; + } + } + } +} + + void Foam::phaseProperties::checkTotalMassFraction() const { scalar total = 0.0; @@ -209,17 +230,23 @@ void Foam::phaseProperties::initialiseGlobalIds { case GAS: { - setGlobalGasIds(YGas); + setGlobalIds(YGas); + forAll(globalGasIds_, i) + { + globalGasIds_[i] = globalIds_[i]; + } break; } case LIQUID: { setGlobalIds(liquidNames); + setGlobalGasIds(YGas); break; } case SOLID: { setGlobalIds(solidNames); + setGlobalGasIds(YGas); break; } default: @@ -330,6 +357,12 @@ const Foam::labelList& Foam::phaseProperties::globalIds() const } +const Foam::labelList& Foam::phaseProperties::globalGasIds() const +{ + return globalGasIds_; +} + + Foam::label Foam::phaseProperties::id(const word& cmptName) const { forAll(names_, cmptI) diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H index 139d2acc19..7e8b305143 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H @@ -88,15 +88,21 @@ private: //- Global ids labelList globalIds_; + //- Map to gas global id + labelList globalGasIds_; + // Private member functions //- Set global ids - specialisation for carrier gas phases - void setGlobalGasIds(const PtrList& YGas); + void setGlobalIds(const PtrList& YGas); //- Set global ids - liquid and solid phases void setGlobalIds(const wordList& globalNames); + //- Set global gas ids - attempts to map component names to global gases + void setGlobalGasIds(const PtrList& YGas); + //- Check the total mass fraction void checkTotalMassFraction() const; @@ -159,6 +165,9 @@ public: //- Return const acccess to the global ids const labelList& globalIds() const; + //- Return const acccess to the map to the gas global ids + const labelList& globalGasIds() const; + //- Return the global id of a component in the local list by name // Returns -1 if not found label globalId(const word& cmptName) const; diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C index b0c3937ea4..776a9b4d57 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C @@ -35,7 +35,8 @@ Foam::phaseProperties::phaseProperties(Istream& is) stateLabel_("(unknown)"), names_(0), Y_(0), - globalIds_(0) + globalIds_(0), + globalGasIds_(0) { is.check("Foam::phaseProperties::phaseProperties(Istream& is)"); @@ -66,6 +67,7 @@ Foam::phaseProperties::phaseProperties(Istream& is) // initialise global ids to -1 globalIds_.setSize(nComponents, -1); + globalGasIds_.setSize(nComponents, -1); checkTotalMassFraction(); } @@ -110,6 +112,7 @@ Foam::Istream& Foam::operator>>(Istream& is, phaseProperties& pp) // initialise global ids to -1 pp.globalIds_.setSize(nComponents, -1); + pp.globalGasIds_.setSize(nComponents, -1); pp.checkTotalMassFraction(); diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C index 36fd93c451..4bc06eaf84 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C @@ -240,6 +240,33 @@ Foam::label Foam::CompositionModel::localId } +template +Foam::label Foam::CompositionModel::localToGlobalGaslId +( + const label phaseI, + const label id +) const +{ + label gid = phaseProps_[phaseI].globalGasIds()[id]; + + if (gid < 0) + { + FatalErrorIn + ( + "Foam::label Foam::CompositionModel::localToGlobalGasId" + "(" + "const label, " + "const label" + ") const" + ) << "Unable to determine global gas id for phase " + << phaseI << " with local id " << id + << nl << abort(FatalError); + } + + return id; +} + + template const Foam::scalarField& Foam::CompositionModel::Y0 ( diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H index c5382a4f9f..fc01732314 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H @@ -187,6 +187,13 @@ public: //- Return local id of component cmptName in phase phaseI label localId(const label phaseI, const word& cmptName) const; + //- Return global gas id of component given local id + label localToGlobalGaslId + ( + const label phaseI, + const label id + ) const; + //- Return the list of phase phaseI mass fractions const scalarField& Y0(const label phaseI) const; diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.C index 4b92bb38df..0630158e28 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.C @@ -66,8 +66,11 @@ Foam::scalar Foam::NoSurfaceReaction::calculate const scalar, const scalar, const scalar, + const scalarField&, + const scalarField&, + const scalarField&, + const scalarList&, const scalarList&, - scalarField&, scalarField&, scalarField&, scalarField&, diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H index 75b729baa7..505902f8c8 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H @@ -84,11 +84,14 @@ public: const scalar pc, const scalar rhoc, const scalar mass, - const scalarList& dMassMT, - scalarField& YGas, - scalarField& YLiquid, - scalarField& YSolid, - scalarField& YMixture, + const scalarField& YGas, + const scalarField& YLiquid, + const scalarField& YSolid, + const scalarList& YMixture, + const scalarList& dMassVolatile, + scalarField& dMassGas, + scalarField& dMassLiquid, + scalarField& dMassSolid, scalarList& dMassSRc ) const; }; diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H index 5bc62e89eb..1a3b664d4a 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H @@ -143,11 +143,14 @@ public: const scalar pc, const scalar rhoc, const scalar mass, - const scalarList& dMassMT, - scalarField& YGas, - scalarField& YLiquid, - scalarField& YSolid, - scalarField& YMixture, + const scalarField& YGas, + const scalarField& YLiquid, + const scalarField& YSolid, + const scalarList& YMixture, + const scalarList& dMassVolatile, + scalarField& dMassGas, + scalarField& dMassLiquid, + scalarField& dMassSolid, scalarList& dMassSRc ) const = 0; };