Go to the documentation of this file.
35 template<
class ParcelType>
36 template<
class TrackCloudType>
39 TrackCloudType&
cloud,
43 ParcelType::setCellValues(
cloud, td);
47 template<
class ParcelType>
48 template<
class TrackCloudType>
51 TrackCloudType&
cloud,
56 ParcelType::cellValueSourceCorrection(
cloud, td, dt);
60 template<
class ParcelType>
61 template<
class TrackCloudType>
64 TrackCloudType&
cloud,
73 if (liquidCore() > 0.5)
76 cloud.forces().setCalcCoupled(
false);
83 scalar TMax = liquids.Tc(
X0);
84 const scalar
T0 = this->
T();
85 const scalar pc0 = td.pc();
86 if (liquids.pv(pc0,
T0,
X0) >= pc0*0.999)
89 TMax = liquids.pvInvert(pc0,
X0);
93 cloud.constProps().setTMax(TMax);
96 this->
Cp() = liquids.Cp(pc0,
T0,
X0);
97 sigma_ = liquids.sigma(pc0,
T0,
X0);
98 const scalar
rho0 = liquids.rho(pc0,
T0,
X0);
100 const scalar mass0 = this->mass();
101 mu_ = liquids.mu(pc0,
T0,
X0);
103 ParcelType::calc(
cloud, td, dt);
109 this->ms() -= this->ms()*(mass0 - this->mass())/mass0;
113 scalar T1 = this->
T();
116 this->
Cp() = liquids.Cp(td.pc(), T1, X1);
118 sigma_ = liquids.sigma(td.pc(), T1, X1);
120 scalar
rho1 = liquids.rho(td.pc(), T1, X1);
123 mu_ = liquids.mu(td.pc(), T1, X1);
128 if (liquidCore() > 0.5)
130 calcAtomization(
cloud, td, dt);
134 scalar d2 = this->d();
135 this->nParticle() *=
pow3(d1/d2);
139 calcBreakup(
cloud, td, dt);
144 cloud.forces().setCalcCoupled(
true);
148 template<
class ParcelType>
149 template<
class TrackCloudType>
152 TrackCloudType&
cloud,
157 const auto& atomization =
cloud.atomization();
159 if (!atomization.active())
168 scalar Wc = td.rhoc()*
RR*td.Tc()/td.pc();
170 scalar Tav = atomization.Taverage(this->
T(), td.Tc());
173 scalar rhoAv = td.pc()/(
R*Tav);
175 scalar soi =
cloud.injectors().timeStart();
178 const vector& injectionPos = this->position0();
184 scalar t0 =
max(0.0, currentTime - this->age() - soi);
185 scalar t1 =
min(t0 + dt,
cloud.injectors().timeEnd() - soi);
188 scalar volFlowRate =
cloud.injectors().volumeToInject(t0, t1)/dt;
191 if (atomization.calcChi())
193 chi = this->chi(
cloud, td, liquids.X(this->Y()));
217 template<
class ParcelType>
218 template<
class TrackCloudType>
221 TrackCloudType&
cloud,
226 auto& breakup =
cloud.breakup();
228 if (!breakup.active())
233 if (breakup.solveOscillationEq())
235 solveTABEq(
cloud, td, dt);
239 scalar Wc = td.rhoc()*
RR*td.Tc()/td.pc();
241 scalar Tav =
cloud.atomization().Taverage(this->
T(), td.Tc());
244 scalar rhoAv = td.pc()/(
R*Tav);
245 scalar muAv = td.muc();
248 scalar
Re = this->
Re(rhoAv, this->
U(), td.Uc(), this->d(), muAv);
250 const typename TrackCloudType::parcelType&
p =
251 static_cast<const typename TrackCloudType::parcelType&
>(*this);
252 typename TrackCloudType::parcelType::trackingData& ttd =
253 static_cast<typename TrackCloudType::parcelType::trackingData&
>(td);
254 const scalar mass =
p.mass();
255 const typename TrackCloudType::forceType& forces =
cloud.forces();
256 const forceSuSp Fcp = forces.calcCoupled(
p, ttd, dt, mass,
Re, muAv);
257 const forceSuSp Fncp = forces.calcNonCoupled(
p, ttd, dt, mass,
Re, muAv);
258 this->tMom() = mass/(Fcp.
Sp() + Fncp.
Sp() + ROOTVSMALL);
262 scalar parcelMassChild = 0.0;
292 scalar
Re = rhoAv*Urmag*dChild/muAv;
296 child->origId() = this->getNewParticleID();
298 child->
d0() = dChild;
299 const scalar massChild = child->mass();
300 child->mass0() = massChild;
301 child->nParticle() = parcelMassChild/massChild;
304 forces.calcCoupled(*child, ttd, dt, massChild,
Re, muAv);
306 forces.calcNonCoupled(*child, ttd, dt, massChild,
Re, muAv);
311 child->
y() =
cloud.breakup().y0();
314 child->
ms() = -GREAT;
315 child->
injector() = this->injector();
316 child->
tMom() = massChild/(Fcp.
Sp() + Fncp.
Sp());
318 child->calcDispersion(
cloud, td, dt);
320 cloud.addParticle(child);
325 template<
class ParcelType>
326 template<
class TrackCloudType>
329 TrackCloudType&
cloud,
340 scalar
T0 = this->
T();
342 scalar pAmb =
cloud.pAmbient();
344 scalar pv = liquids.pv(
p0,
T0, X);
348 if (pv >= 0.999*pAmb)
355 scalar hl = liq.
hl(pAmb, TBoil);
356 scalar iTp = liq.
h(pAmb,
T0) - pAmb/liq.
rho(pAmb,
T0);
357 scalar iTb = liq.
h(pAmb, TBoil) - pAmb/liq.
rho(pAmb, TBoil);
359 chi += X[i]*(iTp - iTb)/hl;
363 chi =
min(1.0,
max(chi, 0.0));
369 template<
class ParcelType>
370 template<
class TrackCloudType>
373 TrackCloudType&
cloud,
378 const scalar& TABCmu =
cloud.breakup().TABCmu();
379 const scalar& TABtwoWeCrit =
cloud.breakup().TABtwoWeCrit();
380 const scalar& TABComega =
cloud.breakup().TABComega();
382 scalar r = 0.5*this->d();
387 scalar rtd = 0.5*TABCmu*mu_/(this->
rho()*r2);
390 scalar omega2 = TABComega*sigma_/(this->
rho()*r3) - rtd*rtd;
394 scalar omega =
sqrt(omega2);
396 this->We(td.rhoc(), this->
U(), td.Uc(), r, sigma_)/TABtwoWeCrit;
399 scalar
y0 = this->
y() - We;
400 scalar yDot0 = this->yDot() +
y0*rtd;
403 scalar
c =
cos(omega*dt);
404 scalar
s =
sin(omega*dt);
405 scalar
e =
exp(-rtd*dt);
407 this->
y() = We +
e*(
y0*
c + (yDot0/omega)*
s);
408 this->yDot() = (We - this->
y())*rtd +
e*(yDot0*
c - omega*
y0*
s);
421 template<
class ParcelType>
426 position0_(
p.position0_),
429 liquidCore_(
p.liquidCore_),
430 KHindex_(
p.KHindex_),
435 injector_(
p.injector_),
441 template<
class ParcelType>
444 const SprayParcel<ParcelType>&
p,
450 position0_(
p.position0_),
453 liquidCore_(
p.liquidCore_),
454 KHindex_(
p.KHindex_),
459 injector_(
p.injector_),
const scalar RR
Universal gas constant: default in [J/(kmol K)].
scalar y() const
Return const access to spherical deviation.
scalar tc() const
Return const access to atomization characteristic time.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
scalarList X0(nSpecie, Zero)
dimensionedScalar sin(const dimensionedScalar &ds)
ParcelType::trackingData trackingData
Use base tracking data.
const Time & time() const
Return time.
void calcAtomization(TrackCloudType &cloud, trackingData &td, const scalar dt)
Correct parcel properties according to atomization model.
const Type & value() const
Return const reference to value.
dimensionedScalar exp(const dimensionedScalar &ds)
basicSpecieMixture & composition
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
#define forAll(list, i)
Loop across all elements in list.
void cellValueSourceCorrection(TrackCloudType &cloud, trackingData &td, const scalar dt)
Correct cell values using latest transfer information.
const objectRegistry & db() const
Return the local objectRegistry.
scalar ms() const
Return const access to stripped parcel mass.
void calc(TrackCloudType &cloud, trackingData &td, const scalar dt)
Update parcel properties over the time interval.
scalar user() const
Return const access to passive user scalar.
The thermophysical properties of a liquid.
#define R(A, B, C, D, E, F, K, M)
dimensionedScalar pow3(const dimensionedScalar &ds)
Helper container for force Su and Sp terms.
dimensionedScalar y0(const dimensionedScalar &ds)
scalar injector() const
Return const access to injector id.
scalar yDot() const
Return const access to rate of change of spherical deviation.
Reacting spray parcel, with added functionality for atomization and breakup.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
void setCellValues(TrackCloudType &cloud, trackingData &td)
Set cell values.
virtual scalar pvInvert(scalar p) const
Invert the vapour pressure relationship to retrieve the.
scalar tMom() const
Return const access to momentum relaxation time.
void calcBreakup(TrackCloudType &cloud, trackingData &td, const scalar dt)
Correct parcel properties according to breakup model.
const uniformDimensionedVectorField & g
scalar KHindex() const
Return const access to Kelvin-Helmholtz breakup index.
virtual scalar h(scalar p, scalar T) const =0
Liquid enthalpy [J/kg] - reference to 298.15 K.
A cloud is a registry collection of lagrangian particles.
void solveTABEq(TrackCloudType &cloud, trackingData &td, const scalar dt)
Solve the TAB equation.
scalar chi(TrackCloudType &cloud, trackingData &td, const scalarField &X) const
Calculate the chi-factor for flash-boiling for the.
scalar liquidCore() const
Return const access to liquid core.
dimensionedScalar sqrt(const dimensionedScalar &ds)
SprayParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
Construct from mesh, coordinates and topology.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const dimensionedScalar e
Elementary charge.
virtual scalar rho(scalar p, scalar T) const =0
Liquid density [kg/m^3].
scalarField Re(const UList< complex > &cf)
Extract real component.
const volScalarField & Cp
const dimensionedScalar c
Speed of light in a vacuum.
scalar Sp() const
Return const access to the implicit coefficient [kg/s].
virtual scalar hl(scalar p, scalar T) const =0
Heat of vapourisation [J/kg].
const volScalarField & p0
dimensionedScalar cbrt(const dimensionedScalar &ds)
scalar d0() const
Return const access to initial droplet diameter.
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar pos(const dimensionedScalar &ds)