在CFD-POST中,有很多指令是可以通过一些简单程序来完成的,比如批量构造截面。
本文以一根方管为例,沿z轴构建xy截面若干个:
1、打开软件后,Tools>command editor
2、贴入如下代码:
!$numsteps =52;#建立截面数
!$delta_z=3;#截面间距
!$start_z=-28;#截面z轴起点
!for ($i=1; $i <= $numsteps; $i++) {
! $dis=$start_z+$delta_z*$i;
PLANE:Plane $i
Apply Instancing Transform = On
Apply Texture = Off
Blend Texture = On
Bound Radius = 0.5 [m]
Colour = 0.75, 0.75, 0.75
Colour Map = Default Colour Map
Colour Mode = Constant
Colour Scale = Linear
Colour Variable = Pressure
Colour Variable Boundary Values = Conservative
Culling Mode = No Culling
Direction 1 Bound = 1.0 [m]
Direction 1 Orientation = 0 [degree]
Direction 1 Points = 10
Direction 2 Bo