Math & Numbers
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.
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}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/pipe-friction-factor| 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 |
Add this tool to your Model Context Protocol server so AI agents can list and call it.
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"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}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
}
}
}| — |
| method | select | No | Auto = laminar formula if Re<2000, else Colebrook. Haaland estimate is always reported as a cross-check. |
| decimalPlaces | number | No | — |
JSON result
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Questions or issues? Contact [email protected]