| name | cfd-mesh |
| description | CFD meshing — structured vs. unstructured, inflation layers, y+ calculation, domain sizing, mesh independence study, overset/chimera mesh, moving mesh (ALE, remesh). |
| metadata | {"priority":7,"promptSignals":{"phrases":["CFD mesh","inflation layer","y plus","CFD domain","mesh independence","boundary layer mesh","CFD grid"],"minScore":4}} |
CFD Meshing — Complete Skill
Domain Sizing (External Flows)
Bluff Body / Vehicle Aerodynamics
Inlet: 5-10 body lengths upstream
Outlet: 15-20 body lengths downstream (long wake)
Sides/Top: 5 body lengths from model (blockage < 2-5%)
Blockage ratio: A_body / A_domain_cross-section < 5% (avoids wall interference)
Airfoil / Wing
Inlet: 10-20 chords upstream (circular or C-type domain)
Wake: 20-30 chords downstream
Farfield: 15-20 chords normal to freestream
Internal Flow (Duct, Pipe)
Inlet: 10-20 hydraulic diameters upstream (for fully-developed profile)
Outlet: 10-20 D_h downstream of last feature (prevent outlet BCs from affecting results)
Or: apply developed velocity profile as BC (reduces domain length)
Inflation Layer Design (Boundary Layer)
Target y⁺ Calculation
Step 1: Estimate skin friction coefficient C_f
Flat plate: C_f = 0.074 Re_L^(-1/5) (turbulent, 5×10⁵ < Re_L < 10⁷)
or C_f = 0.0592 Re_L^(-1/5) (simpler Prandtl)
Pipe: C_f = 0.316 Re_D^(-1/4) (Blasius, smooth)
Step 2: Wall shear τ_w = C_f × ½ρU²
Step 3: Friction velocity u_τ = √(τ_w/ρ)
Step 4: First cell height y₁ = y⁺_target × ν / u_τ
Example: Air at 30 m/s, L = 1 m, target y⁺ = 1
Re_L = 30×1/1.5e-5 = 2×10⁶
C_f = 0.074 × (2e6)^(-0.2) = 0.00368
τ_w = 0.00368 × ½ × 1.2 × 900 = 1.99 Pa
u_τ = √(1.99/1.2) = 1.29 m/s
y₁ = 1 × 1.5e-5 / 1.29 = 1.16×10⁻⁵ m = 0.0116 mm
Inflation Layer Parameters
First cell height: y₁ (from y⁺ calculation above)
Growth ratio r: 1.2 (conservative, smooth), 1.3 (typical), 1.5 (max acceptable)
Number of layers: enough to capture full boundary layer thickness δ
Boundary layer thickness: δ ≈ 0.37 L Re_L^(-1/5) [turbulent flat plate]
Required layers n: δ/y₁ = r^n - 1/(r-1) → n = log(1 + δ(r-1)/y₁) / log(r)
Quick estimate: 12-20 inflation layers typical for y⁺ = 1 design
Mesh Independence Study (Grid Convergence Index — GCI)
Richardson Extrapolation
Use 3 systematically refined meshes (refine factor r = 2 typical)
h₁ < h₂ < h₃ (fine → coarse)
f_exact ≈ f₁ + (f₁ - f₂)/(r^p - 1)
p = ln[(f₃-f₂)/(f₂-f₁)] / ln(r) [observed order of convergence]
Grid Convergence Index (Roache):
GCI_12 = F_s |ε₁₂| / (r^p - 1) [ε₁₂ = (f₂-f₁)/f₁]
F_s = 1.25 (safety factor for 3 meshes)
GCI < 5%: grid-independent solution
Asymptotic range check: GCI_23 / (r^p × GCI_12) ≈ 1 → converged
Practical Study
| Mesh | Cells | C_d | Δ% from prev |
|---|
| Coarse | 500K | 0.315 | — |
| Medium | 1.5M | 0.296 | -6.0% |
| Fine | 4M | 0.292 | -1.4% |
| Medium → Fine < 2%: use Medium for production runs | | | |
Structured vs. Unstructured for CFD
Structured (Hexahedral)
All cells hexahedral; requires blocking strategy
Pros: lower cell count for same accuracy, better near-wall performance, lower numerical diffusion
Cons: complex for irregular geometry; time-consuming to create
Tools: ICEM CFD, POINTWISE, Gridgen
Unstructured (Tetrahedral/Poly)
Auto-generated; handles any geometry
Pros: fast to create, handles complex geometry
Cons: 2-3× more cells needed for same accuracy; diffusion in wrong direction
Polyhedral (Fluent/STAR-CCM+): average 5-7 faces/cell; better than TET, nearly as good as HEX for unit cost
Recommendation: HEX for simple geometry (pipes, ducts, airfoils), POLY for complex 3D geometry
Moving Mesh and ALE
ALE (Arbitrary Lagrangian-Eulerian)
Mesh moves with fluid partially; handles large deformations
Applications: piston motion, valve opening, fluid-structure interaction
Smoothing + remeshing when cells become too distorted
Sliding Mesh (Rotating Machinery)
Rotor zone rotates relative to stator zone
Sliding interface: interpolates fluxes across moving/stationary boundary
Fully unsteady — captures rotor-stator interaction
Used for: fans, pumps, turbines (transient)
MRF (Multiple Reference Frame): steady-state approximation
Adds Coriolis and centrifugal source terms in rotating zone
No actual rotation — faster, less accurate for strong unsteady effects
Overset/Chimera Mesh
Multiple overlapping meshes; fringe cells interpolate between them
Body-fitted mesh moves through background mesh
Used for: complex maneuvers, 6-DOF ship/aircraft motion, propellers
Mesh Topology Patterns
O-grid (Circular Bodies)
Circular topology wrapping around cylinder/airfoil
Excellent orthogonality at wall; preferred for aerodynamics
C-grid / H-grid (Airfoils)
C-grid: wraps around leading edge, exits at trailing edge
H-grid: rectangular; wake captured inline; simpler for multi-element
Polyhedral Mesh (STAR-CCM+, Fluent)
Convert tet mesh to poly automatically
Reduces cell count 3-5× vs. TET, maintains accuracy
Currently best automatic meshing approach for complex geometry
Cell Count Estimation Guide
| Application | Cells (2D) | Cells (3D full) |
|---|
| Simple pipe flow | 5,000 | 100,000–500K |
| Airfoil 2D | 50,000–200K | — |
| External aero (car) | — | 20M–100M |
| HVAC room | — | 1M–10M |
| Turbomachinery stage | — | 5M–50M |
| Combustor | — | 10M–100M (LES) |
Output
Provide: domain size [m], first cell height y₁ [mm] for target y⁺, inflation layers count, total estimated cell count, GCI from mesh independence study [%], recommended mesh type (hex/poly/tet).