Math & Numbers
Compute the Darcy-Weisbach major (friction) pressure drop in a straight pipe: ΔP = f·(L/D)·(ρ·v²/2) Pa and head loss h_f = f·(L/D)·v²/(2g) m. The user supplies the Darcy friction factor f (not the Fanning factor). Length in m/km/ft, diameter in m/cm/mm/inch, density in kg/m³/g/cm³/lb/ft³ — all normalised to SI internally. Returns ΔP in Pa, kPa and bar, and head loss in m and ft. Gravity defaults to 9.81 m/s² and may be overridden.
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/pipe-pressure-drop-darcy' \
-H 'Content-Type: application/json' \
-d '{"frictionFactor":0.02,"pipeLength":100,"pipeLengthUnit":"m","diameter":0.05,"diameterUnit":"m","density":1000,"densityUnit":"kg/m³","velocity":2,"gravity":9.81,"decimalPlaces":4}'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-pressure-drop-darcy| Name | Type | Required | Description |
|---|---|---|---|
| frictionFactor | number | Yes | Darcy friction factor f (also called Moody / Darcy-Weisbach factor). NOTE: this is NOT the Fanning friction factor (f_Darcy = 4·f_Fanning). Obtain f from a Moody chart or the Colebrook-White correlation. |
| pipeLength | number | Yes | Pipe length L in the selected Length Unit. |
| pipeLengthUnit | select | No | — |
| diameter | number | Yes | Internal pipe diameter D in the selected Diameter Unit. |
| diameterUnit | select |
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-pressure-drop-darcy": {
"name": "pipe-pressure-drop-darcy",
"description": "Compute the Darcy-Weisbach major (friction) pressure drop in a straight pipe: ΔP = f·(L/D)·(ρ·v²/2) Pa and head loss h_f = f·(L/D)·v²/(2g) m. The user supplies the Darcy friction factor f (not the Fanning factor). Length in m/km/ft, diameter in m/cm/mm/inch, density in kg/m³/g/cm³/lb/ft³ — all normalised to SI internally. Returns ΔP in Pa, kPa and bar, and head loss in m and ft. Gravity defaults to 9.81 m/s² and may be overridden.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pipe-pressure-drop-darcy",
"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-pressure-drop-darcy",
"arguments": {
"frictionFactor": 0.02,
"pipeLength": 100,
"pipeLengthUnit": "m",
"diameter": 0.05,
"diameterUnit": "m",
"density": 1000,
"densityUnit": "kg/m³",
"velocity": 2,
"gravity": 9.81,
"decimalPlaces": 4
}
}
}| No |
| — |
| density | number | No | Fluid density ρ in the selected Density Unit. |
| densityUnit | select | No | — |
| velocity | number | Yes | Mean flow velocity v in m/s. |
| gravity | number | No | Gravitational acceleration g in m/s². Default 9.81 (Earth); override for non-Earth or unit-head conversions. |
| decimalPlaces | number | No | — |
JSON result
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Questions or issues? Contact [email protected]