1 / 27

Solving Ordinary Differential Equations

Solving Ordinary Differential Equations. Application of Unsteady Flow form an Orifice. Ordinary Differential Equations. General Form:. for sake of simplicity only consider linear case:. Finite Difference Methods. Approx. sol’n. Exact sol’n.

cruz
Download Presentation

Solving Ordinary Differential Equations

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. Solving Ordinary Differential Equations Application of Unsteady Flow form an Orifice

  2. Ordinary Differential Equations General Form: for sake of simplicity only consider linear case:

  3. Finite Difference Methods Approx. sol’n Exact sol’n Third - Approximate using the discrete Basic Concepts First - Discretize Time Second - Represent x(t) using values at ti

  4. Finite Difference Methods Forward Euler Approximation (Explicit method)

  5. Finite Difference Methods Forward Euler Algorithm

  6. 1 γH2O 2 Z = 0 A2 3 Example: FDM Forward Euler • Phenomenon: Flow through Orifice at Variable Head h

  7. Math. Model: 1. Conservation of Mass

  8. Math. Model: 2. Energy Equation

  9. Mathematical Model

  10. Numerical Model (FDM Forward Euler)

  11. Choice of Time Step • The choice of time step is based on the idea that the values do not change too much during the time step. • Change of 5% in the initial value of the head h during the first time step is acceptable from engineering point of view. This is your judgment as a modeller.

  12. Numerical Example • Initial head h(t=0)= 5 m, cd=0.95, do=0.1 m, D=5 m. • Calculate the falling of the water level in time until the tank is empty. Draw h(t) over t. • Check your results with analytical solution.

  13. Estimation of time step • 5% of h(0)= 0.05*5=0.25 m • H(n+1)=5-0.25=4.75 m

  14. Table of Computation

  15. Check by Analytical solution

  16. Comparison

  17. Modified Euler (Predictor-Corrector) Method • Also “explicit” • next h is an explicit function of previous • But evaluate h at a some times to get a better estimate of next h • E.g. midpoint method:

  18. Finite Difference Methods Backward Euler Approximation (Implicit method)

  19. Finite Difference Methods Backward Euler Algorithm Solve with Gaussian Elimination

  20. Example (Tank Problem) Backward Difference

  21. Example (Tank Problem) Backward Difference cont.

  22. Finite Difference Methods Trapezoidal Rule Approximation

  23. Finite Difference Methods Trapezoidal Rule Algorithm Solve with Gaussian Elimination

  24. Example (Tank Problem) Trapezoidal Rule

  25. Example (Tank Problem) Trapezoidal Rule

  26. Finite Difference Methods Numerical Integration View Trap BE FE

  27. Finite Difference Methods Summary of Basic Concepts Trap Rule, Forward-Euler, Backward-Euler Are all one-step methods Forward-Euler is simplest No equation solution explicit method. Boxcar approximation to integral Backward-Euler is more expensive Equation solution each step implicit method Trapezoidal Rule might be more accurate Equation solution each step implicit method Trapezoidal approximation to integral

More Related