36template<
class ParcelType>
39template<
class ParcelType>
42template<
class ParcelType>
48template<
class ParcelType>
49template<
class TrackCloudType>
52 TrackCloudType&
cloud,
62 this->Y_[GAS]*
cloud.composition().Cp(idG, YGas_,
p,
T)
63 + this->Y_[LIQ]*
cloud.composition().Cp(idL, YLiquid_,
p,
T)
64 + this->Y_[SLD]*
cloud.composition().Cp(idS, YSolid_,
p,
T);
68template<
class ParcelType>
69template<
class TrackCloudType>
72 TrackCloudType&
cloud,
82 this->Y_[GAS]*
cloud.composition().Hs(idG, YGas_,
p,
T)
83 + this->Y_[LIQ]*
cloud.composition().Hs(idL, YLiquid_,
p,
T)
84 + this->Y_[SLD]*
cloud.composition().Hs(idS, YSolid_,
p,
T);
88template<
class ParcelType>
89template<
class TrackCloudType>
92 TrackCloudType&
cloud,
102 this->Y_[GAS]*
cloud.composition().L(idG, YGas_,
p,
T)
103 + this->Y_[LIQ]*
cloud.composition().L(idL, YLiquid_,
p,
T)
104 + this->Y_[SLD]*
cloud.composition().L(idS, YSolid_,
p,
T);
108template<
class ParcelType>
120 this->updateMassFraction(mass0*YMix[GAS], dMassGas, YGas_);
122 this->updateMassFraction(mass0*YMix[LIQ], dMassLiquid, YLiquid_);
124 this->updateMassFraction(mass0*YMix[SLD], dMassSolid, YSolid_);
126 scalar massNew =
max(massGas + massLiquid + massSolid, ROOTVSMALL);
128 YMix[GAS] = massGas/massNew;
129 YMix[LIQ] = massLiquid/massNew;
130 YMix[SLD] = massSolid/massNew;
132 scalar Ytotal =
sum(YMix);
142template<
class ParcelType>
143template<
class TrackCloudType>
146 TrackCloudType&
cloud,
157 const auto& props =
cloud.composition().phaseProps()[idG];
163 label cid = props.carrierIds()[i];
164 dVolGas[i] = -dMassGas[i]/
thermo.carrier().rho(cid,
p,
T);
171 -dMassLiquid[i]/
thermo.liquids().properties()[i].rho(
p,
T);
177 dVolSolid[i] = -dMassSolid[i]/
thermo.solids().properties()[i].rho();
180 return (
sum(dVolGas) +
sum(dVolLiquid) +
sum(dMassSolid));
186template<
class ParcelType>
187template<
class TrackCloudType>
190 TrackCloudType&
cloud,
198template<
class ParcelType>
199template<
class TrackCloudType>
202 TrackCloudType&
cloud,
212template<
class ParcelType>
213template<
class TrackCloudType>
216 TrackCloudType&
cloud,
221 typedef typename TrackCloudType::reactingCloudType reactingCloudType;
228 const scalar np0 = this->nParticle_;
229 const scalar d0 = this->d_;
230 const vector& U0 = this->U_;
231 const scalar
T0 = this->T_;
232 const scalar mass0 = this->mass();
233 const scalar
rho0 = this->rho_;
236 const scalar pc = td.pc();
245 scalar Ts, rhos, mus, Prs, kappas;
246 this->calcSurfaceValues(
cloud, td,
T0, Ts, rhos, mus, Prs, kappas);
247 scalar Res = this->
Re(rhos, U0, td.Uc(), d0, mus);
269 scalar dhsTrans = 0.0;
291 this->calcPhaseChange
386 scalar mass1 = mass0 -
sum(dMassGas) -
sum(dMassLiquid) -
sum(dMassSolid);
389 if (np0*mass1 <
cloud.constProps().minParcelMass())
391 td.keepParticle =
false;
393 if (
cloud.solution().coupled())
395 scalar dm = np0*mass0;
401 cloud.rhoTrans(gid)[this->
cell()] += dm*YMix[GAS]*YGas_[i];
406 cloud.rhoTrans(gid)[this->
cell()] += dm*YMix[LIQ]*YLiquid_[i];
421 dm*HsEff(
cloud, td, pc,
T0, idG, idL, idS);
423 cloud.phaseChange().addToPhaseChangeMass(np0*mass1);
429 (void)updateMassFractions(mass0, dMassGas, dMassLiquid, dMassSolid);
433 cloud.constProps().volUpdateType()
434 == constantProperties::volumeUpdateType::mUndefined
437 if (
cloud.constProps().constantVolume())
439 this->rho_ = mass1/this->volume();
443 this->d_ =
cbrt(mass1/this->rho_*6/
pi);
448 switch (
cloud.constProps().volUpdateType())
450 case constantProperties::volumeUpdateType::mConstRho :
452 this->d_ =
cbrt(mass1/this->rho_*6/
pi);
455 case constantProperties::volumeUpdateType::mConstVol :
457 this->rho_ = mass1/this->volume();
460 case constantProperties::volumeUpdateType::mUpdateRhoAndVol :
476 this->rho_ = mass1/(this->volume() + deltaVol);
477 this->d_ =
cbrt(mass1/this->rho_*6/
pi);
483 this->correctSurfaceValues(
cloud, td, Ts,
Cs, rhos, mus, Prs, kappas);
484 Res = this->
Re(rhos, U0, td.Uc(), this->d_, mus);
495 this->calcHeatTransfer
510 this->Cp_ = CpEff(
cloud, td, pc, this->T_, idG, idL, idS);
518 this->calcVelocity(
cloud, td, dt, Res, mus, mass1,
Su, dUTrans, Spu);
524 if (
cloud.solution().coupled())
529 scalar dm = np0*dMassGas[i];
538 scalar dm = np0*dMassLiquid[i];
561 scalar dm = np0*dMassSRCarrier[i];
569 cloud.UTrans()[this->
cell()] += np0*dUTrans;
573 cloud.hsTrans()[this->
cell()] += np0*dhsTrans;
574 cloud.hsCoeff()[this->
cell()] += np0*Sph;
577 if (
cloud.radiation())
579 const scalar ap = this->areaP();
580 const scalar T4 =
pow4(
T0);
581 cloud.radAreaP()[this->
cell()] += dt*np0*ap;
582 cloud.radT4()[this->
cell()] += dt*np0*T4;
583 cloud.radAreaPT4()[this->
cell()] += dt*np0*ap*T4;
591template<
class ParcelType>
592template<
class TrackCloudType>
595 TrackCloudType&
cloud,
616 if (!
cloud.devolatilisation().active())
622 (void)
cloud.constProps().TDevol();
623 (void)
cloud.constProps().LDevol();
627 if (
T <
cloud.constProps().TDevol() || canCombust == -1)
632 typedef typename TrackCloudType::reactingCloudType reactingCloudType;
638 cloud.devolatilisation().calculate
652 scalar dMassTot =
sum(dMassDV);
654 cloud.devolatilisation().addToDevolatilisationMass
656 this->nParticle_*dMassTot
659 Sh -= dMassTot*
cloud.constProps().LDevol()/dt;
662 if (
cloud.heatTransfer().BirdCorrection())
665 const scalar Wc =
max(SMALL, td.rhoc()*
RR*td.Tc()/td.pc());
673 const label
id =
composition.localToCarrierId(GAS, i);
676 const scalar Ni = dMassDV[i]/(this->areaS(d)*dt*W);
680 3.6059e-3*(
pow(1.8*Ts, 1.75))
681 *
sqrt(1.0/W + 1.0/Wc)
686 Cs[id] += Ni*d/(2.0*Dab);
692template<
class ParcelType>
693template<
class TrackCloudType>
696 TrackCloudType&
cloud,
704 const label canCombust,
719 if (!
cloud.surfaceReaction().active())
725 (void)
cloud.constProps().hRetentionCoeff();
726 (void)
cloud.constProps().TMax();
736 const scalar hReaction =
cloud.surfaceReaction().calculate
759 cloud.surfaceReaction().addToSurfaceReactionMass
762 *(
sum(dMassSRGas) +
sum(dMassSRLiquid) +
sum(dMassSRSolid))
765 const scalar xsi =
min(
T/
cloud.constProps().TMax(), 1.0);
767 (1.0 - xsi*xsi)*
cloud.constProps().hRetentionCoeff();
769 Sh += coeff*hReaction/dt;
771 dhsTrans += (1.0 - coeff)*hReaction;
777template<
class ParcelType>
785 YLiquid_(
p.YLiquid_),
787 canCombust_(
p.canCombust_)
791template<
class ParcelType>
800 YLiquid_(
p.YLiquid_),
802 canCombust_(
p.canCombust_)
Templated reacting parcel composition model class Consists of carrier species (via thermo package),...
void setCellValues(TrackCloudType &cloud, trackingData &td)
Set cell values.
Multiphase variant of the reacting parcel class with one/two-way coupling with the continuous phase.
void calcDevolatilisation(TrackCloudType &cloud, trackingData &td, const scalar dt, const scalar age, const scalar Ts, const scalar d, const scalar T, const scalar mass, const scalar mass0, const scalarField &YGasEff, const scalarField &YLiquidEff, const scalarField &YSolidEff, label &canCombust, scalarField &dMassDV, scalar &Sh, scalar &N, scalar &NCpW, scalarField &Cs) const
Calculate Devolatilisation.
scalar updatedDeltaVolume(TrackCloudType &cloud, const scalarField &dMassGas, const scalarField &dMassLiquid, const scalarField &dMassSolid, const label idG, const label idL, const label idS, const scalar p, const scalar T)
Return change of volume due to mass exchange.
void setCellValues(TrackCloudType &cloud, trackingData &td)
Set cell values.
void calcSurfaceReactions(TrackCloudType &cloud, trackingData &td, const scalar dt, const scalar d, const scalar Re, const scalar nu, const scalar T, const scalar mass, const label canCombust, const scalar N, const scalarField &YMix, const scalarField &YGas, const scalarField &YLiquid, const scalarField &YSolid, scalarField &dMassSRGas, scalarField &dMassSRLiquid, scalarField &dMassSRSolid, scalarField &dMassSRCarrier, scalar &Sh, scalar &dhsTrans) const
Calculate surface reactions.
void size(const label n)
Older name for setAddressableSize.
A cell is defined as a list of faces with extra functionality.
const Switch cellValueSourceCorrection() const
Return const access to the cell value correction flag.
A cloud is a registry collection of lagrangian particles.
Class used to pass data into container.
Mesh consisting of general polyhedral cells.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
basicSpecieMixture & composition
const volScalarField & Cp
constexpr scalar pi(M_PI)
const scalar RR
Universal gas constant: default in [J/(kmol K)].
scalarField Re(const UList< complex > &cf)
Extract real component.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar sqrt(const dimensionedScalar &ds)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
dimensionedScalar pow4(const dimensionedScalar &ds)
dimensionedScalar cbrt(const dimensionedScalar &ds)
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)
#define forAll(list, i)
Loop across all elements in list.
const Vector< label > N(dict.get< Vector< label > >("N"))