Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can expert help me to write (python code) in the following question. if you think this is too long in one question, I can divide

image text in transcribed

Can expert help me to write (python code) in the following question. if you think this is too long in one question, I can divide in to 4 questions. Just let me know thank you for your help sir. Oil with a density (p=950 kg/m3) and kinematic viscosity (v=2x10-5m2/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 d 2g .LV hy = f We can calculate the head loss using the Darcy friction factor as: 1 Eld 2.51 = -2.0 log + where, the friction factor is given by: 3.7 Reg fl2 Vid where, Rea = V 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 cas 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

=+14. We are doing better in both overall sales and in profits.

Answered: 1 week ago