| name | vibeflow-mesh |
| description | Use when selecting, generating, validating, converting, or debugging VibeFlow meshes from 0-caseDict/caseDict and geometry artifacts, including blockMesh, Gmsh, snappyHexMesh, hybrid workflows, boundary layers, y+ targets, local refinement, feature capture, patch/region/zone naming, checkMesh quality gates, and OpenFOAM conversion preparation. |
VibeFlow Mesh
This skill is responsible for turning geometry into a mesh that can support downstream solver backends. The goal is not merely to obtain a mesh file, but to ensure that regions, interfaces, boundary sets, quality metrics, scale, boundary layers, and the conversion chain can all support downstream simulation.
When to Use
- A workflow needs to be selected from
blockMesh, gmsh, snappyHexMesh, foamyHexMesh, imported mesh, or hybrid approaches.
- Meshing scripts, physical groups, patch/zone naming, or conversion steps need to be generated from
caseDict.mesh, geometry.entities, regions, interfaces, and boundariesLoadsInitials.boundarySets.
- Local refinement, boundary layers, wake regions, feature capture, y+ targets, or a mesh independence plan need to be established.
- Patch/region/cellZone/faceZone naming needs to be validated against
regions, interfaces, boundariesLoadsInitials.boundarySets, and geometry.entities.
- Mesh generation, quality, conversion, or
checkMesh issues need to be diagnosed.
What to Read First
caseMeta, physicalProblem, geometry, materials, regions, interfaces, boundariesLoadsInitials, mesh, and numericalMethod in 0-caseDict/caseDict
- Geometry artifacts and manifest under
A-geo/
- Mesher selection, naming, quality, and conversion strategy:
references/mesh-strategy.md
Inputs
0-caseDict/caseDict
- Geometry artifacts under
A-geo/
- Existing
B-mesh/ or C-run/constant/polyMesh, if present
Outputs
- Meshing scripts,
.geo/.py/.msh/.unv/.eMesh, and quality reports under B-mesh/.
- Or OpenFOAM dictionaries such as
C-run/system/blockMeshDict, snappyHexMeshDict, and surfaceFeatureExtractDict.
C-run/constant/polyMesh or mesh artifacts convertible to it.
- Updates to
caseDict.mesh, caseDict.geometry.entities, regions, interfaces, boundariesLoadsInitials, and errors when required.
Strategy Selection
blockMesh: Regular topology, simple internal/external-flow background meshes, 2D/wedge/extrusion cases, and strong controllability.
gmsh: STEP/CAD-driven workflows, physical groups, size fields, boundary layers, quadrilateral/triangular or tetrahedral meshes.
snappyHexMesh: STL body-fitted workflows, complex external flows, feature snapping, layer meshes, and native OpenFOAM pipelines.
hybrid: blockMesh background mesh plus snappyHexMesh, or Gmsh preprocessing plus OpenFOAM conversion.
importedMesh: When an external mesh already exists, focus on scale, patch names, and conversion compatibility.
Workflow
- Read
caseDict.mesh, geometry.artifacts/entities, regions, interfaces, and boundariesLoadsInitials.boundarySets.
- Identify the current target: quick smoke test, production mesh, validation mesh, or mesh independence.
- Select the mesher, explaining the reason for the choice and the alternatives that were not used.
- Generate scripts/dictionaries and ensure that physical group, patch, region, and zone naming is traceable to unified physical semantics.
- Generate the mesh or prepare conversion; record commands, logs, and artifact paths.
- Run minimal quality checks: patch completeness, cell count, non-orthogonality, skewness, volume, aspect ratio, and boundary layer.
- If entering OpenFOAM, prepare or execute conversion and run
checkMesh.
- Update
mesh.artifacts, mesh.qualityTargets, execution/validation records, and errors.
Validation
- The mesh can be generated or converted, and log paths are clear.
- Patch/physical group/zone naming is consistent with
regions, interfaces, and boundariesLoadsInitials.boundarySets.
- Regions / physical groups / cellZones / faceZones are complete and have clear purposes.
- Key local refinements, boundary layers, and wake/refinement zones are implemented according to
caseDict.mesh.
- When
checkMesh can be run, it has no unresolved fatal errors; warnings must be explained as acceptable or unacceptable.
- Mesh scale is consistent with
geometry.scaleToMeters, the scale settings in mesh, and caseMeta.units.length.
Rules
- Prioritize naming and conversion before optimizing local quality.
- Do not route all complex geometry to
snappyHexMesh by default; evaluate Gmsh first when the workflow is CAD-driven and requires physical groups.
- Do not sacrifice boundary semantic clarity for short-term numerical convergence.
- When quality thresholds are insufficient for a decision, record
qualityPolicy warn/allowWithReason instead of pretending the mesh is production-ready.
- On failure, classify the cause: geometry, size field, boundary layer, physical group/patch naming, conversion compatibility, toolchain, or OpenFOAM dictionary.
- Blocking mesh errors must be written to
errors.entries and must prevent entry into the solve stage.
Fallback Conditions
- Geometry files are missing, scale is unclear, or patch naming has no geometry source: return to
vibeflow-geometry or vibeflow-case-dict.
- Gmsh/OpenFOAM tools are missing: return to
vibeflow-toolchain.
- Mesh has passed the quality gates: hand off to
vibeflow-openfoam.