Answered step by step
Verified Expert Solution
Question
1 Approved Answer
HW1P2 (Write a script file for solving a problem) (12 points) To determine the frictional head loss in pipes h can be determined from the
HW1P2 (Write a script file for solving a problem) (12 points) To determine the frictional head loss in pipes h can be determined from the equation, L V2 D 2g Where Vis the mean flow velocity in m/s, L is the pipe length in m, D is the pipe diameter in m and g is the acceleration of gravity in m/s2.f is the friction coefficient and can be determined from any of the following explicit empirical formulas, 6.9 18log(D 111 Haaland 1983 = {-2log|37065-5045210g((23 3.7065 logCe/Dy 109 2.8257 Re0.8981 Chen (1979) /D 3.7 5.02. Re ( D 5.02 , Re (c/D.13 3.7 Re Zigrang,Sylvester (1982) 5.33260.9345n-2 +21 g|37065-5R721 g(3.827-4567 log(3.D,-24 +(205.32 + Re,-45))) c/D 5.0272, (c/D 3.7065 Re log 456 208.82 Re Romeo, Royo, Monzan (2002) VD where log is logio, Re is the dimensionless Reynolds number Re =-, e is the pipe roughness in m, and v is the kinematic viscosity in m2/s. Write a program in a script file HW1P2.m to determine the frictional head loss h in m for the following data, V-2.065 m/s, L 26.667 m, D 0.15 m, g 9.81 m/s, -0.00036 m, and v- 1.02x10-6 m2/s. Units are given only to verify the dimensional homogeneity of the equation. The program must do the following in sequence 1. Create MATLAB variables for V, L , D, g,e , and v and assign them the values given above. Do 2. Create a MATLAB variable for Re, assign it a value from the expression given above, and display 3. Create MATLAB variables for fi, fa fs and fa, assign them values from the formulas given above 4. Create 4 different MATLAB variables for hi (hli. hi2, hisand hua), one for each value of f not display these values in the command window it in the command window and display them in the command window determined in part 3, assign them values from the expression given above and display them in the command window Use the MATLAB comment character on the first several lines of your program to describe the problem you are solving. Use format long for this
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started