Pipe sizing balances (larger pipe = more expensive) against operating cost (smaller pipe = higher pumping cost).
Note: For $f$, the Moody Chart or Colebrook-White equation is used, accounting for pipe roughness ($\epsilon$). Pipe sizing balances (larger pipe = more expensive)
Mastering transforms you from someone who can draw a line on a P&ID to an engineer who can specify exactly what that line should be made of and how big it must be. The interplay between friction losses (hydraulics) and wall strength (pressure rating) is at the heart of every safe, economical piping system. Pipe sizing balances (larger pipe = more expensive)
$$ h_f = \fracf L v^22 g D $$