Flow velocity m s
flow_velocity_m_s
Mean flow velocity V (m/s)
Scores if within ±3% of the reference value.
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.
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.
5 inputs
Included directly in every task prompt.
Flow rate
flow_rate_m3_s
Volumetric flow rate Q
Pipe diameter
pipe_diameter_m
Internal pipe diameter D
Pipe length
pipe_length_m
Pipe length L
Sampled from the scenario and inferable from its description.
Roughness height
roughness_height_mm
Absolute roughness height epsilon
Derived from the archetype scenario. Hidden at hard difficulty.
Used only when the sampled task needs this part of the contract.
Kinematic viscosity
kinematic_viscosity_m2_s
Kinematic viscosity of the fluid nu
Optional input.
4 outputs
flow_velocity_m_s
Mean flow velocity V (m/s)
Scores if within ±3% of the reference value.
reynolds_number
Reynolds number Re
Scores if within ±3% of the reference value.
friction_factor
Darcy friction factor f
Scores if within ±5% of the reference value.
head_loss_m
Friction head loss hf (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, smooth pipe, moderate flow
All inputs given
All parameters given, any pipe material and flow regime
Some inputs hidden
Roughness 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 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 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
corrugated_steel
Corrugated steel drainage culvert
sydney-greenfield-new-pvc-preview — hard difficulty, some inputs hidden.
New PVC or HDPE pipeline. sydney-greenfield. Required outputs: flow_velocity_m_s, reynolds_number, friction_factor, head_loss_m
Scenario context and visible inputs.
Executable tool: darcy-weisbach-headloss_calc.py
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 scored JSON answer schema.
{
"flow_velocity_m_s": <number>,
"reynolds_number": <number>,
"friction_factor": <number>,
"head_loss_m": <number>
}