# Pipe Flow Pressure Drop

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-jskherman-engg-skills-pipe-flow-pressure-drop`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [jskherman](https://agentstack.voostack.com/s/jskherman)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [jskherman](https://github.com/jskherman)
- **Source:** https://github.com/jskherman/engg-skills/tree/main/skills/pipe-flow-pressure-drop

## Install

```sh
agentstack add skill-jskherman-engg-skills-pipe-flow-pressure-drop
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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

1. `uv` available.

## 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

1. Get fluid density and viscosity at the operating temperature.
2. Pick the pipe inside diameter (after accounting for wall thickness and
   schedule).
3. Pick the pipe absolute roughness (commercial steel ~ 45 μm, drawn
   tubing ~ 1.5 μm, PE ~ 0.0015 mm).
4. Run the script. The output reports Re; check that the flow is in the
   regime you expect.
5. Add fitting / valve K-factor losses separately if needed.
6. 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-m` explicitly.
- 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 `fluids` is 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 `--output` file 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.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [jskherman](https://github.com/jskherman)
- **Source:** [jskherman/engg-skills](https://github.com/jskherman/engg-skills)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-jskherman-engg-skills-pipe-flow-pressure-drop
- Seller: https://agentstack.voostack.com/s/jskherman
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
