Math & Numbers
计算薄壁锐缘堰的流量。矩形堰(无侧收缩)Q=(2/3)·C_d·√(2g)·b·H^1.5;V 型(三角)堰 Q=(8/15)·C_d·√(2g)·tan(θ/2)·H^2.5。其中 b 为堰宽、H 为堰上水头、θ 为 V 型堰顶角。流量系数 C_d 留空时:矩形堰取 0.611(Rehbock/Francis 简化典型值),V 型堰取 0.58。堰宽支持 m/cm,水头支持 m/cm/mm,结果同时给出 m³/s、L/s、L/min、m³/h 四种单位。
用三种语言从你的代码中调用此工具。
curl -X POST 'https://api.elysiatools.com/zh/api/tools/weir-flow-calculator' \
-H 'Content-Type: application/json' \
-d '{"weirType":"rectangular","crestWidth":1,"crestWidthUnit":"m","notchAngle":90,"head":0.2,"headUnit":"m","dischargeCoefficient":0.611,"gravity":9.81,"decimalPlaces":4}'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST https://api.elysiatools.com/zh/api/tools/weir-flow-calculator| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| weirType | select | 否 | Rectangular (suppressed, no side contraction) takes crest width b and head H. V-Notch (triangular) takes notch angle θ and head H. |
| crestWidth | number | 是 | Crest width b of the rectangular weir. Enter in the selected Crest Width Unit. Required when Weir Type = Rectangular. |
| crestWidthUnit | select | 否 | — |
| notchAngle | number | 否 | V-notch angle θ in degrees (0 < θ ≤ 180). Required when Weir Type = V-Notch. |
| head | number | 是 |
将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-weir-flow-calculator": {
"name": "weir-flow-calculator",
"description": "计算薄壁锐缘堰的流量。矩形堰(无侧收缩)Q=(2/3)·C_d·√(2g)·b·H^1.5;V 型(三角)堰 Q=(8/15)·C_d·√(2g)·tan(θ/2)·H^2.5。其中 b 为堰宽、H 为堰上水头、θ 为 V 型堰顶角。流量系数 C_d 留空时:矩形堰取 0.611(Rehbock/Francis 简化典型值),V 型堰取 0.58。堰宽支持 m/cm,水头支持 m/cm/mm,结果同时给出 m³/s、L/s、L/min、m³/h 四种单位。",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=weir-flow-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": "weir-flow-calculator",
"arguments": {
"weirType": "rectangular",
"crestWidth": 1,
"crestWidthUnit": "m",
"notchAngle": 90,
"head": 0.2,
"headUnit": "m",
"dischargeCoefficient": 0.611,
"gravity": 9.81,
"decimalPlaces": 4
}
}
}有问题或反馈?请联系 [email protected]
| Head H over the crest (rectangular) or over the vertex (V-notch). Enter in the selected Head Unit. |
| headUnit | select | 否 | — |
| dischargeCoefficient | number | 否 | Discharge coefficient C_d. Leave blank to use the default: 0.611 for rectangular weirs (Rehbock/Francis typical value), 0.58 for V-notch weirs. |
| gravity | number | 否 | Gravitational acceleration g in m/s². |
| decimalPlaces | number | 否 | — |
JSON 结果
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}