300 likes | 483 Views
Lecture 7: Computer Methods for Well-Mixed Reactors. CE 498/698 and ERS 685 Principles of Water Quality Modeling. Modeling Tradeoff. Simplifying Assumptions. Idealized loading curves Q , k , V are constant First-order reactions. What if these don’t apply????.
E N D
Lecture 7: Computer Methods for Well-Mixed Reactors CE 498/698 and ERS 685 Principles of Water Quality Modeling Lecture 7
Modeling Tradeoff Lecture 7
Simplifying Assumptions • Idealized loading curves • Q, k, V are constant • First-order reactions What if these don’t apply???? Computers and numerical methods Lecture 7
where Completely Mixed Lake Model Lecture 7
conc. at future ti+1 ci+1 + ci + conc. at present ti h ti ti+1 forward difference: Euler’s Method Ch. 25 in Chapra and Canale c t Lecture 7
or or where Euler’s Method Ch. 19 in Chapra and Canale fwd difference: Lecture 7
Example 7.1 Given: Q = 10000 m3 yr-1V = 106 m3 Z = 5 m k = 0.2 yr-1 v = 0.25 m yr-1c0 = 15 mg L-1 At t = 0, step loading = 50106 g yr-1 Simulate concentration from t = 0 to 20 yr using timestep of 1 year Lecture 7
Example 7.1 At ti = 0, ci = 15 mg L-1 and W(ti) = 50106 g yr-1 cifor next computation Lecture 7
Euler’s Method Two equations: Lecture 7
ci+1 + ci + ti ti+1 slope 1 (predictor) Heun’s method Ch. 25 in Chapra and Canale c t Lecture 7
c0i+1 ci+1 + ci + slope 2 ti ti+1 Heun’s method c t Lecture 7
c0i+1 ci+1 + ci + ti ti+1 Heun’s method c t Lecture 7
From previous calcs: At ti = 0, ci = 15 mg L-1 and W(ti) = 50106 g yr-1 h Example without iteration Lecture 7
general form of RK methods: slope estimate Euler: Heun: 4th-order RK: 4th-order Runge-Kutta Lecture 7
4th-order Runge-Kutta where Lecture 7
Spreadsheet Applications Example: Euler’s method for Example 7.1 Lecture 7
Spreadsheet Applications Example: Euler’s method for Example 7.1 Lecture 7
Spreadsheet Applications Example: Euler’s method for Example 7.1 Lecture 7
Spreadsheet Applications Example: Euler’s method for Example 7.1 Lecture 7
Spreadsheet Applications Example: Euler’s method for Example 7.1 Lecture 7
Spreadsheet Applications Heun’s method Lecture 7
Spreadsheet Applications Heun’s method Lecture 7
Spreadsheet Applications Heun’s method Lecture 7
Major Homework #1 Lecture 7
Major Homework #1 One value for all 5 lakes Lecture 7
Major Homework #1 Lecture 7
Major Homework #1 given Lecture 7