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

Hazen Williams Friction

Calculates head loss and equivalent pressure loss for pressurised water flow using the Hazen-Williams equation. The template converts flow and diameter to SI units, reports hydraulic gradient, and supports water distribution and fire-service pipe checks.

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

5 inputs

Always given

Included directly in every task prompt.

5
  • Pipe length

    pipe_length_m

    Pipe length

    0.1 – 10000 m
  • Pipe internal diameter

    pipe_internal_diameter_mm

    Internal pipe diameter

    10 – 3000 mm
  • Flow rate

    flow_rate_l_s

    Volumetric flow rate

    0.01 – 10000 L/s
  • Hazen williams c

    hazen_williams_c

    Hazen-Williams roughness coefficient

    40 – 160
  • Fluid density

    fluid_density_kg_m3

    Fluid density

    900 – 1200 kg/m3

Scored outputs

4 outputs

Flow rate

flow_rate_m3_s

Flow rate in cubic metres per second

Scores if within ±3% of the reference value.

Head loss

head_loss_m

Friction head loss

Scores if within ±3% of the reference value.

Pressure loss

pressure_loss_kpa

Equivalent pressure loss

Scores if within ±3% of the reference value.

Hydraulic gradient m per

hydraulic_gradient_m_per_m

Hydraulic gradient

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.

All inputs remain visible at every tier

For this template, difficulty scales through parameter and scenario ranges rather than hidden information.

easy:
All parameters given for a distribution main
medium:
All parameters given across water pipe contexts
hard:
All parameters given for fire-service pipework

Task bundle

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

/workspace

  • instruction.md
  • hazen-williams-friction_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 mechanical engineer specializing in hydraulic pipe calculations.2 3## Task4 5Calculate the Hazen-Williams friction loss for the pressurised water pipe in {{ site_context }}.6 7## Given8 9| Parameter | Value | Unit |10| --- | ---: | --- |11| Pipe length | {{ pipe_length_m }} | m |12| Internal pipe diameter | {{ pipe_internal_diameter_mm }} | mm |13| Flow rate | {{ flow_rate_l_s }} | L/s |14| Hazen-Williams C value | {{ hazen_williams_c }} | - |15| Fluid density | {{ fluid_density_kg_m3 }} | kg/m3 |16 17## Constraints18 19- No internet access is available.20- Use the Hazen-Williams equation in SI form: `h_f = 10.67 L Q^1.852 / (C^1.852 d^4.871)`.21- Convert flow from L/s to m3/s and diameter from mm to m before calculating head loss.22- Use `g = 9.81 m/s2` for pressure conversion.23 24{% if tool_available %}25## Available Tool26 27A calculation tool is available at `/workspace/{{ meta.name }}_calc.py`. Run it with:28 29```bash30python3 /workspace/{{ meta.name }}_calc.py --help31```32 33You may use this tool to verify your calculations or compute values directly.34{% endif %}35 36## Required37 38Calculate:39 40- Flow rate in cubic metres per second (`flow_rate_m3_s`)41- Friction head loss (`head_loss_m`)42- Equivalent pressure loss (`pressure_loss_kpa`)43- Hydraulic gradient (`hydraulic_gradient_m_per_m`)44 45## Output Format46 47Show your step-by-step working in Markdown. At the end of your solution, include a JSON block with your final answers in exactly this format:48 49```json50{51 "flow_rate_m3_s": <numeric_value>,52 "head_loss_m": <numeric_value>,53 "pressure_loss_kpa": <numeric_value>,54 "hydraulic_gradient_m_per_m": <numeric_value>55}56```57 58Write your complete solution to `/workspace/output.md`.59

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.

Distribution main

distribution_main

Water distribution main friction loss

water-distribution-maintrunk-main
Parameter ranges
pipe_length_m
50 – 2000
pipe_internal_diameter_mm
100 – 900
flow_rate_l_s
5 – 800
hazen_williams_c
100 – 150
fluid_density_kg_m3
990 – 1030

Fire service

fire_service

Fire-service pipe friction loss

fire-service-pipehydrant-feed
Parameter ranges
pipe_length_m
20 – 500
pipe_internal_diameter_mm
50 – 300
flow_rate_l_s
5 – 200
hazen_williams_c
100 – 140
fluid_density_kg_m3
990 – 1030

Example task

fire-service-pipe-fire-service-previewhard difficulty, all inputs given.

Fire-service pipe friction loss. fire-service-pipe. Required outputs: flow_rate_m3_s, head_loss_m, pressure_loss_kpa, hydraulic_gradient_m_per_m

The model sees

Scenario context and visible inputs.

pipe_length_m
20 to 500 m
pipe_internal_diameter_mm
50 to 300 mm
flow_rate_l_s
5 to 200 L/s
hazen_williams_c
100 to 140
fluid_density_kg_m3
990 to 1030 kg/m3

Executable tool: hazen-williams-friction_calc.py

The model must infer

Inputs withheld at this difficulty.

Nothing. All inputs are supplied.

The model must produce

The scored JSON answer schema.

{
  "flow_rate_m3_s": <number>,
  "head_loss_m": <number>,
  "pressure_loss_kpa": <number>,
  "hydraulic_gradient_m_per_m": <number>
}
  • flow_rate_m3_s · scored within ±3%
  • head_loss_m · scored within ±3%
  • pressure_loss_kpa · scored within ±3%
  • hydraulic_gradient_m_per_m · scored within ±3%