此处进入 旧版代码
KarypisLab/METIS - here
物理网格划分使用
METIS-5.1.0
,按照MPI::processor_num
进行划分
Mesh Scale
网格缩放,支持带量纲直接进行计算
Boundary - README
pressure-inlet / pressure-outlet
slip wall
3 维向量
与网格相关联的标量场
格心 Field<Scalar>(MESO::fvmMesh::fvmMesh, cell_field_flag)
界面 Field<Scalar>(MESO::fvmMesh::fvmMesh, face_field_flag)
界面 Field<Scalar>(MESO::fvmMesh::fvmMesh, node_field_flag)
gradient()
方法可以得到网格格心梯度,数据类型为 Field<Vector>
与网格相关联的矢量场
通过配置文件增加 output-np
开关,可以输出 numpy 可读的文件
MESO::Field<Vector> vec_field(mesh, cell_field_flag);
vec_field.output("output.field.dat");
import numpy as np
data = np.loadtxt("path/to/output.field.dat")
print(data.shape)
# (NCELL,) for Field<Scalar>
# (NCELL, 3) for Field<Vector>
- 启动参数解析
./meso-mpi -h
- 不可压缩方腔 (Incompressible cavity flow)
mpirun -n 9 ./meso-mpi --max-step 1000000 --case case-re400.txt
- 稀薄方腔 (Rarefied cavity flow)
mpirun -n 10 ./meso-mpi --max-step 1000000 --case case-kn1.txt
[settings]
case-name demo
mesh-file <path-to>/<mesh>.neu
mesh-scale 1.0
dvs-file <path-to>/<dvs-mesh>.neu/.dvs
dvs-type <dvs-type>
Re 400.0
Ma 0.1414213562373095
CFL 0.8
gradient-switch True
gas-constant 0.5
ref-density 1.0
ref-length 1.0
ref-temperature 1.0
[group]
name fluid-zone
density 1.0
[mark]
name lid
type wall
velocity-x 0.1
[mark]
name wall
type wall
使用 gambit .neu
格式
输出 | 含义 |
---|---|
Rho | 质量 |
T | 温度 |
U | X 方向速度 |
V | Y 方向速度 |
W | Z 方向速度 |
qx | X 方向热流 |
qy | Y 方向热流 |
qz | Z 方向热流 |
注意:该结果未经对比验证,仅计算了 20000
步
mpirun -n 12 ./meso-mpi --case case-re400-3d.txt --max-step 20000
Sod 激波管求解器为 1 维 CDUGKS,代码未整合进本项目.
物理网格并行求解器开发