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
334 updateMassFractions(mass0, dMassGas, dMassLiquid, dMassSolid);
336 this->Cp_ = CpEff(cloud, td, pc, T0, idG, idL, idS);
339 if (cloud.constProps().constantVolume())
341 this->rho_ = mass1/this->volume();
345 this->d_ =
cbrt(mass1/this->rho_*6.0/
pi);
349 if (np0*mass1 < cloud.constProps().minParcelMass())
351 td.keepParticle =
false;
353 if (cloud.solution().coupled())
355 scalar dm = np0*mass0;
361 cloud.rhoTrans(gid)[this->
cell()] += dm*YMix[GAS]*YGas_[i];
366 cloud.rhoTrans(gid)[this->
cell()] += dm*YMix[LIQ]*YLiquid_[i];
378 cloud.UTransRef()[this->
cell()] += dm*U0;
380 cloud.hsTransRef()[this->
cell()] +=
381 dm*HsEff(cloud, td, pc, T0, idG, idL, idS);
383 cloud.phaseChange().addToPhaseChangeMass(np0*mass1);
390 this->correctSurfaceValues(cloud, td, Ts, Cs, rhos, mus, Prs, kappas);
391 Res = this->
Re(rhos, U0, td.Uc(), this->d_, mus);
402 this->calcHeatTransfer
417 this->Cp_ = CpEff(cloud, td, pc, this->T_, idG, idL, idS);
425 this->calcVelocity(cloud, td, dt, Res, mus, mass1, Su, dUTrans, Spu);
431 if (cloud.solution().coupled())
436 scalar dm = np0*dMassGas[i];
438 scalar hs = composition.
carrier().Hs(gid, pc, T0);
439 cloud.rhoTrans(gid)[this->
cell()] += dm;
440 cloud.UTransRef()[this->
cell()] += dm*U0;
441 cloud.hsTransRef()[this->
cell()] += dm*hs;
445 scalar dm = np0*dMassLiquid[i];
447 scalar hs = composition.
carrier().Hs(gid, pc, T0);
448 cloud.rhoTrans(gid)[this->
cell()] += dm;
449 cloud.UTransRef()[this->
cell()] += dm*U0;
450 cloud.hsTransRef()[this->
cell()] += dm*hs;
468 scalar dm = np0*dMassSRCarrier[i];
469 scalar hs = composition.
carrier().Hs(i, pc, T0);
470 cloud.rhoTrans(i)[this->
cell()] += dm;
471 cloud.UTransRef()[this->
cell()] += dm*U0;
472 cloud.hsTransRef()[this->
cell()] += dm*hs;
476 cloud.UTransRef()[this->
cell()] += np0*dUTrans;
477 cloud.UCoeffRef()[this->
cell()] += np0*Spu;
480 cloud.hsTransRef()[this->
cell()] += np0*dhsTrans;
481 cloud.hsCoeffRef()[this->
cell()] += np0*Sph;
484 if (cloud.radiation())
486 const scalar ap = this->areaP();
487 const scalar T4 =
pow4(T0);
488 cloud.radAreaP()[this->
cell()] += dt*np0*ap;
489 cloud.radT4()[this->
cell()] += dt*np0*T4;
490 cloud.radAreaPT4()[this->
cell()] += dt*np0*ap*T4;
498 template<
class ParcelType>
499 template<
class TrackCloudType>
502 TrackCloudType& cloud,
528 typename TrackCloudType::reactingMultiphaseCloudType
532 cloud.devolatilisation()
536 if (canCombust != -1)
544 (void)cloud.constProps().TDevol();
545 (void)cloud.constProps().LDevol();
549 if (T < cloud.constProps().TDevol() || canCombust == -1)
554 typedef typename TrackCloudType::thermoCloudType thermoCloudType;
558 const typename TrackCloudType::parcelType& p =
559 static_cast<const typename TrackCloudType::parcelType&
>(*this);
560 typename TrackCloudType::parcelType::trackingData& ttd =
561 static_cast<typename TrackCloudType::parcelType::trackingData&
>(td);
564 cloud.devolatilisation().calculate
579 scalar dMassTot =
sum(dMassDV);
581 cloud.devolatilisation().addToDevolatilisationMass
583 this->nParticle_*dMassTot
586 Sh -= dMassTot*cloud.constProps().LDevol()/dt;
589 if (cloud.heatTransfer().BirdCorrection())
592 const scalar Wc =
max(small, td.rhoc()*
RR*td.Tc()/td.pc());
601 const scalar
Cp = composition.
carrier().Cp(
id, td.pc(), Ts);
602 const scalar
W = composition.
carrier().Wi(
id);
603 const scalar Ni = dMassDV[i]/(this->areaS(d)*dt*
W);
607 3.6059e-3*(
pow(1.8*Ts, 1.75))
608 *
sqrt(1.0/W + 1.0/Wc)
613 Cs[id] += Ni*d/(2.0*Dab);
619 template<
class ParcelType>
620 template<
class TrackCloudType>
623 TrackCloudType& cloud,
629 const label canCombust,
650 typename TrackCloudType::reactingMultiphaseCloudType
654 cloud.surfaceReaction()
662 (void)cloud.constProps().hRetentionCoeff();
663 (void)cloud.constProps().TMax();
673 const scalar hReaction = cloud.surfaceReaction().calculate
694 cloud.surfaceReaction().addToSurfaceReactionMass
697 *(
sum(dMassSRGas) +
sum(dMassSRLiquid) +
sum(dMassSRSolid))
700 const scalar xsi =
min(T/cloud.constProps().TMax(), 1.0);
702 (1.0 - xsi*xsi)*cloud.constProps().hRetentionCoeff();
704 Sh += coeff*hReaction/dt;
706 dhsTrans += (1.0 - coeff)*hReaction;
712 template<
class ParcelType>
726 template<
class ParcelType>
#define forAll(list, i)
Loop across all elements in list.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
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.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Holds information (coordinate and normal) regarding nearest wall point.
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)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
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 [].
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 calcDevolatilisation(TrackCloudType &cloud, trackingData &td, const scalar dt, 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.
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'.