pipePressureDrop static method

Pressure pipePressureDrop(
  1. double frictionFactor,
  2. Length length,
  3. Length diameter,
  4. Speed velocity,
  5. double density,
)

Calculates the pressure drop in a pipe using the Darcy-Weisbach equation.

Returns the pressure drop as a Pressure quantity. Usage: final dp = EngineeringConstants.pipePressureDrop(frictionFactor, length, diameter, velocity, density);

Implementation

static Pressure pipePressureDrop(
  double frictionFactor,
  Length length,
  Length diameter,
  Speed velocity,
  double density,
) {
  final L = length.inM;
  final D = diameter.inM;
  final v = velocity.inMetersPerSecond;
  final pressureDropPa = frictionFactor * (L / D) * (density * v * v / 2.0); // Δp = f(L/D)(ρv²/2)
  return Pressure(pressureDropPa, PressureUnit.pascal);
}