CONSTRUCTION OF HIGH-ORDER ADAPTIVE IMPLICIT METHODS FOR RESERVOIR SIMULATION

Similar documents
A New Fourth-Order Non-Oscillatory Central Scheme For Hyperbolic Conservation Laws

Numerical Solutions for Hyperbolic Systems of Conservation Laws: from Godunov Method to Adaptive Mesh Refinement

The RAMSES code and related techniques I. Hydro solvers

A numerical study of SSP time integration methods for hyperbolic conservation laws

Strong Stability-Preserving (SSP) High-Order Time Discretization Methods

ENO and WENO schemes. Further topics and time Integration

Lecture 4: Numerical solution of ordinary differential equations

Finite Volume Schemes: an introduction

FDM for wave equations

NUMERICAL METHODS FOR ENGINEERING APPLICATION

MASSACHUSETTS INSTITUTE OF TECHNOLOGY DEPARTMENT OF MECHANICAL ENGINEERING CAMBRIDGE, MASSACHUSETTS NUMERICAL FLUID MECHANICS FALL 2011

Numerical Oscillations and how to avoid them

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

Weighted Essentially Non-Oscillatory limiters for Runge-Kutta Discontinuous Galerkin Methods

Advection / Hyperbolic PDEs. PHY 604: Computational Methods in Physics and Astrophysics II

30 crete maximum principle, which all imply the bound-preserving property. But most

FDM for parabolic equations

Time stepping methods

Numerical Methods for Conservation Laws WPI, January 2006 C. Ringhofer C2 b 2

A NUMERICAL STUDY FOR THE PERFORMANCE OF THE RUNGE-KUTTA FINITE DIFFERENCE METHOD BASED ON DIFFERENT NUMERICAL HAMILTONIANS

On the Comparison of the Finite Volume and Discontinuous Galerkin Methods

Applied Mathematics 205. Unit III: Numerical Calculus. Lecturer: Dr. David Knezevic

Numerical Methods for Modern Traffic Flow Models. Alexander Kurganov

ALGEBRAIC FLUX CORRECTION FOR FINITE ELEMENT DISCRETIZATIONS OF COUPLED SYSTEMS

YINGJIE LIU, CHI-WANG SHU, EITAN TADMOR, AND MENGPING ZHANG

A parametrized maximum principle preserving flux limiter for finite difference RK-WENO schemes with applications in incompressible flows.

Riemann Solvers and Numerical Methods for Fluid Dynamics

Finite volumes for complex applications In this paper, we study finite-volume methods for balance laws. In particular, we focus on Godunov-type centra

A Fifth Order Flux Implicit WENO Method

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

3.4. Monotonicity of Advection Schemes

A Fourth-Order Central Runge-Kutta Scheme for Hyperbolic Conservation Laws

A Central Compact-Reconstruction WENO Method for Hyperbolic Conservation Laws

NUMERICAL SOLUTION OF HYPERBOLIC PARTIAL DIFFERENTIAL EQUATIONS

Fourier analysis for discontinuous Galerkin and related methods. Abstract

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS

High Order Accurate Runge Kutta Nodal Discontinuous Galerkin Method for Numerical Solution of Linear Convection Equation

Hierarchical Reconstruction with up to Second Degree Remainder for Solving Nonlinear Conservation Laws

Dedicated to the 70th birthday of Professor Lin Qun

Improvement of convergence to steady state solutions of Euler equations with. the WENO schemes. Abstract

Fully implicit higher-order schemes applied to polymer flooding. K.-A. Lie(SINTEF), T.S. Mykkeltvedt(IRIS), X. Raynaud (SINTEF)

A Bound-Preserving Fourth Order Compact Finite Difference Scheme for Scalar Convection Diffusion Equations

Method of Lines. Received April 20, 2009; accepted July 9, 2009

Semi-Lagrangian Formulations for Linear Advection Equations and Applications to Kinetic Equations

Chapter 17. Finite Volume Method The partial differential equation

Chapter 1. Introduction

Sung-Ik Sohn and Jun Yong Shin

Part 1. The diffusion equation

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.

Divergence Formulation of Source Term

The Center for Astrophysical Thermonuclear Flashes. FLASH Hydrodynamics

Multistage Methods I: Runge-Kutta Methods

Basics on Numerical Methods for Hyperbolic Equations

Ordinary differential equations - Initial value problems

Lecture Notes on Numerical Schemes for Flow and Transport Problems

Introduction to the Numerical Solution of IVP for ODE

Implicit-explicit exponential integrators

ICES REPORT A Multilevel-WENO Technique for Solving Nonlinear Conservation Laws

Design of optimal Runge-Kutta methods

Numerical Methods for Differential Equations

Lecture Notes on Numerical Schemes for Flow and Transport Problems

CS520: numerical ODEs (Ch.2)

Solving the Euler Equations!

Applied Numerical Analysis

Scalable Non-Linear Compact Schemes

Generalised Summation-by-Parts Operators and Variable Coefficients

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

Block-Structured Adaptive Mesh Refinement

Anti-diffusive finite difference WENO methods for shallow water with. transport of pollutant

The method of lines (MOL) for the diffusion equation

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

Finite difference methods for the diffusion equation

CENTRAL DISCONTINUOUS GALERKIN METHODS ON OVERLAPPING CELLS WITH A NON-OSCILLATORY HIERARCHICAL RECONSTRUCTION

The Penultimate Scheme for Systems of Conservation Laws: Finite Difference ENO with Marquina s Flux Splitting 1

Review Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester

CHAPTER 10: Numerical Methods for DAEs

Inverse Lax-Wendroff Procedure for Numerical Boundary Conditions of. Conservation Laws 1. Abstract

SMOOTHNESS INDICATORS FOR WENO SCHEME USING UNDIVIDED DIFFERENCES

1 Introduction to MATLAB

Application of the Kurganov Levy semi-discrete numerical scheme to hyperbolic problems with nonlinear source terms

Hierarchical Reconstruction with up to Second Degree Remainder for Solving Nonlinear Conservation Laws

Solution of Two-Dimensional Riemann Problems for Gas Dynamics without Riemann Problem Solvers

Numerical Solutions to Partial Differential Equations

10 The Finite Element Method for a Parabolic Problem

Development and stability analysis of the inverse Lax-Wendroff boundary. treatment for central compact schemes 1

Chapter 5. Formulation of FEM for Unsteady Problems

1 Introduction. J.-L. GUERMOND and L. QUARTAPELLE 1 On incremental projection methods

Scientific Computing: An Introductory Survey

AM 205: lecture 14. Last time: Boundary value problems Today: Numerical solution of PDEs

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS

FINITE VOLUME METHODS FOR ONE-DIMENSIONAL SCALAR CONSERVATION LAWS

Extremum-Preserving Limiters for MUSCL and PPM

Preliminary Examination in Numerical Analysis

Math 660-Lecture 23: Gudonov s method and some theories for FVM schemes

2.2. Methods for Obtaining FD Expressions. There are several methods, and we will look at a few:

Positivity-preserving high order schemes for convection dominated equations

Spatial Discretization

An efficient numerical method for hydraulic transient computations M. Ciccotelli," S. Sello," P. Molmaro& " CISE Innovative Technology, Segrate, Italy

A THEORETICAL INTRODUCTION TO NUMERICAL ANALYSIS

Chapter 2 Finite-Difference Discretization of the Advection-Diffusion Equation

Transcription:

CONSTRUCTION OF HIGH-ORDER ADAPTIVE IMPLICIT METHODS FOR RESERVOIR SIMULATION A REPORT SUBMITTED TO THE DEPARTMENT OF ENERGY RESOURCES ENGINEERING OF STANFORD UNIVERSITY IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE By Romain de Loubens June 007

I certify that I have read this report and that in my opinion it is fully adequate, in scope and in quality, as partial fulfillment of the degree of Master of Science in Petroleum Engineering. Hamdi Tchelepi (Principal advisor) ii

Abstract The objective of this work is to construct high-order extensions of the Adaptive Implicit Method (AIM) for Reservoir Simulation. The numerical methods under investigation are mainly applied to the transport equation describing the flow of one or two phases in a porous medium. The Method of Lines (MOL) offers a flexible and computationally efficient framework for general convection-diffusion problems. The convective term can be treated by high-resolution shock-capturing schemes, that are widely used today for the simulation of hyperbolic systems. Moreover, high-order time integration is typically carried out by onestep Runge-Kutta or Linear Multistep methods. A prototype program was developed to test various combinations of space-time discretizations formulated as MOL schemes. Numerical experiments in one dimension show a substantial reduction of the numerical dispersion in comparison with first-order methods. These high-resolution MOL schemes constitute the basic framework for the derivation of high-order AIM. A detailed analysis of the standard AIM scheme reveals an inconsistency at the transition between implicit and explicit regions. The discretization errors are usually comparable to the numerical dispersion. As a result, small kinks can be observed in the solution profile. But in most situations, the standard AIM scheme is convergent, and it satisfies strong monotonicity properties. In the context of high-order AIM, it is important to combine implicit and explicit time integration in a consistent manner. We propose a consistency fix that preserves the accuracy at the I- E boundaries, and allows us to construct fully high-order AIM. However, the positivity restriction in the implicit regions can be quite severe, even if the implicit time integration is unconditionally stable. This difficulty is overcome by applying artificial viscosity in the implicit regions, which eliminates spurious oscillations and allows for larger time steps. iii

Acknowledgements I would like to express my gratitude to my research and academic advisor Dr. Hamdi Tchelepi. His encouragement, intelligence and guidance were deeply appreciated throughout the course of this research. My appreciation also goes to Dr. Amir Riaz for his valuable advice and frily support. This work was prepared with the support of the Stanford University Petroleum Research Institute programs on Reservoir Simulation & Advanced Wells (SUPRI-B & SUPRI-HW). This research was also supported by the Global Climate and Energy Project (GCEP) at Stanford University. Both of these contributions are gratefully acknowledged. Finally I would like to thank all of my colleagues and fris for their help and support within and outside my academic life. Very special thanks also go to my family who continuously supported me from France. iv

Contents Abstract Acknowledgements Table of Contents List of Figures iii iv v viii 1 Introduction 1 High-order spatial discretizations 3.1 Mathematical model............................... 3. Flux limiting schemes............................... 4.3 ENO and WENO schemes............................ 6.4 Central Schemes.................................. 9.5 Other discretizations............................... 11 3 Method of Lines and time integration 1 3.1 MOL framework.................................. 1 3. One-step methods................................. 13 3.3 Linear Multistep methods............................ 16 3.4 Positivity property................................ 18 3.5 Other time integration methods......................... 4 Numerical analysis of standard AIM 4 4.1 Local inconsistency................................ 4 4. Linear error analysis............................... 6 v

4.3 Monotonicity properties............................. 34 4.3.1 Positivity and the maximum principle.................. 34 4.3. TVD property in the linear homogeneous case............. 37 4.3.3 TVD property in the quasi-linear homogeneous case.......... 41 4.3.4 TVD property in the heterogeneous case................ 47 4.4 Consistency fix.................................. 49 5 Construction of high-order AIM 5 5.1 Requirements and methodology......................... 5 5. AIM with high-order spatial accuracy...................... 54 5..1 Numerical formulation.......................... 54 5.. Numerical tests.............................. 55 5.3 Fully high-order AIM............................... 58 5.3.1 Numerical formulation.......................... 58 5.3. Numerical tests.............................. 6 5.4 High-order AIM with artificial viscosity..................... 71 6 Conclusions 74 List of acronyms 76 Bibliography 77 A Validation of high-order MOL schemes 80 A.1 Objectives..................................... 80 A. Code description................................. 81 A..1 Main routine................................ 81 A.. Routine CalcSw MOC........................... 8 A..3 Routine CalcSw MOL........................... 83 A..4 Routine CalcFlux............................ 84 A.3 Numerical tests.................................. 84 A.3.1 ecrk-cs scheme............................ 85 A.3. BE-FL scheme.............................. 86 A.3.3 TRK-ENO scheme........................... 87 A.3.4 BDF-WENO scheme.......................... 88 vi

A.3.5 DIRK3-ENO3 scheme.......................... 89 A.3.6 IRK-WENO scheme.......................... 90 A.3.7 Concluding remarks............................ 91 B Linear stability of the BDF scheme 94 C Matlab code for 1D numerical tests 97 C.1 Main routine................................... 97 C. MOC routine................................... 99 C.3 MOL routine................................... 101 C.4 Numerical flux routine.............................. 103 C.5 AIM-STD routine................................. 111 C.6 AIM-BE routine.................................. 113 C.7 AIM-BE/TRK routine............................. 115 C.8 AIM-TRK routine................................ 117 C.9 AIM-CRK routine................................ 119 C.10 AIM-IRK routine................................ 11 C.11 AIM-DIRK3 routine............................... 14 D Matlab code for D numerical tests 17 D.1 Main routine................................... 17 D. Residual-Jacobian routine............................ 133 D.3 Fractional flow routines.............................. 135 vii

List of Figures 3.1 Linear advection test with the TRK method................. 0 3. Linear advection test with the IRK method.................. 0 3.3 Linear advection test with the DIRK3 method................. 1 3.4 Linear advection test with the BDF method.................. 1 4.1 Schematic of an implicit-explicit (I-E) boundary................ 5 4. Propagation of a discretization error at an I-E boundary........... 30 4.3 Refining study in the case of a fixed I-E boundary............... 3 4.4 Solution and error profiles for a fixed I-E boundary.............. 33 4.5 Solution profiles for a moving I-E boundary.................. 34 4.6 Test of AIM-STD in the linear case (contact discontinuity).......... 40 4.7 Test of AIM-STD in the linear case (sine wave)................ 41 4.8 Test of AIM-STD in the quasi-linear homogeneous case............ 44 4.9 Test of AIM-STD in the quasi-linear heterogeneous case............ 48 5.1 Test of the AIM-STD-FL scheme........................ 56 5. Test of the AIM-BE-FL scheme........................ 57 5.3 Test of the AIM-BE/TRK-FL scheme.................... 58 5.4 Test of the AIM-CRK-WENO scheme.................... 6 5.5 Reference solution in a quarter five-spot.................... 64 5.6 Miscible flow solution using the BE-UW1 scheme............... 67 5.7 Miscible flow solution using the AIM-TRK-WENO scheme......... 68 5.8 Fractional flow curves and reference solution.................. 70 5.9 Immiscible flow solution using the AIM-TRK-WENO scheme....... 71 5.10 Test of the TRK-WENO scheme with artificial viscosity.......... 73 viii

A.1 Test results with the ecrk-cs scheme.................... 86 A. Test results with the BE-FL scheme...................... 87 A.3 Test results with the TRK-ENO scheme................... 88 A.4 Test results with the BDF-WENO scheme.................. 89 A.5 Test results with the DIRK3-ENO3 scheme................... 90 A.6 Test results with the IRK-WENO scheme.................. 91 B.1 Modulus of λ + (left) and λ (right)....................... 96 ix

Chapter 1 Introduction The success of the Adaptive Implicit Method (AIM) in Reservoir Simulation is mostly due to its increased efficiency compared to the Implicit Pressure and Explicit Saturation (IMPES) or the Fully Implicit (FIM) formulations. The basic idea of an AIM formulation is to treat some of the unknowns implicitly and the other ones explicitly. The choice of the implicit variables is usually based on linearized stability criteria (see [8] and [6]). Sometimes the user can also specify the percentage of blocks that should be treated implicitly, which gives control over the computational cost of the simulation. In practice, AIM has been successfully applied to a wide range of problems, ranging from simple Black-Oil models to complex compositional flow problems (see [6], [8] and [31]). In most cases, AIM appears to be much more efficient than IMPES or FIM (see [9]). Indeed, the time step restriction of an IMPES formulation can be very severe for instance in the near-wellbore region, where the grid is usually refined and the velocity is high. But in the case of AIM, the near-wellbore grid blocks are automatically treated implicitly, and thus the time step size can be much larger. On the other hand, the computational cost of FIM may be very high for large scale compositional simulations, which require the inversion of large systems of equations. For these large scale problems, the computational effort in AIM is often reduced substantially because only the blocks where the stability condition is violated are solved implicitly. However, the standard AIM discretization is only first-order accurate. Therefore we propose to investigate high-order extensions of this method, aiming to increase the resolution and lower the computational cost. High-order methods are of particular interest to simulate complex flow patterns, such as viscous fingering and density driven instabilities, which may occur for instance during the injection of supercritical CO in a deep saline aquifer. Moreover, 1

CHAPTER 1. INTRODUCTION high-order methods are generally more efficient than first-order methods because a coarser grid can be used for the same level of accuracy. High-resolution Method of Lines (MOL) schemes are constructed from highly accurate spatial and temporal discretizations. In Chapter, we present high-order numerical fluxes, including flux limiting, ENO and Central schemes. In Chapter 3, we introduce high-order time integration methods, such as Runge-Kutta and Linear Multistep methods. These highly accurate space and time discretizations lead to high-resolution MOL schemes, which serve as a framework for high-order AIM. A detailed numerical analysis of standard AIM is given in Chapter 4. Our analysis reveals an inconsistency at the implicit-explicit boundaries. The propagation of these discretization errors is studied through a linear error analysis. We also prove several important results regarding the monotonicity properties of standard AIM. These results are confirmed by numerical experiments. Chapter 4 concludes with a consistency fix that preserves the accuracy at the I-E boundaries. In Chapter 5, we propose a methodology to construct AIM formulations based on highly accurate MOL schemes. Fully high-order AIM schemes are derived, and numerical results are provided for one-dimensional and two-dimensional problems of interest. Finally, we present an artificial viscosity approach to eliminate the spurious oscillations due to the violation of the monotonicity restriction in the implicit regions. Our conclusions are given in Chapter 6.

Chapter High-order spatial discretizations.1 Mathematical model We are interested in solving the following nonlinear convection-diffusion equation describing the transport of an incompressible fluid (e.g., water) in a porous medium: (φs w ) t + (f w u t ) = (h w S w ), (.1) where S w is the water saturation, u t the total velocity, f w the fractional flow of water (which may include gravity effects), and h w a diffusivity coefficient that accounts for capillary effects. In general, both f w and h w are strongly nonlinear functions of S w. When viscous forces dominate, capillary effects can be neglected, which is mostly valid at the field scale. However, at smaller scales these effects need to be modelled in order to capture the correct shape of the saturation front. In this case, the diffusive term can be discretized with central differences (of order two or higher if necessary). Implicit treatment is often required because explicit discretizations lead to a severe time step restriction of the form t α x, where α is a physical parameter and x the smallest grid size. The nonlinear convective term requires a more sophisticated treatment because the local direction of propagation must be taken into account, and the nonlinearity may cause discontinuities to appear in the solution profile even for a smooth initial condition. A great deal of effort has been devoted through the last two decades to the development of high-resolution shock-capturing schemes for hyperbolic conservation laws. In the following sections, three important types of flux discretizations are introduced, namely the flux limiting, ENO and 3

4 CHAPTER. HIGH-ORDER SPATIAL DISCRETIZATIONS Central schemes. These numerical schemes are of special interest to us because of their semidiscrete conservative forms, non-oscillatory properties and computational efficiency. For the presentation of these schemes, we will consider the one-dimensional version of (.1) in the homogeneous case without diffusion, which we write in dimensionless form as s t + f(s) x = 0, (.) where s is the conserved quantity and f the flux function. As we will see in the next chapter, within the MOL framework, multidimensional extensions of those algorithms are straightforward.. Flux limiting schemes Flux limiting methods were developed in the context of Total Variation Diminishing (TVD) schemes. The total variation of a numerical approximation s = (s i ) i Z is defined as TV(s) = i Z s i+1 s i, (.3) and a numerical scheme is said to be TVD if TV(s n+1 ) TV(s n ). (.4) A wide class of high-order TVD schemes are derived from the modified flux and flux limiting methods (see [7]). The basic idea of the modified flux approach is to apply a firstorder scheme to the modified equation of order two associated with this scheme, but with a viscous term of opposite sign (i.e., with an anti-diffusive term). Meanwhile, the flux limiting approach consists in adding a nonlinear antidiffusion term to a first-order numerical flux, or equivalently, a diffusive term to the second-order Lax-Wroff scheme. To illustrate the idea of flux limiters let us consider the linear advection equation, assuming that the flow is left to right: s t + s x Applying the first-order Upwind scheme we obtain = 0. (.5)

.. FLUX LIMITING SCHEMES 5 while the Lax-Wroff scheme yields s n+1 i = s n i ν s n, (.6) i 1 s n+1 i = s n i ν ( ) s n + s n + ν i 1 i+ 1 ( sn s n ). (.7) i+ 1 i 1 In the above equations, ν is the Courant number given by ν = t/ x, and the operator is defined by s i+ 1 = s i+1 s i (hence, s i 1 = s i s i 1 ). Rewriting (.7) as s n+1 i = s n i ν s n i 1 1 ν (1 ν) ( sn i+ 1 s n i 1 ), (.8) we observe that the Lax-Wroff scheme amounts to adding an antidiffusion term to the Upwind scheme. This term makes the Lax-Wroff scheme second-order accurate but it is also known to create spurious oscillations in the presence of sharp gradients. In order to obtain a second-order TVD scheme, one can impose a limiter to this antidiffusion term. This procedure should be applied mostly in the regions of steep concavity change, i.e., where the value of the second derivative is large. Hence the flux limiter is a function of the ratio of two consecutive gradients. Applying this idea to (.8) leads to s n+1 i = s n i ν s n i 1 1 ν (1 ν) (φn i+ 1 s n i+ 1 φ n i 1 s n i 1 ), (.9) where φ is the flux limiter function, i.e., φ n i+ 1 = φ(r n ), r n i+ 1 i+ 1 = s n / s n. (.10) i 1 i+ 1 One can show that under the following conditions on the limiter function: φ(r) = 0 if r 0, 0 φ(r) min(, r) if r > 0, φ(1) = 1, the scheme (.9) is TVD. Common examples of flux limiters are given in [7], for instance: - φ(r) = max{0, min(r, 1)} (Minmod) - φ(r) = max{0, min(r, 1), min(r, 1)} (Superbee) - φ(r) = max{0, min( 1 (1 + r), r, )} (Monotonized Center) (.11)

6 CHAPTER. HIGH-ORDER SPATIAL DISCRETIZATIONS - φ(r) = r + r 1 + r (Van Leer). An important drawback of these TVD schemes is that they become first-order accurate near nonsonic extrema, i.e., where s i 1 s i+ 1 < 0 and f (s i ) 0. In addition, these TVD schemes are formulated as direct space-time discretizations (DST schemes). Hence highly accurate time integration is achieved by replacing the high-order time derivatives with highorder spatial derivatives. But this procedure deps on the particular form of the PDE and can become very complex for multidimensional problems. Moreover the notion of a TVD scheme is only well-defined in one dimension. Flux limiting schemes can also be formulated in a semi-discrete conservative form. For example, the flux limiting discretization based on the midpoint flux leads to where F i+ 1 d dt s i(t) = F i+ is the numerical flux defined by 1 (t) F i 1(t), (.1) x F i+ 1 = f(s (t) i (t)) + 1 φ i+ 1 (t) [f(s i+1 (t)) f(s i (t))]. (.13) Here the flux limiter φ deps on the ratio of successive flux differences: φ i+ 1 = φ(r i+ 1), r i+ 1 = f i 1/ f i+ 1. (.14) In smooth regions this flux approximation becomes equivalent to the midpoint or two-point upstream weighting scheme, hence it is second-order accurate..3 ENO and WENO schemes Essentially non-oscillatory (ENO) schemes are high-order shock-capturing schemes for systems of conservation laws. They belong to the class of semi-discrete conservative schemes described by (.1). In their original form, ENO schemes were based on the cell averages (see [5]), but more recently a flux based approach was developed (see [7]). The flux approach has become more popular because it is computationally more efficient, especially for multidimensional problems. ENO schemes usually employ an adaptive upwind-biased stencil to construct a polynomial approximation of the local flux function. The derivation of these schemes is based on the existence of a primitive function h implicitly defined by

.3. ENO AND WENO SCHEMES 7 By differentiation of (.15) we have f(u(x)) = 1 x x+ x/ x x/ h(ξ) dξ. (.15) f(u(x)) x = h(x + x/) h(x x/) x, (.16) so the numerical flux can be obtained from a polynomial reconstruction of h evaluated at x = x i+ 1. In fact, a non-oscillatory polynomial interpolant is calculated for a primitive H of h. The polynomial is constructed from the table of divided differences of H which is initialized by (.15): H(x i+1/ ) H(x i 1/ ) x = f(u i ). (.17) The details of the algorithm can be found in [3]. Once the r-th order polynomial interpolation Q r is constructed, the numerical flux is given by ˆf i+1/ = dq r dx. (.18) x=xi+1/ This algorithm is called the ENO-Roe scheme. It is r-th order accurate, except near sonic points where the sign of f (s) changes. In fact, the ENO-Roe scheme can lead to entropy violating solutions, e.g., stationary expansion waves with a jump discontinuity. This problem can be avoided by applying the so-called entropy fix, which amounts to a local splitting of the flux function: f ± (s) = 1 (f(s) ± α i+ 1 s), α i+ 1 Note that this splitting of f ensures that df + /ds > 0 and df /ds < 0. = max s i s s i+1 f (s). (.19) Below we give the tables of coefficients for the calculation of ˆf i+1/ based on different stencils. For r = the index k refers to the -point stencil S k = (x i+k 1,x i+k ), while for r = 3, it refers to the 3-point stencil S k = (x i+k,x i+k 1,x i+k ). Note that the formulas are symmetric with respect to x i+1/ and also that the sum of each row is equal to 1.

8 CHAPTER. HIGH-ORDER SPATIAL DISCRETIZATIONS k f i 1 f i f i+1 f i+ 0-1/ 3/ 0 0 1 0 1/ 1/ 0 0 0 3/ -1/ k f i f i 1 f i f i+1 f i+ f i+3 0 1/3-7/6 11/6 0 0 0 1 0-1/6 5/6 1/3 0 0 0 0 1/3 5/6-1/6 0 3 0 0 0 11/6-7/6 1/3 Table.1: Stencil weights for the nd -order (r = ) and 3 rd -order (r = 3) ENO schemes. For r =, the integer k corresponds to the stencil S k = (x i+k 1, x i+k ), while for r = 3, it corresponds to S k = (x i+k, x i+k 1, x i+k ). The idea of weighted ENO schemes (WENO) is to compute the numerical flux as a linear combination of each local stencil, rather than using the smoothest stencil only. The weights of each stencil are calculated from a smoothness indicator, so that the contribution of a smooth stencil is higher than that of a stencil in a steep region of the solution. Additional restrictions are imposed in order to obtain the optimal accuracy in smooth regions. The smoothness indicators are defined to preserve the non-oscillatory property near discontinuities or sharp gradients. In particular, the weight assigned to a nonsmooth stencil should be close to zero. One possibility is to define the smoothness indicator IS k of a given stencil S k using the L - norm of the derivatives of the local polynomial reconstruction (see [13] for more details). In general the weight of S k is given by ω k = α k α 0 + + α r 1, α k = C r k (ǫ + IS k ) p, (.0) where C r k is the optimal weight associated with S k, ǫ is a small parameter to prevent any division by zero, and p a tuning parameter (generally taken equal to ). For example, the second-order WENO flux written for f > 0 reads ˆf i+ 1 = (ω 0 ) i+ 1 [ 1 f i 1 + 3 ] f i + (ω 1 ) i+ 1 [ 1 f i + 1 ] f i+1, (.1) where (ω 0 ) i+ 1, (ω 1 ) i+ 1 are the weights associated with the stencils (i 1,i) and (i,i + 1) respectively. These weights are computed according to (.0) with the following smoothness indicators: (IS 0 ) i+ 1 = (f i f i 1 ), (IS 1 ) i+ 1 = (f i+1 f i ). (.)

.4. CENTRAL SCHEMES 9 The first advantage of the WENO approach is a higher accuracy in the smooth regions. Indeed, for the same degree r of the polynomial reconstruction, the basic ENO-Roe scheme is of order r, whereas the WENO scheme is of order r 1 (note that r 1 points are used in the numerical flux calculation instead of r). In addition, WENO schemes are more robust than ENO schemes since the risk of choosing the wrong stencil due to rounding errors is eliminated. Finally, the computational cost of WENO schemes can be significantly reduced on vectorial computers. Indeed, as opposed to ENO schemes, WENO schemes do not require the use of logical statements..4 Central Schemes High-order central schemes can be seen as natural extensions of the first-order Lax-Friedrichs scheme given by s n+1 i = 1 (sn i+1 + s n i 1) t ( f(s n x i+1 ) f(s n i 1) ). (.3) This scheme simply uses central differences, therefore it is very efficient. However, it suffers from excessive numerical dissipation. In order to achieve higher levels of accuracy, central schemes use high-order piecewise polynomial reconstructions based on the cell averages, which are evolved exactly in time and projected back onto the grid. The non-oscillatory behavior results from the use of nonlinear slope limiters. To illustrate the derivation of central schemes, we present the second-order central scheme originally developed by Nessyahu and Tadmor (called the NT scheme, see [16]). First the piecewise linear reconstruction of the numerical solution at t = t n is given by s(x,t n ) = i [ s n i + (s x ) n i (x x i )] χ i (x), (.4) where s n i is the cell average on the interval K i = [x i 1/,x i+1/ ], χ i (x) is the characteristic function of K i and (s x ) n i is a reconstructed slope. The latter is based on the adjacent cell averages, for instance ( (s x ) i = MM θ sn i+1 s n i x where θ is a parameter and MM is the Min-Mod function: ), sn i+1 s n i 1,θ sn i s n i 1, (.5) x x

10 CHAPTER. HIGH-ORDER SPATIAL DISCRETIZATIONS min i (x i ) if x i > 0, i MM(x 1,...,x n ) = max i (x i ) if x i < 0, i 0 otherwise. (.6) From the integral formulation of (.) on K i+ 1 [t n,t n+1 ], we have s n+1 i+ 1 = 1 s(x,t n )dx 1 t n+1 [f(s(x i+1,t)) f(s(x i,t))] dt. (.7) x K x i+ 1 t n Using the midpoint rule for the flux integrals, we get i+1/ = 1 ( sn i + s n i+1) + x ( (sx ) n i (s x ) n t ( n+ 8 i+1) f(s 1 i+1 x ) f(sn+1 i ) ), (.8) s n+1 where the mid-values s n+1 i are provided by the predictor step s n+1 i = s n i t (f x) n i. (.9) Here (f x ) n i is a reconstructed slope computed like (s x ) n i. Note that the average is obtained on a staggered grid, and also that the cell averages and pointwise values can be identified because this scheme is of order. The NT scheme was improved by Kurganov and Tadmor [17] by using the local speed of propagation to compute the cell averages on variable size intervals. They also proposed a semi-discrete version derived by taking the limit when t 0 of their fully discrete scheme. This leads to the conservative form (.1) where and F i+ 1 (t) = 1 [ ] f(s + (t)) + f(s i+ 1 i+ 1 (t)) a i+ 1 (t) [ ] s + (t) s, (.30) i+ 1 i+ 1 (t) s + (t) = s i+ 1 i+1 (t) x (s x) i+1 (t), s (t) = s i+ 1 i (t) + x (s x) i (t). (.31) The main advantage of Central schemes over high-order Upwind schemes (such as ENO or WENO) is their simplicity and computational efficiency. Although not presented here, higher order Central schemes are available, including in multi-dimensions (see [14] and [15]).

.5. OTHER DISCRETIZATIONS 11.5 Other discretizations A number of other spatial discretizations can be found in the literature of hyperbolic systems. For instance, we refer to the family of Godunov schemes, compact WENO schemes (see for example [18]) and spectral methods. But in general these numerical schemes do not have a conservative semi-discrete form, hence they are not adequate for the purpose of this study. The next chapter presents high-order time integration methods that can be applied in a Method of Lines (MOL) framework. Using a highly accurate time integration is just as important as using a high-resolution numerical flux in order to obtain a fully high-order method. In addition, the time integration is critical in Reservoir Simulation practice, because we need implicit methods that are highly stable and robust even for very large time steps.

Chapter 3 Method of Lines and time integration 3.1 MOL framework The idea of the Method of Lines is to transform the PDE (.1) into a system of first-order ODE s. The general formulation can be written as ds (t) = L(t,s(t)), (3.1) dt where s is the vector of unknowns at each grid block center and L represents the discretized spatial operator. To keep the presentation simple, we will ignore the explicit time depence of this operator, although it may appear for instance when dealing with source terms. In the previous chapter, we introduced the notion of a conservative semi-discrete scheme for the one-dimensional transport equation (see (.1)). This semi-discrete form corresponds to the MOL formulation (3.1) where the operator L is given componentwise by L i (s) = 1 x (F i+ 1 (s) F i 1(s)). (3.) Here the numerical flux F i+ 1 is defined for instance by a flux limiting, ENO or Central discretization. As opposed to DST schemes, MOL schemes are easy to ext to general convection-diffusion-reaction equations and to multidimensional problems. Moreover, highorder time accuracy is achieved indepently of the discrete spatial operator, and one can take advantage of the most efficient ODE solvers for various physical problems. In the example below, we illustrate the MOL treatment of the convection-diffusion equation (.1) in two dimensions on a uniform cartesian grid. Using a ENO discretization for the convective 1

3.. ONE-STEP METHODS 13 term and central differences for the diffusive term we obtain where φ i,j ds i,j dt (t) = L i,j(s(t)), (3.3) L i,j (s) = 1 [ ˆfx i+ x 1,j(s) ˆf ] x i 1,j(s) + 1 ] [Q xi+ x 1,j(s) Qxi 1,j(s) 1 y + 1 y [ ˆfy i,j+ (s) ˆf ] y (s) 1 i,j 1 [ Q y (s) Q y i,j+ 1 i,j 1 (s) ]. (3.4) Here ˆf x is constructed according to the one-dimensional ENO-Roe algorithm along the i+ 1,j j-th slice in y, and similarly for ˆf y, along the i-th slice in x. The diffusive term in x is i,j+ 1 given for instance by Q x i+ 1,j(s) = (h s i+1,j s i,j w) i+ 1,j, (3.5) x and a similar expression holds for Q y. i,j+ 1 In the following sections, we give a brief overview of the most common time integration schemes, with the view of applying them to our general transport equation. Detailed references on the topic can be found in [11] and [1]. 3. One-step methods In one-step methods the numerical solution at t = t n+1 is calculated from the last approximation at t = t n only. The most common one-step methods are given by the Runge-Kutta (RK) schemes, which admit the following general form: s n+1 = s n + t s (i) = s n + t k b i L(s (i) ), (3.6) i=1 k a ij L(s (j) ), i = 1,...,k. (3.7) j=1 Here k is the number of stages, and s (i) is the approximation at the intermediate time t (i) = t n + c i t. A compact notation for RK schemes is given by the Butcher array

14 CHAPTER 3. METHOD OF LINES AND TIME INTEGRATION c A b T where c = (c 1,...,c k ) T, b = (b 1,...,b k ) T and A = (a ij ) 1 i,j k. If a ij = 0 for j i, the method is explicit, and therefore it is computationally very efficient. On the other hand, implicit methods generally require the solution of km km systems of nonlinear algebraic equations (here m is the number of discretization nodes), but they have better stability properties. The stability of RK schemes can be studied through the function R(z) = 1 + zb T (I za) 1 e, (3.8) where e = (1,...,1) T. This function is derived from the linear scalar case s (t) = λs(t) which gives s n+1 = R(λ t)s n. The stability condition of a given RK scheme can be visualized by plotting the stability region S = {z C, R(z) 1} in the complex plane. An important advantage of RK methods is that they satisfy the conservation property, i.e., if v T L(s) = 0 for a constant vector v and for all s, then v T s n+1 = v T s n. In particular, this guarantees that for any discrete spatial operator written in conservative form, the time integration, and thus the overall scheme, is mass conservative (in this case the components of v are given by the grid block sizes). Classical second-order RK schemes are given by the explicit trapezoidal rule s n+1 = s n + t L(sn ) + t L(sn + tl(s n )), (3.9) and the explicit midpoint rule s n+1 = s n + tl(s n + t L(sn )). (3.10) An example of a TVD third-order explicit RK method is given by: s (1) = s n + tl(s n ), s () = 3 4 sn + 1 4 s(1) + t 4 L(s(1) ), (3.11) s n+1 = 1 3 sn + 3 s() + t 3 L(s() ). The trapezoidal and midpoint rules also admit second-order implicit versions, respectively given by

3.. ONE-STEP METHODS 15 and s n+1 = s n + t L(sn ) + t L(sn+1 ), (3.1) s n+1 = s n + tl ( 1 (sn + s n+1 ) ). (3.13) Below we give another example of a second-order implicit RK scheme: s n+1 = s n + b 1 tl(s (1) ) + b tl(s () ) s (1) = s n + a 11 tl(s (1) ) + (c 1 a 11 ) tl(s () ) s () = s n + b 1 tl(s (1) ) + b tl(s () ), (3.14) where a 11, b 1, b are parameters that satisfy the order conditions: b 1 + b = 1, b 1 = 1 (1 c 1 ). (3.15) For the particular choice a 11 = 5/1, c 1 = 1/3 we obtain the Radau scheme (collocation method) which is third-order accurate. Otherwise, if we impose 0 c 1 1/ and a 11 b 1 then we obtain an AN f (0)-stable method, which is a particular form of stability related to the contractivity property (see []). This RK scheme can have good stability properties but it requires the solution of a m m system, as opposed to an m m system for the trapezoidal and midpoint rules. Higher order implicit methods are generally too costly in practice unless they admit a particular form where the matrix A is lower diagonal, i.e., A ij = 0 for j > i. In this case, we need to solve k successive systems of m equations rather than one simultaneous system of mk equations. Such methods are known as Diagonally Implicit Runge-Kutta schemes (DIRK). A common example is given by s n+1 = s n + t L(s(1) ) + t L(s() ) s (1) = s n + γ tl(s (1) ) s () = s n + (1 γ) tl(s (1) ) + γ tl(s () ), (3.16) where γ is a positive parameter. The above method is unconditionally stable for γ > 1/4, third-order accurate if γ = 1/ ± 3/6 and second-order accurate otherwise.

16 CHAPTER 3. METHOD OF LINES AND TIME INTEGRATION 3.3 Linear Multistep methods The idea of Linear Multistep methods is to use information not only from the last approximation s n, but also from previous time steps. The general formalism of such methods is described by k a i s n+i = t i=0 k b i L(s n+i ). (3.17) The above formula means that the approximation s n+k is computed from s n,...,s n+k 1. For consistency, we need to impose i=0 k a i = 0, (3.18) i=0 which also guarantees the conservation property like in the case of RK methods (this is easily shown recursively). Order conditions for high-order Linear Multistep methods can also be derived analytically. As for stability properties, they can be studied through characteristic polynomials (see [11] for more details). The clear advantage of Linear Multistep methods over RK schemes is their computational efficiency, since they require fewer function evaluations in the explicit case and smaller systems to invert in the implicit case. However, a special starting procedure is required to initialize this type of time integration scheme because of the depency on multiple previous time steps. Moreover, the application of these methods with variable time steps is not as straightforward as in the case of RK methods. General families of Linear Multistep methods are given by the Adams methods for which a k = 1, a k 1 = 1, and a i = 0 (i < k 1), and the implicit Backward Differentiation Formula (BDF) for which β k = 1 and β i = 0 (i < k). A classical example is given by the second-order BDF method which is a 3-level scheme: 3 sn+ s n+1 + 1 sn = tl(s n+ ), (3.19) and its explicit counterpart obtained by extrapolation of the right-hand side: 3 sn+ s n+1 + 1 sn = tl(s n+1 ) tl(s n ). (3.0)

3.3. LINEAR MULTISTEP METHODS 17 An example of a multi-level scheme with adaptive time stepping is discussed in [3]. Applied to the one-dimensional transport equation, it reads: (1 + β) δ ts n+1 i t βδ ts n i n+1 t = 1 { n+1 θ ˆf n i + (1 θ + φ) x ˆf i n φ } n 1 ˆf i. (3.1) In the above equation, δ t s n i = s n i s n 1 i and ˆf i = ˆf i+ 1 ˆf i 1, where ˆf i+ 1 is a high-order numerical flux (e.g., WENO). Here the consistency condition (3.18) still holds. So like in the case of a uniform time step size, mass conservation is guaranteed as long as the initialization procedure conserves mass. In order to ensure second-order accuracy in time, the parameter β must satisfy β = (θ 1) tn+1 + φ t n t n + t n+1. (3.) Let us derive this condition for the case φ = 0. For a second-order numerical flux we can write 1 [ ˆfn i+ x ˆf ] n = [f(s) 1 i 1 x ] n i + O( x ), (3.3) and the same Taylor series expansion can be written at the time level n + 1. So 1 { n+1 θ ˆf i + (1 θ) x ˆf } i n = θ [f(s) x ] n+1 i + (1 θ) [f(s) x ] n i + O( x ) = [f(s) x ] n i + θ tn+1 [f(s) xt ] n i + O( x ). (3.4) For the time derivatives, denoting h = max( t n, t n+1 ), we can write and similarly s n+1 i t n+1 s n i = (s t ) n i + tn+1 (s tt ) n i + O(h ), (3.5) so that s n i s n 1 i t n = (s t ) n i tn (s tt) n i + O(h ), (3.6) (1 + β) δ ts n+1 ) i t βδ ts n i n+1 t = (s t) n n i + ((1 + β) tn+1 + β tn (s tt ) n i + O(h ). (3.7)

18 CHAPTER 3. METHOD OF LINES AND TIME INTEGRATION Adding (3.4) and (3.7) and noting that s t = f(s) x, we obtain the truncation error ( ) E = θ t n+1 [f(s) xt ] n i + (1 + β) tn+1 + β tn (s tt ) n i + O( x ) + O(h ). (3.8) Since f(s) xt = s tt, the second-order condition is which reduces to (3.), as desired. θ t n+1 = (1 + β) tn+1 + β tn, (3.9) For β 0, (3.1) is a three-level scheme. If θ = 1 and φ = 0 it gives a more general version of the second-order BDF scheme allowing variable time steps. On the other hand, if β = φ = 0, we obtain the classical θ-scheme and the order condition (3.) imposes that θ = 1/. This corresponds to the Crank-Nicolson scheme, which can actually be used to initialize the three-level scheme. 3.4 Positivity property Different monotonicity properties can be associated with a numerical approximation, such as the maximum principle, positivity, contractivity, non-oscillatory and TVD properties. In this section, we focus our attention on the positivity property which is important when dealing with component concentrations or phase saturations. The ODE system (3.1) is said to be positive if for any positive initial condition, the solution remains positive at all times: s(0) 0 s(t) 0, t > 0. (3.30) The spatial discretizations introduced in the previous chapter generally lead to a positive ODE system. But positivity must be preserved by the time integration as well. Otherwise, the MOL scheme is likely to produce negative values and spurious oscillations, even if the spatial discretization is non-oscillatory. Our objective is to test the positivity property for the various implicit methods presented earlier in this chapter. Our test problem is the linear advection equation discretized in space by the first-order Upwind scheme. In this case, assuming periodic boundary conditions, the discrete spatial operator is given by the matrix

3.4. POSITIVITY PROPERTY 19 Λ = 1 x 1 0... 0 1 1......... 0 0..................... 0...... 1 1. (3.31) The corresponding ODE system is clearly positive because all the off-diagonal entries of Λ are positive. In the linear case, any RK scheme reads s n+1 = R( tλ)s n, (3.3) where R is the associated stability function. From this form follows the stability condition λ k t S for all the eigenvalues λ k of Λ, where S is the stability region of R. For this particular problem with Λ given by (3.31), all the implicit RK schemes introduced previously are unconditionally stable. Indeed, it can be shown that all the eigenvalues of Λ have negative real parts, while the half complex plane R(z) < 0 is contained in the stability region. So in theory, arbitrary time step sizes can be used. For our test problem we can rewrite the implicit trapezoidal rule (3.1) as and the midpoint rule (3.13) as s n+1 = (Id t Λ) 1 (Id + t Λ)sn, (3.33) s n+1 = [ Id + tλ(id t ] Λ) 1 s n. (3.34) It is easy to check that in this particular case the two methods are equivalent (noting that (Id + t t Λ) and (Id Λ) 1 commute). The IRK method (3.14) leads to s n+1 = [Id tλ(b Id + b 1 (c 1 a 11 ) tλθ)] 1 [Id + b 1 tλθ]s n, (3.35) where Θ = (Id a 11 tλ) 1, while the DIRK method (3.16) gives where Θ = (Id γ tλ) 1. [ s n+1 = Id + t ] ΛΘ (Id + (1 γ) tλθ) s n, (3.36)

0 CHAPTER 3. METHOD OF LINES AND TIME INTEGRATION Finally we want to test the implicit BDF scheme (3.19). Although it is not a one-step method, it is useful to rewrite it in matrix form: s n+1 = ( 3 Id tλ) 1 (s n 1 sn 1 ). (3.37) Figures (3.1), (3.), (3.3) and (3.4) show the simulation results obtained with the sharp initial profile s(x, 0) = [sin(πx)] 100. The abbreviated names TRK, IRK, DIRK3 and BDF refer to the implicit methods (3.33), (3.35), (3.36) and (3.37) respectively. For the DIRK3 scheme we used γ = 1/+ 3/6, while for the IRK scheme we used a 11 = 5/1, c 1 = 1/3, b 1 = 3/4 and b = 1/4. For each implicit scheme, the numerical solution was calculated with CFL = and CFL = 6. 1 CFL= TRK MOC 1 CFL=6 TRK MOC 0.8 0.8 0.6 0.6 u u 0.4 0.4 0. 0. 0 0 0 0. 0.4 0.6 0.8 1 x 0 0. 0.4 0.6 0.8 1 x Figure 3.1: Linear advection test with the TRK method 1 CFL= IRK MOC 1 CFL=6 IRK MOC 0.8 0.8 0.6 0.6 u u 0.4 0.4 0. 0. 0 0 0 0. 0.4 0.6 0.8 1 x 0 0. 0.4 0.6 0.8 1 x Figure 3.: Linear advection test with the IRK method

3.4. POSITIVITY PROPERTY 1 1 CFL= DIRK3 MOC 1 CFL=6 DIRK3 MOC 0.8 0.8 0.6 0.6 u u 0.4 0.4 0. 0. 0 0 0 0. 0.4 0.6 0.8 1 x 0 0. 0.4 0.6 0.8 1 x Figure 3.3: Linear advection test with the DIRK3 method 1 CFL= BDF MOC 1 CFL=6 BDF MOC 0.8 0.8 0.6 0.6 u u 0.4 0.4 0. 0. 0 0 0 0. 0.4 0.6 0.8 1 x 0 0. 0.4 0.6 0.8 1 x Figure 3.4: Linear advection test with the BDF method For CFL =, the positivity of the solution is respected, except for the BDF scheme which already produces negative values. For CFL = 6 we observe that all the methods become oscillatory or non-positive, but not to the same degree. In particular the IRK method violates the positivity property very slightly and does not show any oscillations. Meanwhile, all the other methods are clearly non-positive and oscillatory. In fact, the positivity limit for the DIRK3 and IRK methods deps on the choice of the scheme coefficients. For instance, by choosing a value of γ close to 1/4 we can improve the positivity restriction of the DIRK3 method for this particular problem. More importantly, the monotonicity restrictions of a given method dep on the problem it is applied to. For instance, these implicit methods would have different positivity restrictions if they were applied to a nonlinear transport equation.

CHAPTER 3. METHOD OF LINES AND TIME INTEGRATION Theoretical results about the positivity and contractivity properties of Runge-Kutta and Linear Multistep methods can be found in [9], [10] and [11]. The most important result is due to Bolley & Crouzeix (1978) who showed that there is an order barrier of one for unconditional linear positivity. In other words, any implicit Runge-Kutta or Linear Multistep method of order higher than two has a time step restriction for positivity. Among the time integration methods presented, only the Backward-Euler scheme is unconditionally positive because it is first-order accurate. This result is very important in the context of this study because we need to develop high-order methods for physical problems where the positivity of the solution must be preserved. 3.5 Other time integration methods Below we provide a non-exhaustive list of additional time integration methods that are commonly found in the literature of ODE systems and generally proven to be highly efficient. First, we refer to [11] for Rosenbrock methods, which are linearly implicit Runge-Kutta type methods. These methods can be very efficient for stiff problems, however they are not strictly mass conservative. In [0], a highly efficient explicit time marching algorithm based on the stability interval of Chebyshev polynomials is described. But this method is only advantageous for parabolic problems since the stability interval is maximized along the real axis. Recently, a new type of time integration method was introduced, which can violate the order one barrier for unconditional contractivity (a property closely related to positivity). These schemes, called diagonally split Runge-Kutta methods, are obtained as the limit of relaxation iterations of continuous extensions of RK methods (see [] and [1]). However they have been developed for dissipative ODE systems arising from the discretization of parabolic equations. Moreover, these schemes are not strictly mass conservative. Finally, a new approach called Multi-Adaptive Galerkin method was recently introduced by Anders Logg (see [19]). This approach seems very promising because it allows to use adaptive local time steps, however it is not directly applicable to high-order AIM. In Appix A, we present different high-order MOL schemes obtained by combining highorder time integration methods with high resolution numerical fluxes. Some test results are provided for the linear and quasi-linear cases. These numerical tests validate the MOL

3.5. OTHER TIME INTEGRATION METHODS 3 framework for the construction of high-order AIM. In particular, we observe a substantial reduction of the numerical dispersion compared to first-order methods. But before discussing high-order AIM extensions in more details, we present a numerical analysis of the standard AIM discretization. The main objective of the next chapter is to understand the numerical implications of combining implicit and explicit time integration methods, from the standpoint of accuracy, stability and monotonicity properties.

Chapter 4 Numerical analysis of standard AIM In this chapter, we focus our attention on the numerical behavior of the standard AIM discretization. First, we show that there is a local inconsistency at the transition between implicit and explicit regions. Then we perform a linear error analysis and deduce some important convergence properties. We also provide a series of results regarding the monotonicity properties of standard AIM, with a particular emphasis on the TVD property. Finally, we propose a consistency fix based on explicit predictors applied in the explicit regions, which will be useful for the construction of high-order AIM. 4.1 Local inconsistency The one-dimensional Buckley-Leverett problem without gravity and capillarity is described by (.). For simplicity we also assume that f (s) 0. The initial and boundary conditions are given by s(x, 0) = s wc, s(0,t) = s wi, (4.1) where s wc is the connate water saturation and s wi the inlet saturation. Let us consider the standard AIM discretization of (.) on a uniform grid of size m. We assume for clarity that the region to the left of block (i 0 ) is implicit, whereas the region to the right of it, including the block (i 0 ) itself, is explicit (cf. figure 4.1). Thus the number of implicit nodes is given by p = i 0 1 and the number of explicit nodes by q = m i 0 + 1. In terms of terminology, any boundary between an implicit and an explicit region will be called an I-E boundary. 4

4.1. LOCAL INCONSISTENCY 5 IMPLICIT EXPLICIT i 0 i 0 1 i 0 i 0 + 1 Figure 4.1: Schematic of an implicit-explicit (I-E) boundary For this configuration, the standard AIM scheme reads: 0 = sn+1 i s n i t 0 = sn+1 i t 0 = sn+1 i t s n i s n i + 1 [ f(s n+1 i ) f(s n+1 i 1 x )], i < i 0, (4.) + 1 x + 1 x [ f(s n i ) f(s n+1 i 1 )], i = i 0, (4.3) [ f(s n i ) f(s n i 1) ], i > i 0. (4.4) The numerical schemes in the implicit and explicit regions are respectively the Backward Euler and Forward Euler methods with single-point upstream weighting of the flux. They both have a leading truncation error of O( x)+o( t). Using this standard scheme, a local inconsistency arises at the transition between the implicit and explicit regions, i.e., at the interface between the blocks (i 0 1) and (i 0 ). Here, information propagates from left to right so the inconsistency occurs for block (i 0 ) where the ingoing and outgoing fluxes are evaluated at different time levels. The truncation error at this location is derived below using Taylor series expansions. We denote by s the exact solution to the IBVP (.)-(4.1). Let f i n = f( s n i ), and let ( f ) n i, ( f ) n i be similar notations for the derivatives. We have and s n i 0 = s n+1 i 0 t( s t ) n+1 i 0 + 1 t ( s tt ) n+1 i 0 + O( t 3 ), (4.5) It follows that s n+1 i 0 1 = sn+1 i 0 x( s x ) n+1 i 0 + 1 x ( s xx ) n+1 i 0 + O( x 3 ). (4.6) f i n n+1 0 f i 0 t [ ] n+1 = s t f + t [ ] n+1 s tt f + ( s t ) f + O( t ), (4.7) i 0 i 0

6 CHAPTER 4. NUMERICAL ANALYSIS OF STANDARD AIM and f n+1 n+1 i 0 1 f i 0 x From (4.5) we also have [ ] n+1 = s x f + x [ ] n+1 s xx f + ( s x ) f + O( x ). (4.8) i 0 i 0 s n+1 i 0 s n i 0 = ( s t ) n+1 i t 0 t ( s tt) n+1 i 0 + O( t ). (4.9) Multiplying (4.7) by t/ x and then subtracting (4.8), it yields f i n n+1 0 f i 0 1 = t x x [ s f t ] n+1 i 0 + [ s x f ] n+1 i 0 + O( x) + O( t / x). (4.10) Finally, adding up (4.9) and (4.10) we obtain the truncation error E n i 0 = ( s t ) n+1 i 0 t x [f( s) t] n+1 i 0 + [f( s) x ] n+1 i 0 + O( x) + O( t) + O( t / x), (4.11) which can be simplified by canceling out the first and third terms: Ei n 0 = t x [f( s) t] n+1 i 0 + O( x) + O( t) + O( t / x). (4.1) The above equation indicates that the standard AIM discretization is inconsistent at the transition from an implicit to an explicit region. Similarly, it is inconsistent at the transition from an explicit to an implicit region. Hence the standard AIM discretization is inconsistent at every I-E boundary. At this point it is important to recall that by construction the standard AIM scheme is stable, so we do not expect the discretization errors at the various I-E boundaries to be amplified with time. Nevertheless, the accuracy of the scheme may be affected by these errors. Moreover, convergence is not guaranteed a priori because the Lax equivalence theorem does not apply. In the following section, we present a linear error analysis that will allow us to understand how these discretization errors propagate and also to prove convergence for a particular case. 4. Linear error analysis To conduct this analysis we assume that f(s) = s and that the location of the I-E boundary remains fixed in time (i.e., i 0 is fixed). Let ε n i = s n i s(x i,t n ) denote the numerical error at

4.. LINEAR ERROR ANALYSIS 7 every grid node. Substituting s n i = s n i + ε n i into (4.), (4.3), (4.4), and neglecting the terms of order two or higher, we get: ε n+1 i ε n+1 i ε n+1 i ε n i t ε n i t ε n i t + 1 ( ) ε n+1 i ε n+1 i 1 = 0, i < i0, (4.13) x + 1 x + 1 x ( ) ε n i ε n+1 t i 1 = x ( s t) n+1 i, i = i 0, (4.14) ( ) ε n i ε n i 1 = 0, i > i0, (4.15) and due to the inlet condition we have ε n 0 = 0 for all n. Multiplying through by t and denoting the CFL number by λ = t, we obtain x (1 + λ)ε n+1 i λε n+1 i 1 = εn i, i < i 0, (4.16) ε n+1 i λε n+1 i 1 = (1 λ)εn i + λ t( s t ) n+1 i, i = i 0, (4.17) ε n+1 i = (1 λ)ε n i + λε n i 1, i > i 0, (4.18) which can be written in matrix form as AE (n+1) = BE (n) + S (n+1). (4.19) Here E is the error vector, A and B are m m matrices with non zero entries only on their main diagonal and first off-diagonal, and S is a source term due to the discretization error at the I-E boundary: S (n+1) i = { 0 i i 0 λ t( s t ) n+1 i i = i 0. (4.0) The matrix A can be written in the following form: A = ( A1 0 A I q ), (4.1) where I q is the q q identity matrix, A 1 the p p bidiagonal matrix given by