1 exp ( − 2 σ u p , i ′ ) 2 t t u r b = min ( k ε , C p s k 3 / 2 ε 1 ∣ u ~ + u ′ − u p ∣ ) t_{t u r b}=\min \left(\frac{k}{\varepsilon}, C_{p s} \frac{k^{3 / 2}}{\varepsilon} \frac{1}{\left|\tilde{\mathbf{u}}+\mathbf{u}^{\prime}-\mathbf{u}_{p}\right|}\right) t t u r b = min ( ε k , C p s ε k 3 / 2 ∣ u ~ + u ′ − u p ∣ 1 )
其中C p s = 0.16432 C_{ps}=0.16432 C p s = 0 . 1 6 4 3 2
OF 中的 stochstic turbulence dispersion 模型代码
template <class CloudType >Foam::vector Foam::StochasticDispersionRAS<CloudType>::update ( const scalar dt, const label celli, const vector& U, const vector& Uc, vector& UTurb, scalar& tTurb ) { Random& rnd = this ->owner ().rndGen (); const scalar cps = 0.16432 ; const scalar k = this ->kPtr_->primitiveField ()[celli]; const scalar epsilon = this ->epsilonPtr_->primitiveField ()[celli] + rootVSmall; const scalar UrelMag = mag (U - Uc - UTurb); const scalar tTurbLoc = min (k/epsilon, cps*pow (k, 1.5 )/epsilon/(UrelMag + small)); if (dt < tTurbLoc) { tTurb += dt; if (tTurb > tTurbLoc) { tTurb = 0 ; const scalar sigma = sqrt (2 *k/3.0 ); const scalar theta = rnd.scalar01 ()*twoPi; const scalar u = 2 *rnd.scalar01 () - 1 ; const scalar a = sqrt (1 - sqr (u)); const vector dir (a*cos(theta), a*sin(theta), u) ; UTurb = sigma*mag (rnd.scalarNormal ())*dir; } } else { tTurb = great; UTurb = Zero; } return Uc + UTurb; }
这个函数在哪里被调用?答:
template <class ParcelType >template <class TrackCloudType >void Foam::KinematicParcel<ParcelType>::calcDispersion ( TrackCloudType& cloud, trackingData& td, const scalar dt ) { td.Uc () = cloud.dispersion ().update ( dt, this ->cell (), U_, td.Uc (), UTurb_, tTurb_ ); }
这个 calcDispersion
函数,把 dispersion
模型中计算出来的 Uc + UTurb
,即u ~ + u ′ \tilde{\mathbf{u}}+\mathbf{u}^{\prime} u ~ + u ′ 赋值给了 td.Uc()
,即当前 parcel
所在位置的气相速度。 这里更新了传进去 UTurb_
和tTurb_
,这两个数都是只用于当前这个函数,更新它们是为了下一步使用。 此函数最关键的用处就是更新了 td.Uc()
,用于后续的 KinematicParcel::calcVelocity
,见这篇本站博文 。
KinematicParcel::move
中调用了 p.calcDispersion(cloud, ttd, dt);
。
另外还有 SprayParcel::calcBreakup
, breakup 之后,child->calcDispersion(cloud, td, dt);
。
其中的 UTurb
就是上边公式中的u ′ \mathbf{u}^{\prime} u ′ ,Uc
是公式中的u ~ \tilde{\mathbf{u}} u ~ ,U
是公式中的u p u_p u p 。
针对 LES 的 dispersion 模型Tsang C-W, Kuo C-W, Trujillo M, et al. Evaluation and validation of large-eddy simulation sub-grid spray dispersion models using high-fidelity volume-of-fluid simulation data and engine combustion network experimental data[J]. International Journal of Engine Research, 2019, 20(6):583–605.
t t u r b = C t u r b 2 Δ ∣ u s g s − u d ∣ t_{turb}=C_{turb} \frac{2 \Delta}{\left|\mathbf{u}_{sgs}-\mathbf{u}_{d}\right|} t t u r b = C t u r b ∣ u s g s − u d ∣ 2 Δ
u ′ = u s g s + u s t o \mathbf{u}^{\prime}=\mathbf{u}_{sgs}+\mathbf{u}_{s t o} u ′ = u s g s + u s t o
u s g s = C s g s ( 2 u ~ − 3 u ~ ~ + u ~ ~ ) \mathbf{u}_{s g s}=C_{s g s}(2 \tilde{\mathbf{u}}-3 \widetilde{\tilde{\mathbf{u}}}+\widetilde{\tilde{\mathbf{u}}}) u s g s = C s g s ( 2 u ~ − 3 u ~ + u ~ )
u s t o \mathbf{u}_{sto} u s t o 是高斯分布,均值是0,方差是σ s g s 2 = C s i g 2 3 k s g s \sigma_{s g s}^{2}=C_{sig} \frac{2}{3} k_{s g s} σ s g s 2 = C s i g 3 2 k s g s ,其中C s i g C_{sig} C s i g 是模型参数。
G ( u s t o , i ) = 1 2 σ s g s 2 π exp ( − u s t o , i 2 2 σ s g s 2 ) G\left(\mathbf{u}_{sto, i}\right)=\frac{1}{\sqrt{2 \sigma_{s g s}^{2} \pi}} \exp \left(-\frac{\mathbf{u}_{sto, i}^{2}}{2 \sigma_{s g s}^{2}}\right) G ( u s t o , i ) = 2 σ s g s 2 π 1 exp ( − 2 σ s g s 2 u s t o , i 2 )
dragCdRe:
template <class CloudType >Foam::scalar Foam::SphereDragForce<CloudType>::CdRe (const scalar Re) { if (Re > 1000.0 ) { return 0.424 *Re; } else { return 24.0 *(1.0 + 1.0 /6.0 *pow (Re, 2.0 /3.0 )); } }
calcCoupled:
template <class CloudType >Foam::forceSuSp Foam::SphereDragForce<CloudType>::calcCoupled ( const typename CloudType::parcelType& p, const typename CloudType::parcelType::trackingData& td, const scalar dt, const scalar mass, const scalar Re, const scalar muc ) const { return forceSuSp(Zero, mass*0.75 *muc*CdRe (Re)/(p.rho ()*sqr (p.d ()))); }
SphereDragForce::calcCoupled
的返回值翻译成公式就是3 m p μ g C D R e 4 ρ p D 2 \dfrac{3m_p\mu_g C_DRe}{4\rho_p D^2} 4 ρ p D 2 3 m p μ g C D R e 。 我们有:
F p = m p d u p d t = 3 m p μ g C D R e 4 ρ p D 2 ( u − u p ) F_p = m_p \dfrac{d \mathbf{u}_p}{d t} =\dfrac{3m_p\mu_gC_DRe}{4\rho_p D^2}(\mathbf{u}-\mathbf{u}_{p}) F p = m p d t d u p = 4 ρ p D 2 3 m p μ g C D R e ( u − u p )
SphereDragForce::calcCoupled
返回值即( u − u p ) (\mathbf{u}-\mathbf{u}_{p}) ( u − u p ) 前边的部分。 该返回值用于 KinematicParcel::calcVelocity
计算新的粒子速度,详细过程见这篇本站博文 。
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 OpenFOAM 成长之路 ! 您的肯定会给我更大动力~