Question: Use PYTHON please 6.(25 pts) A pipe-flow fluids problem: Oil with a density (p=950 kg/m) and kinematic viscosity (v=2x10-5m/s) flows through a 30-cm-diameter (d=0.3m) pipe

Use PYTHON please Use PYTHON please 6.(25 pts) A pipe-flow fluids problem: Oil with

6.(25 pts) A pipe-flow fluids problem: Oil with a density (p=950 kg/m) and kinematic viscosity (v=2x10-5m/s) flows through a 30-cm-diameter (d=0.3m) pipe that is 100 m long with a head loss of hf = 8 m. The roughness ratio of the pipe is (/d=0.0002) and we can assume the flow is turbulent. Find the average velocity (V) and flow rate (Q=V-A) for the oil. g=9.81 m/s2 LV2 h;=f52g We can calculate the head loss using the Darcy friction factor as: &ld 2.51 where, the friction factor is given by: 3.7 Re, f12 2.0 Olog V iven by. Re, Vid where, a. Write a function def Reynolds (V, nu,d): to calculate Reynolds number b. Write a function def FrictionFactor (relrough, Re): to calculate the friction factor c. Write a function def Avgvel (nu, dia, length): to calculate the average velocity of the oil d. Write a function def main(): to call Avgvel with the appropriate parameters and print to the screen the average oil velocity and volumetric flow rate (with units). e. Finally, in your main function, determine the diameter of pipe necessary for a head loss of only 6m in a 100m long pipe, keeping viscosity and flow rate constant. Notes: The velocity Vis unknown in parts a., b., and c as are the friction factor and Reynolds numbers. You will likely need to use your secant method to iteratively find the solution. According to the Moody diagram for friction factors, 0.008

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!