1 / 9

Numerical Integration

Numerical Integration. non-idealized loading functions variable parameters multi-segment systems non-linear kinetics. CE5504 – Surface Water Quality Modeling. The Euler Method. CE5504 – Surface Water Quality Modeling. The Effect of Step Size. (Spain 1982, Figure 5.1).

maree
Download Presentation

Numerical Integration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. The Euler Method CE5504 – Surface Water Quality Modeling

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

  4. Code CE5504 – Surface Water Quality Modeling

  5. Code (continued) CE5504 – Surface Water Quality Modeling

  6. Code (continued) CE5504 – Surface Water Quality Modeling

  7. Advanced Numerical Techniques The Heun’s Method 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 CE5504 – Surface Water Quality Modeling

  8. Advanced Numerical Techniques The 4th 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 CE5504 – Surface Water Quality Modeling

  9. Advanced Numerical Techniques Error Comparison Error (%)for various values of dt at t = 5 days dt Euler Heun 4th RK 1 98.90 85.81 23.70 0.5 95.35 56.70 3.60 0.1 58.68 5.58 0.01 0.01 9.40 0.07 0.001 0.99 0.001 0.0001 0.10 0.00001 0.02 0.000001 0.001 Error criterion:<=0.01 % CE5504 – Surface Water Quality Modeling

More Related