Math & Numbers
Calcula la pérdida de presión principal (por fricción) de Darcy-Weisbach en una tubería recta: ΔP=f·(L/D)·(ρ·v²/2) Pa; pérdida de carga h_f=ΔP/(ρ·g)=f·(L/D)·v²/(2g) m. El usuario introduce el factor de fricción de Darcy f (no el de Fanning). Longitud en m/km/ft, diámetro en m/cm/mm/inch, densidad en kg/m³/g/cm³/lb/ft³ (se convierte a SI). Devuelve kPa, bar y carga en m/ft.
Llama a esta herramienta desde tu código en tres lenguajes.
curl -X POST 'https://api.elysiatools.com/es/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}'Envía una petición POST con tus entradas en JSON. Los parámetros de tipo archivo requieren una subida previa.
POST https://api.elysiatools.com/es/api/tools/pipe-pressure-drop-darcy| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| frictionFactor | number | Sí | 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 | Sí | Pipe length L in the selected Length Unit. |
| pipeLengthUnit | select | No | — |
| diameter | number | Sí | Internal pipe diameter D in the selected Diameter Unit. |
| diameterUnit |
Añade esta herramienta a tu servidor Model Context Protocol para que los agentes de IA puedan listarla y llamarla.
Añade este bloque a la configuración de tu cliente MCP:
{
"mcpServers": {
"elysiatools-pipe-pressure-drop-darcy": {
"name": "pipe-pressure-drop-darcy",
"description": "Calcula la pérdida de presión principal (por fricción) de Darcy-Weisbach en una tubería recta: ΔP=f·(L/D)·(ρ·v²/2) Pa; pérdida de carga h_f=ΔP/(ρ·g)=f·(L/D)·v²/(2g) m. El usuario introduce el factor de fricción de Darcy f (no el de Fanning). Longitud en m/km/ft, diámetro en m/cm/mm/inch, densidad en kg/m³/g/cm³/lb/ft³ (se convierte a SI). Devuelve kPa, bar y carga en m/ft.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pipe-pressure-drop-darcy",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Tras conectar al endpoint SSE, lista las herramientas expuestas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoca la herramienta por su id; los argumentos se construyen a partir de sus parámetros:
{
"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
}
}
}| select |
| No |
| — |
| density | number | No | Fluid density ρ in the selected Density Unit. |
| densityUnit | select | No | — |
| velocity | number | Sí | 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 | — |
Resultado JSON
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}¿Dudas o problemas? Contacta con [email protected]