Question: Please work python program. You will be writing three different Python programs in three different files named hw5a.py, hw5b.py and hw5c.py. You will place your
You will be writing three different Python programs in three different files named hw5a.py, hw5b.py and hw5c.py. You will place your files in a folder named HW5 and then zip the folder and upload it to Canvas. In this assignment, you must use variables, loops, if statements, your own function definitions and function calls. For now, you may not use any of the powerful functions available in python modules, with a few exceptions: You may import functions from the math, copy, matplotlib.plot, numpy and scipy. a) A pipe network problem: Write a program that uses ESOLVE () to find the volumetric flow rate (m/s) of water in each segment of the pipe flow network given below. Use the following properties: vater density = 1000 kg/m water viscosity 0.00089 N-s/m? pipe roughness = 0.00025 m. Your program should print the flow in each segment of pipe, nicely formatted, similar to The flow in segment a-b is -0.0052 m^3/s The flow in segment a-c is 0.0272 m^3/s The flow in segment d-g is -0.0142 m^3/s etc. Notes: 1. Pressure decreases in direction of flow (eg. AP --- = so if flow b-27 2. The head loss around a pipe loop is zero. (e.x.AP.-- + AP-AP-AP-AP = 0) 3. Mass is conserved at each node. Em = 0 4. Pressure loss in a pipe is calculated with the Darcy-Weisbach equation: App 5. Darey friction factor is calculated by the Colebrook equation=-20log El pre ed +2) Rev 60 LA 300 mm 200 mm 200 mm 100 m 200 mm 30 LS 200 mm c d 150 mm B 150 mm 150 mm 100 m 250 mm A 15 La 15 LA You will be writing three different Python programs in three different files named hw5a.py, hw5b.py and hw5c.py. You will place your files in a folder named HW5 and then zip the folder and upload it to Canvas. In this assignment, you must use variables, loops, if statements, your own function definitions and function calls. For now, you may not use any of the powerful functions available in python modules, with a few exceptions: You may import functions from the math, copy, matplotlib.plot, numpy and scipy. a) A pipe network problem: Write a program that uses ESOLVE () to find the volumetric flow rate (m/s) of water in each segment of the pipe flow network given below. Use the following properties: vater density = 1000 kg/m water viscosity 0.00089 N-s/m? pipe roughness = 0.00025 m. Your program should print the flow in each segment of pipe, nicely formatted, similar to The flow in segment a-b is -0.0052 m^3/s The flow in segment a-c is 0.0272 m^3/s The flow in segment d-g is -0.0142 m^3/s etc. Notes: 1. Pressure decreases in direction of flow (eg. AP --- = so if flow b-27 2. The head loss around a pipe loop is zero. (e.x.AP.-- + AP-AP-AP-AP = 0) 3. Mass is conserved at each node. Em = 0 4. Pressure loss in a pipe is calculated with the Darcy-Weisbach equation: App 5. Darey friction factor is calculated by the Colebrook equation=-20log El pre ed +2) Rev 60 LA 300 mm 200 mm 200 mm 100 m 200 mm 30 LS 200 mm c d 150 mm B 150 mm 150 mm 100 m 250 mm A 15 La 15 LA
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
