hpc-openfoam
Generate, review, debug, and recover OpenFOAM case files for CFD workflows. Use when working with OpenFOAM dictionaries, case structure, turbulence fields, boundary conditions, decomposition, numerics, or OpenFOAM runtime errors. Also covers RANS/LES turbulence setup, wall functions, y+ targeting, conjugate heat transfer, compressible flows, VOF multiphase, mesh quality, and scheme tuning.
- License 许可
- MIT
- 最近更新
- 2026-11-09
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- hpc-openfoam
- risk
- low
- domain
- high-performance-computing
- source
- { "commit": "4ea8069188", "license": "MIT", "repository": "SciMate-AI/HPC-Skills", "imported_at": "2026-09-20" }
- license
- MIT
- version
- 1.0.0
- category
- high-performance-computing
- platforms
- [ "claude-code", "cursor", "codex", "gemini", "antigravity", "copilot" ]
- subdomain
- general
- description
- Generate, review, debug, and recover OpenFOAM case files for CFD workflows. Use when working with OpenFOAM dictionaries, case structure, turbulence fields, boundary conditions, decomposition, numerics, or OpenFOAM runtime errors. Also covers RANS/LES turbulence setup, wall functions, y+ targeting, conjugate heat transfer, compressible flows, VOF multiphase, mesh quality, and scheme tuning.
02 资源文件 29
- 资产文件assets/templates/interfoam-minimal/README.txt662 B
- 脚本assets/templates/openfoam-parallel-slurm.sh640 B
- 资产文件assets/templates/simplefoam-minimal/0/p.txt1.2 KB
- 资产文件assets/templates/simplefoam-minimal/0/U.txt1.2 KB
- 资产文件assets/templates/simplefoam-minimal/constant/transportProperties938 B
- 资产文件assets/templates/simplefoam-minimal/constant/turbulenceProperties.txt1.2 KB
- 资产文件assets/templates/simplefoam-minimal/README.txt511 B
- 资产文件assets/templates/simplefoam-minimal/system/blockMeshDict1.6 KB
- 资产文件assets/templates/simplefoam-minimal/system/controlDict.txt1.1 KB
- 资产文件assets/templates/simplefoam-minimal/system/decomposeParDict914 B
- 资产文件assets/templates/simplefoam-minimal/system/fvSchemes.txt1.7 KB
- 资产文件assets/templates/simplefoam-minimal/system/fvSolution.txt1.9 KB
- 参考文档references/boundary-condition-playbook.md6.9 KB
- 参考文档references/case-recipes.md9.0 KB
- 参考文档references/case-setup.md2.7 KB
- 参考文档references/cluster-execution-playbook.md3.6 KB
- 参考文档references/error-recovery.md7.4 KB
- 参考文档references/field-and-dictionary-matrix.md2.2 KB
- 参考文档references/function-object-recipes.md1.9 KB
- 参考文档references/fvsolution-and-residual-control.md2.1 KB
- 参考文档references/heat-transfer-and-compressible-cases.md6.7 KB
- 参考文档references/mesh-and-blockmeshdict-manual.md2.3 KB
- 参考文档references/mesh-quality-and-generation-guide.md6.5 KB
- 参考文档references/multiphase-vof-recipes.md6.0 KB
- 参考文档references/numerics-and-schemes-guide.md6.5 KB
- 参考文档references/solver-selection.md3.5 KB
- 参考文档references/turbulence-and-numerics.md3.2 KB
- 参考文档references/turbulence-bc-recipes.md5.8 KB
- 参考文档references/validation-parallel-and-observability.md2.9 KB
03 SKILL.md 正文
HPC OpenFOAM
Follow a progressive loading workflow.
Start
- Read
references/case-setup.mdbefore creating or editing any OpenFOAM case. - Read
references/solver-selection.mdwhen selecting a solver family or pressure convention. - Read
references/boundary-condition-playbook.mdfor concrete BC syntax (fixedValue, inletOutlet, wall functions, etc.). - Read
references/turbulence-bc-recipes.mdfor turbulence model setup, inlet value estimation, and wall function selection with y+ guidance. - Read
references/numerics-and-schemes-guide.mdfor fvSchemes and fvSolution tuning with scheme selection tables. - Read
references/case-recipes.mdfor complete case configurations (internal flow, external aero, VOF, PIMPLE, buoyant). - Read
references/function-object-recipes.mdfor probes, forces, yPlus monitoring. - Read
references/validation-parallel-and-observability.mdfor validation, post-processing, and parallel execution. - Read
references/cluster-execution-playbook.mdfor scheduler-backed cluster execution. - Read
references/error-recovery.mdfor diagnostic commands, decision tree, and fix sequences.
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 strategyreferences/heat-transfer-and-compressible-cases.md— thermophysicalProperties (Boussinesq, ideal gas, Sutherland), buoyant solvers, conjugate heat transfer (chtMultiRegionFoam), solid properties, fluid-solid coupling BCsreferences/multiphase-vof-recipes.md— interFoam setup, alpha transport, MULES settings, maxAlphaCo, phase initialization (setFields), VOF boundary conditionsreferences/mesh-quality-and-generation-guide.md— checkMesh thresholds and interpretation, blockMesh grading, snappyHexMesh workflow, y+ targeted layer meshing
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/,constant/, andsystem/. Do not edit one layer in isolation if it changes the required fields elsewhere. - Match solver family and fields:
simpleFoamorfoamRun -solver incompressibleFluid: steady incompressible; expectU,p, and turbulence fields ifRAS.pimpleFoamorfoamRun -solver incompressibleFluidwith transient/PIMPLE settings: transient incompressible; review timestep control and outer correctors.interFoamorfoamRun -solver incompressibleVoF: multiphase; control bothmaxCoandmaxAlphaCo.buoyantSimpleFoam/buoyantPimpleFoam: heat transfer; addT,p_rgh,alphat,thermophysicalProperties,g.chtMultiRegionFoam: conjugate heat transfer; multi-region setup with fluid and solid.
- Validate mesh and numerics before a long run:
- run
blockMeshor the mesh generator - run
checkMesh— non-orthogonality > 70° needs correctors, > 85° needs remeshing - start with conservative schemes (upwind), upgrade to linearUpwind after stability
- run
- Keep parallel settings aligned:
- make
numberOfSubdomainsmatch the intended MPI rank count - prefer
scotchfor complex geometries unless the user requests a manual layout
- make
- Resolve executable compatibility before launch:
- if
simpleFoam/pimpleFoam/interFoamexists, it is valid to run directly - otherwise prefer
foamRun -solver <moduleName>and verify the module loads
- if
Additional References
Load these on demand:
references/mesh-and-blockmeshdict-manual.mdfor mesh generation, vertex ordering, and mesh-quality workflowreferences/turbulence-and-numerics.mdfor turbulence model matching and decomposition choicesreferences/fvsolution-and-residual-control.mdfor algorithm loops, solver blocks, and case termination logicreferences/field-and-dictionary-matrix.mdfor solver-to-field and file-to-parameter matrices
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
checkMeshwarnings as optional if the log is already diverging. - Do not use
pwhen the solver expectsp_rgh(buoyant/VOF), or vice versa. - Do not use
ISMEAR=-5equivalent (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).
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 instructionsinterfoam-minimal/— multiphase checklist placeholder (not a self-contained runnable case)openfoam-parallel-slurm.sh— minimal scheduled parallel run scaffold
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
04 同仓库更多 Skills
dei-assessment
Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.
dei-action-plan
Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.
culture-fit-assessment
Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.
cowork-to-code-bridge
Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.
counter-offer-response
Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.
continuous-feedback-system
Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.