Gambit Journal 学习笔记之二

《Gambit Journal 学习笔记之一》之后已经很长时间,现在可以继续了。这次的任务是二维圆管流动的模拟。先用gambit 的脚本生成模型。

 

先给 jou 文件吧。

 

/ Pipe flow (2D) / / 20090319 / L=8m, D=0.2m / / C --------- B / | | / --> | | / O --------- A / / V_in = 1 m/s / rho = 1 kg/m3 / mu = 2 * 10^{-3} kg/(m s) / Variable Definition $length=8 $diameter=0.2 $diameter_half=$diameter/2 $velocity_in=1 $density=1 $viscosity=2e-3 / points vertex create "O" coordinates 0 vertex create "A" coordinates $length vertex create "B" coordinates $length $diameter_half vertex create "C" coordinates 0 $diameter_half / edges edge create "OA" straight "O" "A" edge create "AB" straight "A" "B" edge create "BC" straight "B" "C" edge create "CO" straight "C" "O" / faces face create "Pipe" wireframe "OA" "AB" "BC" "CO" / mesh edge mesh "CO" intervals 10 edge mesh "OA" intervals 100 face mesh "Pipe" / boundary physics create "inlet" btype "VELOCITY_INLET" edge "CO" physics create "axis" btype "AXIS" edge "OA" physics create "wall" btype "WALL" edge "BC" physics create "outlet" btype "PRESSURE_OUTLET" edge "AB" / zones physics create "pipe_v" ctype "FLUID" face "Pipe" / export export uns "pipe.msh"

 

 

 

你可能感兴趣的:(c,脚本,velocity,任务,Intervals)