网格与几何配置
Mesh
当 Solver.mesh_source 为 TFluid 时,Mesh 必须是 object。
| 字段 | 必需性 | 类型 | 长度或范围 |
|---|---|---|---|
part_list | 运行必需 | array<MeshPart> | 长度 1..N;Desktop 允许动态增删,C++ 运行至少需要一个网格块。 |
Auto_Decompose | 可选 | AutoDecompose | 自动分区设置。 |
MeshPart
| 字段 | 类型 | 约束 |
|---|---|---|
type | string | block 或 ring。 |
domain | MeshDomain | 由 type 决定。 |
mesh_number | MeshNumber | 三方向单元数。 |
boundary | MeshBoundary | 各面的非空边界名。 |
distribution | MeshDistribution | 各面的加密设置。 |
MeshDomain
- block:使用 Box3。
- ring:字段
radius_in_value、radius_out_value、height均为正数,且radius_in_value < radius_out_value。
MeshNumber
字段 x_number、y_number、z_number 均为 PositiveInt。block 和 ring 都固定包含这三个字段。
MeshBoundary
每个值均为 NonEmptyString,表示边界集合名称:
- block 固定字段 :
left、right、front、back、bottom、top。 - ring 固定字段:
inner、outer,并按网格实现使用 top/bottom。 - 同名面会归入同一边界;
bind用于块间连接。名称没有固定长度上限,但不得为空。
MeshDistribution
对象键与 MeshBoundary 的面键一致。每个值为 DistributionSide:
| 字段 | 类型 | 范围 |
|---|---|---|
ratio | PositiveNumber | 网格尺寸比;均匀网格为 1。 |
number | UInt | 受分布控制的层数;0 表示不额外加密。 |
AutoDecompose
| 字段 | 类型 | 范围 |
|---|---|---|
x_number, y_number, z_number | PositiveInt | 三方向分区数。 |
inner_boundary_name | NonEmptyString | 自动生成的内部边界名。 |
MeshDelete
根字段名为 Mesh_delete,值为 object。
| 字段 | 类型 | 长度或范围 |
|---|---|---|
solid_list | array<MeshDeleteSolid> | 长度 1..N。 |
boundary_layer | UInt | 可选;保留或生成的边界层数。 |
MeshDeleteSolid
公共字段:
| 字段 | 类型 | 范围 |
|---|---|---|
type | string | cylinder、cylinder_Array、plane、stl。 |
treatment | string | 当前支持 delete。 |
boundary_type | NonEmptyString | 新边界名称,不能与待处理输入含义冲突。 |
if_reverse | Flag01 | 内外反转。 |
按 type 的条件字段:
| type | 必需字段 | 类型和范围 |
|---|---|---|
| cylinder | boundary_thick,radius,height,bottom_center,direction | boundary_thick ≥ 0;radius、height > 0;bottom_center 为 Vector3;direction 为 Direction3。 |
| cylinder_Array | cylinder 全部字段,加 dx,dy,dz,nx,ny,nz | dx/dy/dz 为有限间距;nx/ny/nz 为 PositiveInt。 |
| plane | boundary_thick,plane_point,direction | boundary_thick ≥ 0;两个向量长度恰好为 3,direction 非零。 |
| stl | file_name,center,boundary_ID,retained_layer_ID | file_name 非空;center 为 Vector3;boundary_ID 为 0 或 1;retained_layer_ID 为 UInt。 |
MoveBoundary
根字段名为 Move_Boundary,字段 solid_list 是 array<MoveBoundarySolid>,长度 1..N。
MoveBoundarySolid
| 字段 | 必需性 | 类型 | 范围 |
|---|---|---|---|
type_ID | 必需 | Integer | 0=长方体,1=圆柱,2=STL。 |
boundary_type | 必需 | NonEmptyString | 运动边界名。 |
user_define_motion | 可选 | MotionFile | 文件定义运动。 |
reset_C.center | 可选 | Vector3 | 重置中心。 |
reset_U.velocity | 可选 | Vector3 | 重置线速度。 |
reset_W.angular_velocity | 可选 | Vector3 | 重置角速度。 |
type_ID 条件字段:
- 0:完整 Box3。
- 1:
radius、height为正数,bottom_center为 Vector3,direction为 Direction3。 - 2:
file_name非空,center为 Vector3,if_reverse为 Flag01,solid_Hash_value为正数。
Wave
object,可包含 generate 和 eliminate 两个 object。
Wave.generate
字段 solid_list 为 array<WaveGenerator>,长度 1..N。
| WaveGenerator 字段 | 类型 | 范围 |
|---|---|---|
type_ID | Integer | 当前值 0。 |
x1,x2,y1,y2,z1,z2 | Box3 的字段 | 三轴严格递增。 |
velocity_ID | Integer | 1=单幅正弦波,2=双幅 Stokes 波。 |
magnititude_value | NonNegativeNumber | 波幅;字段名沿用运行时拼写。 |
magnititude1_value, magnititude2_value | NonNegativeNumber | velocity_ID=2 时必需的两级波幅;字段名沿用运行时拼写。 |
wave_frequency_value | PositiveNumber | 波频率。 |
Wave.eliminate
字段 solid_list 为 array<WaveEliminator>,长度 1..N。
| WaveEliminator 字段 | 类型 | 范围 |
|---|---|---|
type_ID | Integer | 当前值 0。 |
x1,x2,y1,y2,z1,z2 | Box3 的字段 | 三轴严格递增。 |
dir_ID | UInt | 消波方向编号。 |
elimination_coeff_value | NonNegativeNumber | 消波系数。 |