Solving Ordinary Differential Equations

Slides:



Advertisements
Similar presentations
Lecture on Numerical Analysis Dr.-Ing. Michael Dumbser
Advertisements

Chapter 6 Differential Equations
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1 CISE301_Topic8L8&9 KFUPM.
Integration Techniques
CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5 Numerical Integration Prof. Chung-Kuan Cheng 1.
Ordinary Differential Equations
Lecture 18 - Numerical Differentiation
COMPUTER MODELS IN BIOLOGY Bernie Roitberg and Greg Baker.
PART 7 Ordinary Differential Equations ODEs
CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5 Numerical Integration Spring 2010 Prof. Chung-Kuan Cheng 1.
1 EE 616 Computer Aided Analysis of Electronic Networks Lecture 12 Instructor: Dr. J. A. Starzyk, Professor School of EECS Ohio University Athens, OH,
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 32 Ordinary Differential Equations.
Numerical Integration CSE245 Lecture Notes. Content Introduction Linear Multistep Formulae Local Error and The Order of Integration Time Domain Solution.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 31 Ordinary Differential Equations.
Lecture on Stiff Systems (Section 1-6 of Chua and Lin) ECE 546 Jan. 15, 2008.
Solutions for Nonlinear Equations
1 EE 616 Computer Aided Analysis of Electronic Networks Lecture 12 Instructor: Dr. J. A. Starzyk, Professor School of EECS Ohio University Athens, OH,
8-1 Chapter 8 Differential Equations An equation that defines a relationship between an unknown function and one or more of its derivatives is referred.
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW III.
Numerical Solutions of Ordinary Differential Equations
NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS
Ordinary Differential Equations (ODEs)
Numerical Solution of Ordinary Differential Equation
1 Chapter 6 Numerical Methods for Ordinary Differential Equations.
-S.SIVARAJA Dept of MATHEMATICS.  N-NUMERICAL  M-METHODS EASY TO LEARN & EASY TO SCORE.
Numerical Solutions to ODEs Nancy Griffeth January 14, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Boyce/DiPrima 9th ed, Ch 8.4: Multistep Methods Elementary Differential Equations and Boundary Value Problems, 9th edition, by William E. Boyce and Richard.
Introduction to Numerical Methods for ODEs and PDEs Methods of Approximation Lecture 3: finite differences Lecture 4: finite elements.
EE3561_Unit 8Al-Dhaifallah14351 EE 3561 : Computational Methods Unit 8 Solution of Ordinary Differential Equations Lesson 3: Midpoint and Heun’s Predictor.
Application of Differential Applied Optimization Problems.
1 EEE 431 Computational Methods in Electrodynamics Lecture 4 By Dr. Rasime Uyguroglu
Computational Method in Chemical Engineering (TKK-2109)
Modelling & Simulation of Chemical Engineering Systems Department of Chemical Engineering King Saud University 501 هعم : تمثيل الأنظمة الهندسية على الحاسب.
Integration of 3-body encounter. Figure taken from
Scientific Computing Numerical Solution Of Ordinary Differential Equations - Euler’s Method.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. ~ Ordinary Differential Equations ~ Stiffness and Multistep.
Scientific Computing Multi-Step and Predictor-Corrector Methods.
Large Timestep Issues Lecture 12 Alessandra Nardi Thanks to Prof. Sangiovanni, Prof. Newton, Prof. White, Deepak Ramaswamy, Michal Rewienski, and Karen.
Circuits Theory Examples Newton-Raphson Method. Formula for one-dimensional case: Series of successive solutions: If the iteration process is converged,
Numerical Analysis – Differential Equation
Suppose we are given a differential equation and initial condition: Then we can approximate the solution to the differential equation by its linearization.
1 EE 616 Computer Aided Analysis of Electronic Networks Lecture 12 Instructor: Dr. J. A. Starzyk, Professor School of EECS Ohio University Athens, OH,
Announcements Read Chapters 11 and 12 (sections 12.1 to 12.3)
Ch 8.2: Improvements on the Euler Method Consider the initial value problem y' = f (t, y), y(t 0 ) = y 0, with solution  (t). For many problems, Euler’s.
ECE 576 – Power System Dynamics and Stability Prof. Tom Overbye Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
Sec 21: Generalizations of the Euler Method Consider a differential equation n = 10 estimate x = 0.5 n = 10 estimate x =50 Initial Value Problem Euler.
Lesson 9-2 Direction (Slope) Fields and Euler’s Method.
CALCULUS REVIEW BME 3510 C PO-WEI CHEN 8/19/2014.
Integrators of higher order
Numerical Methods by Dr. Laila Fouad.
Scientific Computing Lab
ECE 576 – Power System Dynamics and Stability
CSE245: Computer-Aided Circuit Simulation and Verification
Class Notes 18: Numerical Methods (1/2)
Section Euler’s Method
CSE 245: Computer Aided Circuit Simulation and Verification
Finding A Better Final Discretized Equation
NUMERICAL INTEGRATION
CSE245: Computer-Aided Circuit Simulation and Verification
ECE 576 POWER SYSTEM DYNAMICS AND STABILITY
SKTN 2393 Numerical Methods for Nuclear Engineers
ECE 576 POWER SYSTEM DYNAMICS AND STABILITY
Numerical Computation and Optimization
MATH 2140 Numerical Methods
Reading Between the Lines!
EE 616 Computer Aided Analysis of Electronic Networks Lecture 12
Recapitulation of Lecture 12
Modeling and Simulation: Exploring Dynamic System Behaviour
Presentation transcript:

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 Basic Concepts First - Discretize Time Second - Represent x(t) using values at ti Approx. sol’n Exact Third - Approximate using the discrete

Finite Difference Methods Forward Euler Approximation (Explicit method)

Finite Difference Methods Forward Euler Algorithm

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

Math. Model: 1. Conservation of Mass

Math. Model: 2. Energy Equation

Mathematical Model

Numerical Model (FDM Forward Euler)

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.

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.

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

Table of Computation T (sec) H(n) 5 4.77 60 4.54 120 4.32 180 ---

Check by Analytical solution

Comparison

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:

Finite Difference Methods Backward Euler Approximation (Implicit method)

Finite Difference Methods Backward Euler Algorithm Solve with Gaussian Elimination

Example (Tank Problem) Backward Difference

Example (Tank Problem) Backward Difference cont.

Finite Difference Methods Trapezoidal Rule Approximation

Finite Difference Methods Trapezoidal Rule Algorithm Solve with Gaussian Elimination

Example (Tank Problem) Trapezoidal Rule

Example (Tank Problem) Trapezoidal Rule

Finite Difference Methods Numerical Integration View Trap BE FE

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 Trapezoidal approximation to integral