//Example 8-2 Pressure Drop and Head Loss in a Pipe clc; //Properties of water at 40F rho=1000 //density [kg/m^3] mu=1.519 * 10^-3 //dynamic viscosity [kg/m.s] g=9.81 //acceleration due to gravity [m/s^2] D=0.3 //diameter of pipe [cm] L=9 //length of pipe [m] V_avg=0.9 //average velocity [m/s]