Math & Numbers
计算直管段的达西-韦斯巴赫主要(摩擦)压降:ΔP=f·(L/D)·(ρ·v²/2) Pa;水头损失 h_f=ΔP/(ρ·g)=f·(L/D)·v²/(2g) m。用户直接输入达西摩擦系数 f(非范宁系数)。长度支持 m/km/ft,管径支持 m/cm/mm/inch,密度支持 kg/m³/g/cm³/lb/ft³,内部统一换算为 SI。同时输出 kPa、bar 以及 m/ft 水头。
用三种语言从你的代码中调用此工具。
curl -X POST 'https://api.elysiatools.com/zh/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}'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST https://api.elysiatools.com/zh/api/tools/pipe-pressure-drop-darcy| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| frictionFactor | number | 是 | 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 | 是 | Pipe length L in the selected Length Unit. |
| pipeLengthUnit | select | 否 | — |
| diameter | number | 是 | Internal pipe diameter D in the selected Diameter Unit. |
| diameterUnit | select | 否 |
将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-pipe-pressure-drop-darcy": {
"name": "pipe-pressure-drop-darcy",
"description": "计算直管段的达西-韦斯巴赫主要(摩擦)压降:ΔP=f·(L/D)·(ρ·v²/2) Pa;水头损失 h_f=ΔP/(ρ·g)=f·(L/D)·v²/(2g) m。用户直接输入达西摩擦系数 f(非范宁系数)。长度支持 m/km/ft,管径支持 m/cm/mm/inch,密度支持 kg/m³/g/cm³/lb/ft³,内部统一换算为 SI。同时输出 kPa、bar 以及 m/ft 水头。",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pipe-pressure-drop-darcy",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}连接到 SSE 端点后,列出已开放的工具:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}通过工具 id 调用,参数由其参数表构建:
{
"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
}
}
}有问题或反馈?请联系 [email protected]
| — |
| density | number | 否 | Fluid density ρ in the selected Density Unit. |
| densityUnit | select | 否 | — |
| velocity | number | 是 | Mean flow velocity v in m/s. |
| gravity | number | 否 | Gravitational acceleration g in m/s². Default 9.81 (Earth); override for non-Earth or unit-head conversions. |
| decimalPlaces | number | 否 | — |
JSON 结果
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}