A Linearly Fourth Order Multirate Runge-Kutta Method with Error Control

Similar documents
Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9

Scientific Computing: An Introductory Survey

The family of Runge Kutta methods with two intermediate evaluations is defined by

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations

Multirate integration of axisymmetric step-flow equations

Southern Methodist University.

A SYMBOLIC-NUMERIC APPROACH TO THE SOLUTION OF THE BUTCHER EQUATIONS

Butcher tableau Can summarize an s + 1 stage Runge Kutta method using a triangular grid of coefficients

(again assuming the integration goes left to right). Standard initial value techniques are not directly applicable to delay problems since evaluation

Solving Ordinary Differential equations

Ordinary differential equations - Initial value problems

Chapter 6 - Ordinary Differential Equations

Differential Equations

Exact and Approximate Numbers:

369 Nigerian Research Journal of Engineering and Environmental Sciences 2(2) 2017 pp

CHAPTER 10: Numerical Methods for DAEs

CS520: numerical ODEs (Ch.2)

Initial value problems for ordinary differential equations

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit V Solution of

CHAPTER 5: Linear Multistep Methods

Parallel Methods for ODEs

Numerical Methods for Differential Equations

Tong Sun Department of Mathematics and Statistics Bowling Green State University, Bowling Green, OH

Richarson Extrapolation for Runge-Kutta Methods

Solving PDEs with PGI CUDA Fortran Part 4: Initial value problems for ordinary differential equations

NUMERICAL SOLUTION OF ODE IVPs. Overview

Initial value problems for ordinary differential equations

Validated Explicit and Implicit Runge-Kutta Methods

Numerical Methods for Differential Equations

On the stability regions of implicit linear multistep methods

Physically Based Modeling: Principles and Practice Differential Equation Basics

Physically Based Modeling Differential Equation Basics

Mathematics for chemical engineers. Numerical solution of ordinary differential equations

Lecture 4: Numerical solution of ordinary differential equations

The Milne error estimator for stiff problems

Lecture 4.2 Finite Difference Approximation

Application of modified Leja sequences to polynomial interpolation

A self adjusting multirate algorithm based on the TR-BDF2 method

Starting Methods for Two-Step Runge Kutta Methods of Stage-Order 3 and Order 6

Applied Math for Engineers

Semi-implicit Krylov Deferred Correction Methods for Ordinary Differential Equations

INTRODUCTION TO COMPUTER METHODS FOR O.D.E.

Solution of ordinary Differential Equations

Integration of Ordinary Differential Equations

Efficient path tracking methods

Graded Project #1. Part 1. Explicit Runge Kutta methods. Goals Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo

Astrodynamics (AERO0024)

Piecewise Smooth Solutions to the Burgers-Hilbert Equation

Stepsize Restrictions for Boundedness and Monotonicity of Multistep Methods

16.7 Multistep, Multivalue, and Predictor-Corrector Methods

Numerical solution of ODEs

Towards One-Step Multirate Methods in Chip Design

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by

Numerical Integration of Equations of Motion

Math 660 Lecture 4: FDM for evolutionary equations: ODE solvers

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations

Name of the Student: Unit I (Solution of Equations and Eigenvalue Problems)

Numerical Methods - Initial Value Problems for ODEs

Backward error analysis

Part IB Numerical Analysis

Statistical Geometry Processing Winter Semester 2011/2012

16.7 Multistep, Multivalue, and Predictor-Corrector Methods

Hermite Interpolation

8.1 Introduction. Consider the initial value problem (IVP):

Numerical Differential Equations: IVP

Applied Numerical Analysis

Bindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 18. HW 7 is posted, and will be due in class on 4/25.

Introduction to the Numerical Solution of IVP for ODE

Least Squares with Examples in Signal Processing 1. 2 Overdetermined equations. 1 Notation. The sum of squares of x is denoted by x 2 2, i.e.

Ordinary differential equation II

Modeling & Simulation 2018 Lecture 12. Simulations

Index. higher order methods, 52 nonlinear, 36 with variable coefficients, 34 Burgers equation, 234 BVP, see boundary value problems

Ordinary Differential Equations


Euler s Method, Taylor Series Method, Runge Kutta Methods, Multi-Step Methods and Stability.

The Finite Element Method for the Analysis of Non-Linear and Dynamic Systems: Non-Linear Dynamics Part I

An Implicit Method for Numerical Solution of Second Order Singular Initial Value Problems

University of Alberta ENGM 541: Modeling and Simulation of Engineering Systems Laboratory #5

2 Numerical Methods for Initial Value Problems

Math 411 Preliminaries

X i t react. ~min i max i. R ij smallest. X j. Physical processes by characteristic timescale. largest. t diff ~ L2 D. t sound. ~ L a. t flow.

Ph 22.1 Return of the ODEs: higher-order methods

Improved Starting Methods for Two-Step Runge Kutta Methods of Stage-Order p 3

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

Determining the Rolle function in Lagrange interpolatory approximation

S#ff ODEs and Systems of ODEs

Strong Stability of Singly-Diagonally-Implicit Runge-Kutta Methods

Ordinary Differential Equations

Consistency and Convergence

A Padé approximation to the scalar wavefield extrapolator for inhomogeneous media

1 Ordinary Differential Equations

Finite difference methods for the diffusion equation

Geometric Modeling Summer Semester 2010 Mathematical Tools (1)

Finite Difference and Finite Element Methods

Identification Methods for Structural Systems. Prof. Dr. Eleni Chatzi Lecture March, 2016

The collocation method for ODEs: an introduction

Do not turn over until you are told to do so by the Invigilator.

Exponential Integrators

A numerical study of a technique for shifting eigenvalues of radial basis function differentiation matrices

u n 2 4 u n 36 u n 1, n 1.

Transcription:

Noname manuscript No. (will be inserted by the editor) A Linearly Fourth Order Multirate Runge-Kutta Method with Error Control Pak-Wing Fok Received: date / Accepted: date Abstract To integrate large systems of locally coupled ordinary differential equations (ODEs) with disparate timescales, we present a multirate method with error control that is based on the Cash-Karp Runge-Kutta (RK) formula. The order of multirate methods often depends on interpolating certain solution components with a polynomial of sufficiently high degree. By using cubic interpolants and analyzing the method applied to a simple test equation, we show that our method is fourth order linearly accurate overall. Furthermore, the size of the region of absolute stability is increased when taking many micro-steps within a macro-step. Finally, we demonstrate our method on three simple test problems to confirm fourth order convergence. Keywords Multirate Runge-Kutta Interpolation Introduction In this paper, we present a fourth order linearly accurate multirate method with error control, that is suited for integrating large systems of locally coupled ordinary differential equations (ODEs) whose solutions ehibit different time scales. The method is based on a Cash-Karp Runge-Kutta (RK) formula [6] with latent and active components coupled together through a third order interpolant. The latent components are assumed to be non-stiff while the active components may or may not be stiff. A multirate method is one that can take different step sizes for different components of the solution [8]. When might such a need for different time steps arise? One situation where multirate methods may be more efficient than single rate ones is when a few of the components contain time singularities or move on short time scales. In this case, eplicit single rate methods may use a small global time step for all the components, whereas a multirate one could employ small time steps just for singular/fast ones, therefore improving the speed and efficiency of solution. P.-W. Fok 4 Ewing Hall, University of Delaware, Newark, DE 976, USA E-mail: pakwing@udel.edu

Pak-Wing Fok Multirate methods typically partition the solution into active and latent components. The active (latent) components are integrated using micro ( macro ) steps and the integrators used for the micro and macro steps do not have to be the same; however they must be coupled together. How this coupling can be achieved without reducing the method order is the topic of most investigations. Early multirate schemes were studied by Andrus [], and Gear and Wells [8]. Kvaerno and other authors [9, 3, ] advocate the use of Multirate Partitioned Runge-Kutta formulas (MPRK). The distinguishing feature of this class of methods is that macro- and micro-integrators are coupled through the intermediate stage function evaluations. In [], a multirate θ-method is studied; different values of θ give rise to forward Euler, backward Euler and Trapezoidal integrators and different orders of interpolation were tried. It was found that poorly chosen interpolants could give rise to order reduction or solution instability. Multirate methods are often based on eisting integrators. Multirate RK has already been discussed above. However, equipped with suitable interpolants, researchers have successfully implemented multirate versions of Rosenbrock [8, 7], Adams [6] and BDF [] methods. Further treatments can be found in [,3,], and the references therein. The overall order of a multirate method usually depends on the accuracy of interpolation. Multirate methods have generally been restricted to low order due to difficulties in constructing suitable interpolants. However, in [7], a fourth order Rosenbrock method was developed and in [4], etrapolated multirate methods were studied. The advantage of the methods in [4] is that they are easily parallelized. While the base methods are low order (either eplicit or implicit Euler along with zeroth order interpolation), they can be used to find very accurate numerical solutions via Richardson etrapolation. Our method shares some similarities with the MPRK methods [9,3] in the sense that RK methods are the base schemes used to advance the solution. However, our method is 4th order whereas the authors in [9,3] investigate nd and 3rd order (embedded) methods. Furthermore, we use interpolation to couple the micro- and macro-integrators. Because we can generate dense output for the latent components, we can implement error control and adaptive time stepping in the micro-integrator; the number of micro-steps within a macro-step is free to vary between macro-steps. Because we use a slowest first strategy, adaptive time stepping in the macro-integrator is independent of the micro-integrator and can be implemented without additional complications. Our method also shares similarities with [8] in that active components are detected by eamining the error of each component. However, in our method, automatic step size selection is simple to implement and follows standard protocols [6]. In section we give the details of the numerical method. In section 3, we investigate the order and absolute stability of our method. We discuss the important issue of interpolation in section 4 and validate our code and present our results in section. Finally, we summarize our findings with a conclusion in section 6. Algorithm The goal of our method is to efficiently solve large systems of ordinary differential equations whose solutions evolve on very different time scales. In this paper, we

A Linearly Fourth Order Multirate Runge-Kutta Method with Error Control 3 ^ n+/4 latent active k k k 3 k 4 k 6 k l * l 3 * l 6 * l * l 4 * l * y n+/4 t n t n+/4 t n+/4 t n+3/4 t n+ Fig. Intermediate stage function evaluations and timeslabs in a Cash-Karp RK multirate scheme with m = 4 micro-steps and t n+ t n = h. The k j and l j denote intermediate stage function evaluations within a macro-step and micro-step respectively. Symbols with hat accents are calcuated through interpolation. consider systems that can be represented as Ẋ = f (t, X, ), () ẋ = f (t, X,, y), () ẏ = f (t,, y), (3) where for integers N, N, N and N = N + N + N, the vectors X R N, R N, y R N ; f : (R + R N R N ) R N, f : (R + R N R N R N ) R N and f : (R + R N R N ) R N. Furthermore, we assume that N N, N. Following [9, 3], we have broadly grouped our solution components into latent (X, ) and active (y) components. The latent components X (which are the majority of the latent components) and the active components y are decoupled: Ẋ does not depend on y and ẏ does not depend on X. However, the evolutions of X and y are not independent in the sense that they are indirectly coupled with each other through a small subset of latent components. Systems such as ()-(3) actually arise in many applications. For eample, when partial differential equations are discretized using the method of lines, the result is usually a large system of locally coupled ordinary differential equations. In this case, a small number of active solution components, y, may change on a fast time scale while the remaining latent ones, X, change relatively slowly. Furthermore, because the system is locally coupled, the active components only influence (through their rate functions) a small subset of latent components,. For our method to be competitive, we stress that the ODE system must be locally coupled (i.e. the stencil of dependence in the rate function must be localized) and the solution must contain only a small number of active components at any given time. Our algorithm advances the latent components (X, ) using a single macrostep of size h. It advances the active components y using the same time stepper with micro-steps of smaller size. The partioning into latent and active components will, in general, be time-dependent, i.e. the set of latent and active components can change from macro-step to macro-step. The description of the algorithm below and analysis assumes a fied micro-step of size h/m where m is an integer. Because both latent and active components are advanced using embedded RK,

4 Pak-Wing Fok the etension to implement error control and adaptive time stepping, based on estimation of the local truncation error, is straightforward [6]. Our multirate RK algorithm to advance one macro-step is described below. The coefficients a i, b ij, c j and c j are the standard Cash-Karp RK coefficients; see Table.. For an integer n, fi a time point t n and compute the intermediate stage function evaluations for latent and active components over a macro-step of size h: i K i = hf t n + c i h, X n + j= i k i = hf t n + c i h, X n + j= j= i a ij K j, n + j= i a ij K j, n + j= j= a ij k j, (4) i a ij k j, y n + j= a ij l j,() i i l i = hf t n + c i h, n + a ij k j, y n + a ij l j, (6) for i =,..., 6. In (4)-(6), K i R N, k i R N and l i R N.. Advance all latent components: X n+ = X n + n+ = n + X n+ = X n + n+ = n + 6 b i K i (fourth order), (7) i= 6 b i k i (fourth order), (8) i= 6 bi K i (fifth order), (9) i= 6 bi k i (fifth order). () i= Our method does not use local etrapolation, so eqs. (7) and (8) advance the solution while (9) and () are used to calculate the corresponding error. 3. For l {,,..., m }, advance the active components through y n+(l+)/m = y n+l/m + ỹ n+(l+)/m = y n+l/m + 6 b d l d, () d= 6 bd l d. () 4. The intermediate stage function evaluations within a micro-step are computed through l d = h m f t n+ l + c d dh m m, ˆ n+ l+c d, y n+ l + a dj l j, (3) m m d= j=

A Linearly Fourth Order Multirate Runge-Kutta Method with Error Control for d =,..., 6. In (3), we interpolate only the latent components that are coupled to active components via the formula ( ˆ n+χ = n + k χ + χ 8k 3 + k 4 3k ) 6 ( + χ3 k k ) 4 + k, (4) 6 3 3 for any < χ <. We will derive (4) in section 4. i c i a ij b i bi 8 7648 37 378 3 3 3 4 9 4 87 48384 6 4 3 3 9 6 3 96 94 4 7 7 3 7 77 4336 6 7 8 63 96 7 7 384 447 9 3 496 4 77 j = 3 4 6 Table Table of coefficients for Cash-Karp embedded Runge-Kutta formula. The coefficients b i and b i are used for fourth and fifth order formula respectively. See [6] for details. Figure summarizes the algorithm and shows the macro timesteps (indeed by n in our algorithm) along with their intermediate stage function evaluations (indeed by i), and m = 4 micro timesteps (indeed by l) along with their intermediate stage function evaluations (indeed by d). For a single rate scheme with no interpolation, the integrators () and () are fourth and fifth order respectively. Because the multirate scheme interpolates using (4), eq. () actually reduces to fourth order. However, the error can still be estimated from y n+(l+)/m ỹ n+(l+)/m. Because we are specializing to locally coupled systems, l d, d =,..., 6, in eq. (3) only has to be computed for N components and interpolation (4) only has to be done for N components (recall that both N, N N ). We now discuss some technical details of our method. Dynamic Partioning: The partitioning into latent and active components is done by estimating the local truncation error (LTE) for each component of the solution. Therefore the solution components labeled as X, and y can change from macro-step to macro-step. Components whose errors are larger than δ (maimum error) (where δ ) are flagged as active and are corrected through a second integration using the micro-integrator (see below). In the numerical eamples discussed later on, δ can range from to. When δ =, there are no active components and our method effectively reduces to a single rate method. The remaining unflagged components are classified as latent. The flag vector consisting of ones (active) and zeros (latent) is then searched to find boundary

6 Pak-Wing Fok indices [r j, s j ] for j =,,..., ν which define ν zones of activity. Zones of activity may consist of just a single solution component j in which case r j = s j. For coupled ODEs with a local stencil of size q, an odd integer, zones of activity must be separated by at least (q )/ latent components. If active zones are separated by fewer than (q )/ components, they are combined into a single active zone and latent components within the zone are integrated along with the other active components using the micro-integrator. In a pentadiagonal case with q =, we have u j = F j (u j, u j, u j, u j+, u j+ ) for some rate function F j and a single active component u j in the bulk can be integrated a second time at relatively little cost if the two latent components on either side u j±, u j± are interpolated. In section, we study eamples with a single zone of activity, although our methods easily generalize to multiple zones. In this case, for a given integer P, we may epand the zone of activity from [r, s] to [r P, s + P ] to be conservative. (This strategy ensures that borderline active/latent components are always classified as active.) The integer P must also be chosen so that indices of interpolated components lie between and N. For eample, with two interpolated components on either size of the active zone, upon determining [r, s] we conservatively update with r ma(r P, 3) and s min(s + P, N ). In the numerical eamples of section, we take P =. Macro-Integration: After taking a trial macro-step and flagging the active components, the algorithm checks if the unflagged errors are smaller than a preset tolerance. If they are, the trial step is successful and the macro-step size is scaled up according to the largest unflagged error. If there are latent components which have error larger than the preset tolerance, the trial step is unsuccessful and has to be retaken. In this case the macro-step size is scaled down according to the largest unflagged error. Micro-Integration: Although the method is described above for m microsteps each of size h/m, in practice we implement ()-(3) with error control/adaptive time stepping. The number of micro-steps in each macro-step can vary from macrostep to macro-step and the micro-step size can also vary within a macro-step. The micro-step size is chosen so that the accumulated errors from the m micro-steps is less than a preset tolerance and the error from one macro-step is also controlled to be less than this tolerance. Whether a single macro-step is taken for a latent component, or m micro-steps are taken for an active component, the error committed is approimately the same. A flowchart summary of our method is given in Figure. 3 Consistency and Order Analysis of Single Rate Method. We first analyze a single-rate method to introduce notation that will feature in the multirate analysis. This section also reuses many of the symbols in the scheme (4)-(4). Suppose we apply a single rate Cash-Karp scheme to the system of ODEs M M M u + Mu =, M = M M M, () M M M

A Linearly Fourth Order Multirate Runge-Kutta Method with Error Control 7 Fig. Flowchart description of adaptive-time stepping multirate method for the ODE system ẏ = f(t, y). The time step tolerance is T OL and δ and < S < are required constants. The maimum stepsize amplification and contraction factors of and. are arbitrary and ensure that h does not change too quickly as the agorithm runs. The indices r and s define the boundary components of the active region. where u = (X T, T, y T ) T, X R N, R N, y R N, and the submatrices M ij R N i N j. In a single rate method, all components advance using a macrostep of size h. Then the intermediate stage function evaluations satisfy K (I 6N + ha M) k = h M l X n n y n, (6) where = (,,,,, ) T, the entries of the matri A are the a ij in Table and I n is the n n identity matri. Solving for K, k and l, we find that L K(h) = U X n + U n + U y n, (7) L k(h) = U X n + U n + U y n, (8) L l(h) = U X n + U n + U y n, (9) where the L i and U ij are lengthy (but known) functions of h that are defined in the appendi. Then the fourth order scheme in Cash-Karp Runge Kutta updates through X n+ = X n + (b T I N )L (h) [U (h)x n + U (h) n + U (h)y n ], () n+ = n + (b T I N )L (h) [U (h)x n + U (h) n + U (h)y n ], () y n+ = y n + (b T I N )L (h) [U (h)x n + U (h) n + U (h)y n ], ()

8 Pak-Wing Fok while the fifth order scheme updates through a similar scheme to ()-() but with b replaced with b. We see that although X and y are not directly coupled together in eqs. () and (3), in one step of single rate Cash-Karp Runge Kutta, y n affects X n+ through () and X n affects y n+ through (). Multirate Analysis. We first study the fourth order multirate method given by eqs. (7), (8) and (). In a multirate scheme, eqs. () and () remain identical but () is replaced by a scheme that takes m micro-steps of size h/m. The goal in this section is to derive the multirate equivalent of (). Using eq. (3), the intermediate stage function evaluations for the active components satisfy l d = hm m ˆ n+ l+c d hm m m y n+ l m a dj l j, (3) d + j= for d =,..., 6, where ˆ n+ l+c m ˆ n+(l+c )/m ˆ n+(l+c )/m. ˆ n+(l+c6 )/m R6N, (4) is a vector of interpolated values for from t n+l/m to t n+(l+)/m, and c,..., c 6 are taken from Table. Taking l = (l T, l T,..., l 6 T ) T, (3) is more compactly written as [ I 6N + ha ] m M l = h m (I 6 M )ˆ n+ l+c h m m ( M )y n+ l. () m From the definition of the interpolant (4), we can use kronecker products to write the interpolated values in (4) as ˆ n+(l+c)/m = n + (Ω(l) I N )(Q I N )k, (6) where Q = 8 3 6 3, [Ω(l)] ij = ( ) j l + ci, (7) j! m 3 3 for i =,..., 6, j =,, 3 and l =,..., m. We now analyze the micro timestepper. From eq. (), y n+(l+)/m = y n+l/m + (b T I N )l, (8) = ζ ˆ n+(l+c)/m + ζ y n+l/m, (9) using eq. () and the matrices ζ R N 6N and ζ R N N are given by ζ = h [ m (bt I N ) I 6N + ha ] m M (I 6 M ), (3) ζ = I N h [ m (bt I N ) I 6N + ha ] m M ( M ). (3)

A Linearly Fourth Order Multirate Runge-Kutta Method with Error Control 9 Eq. (9) gives the active solution at time t n+(l+)/m in terms of the the active solution at time t n+l/m and interpolated values. Implementing the micro-integration, we iterate (9) m times and accumulate the interpolated values to obtain y n+ = m j= ζ m j ζ ˆ n+(j+c)/m + ζ m y n. (3) Finally, we substitute for k in (6) using (8) and then substitute the resulting epression for ˆ n+(l+c)/m into (3). In summary, when we apply the multirate scheme to the linear system (), the solution at times t n+ and t n are related through u n+ = S(hM)u n, (33) S S S where S = S S S and the submatrices S ij R N i N j are defined as S S S S ij = I Ni δ ij + (b T I Ni )L i U ij, i {, }, j {,, }, (34) S = S = m j= m j= m + j= ζ m j ζ (Ω(j) I N )(Q I N )L U, (3) ζ m j ζ ( I N ) ζ m j ζ (Ω(j) I N )(Q I N )L U, (36) m S = ζ m + ζ m j ζ (Ω(j) I N )(Q I N )L U, (37) j= where δ ij is the (scalar) kronecker delta. Note that while eqs. ()-() depend on U ij, i =,, 3, j =,, 3, eqs. (34)-(37) are independent of U, U and U. Applying the same analysis to eqs. (9), () and (), we have where S = S S S S S S S S S ũ n+ = S(hM)u n, (38) and the submatrices S ij have similar definitions to (34)-(37) but with b replaced by b and ζ and and ζ replaced by ζ and ζ. Matrices ζ and ζ have similar definitions to (3) and (3) but with b replaced by b. By epanding S and S in Taylor series for small h, one can show that S(hM) = I N hm + (hm) S(hM) = I N hm + (hm) (hm)3 6 (hm)3 6 + (hm)4 4 + (hm)4 4 + Eh + O(h 6 ), (39) + Ẽh + O(h 6 ), (4)

Pak-Wing Fok for different matrices E R N N and Ẽ RN N. Since ( M) j u = u (j) (t) for j, eqs. (33) and (38) along with eqs. (39) and (4) imply u n+ = u(t n ) + hu (t n ) + h u (t n ) ũ n+ = u(t n ) + hu (t n ) + h u (t n ) + h3 u (t n ) 6 + h3 u (t n ) 6 + h4 u (4) (t n ) 4 + h4 u (4) (t n ) 4 + O(h ), (4) + O(h ), (4) with different implied constants in the O(h ) terms. Single rate Cash-Karp Runge-Kutta contains both fourth and fifth order integrators. However, using the interpolant (4), we see from (4) and (4) that in the multirate scheme, both integrators are linearly 4th order accurate. Specifically, the compound step defined by applying () m times is linearly fourth order, although the constants { b,..., b 6 } are normally associated with a fifth order formula. Nevertheless, we can still estimate the micro-step error by y n+(i+)/m ỹ n+(i+)/m. This is not too different than step doubling methods where the numerical solution after two half-steps and a single whole-step also have the same order of error. Our numerical results in Section show that, in practice, this way of estimating the error does not reduce the overall accuracy of the method. In summary, we have shown that the method of taking one macro-step of size h in components X and, and taking m micro-steps of size h/m in components y is linearly fourth order overall: the associated error is O(h ) when applied to the simple test equation (). Because we interpolate latent components using a cubic polynomial, the fifth order formula for the micro timestepper reduces to fourth order. Absolute Stability of Multirate Steps. To analyze absolute stability of our multirate method, we study the matri S in eq. (33). To simplify the analysis, we take N = N = N = and M = M = M = M = M =, so that M = M M, (43) M M where M ij, i, j {, } are scalars. Note that X(t) is constant in time and decoupled from (t) and y(t). Therefore we only need to analyze a system of ODEs, and our multirate scheme reduces to ( ) ( ) ( ) n+ S S n =. (44) y n+ S S y n }{{} S R Given the macro-step size to micro-step size ratio m, the requirement that the solution at time t n+ is smaller (in norm) than the solution at time t n puts a limit on how large the macro-step size h, and consequently, how large the micro-step size h/m, can be: this is the condition of absolute stability. Specifically, absolute stability requires that the spectral radius of S R is less than : ρ(s R ) <. The stiffness of the system is quantified through the ratio M /M and the offdiagonal terms M and M represent the strength of coupling between the active

A Linearly Fourth Order Multirate Runge-Kutta Method with Error Control z z 4 4 3 z z = 3 m= m= m=4 m= 3 4 z z z =.4 (a) m= m= m= m= (c) z z z 4 3 z z =. (b) z z z =. 4 3 m= m= m= m= m= m= m= m= (d) z Fig. 3 Regions of absolute stability of the linear system () for different coupling strengths z z, where M takes the form (43). The z ij = hm ij where h is the macro-step size. and latent components. Defining z ij = hm ij, one can see from the definitions of ζ, ζ in (3), (3) and L i, U ij in the appendi that L = I 6 + z A z z A(I 6 + z A) A = P (z, z, z z ), L = I 6 + z A z z A(I 6 + z A) A = P (z, z, z z ), U = z + z z A(I 6 + z A) = P 3 (z, z, z z ), U = z + z z A(I 6 + z A) = z P 4 (z ), ζ = z m bt [ I 6 + z m A] ζ = z m bt [ I 6 + z m A] = z m P ( = z P6 m ( z m for known functions P j, j =,..., 6. Using these forms in eqs. (34)-(37), we find that the elements of S R are ), ), (4) S = + b T P P 3, (46) S = z b T P P 4, (47) S = z m m j= S = P m 6 + z z m P m j 6 P + z m P m j 6 P Ω(j)QP P 3, (48) m m j= j= P m j 6 P Ω(j)QP P 4, (49) where the arguments of each of the P j have been suppressed, but are identical to the ones in (4).

Pak-Wing Fok The eigenvalues of S R depend only on its trace and determinant. From (46)- (49) it is clear that both the trace S + S and the determinant S S S S only depend on z, z and the product z z, which represents the strength of coupling between (t) and y(t). Therefore the spectral radius of S R depends only on z, z and the product z z. In Fig. 3, we plot the -level curves of the spectral radius to represent regions of absolute stability. In Figure 3(a) when either of M or M are zero, we see that the regions of absolute stability are rectangular and the width of the region is proportional to m. When M = O() but M is large (but fied), the active component decays rapidly and the system is stiff: using a standard eplicit solver would lead to instability. Figure 3(a) shows that the eplicit method, in principle, can be stabilized by using small timesteps for the rapidly decaying component and choosing m sufficiently large. In Fig. 3(b)-(d), we see that for fied coupling z z, increasing m increases the size of the region of absolute stability, but the regions do not grow indefinitely with m. Instead, as m, there appears to be a limiting stability region. Interestingly, while increasing m mainly increases the width of the region of absolute stability, there is also a small increase in the height: the multirate etension can also have a stabilizing effect on the latent component. Our analysis also suggests that there is no significant gain in stability for m when the coupling between active and latent components is strong. For fied m, increasing the coupling strength z z decreases the size of the absolute stability region. The effect is most significant when z z increases from zero: for eample compare Figs. 3(a) and (b). In this case, when z z increases from to. and m =, the diagonal entry M must reduce by about /3 in order to retain stability for fied h. 4 Interpolation The key to making a multirate method high order is in generating dense output from latent components with high accuracy. One way to do this is through interpolation. For some integrators it is obvious how to derive an interpolant that is consistent with the underlying integrator. The Backward Differentiation Formulas (BDF), which use etrapolation from prior time steps to advance the solution in time, are an eample of this. Interpolants for Runge-Kutta methods are discussed in []. We hypothesize that when the micro-integrator is eplicit, interpolating the latent components using an (n ) order interpolant coupled to an integrator which is order n gives a multirate method that is order n overall. Certainly, we found that this is the case for the Cash-Karp method discussed in this paper (n = 4). One can also show that Heun s method (second order Runge Kutta) together with linear interpolation gives a second order multirate method. In [], the authors found that using linear interpolation reduced the order of a multirate (implicit) trapezoidal rule. However, the active components were fied a priori, and so were the interpolated components. We think that the choice We use the word interpolation to describe a method to construct a smooth approimation to the numerical solution between two times t n and t n+. However, the function that we derive does not pass through the numerical solution at t n+. Strictly speaking, it is not an interpolant. Nevertheless, we still refer to these approimating functions as interpolants.

A Linearly Fourth Order Multirate Runge-Kutta Method with Error Control 3 of which components to interpolate is important. We advocate that interpolation should be done for solution components that are sufficiently slow, though it is not clear how to quantify this statement at present. What is clear is that the interpolant (4) (or any high order interpolant) could still give large interpolation errors that would contaminate the accuracy of the micro-integrator if (t) had large derivatives. Derivation of interpolants. We now illustrate how interpolants can be constructed during run-time for the Cash-Karp Runge-Kutta formula [6]. Our main result is the third order interpolant (4) which we believe is new. Suppose we have the simple scalar ODE ẏ = f(t, y). Then to construct a third order interpolant, note that for χ, y(t n + χh) = y n + χhy n + (χh) y n + (χh)3 6 y n + O(h 4 ). () By repeatedly differentiating the ODE y n = f(t n, y n ), we have y n = G, y n = G, y n = G + G 3, where G = f n, G = f n f n + f n, G = fnf n + f n f n + f n and G 3 = f n f n + f n f n. Our convention is to use a dash for a y-derivative and a dot for a t-derivative: f n = f(t n,y n ) y and f n = f(t n,y n ) t. Therefore, () becomes y(t n + χh) = y n + χhg + (χh) Using definitions k i series, we have G + (χh)3 (G + G 3 ) + O(h 4 ). () 6 = hf(t n + c i h, y n + i j= a ijk j ) and epanding in Taylor k = hg, k = hg + h G + h3 G + O(h 4 ), k 3 = hg + 3h G + 9h3 (G + G 3 ) + O(h 4 ), k 4 = hg + 3h G + 9h3 (G + G 3 ) + O(h 4 ), k = hg + h G + h3 (G + G 3 ) + O(h 4 ), k 6 = hg + 7h 8 G + 49h3 8 (G + G 3 ) + O(h 4 ). Taking only the equations for k, k 4 and k, we form a linear system in terms of G, G and G + G 3 : h h 3h h h 9h 3 h3 G G G + G 3 = k k 4 k (). (3) Upon solving for G, G and G + G 3 and substituting into (), we find ( y(t n + χh) = y n + χk + χ 8 3 k + 6 k 4 3 ) k ( + χ3 6 3 k ) 3 k 4 + k + O(h 4 ). (4)

4 Pak-Wing Fok A similar calculation can be performed for classical 4th order Runge-Kutta formulas and other embedded formulas (e.g. Dormand-Prince) to generate cubic interpolants. Unfortunately, this method fails when quartic (or higher order) interpolants are required. When we increase the accuracy of () to O(h ), the analogous matri in eq. (3) is singular for all the RK formulas that we analyzed (Dormand-Prince, Cash-Karp, Fehlberg). However, quartic and higher order interpolants can be constructed if one includes more intermediate stage function evaluations in the Runge-Kutta formula [9]. Validation and Results We now test our method on some large ODE systems that arise from a methodof-lines discretization of some common physical PDEs. Our eamples also follow the sample problems that were eplored in [,8]. We use these simple test problems to illustrate proof of principle and demonstrate 4th order convergence of the method. Matlab codes used to generate the results in this section can be found on the author s homepage. Eample : Transport Equation. The problem considered is a method-of-lines y discretization of t + U y =, y(, ) = ep( ), on the infinite domain < <. For U > we use an upwind discretization ẏ (t) =, () ẏ i (t) = U (y i y i ), i =, 3,..., N, (6) with i = L + (i ), = L/(N ) and y i () = ep( i ), i =,..., N is the initial condition. The numerical domain for eqs. ()-(6) is [ L, L]. Figure 4 shows the result of applying our multirate integration method to ()-(6). The method flags components of the solution that move on a fast time scale, corresponding to regions in space which are perturbed by the travelling wave, and the flag footprint [r, s] generally follows the traveling wave. The upwind discretization has a truncation error that corresponds to a diffusion term which is responsible for the spreading of the initial condition. This diffusion also ensures that the number of flagged components increases as time progresses. Eample : Reaction-Diffusion equation. We now consider a discretization of the reaction-diffusion system y t = ε y + γy ( y), y(, ) = ( + ep[λ( )]), with λ = γ/ε, which admits a travelling wave solution. A centered-in-space discretization gives ẏ (t) =, (7) ẏ i (t) = ε (y i+ y i + y i ) + γyi ( y i ), i =, 3,..., N, (8) ẏ N (t) =, (9) with i = (i ), = L/(N ) and y i () = ( + ep[λ( i )]), i =,..., N is the initial condition. The numerical domain of solution is [, L]. Figure shows the results of applying our multirate integration method to the nonlinear

A Linearly Fourth Order Multirate Runge-Kutta Method with Error Control t =.6, r = 4, s =, error = 6.46e-, numsteps= t =.8, r = 4, s = 74, error = 7.97e-7, numsteps= y(, t). y(, t). - - - - 3 4 nz = 79 3 4 nz = 98 t = 3.8, r = 69, s = 9, error =.3e-6, numsteps=6 t = 7., r = 98, s = 3, error =.e-6, numsteps= y(, t). y(, t). - - - - 3 4 nz = 3 4 nz = Fig. 4 Multirate integration of discretized transport equation ()-(6). Indices of flagged components are indicated on a lattice below each profile. numsteps is the number of macrosteps taken; nz is the number of flagged components. Parameters were L =, N = 4, =., T OL = 6, δ = 4, U =. ODE system (7)-(9). As with eample, because the disturbance is localized in space, our method generally flags the components i that have large ẏ i while leaving the remaining components unflagged. The value of δ = used here is large enough so that the number of flagged components is relatively small and flagged components correspond to in the PDE where y is large. For this eample, we found that the flag footprint [r, s] was very sensitive to δ: when δ was decreased, nz rapidly increased and the algorithm flagged many quiescent components where y i or y i. Eample 3: Advection-Diffusion Equation. As a third eample, we consider a discretization of a forced advection-diffusion equation y t +a y = d y cy +g(, t), g(, t) = [cos(π/)] sin(πt), y(, ) =, on. We use a fourth order spatial discretization that results in a broader stencil and a pentadiagonal

6 Pak-Wing Fok t =., r =, s = 3, error =.88e-8, numsteps=3 t =., r = 7, s = 47, error =.76e-8, numsteps=3 y(, t). y(, t).... 3 3.... 3 3. 3 4 nz = 3 4 nz = t =.3, r = 3, s =, error = 3.3e-8, numsteps=46 t =., r = 39, s = 7, error = 6.e-8, numsteps=7 y(, t). y(, t).... 3 3.... 3 3. 3 4 nz = 3 4 nz = Fig. Multirate integration of reaction-diffusion equation (7)-(9). See caption of Fig. 4 for eplanation of numsteps and nz. Parameters were L = 3., N = 4, = 8.7 3, T OL = 8, δ =, ε =., γ =. system of ODEs: ẏ (t) =, (6) ẏ (t) =, (6) ẏ i (t) = a( y i+ + 8y i+ 8y i + y i ) + d( y i+ + 6y i+ 3y i + 6y i y i ) cy i + g( i, t), (6) i = 3, 4,..., N, ẏ N (t) =, (63) ẏ N (t) =, (64) with i = + (i )/ and = /(N ) and y i () =, i =,,..., N is the initial condition. Figure 6 shows the results of our method applied to the system (6)-(64), which are more mied. On the one hand, the number of flagged components in this problem rapidly increases in time. At the end of the integration for t =.8, most of all N = 4 components are flagged even though the solution is localized in a small region of. On the other hand, even though the system (6)-(64) is stiff, our method is able to complete the integration in 9 macro-steps even though it is based on eplicit Runge-Kutta formulas. (In contrast, a single rate method takes many more macro-steps; see below.) Net, we perform a convergence study to demonstrate that cubic interpolants coupling the macro and micro integrators together give a fourth order method.

A Linearly Fourth Order Multirate Runge-Kutta Method with Error Control 7 t =.3, r = 44, s = 77, error =.e-6, numsteps= t =.8, r =, s = 96, error =.6e-, numsteps=3 y(, t) y(, t) - -.. - -.. 3 4 nz = 3 4 nz = 44 t =.3, r = 89, s = 36, error =.e-, numsteps=7 t =.8, r =, s = 399, error = 4.e-, numsteps=9 y(, t) y(, t) - -.. - -.. 3 4 nz = 97 3 4 nz = 78 Fig. 6 Multirate integration of advection-diffusion equation (6)-(64). See caption of Fig. 4 for eplanation of numsteps and nz. Parameters were L =, N = 4, = 3, T OL =, δ =, a =, d =., c =. For this error analysis, we implement our method in fied timestep mode: h is constant throughout the integration and we take m =. We also fi the values of r and s so that the same components are treated as active throughout the whole course of the integration and the error is only computed for components r to s. The eact solution is found as a superposition of normal modes (with eigenvectors and eigenvalues determined numerically) in the transport equation and is computed using MATLAB s ODE solvers, set to a suitably stringent tolerance, for the reaction-diffusion and advection-diffusion equations. Figure 7 confirms fourth order convergence in terms of the infinity norm of the error. Finally, it is instructive to compare single rate and multirate methods. Ideally, for a given macro-step tolerance, we would like our multirate method to take fewer macro-steps than a single rate method, but incur roughly the same error at the end of the integration (in a single rate method, the normal time step is considered the macro-step and there are no micro-steps). We compare the number of steps taken and the errors incurred for all three test problems in Table. Our multirate method always takes fewer macro-steps than the single rate method. For all three systems of equations, the global error incurred is roughly the same whether we use a single rate or multirate method. These results are largely independent of T OL and δ. For much smaller T OL we did find that the multirate error could be a few orders of magnitude smaller than the single rate error. The implication is that the step size used by the micro-integrator is too small. In this case, it is desirable to find a way to increase the size of the micro-steps to give a more efficient multirate method.

8 Pak-Wing Fok -8 Transport -8 Reaction-Diffusion -6 Advection-Diffusion Infinity Norm Error - - -4 Infinity Norm Error - - (a) (b) -6-4 - - -4-3 - h h Infinity Norm Error -7-8 -9 - - (c) - -4-3 - h Fig. 7 Convergence of Cash-Karp multirate method in fied timestep mode, applied to each of the three eamples above with T OL = 6 and δ =. Here h is the size of the macro-step and there are m = micro-steps per macro-step. Solid lines have slope 4. The active components are [r, s] = [86, 6], [93, 39], [, 4] for (a), (b) and (c) respectively with N = 4 equations in each case, corresponding to the active components lying in..,.8.7 and.. The final integration times were T = 7 for (a), T =. for (b) and T =.8 for (c). Equation # macro-steps (error) # macro-steps/# micro-steps (error) Transport 3 (9. ) /4 (6.3 ) Reaction-Diffusion 74 (.4 ) /44 (4. 7 ) Advection-Diffusion 49 (. ) /4 (7.9 6 ) Table Comparison of single rate (second column) and multirate (third column) integration methods in terms of number of steps taken and error incurred. Error was measured using the infinity norm and the code parameters were T OL = 4 and δ =. The initial step sizes for the transport, reaction-diffusion and advection-diffusion equations were t =, 4 and 3 for both single and multirate methods. 6 Conclusions In this paper, we presented a fourth order linearly accurate multirate method. The method is based on embedded Runge-Kutta (RK) formulas and is eplicit in time. The main strength of the method is its high order; we showed in this paper that only third order interpolants are needed for a fourth order solver. Our algorithm generates these interpolants by using the intermediate stage function evaluations of an embedded RK formula. We tested our method on three simple problems and performed a convergence study to confirm the method order. We see three main etensions to this work. The first is to understand mathematically the spread of the active components in time. Generally, we found that our method is effective when the solutions are wave-like and disturbances are localized in inde-space, but not so competitive when they are diffusive (compare Figures 4 and with Figure 6). We would like the number of flagged components to remain small relative to the total number of components, throughout the course of the integration (in the etreme case when r = and s = N, all components are being integrated twice and one should revert to a single rate method). However

A Linearly Fourth Order Multirate Runge-Kutta Method with Error Control 9 in practice this can be difficult to achieve and the fraction of flagged components seems to be sensitive to δ and the governing system of equations. The second is to etend our method to other RK formulas. The interpolant used in our method is derived from a Taylor series at t n and its order stems from derivative information at t n which in turn comes from intermediate stage function evaluations. However, there are many other methods available to build interpolants and this is mature area of research: for eample, see the techniques discussed in []. The control of interpolation errors and how to to choose the interpolating components should remain active areas of study within the field of multirate integration. Finally, there is the issue of how to choose the parameter δ. In our method, a smaller δ results in more components being flagged as active. Although this may seem wasteful, latent components are able to advance with a larger timestep. Conversely, a larger δ results in fewer components being flagged as active, but latent components have to advance with a smaller timestep. It is not clear at present which value of δ results in an efficient multirate method, or how to determine good macro-step and micro-step sizes from the governing system of equations. In summary, this work contributes to the currently growing body of research in multirate methods. We hope that the strategies presented in this paper can be etended to the numerical solution of other physical problems and be used to improve the efficiency and accuracy of other multirate algorithms. Acknowledgements: The author thanks R. R. Rosales who stimulated the author s interest in multirate methods and proposed the derivation of cubic interpolants. A Matri Definitions Here we given the definitions of the matrices in eqs. (7)-(9). L = I 6N + h(a M ) h (A M ) [Σ (M, ha)] (A M ), L = I 6N h(a M ) + Σ (M, ha) + Σ (M, ha), L = I 6N + h(a M ) h (A M ) [Σ (M, ha)] (A M ), U = h( M ) + h (A M ) [Σ (M, ha)] ( M ), U = h( M ) + h (A M ) [Σ (M, ha)] ( M ) h 3 (A M ) [Σ (M, ha)] (A M )(I 6N + ha M ) ( M ), U = h (A M ) [Σ (M, ha)] ( M ) h 3 (A M ) [Σ (M, ha)] (A M )(I 6N + ha M ) ( M ), U = h( M ) + h (A M )(I 6N + ha M ) ( M ), U = h( M ) + h (A M )(I 6N + ha M ) ( M ) +h (A M )(I 6N + ha M ) ( M ), U = h( M ) + h (A M )(I 6N + ha M ) ( M ).

Pak-Wing Fok U = h (A M ) [Σ (M, ha)] ( M ) h 3 (A M ) [Σ (M, ha)] (A M )(I 6N + ha M ) ( M ), U = h( M ) + h (A M ) [Σ (M, ha)] ( M ) h 3 (A M ) [Σ (M, ha)] (A M )(I 6N + ha M ) ( M ), U = h( M ) + h (A M ) [Σ (M, ha)] ( M ) where for matrices Z and M = M M M M M M, we define M M M Σ (M, Z) = I 6N + (Z M ) (Z M )(I 6N + Z M ) (Z M ), Σ (M, Z) = I 6N + (Z M ) (Z M )(I 6N + Z M ) (Z M ). References. J. F. Andrus. Numerical solution of systems of ordinary differential equations separated into subsystems. SIAM J. Numer. Anal., 6: 6-6, 979.. A. Bartel and M. Günther. A multirate W-method for electrical networks in state-space formulation. J. Comp. Appl. Math., 47():4 4,. 3. A. Bartel, M. Günther and A. Kvaerno. Multirate methods in electrical circuit simulation. Progress in Industrial Mathematics at ECMI, 8-6,. 4. E. M. Constantinescu and Adrian Sandu. Etrapolated multirate methods for differential equations with multiple time scales, Journal of Scientific Computing,.. E. M. Constantinescu and Adrian Sandu. Multirate Timestepping Methods for Hyperbolic Conservation Laws Journal of Scientific Computing, 33: 39 78, 7. 6. E. M. Constantinescu and Adrian Sandu. Multirate Eplicit Adams Methods for Time Integration Journal of Scientific Computing, 38: 9 49, 9. 7. W. H. Enright, K. R. Jackson, S. P. Nørsett, and P. G. Thomsen. Interpolants for Runge- Kutta formulas. ACM Trans. Math. Softw., (3):93 8, 986. 8. C. W. Gear and D. R. Wells. Multirate linear multistep methods. BIT, 4:484, 984. 9. M. Günther, A. Kværnø, and P. Rentrop. Multirate partitioned Runge-Kutta methods. BIT, 4(3):4 4,.. E. Hairer and S.P. Norsett and G. Wanner. Solving Ordinary Differential Equations I: Nonstiff Problems. Springer Series in Computational Mathematics, 987. M. K. Horn. Fourth and fifth order, scaled Runge-Kutta algorithms for treating dense output. SIAM J. Numer. Anal., (3):8 68, 983.. W. Hundsdorfer and V. Savcenco. Analysis of a multirate theta-method for stiff ODEs. Applied Numerical Mathematics, 9:693 76, 9. 3. T. Kato and T. Kataoka. Circuit analysis by a new multirate method. Electr. Eng. Jpn., 6(4):63 68, 999. 4. A. Logg. Multi-adaptive time integration. Appl. Numer. Math., 48:339 34, 4.. J. Makino and S. Aarseth. On a Hermite integrator with Ahmad-Cohen scheme for gravitational many-body problems. Publ. Astron. Soc. Japan, 44:4, 99. 6. W. H. Press, S. A. Teukolsky, W. V. Vetterling, and B. P. Flannery. Numerical Recipes in C: The Art of Scientific Computing. Cambridge University Press, second edition, 99. 7. V. Savcenco. Construction of a multirate RODAS method for stiff ODEs Journal Comp. Appl. Math., : 33-337, 9. 8. V. Savcenco, W. Hundsdorfer, and J. G. Verwer. A multirate time stepping strategy for stiff ordinary differential equations. BIT, 47:37, 7. 9. L. F. Shampine. Some Practical Runge-Kutta Formulas Mathematics of Computation, 73: 3-, 986.. S. Skelboe. Stability properties of backward differentiation multirate formulas. Appl. Numer. Math., : -6, 989.. J. Waltz, G. L. Page, S. D. Milder, J. Wallin, and A. Antunes. A performance comparison of tree data structures for N-body simulation. J. Comp. Phys., 78: 4,.