Professional Documents
Culture Documents
disp('*****************************************************************************
******************************');
f = input('frictional factor : ' );
L = input('lenth of the pipe in m : ');
d = input('dia of the pipe in m : ');
H = input('height in m : ');
g = input('acceleration due to gravity in m/s^2 : ');
p = input('give the value of power in mph : ');
w = 1000;
A=(3.14*d^2)/4;
disp('*****************************************************************************
******************************');
syms Q
t=(w*Q*(H-f*L*(Q/A)^2/(2*g*d))/75);
solQ=solve(p==t,Q);
fprintf('required discharge is = %0.4f',solQ,'m^3/s');
fprintf('*****************************************');
fprintf('\n');
%k=input('interest to continue ( 1 for continue & 0 for exit)');
end
H=pressure_head/eff;
hf=H-pressure_head;
V=((2*g*D*hf)/(f*L))^0.5;
Q=(pi*D^2)/4*V;
n=P*1000/(w*Q*(H-hf));
N=round(n,0); %Number of pipes required
disp(['Number of pipes is = ',num2str(N)]);
end