ENH: Parcel updates
This commit is contained in:
@ -177,6 +177,22 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::cellValueSourceCorrection
|
||||
this->Cpc_ = (massCell*Cpc + addedMass*CpEff)/massCellNew;
|
||||
|
||||
this->Tc_ += td.cloud().hsTrans()[cellI]/(this->Cpc_*massCellNew);
|
||||
|
||||
if (this->Tc_ < td.cloud().constProps().TMin())
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection"
|
||||
"("
|
||||
"TrackData&, "
|
||||
"const scalar, "
|
||||
"const label"
|
||||
")"
|
||||
) << "Limiting observed temperature in cell " << cellI << " to "
|
||||
<< td.cloud().constProps().TMin() << nl << endl;
|
||||
|
||||
this->Tc_ = td.cloud().constProps().TMin();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -101,6 +101,22 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection
|
||||
this->Cpc_ = (massCell*Cpc + addedMass*CpEff)/massCellNew;
|
||||
|
||||
this->Tc_ += td.cloud().hsTrans()[cellI]/(this->Cpc_*massCellNew);
|
||||
|
||||
if (this->Tc_ < td.cloud().constProps().TMin())
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection"
|
||||
"("
|
||||
"TrackData&, "
|
||||
"const scalar, "
|
||||
"const label"
|
||||
")"
|
||||
) << "Limiting observed temperature in cell " << cellI << " to "
|
||||
<< td.cloud().constProps().TMin() << nl << endl;
|
||||
|
||||
this->Tc_ = td.cloud().constProps().TMin();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -124,14 +140,14 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues
|
||||
return;
|
||||
}
|
||||
|
||||
const SLGThermo& thermo = td.cloud().thermo();
|
||||
|
||||
// Far field carrier molar fractions
|
||||
scalarField Xinf(td.cloud().thermo().carrier().species().size());
|
||||
|
||||
forAll(Xinf, i)
|
||||
{
|
||||
Xinf[i] =
|
||||
td.cloud().thermo().carrier().Y(i)[cellI]
|
||||
/td.cloud().thermo().carrier().W(i);
|
||||
Xinf[i] = thermo.carrier().Y(i)[cellI]/thermo.carrier().W(i);
|
||||
}
|
||||
Xinf /= sum(Xinf);
|
||||
|
||||
@ -153,7 +169,7 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues
|
||||
const scalar Csi = Cs[i] + Xsff*Xinf[i]*CsTot;
|
||||
|
||||
Xs[i] = (2.0*Csi + Xinf[i]*CsTot)/3.0;
|
||||
Ys[i] = Xs[i]*td.cloud().thermo().carrier().W(i);
|
||||
Ys[i] = Xs[i]*thermo.carrier().W(i);
|
||||
}
|
||||
Xs /= sum(Xs);
|
||||
Ys /= sum(Ys);
|
||||
@ -168,13 +184,14 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues
|
||||
|
||||
forAll(Ys, i)
|
||||
{
|
||||
const scalar sqrtW = sqrt(td.cloud().thermo().carrier().W(i));
|
||||
const scalar cbrtW = cbrt(td.cloud().thermo().carrier().W(i));
|
||||
const scalar W = thermo.carrier().W(i);
|
||||
const scalar sqrtW = sqrt(W);
|
||||
const scalar cbrtW = cbrt(W);
|
||||
|
||||
rhos += Xs[i]*td.cloud().thermo().carrier().W(i);
|
||||
mus += Ys[i]*sqrtW*td.cloud().thermo().carrier().mu(i, T);
|
||||
kappa += Ys[i]*cbrtW*td.cloud().thermo().carrier().kappa(i, T);
|
||||
Cps += Xs[i]*td.cloud().thermo().carrier().Cp(i, T);
|
||||
rhos += Xs[i]*W;
|
||||
mus += Ys[i]*sqrtW*thermo.carrier().mu(i, T);
|
||||
kappa += Ys[i]*cbrtW*thermo.carrier().kappa(i, T);
|
||||
Cps += Xs[i]*thermo.carrier().Cp(i, T);
|
||||
|
||||
sumYiSqrtW += Ys[i]*sqrtW;
|
||||
sumYiCbrtW += Ys[i]*cbrtW;
|
||||
@ -547,7 +564,7 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
const ReactingCloud<ParcelType>& c
|
||||
)
|
||||
:
|
||||
ThermoParcel<ParcelType>(p),
|
||||
ThermoParcel<ParcelType>(p, c),
|
||||
mass0_(p.mass0_),
|
||||
Y_(p.Y_),
|
||||
pc_(p.pc_)
|
||||
|
||||
@ -78,6 +78,22 @@ void Foam::ThermoParcel<ParcelType>::cellValueSourceCorrection
|
||||
|
||||
const scalar CpMean = td.CpInterp().psi()[cellI];
|
||||
Tc_ += td.cloud().hsTrans()[cellI]/(CpMean*this->massCell(cellI));
|
||||
|
||||
if (Tc_ < td.cloud().constProps().TMin())
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"void Foam::ThermoParcel<ParcelType>::cellValueSourceCorrection"
|
||||
"("
|
||||
"TrackData&, "
|
||||
"const scalar, "
|
||||
"const label"
|
||||
")"
|
||||
) << "Limiting observed temperature in cell " << cellI << " to "
|
||||
<< td.cloud().constProps().TMin() << nl << endl;
|
||||
|
||||
Tc_ = td.cloud().constProps().TMin();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -98,14 +114,34 @@ void Foam::ThermoParcel<ParcelType>::calcSurfaceValues
|
||||
// Surface temperature using two thirds rule
|
||||
Ts = (2.0*T + Tc_)/3.0;
|
||||
|
||||
tetIndices tetIs = this->currentTetIndices();
|
||||
if (Ts < td.cloud().constProps().TMin())
|
||||
{
|
||||
WarningIn
|
||||
(
|
||||
"void Foam::ThermoParcel<ParcelType>::calcSurfaceValues"
|
||||
"("
|
||||
"TrackData&, "
|
||||
"const label, "
|
||||
"const scalar, "
|
||||
"scalar&, "
|
||||
"scalar&, "
|
||||
"scalar&, "
|
||||
"scalar&, "
|
||||
"scalar&"
|
||||
") const"
|
||||
) << "Limiting parcel surface temperature to "
|
||||
<< td.cloud().constProps().TMin() << nl << endl;
|
||||
|
||||
Ts = td.cloud().constProps().TMin();
|
||||
}
|
||||
|
||||
// Assuming thermo props vary linearly with T for small dT
|
||||
scalar factor = td.TInterp().interpolate (this->position(), tetIs)/Ts;
|
||||
const scalar TRatio = Tc_/Ts;
|
||||
|
||||
rhos = this->rhoc_*factor;
|
||||
rhos = this->rhoc_*TRatio;
|
||||
|
||||
mus = td.muInterp().interpolate (this->position(), tetIs)/factor;
|
||||
tetIndices tetIs = this->currentTetIndices();
|
||||
mus = td.muInterp().interpolate(this->position(), tetIs)/TRatio;
|
||||
|
||||
Pr = td.cloud().constProps().Pr();
|
||||
kappa = Cpc_*mus/Pr;
|
||||
@ -270,6 +306,7 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
|
||||
);
|
||||
}
|
||||
|
||||
htc = max(htc, ROOTVSMALL);
|
||||
const scalar As = this->areaS(d);
|
||||
scalar ap = Tc_ + Sh/As/htc;
|
||||
scalar bp = 6.0*(Sh/As + htc*(Tc_ - T));
|
||||
@ -284,7 +321,7 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
|
||||
ap = (ap + epsilon*Gc/(4.0*htc))/(1.0 + epsilon*sigma*pow3(T)/htc);
|
||||
bp += 6.0*(epsilon*(Gc/4.0 - sigma*pow4(T)));
|
||||
}
|
||||
bp /= rho*d*Cp*(ap - T);
|
||||
bp /= rho*d*Cp*(ap - T) + ROOTVSMALL;
|
||||
|
||||
// Integrate to find the new parcel temperature
|
||||
IntegrationScheme<scalar>::integrationResult Tres =
|
||||
|
||||
@ -25,16 +25,6 @@ License
|
||||
|
||||
#include "basicKinematicParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(basicKinematicParcel, 0);
|
||||
defineParticleTypeNameAndDebug(basicKinematicParcel, 0);
|
||||
defineParcelTypeNameAndDebug(basicKinematicParcel, 0);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicKinematicParcel::basicKinematicParcel
|
||||
|
||||
@ -24,16 +24,13 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicKinematicParcel.H"
|
||||
#include "KinematicCloud.H"
|
||||
#include "KinematicParcel.H"
|
||||
#include "createKinematicParcelTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTemplateTypeNameAndDebug(Cloud<basicKinematicParcel>, 0);
|
||||
|
||||
defineParcelTypeNameAndDebug(KinematicCloud<basicKinematicParcel>, 0);
|
||||
createKinematicParcelTypes(basicKinematicParcel);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -25,16 +25,6 @@ License
|
||||
|
||||
#include "basicThermoParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(basicThermoParcel, 0);
|
||||
defineParticleTypeNameAndDebug(basicThermoParcel, 0);
|
||||
defineParcelTypeNameAndDebug(basicThermoParcel, 0);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicThermoParcel::basicThermoParcel
|
||||
|
||||
@ -24,21 +24,13 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicThermoParcel.H"
|
||||
#include "ThermoCloud.H"
|
||||
#include "createThermoParcelTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTemplateTypeNameAndDebug(Cloud<basicThermoParcel>, 0);
|
||||
|
||||
defineParcelTypeNameAndDebug(KinematicParcel<basicThermoParcel>, 0);
|
||||
defineParcelTypeNameAndDebug(ThermoParcel<basicThermoParcel>, 0);
|
||||
defineTemplateTypeNameAndDebug(ThermoParcel<basicThermoParcel>, 0);
|
||||
|
||||
defineParcelTypeNameAndDebug(KinematicCloud<basicThermoParcel>, 0);
|
||||
|
||||
defineParcelTypeNameAndDebug(ThermoCloud<basicThermoParcel>, 0);
|
||||
createThermoParcelTypes(basicThermoParcel);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user