Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PROBLEMS 197 er is connected to a pipe with a valve at its de pipe diameter (m).

ID: 2073902 • Letter: P

Question

PROBLEMS 197 er is connected to a pipe with a valve at its de pipe diameter (m). L d in Fig. P6.39. Under a number of simplify- (m).Ly equivalent length for the valve (m), an minor friction losses neglected), the coefficient for the contraction at the 639 A water tower conne equivalent length for the friction d K = loss ing assumptions (e.g., wing energy balance can be written follo of the tank Write a MATLAB script to determine the flow exiting the gh-$s/+9++K valveos. In addin mthe kinematic disc , Q (m%), using the following parameter values: 24 m, L = 65 m. d = 100 m m, Le./d = 30, Leo/d = 8, and K 0.5. In addition, the kinematic viscosity of water is D sity of water isand gravitational acceleration (= 9.81 m/s2), h = where height(m), u = meanwater velocity in pipe (m/s), pe's friction factor, L = horizontal pipe length(m), /. 1.2 x 106 me/s. 6.40 Modify the fzerosi p function (Fig. 610) so that it can be passed any function with a single unknown and uses varargin to pass the function's parameters. Then test the following script to obtain a solution for pipe friction based on Case Study 6.3 clc format long, format compact rho=1.23;mu=1.79e-5:0-0 .005 ;v-40 ; e=0.0015/1000 ; = tower it with Re-rho V D/mu (Re*sqrt(f))): fsfzerosimp(e(x) g(x,e,D),0.008,0.08) FIGURE P6.39 A water tower connected to a pipe with a valve at its end (3

Explanation / Answer

%Determine flow through the valve

%Given parameters
h = 24; %meters
L = 64;
d = 0.1; %meters
K = 0.5; %Loss coefficient
kin_visc = 1.2e-06;
L_ee_D = 30; %Lee/d
L_ev_D = 8; %Lev/d
g = 9.81; %Acceleration due to gravity (m/s^2)

avg_vel = sqrt(2*g*h); %Assigning initial assumption for avg_velocity
vel_temp = avg_vel;

for i=1:50
%Compute flow Re


flow_Re = avg_vel*d/kin_visc;

%Determine friction factor
%Assume smooth pipe
%Equation for Darcy's friction factor for flow in smooth pipe
if (flow_Re < 2300)
f = 64/flow_Re;
else
f = (1.8 * log10(flow_Re/6.9))^(-2); %Prandtl's equation (Ref. Fluid Mechanics by Frank M. White)
end

%Compute new average velocity

avg_vel = sqrt(2*g*h/(f*((L+h)/d + L_ee_D + L_ev_D) + K + 1));

%Compute residual
residual = abs(avg_vel - vel_temp);
vel_temp = avg_vel;
  
if residual < 1e-08 %Break of residual reduces to 1e-08
break
end
  
end

flow_rate = avg_vel * (3.1415 * d^2 / 4);

fprintf(' Flow rate = %6.5f m^3/s ',flow_rate);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote