Skip to main content
Glama

CFD Mesh Independence Submit

cfd_mesh_independence_submit

Runs a CFD mesh independence study over 2–3 refined meshes, reports Grid Convergence Index, and quantifies mesh-induced error to show whether results are mesh-dependent.

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 (or body) + 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. Default metric 'cd'.

  • the straight pipe — pass diameter_mm, length_mm, velocity_m_s (or flow_rate_lpm). The ladder scales n_axial/n_radial. Default metric '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}.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cfd_mesh_independence_submit"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNo
fluidNoair-20c
modelNo
levelsNo
metricNo
mu_pa_sNo
n_axialNo
end_timeNo
n_radialNo
length_mmNo
rho_kg_m3No
workspaceNoRun this call in this named workspace
turbulenceNolaminar
diameter_mmNo
base_cell_mmNo
velocity_m_sNo
flow_rate_lpmNo
flow_directionNo
surface_refineNo
refinement_ratioNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.7
    • addedInput schema / properties / workspace
      Added value: +{
      +  "default": "",
      +  "description": "Run this call in this named workspace",
      +  "title": "Workspace",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, the description discloses that the call is asynchronous, returns a job_id to poll with job_result, requires OpenFOAM, and degrades to a structured failure dict when OpenFOAM is unavailable. It also explains cost scaling, end_time behavior across levels, and that the body is tessellated once and shared across the mesh ladder.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and then organized by family, cost behavior, and return shape. It is dense and somewhat long, but most sentences carry operational value rather than filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description compensates by listing the return shape, including job_id/status/cache_hit, levels, grid_convergence fields, band_pct, extrapolated_value, pipe-specific Hagen-Poiseuille output, and warnings. Combined with async polling and degradation behavior, an agent has enough to invoke and interpret the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With only 5% schema description coverage across 20 parameters, the description does substantial work: it explains model/body plus velocity for the tunnel family, diameter/length/velocity or flow_rate for the pipe family, default metrics per family, refinement_ratio cost implications, end_time as a coarsest-level cap, and how n_axial/n_radial scale. Some parameters such as fluid, turbulence, mu_pa_s, rho_kg_m3, flow_direction, and surface_refine remain unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: solve the same CFD case at 2-3 refined meshes and report the Grid Convergence Index. It also distinguishes this from single-solve twins by framing the tool as answering whether a result is a property of the flow or of the mesh.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clearly explains when the tool is useful: when no analytic twin exists and a mesh-error band is needed. It also gives concrete dispatch patterns for the wind-tunnel and straight-pipe families, though it does not explicitly name when to prefer this over sibling tools like cfd_external_flow_submit or grid_convergence.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools