mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated cloud enthalpy coupling
This commit is contained in:
@ -44,8 +44,7 @@ Foam::COxidationDiffusionLimitedRate<CloudType>::COxidationDiffusionLimitedRate
|
||||
O2GlobalId_(owner.composition().globalCarrierId("O2")),
|
||||
CO2GlobalId_(owner.composition().globalCarrierId("CO2")),
|
||||
WC_(0.0),
|
||||
WO2_(0.0),
|
||||
HcCO2_(0.0)
|
||||
WO2_(0.0)
|
||||
{
|
||||
// Determine Cs ids
|
||||
label idSolid = owner.composition().idSolid();
|
||||
@ -55,7 +54,6 @@ Foam::COxidationDiffusionLimitedRate<CloudType>::COxidationDiffusionLimitedRate
|
||||
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)
|
||||
{
|
||||
@ -89,8 +87,7 @@ Foam::COxidationDiffusionLimitedRate<CloudType>::COxidationDiffusionLimitedRate
|
||||
O2GlobalId_(srm.O2GlobalId_),
|
||||
CO2GlobalId_(srm.CO2GlobalId_),
|
||||
WC_(srm.WC_),
|
||||
WO2_(srm.WO2_),
|
||||
HcCO2_(srm.HcCO2_)
|
||||
WO2_(srm.WO2_)
|
||||
{}
|
||||
|
||||
|
||||
@ -160,12 +157,12 @@ Foam::scalar Foam::COxidationDiffusionLimitedRate<CloudType>::calculate
|
||||
dMassSRCarrier[O2GlobalId_] -= dmO2;
|
||||
dMassSRCarrier[CO2GlobalId_] += dmCO2;
|
||||
|
||||
const scalar HsC = thermo.solids().properties()[CsLocalId_].Hs(T);
|
||||
const scalar HC = thermo.solids().properties()[CsLocalId_].H(T);
|
||||
const scalar HCO2 = thermo.carrier().H(CO2GlobalId_, T);
|
||||
const scalar HO2 = thermo.carrier().H(O2GlobalId_, T);
|
||||
|
||||
// Heat of reaction [J]
|
||||
// Sensible enthalpy contributions due to O2 depletion and CO2 generation
|
||||
// handled by particle transfer terms
|
||||
return dmC*HsC - dmCO2*HcCO2_;
|
||||
return dmC*HC + dmO2*HO2 - dmCO2*HCO2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -86,9 +86,6 @@ class COxidationDiffusionLimitedRate
|
||||
//- Molecular weight of O2 [kg/kmol]
|
||||
scalar WO2_;
|
||||
|
||||
//- Chemical enthalpy of CO2 [J/kg]
|
||||
scalar HcCO2_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -45,8 +45,7 @@ COxidationKineticDiffusionLimitedRate
|
||||
O2GlobalId_(owner.composition().globalCarrierId("O2")),
|
||||
CO2GlobalId_(owner.composition().globalCarrierId("CO2")),
|
||||
WC_(0.0),
|
||||
WO2_(0.0),
|
||||
HcCO2_(0.0)
|
||||
WO2_(0.0)
|
||||
{
|
||||
// Determine Cs ids
|
||||
label idSolid = owner.composition().idSolid();
|
||||
@ -56,7 +55,6 @@ COxidationKineticDiffusionLimitedRate
|
||||
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];
|
||||
@ -80,8 +78,7 @@ COxidationKineticDiffusionLimitedRate
|
||||
O2GlobalId_(srm.O2GlobalId_),
|
||||
CO2GlobalId_(srm.CO2GlobalId_),
|
||||
WC_(srm.WC_),
|
||||
WO2_(srm.WO2_),
|
||||
HcCO2_(srm.HcCO2_)
|
||||
WO2_(srm.WO2_)
|
||||
{}
|
||||
|
||||
|
||||
@ -163,12 +160,12 @@ Foam::scalar Foam::COxidationKineticDiffusionLimitedRate<CloudType>::calculate
|
||||
dMassSRCarrier[O2GlobalId_] -= dmO2;
|
||||
dMassSRCarrier[CO2GlobalId_] += dmCO2;
|
||||
|
||||
const scalar HsC = thermo.solids().properties()[CsLocalId_].Hs(T);
|
||||
const scalar HC = thermo.solids().properties()[CsLocalId_].H(T);
|
||||
const scalar HCO2 = thermo.carrier().H(CO2GlobalId_, T);
|
||||
const scalar HO2 = thermo.carrier().H(O2GlobalId_, T);
|
||||
|
||||
// Heat of reaction [J]
|
||||
// Sensible enthalpy contributions due to O2 depletion and CO2 generation
|
||||
// handled by particle transfer terms
|
||||
return dmC*HsC - dmCO2*HcCO2_;
|
||||
return dmC*HC + dmO2*HO2 - dmCO2*HCO2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -94,9 +94,6 @@ class COxidationKineticDiffusionLimitedRate
|
||||
//- Molecular weight of O2 [kg/kmol]
|
||||
scalar WO2_;
|
||||
|
||||
//- Chemical enthalpy of CO2 [J/kg]
|
||||
scalar HcCO2_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -57,8 +57,7 @@ Foam::COxidationMurphyShaddix<CloudType>::COxidationMurphyShaddix
|
||||
O2GlobalId_(owner.composition().globalCarrierId("O2")),
|
||||
CO2GlobalId_(owner.composition().globalCarrierId("CO2")),
|
||||
WC_(0.0),
|
||||
WO2_(0.0),
|
||||
HcCO2_(0.0)
|
||||
WO2_(0.0)
|
||||
{
|
||||
// Determine Cs ids
|
||||
label idSolid = owner.composition().idSolid();
|
||||
@ -68,7 +67,6 @@ Foam::COxidationMurphyShaddix<CloudType>::COxidationMurphyShaddix
|
||||
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];
|
||||
@ -95,8 +93,7 @@ Foam::COxidationMurphyShaddix<CloudType>::COxidationMurphyShaddix
|
||||
O2GlobalId_(srm.O2GlobalId_),
|
||||
CO2GlobalId_(srm.CO2GlobalId_),
|
||||
WC_(srm.WC_),
|
||||
WO2_(srm.WO2_),
|
||||
HcCO2_(srm.HcCO2_)
|
||||
WO2_(srm.WO2_)
|
||||
{}
|
||||
|
||||
|
||||
@ -223,12 +220,12 @@ Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate
|
||||
// Add to particle mass transfer
|
||||
dMassSolid[CsLocalId_] += dOmega*WC_;
|
||||
|
||||
const scalar HsC = thermo.solids().properties()[CsLocalId_].Hs(T);
|
||||
const scalar HC = thermo.solids().properties()[CsLocalId_].H(T);
|
||||
const scalar HCO2 = thermo.carrier().H(CO2GlobalId_, T);
|
||||
const scalar HO2 = thermo.carrier().H(O2GlobalId_, T);
|
||||
|
||||
// Heat of reaction [J]
|
||||
// Sensible enthalpy contributions due to O2 depletion and CO2 generation
|
||||
// handled by particle transfer terms
|
||||
return dOmega*(WC_*HsC - (WC_ + WO2_)*HcCO2_);
|
||||
// Heat of reaction
|
||||
return dOmega*(WC_*HC + WO2_*HO2 - (WC_ + WO2_)*HCO2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -115,9 +115,6 @@ class COxidationMurphyShaddix
|
||||
//- Molecular weight of O2 [kg/kmol]
|
||||
scalar WO2_;
|
||||
|
||||
//- Chemical enthalpy of CO2 [J/kg]
|
||||
scalar HcCO2_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -382,16 +382,11 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
{
|
||||
label gid = td.cloud().composition().localToGlobalCarrierId(GAS, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += np0*dMassGas[i];
|
||||
td.cloud().hsTrans()[cellI] +=
|
||||
np0*dMassGas[i]*td.cloud().composition().carrier().Hs(gid, T0);
|
||||
}
|
||||
forAll(YLiquid_, i)
|
||||
{
|
||||
label gid = td.cloud().composition().localToGlobalCarrierId(LIQ, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += np0*dMassLiquid[i];
|
||||
td.cloud().hsTrans()[cellI] +=
|
||||
np0*dMassLiquid[i]
|
||||
*td.cloud().composition().carrier().Hs(gid, T0);
|
||||
}
|
||||
/*
|
||||
// No mapping between solid components and carrier phase
|
||||
@ -399,17 +394,11 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
{
|
||||
label gid = td.cloud().composition().localToGlobalCarrierId(SLD, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += np0*dMassSolid[i];
|
||||
td.cloud().hsTrans()[cellI] +=
|
||||
np0*dMassSolid[i]
|
||||
*td.cloud().composition().carrier().Hs(gid, T0);
|
||||
}
|
||||
*/
|
||||
forAll(dMassSRCarrier, i)
|
||||
{
|
||||
td.cloud().rhoTrans(i)[cellI] += np0*dMassSRCarrier[i];
|
||||
td.cloud().hsTrans()[cellI] +=
|
||||
np0*dMassSRCarrier[i]
|
||||
*td.cloud().composition().carrier().Hs(i, T0);
|
||||
}
|
||||
|
||||
// Update momentum transfer
|
||||
|
||||
@ -391,8 +391,6 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
{
|
||||
label gid = td.cloud().composition().localToGlobalCarrierId(0, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += np0*dMassPC[i];
|
||||
td.cloud().hsTrans()[cellI] +=
|
||||
np0*dMassPC[i]*td.cloud().composition().carrier().Hs(gid, T0);
|
||||
}
|
||||
|
||||
// Update momentum transfer
|
||||
|
||||
Reference in New Issue
Block a user