36 template<
class ParcelType>
39 template<
class ParcelType>
42 template<
class ParcelType>
48 template<
class ParcelType>
49 template<
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);
68 template<
class ParcelType>
69 template<
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);
88 template<
class ParcelType>
89 template<
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);
108 template<
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);
142 template<
class ParcelType>
143 template<
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));
186 template<
class ParcelType>
187 template<
class TrackCloudType>
190 TrackCloudType&
cloud,
194 ParcelType::setCellValues(
cloud, td);
198 template<
class ParcelType>
199 template<
class TrackCloudType>
202 TrackCloudType&
cloud,
208 ParcelType::cellValueSourceCorrection(
cloud, td, dt);
212 template<
class ParcelType>
213 template<
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;
591 template<
class ParcelType>
592 template<
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);
692 template<
class ParcelType>
693 template<
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;
777 template<
class ParcelType>
785 YLiquid_(
p.YLiquid_),
787 canCombust_(
p.canCombust_)
791 template<
class ParcelType>
794 const ReactingMultiphaseParcel<ParcelType>&
p,
800 YLiquid_(
p.YLiquid_),
802 canCombust_(
p.canCombust_)