Lec13

# Lec13 - Solving Initial Value ODEs Advanced Techniques:...

This preview shows pages 1–7. Sign up to view the full content.

Solving Initial Value ODEs Advanced Techniques: Adaptive time-stepping, stiff ODEs, implicit and multistep methods

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Lecture 13 2 Adaptive Time-Stepping z Up to this point, we have considered algorithms for solving IV ODEs that use constant time steps h z This can lead to inaccuracies or instabilities when the solution y(t) has rapid variations in some regions and slow variations in others z One strategy is to use a uniform (constant) small value of h , but this makes the calculation expensive! z A better solution is to adjust the value of h : Small h in regions of rapid variation Large h in regions of slow variation .25 .5 .75 .25 .5 .75 0.25 0.5 0.75 1 1.25 1.5 1.75 2 t large h here small h here y Solution Adaptive time-stepping
Lecture 13 3 Adaptive Time-Stepping: Error Assessment z There are two aspects to implementing adaptive time-stepping: Assessing the error Adjusting the time step accordingly z First we discuss how to assess the local error z One approach is the Step-Halving Method , which can be used with any of our ODE algorithms, including Runge-Kutta z In the Step-Halving Method, take each time step twice : Once as a full step with time step h Once as two half-steps with time step h /2 z Estimate the local error after the step ( n ) as

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Lecture 13 4 Pros and Cons of Error Assessment via Step-Halving z Pros The method can be easily applied with any ODE algorithm Richardson extrapolation can be used to improve the accuracy of the solution at each step n, e.g. for 4 th order Runge-Kutta, global error is O(h 4 ): z Cons The method is expensive, since it requires 1.5 x the computational effort of a single step at the higher ( h /2) accuracy e.g. for 4 th order Runge-Kutta, 4x3=12 function evaluations are required for each RK+SH step instead of 4x2=8 for each RK step at the higher accuracy 5 th order accuracy!
Lecture 13 5 Runge-Kutta Fehlberg z An alternative to Step-Halving for error assessment is the Runge-Kutta Fehlberg method (we use Cash-Karp variant) z R-K-F is a clever combination of 4 th and 5 th order Runge-Kutta schemes with the same k i , to minimize the total function evaluations to 6. This is burden of 1.2= 6/5 vs. “classical” 5 th order RK! z The error is estimated as the difference between the 5 th and 4 th order predictions: The formulas for the slopes k 1 , k 2 , …, k 6 are given in your text

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Lecture 13 6 Adjusting the step size z Once the error Δ n is assessed, we need a scheme for
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 12/29/2011 for the course CHE 132b taught by Professor Ceweb during the Fall '09 term at UCSB.

### Page1 / 19

Lec13 - Solving Initial Value ODEs Advanced Techniques:...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online