Catalog/eng-darcy-weisbach

Engineering

Pipe pressure drop (Darcy-Weisbach + Colebrook) API

Computes pipe-friction head loss hf = f·(L/D)·v²/(2g) with the friction factor solved implicitly from the Colebrook-White equation (turbulent, iterated) or 64/Re (laminar), returning Reynolds number, flow regime, friction factor, head loss, and pressure drop. Answers 'What is the pressure drop in a pipe?', 'What is the Darcy friction factor?'.

Price$0.08per request
MethodPOST
Route/v1/engineering/darcy-weisbach
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
engineeringthermofluidsfluidsdarcy-weisbachcolebrookfriction-factorpressure-droppipe-flowreynolds
API URLhttps://x402.hexl.dev/v1/engineering/darcy-weisbach
Integration docs
Example request
{
  "flowVelocityMs": 2,
  "diameterM": 0.1,
  "lengthM": 50,
  "roughnessM": 0.00015,
  "kinematicViscosityM2s": 0.000001,
  "densityKgM3": 998
}
Example response
{
  "flowVelocityMs": 2,
  "diameterM": 0.1,
  "lengthM": 50,
  "roughnessM": 0.00015,
  "reynoldsNumber": 200000,
  "regime": "turbulent",
  "relativeRoughness": 0.0015,
  "frictionFactor": 0.02280287,
  "headLossM": 2.325246,
  "pressureDropPa": 22757.2647,
  "pressureDropKPa": 22.757265,
  "formula": "hf = f*(L/D)*v²/(2g); f from Colebrook (turbulent) or 64/Re (laminar)",
  "interpretation": "Friction factor is solved implicitly from Colebrook-White, then head loss and ΔP follow."
}
Input schema
{
  "type": "object",
  "required": [
    "flowVelocityMs",
    "diameterM",
    "lengthM",
    "kinematicViscosityM2s"
  ],
  "properties": {
    "flowVelocityMs": {
      "type": "number",
      "description": "mean flow velocity (m/s)",
      "examples": [
        2
      ]
    },
    "diameterM": {
      "type": "number",
      "description": "pipe inner diameter (m)"
    },
    "lengthM": {
      "type": "number",
      "description": "pipe length (m)"
    },
    "roughnessM": {
      "type": "number",
      "description": "absolute roughness ε (m); default 0 (smooth)"
    },
    "kinematicViscosityM2s": {
      "type": "number",
      "description": "kinematic viscosity ν (m^2/s)",
      "examples": [
        0.000001
      ]
    },
    "densityKgM3": {
      "type": "number",
      "description": "density (kg/m^3) for pressure drop; default 998"
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}