32 template<
class ParcelType>
33 template<
class TrackData>
41 ParcelType::setCellValues(td, dt, celli);
45 template<
class ParcelType>
46 template<
class TrackData>
54 ParcelType::cellValueSourceCorrection(td, dt, celli);
58 template<
class ParcelType>
59 template<
class TrackData>
67 typedef typename TrackData::cloudType::reactingCloudType reactingCloudType;
69 td.cloud().composition();
72 if (liquidCore() > 0.5)
75 td.cloud().forces().setCalcCoupled(
false);
82 scalar TMax = composition.
liquids().Tc(
X0);
83 const scalar T0 = this->
T();
84 const scalar pc0 = this->pc_;
85 if (composition.
liquids().pv(pc0, T0,
X0) >= pc0*0.999)
88 TMax = composition.
liquids().pvInvert(pc0,
X0);
92 td.cloud().constProps().setTMax(TMax);
95 this->Cp() = composition.
liquids().Cp(pc0, T0,
X0);
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(td, dt, celli);
108 this->ms() -= this->ms()*(mass0 - this->mass())/mass0;
112 scalar T1 = this->
T();
115 this->Cp() = composition.
liquids().Cp(this->pc_, T1, X1);
117 sigma_ = composition.
liquids().sigma(this->pc_, T1, X1);
119 scalar
rho1 = composition.
liquids().rho(this->pc_, T1, X1);
122 mu_ = composition.
liquids().mu(this->pc_, T1, X1);
124 scalar d1 = this->d()*
cbrt(rho0/rho1);
127 if (liquidCore() > 0.5)
129 calcAtomization(td, dt, celli);
133 scalar d2 = this->d();
134 this->nParticle() *=
pow3(d1/d2);
138 calcBreakup(td, dt, celli);
143 td.cloud().forces().setCalcCoupled(
true);
147 template<
class ParcelType>
148 template<
class TrackData>
156 typedef typename TrackData::cloudType::reactingCloudType reactingCloudType;
158 td.cloud().composition();
160 typedef typename TrackData::cloudType::sprayCloudType sprayCloudType;
162 td.cloud().atomization();
165 scalar Wc = this->rhoc_*
RR*this->Tc()/this->pc();
167 scalar Tav = atomization.
Taverage(this->
T(), this->Tc());
170 scalar rhoAv = this->pc()/(R*Tav);
172 scalar soi = td.cloud().injectors().timeStart();
173 scalar currentTime = td.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, td.cloud().injectors().timeEnd() - soi);
185 scalar volFlowRate = td.cloud().injectors().volumeToInject(t0, t1)/dt;
190 chi = this->chi(td, composition.
liquids().X(this->
Y()));
207 td.cloud().pAmbient(),
214 template<
class ParcelType>
215 template<
class TrackData>
223 typedef typename TrackData::cloudType cloudType;
224 typedef typename cloudType::parcelType parcelType;
225 typedef typename cloudType::forceType forceType;
227 const parcelType& p =
static_cast<const parcelType&
>(*this);
228 const forceType& forces = td.cloud().forces();
230 if (td.cloud().breakup().solveOscillationEq())
236 scalar Wc = this->rhoc()*
RR*this->Tc()/this->pc();
238 scalar Tav = td.cloud().atomization().Taverage(this->
T(), this->Tc());
241 scalar rhoAv = this->pc()/(R*Tav);
242 scalar muAv = this->muc();
244 scalar Urmag =
mag(Urel);
245 scalar
Re = this->
Re(this->
U(), this->d(), rhoAv, muAv);
247 const scalar mass = p.mass();
248 const forceSuSp Fcp = forces.calcCoupled(p, dt, mass, Re, muAv);
249 const forceSuSp Fncp = forces.calcNonCoupled(p, dt, mass, Re, muAv);
250 this->tMom() = mass/(Fcp.
Sp() + Fncp.
Sp());
252 const vector g = td.cloud().g().value();
254 scalar parcelMassChild = 0.0;
258 td.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, dt, massChild, Re, muAv);
298 forces.calcNonCoupled(*child, dt, massChild, Re, muAv);
303 child->
y() = td.cloud().breakup().y0();
304 child->
yDot() = td.cloud().breakup().yDot0();
306 child->
ms() = -GREAT;
307 child->
injector() = this->injector();
308 child->
tMom() = massChild/(Fcp.
Sp() + Fncp.
Sp());
312 td.cloud().addParticle(child);
317 template<
class ParcelType>
318 template<
class TrackData>
327 typedef typename TrackData::cloudType::reactingCloudType reactingCloudType;
329 td.cloud().composition();
332 scalar T0 = this->
T();
333 scalar p0 = this->pc();
334 scalar pAmb = td.cloud().pAmbient();
336 scalar pv = composition.
liquids().pv(p0, T0, X);
340 if (pv >= 0.999*pAmb)
347 scalar hl = liq.
hl(pAmb, TBoil);
348 scalar iTp = liq.
h(pAmb, T0) - pAmb/liq.
rho(pAmb, T0);
349 scalar iTb = liq.
h(pAmb, TBoil) - pAmb/liq.
rho(pAmb, TBoil);
351 chi += X[i]*(iTp - iTb)/hl;
355 chi =
min(1.0,
max(chi, 0.0));
361 template<
class ParcelType>
362 template<
class TrackData>
369 const scalar& TABCmu = td.cloud().breakup().TABCmu();
370 const scalar& TABtwoWeCrit = td.cloud().breakup().TABtwoWeCrit();
371 const scalar& TABComega = td.cloud().breakup().TABComega();
373 scalar r = 0.5*this->d();
378 scalar rtd = 0.5*TABCmu*mu_/(this->
rho()*r2);
381 scalar omega2 = TABComega*sigma_/(this->
rho()*r3) - rtd*rtd;
385 scalar omega =
sqrt(omega2);
386 scalar rhoc = this->rhoc();
387 scalar We = this->We(this->
U(), r, rhoc, sigma_)/TABtwoWeCrit;
390 scalar
y0 = this->
y() - We;
391 scalar yDot0 = this->yDot() + y0*rtd;
394 scalar
c =
cos(omega*dt);
395 scalar
s =
sin(omega*dt);
396 scalar
e =
exp(-rtd*dt);
398 this->
y() = We + e*(y0*c + (yDot0/omega)*s);
399 this->yDot() = (We - this->
y())*rtd + e*(yDot0*c - omega*y0*s);
412 template<
class ParcelType>
432 template<
class ParcelType>
void solveTABEq(TrackData &td, const scalar dt)
Solve the TAB equation.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual scalar rho(scalar p, scalar T) const =0
Liquid density [kg/m^3].
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
scalar tMom_
Momentum relaxation time (needed for calculating parcel acc.)
scalar KHindex() const
Return const access to Kelvin-Helmholtz breakup index.
scalar tMom() const
Return const access to momentum relaxation time.
virtual bool calcChi() const =0
Flag to indicate if chi needs to be calculated.
basicMultiComponentMixture & composition
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)
Templated atomization model class.
void calc(TrackData &td, const scalar dt, const label celli)
Update parcel properties over the time interval.
virtual scalar hl(scalar p, scalar T) const =0
Heat of vapourisation [J/kg].
dimensionedScalar y0(const dimensionedScalar &ds)
scalar chi(TrackData &td, const scalarField &X) const
Calculate the chi-factor for flash-boiling for the.
scalar ms() const
Return const access to stripped parcel mass.
void calcAtomization(TrackData &td, const scalar dt, const label celli)
Correct parcel properties according to atomization model.
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)
dimensionedScalar pos(const dimensionedScalar &ds)
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))
const dimensionedScalar e
Elementary charge.
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar exp(const dimensionedScalar &ds)
dimensionedScalar cbrt(const dimensionedScalar &ds)
scalar tc() const
Return const access to atomization characteristic time.
virtual scalar h(scalar p, scalar T) const =0
Liquid enthalpy [J/kg] - reference to 298.15 K.
The thermophysical properties of a liquid.
scalar injector_
Injected from injector (needed e.g. for calculating distance.
scalar user_
Passive scalar (extra variable to be defined by user)
void cellValueSourceCorrection(TrackData &td, const scalar dt, const label celli)
Correct cell values using latest transfer information.
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)
const dimensionedVector & g
scalar user() const
Return const access to passive user scalar.
scalar sigma_
Liquid surface tension [N/m].
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedScalar pow3(const dimensionedScalar &ds)
vector position0_
Injection position.
void calcBreakup(TrackData &td, const scalar dt, const label celli)
Correct parcel properties according to breakup model.
#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
const dimensionedScalar c
Speed of light in a vacuum.
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
scalar Taverage(const scalar &Tliq, const scalar &Tc) const
Average temperature calculation.
scalar ms_
Stripped parcel mass due to breakup.
dimensioned< scalar > mag(const dimensioned< Type > &)
scalar d0_
Initial droplet diameter.
const scalar RR
Universal gas constant (default in [J/(kmol K)])
Mesh consisting of general polyhedral cells.
scalar tc_
Characteristic time (used in atomization and/or breakup model)
scalar mu_
Liquid dynamic viscosity [Pa.s].
const dimensionedScalar & rho1
Templated reacting parcel composition model class Consists of carrier species (via thermo package)...
scalar y_
Spherical deviation.
scalar KHindex_
Index for KH Breakup.
scalarField Re(const UList< complex > &cf)
void setCellValues(TrackData &td, const scalar dt, const label celli)
Set cell values.
Reacing spray parcel, with added functionality for atomization and breakup.
const liquidMixtureProperties & liquids() const
Return the global (additional) liquids.