LIVEdataset aec-bench@releasetasks 552models 18last submission · built
civilwith-tool

Hazen Williams Headloss

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.

How this task is generated

One template produces many comparable benchmark tasks while keeping the scoring contract fixed.

  1. 01

    Template

    The reusable contract shown on this page.

  2. 02

    Scenario

    An archetype and site context are sampled.

  3. 03

    Difficulty tier

    Inputs may be hidden at harder tiers.

  4. 04

    Task prompt

    The model responds with the declared outputs.

Parameters

Inputs the model receives, and the outputs it is scored on.

Inputs

4 inputs

Always given

Included directly in every task prompt.

3
  • Flow rate

    flow_rate_l_s

    Volumetric flow rate Q

    0.5 – 500 L/s
  • Pipe diameter

    pipe_diameter_mm

    Internal pipe diameter D

    50 – 2000 mm
  • Pipe length

    pipe_length_m

    Pipe length L

    10 – 5000 m

Derived from scenario

Sampled from the scenario and inferable from its description.

1
  • C factor

    c_factor

    Hazen-Williams roughness coefficient C

    Derived from the archetype scenario. Hidden at hard difficulty.

    60 – 150

Scored outputs

3 outputs

Head loss

head_loss_m

Friction head loss hf (m)

Scores if within ±3% of the reference value.

Hydraulic gradient

hydraulic_gradient

Hydraulic gradient S = hf / L (dimensionless)

Scores if within ±5% of the reference value.

Flow velocity m s

flow_velocity_m_s

Mean flow velocity V (m/s)

Scores if within ±3% of the reference value.

Difficulty

Each template is sampled at three tiers. Harder tiers may hide inputs, forcing the model to infer them from the scenario description.

easy

All inputs given

All parameters given, smooth new pipe, moderate flow

medium

All inputs given

All parameters given, any pipe material and flow regime

hard

Some inputs hidden

C-factor hidden, agent must infer from pipe material description

Hidden inputs

  • C factorc_factor

Prompt replacement text

The pipe is a {{ archetype.description }} ({{ archetype.site_context }})

Task bundle

The exact instruction and parameter contract used to generate this task, pinned to the published library source.

/workspace

  • instruction.md
  • hazen-williams-headloss_calc.py

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

Scenario archetypes

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

New PVC or HDPE pipeline

sydney-greenfieldbrisbane-suburban
Parameter ranges
c_factor
140 – 150

New ductile iron

new_ductile_iron

New cement-lined ductile iron pipeline

melbourne-trunk-mainadelaide-distribution
Parameter ranges
c_factor
130 – 140

Aged cast iron

aged_cast_iron

Aged unlined cast iron pipeline with moderate tuberculation

sydney-inner-west-legacymelbourne-inner-legacy
Parameter ranges
c_factor
80 – 100

Corroded steel

corroded_steel

Corroded steel water main

darwin-industrial-reticulationcairns-coastal-reticulation
Parameter ranges
c_factor
60 – 80

Example task

sydney-greenfield-new-pvc-previewhard difficulty, some inputs hidden.

New PVC or HDPE pipeline. sydney-greenfield. Required outputs: head_loss_m, hydraulic_gradient, flow_velocity_m_s

The model sees

Scenario context and visible inputs.

flow_rate_l_s
0.5 to 500 L/s
pipe_diameter_mm
50 to 2000 mm
pipe_length_m
10 to 5000 m

Executable tool: hazen-williams-headloss_calc.py

The model must infer

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 model must produce

The scored JSON answer schema.

{
  "head_loss_m": <number>,
  "hydraulic_gradient": <number>,
  "flow_velocity_m_s": <number>
}
  • head_loss_m · scored within ±3%
  • hydraulic_gradient · scored within ±5%
  • flow_velocity_m_s · scored within ±3%