You are on page 1of 2

# Design of a Proposed Pipeline:

Oil with a density of 900 kilograms per cubic meter and a kinematic viscosity of 0.00001 square meters per
second will be required to flow at a rate of 0.2 cubic meters per second through a 500 meter long, 200
millimeter diameter cast iron pipe. It is anticipated that this pipeline will have a downward slope in the
direction of flow. The actual downward slope is initially unknown, and the relationship of the downward
angle as it relates to the required pumping power is desired. It can be assumed that the internal surface
roughness of the pipe will be 0.00026 meters. A plot of the pumping power, in horsepower, as a function
of the downward sloping angle is required. Is there an angle at which the pumping power becomes zero?
What is this angle? Assume the downward sloping angle can range from 10 to 20.

## clear, clc, clf

rho=900, g=9.807, nu=1e-5, Q=0.2, L=500, d=0.2, A=%pi*d^2/4
e=0.00026, sw=rho*g

function [P]=f1(ang)
ang=-ang
noreport=1
eqs=['Nr=vel*d/nu'
'Q=A*vel'
'HL=f*L*vel^2/2/d/g'
'1/sqrt(f)=-2*log10(e/3.7/d+2.51/Nr/sqrt(f))'
'P=Q*rho*g*HL+vel*sind(ang)*dp*A'
'L*sind(ang)+dp/sw=HL' ]
var=['vel';'f';'dp';'P';'Nr';'HL'];
x0=[6.4,0.02,1e5,2e5,1.2e5,1e2];
sol=solve_it()
for i=1:length(sol)
execstr(var(i)+'='+string(sol(i)));
end
P=uconv(P,'W','hp')
endfunction

eqs=['f1(a1)']
var=['a1'];
x0=[22];
sol=solve_it()
for i=1:length(sol)
execstr(var(i)+'='+string(sol(i)));
end
mprintf('\nThe downward sloping angle that requires\n...
zero power to achieve the desired \nflow rate is %1.2f ...
degrees downward',a1)

figure(0), clf(0)
n=20, ang=linspace(0,23,n)
fplot2d(ang,f1), xgrid
xtitle('Effects of the downward sloping angle',...
'Downward sloping angle - degrees',...
'required pumping power - Horsepower')
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;

The downward sloping angle that requires zero power to achieve the
desired flow rate is 22.4 degrees downward.