Presentation is loading. Please wait.

Presentation is loading. Please wait.

CE5504 – Surface Water Quality Modeling CE5504 Surface Water Quality Modeling Lab 2. Numerical Methods and Population Growth Modeling.

Similar presentations


Presentation on theme: "CE5504 – Surface Water Quality Modeling CE5504 Surface Water Quality Modeling Lab 2. Numerical Methods and Population Growth Modeling."— Presentation transcript:

1 CE5504 – Surface Water Quality Modeling CE5504 Surface Water Quality Modeling Lab 2. Numerical Methods and Population Growth Modeling

2 Begin with a mass balance on microbial growth CE5504 – Surface Water Quality Modeling

3 (Mihelcic 1999, Figure 5.4) Exponential growth model CE5504 – Surface Water Quality Modeling

4 Environmental Resistance CE5504 – Surface Water Quality Modeling (Mihelcic 1999, Figure 5.5)

5 Logistic growth model CE5504 – Surface Water Quality Modeling (Mihelcic 1999, Figure 5.7)

6 Example: carry capacity effects CE5504 – Surface Water Quality Modeling (Mihelcic 1999, Figure 5.6)

7 Monod Model CE5504 – Surface Water Quality Modeling (Mihelcic 1999, Figure 5.8)

8 Example: resource competition CE5504 – Surface Water Quality Modeling (Mihelcic 1999, Figure 5.9)

9 The Yield Coefficient CE5504 – Surface Water Quality Modeling

10 The Death (Respiration) Coefficient CE5504 – Surface Water Quality Modeling

11 Putting It All Together (Batch Reactor) CE5504 – Surface Water Quality Modeling (Mihelcic 1999, Figure 5.10)

12 Putting It All Together (Completely-Mixed Flow Reactor) CE5504 – Surface Water Quality Modeling

13 Numerical Integration CE5504 – Surface Water Quality Modeling  non-idealized loading functions  variable parameters  multi-segment systems  non-linear kinetics

14 The Euler Method CE5504 – Surface Water Quality Modeling

15 The Effect of Step Size CE5504 – Surface Water Quality Modeling (Spain 1982, Figure 5.1)

16 Code CE5504 – Surface Water Quality Modeling

17 Code (continued) CE5504 – Surface Water Quality Modeling

18 Code (continued) CE5504 – Surface Water Quality Modeling

19 Advanced Numerical Techniques The Heun’s Method CE5504 – Surface Water Quality Modeling For i = 0 To tmax For j = 1 To 1 / dt k1 = mu * x X1 = x + dt * k1 k2 = mu * X1 x = x + (k1 + k2) / 2 * dt Next j Next i

20 CE5504 – Surface Water Quality Modeling Advanced Numerical Techniques The 4 th Order Runge Kutta Method For i = 0 To tmax For j = 1 To 1 / dt k1 = mu * x X1 = x + 0.5 * dt * k1 k2 = mu * X1 X2 = x + 0.5 * dt * k2 k3 = mu * X2 X3 = x + dt * k3 k4 = mu * X3 x = x + (k1 + 2 * k2 + 2 * k3 + k4) / 6 * dt Next j Next i

21 Advanced Numerical Techniques Error Comparison CE5504 – Surface Water Quality Modeling Error (%) for various values of dt at t = 5 days dtEulerHeun4th RK 198.9085.8123.70 0.595.3556.703.60 0.158.685.580.01 0.019.400.07 0.0010.990.001 0.00010.10 0.000010.02 0.0000010.001 Error criterion: <=0.01 %


Download ppt "CE5504 – Surface Water Quality Modeling CE5504 Surface Water Quality Modeling Lab 2. Numerical Methods and Population Growth Modeling."

Similar presentations


Ads by Google