33 template<
class ParcelType>
36 template<
class ParcelType>
39 template<
class ParcelType>
45 template<
class ParcelType>
46 template<
class TrackData>
58 this->Y_[GAS]*td.cloud().composition().Cp(idG, YGas_, p, T)
59 + this->Y_[LIQ]*td.cloud().composition().Cp(idL, YLiquid_, p, T)
60 + this->Y_[SLD]*td.cloud().composition().Cp(idS, YSolid_, p, T);
64 template<
class ParcelType>
65 template<
class TrackData>
77 this->Y_[GAS]*td.cloud().composition().Hs(idG, YGas_, p, T)
78 + this->Y_[LIQ]*td.cloud().composition().Hs(idL, YLiquid_, p, T)
79 + this->Y_[SLD]*td.cloud().composition().Hs(idS, YSolid_, p, T);
83 template<
class ParcelType>
84 template<
class TrackData>
96 this->Y_[GAS]*td.cloud().composition().L(idG, YGas_, p, T)
97 + this->Y_[LIQ]*td.cloud().composition().L(idL, YLiquid_, p, T)
98 + this->Y_[SLD]*td.cloud().composition().L(idS, YSolid_, p, T);
102 template<
class ParcelType>
114 this->updateMassFraction(mass0*YMix[GAS], dMassGas, YGas_);
116 this->updateMassFraction(mass0*YMix[LIQ], dMassLiquid, YLiquid_);
118 this->updateMassFraction(mass0*YMix[SLD], dMassSolid, YSolid_);
120 scalar massNew =
max(massGas + massLiquid + massSolid, ROOTVSMALL);
122 YMix[GAS] = massGas/massNew;
123 YMix[LIQ] = massLiquid/massNew;
124 YMix[SLD] = 1.0 - YMix[GAS] - YMix[LIQ];
132 template<
class ParcelType>
133 template<
class TrackData>
141 ParcelType::setCellValues(td, dt, cellI);
145 template<
class ParcelType>
146 template<
class TrackData>
155 ParcelType::cellValueSourceCorrection(td, dt, cellI);
159 template<
class ParcelType>
160 template<
class TrackData>
168 typedef typename TrackData::cloudType::reactingCloudType reactingCloudType;
170 td.cloud().composition();
176 const scalar np0 = this->nParticle_;
177 const scalar d0 = this->d_;
178 const vector& U0 = this->U_;
179 const scalar T0 = this->T_;
180 const scalar mass0 = this->mass();
182 const scalar pc = this->pc_;
191 scalar Ts, rhos, mus, Prs, kappas;
192 this->calcSurfaceValues(td, cellI, T0, Ts, rhos, mus, Prs, kappas);
193 scalar Res = this->
Re(U0, d0, rhos, mus);
215 scalar dhsTrans = 0.0;
237 this->calcPhaseChange
329 updateMassFractions(mass0, dMassGas, dMassLiquid, dMassSolid);
331 this->Cp_ = CpEff(td, pc, T0, idG, idL, idS);
334 if (td.cloud().constProps().constantVolume())
336 this->rho_ = mass1/this->volume();
340 this->d_ =
cbrt(mass1/this->rho_*6.0/
pi);
344 if (np0*mass1 < td.cloud().constProps().minParcelMass())
346 td.keepParticle =
false;
348 if (td.cloud().solution().coupled())
350 scalar dm = np0*mass0;
356 td.cloud().rhoTrans(gid)[cellI] += dm*YMix[GAS]*YGas_[i];
361 td.cloud().rhoTrans(gid)[cellI] += dm*YMix[LIQ]*YLiquid_[i];
373 td.cloud().UTrans()[cellI] += dm*U0;
375 td.cloud().hsTrans()[cellI] += dm*HsEff(td, pc, T0, idG, idL, idS);
377 td.cloud().phaseChange().addToPhaseChangeMass(np0*mass1);
384 this->correctSurfaceValues(td, cellI, Ts, Cs, rhos, mus, Prs, kappas);
385 Res = this->
Re(U0, this->d_, rhos, mus);
396 this->calcHeatTransfer
411 this->Cp_ = CpEff(td, pc, this->T_, idG, idL, idS);
419 this->calcVelocity(td, dt, cellI, Res, mus, mass1, Su, dUTrans, Spu);
425 if (td.cloud().solution().coupled())
430 scalar dm = np0*dMassGas[i];
432 scalar hs = composition.
carrier().Hs(gid, pc, T0);
433 td.cloud().rhoTrans(gid)[cellI] += dm;
434 td.cloud().UTrans()[cellI] += dm*U0;
435 td.cloud().hsTrans()[cellI] += dm*hs;
439 scalar dm = np0*dMassLiquid[i];
441 scalar hs = composition.
carrier().Hs(gid, pc, T0);
442 td.cloud().rhoTrans(gid)[cellI] += dm;
443 td.cloud().UTrans()[cellI] += dm*U0;
444 td.cloud().hsTrans()[cellI] += dm*hs;
462 scalar dm = np0*dMassSRCarrier[i];
463 scalar hs = composition.
carrier().Hs(i, pc, T0);
464 td.cloud().rhoTrans(i)[cellI] += dm;
465 td.cloud().UTrans()[cellI] += dm*U0;
466 td.cloud().hsTrans()[cellI] += dm*hs;
470 td.cloud().UTrans()[cellI] += np0*dUTrans;
471 td.cloud().UCoeff()[cellI] += np0*Spu;
474 td.cloud().hsTrans()[cellI] += np0*dhsTrans;
475 td.cloud().hsCoeff()[cellI] += np0*Sph;
478 if (td.cloud().radiation())
480 const scalar ap = this->areaP();
481 const scalar T4 =
pow4(T0);
482 td.cloud().radAreaP()[cellI] += dt*np0*ap;
483 td.cloud().radT4()[cellI] += dt*np0*T4;
484 td.cloud().radAreaPT4()[cellI] += dt*np0*ap*T4;
490 template<
class ParcelType>
491 template<
class TrackData>
514 if (!td.cloud().devolatilisation().active())
520 (void)td.cloud().constProps().TDevol();
521 (void)td.cloud().constProps().LDevol();
525 if (T < td.cloud().constProps().TDevol() || canCombust == -1)
530 typedef typename TrackData::cloudType::reactingCloudType reactingCloudType;
532 td.cloud().composition();
536 td.cloud().devolatilisation().calculate
550 scalar dMassTot =
sum(dMassDV);
552 td.cloud().devolatilisation().addToDevolatilisationMass
554 this->nParticle_*dMassTot
557 Sh -= dMassTot*td.cloud().constProps().LDevol()/dt;
560 if (td.cloud().heatTransfer().BirdCorrection())
564 max(SMALL, this->rhoc_*
RR*this->Tc_/this->pc_);
573 const scalar Cp = composition.
carrier().Cp(
id, this->pc_, Ts);
574 const scalar W = composition.
carrier().W(
id);
575 const scalar Ni = dMassDV[i]/(this->areaS(d)*dt*W);
579 3.6059e-3*(
pow(1.8*Ts, 1.75))
580 *
sqrt(1.0/W + 1.0/Wc)
585 Cs[id] += Ni*d/(2.0*Dab);
591 template<
class ParcelType>
592 template<
class TrackData>
601 const label canCombust,
616 if (!td.cloud().surfaceReaction().active())
622 (void)td.cloud().constProps().hRetentionCoeff();
623 (void)td.cloud().constProps().TMax();
633 const scalar hReaction = td.cloud().surfaceReaction().calculate
654 td.cloud().surfaceReaction().addToSurfaceReactionMass
657 *(
sum(dMassSRGas) +
sum(dMassSRLiquid) +
sum(dMassSRSolid))
660 const scalar xsi =
min(T/td.cloud().constProps().TMax(), 1.0);
662 (1.0 - xsi*xsi)*td.cloud().constProps().hRetentionCoeff();
664 Sh += coeff*hReaction/dt;
666 dhsTrans += (1.0 - coeff)*hReaction;
672 template<
class ParcelType>
686 template<
class ParcelType>
dimensionedScalar sqrt(const dimensionedScalar &ds)
scalarField YSolid_
Mass fractions of solids [].
void setCellValues(TrackData &td, const scalar dt, const label cellI)
Set cell values.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)
void cellValueSourceCorrection(TrackData &td, const scalar dt, const label cellI)
Correct cell values using latest transfer information.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedScalar cbrt(const dimensionedScalar &ds)
tmp< GeometricField< Type, fvPatchField, volMesh > > Su(const GeometricField< Type, fvPatchField, volMesh > &su, const GeometricField< Type, fvPatchField, volMesh > &vf)
basicMultiComponentMixture & composition
label localToCarrierId(const label phaseI, const label id, const bool allowNotFound=false) const
Return carrier id of component given local id.
virtual label idSolid() const =0
Solid id.
scalarField YLiquid_
Mass fractions of liquids [].
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
virtual label idGas() const =0
Gas id.
void calcSurfaceReactions(TrackData &td, const scalar dt, const label cellI, 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.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
void calcDevolatilisation(TrackData &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.
const scalar RR
Universal gas constant (default in [J/(kmol K)])
Mesh consisting of general polyhedral cells.
label canCombust_
Flag to identify if the particle can devolatilise and combust.
void calc(TrackData &td, const scalar dt, const label cellI)
Update parcel properties over the time interval.
dimensionedScalar pow4(const dimensionedScalar &ds)
Templated reacting parcel composition model class Consists of carrier species (via thermo package)...
virtual label idLiquid() const =0
Liquid id.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
Multiphase variant of the reacting parcel class with one/two-way coupling with the continuous phase...
const basicSpecieMixture & carrier() const
Return the carrier components (wrapper function)
ReactingMultiphaseParcel(const polyMesh &mesh, const vector &position, const label cellI, const label tetFaceI, const label tetPtI)
Construct from owner, position, and cloud owner.
scalarField YGas_
Mass fractions of gases [].
scalarField Re(const UList< complex > &cf)