Math & Numbers
计算管道管件/阀门/弯头的局部水头损失:h_m=K·v²/(2g),ΔP_m=K·ρ·v²/2。内置 14 种常见管件的典型 K 值(闸阀、截止阀、止回阀、90°/45° 弯头、三通、突然扩大/收缩、出入口等),可直接选择或自定义 K。支持 n 个相同管件串联,输出水头(m/ft)、压降(Pa/kPa/bar)。密度支持 kg/m³、g/cm³、lb/ft³。
用三种语言从你的代码中调用此工具。
curl -X POST 'https://api.elysiatools.com/zh/api/tools/minor-loss-calculator' \
-H 'Content-Type: application/json' \
-d '{"componentType":"elbow_90_std","K":0.9,"velocity":2,"density":1000,"densityUnit":"kg_m3","gravity":9.81,"quantity":4,"decimalPlaces":4}'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST https://api.elysiatools.com/zh/api/tools/minor-loss-calculator| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| componentType | select | 否 | Pick a preset to pre-fill a typical loss coefficient K. The K field below stays user-editable; if you leave K empty the preset's typical value is used. |
| K | number | 是 | Loss coefficient K (dimensionless). If left empty and a preset Component Type is selected, the preset's typical K is used. When Component Type is "Custom K", K must be provided. Typical ranges: gate valve ~0.15, globe valve ~10, 90° std elbow ~0.9, sharp exit ~1.0. |
| velocity | number | 是 | Mean flow velocity v in the pipe (m/s). |
| density | number | 否 | Fluid density ρ in the selected Density Unit (default water ≈ 1000 kg/m³). |
| densityUnit |
将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-minor-loss-calculator": {
"name": "minor-loss-calculator",
"description": "计算管道管件/阀门/弯头的局部水头损失:h_m=K·v²/(2g),ΔP_m=K·ρ·v²/2。内置 14 种常见管件的典型 K 值(闸阀、截止阀、止回阀、90°/45° 弯头、三通、突然扩大/收缩、出入口等),可直接选择或自定义 K。支持 n 个相同管件串联,输出水头(m/ft)、压降(Pa/kPa/bar)。密度支持 kg/m³、g/cm³、lb/ft³。",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=minor-loss-calculator",
"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": "minor-loss-calculator",
"arguments": {
"componentType": "elbow_90_std",
"K": 0.9,
"velocity": 2,
"density": 1000,
"densityUnit": "kg_m3",
"gravity": 9.81,
"quantity": 4,
"decimalPlaces": 4
}
}
}有问题或反馈?请联系 [email protected]
| select |
| 否 |
| — |
| gravity | number | 否 | Gravitational acceleration g in m/s² (Earth default 9.81). |
| quantity | number | 否 | Number n of identical fittings in series. Total loss = n · K · v²/(2g). |
| decimalPlaces | number | 否 | — |
JSON 结果
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}