Numerical Solutions to ODEs Nancy Griffeth January 14, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis.

Slides:



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

Courant and all that Consistency, Convergence Stability Numerical Dispersion Computational grids and numerical anisotropy The goal of this lecture is to.
Formal Computational Skills
Partial Differential Equations
MATLAB EXAMPLES Initial-value problems
CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5 Numerical Integration Prof. Chung-Kuan Cheng 1.
Ordinary Differential Equations
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,
Numerical Integration CSE245 Lecture Notes. Content Introduction Linear Multistep Formulae Local Error and The Order of Integration Time Domain Solution.
Lecture on Stiff Systems (Section 1-6 of Chua and Lin) ECE 546 Jan. 15, 2008.
1 EE 616 Computer Aided Analysis of Electronic Networks Lecture 12 Instructor: Dr. J. A. Starzyk, Professor School of EECS Ohio University Athens, OH,
Efficient Simulation of Physical System Models Using Inlined Implicit Runge-Kutta Algorithms Vicha Treeaporn Department of Electrical & Computer Engineering.
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Implicit ODE Solvers Daniel Baur ETH Zurich, Institut.
ME451 Kinematics and Dynamics of Machine Systems Dynamics of Planar Systems Tuesday, November 30, 2010 Numerical Solution of IVPs [not in the book] © Dan.
Numerical Solution of Ordinary Differential Equation
MATH 685/ CSI 700/ OR 682 Lecture Notes Lecture 10. Ordinary differential equations. Initial value problems.
1 Chapter 6 Numerical Methods for Ordinary Differential Equations.
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Explicit ODE Solvers Daniel Baur ETH Zurich, Institut.
Section 6.1: Euler’s Method. Local Linearity and Differential Equations Slope at (2,0): Tangent line at (2,0): Not a good approximation. Consider smaller.
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.
Erin Catto Blizzard Entertainment Numerical Integration.
EE3561_Unit 8Al-Dhaifallah14351 EE 3561 : Computational Methods Unit 8 Solution of Ordinary Differential Equations Lesson 3: Midpoint and Heun’s Predictor.
ME451 Kinematics and Dynamics of Machine Systems
Lecture 3.
1 EEE 431 Computational Methods in Electrodynamics Lecture 4 By Dr. Rasime Uyguroglu
Computational Biology, Part 15 Biochemical Kinetics I Robert F. Murphy Copyright  1996, 1999, 2000, All rights reserved.
Workshop on Stochastic Differential Equations and Statistical Inference for Markov Processes Day 3: Numerical Methods for Stochastic Differential.
Separation of Variables Solving First Order Differential Equations.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. ~ Ordinary Differential Equations ~ Stiffness and Multistep.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 261 Stiffness.
Numerical Methods for Solving ODEs Euler Method. Ordinary Differential Equations  A differential equation is an equation in which includes derivatives.
+ Numerical Integration Techniques A Brief Introduction By Kai Zhao January, 2011.
Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation.
Engineering Analysis – Computational Fluid Dynamics –
© Imperial College London Numerical Solution of Differential Equations 3 rd year JMC group project ● Summer Term 2004 Supervisor: Prof. Jeff Cash Saeed.
Ordinary Differential Equations (ODEs) 1Michael Sokolov / Numerical Methods for Chemical Engineers / Explicit ODE Solvers Michael Sokolov ETH Zurich, Institut.
Circuits Theory Examples Newton-Raphson Method. Formula for one-dimensional case: Series of successive solutions: If the iteration process is converged,
ME451 Kinematics and Dynamics of Machine Systems Numerical Integration. Stiffness: Implicit Methods. October 30, 2013 Radu Serban University of Wisconsin-Madison.
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.
Lecture 40 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
ECE 576 – Power System Dynamics and Stability Prof. Tom Overbye Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
Game Technology Animation V Generate motion of objects using numerical simulation methods Physically Based Animation.
Chemical Kinetics Nancy Griffeth January 8, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
1/14  5.2 Euler’s Method Compute the approximations of y(t) at a set of ( usually equally-spaced ) mesh points a = t 0 < t 1
Lecture 39 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
NUMERICAL DIFFERENTIATION or DIFFERENCE APPROXIMATION Used to evaluate derivatives of a function using the functional values at grid points. They are.
Differential Equations
Solving Ordinary Differential Equations
Lecture 4: Numerical Stability
ECE 576 – Power System Dynamics and Stability
CSE245: Computer-Aided Circuit Simulation and Verification
Class Notes 18: Numerical Methods (1/2)
Local Linearity and Approximation
CSE 245: Computer Aided Circuit Simulation and Verification
Ordinary differential equaltions:
MATH 175: NUMERICAL ANALYSIS II
Scientific Computing Lab
CSE245: Computer-Aided Circuit Simulation and Verification
Slope Fields This is the slope field for Equilibrium Solutions
Numerical Analysis Lecture 38.
Overview Class #2 (Jan 16) Brief introduction to time-stepping ODEs
MATH 175: Numerical Analysis II
Ch5 Initial-Value Problems for ODE
EE 616 Computer Aided Analysis of Electronic Networks Lecture 12
Presentation transcript:

Numerical Solutions to ODEs Nancy Griffeth January 14, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex Systems,” an NSF Expedition in Computing (Award Number ).

ODE Numerical Differentiation Definition of Differentiation Problem: We do not have an infinitesimal h Solution: Use a small h as an approximation 2

ODE Forward Difference & Backward Difference Forward Difference Backward Difference 3

ODE Numerical Differentiation - Example Compute the derivative of function At point x=1.15 4

Euler Method Explicit Euler Method Consider Forward Difference Which implies 5

Euler Method Explicit Euler Method Split time t into n slices of equal length Δt The Explicit Euler Method Formula 6

Euler Method Explicit Euler Method - Algorithm 7

Euler Method Implicit Euler Method Consider Backward Difference Which implies 8

Euler Method Implicit Euler Method Split the time into slices of equal length The above differential equation should be solved to get the value of y(t i+1 ) Extra computation Sometimes worth because implicit method is more accurate 9

Euler Method A Simple Example Try to solve IVP What is the value of y when t=0.5? The analytical solution is 10

Using explicit Euler method We choose different dts to compare the accuracy 11 Euler Method A Simple Example

texactdt=0.05errordt=0.025errordt= error At some given time t, error is proportional to dt. Euler Method A Simple Example

For some equations called Stiff Equations, Euler method requires an extremely small dt to make result accuracy The Explicit Euler Method Formula The choice of Δt matters! 13 Euler Method A Simple Example

Assume k=5 Analytical Solution is Try Explicit Euler Method with different dts 14 Euler Method A Simple Example

Choose dt=0.002, s.t. Works! 15

Choose dt=0.25, s.t. Oscillates, but works. 16

Choose dt=0.5, s.t. Instability! 17

Euler Method Stiff Equation – Explicit Euler Method For large dt, explicit Euler Method does not guarantee an accurate result 18 texactdt=0.5errordt=0.25errordt=0.002error

Euler Method Stiff Equation – Implicit Euler Method Implicit Euler Method Formula Which implies 19

Choose dt=0.5, Oscillation eliminated! Not elegant, but works. 20