Sum the friction terms for each element from which the friction results, including pipe lengths, elbows, flanges, fitting, valves, etc to get a total friction value K-total.
When input to the Bernoulli equation the friction loss will be:
ef=0.5*Ktotal*V^2
where ef is the energy lost to friction
Ktotal is sum of all the loss coefficients
V= velocity of fluid
The friction loss coefficient for a length of pipe is:
Kpipe= 16*f*L/D
where
Kpipe= pipe loss coefficient
L= length of pipe
D= diameter of pipe
f=the Darcy friction factor (not to be confused with the similar Fanning friction factor)
For turbulent flow the Darcy friction factor can be obtained from a Moody diagram (very simple) or via the Colebrook or Churchill equations (complex). For laminar flow:
f= 64/Re
where Re is the Reynold's number, an indication of turbulence.
Turbulent flow occurs at Reynolds numbers greater than about 2000.
Be wary of whether the f listed is the Fanning or Darcy friction factor: mechanical engineers use Darcy, chemical engineers typically use Fanning.
The Hooper 2K method can be used to calculate pipe loss coefficients.
See related links for a calculation form.