Skip to main content
Glama

CFD Pipe Flow

cfd_pipe_flow
Read-only

Calculate analytic pressure drop and flow regime for straight-pipe internal flow, including laminar and turbulent friction, to screen designs before OpenFOAM CFD.

Instructions

Analytic straight-pipe pressure drop (NO solver) — the fast internal-flow screen and the exact gate the OpenFOAM cfd_internal_flow solve is checked against. Laminar (Re<2300) is Hagen–Poiseuille Δp = 128·μ·L·Q/(π·D⁴) with its D⁴ scaling — exact; turbulent uses smooth-pipe Blasius, or Colebrook–White when roughness_mm is given (the Colebrook value is always reported for turbulent flow) — a ±10 % Moody-band correlation (fidelity labeled). Give flow as flow_rate_lpm or velocity_m_s; fluid μ,ρ from a name ('water-20c','air-20c','oil-sae30-20c','glycerin-20c') or explicit mu_pa_s+rho_kg_m3. Escalate turbulent cases to cfd_internal_flow_submit(turbulence='kOmegaSST').

Returns {reynolds, regime, velocity_m_s, flow_rate_m3_s, friction_factor, colebrook_friction_factor, relative_roughness, pressure_drop_pa, wall_shear_pa, hagen_poiseuille_pa, laminar, fidelity, band_pct, escalate_to}.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "diameter_mm": "<diameter_mm>",
      "length_mm": "<length_mm>"
    },
    "name": "cfd_pipe_flow"
  }
}

Input Schema

NameRequiredDescriptionDefault
fluidNowater-20c
mu_pa_sNo
length_mmYes
rho_kg_m3No
workspaceNoRun this call in this named workspace
diameter_mmYes
roughness_mmNo
velocity_m_sNo
flow_rate_lpmNo

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
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description goes further by disclosing accuracy characteristics that annotations cannot — laminar is exact, turbulent is a '±10 % Moody-band correlation' with a 'fidelity' label and 'band_pct' output. Minor gap: no note on cost/limits of very high Re or validity bounds beyond the Re<2300 split.

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?

Front-loaded with the key discriminator (analytic, no solver) and then regime-by-regime detail; nearly every clause carries information. It is dense — formulas, fluid keys, and a return-key list packed into one block — which costs some scanability.

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?

No output schema exists, yet the description enumerates the returned fields (reynolds, regime, friction_factor, colebrook_friction_factor, pressure_drop_pa, wall_shear_pa, fidelity, band_pct, escalate_to), so the agent knows what it gets back. Combined with model validity and escalation guidance, nothing essential is missing.

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?

Schema description coverage is only 11%, so the description must carry the load, and it does: it explains the flow_rate_lpm/velocity_m_s alternative, the fluid-name vs mu_pa_s+rho_kg_m3 alternative with concrete fluid keys, and that roughness_mm switches the friction model to Colebrook–White. It does not state precedence when both flow inputs are supplied, nor what happens if neither is given (only diameter/length are required), leaving a real ambiguity.

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?

States a specific verb and resource ('analytic straight-pipe pressure drop, NO solver') and immediately contrasts it with the solver-based sibling cfd_internal_flow. An agent can tell from the first clause that this is a fast closed-form screen, not a simulation.

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

Usage Guidelines5/5

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

Explicitly frames the tool as 'the fast internal-flow screen and the exact gate the OpenFOAM cfd_internal_flow solve is checked against', and gives a concrete escalation rule: 'Escalate turbulent cases to cfd_internal_flow_submit(turbulence='kOmegaSST')'. Names the alternative and the condition that selects it.

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