cfd_mesh_independence_submit
Solve a CFD case on 2-3 refined meshes to compute the Grid Convergence Index, revealing whether results depend on mesh resolution. Requires OpenFOAM.
Instructions
Solve the same CFD case at 2-3 refined meshes and report the Grid Convergence Index — asynchronous, one job for the whole ladder. Requires OpenFOAM; degrades to {ok:false, reason, install} when it does not resolve.
Answers the question no single solve can: is this number a property of the flow, or of the mesh? On geometry with no analytic twin that band is the only error bar available, and it is what turns "a solver produced 0.31" into "0.31 ± 2 %".
Two families, dispatched like their single-solve twins:
the wind tunnel — pass
model(orbody) +velocity_m_s, plus any cfd_external_flow_submit knob. The ladder varies the background cell; the body is tessellated ONCE and shared, so the study isolates mesh error instead of mixing in a changing STL. Defaultmetric'cd'.the straight pipe — pass
diameter_mm,length_mm,velocity_m_s(orflow_rate_lpm). The ladder scalesn_axial/n_radial. Defaultmetric'pressure_drop_pa'.
The COARSEST level is the mesh a plain submit would have built and the study refines
from there (the tunnel's default cell is already the coarsest that resolves the body
at all). Cost therefore grows as the cube of refinement_ratio: 3 levels at 1.5 puts
roughly 11x the cells in the finest mesh, so budget accordingly. end_time is the
cap for the COARSEST level and is scaled up for the finer ones — a fine mesh needs
proportionally more sweeps, and a study whose finest level quietly stopped at its cap
is worthless.
Returns the degradation dict, or {job_id, status, cache_hit}; poll job_result for {ok, family, metric, levels: [{label, value, cell_size_m, n_cells, converged, returncode, case_dir}], grid_convergence: {observed_order, extrapolated_value, gci_pct, monotonic, asymptotic_ratio, order_clamped, warnings, ...}, band_pct, extrapolated_value, hagen_poiseuille_pa (pipe family), warnings}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | ||
| fluid | No | air-20c | |
| model | No | ||
| levels | No | ||
| metric | No | ||
| mu_pa_s | No | ||
| n_axial | No | ||
| end_time | No | ||
| n_radial | No | ||
| length_mm | No | ||
| rho_kg_m3 | No | ||
| turbulence | No | laminar | |
| diameter_mm | No | ||
| base_cell_mm | No | ||
| velocity_m_s | No | ||
| flow_rate_lpm | No | ||
| flow_direction | No | ||
| surface_refine | No | ||
| refinement_ratio | No |