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] = 1.0 - YMix[GAS] - YMix[LIQ];
138 template<
class ParcelType>
139 template<
class TrackCloudType>
142 TrackCloudType& cloud,
146 ParcelType::setCellValues(cloud, td);
150 template<
class ParcelType>
151 template<
class TrackCloudType>
154 TrackCloudType& cloud,
160 ParcelType::cellValueSourceCorrection(cloud, td, dt);
164 template<
class ParcelType>
165 template<
class TrackCloudType>
168 TrackCloudType& cloud,
173 typedef typename TrackCloudType::thermoCloudType thermoCloudType;
181 const scalar np0 = this->nParticle_;
182 const scalar d0 = this->d_;
183 const vector& U0 = this->U_;
184 const scalar
T0 = this->T_;
185 const scalar mass0 = this->mass();
187 const scalar pc = td.pc();
196 scalar Ts, rhos, mus, Prs, kappas;
197 this->calcSurfaceValues(cloud, td, T0, Ts, rhos, mus, Prs, kappas);
198 scalar Res = this->
Re(rhos, U0, td.Uc(), d0, mus);
220 scalar dhsTrans = 0.0;
242 this->calcPhaseChange
335 updateMassFractions(mass0, dMassGas, dMassLiquid, dMassSolid);
337 this->Cp_ = CpEff(cloud, td, pc, T0, idG, idL, idS);
340 if (cloud.constProps().constantVolume())
342 this->rho_ = mass1/this->volume();
346 this->d_ =
cbrt(mass1/this->rho_*6.0/
pi);
350 if (np0*mass1 < cloud.constProps().minParcelMass())
352 td.keepParticle =
false;
354 if (cloud.solution().coupled())
356 scalar dm = np0*mass0;
362 cloud.rhoTrans(gid)[this->
cell()] += dm*YMix[GAS]*YGas_[i];
367 cloud.rhoTrans(gid)[this->
cell()] += dm*YMix[LIQ]*YLiquid_[i];
379 cloud.UTransRef()[this->
cell()] += dm*U0;
381 cloud.hsTransRef()[this->
cell()] +=
382 dm*HsEff(cloud, td, pc, T0, idG, idL, idS);
384 cloud.phaseChange().addToPhaseChangeMass(np0*mass1);
391 this->correctSurfaceValues(cloud, td, Ts, Cs, rhos, mus, Prs, kappas);
392 Res = this->
Re(rhos, U0, td.Uc(), this->d_, mus);
403 this->calcHeatTransfer
418 this->Cp_ = CpEff(cloud, td, pc, this->T_, idG, idL, idS);
426 this->calcVelocity(cloud, td, dt, Res, mus, mass1, Su, dUTrans, Spu);
432 if (cloud.solution().coupled())
437 scalar dm = np0*dMassGas[i];
439 scalar hs = composition.
carrier().Hs(gid, pc, T0);
440 cloud.rhoTrans(gid)[this->
cell()] += dm;
441 cloud.UTransRef()[this->
cell()] += dm*U0;
442 cloud.hsTransRef()[this->
cell()] += dm*hs;
446 scalar dm = np0*dMassLiquid[i];
448 scalar hs = composition.
carrier().Hs(gid, pc, T0);
449 cloud.rhoTrans(gid)[this->
cell()] += dm;
450 cloud.UTransRef()[this->
cell()] += dm*U0;
451 cloud.hsTransRef()[this->
cell()] += dm*hs;
469 scalar dm = np0*dMassSRCarrier[i];
470 scalar hs = composition.
carrier().Hs(i, pc, T0);
471 cloud.rhoTrans(i)[this->
cell()] += dm;
472 cloud.UTransRef()[this->
cell()] += dm*U0;
473 cloud.hsTransRef()[this->
cell()] += dm*hs;
477 cloud.UTransRef()[this->
cell()] += np0*dUTrans;
478 cloud.UCoeffRef()[this->
cell()] += np0*Spu;
481 cloud.hsTransRef()[this->
cell()] += np0*dhsTrans;
482 cloud.hsCoeffRef()[this->
cell()] += np0*Sph;
485 if (cloud.radiation())
487 const scalar ap = this->areaP();
488 const scalar T4 =
pow4(T0);
489 cloud.radAreaP()[this->
cell()] += dt*np0*ap;
490 cloud.radT4()[this->
cell()] += dt*np0*T4;
491 cloud.radAreaPT4()[this->
cell()] += dt*np0*ap*T4;
499 template<
class ParcelType>
500 template<
class TrackCloudType>
503 TrackCloudType& cloud,
530 typename TrackCloudType::reactingMultiphaseCloudType
534 cloud.devolatilisation()
538 if (canCombust != -1)
546 (void)cloud.constProps().TDevol();
547 (void)cloud.constProps().LDevol();
551 if (T < cloud.constProps().TDevol() || canCombust == -1)
556 typedef typename TrackCloudType::thermoCloudType thermoCloudType;
562 cloud.devolatilisation().calculate
576 scalar dMassTot =
sum(dMassDV);
578 cloud.devolatilisation().addToDevolatilisationMass
580 this->nParticle_*dMassTot
583 Sh -= dMassTot*cloud.constProps().LDevol()/dt;
586 if (cloud.heatTransfer().BirdCorrection())
589 const scalar Wc =
max(small, td.rhoc()*
RR*td.Tc()/td.pc());
598 const scalar
Cp = composition.
carrier().Cp(
id, td.pc(), Ts);
599 const scalar
W = composition.
carrier().Wi(
id);
600 const scalar Ni = dMassDV[i]/(this->areaS(d)*dt*
W);
604 3.6059e-3*(
pow(1.8*Ts, 1.75))
605 *
sqrt(1.0/W + 1.0/Wc)
610 Cs[id] += Ni*d/(2.0*Dab);
616 template<
class ParcelType>
617 template<
class TrackCloudType>
620 TrackCloudType& cloud,
626 const label canCombust,
647 typename TrackCloudType::reactingMultiphaseCloudType
651 cloud.surfaceReaction()
659 (void)cloud.constProps().hRetentionCoeff();
660 (void)cloud.constProps().TMax();
670 const scalar hReaction = cloud.surfaceReaction().calculate
691 cloud.surfaceReaction().addToSurfaceReactionMass
694 *(
sum(dMassSRGas) +
sum(dMassSRLiquid) +
sum(dMassSRSolid))
697 const scalar xsi =
min(T/cloud.constProps().TMax(), 1.0);
699 (1.0 - xsi*xsi)*cloud.constProps().hRetentionCoeff();
701 Sh += coeff*hReaction/dt;
703 dhsTrans += (1.0 - coeff)*hReaction;
709 template<
class ParcelType>
723 template<
class ParcelType>
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
basicSpecieMixture & composition
label canCombust_
Flag to identify if the particle can devolatilise and combust.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
virtual label idSolid() const =0
Solid id.
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.
dimensionedScalar sqrt(const dimensionedScalar &ds)
label localToCarrierId(const label phaseI, const label id, const bool allowNotFound=false) const
Return carrier id of component given local id.
void calc(TrackCloudType &cloud, trackingData &td, const scalar dt)
Update parcel properties over the time interval.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
Dummy surface reaction model for 'none'.
ReactingMultiphaseParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
Construct from mesh, position and topology.
const dimensionedScalar RR
Universal gas constant: default SI units: [J/kmol/K].
ParcelType::trackingData trackingData
Use base tracking data.
scalarField YGas_
Mass fractions of gases [].
bool isType(const Type &t)
Check the typeid.
dimensionedScalar cbrt(const dimensionedScalar &ds)
virtual label idLiquid() const =0
Liquid id.
void calcSurfaceReactions(TrackCloudType &cloud, trackingData &td, const scalar dt, const scalar d, 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.
scalarField YSolid_
Mass fractions of solids [].
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
scalarField YLiquid_
Mass fractions of liquids [].
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
A cell is defined as a list of faces with extra functionality.
const scalarList W(::W(thermo))
dimensionedScalar pow4(const dimensionedScalar &ds)
scalar Cp(const scalar p, const scalar T) const
Multiphase variant of the reacting parcel class with one/two-way coupling with the continuous phase...
Mesh consisting of general polyhedral cells.
const tmp< volScalarField::Internal > & Su
virtual label idGas() const =0
Gas id.
Templated reacting parcel composition model class Consists of carrier species (via thermo package)...
void cellValueSourceCorrection(TrackCloudType &cloud, trackingData &td, const scalar dt)
Correct cell values using latest transfer information.
scalarField Re(const UList< complex > &cf)
const basicSpecieMixture & carrier() const
Return the carrier components (wrapper function)
void setCellValues(TrackCloudType &cloud, trackingData &td)
Set cell values.
Dummy devolatilisation model for 'none'.