You are on page 1of 3

Effects of the Internal Surface Roughness of a Pipe:

Determine the effects of the internal surface roughness of a 200 foot horizontal asphalted cast iron pipe
carrying water with a mean velocity of 6.0 feet per second. Specifically, determine the effects of the
roughness on the loss of head and the pressure drop in the pipe (psf). Assume the surface roughness could
vary between 0.0002 feet and 0.0006 feet. The results of this analysis will be useful in determining the
specific grade of pipe that will be deployed. Generate plots showing the pressure drop and head loss as a
function of the internal surface roughness of the pipe.

clear, clc, clf


L=200, d=6/12, A=%pi*d^2/4, vel=6, sw=62.4, g=32.2
rho=sw/g, nu=1.05e-5,

function [out]=f1(e, z)
e=e/1e4
noreport=1
eqs=[
'Q=%pi*d^2/4*vel'
'Nr=vel*d/nu'
'xp/L=f*rho*vel^2/2/d'
'1/sqrt(f)=-2*log10(e/3.7/d+2.51/Nr/sqrt(f))'
'HL=f*L*vel^2/2/d/g' ]
var=['xp';'f';'Q';'Nr';'HL'];
x0=[270,0.02,1,1e5,1];
sol=solve_it()
for i=1:length(sol)
execstr(var(i)+'='+string(sol(i)));
end
out=[HL,xp]
out=out(z)
Endfunction

n=20, e=linspace(2,6,n)
deff('HL=f2(e)','HL=f1(e,1)')
figure(0), clf(0)
fplot2d(e,f2), xgrid
xtitle('Effects of the internal surface roughness of cast iron pipe',...
'Surface roughness - feet x 10,000',...
'Head loss - feet')
u2=get('current_axes'); u2.font_size=4;
u3=u2.title; u3.font_size=5;
u3=u2.x_label; u3.font_size=4;
u3=u2.y_label; u3.font_size=4;

deff('xp=f3(e)','xp=f1(e,2)')
figure(1), clf(1)
fplot2d(e,f3), xgrid
xtitle('Effects of the internal surface roughness of cast iron pipe',...
'Surface roughness - feet x 10,000',...
'Pressure drop - psf')
u2=get('current_axes'); u2.font_size=4;
u3=u2.title; u3.font_size=5;
u3=u2.x_label; u3.font_size=4;
u3=u2.y_label; u3.font_size=4;