Head loss
head_loss_m
Friction head loss hf (m)
Scores if within ±3% of the reference value.
Calculates friction head loss in pressurised water mains using the Hazen-Williams empirical formula hf = 10.67 * L * Q^1.852 / (C^1.852 * D^4.87), along with the hydraulic gradient and flow velocity. The C-factor encodes pipe material and condition. Widely used in municipal water distribution design per AWWA and AS/NZS 3500 for sizing pipes and evaluating network pressure losses.
with-tool: The model is given an executable Python calculator script.
Standards
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.
Flow rate
flow_rate_l_s
Volumetric flow rate Q
Pipe diameter
pipe_diameter_mm
Internal pipe diameter D
Pipe length
pipe_length_m
Pipe length L
Sampled from the scenario and inferable from its description.
C factor
c_factor
Hazen-Williams roughness coefficient C
Derived from the archetype scenario. Hidden at hard difficulty.
3 outputs
head_loss_m
Friction head loss hf (m)
Scores if within ±3% of the reference value.
hydraulic_gradient
Hydraulic gradient S = hf / L (dimensionless)
Scores if within ±5% of the reference value.
flow_velocity_m_s
Mean flow velocity V (m/s)
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, smooth new pipe, moderate flow
All inputs given
All parameters given, any pipe material and flow regime
Some inputs hidden
C-factor hidden, agent must infer from pipe material description
Hidden inputs
Prompt replacement text
The pipe is 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 water infrastructure and pipe hydraulics.2 3## Problem4 5Calculate the friction head loss in a pressurised pipe using the Hazen-Williams equation. Determine the hydraulic gradient and mean flow velocity.6 7## Given8 9| Parameter | Value | Unit |10|-----------|-------|------|11| Flow rate (Q) | {{ flow_rate_l_s }} | L/s |12| Pipe diameter (D) | {{ pipe_diameter_mm }} | mm |13| Pipe length (L) | {{ pipe_length_m }} | m |14{% if c_factor is defined %}15| Hazen-Williams C-factor | {{ c_factor }} | — |16{% endif %}17{% if archetype_description is defined %}18 19### Pipe Conditions20 21{{ archetype_description }}22{% endif %}23 24{% if tool_available %}25## Available Tool26 27A head loss calculation tool is available at `/workspace/hazen-williams-headloss_calc.py`. Run it with:28 29```bash30python3 /workspace/hazen-williams-headloss_calc.py --help31```32 33You may use this tool to verify your calculations or compute values directly.34{% endif %}35 36## Required37 38Calculate the following:39 401. Friction head loss hf (m)412. Hydraulic gradient S (dimensionless)423. Mean flow velocity V (m/s)43 44## Applicable Standards45 46- AWWA — American Water Works Association pipe flow references47- AS/NZS 3500 — Australian/New Zealand plumbing and drainage standard48 49## Constraints50 51- No internet access is available. Work from engineering knowledge and the provided tool.52- Use the following formulas:53 - Convert flow rate: Q (m³/s) = Q (L/s) / 100054 - Convert diameter: D (m) = D (mm) / 100055 - Hazen-Williams head loss (SI): hf = 10.67 × L × Q¹·⁸⁵² / (C¹·⁸⁵² × D⁴·⁸⁷)56 where Q is in m³/s, D is in metres, L is in metres57 - Hydraulic gradient: S = hf / L58 - Flow velocity: V = Q / (π × D² / 4) where Q and D are in SI units59- If the Hazen-Williams C-factor is not given, you must infer an appropriate value from the pipe material description.60 61## Output Format62 63Show your step-by-step working in Markdown, including the unit conversions, head loss calculation, hydraulic gradient, and velocity. At the end of your solution, include a JSON block with your final answers in exactly this format:64 65```json66{67 "head_loss_m": <numeric_value>,68 "hydraulic_gradient": <numeric_value>,69 "flow_velocity_m_s": <numeric_value>70}71```72 73Write your complete solution to `/workspace/output.md`.74 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.
new_pvc
New PVC or HDPE pipeline
new_ductile_iron
New cement-lined ductile iron pipeline
aged_cast_iron
Aged unlined cast iron pipeline with moderate tuberculation
corroded_steel
Corroded steel water main
sydney-greenfield-new-pvc-preview — hard difficulty, some inputs hidden.
New PVC or HDPE pipeline. sydney-greenfield. Required outputs: head_loss_m, hydraulic_gradient, flow_velocity_m_s
Scenario context and visible inputs.
Executable tool: hazen-williams-headloss_calc.py
Inputs withheld at this difficulty.
C factor
c_factor
Stand-in text in the prompt
The pipe is a {{ archetype.description }} ({{ archetype.site_context }})
The scored JSON answer schema.
{
"head_loss_m": <number>,
"hydraulic_gradient": <number>,
"flow_velocity_m_s": <number>
}