pipe-flow-pressure-drop
Skill7 starsChanged 6 months agoApache-2.0View on GitHub
Estimate single-phase incompressible pipe pressure drop, Reynolds number, Darcy friction factor, and head loss for steady pipe flow, with optional minor-loss and elevation terms. Use when sizing a pump line, checking line size, or screening pressure drop in pipes. Don't use for two-phase flow (use two-phase-flow), compressible / choked flow, or detailed fittings/valves pressure-drop selection without sourced K factors.
In this repository31 other files it gives its agents.
- absorption-stripping-designSkill
- bayesian-hierarchical-process-modelsSkill
- caustic-merox-extractionSkill
- censored-regressionSkill
- compositional-data-analysisSkill
- control-valve-sizing-isa75Skill
- convective-heat-transfer-correlationsSkill
- design-of-experimentsSkill
- dimensionless-numbersSkill
- distillation-shortcut-designSkill
- distributed-lag-modelsSkill
- engg-skills-commonSkill
- engineering-skill-creatorSkill
- engineering-statisticsSkill
- equation-of-state-selectionSkill
- heat-exchanger-sizingSkill
- literature-search-engineeringSkill
- material-energy-balancesSkill
- process-causal-inference-dagsSkill
- process-units-conversionSkill
- reactor-sizing-and-kineticsSkill
- relief-valve-sizing-api520Skill
- separator-vessel-sizingSkill
- sour-gas-amine-treatingSkill
- statistical-process-controlSkill
- steam-tables-iapwsSkill
- thermo-process-propertiesSkill
- time-series-process-data-analysisSkill
- two-phase-flowSkill
- uvSkill
- vle-flash-calculationsSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 61
Run the script. The output reports Re.
- Distinctive: line 63
Add fitting / valve K-factor losses separately if needed.
- Distinctive: line 64
If the pressure drop is large, iterate to a larger diameter and rerun.
- Very specific: line 84
If fluids is missing, the script falls back to Haaland explicitly and flags the substitution in the JSON output.
- Distinctive: line 86
If the calculated Re is borderline transitional, the script attaches a warning so downstream design margins can be increased.
- Very specific: line 91
Run the listed script with representative inputs and an --output file when a deterministic calculation is available.
- Distinctive: line 93
Check result magnitudes against the stated assumptions, references, and a hand calculation or known operating range before reporting them.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Single-Phase Pipe Pressure Drop
Overview
Computes Darcy-Weisbach pressure drop with the Clamond friction factor
(via fluids) as primary, and the Haaland explicit form as fallback when
fluids is unavailable or fails. Outputs include Re, friction factor f,
velocity, head loss, and pressure drop.
Prerequisites
uvavailable.
When to Use
- Sizing a pump suction or discharge line.
- Checking line size given a design flow.
- Screening pressure drop across a long straight run before adding fittings.
Don't use for
- Two-phase flow (
two-phase-flow). - Compressible / choked gas flow.
- Pressure drop across fittings, valves, expansions, contractions (those need K factors).
- Non-Newtonian fluids.
Utility Scripts
uv run scripts/pipe_pressure_drop.py --length-m 100 --diameter-m 0.05 --flow-m3-s 0.002 --density-kg-m3 998 --viscosity-pa-s 0.001 --roughness-m 1.5e-6 --output /tmp/pdrop.json
Procedure
- Get fluid density and viscosity at the operating temperature.
- Pick the pipe inside diameter (after accounting for wall thickness and schedule).
- Pick the pipe absolute roughness (commercial steel ~ 45 μm, drawn tubing ~ 1.5 μm, PE ~ 0.0015 mm).
- Run the script. The output reports Re; check that the flow is in the regime you expect.
- Add fitting / valve K-factor losses separately if needed.
- If the pressure drop is large, iterate to a larger diameter and rerun.
Pitfalls
- Using nominal pipe diameter instead of the inside diameter for a given schedule.
- Using roughness too low (e.g. ε = 0 for smooth pipe) for commercial steel.
- Forgetting elevation change when the outlet elevation differs; pass
--elevation-mexplicitly. - Treating the result as the total dP across a system unless you supplied representative minor-loss K values and elevation change.
- Using water properties for a hydrocarbon line.
- Mixing kinematic and dynamic viscosity.
- Reporting head loss in meters of water when the fluid is something else.
- Using the formula in the transitional regime (2300 < Re < 4000) without acknowledging the uncertainty band.
Fallback Strategies
- If
fluidsis missing, the script falls back to Haaland explicitly and flags the substitution in the JSON output. - If the calculated Re is borderline transitional, the script attaches a warning so downstream design margins can be increased.
Verification
- Run the listed script with representative inputs and an
--outputfile when a deterministic calculation is available. - Confirm the JSON result contains
ok: true, expected units, and no unhandled warnings. - Check result magnitudes against the stated assumptions, references, and a hand calculation or known operating range before reporting them.
References
references/limitations.md— full assumption list.- Crane TP-410 (procure separately) for fittings / valve K-factors.
Anti-Patterns
- Designing a pipe with an estimated dP and zero margin.
- Reporting Δp in psi without naming whether it is gauge or absolute (it is a Δ, but the reader still needs to know the basis).
- Using this skill for the long-run flare line where two-phase or compressible effects matter.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

