(Solved):
As shown in the figure below, the velocity of water v(m/s ...
As shown in the figure below, the velocity of water v(m/s), discharged from a cylindrical tank through a long pipe can be computed as: v=2gH?tanh(2L2gH??t) Eq. 1.1 where g=9.81m/s2,H= initial head (m),L= pipe length (m), and t= elapsed time (s).
And water flow rate through a pipe can be calculated with: Q=tV?=tAd?=Av? Eq. 1.2 where Q is flowrate in m3/s,A is the pipe coss-sectional area in m2 and v is the water velocity in m/s.
(a) plot the velocity function from Eq.1.1 for H=0m to 4m (in increments of 1m ), over time t=0 to 2.5 s and arbitrarily assigned pipe length L between 2.0m and 4.0m. Make sure to label to plot. For example:
(b) plot the water acoeleration a based on the velocity function of Eq.1.1 for H=0m to 4m (in hwrements of im) and over time t=0 to 2.5 s (keep using the same L as before). Make sure to labed to phot For example:
(c) using modular programming create a uniform flow rate branching water network simulation (segment A is directly fed with the water tank) for each H=0m to 4m ) by generating a branching water network with the following parameters: - one 50mm feeder pipe (A) - two 32mm primary distribution pipes (B) - four to eight (choose one even amount) 20mm secondary distribution pipes (C) - fourty to eighty (choose one even tens amount) 10mm end-point pipes (D)
Uniform branched water network architecture Using modular programming create functions for: (i) pipe_velocity(): calculating the water velocity v(m/s) of a given pipe diameter d(mm) and water flow rate Q(m3/s). Refer to Eq. 1.2 . (ii) pipe_flow_rate(): calculating the water flow rate Q(m3/s) of a given pipe diameter d(mm) and water velocity v(m/s). Refer to Eq. 1.2 . (iii) pipe_diameter(): calculating the pipe diameter d(mm) of a given water velocity v(m/s) and flow rate Q(m3/s). Refer to Eq. 1.2 . (iv) pipe_volume(): calculating the pipe water volume per meter (litres/m) for a given pipe
Uniform branched water network architecture Using modular programming create functions for: (i) pipe_velocity(): calculating the water velocity v(m/s) of a given pipe diameter d(mm) and water flow rate Q(m3/s). Refer to Eq. 1.2. (ii) pipe_flow_rate(): calculating the water flow rate Q(m3/s) of a given pipe diameter d(mm) and water velocity v(m/s). Refer to Eq.1.2. (iii) pipe_diameter(): calculating the pipe diameter d(mm) of a given water velocity v(m/s) and flow rate Q(m3/s). Refer to Eq. 1.2 . (iv) pipe_volume(): calculating the pipe water volume per meter (litres/m) for a given pipe diameter (mm). (v) vel_change(): calculating the outlet water velocity v??o(m/s) of a given outlet pipe diameter d_o (mm) that is fed from a given inlet pipe diameter d??i(mm) with a given water velocity v??i(m/s). Assume that the inlet water flow rate and the outlet water flow rate are equal.
Every pipe segment (A/B/C/D) must be represented with a data structure that stores the following information (use your functions to calculate the relevant info where possible): - pipe diarneter (mm). - water velocities (for each height of H=0m to 4m ) in the pipe (m/s). - water flow rates (for each height of H=0m to 4m ) in the pipe (m3/s). - water volume in pipe per meter (litres/m). - amount of these segments in the total branching water network. For example:
(d) plot the water velocity in each pipe segment for H=0m to 4m (in increments of 1m ) and over pipe diameters 10mm,20mm,32mm and 50mm. Make sure to label the plot. For example:
(e) discuss the results you obtained in your own words (one to two paragraphs)
Here are the functions for the given problem:(i) `pipe_velocity(diameter, flow_rate)`:This function calculates the water velocity in a given pipe diameter with a known water flow rate using the following equation:```v = (4 * flow_rate) / (math.pi * diameter**2)```where `v` is the water velocity, `flow_rate` is the water flow rate in m^3/s and `diameter` is the pipe diameter in mm.```import mathdef pipe_velocity(diameter, flow_rate): v = (4 * flow_rate) / (math.pi * diameter**2) return v```(ii) `pipe_flow_rate(diameter, velocity)`:This function calculates the water flow rate in a given pipe diameter with a known water velocity using the following equation: