Math & Numbers
Compute the discharge over a sharp-crested thin-plate weir. Rectangular (suppressed, no side contraction): Q = (2/3)·C_d·√(2g)·b·H^1.5. V-notch (triangular): Q = (8/15)·C_d·√(2g)·tan(θ/2)·H^2.5. b is the crest width, H the head over the crest (or over the vertex for a V-notch), θ the notch angle. If C_d is left blank it defaults to 0.611 for rectangular weirs (Rehbock/Francis typical value) and 0.58 for V-notch weirs. Crest width in m/cm, head in m/cm/mm; output in m³/s, L/s, L/min and m³/h.
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/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}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/weir-flow-calculator| Name | Type | Required | Description |
|---|---|---|---|
| weirType | select | No | Rectangular (suppressed, no side contraction) takes crest width b and head H. V-Notch (triangular) takes notch angle θ and head H. |
| crestWidth | number | Yes | Crest width b of the rectangular weir. Enter in the selected Crest Width Unit. Required when Weir Type = Rectangular. |
| crestWidthUnit | select | No | — |
| notchAngle | number | No | V-notch angle θ in degrees (0 < θ ≤ 180). Required when Weir Type = V-Notch. |
| head | number |
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-weir-flow-calculator": {
"name": "weir-flow-calculator",
"description": "Compute the discharge over a sharp-crested thin-plate weir. Rectangular (suppressed, no side contraction): Q = (2/3)·C_d·√(2g)·b·H^1.5. V-notch (triangular): Q = (8/15)·C_d·√(2g)·tan(θ/2)·H^2.5. b is the crest width, H the head over the crest (or over the vertex for a V-notch), θ the notch angle. If C_d is left blank it defaults to 0.611 for rectangular weirs (Rehbock/Francis typical value) and 0.58 for V-notch weirs. Crest width in m/cm, head in m/cm/mm; output in m³/s, L/s, L/min and m³/h.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=weir-flow-calculator",
"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": "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
}
}
}| Yes |
| Head H over the crest (rectangular) or over the vertex (V-notch). Enter in the selected Head Unit. |
| headUnit | select | No | — |
| dischargeCoefficient | number | No | 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 | No | Gravitational acceleration g in m/s². |
| decimalPlaces | number | No | — |
JSON result
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Questions or issues? Contact [email protected]