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

Darcy Weisbach Headloss

Calculates friction head loss in pressurised pipe flow using the Darcy-Weisbach equation hf = f * (L/D) * V^2/(2g), with the friction factor determined by the Swamee-Jain explicit approximation for turbulent flow or f = 64/Re for laminar flow. Computes Reynolds number and flow velocity as intermediate results. Used in water supply and hydraulic pipeline design to size pipes and evaluate 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

5 inputs

Always given

Included directly in every task prompt.

3
  • Flow rate

    flow_rate_m3_s

    Volumetric flow rate Q

    0.01 – 2 m³/s
  • Pipe diameter

    pipe_diameter_m

    Internal pipe diameter D

    0.05 – 2 m
  • Pipe length

    pipe_length_m

    Pipe length L

    10 – 5000 m

Derived from scenario

Sampled from the scenario and inferable from its description.

1
  • Roughness height

    roughness_height_mm

    Absolute roughness height epsilon

    Derived from the archetype scenario. Hidden at hard difficulty.

    0.01 – 5 mm

Optional

Used only when the sampled task needs this part of the contract.

1
  • Kinematic viscosity

    kinematic_viscosity_m2_s

    Kinematic viscosity of the fluid nu

    Optional input.

    5e-7 – 0.000015 m²/s

Scored outputs

4 outputs

Flow velocity m s

flow_velocity_m_s

Mean flow velocity V (m/s)

Scores if within ±3% of the reference value.

Reynolds number

reynolds_number

Reynolds number Re

Scores if within ±3% of the reference value.

Friction factor

friction_factor

Darcy friction factor f

Scores if within ±5% of the reference value.

Head loss

head_loss_m

Friction head loss hf (m)

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 pipe, moderate flow

medium

All inputs given

All parameters given, any pipe material and flow regime

hard

Some inputs hidden

Roughness hidden, agent must infer from pipe material description

Hidden inputs

  • Roughness heightroughness_height_mm

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
  • darcy-weisbach-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 Darcy-Weisbach equation. Determine the Darcy friction factor using the Swamee-Jain explicit approximation (for turbulent flow) or the laminar flow formula as appropriate.6 7## Given8 9| Parameter | Value | Unit |10|-----------|-------|------|11| Flow rate (Q) | {{ flow_rate_m3_s }} | m³/s |12| Pipe diameter (D) | {{ pipe_diameter_m }} | m |13| Pipe length (L) | {{ pipe_length_m }} | m |14{% if roughness_height_mm is defined %}15| Roughness height (ε) | {{ roughness_height_mm }} | mm |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/darcy-weisbach-headloss_calc.py`. Run it with:28 29```bash30python3 /workspace/darcy-weisbach-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. Mean flow velocity V (m/s)412. Reynolds number Re423. Darcy friction factor f434. Friction head loss hf (m)44 45## Applicable Standards46 47- AWWA — American Water Works Association pipe flow references48- Darcy-Weisbach equation for pressure loss in pipe flow49- Swamee-Jain (1976) explicit approximation for the Darcy friction factor50 51## Constraints52 53- No internet access is available. Work from engineering knowledge and the provided tool.54- Use the following formulas:55 - Flow velocity: V = Q / (π × D² / 4)56 - Reynolds number: Re = V × D / ν57 - Darcy friction factor (turbulent, Re ≥ 2300): Swamee-Jain approximation58 f = 0.25 / [log₁₀(ε/(3.7×D) + 5.74/Re⁰·⁹)]²59 - Darcy friction factor (laminar, Re < 2300): f = 64 / Re60 - Head loss: hf = f × (L/D) × (V² / (2×g))61- Physical constants: g = 9.81 m/s²62- If kinematic viscosity is not provided, assume water at 20°C: ν = 1.004 × 10⁻⁶ m²/s63- Convert roughness height from mm to m before using in the Swamee-Jain equation64 65## Output Format66 67Show your step-by-step working in Markdown, including the velocity calculation, Reynolds number determination, friction factor method selection, and final head loss. At the end of your solution, include a JSON block with your final answers in exactly this format:68 69```json70{71 "flow_velocity_m_s": <numeric_value>,72 "reynolds_number": <numeric_value>,73 "friction_factor": <numeric_value>,74 "head_loss_m": <numeric_value>75}76```77 78Write your complete solution to `/workspace/output.md`.79

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
roughness_height_mm
0.01 – 0.03

New ductile iron

new_ductile_iron

New cement-lined ductile iron pipeline

melbourne-trunk-mainadelaide-distribution
Parameter ranges
roughness_height_mm
0.03 – 0.1

Aged cast iron

aged_cast_iron

Aged unlined cast iron pipeline with moderate tuberculation

sydney-inner-west-legacymelbourne-inner-legacy
Parameter ranges
roughness_height_mm
0.5 – 2

Corrugated steel

corrugated_steel

Corrugated steel drainage culvert

darwin-rural-crossingcairns-rural-crossing
Parameter ranges
roughness_height_mm
1.5 – 5

Example task

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

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

The model sees

Scenario context and visible inputs.

flow_rate_m3_s
0.01 to 2 m³/s
pipe_diameter_m
0.05 to 2 m
pipe_length_m
10 to 5000 m
kinematic_viscosity_m2_s
1.004e-06 m²/s

Executable tool: darcy-weisbach-headloss_calc.py

The model must infer

Inputs withheld at this difficulty.

  • Roughness height

    roughness_height_mm

Stand-in text in the prompt

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

The model must produce

The scored JSON answer schema.

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