Elysia Tools Docs
EN
Language
ZHESPTRUFRDEEN
Back to site
Browse tools

Math & Numbers

Pipe Friction Factor Calculator (Colebrook-White / Haaland)

Compute the Darcy friction factor: laminar closed-form f=64/Re for Re<2000, or iterative Colebrook-White solution for transitional/turbulent flow, with the explicit Haaland approximation always returned as a cross-check. Reports relative roughness ε/D, absolute roughness (m), diameter (m), flow regime (laminar/transitional/turbulent), effective method and iteration count. Roughness ε in m/mm/µm, diameter D in m/cm/mm.

json· JSON resultOpen tool

Quick start

Call this tool from your code in three languages.

cURL
curl -X POST 'https://api.elysiatools.com/en/api/tools/pipe-friction-factor' \
  -H 'Content-Type: application/json' \
  -d '{"reynolds":100000,"roughness":0.0457,"roughnessUnit":"mm","diameter":0.05,"diameterUnit":"m","method":"Auto","decimalPlaces":6}'

API reference

Send a POST request with your inputs as JSON. File parameters require a separate upload first.

Endpoint

HTTP
POST https://api.elysiatools.com/en/api/tools/pipe-friction-factor

Parameters

NameTypeRequiredDescription
reynoldsnumberYesReynolds number Re = ρ·v·D/μ. Must be positive.
roughnessnumberYesAbsolute pipe roughness ε in the selected unit. 0 = perfectly smooth.
roughnessUnitselectNo—
diameternumberYesInternal (hydraulic) pipe diameter D in the selected unit.
diameterUnitselectNo

MCP integration

Add this tool to your Model Context Protocol server so AI agents can list and call it.

Server configuration

Add this block to your MCP client configuration:

mcp.json
{
  "mcpServers": {
    "elysiatools-pipe-friction-factor": {
      "name": "pipe-friction-factor",
      "description": "Compute the Darcy friction factor: laminar closed-form f=64/Re for Re<2000, or iterative Colebrook-White solution for transitional/turbulent flow, with the explicit Haaland approximation always returned as a cross-check. Reports relative roughness ε/D, absolute roughness (m), diameter (m), flow regime (laminar/transitional/turbulent), effective method and iteration count. Roughness ε in m/mm/µm, diameter D in m/cm/mm.",
      "baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pipe-friction-factor",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

List available tools

After connecting to the SSE endpoint, list the exposed tools:

tools/list
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list"
}

Call this tool

Invoke the tool by its id, passing arguments built from its parameters:

tools/call
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "pipe-friction-factor",
    "arguments": {
  "reynolds": 100000,
  "roughness": 0.0457,
  "roughnessUnit": "mm",
  "diameter": 0.05,
  "diameterUnit": "m",
  "method": "Auto",
  "decimalPlaces": 6
}
  }
}
Browse toolsOpen tool

© 2026 Elysia Tools. Developer documentation.

Back to siteBrowse tools
—
methodselectNoAuto = laminar formula if Re<2000, else Colebrook. Haaland estimate is always reported as a cross-check.
decimalPlacesnumberNo—

Response format

JSON result

JSON
{
  "key": {...},
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
Chain multiple tools in one session with a comma-separated toolId list, e.g. /mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp (max 20).

Questions or issues? Contact [email protected]