33 template<
class ParcelType>
34 template<
class TrackCloudType>
37 TrackCloudType& cloud,
41 ParcelType::setCellValues(cloud, td);
45 template<
class ParcelType>
46 template<
class TrackCloudType>
49 TrackCloudType& cloud,
54 ParcelType::cellValueSourceCorrection(cloud, td, dt);
58 template<
class ParcelType>
59 template<
class TrackCloudType>
62 TrackCloudType& cloud,
67 typedef typename TrackCloudType::thermoCloudType thermoCloudType;
72 if (liquidCore() > 0.5)
75 cloud.forces().setCalcCoupled(
false);
82 scalar TMax = composition.
liquids().Tc(
X0);
83 const scalar
T0 = this->
T();
84 const scalar pc0 = td.pc();
85 if (composition.
liquids().pv(pc0, T0,
X0) >= pc0*0.999)
88 TMax = composition.
liquids().pvInvert(pc0,
X0);
92 cloud.constProps().setTMax(TMax);
96 sigma_ = composition.
liquids().sigma(pc0, T0,
X0);
99 const scalar mass0 = this->mass();
100 mu_ = composition.
liquids().mu(pc0, T0,
X0);
102 ParcelType::calc(cloud,td, dt);
108 this->ms() -= this->ms()*(mass0 - this->mass())/mass0;
112 scalar T1 = this->
T();
115 this->
Cp() = composition.
liquids().Cp(td.pc(), T1, X1);
117 sigma_ = composition.
liquids().sigma(td.pc(), T1, X1);
119 scalar
rho1 = composition.
liquids().rho(td.pc(), T1, X1);
122 mu_ = composition.
liquids().mu(td.pc(), T1, X1);
124 scalar d1 = this->d()*
cbrt(rho0/rho1);
127 if (liquidCore() > 0.5)
129 calcAtomisation(cloud, td, dt);
133 scalar d2 = this->d();
134 this->nParticle() *=
pow3(d1/d2);
138 calcBreakup(cloud, td, dt);
143 cloud.forces().setCalcCoupled(
true);
147 template<
class ParcelType>
148 template<
class TrackCloudType>
151 TrackCloudType& cloud,
156 typedef typename TrackCloudType::thermoCloudType thermoCloudType;
160 typedef typename TrackCloudType::sprayCloudType sprayCloudType;
165 scalar Wc = td.rhoc()*
RR*td.Tc()/td.pc();
167 scalar Tav = atomisation.
Taverage(this->
T(), td.Tc());
170 scalar rhoAv = td.pc()/(R*Tav);
172 scalar soi = cloud.injectors().timeStart();
173 scalar currentTime = cloud.db().time().value();
175 const vector& injectionPos = this->position0();
181 scalar t0 =
max(0.0, currentTime - this->age() - soi);
182 scalar t1 =
min(t0 + dt, cloud.injectors().timeEnd() - soi);
185 scalar volFlowRate = cloud.injectors().volumeToInject(t0, t1)/dt;
190 chi = this->chi(cloud, td, composition.
liquids().X(this->
Y()));
214 template<
class ParcelType>
215 template<
class TrackCloudType>
218 TrackCloudType& cloud,
223 const typename TrackCloudType::parcelType& p =
224 static_cast<const typename TrackCloudType::parcelType&
>(*this);
225 typename TrackCloudType::parcelType::trackingData& ttd =
226 static_cast<typename TrackCloudType::parcelType::trackingData&
>(td);
228 const typename TrackCloudType::forceType& forces = cloud.forces();
230 if (cloud.breakup().solveOscillationEq())
232 solveTABEq(cloud, td, dt);
236 scalar Wc = td.rhoc()*
RR*td.Tc()/td.pc();
238 scalar Tav = cloud.atomisation().Taverage(this->
T(), td.Tc());
241 scalar rhoAv = td.pc()/(R*Tav);
242 scalar muAv = td.muc();
244 scalar Urmag =
mag(Urel);
245 scalar
Re = this->
Re(rhoAv, this->
U(), td.Uc(), this->d(), muAv);
247 const scalar mass = p.mass();
248 const forceSuSp Fcp = forces.calcCoupled(p, ttd, dt, mass, Re, muAv);
249 const forceSuSp Fncp = forces.calcNonCoupled(p, ttd, dt, mass, Re, muAv);
250 this->tMom() = mass/(Fcp.
Sp() + Fncp.
Sp());
252 const vector g = cloud.g().value();
254 scalar parcelMassChild = 0.0;
258 cloud.breakup().update
284 scalar Re = rhoAv*Urmag*dChild/muAv;
288 child->origId() = this->getNewParticleID();
290 child->
d0() = dChild;
291 const scalar massChild = child->mass();
292 child->mass0() = massChild;
293 child->nParticle() = parcelMassChild/massChild;
296 forces.calcCoupled(*child, ttd, dt, massChild, Re, muAv);
298 forces.calcNonCoupled(*child, ttd, dt, massChild, Re, muAv);
303 child->
y() = cloud.breakup().y0();
304 child->
yDot() = cloud.breakup().yDot0();
306 child->
ms() = -great;
307 child->
injector() = this->injector();
308 child->
tMom() = massChild/(Fcp.
Sp() + Fncp.
Sp());
310 child->calcDispersion(cloud, td, dt);
312 cloud.addParticle(child);
317 template<
class ParcelType>
318 template<
class TrackCloudType>
321 TrackCloudType& cloud,
328 typedef typename TrackCloudType::thermoCloudType thermoCloudType;
333 scalar
T0 = this->
T();
335 scalar pAmb = cloud.pAmbient();
337 scalar pv = composition.
liquids().pv(p0, T0, X);
341 if (pv >= 0.999*pAmb)
348 scalar hl = liq.
hl(pAmb, TBoil);
349 scalar iTp = liq.
Ha(pAmb, T0) - pAmb/liq.
rho(pAmb, T0);
350 scalar iTb = liq.
Ha(pAmb, TBoil) - pAmb/liq.
rho(pAmb, TBoil);
352 chi += X[i]*(iTp - iTb)/hl;
356 chi =
min(1.0,
max(chi, 0.0));
362 template<
class ParcelType>
363 template<
class TrackCloudType>
366 TrackCloudType& cloud,
371 const scalar& TABCmu = cloud.breakup().TABCmu();
372 const scalar& TABtwoWeCrit = cloud.breakup().TABtwoWeCrit();
373 const scalar& TABComega = cloud.breakup().TABComega();
375 scalar r = 0.5*this->d();
380 scalar rtd = 0.5*TABCmu*mu_/(this->
rho()*r2);
383 scalar omega2 = TABComega*sigma_/(this->
rho()*r3) - rtd*rtd;
387 scalar omega =
sqrt(omega2);
389 this->We(td.rhoc(), this->
U(), td.Uc(), r, sigma_)/TABtwoWeCrit;
392 scalar
y0 = this->
y() - We;
393 scalar yDot0 = this->yDot() + y0*rtd;
396 scalar
c =
cos(omega*dt);
397 scalar
s =
sin(omega*dt);
398 scalar
e =
exp(-rtd*dt);
400 this->
y() = We + e*(y0*c + (yDot0/omega)*s);
401 this->yDot() = (We - this->
y())*rtd + e*(yDot0*c - omega*y0*s);
414 template<
class ParcelType>
434 template<
class ParcelType>
const volScalarField & rho1
virtual bool calcChi() const =0
Flag to indicate if chi needs to be calculated.
#define forAll(list, i)
Loop across all elements in list.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
virtual scalar rho(scalar p, scalar T) const =0
Liquid density [kg/m^3].
scalar tMom_
Momentum relaxation time (needed for calculating parcel acc.)
basicSpecieMixture & composition
scalar KHindex() const
Return const access to Kelvin-Helmholtz breakup index.
scalar tMom() const
Return const access to momentum relaxation time.
virtual scalar pvInvert(scalar p) const
Invert the vapour pressure relationship to retrieve the.
scalar liquidCore() const
Return const access to liquid core.
dimensionedScalar sqrt(const dimensionedScalar &ds)
void calcAtomisation(TrackCloudType &cloud, trackingData &td, const scalar dt)
Correct parcel properties according to atomisation model.
virtual scalar hl(scalar p, scalar T) const =0
Heat of vapourisation [J/kg].
Templated atomisation model class.
dimensionedScalar y0(const dimensionedScalar &ds)
void calcBreakup(TrackCloudType &cloud, trackingData &td, const scalar dt)
Correct parcel properties according to breakup model.
scalar ms() const
Return const access to stripped parcel mass.
const dimensionedScalar c
Speed of light in a vacuum.
scalar liquidCore_
Part of liquid core ( >0.5=liquid, <0.5=droplet )
SprayParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
Construct from mesh, coordinates and topology.
scalar y() const
Return const access to spherical deviation.
Helper container for force Su and Sp terms.
scalarList X0(nSpecie, 0.0)
scalar chi(TrackCloudType &cloud, trackingData &td, const scalarField &X) const
Calculate the chi-factor for flash-boiling for the.
dimensionedScalar pos(const dimensionedScalar &ds)
const dimensionedScalar RR
Universal gas constant: default SI units: [J/kmol/K].
scalar d0() const
Return const access to initial droplet diameter.
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))
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar exp(const dimensionedScalar &ds)
dimensionedScalar cbrt(const dimensionedScalar &ds)
scalar tc() const
Return const access to atomisation characteristic time.
virtual scalar Ha(scalar p, scalar T) const =0
Liquid absolute enthalpy [J/kg].
The thermophysical properties of a liquid.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
scalar injector_
Injected from injector (needed e.g. for calculating distance.
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, Random &rndGen) const =0
scalar user_
Passive scalar (extra variable to be defined by user)
scalar Sp() const
Return const access to the implicit coefficient [kg/s].
scalar yDot() const
Return const access to rate of change of spherical deviation.
dimensionedScalar sin(const dimensionedScalar &ds)
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.
scalar sigma_
Liquid surface tension [N/m].
scalar Taverage(const scalar &Tliq, const scalar &Tc) const
Average temperature calculation.
dimensionedScalar pow3(const dimensionedScalar &ds)
vector position0_
Injection position.
#define R(A, B, C, D, E, F, K, M)
scalar injector() const
Return const access to injector id.
scalar yDot_
Rate of change of spherical deviation.
PtrList< volScalarField > & Y
void solveTABEq(TrackCloudType &cloud, trackingData &td, const scalar dt)
Solve the TAB equation.
void setCellValues(TrackCloudType &cloud, trackingData &td)
Set cell values.
scalar ms_
Stripped parcel mass due to breakup.
scalar Cp(const scalar p, const scalar T) const
void cellValueSourceCorrection(TrackCloudType &cloud, trackingData &td, const scalar dt)
Correct cell values using latest transfer information.
dimensioned< scalar > mag(const dimensioned< Type > &)
scalar d0_
Initial droplet diameter.
Mesh consisting of general polyhedral cells.
scalar tc_
Characteristic time (used in atomisation and/or breakup model)
scalar mu_
Liquid dynamic viscosity [Pa.s].
const dimensionedVector & g
Templated reacting parcel composition model class Consists of carrier species (via thermo package)...
scalar y_
Spherical deviation.
ParcelType::trackingData trackingData
Use base tracking data.
scalar KHindex_
Index for KH Breakup.
scalarField Re(const UList< complex > &cf)
const dimensionedScalar e
Elementary charge.
Reaching spray parcel, with added functionality for atomisation and breakup.
const liquidMixtureProperties & liquids() const
Return the global (additional) liquids.