注:1、fluent的TUI命令中,英文格式的分号“;”表示注释;
2、本TUI针对的是二维模型,如果是三维模型,需要对某些参数进行更改!!!
TUI结合窗口设置,编写,方便更改算例工况
大致流程
1、算例求解方法、格式、湍流模型、材料、边界条件等设置
2、计算
3、计算完成后输出计算结果
; read mesh
; change!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/file/read-case/ D:\2000_Song\20240109\non_pipe\SST_TKEinner\H5D0.msh
; scaling
/define/boundary-conditions/modify-zones/scale-zone () 0.001 0.001
; 定义流体材料
/define/materials/copy fluid water-liquid
/define/materials/change-create water-liquid water-liquid y constan 1000 n n y c 0.001 n n n
; 流体材料赋给计算域
/define/boundary-conditions/fluid fluid y water-liquid n n n n 0. no 0. no no no no
; 定义湍流模型及常数,用K-W SST
/define/models/viscous/sst yes ; kw-sst,ke-rng, ke-realizable, ke-standard
(cx-gui-do cx-set-list-tree-selections "NavigationPane*List_Tree1" (list "Setup|Models|Viscous (SST k-omega)"))
(cx-gui-do cx-set-list-tree-selections "NavigationPane*List_Tree1" (list "Setup|Models|Viscous (SST k-omega)"))
(cx-gui-do cx-activate-item "NavigationPane*List_Tree1")
(cx-gui-do cx-set-list-tree-selections "NavigationPane*List_Tree1" (list "Setup|Models|Viscous (SST k-omega)"))
(cx-gui-do cx-set-real-entry-list "Viscous Model*Table2*Table5(Model Constants)*RealEntry131(TKE (Inner) Prandtl #)" '( 1.))
(cx-gui-do cx-set-real-entry-list "Viscous Model*Table2*Table5(Model Constants)*RealEntry133(SDR (Inner) Prandtl #)" '( 0.5))
(cx-gui-do cx-set-real-entry-list "Viscous Model*Table2*Table5(Model Constants)*RealEntry134(SDR (Outer) Prandtl #)" '( 0.856))
(cx-gui-do cx-activate-item "Viscous Model*PanelButtons*PushButton1(OK)")
; 定义入口边界条件
/define/boundary-conditions/velocity-inlet inlet no no yes yes no 2. no 0. n n n y 2 0.025
/define/boundary-conditions/velocity-inlet inlet-co no no y yes no 0.02 no 0. no no n y 1 0.025
; 定义壁面边界条件
/define/boundary-conditions/wall wall-bott no no y rough-bc-high no no no no 0.001 no 0.5
; 设置求解方法
;/solve/set/p-v-coupling 21 ; SIMPLE 20, SIMPLEC 21 PISO 22
; 定义离散格式
;/adjoint/methods/settings 1 12 1 0 ; Gradient discretization ,Pressure discretization ,Convection discretization ,Coupling Scheme
; 定义收敛准则
/solve/monitors/residual/convergence-criteria 1e-06 1e-06 1e-06 1e-06 1e-06
; 初始化计算
/solve/initialize/initialize-flow
; 计算
/solve/iterate 200
; 更换速度压力耦合算法为SIMPLEC
/solve/set/p-v-coupling 21 ; SIMPLE 20, SIMPLEC 21 PISO 22
; 定义离散格式
/adjoint/methods/settings 1 12 1 0 ; Gradient discretization ,Pressure discretization ,Convection discretization ,Coupling Scheme
; 再计算
/solve/iterate 10000
; 输出计算结果
; change!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
file/export/ascii D:\2000_Song\20240109\non_pipe\SST_TKEinner\H5D0.txt ; change!!!!!!!
*
dx-velocity-dx
dx-velocity-dy
dy-velocity-dx
dy-velocity-dy
viscosity-turb
turb-kinetic-energy
pressure
y-velocity
x-velocity
//
ok
; 计算结果输出完成
; 写入cas and dat
; change!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/file/write-case-data D:\2000_Song\20240109\non_pipe\SST_TKEinner\H5D0-SSTmodify.cas