Required weir length
required_weir_length_m
Required weir crest length L (m)
Scores if within ±3% of the reference value.
Sizes a sharp-crested rectangular weir for detention basin emergency overflow using the Francis formula Q = Cw * (L - 0.1*n*H) * H^1.5, where Cw = Cd * sqrt(2g). Solves for the required crest length given design flow, head, discharge coefficient, and end contractions, supporting stormwater detention and flood control design.
with-tool: The model is given an executable Python calculator script.
One template produces many comparable benchmark tasks while keeping the scoring contract fixed.
01
The reusable contract shown on this page.
02
An archetype and site context are sampled.
03
Inputs may be hidden at harder tiers.
04
The model responds with the declared outputs.
Inputs the model receives, and the outputs it is scored on.
4 inputs
Included directly in every task prompt.
Design flow
design_flow_m3_s
Design overflow discharge Q
Sampled from the scenario and inferable from its description.
Head over weir
head_over_weir_m
Head of water over the weir crest H
Derived from the archetype scenario. Hidden at hard difficulty.
Used only when the sampled task needs this part of the contract.
Discharge coefficient
discharge_coefficient
Weir discharge coefficient Cd
Derived from the archetype scenario. Optional input. Hidden at hard difficulty.
Number of contractions
number_of_contractions
Number of end contractions n (0 = suppressed, 1 or 2 = contracted)
Derived from the archetype scenario. Optional input.
2 outputs
required_weir_length_m
Required weir crest length L (m)
Scores if within ±3% of the reference value.
unit_discharge_m3_s_per_m
Unit discharge per metre of weir crest q (m³/s/m)
Scores if within ±3% of the reference value.
Each template is sampled at three tiers. Harder tiers may hide inputs, forcing the model to infer them from the scenario description.
All inputs given
All parameters given, suppressed weir with standard coefficient
Number of contractions restricted to: 0
Discharge coefficient restricted to: 0.62
All inputs given
All parameters given, variable coefficient and end contractions
Some inputs hidden
Discharge coefficient and head hidden, agent must infer from site context
Hidden inputs
Prompt replacement text
The detention basin has a {{ archetype.description }} ({{ archetype.site_context }})
The exact instruction and parameter contract used to generate this task, pinned to the published library source.
/workspace
Teal lines show Jinja input conditions, not task visibility policy. A line renders only when that input or tool is visible.
1You are a senior civil engineer specializing in stormwater management and detention basin design.2 3## Problem4 5Size an emergency spillway weir to safely pass the design overflow from a detention basin using the Francis weir discharge formula.6 7## Given8 9| Parameter | Value | Unit |10|-----------|-------|------|11| Design overflow discharge (Q) | {{ design_flow_m3_s }} | m³/s |12{% if head_over_weir_m is defined %}13| Head over weir crest (H) | {{ head_over_weir_m }} | m |14{% endif %}15{% if discharge_coefficient is defined %}16| Discharge coefficient (Cd) | {{ discharge_coefficient }} | - |17{% endif %}18{% if number_of_contractions is defined %}19| Number of end contractions (n) | {{ number_of_contractions }} | - |20{% endif %}21{% if archetype_description is defined %}22 23### Site Conditions24 25{{ archetype_description }}26{% endif %}27 28{% if tool_available %}29## Available Tool30 31A weir sizing calculation tool is available at `/workspace/weir-outlet-design_calc.py`. Run it with:32 33```bash34python3 /workspace/weir-outlet-design_calc.py --help35```36 37You may use this tool to verify your calculations or compute values directly.38{% endif %}39 40## Required41 42Calculate the following:43 441. Required weir crest length L (m)452. Unit discharge per metre of weir crest q (m³/s/m)46 47## Applicable Standards48 49- Standard hydraulics textbook weir flow equations50- Francis formula (1883) for sharp-crested rectangular weirs51 52## Constraints53 54- No internet access is available. Work from engineering knowledge and the provided tool.55- Use the Francis weir discharge formula:56 - **Q = Cw × (L − 0.1 × n × H) × H^(3/2)**57 - Where the weir coefficient **Cw = Cd × √(2g)**58 - Rearranged for length: **L = Q / (Cw × H^(3/2)) + 0.1 × n × H**59 - Unit discharge: **q = Q / L**60- Use g = 9.81 m/s²61- If no discharge coefficient is given, use Cd = 0.62 (sharp-crested rectangular weir)62- If no number of contractions is given, assume n = 0 (suppressed weir)63- The weir is assumed to be a sharp-crested rectangular weir with free overflow64 65## Output Format66 67Show your step-by-step working in Markdown, including formulas and intermediate calculations. At the end of your solution, include a JSON block with your final answers in exactly this format:68 69```json70{71 "required_weir_length_m": <numeric_value>,72 "unit_discharge_m3_s_per_m": <numeric_value>73}74```75 76Write your complete solution to `/workspace/output.md`.77 Each generated task is drawn from one of these realistic scenario bands.
Site contexts ground each scenario in a real locale the model can use to infer hidden values.
small_urban_basin
Small urban detention basin with low-level spillway weir
medium_commercial_basin
Medium commercial development detention basin spillway
large_regional_basin
Large regional stormwater detention facility with emergency spillway
channel_diversion_weir
Channel diversion weir with end contractions
sydney-infill-residential-small-urban-basin-preview — hard difficulty, some inputs hidden.
Small urban detention basin with low-level spillway weir. sydney-infill-residential. Required outputs: required_weir_length_m, unit_discharge_m3_s_per_m
Scenario context and visible inputs.
Executable tool: weir-outlet-design_calc.py
Inputs withheld at this difficulty.
Head over weir
head_over_weir_m
Discharge coefficient
discharge_coefficient
Stand-in text in the prompt
The detention basin has a {{ archetype.description }} ({{ archetype.site_context }})
The scored JSON answer schema.
{
"required_weir_length_m": <number>,
"unit_discharge_m3_s_per_m": <number>
}