Go to the documentation of this file.
33 template<
class ParcelType>
34 template<
class TrackData>
42 ParcelType::setCellValues(td, dt, cellI);
46 template<
class ParcelType>
47 template<
class TrackData>
55 ParcelType::cellValueSourceCorrection(td, dt, cellI);
59 template<
class ParcelType>
60 template<
class TrackData>
68 typedef typename TrackData::cloudType::reactingCloudType reactingCloudType;
70 td.cloud().composition();
73 if (liquidCore() > 0.5)
76 td.cloud().forces().setCalcCoupled(
false);
84 const scalar T0 = this->
T();
85 const scalar pc0 = this->pc_;
93 td.cloud().constProps().setTMax(TMax);
100 const scalar mass0 = this->mass();
109 this->ms() -= this->ms()*(mass0 - this->mass())/mass0;
113 scalar T1 = this->
T();
116 this->Cp() =
composition.liquids().Cp(this->pc_, T1, X1);
118 sigma_ =
composition.liquids().sigma(this->pc_, T1, X1);
128 if (liquidCore() > 0.5)
130 calcAtomization(td, dt, cellI);
134 scalar d2 = this->d();
135 this->nParticle() *=
pow3(d1/d2);
139 calcBreakup(td, dt, cellI);
144 td.cloud().forces().setCalcCoupled(
true);
148 template<
class ParcelType>
149 template<
class TrackData>
157 typedef typename TrackData::cloudType::sprayCloudType sprayCloudType;
159 td.cloud().atomization();
161 if (!atomization.active())
166 typedef typename TrackData::cloudType::reactingCloudType reactingCloudType;
168 td.cloud().composition();
172 scalar Wc = this->rhoc_*
RR*this->Tc()/this->pc();
174 scalar Tav = atomization.
Taverage(this->
T(), this->Tc());
177 scalar rhoAv = this->pc()/(
R*Tav);
179 scalar soi = td.cloud().injectors().timeStart();
180 scalar currentTime = td.cloud().db().time().value();
182 const vector& injectionPos = this->position0();
188 scalar t0 =
max(0.0, currentTime - this->age() - soi);
189 scalar t1 =
min(t0 + dt, td.cloud().injectors().timeEnd() - soi);
192 scalar volFlowRate = td.cloud().injectors().volumeToInject(t0, t1)/dt;
197 chi = this->chi(td,
composition.liquids().X(this->Y()));
214 td.cloud().pAmbient(),
221 template<
class ParcelType>
222 template<
class TrackData>
230 typedef typename TrackData::cloudType cloudType;
231 typedef typename cloudType::parcelType parcelType;
232 typedef typename cloudType::forceType forceType;
233 typedef typename TrackData::cloudType::sprayCloudType sprayCloudType;
237 if (!breakup.active())
242 const parcelType&
p =
static_cast<const parcelType&
>(*this);
251 scalar Wc = this->rhoc()*
RR*this->Tc()/this->pc();
253 scalar Tav = td.cloud().atomization().Taverage(this->
T(), this->Tc());
256 scalar rhoAv = this->pc()/(
R*Tav);
257 scalar muAv = this->muc();
260 scalar
Re = this->
Re(this->
U(), this->d(), rhoAv, muAv);
262 const scalar mass =
p.mass();
265 this->tMom() = mass/(Fcp.
Sp() + Fncp.
Sp() + ROOTVSMALL);
267 const vector g = td.cloud().g().value();
269 scalar parcelMassChild = 0.0;
299 scalar
Re = rhoAv*Urmag*dChild/muAv;
304 child->
d0() = dChild;
305 const scalar massChild = child->mass();
306 child->mass0() = massChild;
307 child->nParticle() = parcelMassChild/massChild;
310 forces.calcCoupled(*child, dt, massChild,
Re, muAv);
312 forces.calcNonCoupled(*child, dt, massChild,
Re, muAv);
317 child->
y() = td.cloud().breakup().y0();
318 child->
yDot() = td.cloud().breakup().yDot0();
320 child->
ms() = -GREAT;
321 child->
injector() = this->injector();
322 child->
tMom() = massChild/(Fcp.
Sp() + Fncp.
Sp());
326 td.cloud().addParticle(child);
331 template<
class ParcelType>
332 template<
class TrackData>
341 typedef typename TrackData::cloudType::reactingCloudType reactingCloudType;
343 td.cloud().composition();
346 scalar T0 = this->
T();
347 scalar p0 = this->pc();
348 scalar pAmb = td.cloud().pAmbient();
354 if (pv >= 0.999*pAmb)
361 scalar hl = liq.
hl(pAmb, TBoil);
362 scalar iTp = liq.
h(pAmb, T0) - pAmb/liq.
rho(pAmb, T0);
363 scalar iTb = liq.
h(pAmb, TBoil) - pAmb/liq.
rho(pAmb, TBoil);
365 chi += X[i]*(iTp - iTb)/hl;
369 chi =
min(1.0,
max(chi, 0.0));
375 template<
class ParcelType>
376 template<
class TrackData>
383 const scalar& TABCmu = td.cloud().breakup().TABCmu();
384 const scalar& TABtwoWeCrit = td.cloud().breakup().TABtwoWeCrit();
385 const scalar& TABComega = td.cloud().breakup().TABComega();
387 scalar r = 0.5*this->d();
392 scalar rtd = 0.5*TABCmu*mu_/(this->
rho()*r2);
395 scalar omega2 = TABComega*sigma_/(this->
rho()*r3) - rtd*rtd;
399 scalar omega =
sqrt(omega2);
400 scalar rhoc = this->rhoc();
401 scalar We = this->We(this->
U(), r, rhoc, sigma_)/TABtwoWeCrit;
404 scalar
y0 = this->
y() - We;
405 scalar yDot0 = this->yDot() +
y0*rtd;
408 scalar
c =
cos(omega*dt);
409 scalar
s =
sin(omega*dt);
410 scalar
e =
exp(-rtd*dt);
412 this->
y() = We +
e*(
y0*
c + (yDot0/omega)*
s);
413 this->yDot() = (We - this->
y())*rtd +
e*(yDot0*
c - omega*
y0*
s);
426 template<
class ParcelType>
431 position0_(
p.position0_),
434 liquidCore_(
p.liquidCore_),
435 KHindex_(
p.KHindex_),
440 injector_(
p.injector_),
446 template<
class ParcelType>
449 const SprayParcel<ParcelType>&
p,
455 position0_(
p.position0_),
458 liquidCore_(
p.liquidCore_),
459 KHindex_(
p.KHindex_),
464 injector_(
p.injector_),
const scalar RR
Universal gas constant (default in [J/(kmol K)])
scalar Sp() const
Return const access to the implicit coefficient [kg/s].
scalar y() const
Return const access to spherical deviation.
scalar tc() const
Return const access to atomization characteristic time.
const Switch & solveOscillationEq() const
#define forAll(list, i)
Loop across all elements in list.
virtual scalar hl(scalar p, scalar T) const
Heat of vapourisation [J/kg].
virtual bool calcChi() const =0
Flag to indicate if chi needs to be calculated.
dimensionedScalar sin(const dimensionedScalar &ds)
void calc(const argList &args, const Time &runTime, const fvMesh &mesh)
scalarField Re(const UList< complex > &cf)
Templated atomization model class.
const dimensionedVector & g
dimensionedScalar exp(const dimensionedScalar &ds)
dimensioned< scalar > mag(const dimensioned< Type > &)
virtual scalar h(scalar p, scalar T) const
Liquid enthalpy [J/kg] - reference to 298.15 K.
scalar ms() const
Return const access to stripped parcel mass.
Templated reacting parcel composition model class Consists of carrier species (via thermo package),...
scalar user() const
Return const access to passive user scalar.
The thermophysical properties of a liquidProperties.
#define R(A, B, C, D, E, F, K, M)
scalarList X0(nSpecie, 0.0)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
dimensionedScalar pow3(const dimensionedScalar &ds)
Helper container for force Su and Sp terms.
dimensionedScalar y0(const dimensionedScalar &ds)
void solveTABEq(TrackData &td, const scalar dt)
Solve the TAB equation.
scalar injector() const
Return const access to injector id.
virtual scalar rho(scalar p, scalar T) const
Liquid rho [kg/m^3].
scalar chi(TrackData &td, const scalarField &X) const
Calculate the chi-factor for flash-boiling for the.
scalar yDot() const
Return const access to rate of change of spherical deviation.
Reacing spray parcel, with added functionality for atomization and breakup.
void cellValueSourceCorrection(TrackData &td, const scalar dt, const label cellI)
Correct cell values using latest transfer information.
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 setCellValues(TrackData &td, const scalar dt, const label cellI)
Set cell values.
scalar KHindex() const
Return const access to Kelvin-Helmholtz breakup index.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().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))
void calcBreakup(TrackData &td, const scalar dt, const label cellI)
Correct parcel properties according to breakup model.
Templated break-up model class.
void calc(TrackData &td, const scalar dt, const label cellI)
Update parcel properties over the time interval.
This function object calculates the forces and moments by integrating the pressure and skin-friction ...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
virtual bool update(const scalar dt, const vector &g, scalar &d, scalar &tc, scalar &ms, scalar &nParticle, scalar &KHindex, scalar &y, scalar &yDot, const scalar d0, const scalar rho, const scalar mu, const scalar sigma, const vector &U, const scalar rhoc, const scalar muc, const vector &Urel, const scalar Urmag, const scalar tMom, scalar &dChild, scalar &massChild)=0
Update the parcel properties and return true if a child parcel.
scalar liquidCore() const
Return const access to liquid core.
dimensionedScalar sqrt(const dimensionedScalar &ds)
const dimensionedScalar e
Elementary charge.
virtual void update(const scalar dt, scalar &d, scalar &liquidCore, scalar &tc, const scalar rho, const scalar mu, const scalar sigma, const scalar volFlowRate, const scalar rhoAv, const scalar Urel, const vector &pos, const vector &injectionPos, const scalar pAmbient, const scalar chi, cachedRandom &rndGen) const =0
basicMultiComponentMixture & composition
void calcAtomization(TrackData &td, const scalar dt, const label cellI)
Correct parcel properties according to atomization model.
const dimensionedScalar c
Speed of light in a vacuum.
SprayParcel(const polyMesh &mesh, const vector &position, const label cellI, const label tetFaceI, const label tetPtI)
Construct from owner, position, and cloud owner.
dimensionedScalar cbrt(const dimensionedScalar &ds)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
scalar Taverage(const scalar &Tliq, const scalar &Tc) const
Average temperature calculation.
scalar d0() const
Return const access to initial droplet diameter.
forces(const forces &)
Disallow default bitwise copy construct.
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar pos(const dimensionedScalar &ds)