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.
Quick start
Call this tool from your code in three languages.
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
POST https://api.elysiatools.com/en/api/tools/pipe-friction-factorParameters
| Name | Type | Required | Description |
|---|---|---|---|
| reynolds | number | Yes | Reynolds number Re = ρ·v·D/μ. Must be positive. |
| roughness | number | Yes | Absolute pipe roughness ε in the selected unit. 0 = perfectly smooth. |
| roughnessUnit | select | No | — |
| diameter | number | Yes | Internal (hydraulic) pipe diameter D in the selected unit. |
| diameterUnit | select | No |
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:
{
"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:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Call this tool
Invoke the tool by its id, passing arguments built from its parameters:
{
"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
}
}
}