36 template<
class ParcelType>
37 template<
class TrackCloudType>
40 TrackCloudType&
cloud,
47 return cloud.composition().Cp(idS, this->Y_,
p,
T);
51 template<
class ParcelType>
52 template<
class TrackCloudType>
55 TrackCloudType&
cloud,
62 return cloud.composition().Hs(idS, this->Y_,
p,
T);
66 template<
class ParcelType>
67 template<
class TrackCloudType>
70 TrackCloudType&
cloud,
77 return cloud.composition().L(idS, this->Y_,
p,
T);
84 template<
class ParcelType>
85 template<
class TrackCloudType>
88 TrackCloudType&
cloud,
100 dMass[i]/
composition.solids().properties()[i].rho();
107 template<
class ParcelType>
108 template<
class TrackCloudType>
111 TrackCloudType&
cloud,
116 typedef typename TrackCloudType::reactingCloudType reactingCloudType;
124 const scalar np0 = this->nParticle_;
125 const scalar d0 = this->d_;
126 const vector& U0 = this->U_;
127 const scalar
T0 = this->T_;
128 const scalar mass0 = this->mass();
130 const scalar pc =
td.pc();
135 scalar Ts, rhos, mus, Prs, kappas;
136 this->calcSurfaceValues(
cloud,
td,
T0, Ts, rhos, mus, Prs, kappas);
137 scalar Res = this->
Re(rhos, U0,
td.Uc(), d0, mus);
158 scalar dhsTrans = 0.0;
178 calcHeterogeneousReactions
204 scalar mass1 = mass0 -
sum(dMassSolid);
207 if (np0*mass1 <
cloud.constProps().minParcelMass())
209 td.keepParticle =
false;
215 (void)this->updateMassFraction(mass0, dMassSolid, this->Y_);
220 cloud.constProps().volUpdateType()
221 == constantProperties::volumeUpdateType::mUndefined
224 if (cloud.constProps().constantVolume())
226 this->rho_ = mass1/this->
volume();
230 this->d_ =
cbrt(mass1/this->rho_*6/
pi);
235 switch (cloud.constProps().volUpdateType())
237 case constantProperties::volumeUpdateType::mConstRho :
239 this->d_ =
cbrt(mass1/this->rho_*6/
pi);
242 case constantProperties::volumeUpdateType::mConstVol :
244 this->rho_ = mass1/this->
volume();
247 case constantProperties::volumeUpdateType::mUpdateRhoAndVol :
258 this->rho_ = mass1/(this->
volume() + deltaVol);
259 this->d_ =
cbrt(mass1/this->rho_*6.0/
pi);
265 this->correctSurfaceValues(cloud,
td, Ts,
Cs, rhos, mus, Prs, kappas);
266 Res = this->
Re(rhos, U0,
td.Uc(), this->d_, mus);
277 this->calcHeatTransfer
293 this->Cp_ = CpEff(cloud,
td, pc, this->T_, idS);
300 this->calcVelocity(cloud,
td, dt, Res, mus, mass1,
Su, dUTrans, Spu);
306 if (cloud.solution().coupled())
323 scalar dm = np0*dMassSRCarrier[i];
325 cloud.rhoTrans(i)[this->cell()] += dm;
326 cloud.UTrans()[this->cell()] += dm*U0;
327 cloud.hsTrans()[this->cell()] += dm*hs;
331 cloud.UTrans()[this->cell()] += np0*dUTrans;
332 cloud.UCoeff()[this->cell()] += np0*Spu;
335 cloud.hsTrans()[this->cell()] += np0*dhsTrans;
336 cloud.hsCoeff()[this->cell()] += np0*Sph;
339 if (cloud.radiation())
341 const scalar ap = this->areaP();
342 const scalar T4 =
pow4(
T0);
343 cloud.radAreaP()[this->cell()] += dt*np0*ap;
344 cloud.radT4()[this->cell()] += dt*np0*T4;
345 cloud.radAreaPT4()[this->cell()] += dt*np0*ap*T4;
353 template<
class ParcelType>
354 template<
class TrackCloudType>
357 TrackCloudType&
cloud,
365 const label canCombust,
377 if (!
cloud.heterogeneousReaction().active())
383 (void)
cloud.constProps().hRetentionCoeff();
384 (void)
cloud.constProps().TMax();
393 const scalar hReaction =
cloud.heterogeneousReaction().calculate
413 cloud.heterogeneousReaction().addToSurfaceReactionMass
415 this->nParticle_*
sum(dMassSRSolid)
418 const scalar xsi =
min(
T/
cloud.constProps().TMax(), 1.0);
420 (1.0 - xsi*xsi)*
cloud.constProps().hRetentionCoeff();
422 Sh += coeff*hReaction/dt;
424 dhsTrans += (1.0 - coeff)*hReaction;
430 template<
class ParcelType>
438 canCombust_(
p.canCombust_)
442 template<
class ParcelType>
445 const ReactingHeterogeneousParcel<ParcelType>&
p,
451 canCombust_(
p.canCombust_)
ParcelType::trackingData trackingData
Use base tracking data.
void size(const label n)
Older name for setAddressableSize.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1)
basicSpecieMixture & composition
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
void calcHeterogeneousReactions(TrackCloudType &cloud, trackingData &td, const scalar dt, const scalar Res, const scalar nu, const scalar d, const scalar T, const scalar mass, const label canCombust, const scalar N, scalar &NCpW, const scalarField &YSolid, scalarField &F, scalarField &dMassSRSolid, scalarField &dMassSRCarrier, scalar &Sh, scalar &dhsTrans) const
Calculate surface reactions.
Reacting heterogeneous Parcel.
ReactingHeterogeneousParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
Construct from mesh, position and topology.
#define forAll(list, i)
Loop across all elements in list.
scalar updatedDeltaVolume(TrackCloudType &cloud, const scalarField &dMass, const scalar p, const scalar T)
Return change of volume due to mass exchange.
A cloud is a registry collection of lagrangian particles.
dimensionedScalar cbrt(const dimensionedScalar &ds)
constexpr scalar pi(M_PI)
volVectorField F(fluid.F())
void calc(TrackCloudType &cloud, trackingData &td, const scalar dt)
Update parcel properties over the time interval.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
const wordList volume
Standard volume field types (scalar, vector, tensor, etc)
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
scalarField Re(const UList< complex > &cmplx)
Extract real component.
A cell is defined as a list of faces with extra functionality.
dimensionedScalar pow4(const dimensionedScalar &ds)
Templated reacting parcel composition model class Consists of carrier species (via thermo package)...
static constexpr const zero Zero
Global zero (0)