Presentation is loading. Please wait.

Presentation is loading. Please wait.

CE 498/698 and ERS 485 (Spring 2004) Lecture 71 Lecture 7: Computer Methods for Well-Mixed Reactors CE 498/698 and ERS 685 Principles of Water Quality.

Similar presentations


Presentation on theme: "CE 498/698 and ERS 485 (Spring 2004) Lecture 71 Lecture 7: Computer Methods for Well-Mixed Reactors CE 498/698 and ERS 685 Principles of Water Quality."— Presentation transcript:

1 CE 498/698 and ERS 485 (Spring 2004) Lecture 71 Lecture 7: Computer Methods for Well-Mixed Reactors CE 498/698 and ERS 685 Principles of Water Quality Modeling

2 CE 498/698 and ERS 485 (Spring 2004) Lecture 72 Modeling Tradeoff

3 CE 498/698 and ERS 485 (Spring 2004) Lecture 73 Simplifying Assumptions Idealized loading curves Q, k, V are constant First-order reactions What if these don’t apply???? Computers and numerical methods

4 CE 498/698 and ERS 485 (Spring 2004) Lecture 74 Completely Mixed Lake Model where

5 CE 498/698 and ERS 485 (Spring 2004) Lecture 75 Euler’s Method Ch. 25 in Chapra and Canale c t h forward difference: + titi cici conc. at present t i + t i+1 c i+1 conc. at future t i+1

6 CE 498/698 and ERS 485 (Spring 2004) Lecture 76 Euler’s Method Ch. 19 in Chapra and Canale fwd difference: or where

7 CE 498/698 and ERS 485 (Spring 2004) Lecture 77 Example 7.1 Given: Q = 10000 m 3 yr -1 V = 10 6 m 3 Z = 5 m k = 0.2 yr -1 v = 0.25 m yr -1 c 0 = 15 mg L -1 At t = 0, step loading = 50  10 6 g yr -1 Simulate concentration from t = 0 to 20 yr using timestep of 1 year

8 CE 498/698 and ERS 485 (Spring 2004) Lecture 78 Example 7.1 At t i = 0, c i = 15 mg L -1 and W(t i ) = 50  10 6 g yr -1 c i for next computation

9 CE 498/698 and ERS 485 (Spring 2004) Lecture 79 Two equations: Euler’s Method

10 CE 498/698 and ERS 485 (Spring 2004) Lecture 710 Heun’s method Ch. 25 in Chapra and Canale c t + titi cici + t i+1 c i+1 slope 1 (predictor)

11 CE 498/698 and ERS 485 (Spring 2004) Lecture 711 Heun’s method c t + titi cici + t i+1 c i+1 slope 2 c 0 i+1

12 CE 498/698 and ERS 485 (Spring 2004) Lecture 712 Heun’s method c t + titi cici + t i+1 c i+1 c 0 i+1

13 CE 498/698 and ERS 485 (Spring 2004) Lecture 713 Example without iteration From previous calcs: h At t i = 0, c i = 15 mg L -1 and W(t i ) = 50  10 6 g yr -1

14 CE 498/698 and ERS 485 (Spring 2004) Lecture 714 4 th -order Runge-Kutta general form of RK methods: slope estimate Euler: Heun: 4 th -order RK:

15 CE 498/698 and ERS 485 (Spring 2004) Lecture 715 4 th -order Runge-Kutta where

16 CE 498/698 and ERS 485 (Spring 2004) Lecture 716 Spreadsheet Applications Example: Euler’s method for Example 7.1 Q =10000m 3 yr -3 V =1000000m3m3 Z =5m v =0.25m yr -1 k =0.2yr -1 h =yr(timestep) =

17 CE 498/698 and ERS 485 (Spring 2004) Lecture 717 Spreadsheet Applications Example: Euler’s method for Example 7.1 Q =10000m 3 yr -3 V =1000000m3m3 H =5m v =0.25m yr -1 k =0.2yr -1 h =yr(timestep) =

18 CE 498/698 and ERS 485 (Spring 2004) Lecture 718 Spreadsheet Applications Example: Euler’s method for Example 7.1 Q =10000m 3 yr -3 V =1000000m3m3 Z =5m v =0.25m yr -1 k =0.2yr -1 h =yr(timestep) = titi W(t i )cici Slope (dc/dt)c i+1 0W(t 0 )Initial conc. 1W(t 1 )

19 CE 498/698 and ERS 485 (Spring 2004) Lecture 719 Spreadsheet Applications Example: Euler’s method for Example 7.1 Q =10000m 3 yr -3 V =1000000m3m3 Z =5m v =0.25m yr -1 k =0.2yr -1 h =yr(timestep) = titi W(t i )cici Slope (dc/dt)c i+1 0W(t 0 )Initial conc.=c i +slope*h 1W(t 1 )

20 CE 498/698 and ERS 485 (Spring 2004) Lecture 720 Spreadsheet Applications Example: Euler’s method for Example 7.1 Q =10000m 3 yr -3 V =1000000m3m3 Z =5m v =0.25m yr -1 k =0.2yr -1 h =yr(timestep) = titi W(t i )cici Slope (dc/dt)c i+1 0W(t 0 )Initial conc.=c i +slope*h 1W(t 1 )=c i+1

21 CE 498/698 and ERS 485 (Spring 2004) Lecture 721 Spreadsheet Applications Heun’s method titi W(t i )cici Slope 1 (s1) c 0 i+1 Slope 2 (s2) c i+1 0W(t 0 )Initial conc.=c i +s1*h=c i +0.5(s1+s2)*h 1W(t 1 )=c i+1

22 CE 498/698 and ERS 485 (Spring 2004) Lecture 722 Spreadsheet Applications Heun’s method titi W(t i )cici Slope 1 (s1) c 0 i+1 Slope 2 (s2) c i+1 0W(t 0 )Initial conc.=c i +s1*h=c i +0.5(s1+s2)*h 1W(t 1 )=c i+1

23 CE 498/698 and ERS 485 (Spring 2004) Lecture 723 Spreadsheet Applications Heun’s method titi W(t i )cici Slope 1 (s1) c 0 i+1 Slope 2 (s2) c i+1 0W(t 0 )Initial conc.=c i +s1*h=c i +0.5(s1+s2)*h 1W(t 1 )=c i+1

24 CE 498/698 and ERS 485 (Spring 2004) Lecture 724 Major Homework #1 Parameters from Example 5.3 Eigenvalues Calculations

25 CE 498/698 and ERS 485 (Spring 2004) Lecture 725 Major Homework #1 Parameters from Example 5.3 12345 Depth Area Volume Outflow Loading Settling Reaction rate Timestep, h One value for all 5 lakes

26 CE 498/698 and ERS 485 (Spring 2004) Lecture 726 Major Homework #1 Eigenvalues 11 yr -1 22 yr -1

27 CE 498/698 and ERS 485 (Spring 2004) Lecture 727 Major Homework #1 YearTimec i,1 c i,2 c i,3 c i,4 c i,5 k 1,1 k 2,1 k 3,1 k 4,1 c i+1,1 k 1,2 k 2,2 19630 =prev+h given


Download ppt "CE 498/698 and ERS 485 (Spring 2004) Lecture 71 Lecture 7: Computer Methods for Well-Mixed Reactors CE 498/698 and ERS 685 Principles of Water Quality."

Similar presentations


Ads by Google