33 template<
class ParcelType>
36 template<
class ParcelType>
39 template<
class ParcelType>
45 template<
class ParcelType>
46 template<
class TrackCloudType>
49 TrackCloudType& cloud,
59 this->Y_[GAS]*cloud.composition().Cp(idG, YGas_, p, T)
60 + this->Y_[LIQ]*cloud.composition().Cp(idL, YLiquid_, p, T)
61 + this->Y_[SLD]*cloud.composition().Cp(idS, YSolid_, p, T);
65 template<
class ParcelType>
66 template<
class TrackCloudType>
69 TrackCloudType& cloud,
79 this->Y_[GAS]*cloud.composition().Hs(idG, YGas_, p, T)
80 + this->Y_[LIQ]*cloud.composition().Hs(idL, YLiquid_, p, T)
81 + this->Y_[SLD]*cloud.composition().Hs(idS, YSolid_, p, T);
85 template<
class ParcelType>
86 template<
class TrackCloudType>
89 TrackCloudType& cloud,
99 this->Y_[GAS]*cloud.composition().L(idG, YGas_, p, T)
100 + this->Y_[LIQ]*cloud.composition().L(idL, YLiquid_, p, T)
101 + this->Y_[SLD]*cloud.composition().L(idS, YSolid_, p, T);
105 template<
class ParcelType>
117 this->updateMassFraction(mass0*YMix[GAS], dMassGas, YGas_);
119 this->updateMassFraction(mass0*YMix[LIQ], dMassLiquid, YLiquid_);
121 this->updateMassFraction(mass0*YMix[SLD], dMassSolid, YSolid_);
123 scalar massNew =
max(massGas + massLiquid + massSolid, rootVSmall);
125 YMix[GAS] = massGas/massNew;
126 YMix[LIQ] = massLiquid/massNew;
127 YMix[SLD] = 1.0 - YMix[GAS] - YMix[LIQ];
135 template<
class ParcelType>
136 template<
class TrackCloudType>
139 TrackCloudType& cloud,
143 ParcelType::setCellValues(cloud, td);
147 template<
class ParcelType>
148 template<
class TrackCloudType>
151 TrackCloudType& cloud,
157 ParcelType::cellValueSourceCorrection(cloud, td, dt);
161 template<
class ParcelType>
162 template<
class TrackCloudType>
165 TrackCloudType& cloud,
170 typedef typename TrackCloudType::reactingCloudType reactingCloudType;
178 const scalar np0 = this->nParticle_;
179 const scalar d0 = this->d_;
180 const vector& U0 = this->U_;
181 const scalar T0 = this->T_;
182 const scalar mass0 = this->mass();
184 const scalar pc = td.pc();
193 scalar Ts, rhos, mus, Prs, kappas;
194 this->calcSurfaceValues(cloud, td, T0, Ts, rhos, mus, Prs, kappas);
195 scalar Res = this->
Re(rhos, U0, td.Uc(), d0, mus);
217 scalar dhsTrans = 0.0;
239 this->calcPhaseChange
332 updateMassFractions(mass0, dMassGas, dMassLiquid, dMassSolid);
334 this->Cp_ = CpEff(cloud, td, pc, T0, idG, idL, idS);
337 if (cloud.constProps().constantVolume())
339 this->rho_ = mass1/this->volume();
343 this->d_ =
cbrt(mass1/this->rho_*6.0/
pi);
347 if (np0*mass1 < cloud.constProps().minParcelMass())
349 td.keepParticle =
false;
351 if (cloud.solution().coupled())
353 scalar dm = np0*mass0;
359 cloud.rhoTrans(gid)[this->
cell()] += dm*YMix[GAS]*YGas_[i];
364 cloud.rhoTrans(gid)[this->
cell()] += dm*YMix[LIQ]*YLiquid_[i];
376 cloud.UTrans()[this->
cell()] += dm*U0;
378 cloud.hsTrans()[this->
cell()] +=
379 dm*HsEff(cloud, td, pc, T0, idG, idL, idS);
381 cloud.phaseChange().addToPhaseChangeMass(np0*mass1);
388 this->correctSurfaceValues(cloud, td, Ts, Cs, rhos, mus, Prs, kappas);
389 Res = this->
Re(rhos, U0, td.Uc(), this->d_, mus);
400 this->calcHeatTransfer
415 this->Cp_ = CpEff(cloud, td, pc, this->T_, idG, idL, idS);
423 this->calcVelocity(cloud, td, dt, Res, mus, mass1, Su, dUTrans, Spu);
429 if (cloud.solution().coupled())
434 scalar dm = np0*dMassGas[i];
436 scalar hs = composition.
carrier().Hs(gid, pc, T0);
437 cloud.rhoTrans(gid)[this->
cell()] += dm;
438 cloud.UTrans()[this->
cell()] += dm*U0;
439 cloud.hsTrans()[this->
cell()] += dm*hs;
443 scalar dm = np0*dMassLiquid[i];
445 scalar hs = composition.
carrier().Hs(gid, pc, T0);
446 cloud.rhoTrans(gid)[this->
cell()] += dm;
447 cloud.UTrans()[this->
cell()] += dm*U0;
448 cloud.hsTrans()[this->
cell()] += dm*hs;
466 scalar dm = np0*dMassSRCarrier[i];
467 scalar hs = composition.
carrier().Hs(i, pc, T0);
468 cloud.rhoTrans(i)[this->
cell()] += dm;
469 cloud.UTrans()[this->
cell()] += dm*U0;
470 cloud.hsTrans()[this->
cell()] += dm*hs;
474 cloud.UTrans()[this->
cell()] += np0*dUTrans;
475 cloud.UCoeff()[this->
cell()] += np0*Spu;
478 cloud.hsTrans()[this->
cell()] += np0*dhsTrans;
479 cloud.hsCoeff()[this->
cell()] += np0*Sph;
482 if (cloud.radiation())
484 const scalar ap = this->areaP();
485 const scalar T4 =
pow4(T0);
486 cloud.radAreaP()[this->
cell()] += dt*np0*ap;
487 cloud.radT4()[this->
cell()] += dt*np0*T4;
488 cloud.radAreaPT4()[this->
cell()] += dt*np0*ap*T4;
496 template<
class ParcelType>
497 template<
class TrackCloudType>
500 TrackCloudType& cloud,
521 if (!cloud.devolatilisation().active())
523 if (canCombust != -1)
531 (void)cloud.constProps().TDevol();
532 (void)cloud.constProps().LDevol();
536 if (T < cloud.constProps().TDevol() || canCombust == -1)
541 typedef typename TrackCloudType::reactingCloudType reactingCloudType;
547 cloud.devolatilisation().calculate
561 scalar dMassTot =
sum(dMassDV);
563 cloud.devolatilisation().addToDevolatilisationMass
565 this->nParticle_*dMassTot
568 Sh -= dMassTot*cloud.constProps().LDevol()/dt;
571 if (cloud.heatTransfer().BirdCorrection())
574 const scalar Wc =
max(small, td.rhoc()*
RR*td.Tc()/td.pc());
583 const scalar Cp = composition.
carrier().Cp(
id, td.pc(), Ts);
584 const scalar
W = composition.
carrier().W(
id);
585 const scalar Ni = dMassDV[i]/(this->areaS(d)*dt*
W);
589 3.6059e-3*(
pow(1.8*Ts, 1.75))
590 *
sqrt(1.0/W + 1.0/Wc)
595 Cs[id] += Ni*d/(2.0*Dab);
601 template<
class ParcelType>
602 template<
class TrackCloudType>
605 TrackCloudType& cloud,
611 const label canCombust,
626 if (!cloud.surfaceReaction().active())
632 (void)cloud.constProps().hRetentionCoeff();
633 (void)cloud.constProps().TMax();
643 const scalar hReaction = cloud.surfaceReaction().calculate
664 cloud.surfaceReaction().addToSurfaceReactionMass
667 *(
sum(dMassSRGas) +
sum(dMassSRLiquid) +
sum(dMassSRSolid))
670 const scalar xsi =
min(T/cloud.constProps().TMax(), 1.0);
672 (1.0 - xsi*xsi)*cloud.constProps().hRetentionCoeff();
674 Sh += coeff*hReaction/dt;
676 dhsTrans += (1.0 - coeff)*hReaction;
682 template<
class ParcelType>
696 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)
ReactingMultiphaseParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
Construct from mesh, position and topology.
ParcelType::trackingData trackingData
Use base tracking data.
scalarField YGas_
Mass fractions of gases [].
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)
Multiphase variant of the reacting parcel class with one/two-way coupling with the continuous phase...
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)
const scalar RR
Universal gas constant (default in [J/(kmol K)])
Mesh consisting of general polyhedral cells.
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.