hpc-openfoam
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHPC OpenFOAM
HPC OpenFOAM
Follow a progressive loading workflow.
遵循渐进式加载工作流。
Start
开始
- Read before creating or editing any OpenFOAM case.
references/case-setup.md - Read when selecting a solver family or pressure convention.
references/solver-selection.md - Read for concrete BC syntax (fixedValue, inletOutlet, wall functions, etc.).
references/boundary-condition-playbook.md - Read for turbulence model setup, inlet value estimation, and wall function selection with y+ guidance.
references/turbulence-bc-recipes.md - Read for fvSchemes and fvSolution tuning with scheme selection tables.
references/numerics-and-schemes-guide.md - Read for complete case configurations (internal flow, external aero, VOF, PIMPLE, buoyant).
references/case-recipes.md - Read for probes, forces, yPlus monitoring.
references/function-object-recipes.md - Read for validation, post-processing, and parallel execution.
references/validation-parallel-and-observability.md - Read for scheduler-backed cluster execution.
references/cluster-execution-playbook.md - Read for diagnostic commands, decision tree, and fix sequences.
references/error-recovery.md
- 在创建或编辑任何OpenFOAM案例前,阅读。
references/case-setup.md - 选择求解器系列或压力约定时,阅读。
references/solver-selection.md - 如需具体的BC语法(fixedValue、inletOutlet、壁面函数等),阅读。
references/boundary-condition-playbook.md - 如需湍流模型设置、入口值估算以及带y+指导的壁面函数选择相关内容,阅读。
references/turbulence-bc-recipes.md - 如需fvSchemes和fvSolution调优以及格式选择表相关内容,阅读。
references/numerics-and-schemes-guide.md - 如需完整案例配置(内部流、外部气动、VOF、PIMPLE、浮力流),阅读。
references/case-recipes.md - 如需探针、力、yPlus监控相关内容,阅读。
references/function-object-recipes.md - 如需验证、后处理和并行执行相关内容,阅读。
references/validation-parallel-and-observability.md - 如需调度器支持的集群执行相关内容,阅读。
references/cluster-execution-playbook.md - 如需诊断命令、决策树和修复流程相关内容,阅读。
references/error-recovery.md
Scenario Recipes
场景方案
Load the relevant recipe when the task involves:
- — fvSchemes convection/gradient/time schemes, fvSolution solver settings, relaxation factors, SIMPLE/PISO/PIMPLE algorithm controls, progressive scheme upgrade strategy
references/numerics-and-schemes-guide.md - — thermophysicalProperties (Boussinesq, ideal gas, Sutherland), buoyant solvers, conjugate heat transfer (chtMultiRegionFoam), solid properties, fluid-solid coupling BCs
references/heat-transfer-and-compressible-cases.md - — interFoam setup, alpha transport, MULES settings, maxAlphaCo, phase initialization (setFields), VOF boundary conditions
references/multiphase-vof-recipes.md - — checkMesh thresholds and interpretation, blockMesh grading, snappyHexMesh workflow, y+ targeted layer meshing
references/mesh-quality-and-generation-guide.md
当任务涉及以下内容时,加载对应的方案:
- — fvSchemes对流/梯度/时间格式、fvSolution求解器设置、松弛因子、SIMPLE/PISO/PIMPLE算法控制、渐进式格式升级策略
references/numerics-and-schemes-guide.md - — thermophysicalProperties(Boussinesq、理想气体、Sutherland)、浮力求解器、共轭传热(chtMultiRegionFoam)、固体属性、流固耦合边界条件
references/heat-transfer-and-compressible-cases.md - — interFoam设置、alpha输运、MULES参数、maxAlphaCo、相初始化(setFields)、VOF边界条件
references/multiphase-vof-recipes.md - — checkMesh阈值与解读、blockMesh网格渐变、snappyHexMesh工作流、y+目标层网格划分
references/mesh-quality-and-generation-guide.md
Work Sequence
工作流程
- Classify the case first: steady or transient, incompressible or compressible, single-phase or multiphase, laminar or turbulent.
- Generate the minimum consistent file set across ,
0/, andconstant/. Do not edit one layer in isolation if it changes the required fields elsewhere.system/ - Match solver family and fields:
- or
simpleFoam: steady incompressible; expectfoamRun -solver incompressibleFluid,U, and turbulence fields ifp.RAS - or
pimpleFoamwith transient/PIMPLE settings: transient incompressible; review timestep control and outer correctors.foamRun -solver incompressibleFluid - or
interFoam: multiphase; control bothfoamRun -solver incompressibleVoFandmaxCo.maxAlphaCo - /
buoyantSimpleFoam: heat transfer; addbuoyantPimpleFoam,T,p_rgh,alphat,thermophysicalProperties.g - : conjugate heat transfer; multi-region setup with fluid and solid.
chtMultiRegionFoam
- Validate mesh and numerics before a long run:
- run or the mesh generator
blockMesh - run — non-orthogonality > 70° needs correctors, > 85° needs remeshing
checkMesh - start with conservative schemes (upwind), upgrade to linearUpwind after stability
- run
- Keep parallel settings aligned:
- make match the intended MPI rank count
numberOfSubdomains - prefer for complex geometries unless the user requests a manual layout
scotch
- make
- Resolve executable compatibility before launch:
- if /
simpleFoam/pimpleFoamexists, it is valid to run directlyinterFoam - otherwise prefer and verify the module loads
foamRun -solver <moduleName>
- if
- 首先对案例进行分类:稳态或瞬态、不可压缩或可压缩、单相或多相、层流或湍流。
- 生成、
0/和constant/目录下的最小一致文件集。如果修改某一层会影响其他位置的必填字段,请勿单独编辑该层。system/ - 匹配求解器系列与字段:
- 或
simpleFoam:稳态不可压缩流;若使用foamRun -solver incompressibleFluid模型,需包含RAS、U和湍流场。p - 或启用瞬态/PIMPLE设置的
pimpleFoam:瞬态不可压缩流;需检查时间步长控制和外部修正器。foamRun -solver incompressibleFluid - 或
interFoam:多相流;需同时控制foamRun -solver incompressibleVoF和maxCo。maxAlphaCo - /
buoyantSimpleFoam:传热流;需添加buoyantPimpleFoam、T、p_rgh、alphat和thermophysicalProperties字段。g - :共轭传热;包含流体和固体的多区域设置。
chtMultiRegionFoam
- 长时间运行前验证网格与数值设置:
- 运行或其他网格生成器
blockMesh - 运行——非正交性>70°需启用修正器,>85°需重新划分网格
checkMesh - 初始使用保守格式(upwind),稳定后升级为linearUpwind格式
- 运行
- 保持并行设置一致:
- 使与预期的MPI进程数匹配
numberOfSubdomains - 对于复杂几何结构,优先使用分区,除非用户要求手动布局
scotch
- 使
- 启动前解决可执行文件兼容性问题:
- 若存在/
simpleFoam/pimpleFoam,可直接运行interFoam - 否则优先使用并验证模块已加载
foamRun -solver <moduleName>
- 若存在
Additional References
额外参考资料
Load these on demand:
- for mesh generation, vertex ordering, and mesh-quality workflow
references/mesh-and-blockmeshdict-manual.md - for turbulence model matching and decomposition choices
references/turbulence-and-numerics.md - for algorithm loops, solver blocks, and case termination logic
references/fvsolution-and-residual-control.md - for solver-to-field and file-to-parameter matrices
references/field-and-dictionary-matrix.md
按需加载以下内容:
- :网格生成、顶点排序和网格质量工作流
references/mesh-and-blockmeshdict-manual.md - :湍流模型匹配和分区选择
references/turbulence-and-numerics.md - :算法循环、求解器块和案例终止逻辑
references/fvsolution-and-residual-control.md - :求解器与字段、文件与参数的对应关系矩阵
references/field-and-dictionary-matrix.md
Guardrails
注意事项
- Do not invent dictionary keys, patch types, or solver names.
- Do not use turbulence fields that do not match the chosen model family.
- Do not keep aggressive second-order convection schemes during first-pass stabilization on a fragile case.
- Do not treat warnings as optional if the log is already diverging.
checkMesh - Do not use when the solver expects
p(buoyant/VOF), or vice versa.p_rgh - Do not use equivalent (tetrahedron) — this is a VASP concept, not OpenFOAM.
ISMEAR=-5 - Do not use (central differencing) for alpha convection in VOF — it is unbounded.
linear - Do not set relaxation factors to 1.0 in steady-state SIMPLE without SIMPLEC ().
consistent yes
- 请勿自定义字典键、补丁类型或求解器名称。
- 请勿使用与所选模型系列不匹配的湍流场。
- 在对不稳定案例进行首次稳定性验证时,请勿使用激进的二阶对流格式。
- 如果日志已出现发散,请勿忽略警告。
checkMesh - 当求解器要求使用(浮力流/VOF)时,请勿使用
p_rgh,反之亦然。p - 请勿使用等效于的设置(四面体)——这是VASP的概念,不适用于OpenFOAM。
ISMEAR=-5 - 在VOF的alpha对流中,请勿使用(中心差分)格式——它是无界的。
linear - 在稳态SIMPLE算法中,若未启用SIMPLEC(),请勿将松弛因子设置为1.0。
consistent yes
Reusable Templates
可复用模板
Use when a concrete case skeleton is needed:
assets/templates/- — minimal steady incompressible case with inline comments explaining scheme and solver choices, plus turbulence upgrade instructions
simplefoam-minimal/ - — multiphase checklist placeholder (not a self-contained runnable case)
interfoam-minimal/ - — minimal scheduled parallel run scaffold
openfoam-parallel-slurm.sh
当需要具体案例框架时,使用下的模板:
assets/templates/- — 最小化稳态不可压缩案例,包含解释格式和求解器选择的内嵌注释,以及湍流模型升级说明
simplefoam-minimal/ - — 多相流检查清单占位符(并非独立可运行案例)
interfoam-minimal/ - — 最小化调度并行运行框架
openfoam-parallel-slurm.sh
Outputs
输出内容
Produce a short case summary that states:
- solver and physics family
- required fields and dictionaries touched
- turbulence model, wall treatment, and estimated inlet turbulence values
- validation commands run or still needed
- stability risks and the next recovery step if the case is failing
生成简短的案例总结,包含以下内容:
- 求解器与物理场类型
- 涉及的必填字段和字典
- 湍流模型、壁面处理方式和估算的入口湍流值
- 已运行或仍需运行的验证命令
- 稳定性风险,以及案例失败时的下一步恢复步骤