hpc-openfoam

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

HPC OpenFOAM

HPC OpenFOAM

Follow a progressive loading workflow.
遵循渐进式加载工作流。

Start

开始

  1. Read
    references/case-setup.md
    before creating or editing any OpenFOAM case.
  2. Read
    references/solver-selection.md
    when selecting a solver family or pressure convention.
  3. Read
    references/boundary-condition-playbook.md
    for concrete BC syntax (fixedValue, inletOutlet, wall functions, etc.).
  4. Read
    references/turbulence-bc-recipes.md
    for turbulence model setup, inlet value estimation, and wall function selection with y+ guidance.
  5. Read
    references/numerics-and-schemes-guide.md
    for fvSchemes and fvSolution tuning with scheme selection tables.
  6. Read
    references/case-recipes.md
    for complete case configurations (internal flow, external aero, VOF, PIMPLE, buoyant).
  7. Read
    references/function-object-recipes.md
    for probes, forces, yPlus monitoring.
  8. Read
    references/validation-parallel-and-observability.md
    for validation, post-processing, and parallel execution.
  9. Read
    references/cluster-execution-playbook.md
    for scheduler-backed cluster execution.
  10. Read
    references/error-recovery.md
    for diagnostic commands, decision tree, and fix sequences.
  1. 在创建或编辑任何OpenFOAM案例前,阅读
    references/case-setup.md
  2. 选择求解器系列或压力约定时,阅读
    references/solver-selection.md
  3. 如需具体的BC语法(fixedValue、inletOutlet、壁面函数等),阅读
    references/boundary-condition-playbook.md
  4. 如需湍流模型设置、入口值估算以及带y+指导的壁面函数选择相关内容,阅读
    references/turbulence-bc-recipes.md
  5. 如需fvSchemes和fvSolution调优以及格式选择表相关内容,阅读
    references/numerics-and-schemes-guide.md
  6. 如需完整案例配置(内部流、外部气动、VOF、PIMPLE、浮力流),阅读
    references/case-recipes.md
  7. 如需探针、力、yPlus监控相关内容,阅读
    references/function-object-recipes.md
  8. 如需验证、后处理和并行执行相关内容,阅读
    references/validation-parallel-and-observability.md
  9. 如需调度器支持的集群执行相关内容,阅读
    references/cluster-execution-playbook.md
  10. 如需诊断命令、决策树和修复流程相关内容,阅读
    references/error-recovery.md

Scenario Recipes

场景方案

Load the relevant recipe when the task involves:
  • references/numerics-and-schemes-guide.md
    — fvSchemes convection/gradient/time schemes, fvSolution solver settings, relaxation factors, SIMPLE/PISO/PIMPLE algorithm controls, progressive scheme upgrade strategy
  • references/heat-transfer-and-compressible-cases.md
    — thermophysicalProperties (Boussinesq, ideal gas, Sutherland), buoyant solvers, conjugate heat transfer (chtMultiRegionFoam), solid properties, fluid-solid coupling BCs
  • references/multiphase-vof-recipes.md
    — interFoam setup, alpha transport, MULES settings, maxAlphaCo, phase initialization (setFields), VOF boundary conditions
  • references/mesh-quality-and-generation-guide.md
    — checkMesh thresholds and interpretation, blockMesh grading, snappyHexMesh workflow, y+ targeted layer meshing
当任务涉及以下内容时,加载对应的方案:
  • references/numerics-and-schemes-guide.md
    — fvSchemes对流/梯度/时间格式、fvSolution求解器设置、松弛因子、SIMPLE/PISO/PIMPLE算法控制、渐进式格式升级策略
  • references/heat-transfer-and-compressible-cases.md
    — thermophysicalProperties(Boussinesq、理想气体、Sutherland)、浮力求解器、共轭传热(chtMultiRegionFoam)、固体属性、流固耦合边界条件
  • references/multiphase-vof-recipes.md
    — interFoam设置、alpha输运、MULES参数、maxAlphaCo、相初始化(setFields)、VOF边界条件
  • references/mesh-quality-and-generation-guide.md
    — checkMesh阈值与解读、blockMesh网格渐变、snappyHexMesh工作流、y+目标层网格划分

Work Sequence

工作流程

  1. Classify the case first: steady or transient, incompressible or compressible, single-phase or multiphase, laminar or turbulent.
  2. Generate the minimum consistent file set across
    0/
    ,
    constant/
    , and
    system/
    . Do not edit one layer in isolation if it changes the required fields elsewhere.
  3. Match solver family and fields:
    • simpleFoam
      or
      foamRun -solver incompressibleFluid
      : steady incompressible; expect
      U
      ,
      p
      , and turbulence fields if
      RAS
      .
    • pimpleFoam
      or
      foamRun -solver incompressibleFluid
      with transient/PIMPLE settings: transient incompressible; review timestep control and outer correctors.
    • interFoam
      or
      foamRun -solver incompressibleVoF
      : multiphase; control both
      maxCo
      and
      maxAlphaCo
      .
    • buoyantSimpleFoam
      /
      buoyantPimpleFoam
      : heat transfer; add
      T
      ,
      p_rgh
      ,
      alphat
      ,
      thermophysicalProperties
      ,
      g
      .
    • chtMultiRegionFoam
      : conjugate heat transfer; multi-region setup with fluid and solid.
  4. Validate mesh and numerics before a long run:
    • run
      blockMesh
      or the mesh generator
    • run
      checkMesh
      — non-orthogonality > 70° needs correctors, > 85° needs remeshing
    • start with conservative schemes (upwind), upgrade to linearUpwind after stability
  5. Keep parallel settings aligned:
    • make
      numberOfSubdomains
      match the intended MPI rank count
    • prefer
      scotch
      for complex geometries unless the user requests a manual layout
  6. Resolve executable compatibility before launch:
    • if
      simpleFoam
      /
      pimpleFoam
      /
      interFoam
      exists, it is valid to run directly
    • otherwise prefer
      foamRun -solver <moduleName>
      and verify the module loads
  1. 首先对案例进行分类:稳态或瞬态、不可压缩或可压缩、单相或多相、层流或湍流。
  2. 生成
    0/
    constant/
    system/
    目录下的最小一致文件集。如果修改某一层会影响其他位置的必填字段,请勿单独编辑该层。
  3. 匹配求解器系列与字段:
    • simpleFoam
      foamRun -solver incompressibleFluid
      :稳态不可压缩流;若使用
      RAS
      模型,需包含
      U
      p
      和湍流场。
    • pimpleFoam
      或启用瞬态/PIMPLE设置的
      foamRun -solver incompressibleFluid
      :瞬态不可压缩流;需检查时间步长控制和外部修正器。
    • interFoam
      foamRun -solver incompressibleVoF
      :多相流;需同时控制
      maxCo
      maxAlphaCo
    • buoyantSimpleFoam
      /
      buoyantPimpleFoam
      :传热流;需添加
      T
      p_rgh
      alphat
      thermophysicalProperties
      g
      字段。
    • chtMultiRegionFoam
      :共轭传热;包含流体和固体的多区域设置。
  4. 长时间运行前验证网格与数值设置:
    • 运行
      blockMesh
      或其他网格生成器
    • 运行
      checkMesh
      ——非正交性>70°需启用修正器,>85°需重新划分网格
    • 初始使用保守格式(upwind),稳定后升级为linearUpwind格式
  5. 保持并行设置一致:
    • 使
      numberOfSubdomains
      与预期的MPI进程数匹配
    • 对于复杂几何结构,优先使用
      scotch
      分区,除非用户要求手动布局
  6. 启动前解决可执行文件兼容性问题:
    • 若存在
      simpleFoam
      /
      pimpleFoam
      /
      interFoam
      ,可直接运行
    • 否则优先使用
      foamRun -solver <moduleName>
      并验证模块已加载

Additional References

额外参考资料

Load these on demand:
  • references/mesh-and-blockmeshdict-manual.md
    for mesh generation, vertex ordering, and mesh-quality workflow
  • references/turbulence-and-numerics.md
    for turbulence model matching and decomposition choices
  • references/fvsolution-and-residual-control.md
    for algorithm loops, solver blocks, and case termination logic
  • references/field-and-dictionary-matrix.md
    for solver-to-field and file-to-parameter matrices
按需加载以下内容:
  • 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
    checkMesh
    warnings as optional if the log is already diverging.
  • Do not use
    p
    when the solver expects
    p_rgh
    (buoyant/VOF), or vice versa.
  • Do not use
    ISMEAR=-5
    equivalent (tetrahedron) — this is a VASP concept, not OpenFOAM.
  • Do not use
    linear
    (central differencing) for alpha convection in VOF — it is unbounded.
  • Do not set relaxation factors to 1.0 in steady-state SIMPLE without SIMPLEC (
    consistent yes
    ).
  • 请勿自定义字典键、补丁类型或求解器名称。
  • 请勿使用与所选模型系列不匹配的湍流场。
  • 在对不稳定案例进行首次稳定性验证时,请勿使用激进的二阶对流格式。
  • 如果日志已出现发散,请勿忽略
    checkMesh
    警告。
  • 当求解器要求使用
    p_rgh
    (浮力流/VOF)时,请勿使用
    p
    ,反之亦然。
  • 请勿使用等效于
    ISMEAR=-5
    的设置(四面体)——这是VASP的概念,不适用于OpenFOAM。
  • 在VOF的alpha对流中,请勿使用
    linear
    (中心差分)格式——它是无界的。
  • 在稳态SIMPLE算法中,若未启用SIMPLEC(
    consistent yes
    ),请勿将松弛因子设置为1.0。

Reusable Templates

可复用模板

Use
assets/templates/
when a concrete case skeleton is needed:
  • simplefoam-minimal/
    — minimal steady incompressible case with inline comments explaining scheme and solver choices, plus turbulence upgrade instructions
  • interfoam-minimal/
    — multiphase checklist placeholder (not a self-contained runnable case)
  • openfoam-parallel-slurm.sh
    — minimal scheduled parallel run scaffold
当需要具体案例框架时,使用
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
生成简短的案例总结,包含以下内容:
  • 求解器与物理场类型
  • 涉及的必填字段和字典
  • 湍流模型、壁面处理方式和估算的入口湍流值
  • 已运行或仍需运行的验证命令
  • 稳定性风险,以及案例失败时的下一步恢复步骤