notes adams bashforth
play

Notes Adams-Bashforth Adams-Bashforth family are examples of Notes - PDF document

Notes Adams-Bashforth Adams-Bashforth family are examples of Notes for last part of Oct 11 and all of Oct 12 linear multistep methods lecture online now Linear: the new y is a linear combination of y s and f s Multistep:


  1. Notes Adams-Bashforth � Adams-Bashforth family are examples of � Notes for last part of Oct 11 and all of Oct 12 linear multistep methods lecture online now • Linear: the new y is a linear combination of y � s and f � s • Multistep: the new y depends on several old values � Another extra class this Friday 1-2pm � Efficient • Can get high accuracy with just one evaluation of f per time step • Can even switch order/accuracy as you go � Reasonably stable • AB3 and higher include some of the imaginary axis � Rephrased as a “multivalue method”, can easily accommodate variable time steps… cs542g-term1-2007 1 cs542g-term1-2007 2 Adams-Bashforth Stability Starting Up � AB1-4 � Problem: how do you get a multistep method started? � Note: • Without sacrificing global accuracy gets � Need an alternate approach to high order, smaller single-step methods with � Classic example: Runge-Kutta (RK) methods increasing � Extra information comes from additional order… evaluations of f, not old values • Avoiding old (and thus distant) data helps for stability and magnitude of truncation error too… • RK is thus very popular on its own merits cs542g-term1-2007 3 cs542g-term1-2007 4 Example Runge-Kutta Methods Finding RK methods � Forward Euler � Often described by how many evaluations � Heun � s method (predictor/corrector) RK2 (“stages”) and order of accuracy • Based on trapezoidal rule for integration… • Usually not uniquely determined though y (1) = y n + � t f y n , t n ( ) – � many, many RK methods out there ( ) ( ) ( ) + f y (1) , t n + 1 y n + 1 = y n + � t 1 2 f y n , t n � Generally finding “optimal” methods (minimum # stages for given accuracy) � Midpoint RK2 is an unsolved problem • Based on midpoint rule for integration… y n + 12 = y n + � t � Several standard schemes exist out there ( ) 2 f y n , t n ( ) y n + 1 = y n + � t f y n + 12 , t n + 12 cs542g-term1-2007 5 cs542g-term1-2007 6

  2. Classic RK4 Runge-Kutta Stability � Probably the most widely used higher � Forward Euler order time integration scheme � 2-stage RK2 ( ) k 1 = � t f y n , t n � 3-stage RK3 ( ) � 4-stage RK4 k 2 = � t f y n + 1 2 k 1 , t n + 12 ( ) k 3 = � t f y n + 1 2 k 2 , t n + 12 � Can trade ( ) accuracy k 4 = � t f y n + k 3 , t n + 1 for stability… y n + 1 = y n + 1 ( ) 6 k 1 + 2 k 2 + 2 k 3 + k 4 cs542g-term1-2007 7 cs542g-term1-2007 8 Adaptive time steps Looking at error � General idea: take large time steps where � Heuristic error control isn � t guaranteed! solution is smooth O � t p � p y � � � Usual validation approaches: • Truncation error is � � � � t p � • Test your method on a known exact solution � Example approach: • Test your method against real experimental • Use p � th and p+1 � st order integrators data (modeling error also included) • Difference estimates error of p � th order scheme • Run solver multiple times, with smaller and • Modify � t for next time step to attempt to keep error smaller time steps per unit time constant � Plot error against � t • N.B.: use p+1 � st order answer to go forward… � Look at ratio of error when � t halved � Runge-Kutta-Fehlberg (RKF) pairs: can sometimes reuse much of computation of p � th method to get p+1 � st method cs542g-term1-2007 9 cs542g-term1-2007 10 Stiffness Stiffness analyzed � Things may go wrong however! � Usually results from hugely different dy ( ) , ( ) = 1 � Simple example: time-scales in the problem dt = 1 � 1000 y � t y 0 dt = � 100 � � � Linear example: dy � � y � Forward Euler stability restriction: � 0.01 � � always need � t < 0.002 � First order accuracy: � The “fast” mode may be transient–quickly for t>0.05, can use gigantic � t decays to zero–so the “slow” mode determines truncation error � Problem is stiffness : stability of method requires � But the “fast” mode determines stability much smaller time step than accuracy demands time step restriction � So far we can � t efficiently solve stiff problems cs542g-term1-2007 11 cs542g-term1-2007 12

  3. Reversing time Backwards Euler � Consider � with positive real part � Backwards Euler: reverse version of FE ( ) y n + 1 = y n + � t f y n + 1 , t n + 1 � Unstable when going forwards in time (and FE etc. are similarly unstable, particularly for big time steps) � This is an implicit method: � Now, reverse time new y defined implicitly (appears on both sides) • Exponential growth, in reverse, is stable � Methods from previous slides are all explicit : exponential decay new y explicitly computed from known values • Reversed methods are stable! � Going implicit is the key to handling stiffness � Equivalent to regular time, � with negative real part cs542g-term1-2007 13 cs542g-term1-2007 14 Other implicit methods Even more � Backwards Euler is over-stable: � Implicit multistep methods: 1 � � � t > 1 Adams(-Bashforth)-Moulton � A-stable : region of stability includes left Backwards Differentiation Formula (BDF) half-plane (stable when exact solution is) ( ) � Implicit mid-point � Implicit Runge-Kutta y n + 1 = y n + � t f 2 y n + 1 1 2 y n + 1 , t n + 12 • Might need to solve for multiple intermediate � Trapezoidal rule values simultaneously… ( ) + 1 ( ) y n + 1 = y n + � t � � 1 2 f y n , t n 2 f y n + 1 , t n + 1 � � cs542g-term1-2007 15 cs542g-term1-2007 16

Recommend


More recommend