SprayFoam中关于breakup model的 child parcel的速度设置问题
-
各位大佬,
关于sprayFoam中的breakup model,中childparcel是如何设定其速度的?
template<class CloudType> bool Foam::ReitzKHRT<CloudType>::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 ) { ....... return addParcel; }
上部分code节选与KHRTmodel,其中的return 的addParcel是一个boolean,true时即增加child parcel。 child parcel的mass和diameter都计算得到。
接下来进入sprayParcel.C 的calcBreakup中
typedef typename TrackData::cloudType cloudType; typedef typename cloudType::parcelType parcelType; typedef typename cloudType::forceType forceType; const parcelType& p = static_cast<const parcelType&>(*this); const forceType& forces = td.cloud().forces(); if (td.cloud().breakup().solveOscillationEq()) { solveTABEq(td, dt); } // Average molecular weight of carrier mix - assumes perfect gas scalar Wc = this->rhoc()*RR*this->Tc()/this->pc(); scalar R = RR/Wc; scalar Tav = td.cloud().atomization().Taverage(this->T(), this->Tc()); // Calculate average gas density based on average temperature scalar rhoAv = this->pc()/(R*Tav); scalar muAv = this->muc(); vector Urel = this->U() - this->Uc(); scalar Urmag = mag(Urel); scalar Re = this->Re(this->U(), this->d(), rhoAv, muAv); const scalar mass = p.mass(); const forceSuSp Fcp = forces.calcCoupled(p, dt, mass, Re, muAv); const forceSuSp Fncp = forces.calcNonCoupled(p, dt, mass, Re, muAv); this->tMom() = mass/(Fcp.Sp() + Fncp.Sp()); const vector g = td.cloud().g().value(); scalar parcelMassChild = 0.0; scalar dChild = 0.0; if ( td.cloud().breakup().update ( dt, g, this->d(), this->tc(), this->ms(), this->nParticle(), this->KHindex(), this->y(), this->yDot(), this->d0(), this->rho(), mu_, sigma_, this->U(), rhoAv, muAv, Urel, Urmag, this->tMom(), dChild, parcelMassChild ) ) { scalar Re = rhoAv*Urmag*dChild/muAv; // Add child parcel as copy of parent SprayParcel<ParcelType>* child = new SprayParcel<ParcelType>(*this); child->origId() = this->getNewParticleID(); child->d() = dChild; child->d0() = dChild; const scalar massChild = child->mass(); child->mass0() = massChild; child->nParticle() = parcelMassChild/massChild; const forceSuSp Fcp = forces.calcCoupled(*child, dt, massChild, Re, muAv); const forceSuSp Fncp = forces.calcNonCoupled(*child, dt, massChild, Re, muAv); child->age() = 0.0; child->liquidCore() = 0.0; child->KHindex() = 1.0; child->y() = td.cloud().breakup().y0(); child->yDot() = td.cloud().breakup().yDot0(); child->tc() = 0.0; child->ms() = -GREAT; child->injector() = this->injector(); child->tMom() = massChild/(Fcp.Sp() + Fncp.Sp()); child->user() = 0.0; child->setCellValues(td, dt, celli); td.cloud().addParticle(child); }
这部分Child 就包含了各个参数,且,然后在进入/basic/Cloud.C中添加进domain。
但是问题是,很多参数都是直接由parents parcel复制而来。那么问题来了,
Q1 如果我想单独设置child parcel的速度,如何设置呢?
Q2 如果想射如多个parcel,且每个parcel有不同的size和mass如何处理呢?