Gio Papio Lab 3- Flood Routing Problem Dr. Lichtensteiger FABE 3150- System Dynamics and Electricity 2/9/2017
Simulink Block Diagram:
Figure 1: Simulink Block Diagram- Created using equations 1-5 of attached guide. MATLAB Code: clc clear disp('Gio Papio') disp('FABE 3150') disp('Lab 3') disp('2/9/2017') b=9; c=3; L=115; A=4.91; %for 30 inch pipe AoverK=23.85; %for 30 inch pipe d=6.5; g=32.2; time=[0 0.3 0.5 0.7 0.87 1 1.3 1.4 1.5 5.7 7 10]; in=[0 23 46 80 120 144 180 188 190 186 0]; Time=[0 .25 .5 .75 1 1.5 2 2.5 3 3.5 4 h=[0 .44 1.2 1.5 1.8 2.3 2.8 3.1 3.8 4 6.2]; sim('SimulinkFloodProblem')
1.7 2 2.2 2.4 2.6 2.8 3 3.3 3.6 4 4.7 160 140 120 98 80 66 51 40 28 16 6 1 4.5 5 5.5 6 6.5 7 8 9 10]; 4.2 4.3 4.5 4.9 5.1 5.2 5.4 5.6 5.9
figure (1) plot(time,in) xlabel('Time (hrs)') ylabel('Inflow Rate (ft^3/sec)') title('Inflow Hydrograph') figure(2) plot(Time,h) axis([0 10 0 10]) xlabel('Storage (in hundreds of thousand ft^3)') ylabel('Elevation above Spillway Crest (ft)') title('Storage Capacity of Reservoir') figure(3) hold on plot(time,in) [AX,H1,H2]=plotyy(t,output,t,storage); axes(AX(1));ylabel('Inflow Rate and Outflow(ft^3/sec)'); axis([0 10 0 200]);set(gca,'YTick',([0:20:200])),legend('Inflow','Outflow') axes(AX(2));ylabel('Reservoir Stage (ft)');axis([0 10 0 10]);set(gca,'YTick', ([0:1:10])),legend('Reservoir Stage') xlabel('Time (hrs)') title('Effect of Flowrate on Inflow, Resevoir Stage and Discharge') hold off figure(4) for d=[5.0 6.5 8] AoverK=22.36; sim('SimulinkFloodProblem') plot(t,input,t,output); hold on end for AoverK=[13.17 34.16]; d=6.5; sim('SimulinkFloodProblem') plot(t,input, t, output); end hold off xlabel('Time (hrs)') axis([0 10 0 200]) ylabel('Flowrate (ft^3/sec)') title('Effect of Pipe Size and Depth on System Performance') %% figure(5) hold on for AoK=[13.17 34.16] d=6.5; sim('SimulinkFloodProblem') plot(t,storage) end for d=[5.0 6.5 8] AoK=22.36; sim('SimulinkFloodProblem') plot(t,storage) end
for d=6.5 AoK=[13.17 34.16] sim('SimulinkFloodProblem') plot(t,storage) end hold off xlabel('Time (hrs)') axis([0 10 0 10]) ylabel('Reservoir Stage (ft)') title('Effect of Pipe Diameter and Discharge Height on the Reservoir Stage')
Integration Method and Time Interval: For my simulation, ode1 (Euler) method was used. The simulation time went from 0-10 seconds with a fixed-step size of 0.0001. Graphs 1 and 2:
Figure 2: This graph displays inflow vs. time through a reservoir
Figure 3: This graph shows storage capacity vs. spillway crest Table of Gains: Case 7b-1
Constant Block Constant (d)
7b-2
Gain2 (AoverK)
Variable Block Notes Gain (AoverK) Block differs from 24 inches, 30 inches, and 36 inches Constant(d) Varies between 5, 6.5 and 8 foot depths
Graphs (continued)
Inflow Hydrograph, i(t) (ft3 / sec
Reservoir Stage, h (ft)
Discharge q (ft3/ sec)
Figure 4: This graph displays the effects of inflow on a reservoir
Inflow Hydrograph, i(t) (ft3 / sec
d=6.5 ft (36” pipe) d=8 ft (30” pipe) d=6.5 ft (30” pipe) d=6.5 ft (30” pipe) d=6.5 ft (24” pipe)
Figure 5: This graph shows different performances based on pipe size
Figure 6: Though missing 2 parts this graph compares
Discussion of Results: Graph 1 displays the relationship between the inflow rate for the reservoir system in regards to time. Near hour 2, there is a heavy inflow rate, but it decreases rapidly shortly after. Graph 2 indicates the relationship of storage capacity and the elevation above the spillway crest. As storage capacity increases, so does the spillway crest elevation. Graph 3 shows inflow, reservoir stage, and discharge. Regarding inflow, the graph showed an instant spike, which decreased rapidly after only 2 hours. The reservoir stage showed a less drastic climb, taking about 3 hours to reach its maximum flow rate. It also had a slower decrease in flow. The discharge showed a pattern similar to the inflow regarding its rapid increase. However, it plateaued around a flow rate of 70 ft^3/sec, and stayed there for nearly 5 hours, then it rapidly decreased.
Graph 4 demonstrates the relationship between pipe size and flow rate. As pipe size increases, the flow rate shows a similar trend, as expected. However, with smaller flow rates, there is a more controlled flow, allowing flow to continue at a steady rate for a much longer period of time. As shown with the graph, the 24 inch pipe with a 6.5 foot diameter has the most steady, constant flow. Graph 5, though missing two of the functions, shows a similar pattern to Graph 4. With d=5 for a 30 inch pipe, a larger storage time was demonstrated. With d=8ft for a 30 inch pipe, it had a slightly lower storage time. For d=6.5 in a 24 inch pipe, there would be the largest storage time. Time Base Change: As given, the rates were in ft^3/second. However, when finding results, they were to be in cubic feet per hour, which required conversion. Also, the sheer size of the storage allowed for an additional conversion as follows: ft 3 ∗3600 s s ∗105 ft 3 h 0.036∗105 ft 3 = hour 105 ft 3 Equation 1 Assumptions: 1) Water velocity is negligible 2) Surface is horizontal 3) Spillway outlet is 6.5 ft below spillway crest and not submerged Equation 4 Assumptions and Advantages 1) q increases rapidly with h before it reaches the channel downstream 2) Little water is backed up into the reservoir These assumptions have many advantages for the flood routing system. First, this saves storage capacity. With saved storage capacity, this ensures that water will not overflow during periods of heavy runoff while also making sure the reservoir never runs out of water.