Methods for Ordinary Differential Equations. Jacob White

Similar documents
Introduction to Simulation - Lecture 13. Convergence of Multistep Methods. Jacob White. Thanks to Deepak Ramaswamy, Michal Rewienski, and Karen Veroy

Introduction to Simulation - Lecture 14. Multistep Methods II. Jacob White. Thanks to Deepak Ramaswamy, Michal Rewienski, and Karen Veroy

4 Separation of Variables

Methods for Computing Periodic Steady-State Jacob White

Physics 127c: Statistical Mechanics. Fermi Liquid Theory: Collective Modes. Boltzmann Equation. The quasiparticle energy including interactions

1. Measurements and error calculus

Module 22: Simple Harmonic Oscillation and Torque

STABILITY OF A PARAMETRICALLY EXCITED DAMPED INVERTED PENDULUM 1. INTRODUCTION

LECTURE 10. The world of pendula

SEMINAR 2. PENDULUMS. V = mgl cos θ. (2) L = T V = 1 2 ml2 θ2 + mgl cos θ, (3) d dt ml2 θ2 + mgl sin θ = 0, (4) θ + g l

Assignment 7 Due Tuessday, March 29, 2016

CS229 Lecture notes. Andrew Ng

4 1-D Boundary Value Problems Heat Equation

Strauss PDEs 2e: Section Exercise 1 Page 1 of 7

12.2. Maxima and Minima. Introduction. Prerequisites. Learning Outcomes

Chapter 5. Wave equation. 5.1 Physical derivation

Lecture 6: Moderately Large Deflection Theory of Beams

Demonstration of Ohm s Law Electromotive force (EMF), internal resistance and potential difference Power and Energy Applications of Ohm s Law

14 Separation of Variables Method

Wave Equation Dirichlet Boundary Conditions

Expectation-Maximization for Estimating Parameters for a Mixture of Poissons

1 Heat Equation Dirichlet Boundary Conditions

First-Order Corrections to Gutzwiller s Trace Formula for Systems with Discrete Symmetries

Physics 235 Chapter 8. Chapter 8 Central-Force Motion

Input-to-state stability for a class of Lurie systems

Lecture Notes for Math 251: ODE and PDE. Lecture 34: 10.7 Wave Equation and Vibrations of an Elastic String

Strauss PDEs 2e: Section Exercise 2 Page 1 of 12. For problem (1), complete the calculation of the series in case j(t) = 0 and h(t) = e t.

Lecture Note 3: Stationary Iterative Methods

1 Equivalent SDOF Approach. Sri Tudjono 1,*, and Patria Kusumaningrum 2

A Fictitious Time Integration Method for a One-Dimensional Hyperbolic Boundary Value Problem

NOISE-INDUCED STABILIZATION OF STOCHASTIC DIFFERENTIAL EQUATIONS

Fourier Series. 10 (D3.9) Find the Cesàro sum of the series. 11 (D3.9) Let a and b be real numbers. Under what conditions does a series of the form

HYDROGEN ATOM SELECTION RULES TRANSITION RATES

DIGITAL FILTER DESIGN OF IIR FILTERS USING REAL VALUED GENETIC ALGORITHM

Math 124B January 17, 2012

Chemical Kinetics Part 2

MA 201: Partial Differential Equations Lecture - 10

Introduction to Simulation - Lecture 16. Methods for Computing Periodic Steady-State - Part II Jacob White

Gauss Law. 2. Gauss s Law: connects charge and field 3. Applications of Gauss s Law

Chemical Kinetics Part 2. Chapter 16

$, (2.1) n="# #. (2.2)

Induction and Inductance

Lecture 9. Stability of Elastic Structures. Lecture 10. Advanced Topic in Column Buckling

1D Heat Propagation Problems

Two Kinds of Parabolic Equation algorithms in the Computational Electromagnetics

Tracking Control of Multiple Mobile Robots

Introduction. Figure 1 W8LC Line Array, box and horn element. Highlighted section modelled.

A Brief Introduction to Markov Chains and Hidden Markov Models

THE ROLE OF ENERGY IMBALANCE MANAGEMENT ON POWER MARKET STABILITY

Nonlinear oscillation of a dielectric elastomer balloon

CSE464 Coupling Calculations via Odd/Even Modes Spring, David M. Zar (Based on notes by Fred U. Rosenberger)

Wavelet Galerkin Solution for Boundary Value Problems

Integrating Factor Methods as Exponential Integrators

Fourier series. Part - A

Finite element method for structural dynamic and stability analyses

Bohr s atomic model. 1 Ze 2 = mv2. n 2 Z

MA 201: Partial Differential Equations Lecture - 11

Multigrid Method for Elliptic Control Problems

VTU-NPTEL-NMEICT Project

Forces of Friction. through a viscous medium, there will be a resistance to the motion. and its environment

Lecture Notes for Math 251: ODE and PDE. Lecture 32: 10.2 Fourier Series

3.10 Implications of Redundancy

Homework #04 Answers and Hints (MATH4052 Partial Differential Equations)

International Journal of Advance Engineering and Research Development

More Scattering: the Partial Wave Expansion

Solution Set Seven. 1 Goldstein Components of Torque Along Principal Axes Components of Torque Along Cartesian Axes...

AST 418/518 Instrumentation and Statistics

Introduction to Simulation - Lecture 9. Multidimensional Newton Methods. Jacob White

Solution of Wave Equation by the Method of Separation of Variables Using the Foss Tools Maxima

22.615, MHD Theory of Fusion Systems Prof. Freidberg Lecture 2: The Moment Equations

Mode in Output Participation Factors for Linear Systems

Research Article Solution of Point Reactor Neutron Kinetics Equations with Temperature Feedback by Singularly Perturbed Method

Notes: Most of the material presented in this chapter is taken from Jackson, Chap. 2, 3, and 4, and Di Bartolo, Chap. 2. 2π nx i a. ( ) = G n.

Multilayer Kerceptron

Section 6: Magnetostatics

Math 124B January 31, 2012

MAS 315 Waves 1 of 8 Answers to Examples Sheet 1. To solve the three problems, we use the methods of 1.3 (with necessary changes in notation).

Laplace s Equation FEM Methods. Jacob White. Thanks to Deepak Ramaswamy, Michal Rewienski, and Karen Veroy, Jaime Peraire and Tony Patera

Copyright information to be inserted by the Publishers. Unsplitting BGK-type Schemes for the Shallow. Water Equations KUN XU

Separation of Variables and a Spherical Shell with Surface Charge

Math 1600 Lecture 5, Section 2, 15 Sep 2014

Identification of macro and micro parameters in solidification model

8 Digifl'.11 Cth:uits and devices

Introduction to Riemann Solvers

T.C. Banwell, S. Galli. {bct, Telcordia Technologies, Inc., 445 South Street, Morristown, NJ 07960, USA

Published in: Proceedings of the Twenty Second Nordic Seminar on Computational Mechanics

Equilibrium of Heterogeneous Congestion Control Protocols

Lecture Notes 4: Fourier Series and PDE s

MATH 172: MOTIVATION FOR FOURIER SERIES: SEPARATION OF VARIABLES

c 2007 Society for Industrial and Applied Mathematics

Walking C H A P T E R 5

Reliability: Theory & Applications No.3, September 2006

International Journal of Mass Spectrometry

Traffic data collection

On a geometrical approach in contact mechanics

Computational studies of discrete breathers. Sergej Flach MPIPKS Dresden January 2003

Indirect Optimal Control of Dynamical Systems

Hydrodynamic Instability of Liquid Films on Moving Fibers

6.434J/16.391J Statistics for Engineers and Scientists May 4 MIT, Spring 2006 Handout #17. Solution 7

Steepest Descent Adaptation of Min-Max Fuzzy If-Then Rules 1

Transcription:

Introduction to Simuation - Lecture 12 for Ordinary Differentia Equations Jacob White Thanks to Deepak Ramaswamy, Jaime Peraire, Micha Rewienski, and Karen Veroy

Outine Initia Vaue probem exampes Signa propagation (circuits with capacitors). Space frame dynamics (struts and masses). Chemica reaction dynamics. Investigate the simpe finite-difference methods Forward-Euer, Backward-Euer, Trap Rue. Look at the approximations and agorithms Examine properties experimentay. Anayze Convergence for Forward-Euer

Appication Probems Signa Transmission in an Integrated Circuit Logic Gate Signa Wire Wire has resistance Wire and ground pane form a capacitor Ground Pane Logic Gate Meta Wires carry signas from gate to gate. How ong is the signa deayed?

Appication Probems Signa Transmission in an Integrated Circuit Circuit Mode resistor capacitor Cut the wire into sections. Mode wire resistance with resistors. Mode wire-pane capacitance with capacitors. Constructing the Mode

Appication Probems Osciations in a Space Frame What is the osciation ampitude?

Appication Probems Osciations in a Space Frame Simpified Structure Struts Bots Ground Load Exampe Simpified for Iustration

Appication Probems Osciations in a Space Frame Modeing with Struts, Joints and Point Masses Point Mass Strut Constructing the Mode Repace Meta Beams with Struts. Repace cargo with point mass.

Appication Probems Chemica Reaction Dynamics Crucibe Reagent Strange green stuff How fast is product produced? Does it expode?

i C1 Appication Probems v1 i v R2 2 i R1 i R3 C 1 R 2 R 1 R 3 C 2 Signa Transmission in an Integrated Circuit Constitutive Equations dvc ic = C dt 1 ir = vr R A 2x2 Exampe Noda Equations Yieds 2x2 System dv i C2 1 1 1 Conservation Laws i i i + + = 0 1 1 2 C R R i i i 1 + C1 0 dt R1 R2 R 2 v1 0 C = 2 dv2 1 1 1 v 2 + dt R2 R3 R 2 + = 0 2 3 2 C R R

Appication Probems Signa Transmission in an Integrated Circuit A 2x2 Exampe Let C = C = 1, R = R = 10, R = 1 dv1 1 1 1 + C1 0 dt R1 R2 R 2 v1 0 C = dv 1 1 1 v 2 2 2 + dt R2 R3 R 2 1 2 1 3 2 Eigenvaues and Eigenvectors eigenvectors dx 1.1 1.0 = dt 1.0 1.1 A 1 1 1 0.1 0 1 1 A = 1 1 0 2.1 1 1 Eigenvaues x

Eigendecomposition: An Aside on Eigenanaysis () Consider an ODE: dx t = Axt (), x(0) = x dt λ 0 0 A E E E E E 1 = 1 2 n 0 0 1 2 E n 0 0 λ n E 1 Change of variab e s : Ey( t) = xt ( ) yt ( ) = E xt ( ) dey() t Substituting: = AEy(), t Ey(0) = x0 dt λ 0 0 1 dy() t 1 1 Mutipy by E : = E AEy() t = 0 0 dt 0 0 λ n 0 yt () 1

An Aside on Eigenanaysis Continued From ast side: dy() t dt λ1 0 0 = 0 0 0 0 λ n yt () Decouped Equations! dyi () t λit Decouping: = λiyi() t yi() t = e y(0) dt () Steps for soving dx t = Axt (), x(0) = x0 dt 1) Determine E, λ 1 λ1t 2) Compute y(0) = E x e 0 0 0 3) Compute yt ( ) = 0 0 y(0) λnt 0 0 e 4) xt () = Eyt ()

Appication Probems Signa Transmission in an Integrated Circuit A 2x2 Exampe v 1(0) = 1 v 2(0) = 0 Notice two time scae behavior v 1 and v 2 come together quicky (fast eigenmode). v 1 and v 2 decay to zero sowy (sow eigenmode).

Appication Probems Struts, Joints and point mass exampe A 2x2 Exampe y = y0 + u Define v as veocity (du/dt) to yied a 2x2 System f s f m Constitutive Equations 2 du fm = M dt 2 y y EA 0 c fs = EAc = u y0 y0 dv EAc M 0 dt 0 v y 0 0 1 = du u 1 0 dt Conservation Law f s + f = m 0

Appication Probems Struts, Joints and point mass exampe A 2x2 Exampe Let M = 1, EA c = 1 y dv EAc M 0 dt 0 v y 0 0 1 = du u 1 0 dt 0 Eigenvaues and Eigenvectors 1 1 1 i 0 1 1 A = i i 0 i i i eigenvectors Eigenvaues dx 0 1.0 = x dt 1.0 0 A

0.5 1 v (0) = 1 Appication Probems Struts, Joints and point mass exampe A 2x2 Exampe -0.5 0 u (0) = 0-1 0 5 10 15 Note the system has imaginary eigenvaues Persistent Osciation Veocity, v, peaks when dispacement, u, is zero.

Appication Probems Amount of reactant Chemica Reaction Exampe A 2x2 Exampe = R, the temperature = T dt T R dt = + More reactant causes temperature to rise, higher temperatures increases heat dissipation causing temperature to fa dr R 4T dt = + Higher temperatures raises reaction rates, increased reactant interferes with reaction and sows rate.

Appication Probems Chemica Reaction Exampe A 2x2 Exampe dt dt 1 1 T dx 1 1 = dr 4 1 R = dt 4 1 dt A Eigenvaues and Eigenvectors 1 1 1 1 0 1 1 A = 2 2 0 3 2 2 eigenvectors Eigenvaues x

12 10 8 6 4 2 Appication Probems R (0) = 0 Chemica Reaction Exampe A 2x2 Exampe T (0) = 1 0 0 0.5 1 1.5 2 2.5 Note the system has a positive eigenvaue Soutions grow exponentiay with time.

First - Discretize Time Basic Concepts Second - Represent x(t) using vaues at t i ˆx 2 3 ˆx xˆ 4 ˆx x( t ) ˆx 1 0 t1 t2 t3 d xt dt Third - Approximate ( using ) the discrete tl t Approx. so n 1 + 1 ˆ ˆ ˆ ˆ d x x x x Exampe: xt ( ) or dt t t 0 t t1 t2 tl 1 + 1 t tl Exact so n xˆ 's = T

Basic Concepts Forward Euer Approximation x d sope = xt ( ) dt xt+ 1 xt sope = t t + 1 ( ) ( ) t t d xt ( 1) xt ( ) xt ( ) Axt + = ( ) dt t or xt ( ) xt ( ) + taxt ( ) + 1 = xt ( ) xt ( ) + taxt ( ) ( ) + 1

Basic Concepts Forward Euer Agorithm xt ( ) x = x(0) + tax 0 1 ˆ 1 ( ) x xt ( ˆ ˆ ˆ 2) x = x + tax 2 1 1 xt ( ) xˆ = xˆ + taxˆ L L L 1 L 1 1 taxˆ tax(0) t1 t2 t 3 t

x Finite Difference d sope = xt ( + 1) dt xt+ 1 xt sope = t t + 1 ( ) ( ) t t Basic Concepts Backward Euer Approximation d xt ( 1) xt ( ) xt ( 1) Axt + + = ( + 1) dt t or xt ( ) xt ( ) + taxt ( ) + 1 + 1 = xt ( ) xt ( ) + taxt ( ) ( ) + 1 + 1

Basic Concepts Backward Euer Agorithm Sove with Gaussian Eimination xt ( ˆ ˆ 1) x = x(0) + tax 1 1 I ta xˆ = x 1 [ ] (0) xt ( ˆ ˆ 2) x = [ I ta] x L xt ( ) xˆ = [ I ta] xˆ L 2 1 1 1 L 1 2 taxˆ 1 taxˆ x t1 t2 t

1 d d ( xt ( + 1 ) + xt ( )) 2 dt dt 1 = ( Ax ( t+ 1 ) + Ax ( t )) 2 xt ( + 1) xt ( ) t 1 xt ( + 1) xt ( ) + taxt ( ( + 1) + xt ( )) 2 Basic Concepts x Trapezoida Rue d sope = xt ( ) dt d sope = xt ( + 1) dt xt+ 1 xt sope = ( ) ( ) t t 1 1 = (( xt+ 1) taxt ()) (() xt + taxt ( + 1)) 2 2

Basic Concepts Trapezoida Rue Agorithm Sove with Gaussian Eimination t x( t1) xˆ = x(0) + Ax(0) + Axˆ 2 t t I A x = I + A x 2 2 ( ) 1 1 1 ˆ (0) x 1 2 t t 1 xt ( 2) xˆ = I 2 A I+ 2 A xˆ 1 L ( ) ˆ t t xtl x = I A I+ A xˆ 2 2 L 1 t1 t2 t

Basic Concepts Numerica Integration View d xt xt xt t A d dt + 1 () = A xt ( ) ( + 1) = ( ) + x ( τ ) t t t + 1 Ax( τ ) dτ t 2 ( ) tax( t + 1) tax( t ) τ Ax( t) + Axt ( ) Trap BE FE t t + 1

Basic Concepts Summary Trap Rue, Forward-Euer, Backward-Euer Are a one-step methods 1 2 3 xˆ is computed using ony xˆ, not xˆ, xˆ, etc. Forward-Euer is simpest No equation soution expicit method. Boxcar approximation to integra Backward-Euer is more expensive Equation soution each step impicit method Trapezoida Rue might be more accurate Equation soution each step impicit method Trapezoida approximation to integra

4 Numerica Experiments Unstabe Reaction 3.5 3 2.5 t = 0.1 Backward-Euer Exact Soution 2 1.5 1 Trap rue Forward-Euer 0.5 0 0.5 1 1.5 2 FE and BE resuts have arger errors than Trap Rue, and the errors grow with time.

Numerica Experiments Unstabe Reaction-Error Pots 0 0.4 6 x 10-3 -0.05-0.1-0.15-0.2-0.25 Forward Euer 0.35 0.3 0.25 0.2 0.15 0.1 Backward Euer 5 4 3 2 1 0 Trap Rue -0.3 0.05-1 -0.35 0 1 2 0 0 1 2-2 0 1 2 A methods have errors which grow exponentiay

M ax Finite Difference 10 2 10 0 Backward-Euer Numerica Experiments Unstabe Reaction-Convergence 10-2 E rr 10-4 Trap rue Forward-Euer o r 10-6 10-8 Timestep 10-3 10-2 10-1 10 0 For FE and BE, Error t For Trap, Error ( t) 2

4 2 t = 0.1 Numerica Experiments Osciating Strut and Mass Forward-Euer 0-2 -4-6 0 5 10 15 20 25 30 Why does FE resut grow, BE resut decay and the Trap rue preserve osciations Trap rue Backward-Euer

Numerica Experiments Two timescae RC Circuit sma t Backward-Euer Computed Soution arge t With Backward-Euer it is easy to use sma timesteps for the fast dynamics and then switch to arge timesteps for the sow decay

Numerica Experiments Two timescae RC Circuit Forward-Euer Computed Soution The Forward-Euer is accurate for sma timesteps, but goes unstabe when the timestep is enarged

Convergence Numerica Experiments Summary Did the computed soution approach the exact soution? Why did the trap rue approach faster than BE or FE? Energy Preservation Why did BE produce a decaying osciation? Why did FE produce a growing osciation? Why did trap rue maintain osciation ampitude? Two timeconstant (stiff) probems Why did FE go unstabe when the timestep increased? We wi focus on convergence today

Convergence Anaysis Convergence Definition Definition: A finite-difference method for soving initia vaue probems on [0,T] is said to be convergent if given any A and any initia condition T 0, t ( ) max xˆ x t 0 as t 0 xˆ computed with t t xˆ computed with 2 x exact

Convergence Anaysis Order-p convergence Definition: A finite-difference method for soving initia vaue probems on [0,T] is said to be order p convergent if given any A and any initia condition max T 0, t for a t ess than a given ( ) ( ) xˆ x t C t t Forward- and Backward-Euer are order 1 convergent Trapezoida Rue is order 2 convergent 0 p

Convergence Anaysis Two Conditions for Convergence 1) Loca Condition: One step errors are sma (consistency) Typicay verified using Tayor Series 2) Goba Condition: The singe step errors do not grow too quicky (stabiity) A one-step methods are stabe in this sense.

Convergence Anaysis Consistency Definition Definition: A one-step method for soving initia vaue probems on an interva [0,T] is said to be consistent if for any A and any initia condition 1 ˆ ( ) x x t t 0 as t 0

Convergence Anaysis Consistency for Forward Euer Forward-Euer definition xˆ 1 = x 0 + tax 0 τ [ 0, t ] ( ) ( ) Expanding in t about zero yieds 2 2 dx 0 t d x x( t) = x( 0) + t + dt 2 dt ( ) ( ) ( ) d Noting that x (0) = Ax (0) and subtracting dt 2 2 τ ˆ 1 x x t ( ) t ( ) ( ) 2 d x dt 2 2 τ Proves the theorem if derivatives of x are bounded

Forward-Euer definition xˆ + = xˆ + taxˆ 1 Convergence Anaysis Convergence Anaysis for Forward Euer Expanding in t about t yieds (( 1) ) ( ) ( ) x + t = x t + tax t + e where e is the "one-step" error bounded by ( ) 2 e C t, where C = 0.5 max 2 d x τ [0, T ] 2 dt τ ( )

Convergence Anaysis Convergence Anaysis for Forward Euer Continued Subtracting the previous side equations ( ) (( 1) ) ( ) ˆ ( ) xˆ + x + t = I + ta x x t + e 1 Define the "Goba" error E + = I + ta E + e ( ) 1 ˆ ( ) E x x t Taking norms and using the bound on + 1 E I + ta E + C t ( ) ( ) ( ) 1 t A E C( t) + + 2 2 e

Convergence Anaysis A hepfu bound on difference equations A emma bounding difference equation soutions ( ) + 1 0 If u 1 + ε u + b, u = 0, ε > 0 Then u e ε ε b To prove, first write u as a power series and sum 1 1 ( 1+ ε ) ( 1 ) j u + ε b = b 1 ( 1 ε ) j= 0 + j

Convergence Anaysis A hepfu bound on difference equations cont. ε To finish, note (1 + ε) e (1 + ε) Mapping the goba error equation to the emma + 1 E 1+ t A E + C ( t )2 ε b ( ε) ( ) j ( ε) 1 1+ 1+ 1 e u b = b b 1 1+ j e ε ε ε ε ε

max C [ 0, L] A Convergence Anaysis Back to Forward Euer Convergence anaysis. Appying the emma and canceing terms 1 E 1+ t A E + C ( t )2 ε b Finay noting that t T, C( t) 2 AT E e t t A e t A

Convergence Anaysis Observations about the forward-euer anaysis. max C AT [ 0, L] E e t A forward-euer is order 1 convergent The bound grows exponentiay with time interva C is reated to the soution second derivative The bound grows exponentiay fast with norm(a).

12 Convergence Anaysis Exact and forward-euer(fe) Pots for Unstabe Reaction. 10 8 6 4 2 Texact Rexact RFE TFE 0 0 0.5 1 1.5 2 2.5 Forward-Euer Errors appear to grow with time

E r r o r 1.2 1 0.8 0.6 0.4 0.2 0-0.2 0 0.5 1 1.5 2 2.5 Rexact-RFE Time Convergence Anaysis forward-euer errors for soving reaction equation. Texact - TFE Note error grows exponentiay with time, as bound predicts

1 Convergence Anaysis Exact and forward-euer(fe) Pots for Circuit. 0.8 v1fe 0.6 v1exact 0.4 v2fe 0.2 0 0 0.5 1 1.5 2 2.5 3 3.5 4 Forward-Euer Errors don t aways grow with time v2exact

E r r o r Finite Difference 0.03 0.02 0.01 0-0.01 v1exact - v1fe Convergence Anaysis forward-euer errors for soving circuit equation. -0.02 v2exact-v2fe -0.03 0 0.5 1 1.5 2 2.5 3 3.5 4 Time Error does not aways grow exponentiay with time! Bound is conservative

Summary Initia Vaue probem exampes Signa propagation (two time scaes). Space frame dynamics (osciator). Chemica reaction dynamics (unstabe system). Looked at the simpe finite-difference methods Forward-Euer, Backward-Euer, Trap Rue. Look at the approximations and agorithms Experiments generated many questions Anayzed Convergence for Forward-Euer Many more questions to answer, some next time