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

Create a matlab program that does the following: Prompt to create the following

ID: 2995661 • Letter: C

Question

Create a matlab program that does the following:

Prompt to create the following variable for the user:

i.Radius of bends

i.Deflection angle

Requirements

Comment on each portion of the function to clearly state what it does. Ask further information under chegg comment if necessary. Thank you. Send file to chibitaruo@yahoo.com and answer on chegg. I'll reward the points accordingly depending on how accurate the answer is.

Also you can use the following example to check data:

Length = 2000 ft.

Diameter = 6 in.

Flow rate = 10 cfs.

Pressure Drop = 1553 psi

Fluid = water

Temperature = 150 F

Elevation Change = 60 ft.

Pipe Material = Galvanized Iron

Number of 90 degree smooth bends, flanged = 2
Radius of 90 degree bends = 60 in.

Number of miter bends = 3

Deflection angle of miter bends = 30 degrees

Number of fully open globe valves = 1

Number of fully open gate valves = 1

Explanation / Answer

function[P Hp]=pressuredrop()
g=32.2 %gravity
d=input(prompt('what is the diameter of pipe in inches '));
L=input(prompt('what is the length of pipe in ft '));
Q=input(prompt('what is the flow in pipe in cfs '));
T=input(prompt('what is the temperature of pipe in F '));
z=input(prompt('what is the elevation rise in ft '));
mat_typ=input(prompt('what is the type of material in 1= galvanised_steel'));
bend_nbr=input(prompt('what is the number of 90 degree bends '));
bend_mitre=input(prompt('what is the nimber of mitre bends '));
bend_rad=input(prompt('what is the radius of mitre bends in ft '));
bend_ang=input(prompt('what is deflection angle of bends in degrees '));
valve_gl=input(prompt('what is the number of fully opened globe valves '));
valve_gt=input(prompt('what is the number of fully opened gate valves '));
V=Q/(pi*d^2/4)*12^2; %velocity
if mat_typ==1
k=5*10^-4*12; %surface roughness
e=k/d;
end
T1=(T-32)*5/9; %temp C
mu=2.414*10^-5*10^(247.8/(T1-140);
rho=62.4; %density
Re=1000*v*3048*d/12*0.3048/mu;
if Re<=4000;
f=64/Re;
else Re>4000
syms x
f=solve(1/x^(0.5)+2*log10(e/3.7+2.51/Re/x^(0.5)== 0,'x',)
f=0.01955;
end
k1=0.14 %from table
k2=0.1 % from table
net_head_loss=f*l*v^2/2/g/d*12+valve_gt*v^2/2/g*0.15+10*valve_gl*v^2/2/g+k1*v^2/2/g*bend_nbr+k2*v^2/2/g*bend_mitre;
P=net_head_loss;
disp('pressure_drop in ft of water')
disp(P)
%assume efficincy of pump=100%
Hp=rho*g*P
disp(Hp)
end

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