文章目录
视频链接:
https://www.bilibili.com/video/BV1ga41157pp?p=4
版本:OpenFOAM 10,sonicFoam
集成到rhoPimpleFoam
中
示例:$FOAM_TUTORIALS/compressible/rhoPimpleFoam/laminar/fforwardStep/
rhoPimpleFoam
Transient solver for turbulent flow of compressible fluids for HVAC and similar applications, with optional mesh motion and mesh topology changes.
Case Setup
.
├── 0
│ ├── T
│ ├── U
│ └── p
├── constant
│ ├── momentumTransport
│ └── physicalProperties
└── system
├── blockMeshDict
├── controlDict
├── fvSchemes
└── fvSolution
controlDict
:结果输出,每0.5秒输出一次
stopAt endTime;
endTime 3;
writeControl runTime;
writeInterval 0.5;
Mesh
blockMesh
convertToMeters 1
:顶点坐标的数值以米为单位,若convertToMeters 0.001
,则以毫米为单位,那么blockMesh
会自动将坐标转化为以米为单位。vertices
blocks
:点按逆时针方向排boundary
:右手定则定义方向,法向量总是朝外;obstacle
类型改成wall
查看网格
创建.foam
文件,paraview打开,与blockMeshDict
描述相符
touch forwardstep.foam
修改网格分辨率:拐角处
blocks // 均匀网格
(
hex (0 1 3 2 8 9 11 10) (25 10 1) simpleGrading (1 1 1)
hex (2 3 6 5 10 11 14 13) (25 40 1) simpleGrading (1 1 1)
hex (3 4 7 6 11 12 15 14) (100 40 1) simpleGrading (1 1 1)
);
1. simpleGrading
- 沿某一条边,终点单元宽度/起点单元宽度,边的方向看坐标轴正方向
blocks // 拐点加密:simpleGrading; num of cells
(
hex (0 1 3 2 8 9 11 10) (50 20 1) simpleGrading (0.5 0.5 1)
hex (2 3 6 5 10 11 14 13) (50 80 1) simpleGrading (0.5 2 1)
hex (3 4 7 6 11 12 15 14) (200 80 1) simpleGrading (2 2 1)
);
2. edgeGrading
- 显式定义每条边的refinement,而simpleGrading的refinement,对一个block的同一方向的每条边都是一样的
- 主要用于三维网格
blocks // 均匀网格
(
// hex (0 1 3 2 8 9 11 10) (25 10 1) simpleGrading (1 1 1)
hex (0 1 3 2 8 9 11 10) (25 10 1) edgeGrading (1 1 1 1 0.5 2 2 2 1 1 1 1)
hex (2 3 6 5 10 11 14 13) (25 40 1) simpleGrading (1 1 1)
hex (3 4 7 6 11 12 15 14) (100 40 1) simpleGrading (1 1 1)
);
Simulation
rhoPimpleFoam
Post-Processing
refresh
- 初始设置,均匀网格
simpleGrading
细化,网格数也增加
edgeGrading