openFOAM動量方程中張量的處理

2021-09-06 13:11:12 字數 767 閱讀 9057

tmpueqn

( fvm::ddt(rho, u) (i)

+ fvm::div(phi, u) (ii)

+ mrf.ddt(rho, u) (iii)

+ turbulence -> divdevreff(u) (iv)

==fvoptions(rho, u) (v)

)

其中,(i)為非穩態項;(ii)為對流項;(iii)為mrf造成的附加修正;(iv)為應力張量;(v)用於處理fvoptions資料夾中的附加源項。

我們主要關注turbulence->divdevreff(u)函式。(如果是可壓縮流體,那麼這個函式就是turbulence->divdevrhoreff(u))

類的名稱是turbulence,該類基於turbulencemodel類,並從imcompressibleturbulencemodel類中衍生出來。turbulence類呼叫了函式divdevreff(u)。該函式內容如下:

tmplaminar::divdevreff(volvectorfield& u) const

在此函式中存在運動粘度nu,暗示此方程為一不可壓縮方程。其次,fvm代表隱式,fvc代表顯式。此外,還呼叫了乙個新函式dev()。

dev()內容為:

templateinline tensor& t>

Openfoam中transform工具學習記錄

geometry 存放.stl檔案 settings for the castellatedmesh generation.castellatedmeshcontrols 區域劃分 snapcontrols 介面捕捉 settings for the layer addition.addlayers...

openFOAM中通量的生成

標頭檔案createphi.h和compressiblecreatephi.h 使用openfoam處理守恆方程時,經常需要處理通過網格面的通量。廣義通量表示為phi。由於密度 速度等值儲存在網格中心的,因此為了計算網格面上的通量,必須進行一定的處理。openfoam通過呼叫createphi.h或...

tensorflow 中檢視張量值和張量大小

通過with tf.session assess print sess.run y 即可列印出變數的值。下面給出例子importnumpyasnp importtensorflowastf x tf.constant 1,2,3,4,5,6 y tf.reshape x,2,3 withtf.ses...