local time stepping

Upload: royb84

Post on 06-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Local Time Stepping

    1/30

    Local time stepping applied to implicit-explicit

    methods for hyperbolic systems

    F. Coquel, Q. L. Nguyen, M. Postel and Q. H. Tran

    November 13, 2007

    Abstract

    In the context of systems of nonlinear conservation laws it can be crucial

    to use adaptive grids in order to correctly simulate the singularities of the solu-

    tion over long time ranges while keeping the computing time within acceptable

    bounds. The adaptive space grid must vary in time according to the local smooth-

    ness of the solution. More sophisticated and recent methods also adapt the timestep locally to the space discretization according to the stability condition. We

    present here such a method designed for an explicit-implicit Lagrange projec-

    tion scheme, addressing physical problems where slow kinematic waves coexists

    with fast acoustic ones. Numerical simulations are presented to validate the al-

    gorithms in terms of robustness and efficiency.

    keywords: Hyperbolic PDE, Timevarying adaptive grid, Local Time Stepping, implicit-

    explicit

    1 Introduction

    Our scope of interest is the accurate numerical simulation of highly nonlinear con-

    servative laws. The solutions of such systems of PDEs exhibit localized and moving

    singularities which require costly numerical schemes. At the same time realistic ap-

    plications often require simulation of the phenomenon on very long time range. As

    developed in [1], we are interested in multiphase flows applications presenting the par-

    ticularity of two scale wavelengths: a slow kinematic one which is the phenomenon

    of interest for the engineers, and fast acoustic waves arising from the highly nonlinear

    physics. This will induce very small time steps when treated explicitly. This discrep-

    ancy between kinematic and acoustic speeds can be advantageously dealt with in a

    Lagrangian projection formulation, as detailed in [10, 9]. This allows to resolve the

    acoustic part of the solution with an implicit scheme, therefore relaxing the time step

    bound. The kinematic components are solved explicitly, ensuring in turn the requiredprecision.

    Laboratoire Jacques-Louis Lions, CNRS et Universite Pierre et Marie Curie, B.C. 187, 75252 Paris

    Cedex 05, FranceDepartement Mathematiques Appliquees, Institut Francais du Petrole, 1 et 4 avenue de Bois-Preau,

    92852 Rueil-Malmaison Cedex, France

    1

  • 8/3/2019 Local Time Stepping

    2/30

    This setup is a very good candidate for adaptive methods, such as the one intro-

    duced by Harten in the 1990s [14], which was specially designed for the speed-up of

    finite volume schemes. The gist of the method consists in analyzing the smoothness

    of the solution by performing a wavelet-like transformation. In the context of finite

    volume schemes this relies on a dyadic hierarchy of discretizations. The size of the

    coefficients in the multiscale basis is tested against a threshold parameter. This infor-

    mation on the local smoothness of the solution can be used in several manners. It cantrigger different numerical schemes, like limited non linear and costly fluxes in the

    vicinity of singularities and linear high order cheaper fluxes in smooth areas. It can

    also be used to design an adaptive grid by locally selecting the coarsest level of dis-

    cretization beyond which the coefficients are negligible. The adaptive grid must evolve

    at each time step in order to follow the displacement of the singularities of the solution.

    This evolution strongly relies on the hyperbolic nature of the equations that ensures a

    finite speed of propagation. The time step is monitored by the smallest space grid step

    and the CFL-like stability condition. Design and study of fully adaptive scheme can be

    found in [7, 16]. Use of the multiresolution technique is described at length in [12] and

    [1] and is also implemented in the Lagrangian case in [10, 11]. Simulations exhibits

    that it can significantly speed-up the computation.

    The goal of the present paper is to describe a further enhancement to the mul-

    tiresolution technique: the local time stepping. Numerical schemes designed on non

    uniform moving or fixed grids can be sped up by using different time steps in

    different areas of the grid, according to the local mesh size. First developments in this

    direction can be found in [19] for fixed non-uniform grid just before the development

    of Adaptive Mesh Refinement technique in [5, 4]. In the context of the multires-

    olution technique previously described, it has been developed and implemented for

    one-dimensional scalar conservation laws in [17] and extended to the two-dimensional

    shallow water equations in [15], with promising CPU time gains. A macro time step,

    fit for the coarsest level of discretization, is subdivided into intermediate time steps.

    At a given intermediate time step, the solution is updated only on cells belonging to

    the current synchronization level or finer. Transition zones are defined in order to dealwith the synchronization of the solution at the border between consecutive levels of

    discretization. Straightforward application of this method to our system of PDEs in

    the explicit scheme case, was first presented in [11]. It is now extensively tested for

    robustness and performances in this paper.

    We also endeavor here to adapt the local time stepping idea to our semi-implicit

    scheme, where two wave speeds interplay in the sense that fast acoustic waves are

    treated implicitly with a CFL condition number much larger than one, and kinematic

    waves are treated explicitly, with a time step verifying a standard CFL condition with

    a CFL number less than one. The resulting scheme departs from the original one in

    [17] and will be described in details. The implicit version of the local time stepping

    algorithm presented in [17], or an alternative to it described by the same authors in[18] cannot be readily applied to our problem where we have to deal with transient

    fast acoustic waves. In particular, the prediction of the adaptive grid from one time

    step to the next needs to take into account the fast wave speed. Another originality of

    our setup is the splitting of our operator into a Lagrangian step and an Euler projection

    step which requires some extra synchronization during the time integration.

    We first present the model equations and the numerical algorithms on a fixed non

    2

  • 8/3/2019 Local Time Stepping

    3/30

    uniform grid. The next section summarizes the multiresolution setup and its appli-

    cation to a finite volume scheme, as described at length in [12, 1]. The section 4

    is devoted to the local time stepping enhancement in the case of the explicit scheme.

    This part makes full use of the notations established in [17]. The semi-implicit scheme,

    which requires a new approach, is treated at last in section 5. Numerical simulations

    are described in sections 4.3 and 5.2. They allow to compare the efficiency of the differ-

    ent schemes with and without local time stepping, in term of accuracy and computingtime.

    2 Modeling of the physical problem

    Previous works have shown that a relaxation method can be used efficiently for numer-

    ical modeling of two-phase flow, see Baudin et al. [2]. Furthermore, it was shown that

    a semi-implicit version of the relaxation method is better suited for accurate descrip-

    tion of the transport phenomena than the explicit or implicit versions, see Baudin et

    al. [3]. A significant speed-up of the computation can be achieved by employing the

    adaptive multiresolution (MR) technique, see Coquel et al. [12]. Realistic simulations

    in varying geometry pipelines have demonstrated the ability of the model to capturecomplicated physical behavior, including the so-called severe slugging phenomenon

    (see Andrianov et al. [1]). We use here a a modified semi-implicit scheme based on a

    Lagrangian formulation, for which an explicit stability condition on the time step can

    be obtained, ensuring positivity of physical quantities (see [10, 11, 9]).

    The density of the mixture , velocity v and the gas mass fraction Y are solution of

    the following problem

    FindV in V = {V = (,Y, v) R, > 0, Y [0, 1], v R} s.t.

    t() + x(u) = 0,

    t(Y) + x(Y u) = 0,t(u) + x(u

    2 + P) = 0.(2.1)

    The thermodynamical closure law P(, Y) appearing in (2.1) can be in real applications

    very costly to evaluate, and should satisfy

    c2(V) = P(, Y)|Y > 0.

    Under this assumption, the system (2.1) is hyperbolic with three distinct eigenvalues

    u c < u < u + c. The intermediate eigenvalue corresponds to the slow transport

    wave and is linearly degenerated, the remaining ones are much bigger and correspond

    to genuinely nonlinear acoustic waves.

    Improving the previous numerical treatments of the system (2.1), the scheme weuse here ensures the positivity of the density and physical bounds on the gas mass

    fraction. It can be expressed as a flux scheme, which makes local time stepping tech-

    niques applicable. The main idea consists in decomposing the flux in an acoustic part,

    associated with the genuinely nonlinear waves, and a transport part, associated to the

    linearly degenerated waves. This is introduced for instance in [13] using Lagrangian

    coordinates for gas dynamics and detailed in [10, 9] in the case of our more involved

    3

  • 8/3/2019 Local Time Stepping

    4/30

    relaxed system of equations. Eventually the Lagrange step where we deal with the

    acoustic part of the flux will be treated implicitly, which will enable us to use a larger

    time step, basically driven by the transport phenomenon, which will still be treated ex-

    plicitly for better accuracy. We will first present the explicit version of the scheme, for

    which we adapt the local time stepping enhancement proposed by Muller et al [17].

    2.1 Discretization

    The Lagrange-Projection splitting is performed at the numerical level in a two-step

    scheme which we present in this section without the intermediate details for which we

    refer to [10, 9]. We discretize the domain in J cells j = [xj1/2, xj+1/2] of size xj,

    such that L =J1

    j=0 xj and of center xj = (xj1/2 + xj+1/2)/2 for j = 0, . . . , J 1.

    We denote by Vnj

    = nj(1, Yn

    j, un

    j) the numerical solution on cell j at time n and by

    Vnj

    = nj

    (1, Ynj

    , unj

    ) the numerical solution at the end of the Lagrange step.

    2.1.1 Explicit scheme

    Explicit Euler scheme for the Lagrange step gives

    nj

    nj

    nj

    tun

    j+1/2un

    j1/2

    xj= 0,

    nj

    Ynj

    Ynj

    t= 0

    nj

    unj

    unj

    t+

    Pnj+1/2

    Pnj1/2

    xj= 0,

    (2.2)

    where denotes the co volume 1/ and unj+1/2

    and Pnj+1/2

    are the solution of the Rie-

    mann problem between states Vnj

    and Vnj+1

    Pn

    j+1/2=

    Pnj

    + Pnj+1

    2 an

    unj+1

    unj

    2,

    unj+1/2

    =un

    j+ un

    j+1

    2

    Pnj+1

    Pnj

    2an.

    (2.3)

    In (2.3), an is a stabilizing coefficient coming from the relaxation formulation of prob-

    lem (2.1) as described in [2, 9]. It is set globally for all cells at each time step by the

    Whitham condition

    a2n > maxj=0,...,J1

    P(nj , Y

    nj ). (2.4)

    The Euler projection step advects the conservative state Vn with the edge velocitiesunj 12

    . Combining the two steps together provides the locally conservative flux formu-

    lation

    Vn+1j = Vnj

    t

    xj

    Fn

    j+ 12 Fn

    j 12

    , (2.5)

    4

  • 8/3/2019 Local Time Stepping

    5/30

    where

    Fnj 12

    = (0, 0, Pnj 12

    )T + (unj 12

    )+Vnj1

    + (unj 12

    )Vnj

    . (2.6)

    In the above definition of the fluxes, the superscript (.)+ (respectively (.)) denotes the

    positive (respectively negative) part.

    We will admit here the following theorem (see [13] and [8])

    Theorem 2.1. Suppose that condition (2.4) is satisfied and that

    t minj

    min(xj, xj1)

    max

    unj1 annj1 , unj + annj , unj1/2 . (2.7)Then, if n

    j> 0 and 0 Yn

    j 1 for all j = 0, . . . , J 1, the solution of (2.5) satisfies

    n+1j

    > 0 and0 Yn+1j

    1 for all j = 0, . . . , J 1.

    2.1.2 Implicit scheme

    The semi-implicit version of the Lagrange-Projection scheme has been derived in [10,

    9] and we merely recall the important steps here. Implicitation of the Lagrange step

    leads to

    nj

    nj

    nj

    tun

    j+1/2un

    j1/2

    xj= 0,

    nj

    Ynj

    Ynj

    t= 0,

    nj

    unj

    unj

    t+

    Pnj+1/2

    Pnj1/2

    xj= 0,

    (2.8)

    where the interface quantities arePn

    j+1/2=

    Pnj

    + Pnj+1

    2 an

    unj+1

    unj

    2,

    unj+1/2

    =u

    nj

    + unj+1

    2

    Pnj+1

    Pnj

    2an.

    (2.9)

    We replace Pnj+1/2

    andunj+1/2

    in (2.8) by their expressions (2.9) and obtain a system for

    nj

    , unj

    and Pnj

    . We then eliminate this last unknown, by implicitating the equilibrium

    at the end of the Lagrange state Pnj

    = P(nj

    , Ynj

    ) and by replacing all (P)j by a global

    lower bound an2 defined by (2.4), so that

    Pnj

    = Pnj an2(n

    j

    nj). (2.10)

    Introducing auxiliary unknowns defined by C,nj

    = 12

    u

    nj

    annj

    ,

    C+,nj

    = 12

    u

    nj

    + annj

    ,

    (2.11)

    5

  • 8/3/2019 Local Time Stepping

    6/30

    some straightforward algebra leads eventually to the following system

    0 1 + an

    nj

    annj

    C

    +,nj1

    C+,nj

    C+,nj+1

    = S +,nj

    annj 1 + annj 0 C

    ,n

    j1C

    ,nj

    C,nj+1

    = S ,nj(2.12)

    where

    nj =t

    xjnj

    (2.13)

    and the right hand side is

    S+,nj

    = C+nj +n

    j

    2

    Pnj + an

    2nj Pnj+1 an

    2nj+1

    ,

    S ,nj = Cnj

    n

    j2 Pnj + an2nj Pnj1 an2nj1 . (2.14)

    We impose here non reflective boundary conditions, adequate to treat initial value

    problems. We will set C,n1

    = C,n0

    in the first equation for the lower bidiagonal

    system, and C+,nJ

    = C+,nJ1

    in the upper bidiagonal system.

    The Euler projection step computes the conservative state at time n + 1:

    Vn+1j = Vnj

    t

    xj

    F

    n,j+1/2

    Fn,j1/2

    , (2.15)

    where

    Fn,j1/2

    = 0, 0, Pnj1/2

    T+ (u

    nj1/2

    )+Vnj1

    + (unj1/2

    )Vnj

    . (2.16)

    Introducing the coefficients

    mnj =

    j

    mink=0

    wnk,M

    n

    j =j

    maxk=0

    wnk,

    mnj =J1

    mink=j

    wnk,M

    n

    j =J1

    maxk=j

    wnk

    wherew

    nj = P

    nj + anu

    nj ,

    wnj = P

    nj anu

    nj (2.17)

    we have the following theorem (see [9])

    Theorem 2.2. If nj

    > 0 and 0 Ynj

    1 for all j = 0, . . . , J 1 and if we impose

    condition (2.4), and the following CFL condition on the time step

    t =2anx

    maxJ1j=0

    max

    0,M

    n

    j mnj+1

    min

    0,mnj

    M

    n

    j+1

    (2.18)then the scheme (2.15) has a unique solution which satisfies n+1

    j> 0 and0 Yn+1

    j 1

    for all j = 0, . . . , J 1.

    6

  • 8/3/2019 Local Time Stepping

    7/30

    Additionally to (2.18), we impose to the time step another bound depending solely

    on the fast acoustic wave speed, but with a CFL number CFL imp = 10 or even larger,

    in order to control the distortion of the acoustic waves.

    t CFLimp minj

    min(xj1, xj)

    max(uj1 aj1, uj + aj). (2.19)

    3 Adaptive multiresolution

    It is well known that since the fast acoustic waves are treated implicitly, they are

    smoothed out very early in the computation (see [12]). The wave of interest which

    moves with the slow speed and is computed explicitly, may present on the other hand

    singularities that we want to compute as precisely as possible. It is of course natural

    to discretize the solution finely in the vicinity of these singularities and more coarsely

    elsewhere where it is smooth. In answer to this observation, we have adapted the

    multiresolution techniques devised for explicit schemes in [7] and based on ideas in-

    troduced in the context of systems of conservation laws by Harten [14] at the beginning

    of the nineties. The multiscale analysis of the solution is used to design an adaptive

    grid by selecting the correct level out of a hierarchy of nested grids according to thelocal smoothness of the solution. This non-uniform grid evolves with time, with a

    strategy based on the prediction of the displacement and formation of the singularities

    in the solution. The wavelet basis used to perform the multiscale analysis enables to

    reconstruct the solution at any time back to the finest level of discretization, within

    an error tolerance controlled by a threshold parameter. The coupling of multiresolu-

    tion with the semi-implicit Euler relaxation scheme is detailed in [12] for the non-drift

    model and in [1] for the complete model with drift and friction. The adaptation of the

    method to the Lagrange projection scheme is straightforward. The important point for

    our present work is the enhancement to local time stepping. In the previous works

    [7, 12, 1] the time step is dictated by the size of the smallest cell in the adaptive grid

    which enters into a CFL stability condition. We first describe how to adapt the localtime stepping approach developed by Muller and Stiriba in [17] in the framework of

    the explicit Lagrange projection scheme. The design of the local time stepping algo-

    rithm for the implicit version of the Lagrange projection method is the original part of

    this work and is described in details.

    First we briefly recall in section 3.1 the basics of the multiresolution analysis. It

    is then used, in section 3.2, to monitor a time varying adaptive grid for a conservative

    finite volume scheme. Technical details and examples can be found in [16].

    3.1 Basics of multiresolution analysis

    We consider a uniform mesh with step size x, 0j

    = [x0j1/2

    , x0j+1/2

    ]. Starting from this

    coarsest discretization labeled 0 we define a hierarchy ofK+ 1 nested grids (S k)k=0,...,Kby dyadic refinement, with cells k

    j= k+1

    2j k+1

    2j+1and interfaces xk+1

    2j1/2 = xkj1/2

    ,

    with new mid points xk+12j+1/2

    = (xkj1/2

    + xkj+1/2

    )/2.

    Initially, the piecewise constant vector-valued function V is defined on the finest

    grid, numbered K, where it is represented by the sequence of its mean values VK =

    (VK,j)j on the cells Kj

    = [xKj1/2

    , xKj+1/2

    ]. The coarsening operator Pk1k

    consists in

    7

  • 8/3/2019 Local Time Stepping

    8/30

    cell averaging from one grid to the coarser one, i.e.,

    Vk1 = Pk1kVk with Vk1,j =

    1

    2(Vk,2j + Vk,2j+1). (3.1)

    The inverse operator consists in recovering the mean values on grid level k, given

    the mean values on the coarser level k 1. This involves an approximation or

    prediction operator Pkk1

    which we define here as

    Vk = Pkk1Vk1 with

    Vk,2j = Vk1,j 18 (Vk1,j+1 Vk1,j1),Vk,2j+1 = Vk1,j + 18 (Vk1,j+1 Vk1,j1). (3.2)We define the detail vector Dk with

    Dk,j = Vk,2j Vk,2j. (3.3)The two vectors Vk and (Vk1,Dk) are of same length and we can use Dk along with

    Vk1 to recoverVk entirely. Iterating this encoding operation from the finest level down

    to the coarsest provides the multiscale representationMK = (V0,D1, . . . ,DK) = MVK.

    The indices of the multiscale representation MK vary in

    K = {[0, . . . ,N0], [0, . . . ,N0], . . . , [0, . . . , 2K1N0]}

    The interest of the multiscale representation lies in the fact that the local regularity of

    the function is reflected by the size of its details. We can use this property to compress

    the function in the multiscale domain by dropping all details smaller than a given

    threshold. To clarify this idea, we first define a threshold operator T acting on the

    multiscale representation MK, depending on a subset K of indices = (k, j), by

    T(D) =

    0 if ,

    D otherwise.(3.4)

    Given level-dependent threshold values = (k)k=0,...,K, and extending the notationD0 = V0, we introduce the subset = (1, , K) := { s.t. |D| ||}, where

    || = |(k, j)| = k. This completes the definition of the threshold operator T := T ,

    and gives rise to an approximating operator A := M1TM acting on the physical

    domain representation. In practice, we take advantage of the fact that the remaining

    fine-scale details will be concentrated near singularities. This is not such a trivial result

    because the operator A is nonlinear since depends on VK through the threshold

    scheme. We refer to [6] for a thorough investigation of nonlinear approximation and

    the proof of the main result

    ||VK VK ||L1 < C, with VK = AV

    K, (3.5)

    valid when k = 2kK. This allows us to define an adaptive grid S where the localsize of the cell will be the grid step corresponding to the finest non negligible detail.

    S =(k, j), k {0, . . . , K}, j {0, . . . , 2kN0}, s.t. (k, j/2)

    and (k+ 1, j) } , (3.6)

    where j denotes the integer part of j.

    8

  • 8/3/2019 Local Time Stepping

    9/30

    The representation V of the solution on this adaptive grid is obtained from the

    encoded multiscale representation MK = TMVK by the following

    Algorithm 3.1 Partial decoding

    Starting from TMV on for level k = 1 K do

    if (k, j)

    then

    compute

    Vk,2j using (3.2),Vk,2j = Vk,2j + Dk,j,Vk,2j+1 = 2Vk1,j Vk,2j.

    end if

    end for

    Note, in particular, that the representation by its mean value Vk,j on an intermediate

    level kdoes not mean that the function is locally constant on this cell of width 2kx, but

    simply that its mean values on the finest grid in this area can be recovered within the

    accuracy using the mean values on this intermediate level and the reconstruction

    operators Pl

    l1for l = k+ 1, . . . , K.

    The reverse transformation is performed as follow

    Algorithm 3.2 Partial encoding

    Starting from V on S for level k = K 1 0 do

    if (k+ 1, 2j) then

    compute

    Vk,j using (3.1),

    Dk+1,j = Vk+1,2j Vk+1,2j using (3.2).end if

    end for

    3.2 Application to a finite volume scheme

    We now briefly describe how to use the multiresolution analysis in the context of a

    finite volume scheme, written in conservative form on the most refined level of dis-

    cretization K as

    Vn+1K,j = VnK,j KB

    nK,j (3.7)

    where K = t/x and the flux balance is defined as

    BnK,j = FnK,j+1/2 F

    nK,j1/2. (3.8)

    The numerical flux FnK,j+1/2 between cells

    Kj and

    Kj+1 is computed using r values of

    the solution on each side of the interface xKj+1/2

    FnK,j+1/2 =FVnK,j+1r, . . . ,VnK,j,VnK,j+1, . . . ,VnK,j+r . (3.9)

    In our case it will be defined by (2.6) or (2.16). Due to the nestedness of the dyadic

    grids, we can define the numerical fluxes on coarser levels kfrom the fluxes defined at

    9

  • 8/3/2019 Local Time Stepping

    10/30

    the same location on finer scales

    Fnk,j1/2 = Fnk+1,2j1/2 = . . . = F

    nK,2Kkj1/2

    . (3.10)

    This allows us to define the flux balances by induction for all levels k = 0, . . . , K by

    Bnk,j =Fnk,j+1/2 F

    nk,j1/2

    =Fn

    K,2Kk(j+1)1/2 Fn

    K,2Kkj1/2

    =

    2Kk(j+1)1=2Kkj

    FnK,+1/2 FnK,1/2

    =

    2Kk(j+1)1=2Kkj

    BnK, =

    2Kk1=0

    BnK,2Kkj+

    . (3.11)

    After normalization by the step size 2Kkx at level k, we can apply the same projec-

    tion (3.1) and prediction (3.2) schemes on the flux balances as on the solution itself

    and we obtain the fully adaptive scheme in 1D as

    Vn+1k,j = V

    nk,j kB

    nk,j, (k, j) S (3.12)

    where k = 2kK

    K. The important point here is that the adaptive grid S must beadequate to represent the solution at both times n and n + 1. More specifically, if we

    denote by n the graded tree obtained by applying A to VnK

    , then n can be inflated

    into n+1 containing n+1 as well as n, ensuring that estimation (3.5) is valid at bothtimes n and n + 1 when using A = M

    1Tn+1 M. Setting n+1 to K does the trickbut it is not very interesting in practice. The inflated tree n+1 should be as small aspossible. An economical way to ensure (3.5) both for Vn and Vn+1 was heuristically

    described by Harten in [14]. In [7], we added some gradualness property, necessary to

    ensure computational efficiency.

    Algorithm 3.3 Prediction of the adaptive grid

    n+1

    Prediction:for level k = K 1 do

    if (k, j) n andDkj k then

    (k, j + l) n+1 for l = s, . . . , sifDkj 2k then(k+ 1, 2j) and (k+ 1, 2j + 1) n+1

    end if

    end if

    end for

    Gradualness:

    for level k = K 1 do

    if (k, j) n+1 thenfor || g do

    (k 1, j/2 + ) n+1end for

    end if

    end for

    10

  • 8/3/2019 Local Time Stepping

    11/30

    Let us comment on the choice ofs and g: in Hartens strategy the number of cells

    added on each side of important details to account for displacement of the solution

    during one time step is s = 1, thanks to the CFL < 1 for explicit schemes. This is

    an important point of discussion in the extension of the adaptive algorithm to implicit

    schemes with CFL larger than one and the value of the parameter s has been discussed

    in [12]. It turns out that s = 1 remains valid in the semi-implicit case becasue the fast

    waves are severely damped out by the implicit scheme and can therefore be well rep-resented at the coarser levels of discretization. Concerning the gradualness accounted

    for by the second step of algorithm 3.3, the multiresolution stencil should always be

    readily available in order to apply the reconstruction formula (3.2) so in our case g = 1.

    Below is the actual adaptive algorithm we implement

    Algorithm 3.4 Adaptive algorithm

    Initialization: encoding of the initial solution and definition of0for time step n = 0, . . . ,N 1 do

    Prediction ofn+1 using Algorithm 3.3.Partial decoding ofVn on

    S n+1 (derived from

    n+1 using (3.6)).

    Evolution ofVn to Vn+1 on the adaptive grid S n+1 using (3.12).Definition ofn+1 by partial encoding ofVn+1 .

    end for

    Decoding ofVN on the finest grid S K.

    The evolution step of this algorithm can be implemented in several ways which

    have now been extensively studied and compared (see for instance [7] and [1]). We

    can now address the purpose of the present paper which is to couple the multiresolution

    algorithm with local time stepping.

    4 Local time stepping

    In the adaptive scheme presented in the previous section the time step is the same

    everywhere in the grid and is determined in order to ensure stability. It must obey

    some CFL condition and therefore depends on the smallest space grid size x.

    We now address the problem of using different time steps depending on the local

    size of the adaptive grid cell. We rely on the assumption that if the stability criterion

    leads to a time step t on the finest grid of size xK = x at level K, then the scheme

    can be applied in coarser regions where the grid size is xk = 2Kkx using a corre-

    spondingly larger time step tk = 2Kktand still be stable since the ratio = tk/xk

    remains the same (see Figure 1). The obvious difficulty arising from this discrepancy

    in time steps is that the solution is not synchronized after one time step and something

    special must be done at interfaces between regions of different grid size.We retain here the formalism of [17] and summarize in the first section the algo-

    rithm in the explicit case. The second section is devoted to the semi implicit scheme

    for which a specific implementation of the local time stepping is designed.

    11

  • 8/3/2019 Local Time Stepping

    12/30

    2

    x x

    t

    t

    2

    Fig. 1. Using a different time step according to the grid size

    4.1 Local time stepping for the explicit scheme

    We note t0 = 2Kt the macro time step which can be used on cells at the coarsest

    level. The discrete times tn = nt0 are subdivided into 2K intermediate time steps

    tn+i2K for i = 1, . . . , 2K with step size t.

    At time tn+2Ki the smallest synchronization level is determined by

    ki := min{k; 0 k K, i mod 2Kk = 0}.

    All cells belonging to levels finer than ki are updated during the intermediate step

    i. This partial updating makes uses of sets of indices which will be updated at eachchange of the adaptive grid

    The index sets Ck, k = 0, . . . K of cells at level k that can be evolved in time by

    one time step with step size tk = 2Kkt, i.e.

    for k = K 1 0 do

    Ck :=(k, j) S n+1 ;(k+ 1, ) S n+1 : j ,

    end for

    CK :=(K, j); (K, j) S n+1 .

    The range of dependence , determined by the stencil of the 2rpoint flux (3.9)

    and the multiscale local prediction (3.2) as

    := {( r)/2 1, . . . , (+ r)/2 + 1} .

    The complement sets, or transition zones, i.e.

    Ck := Ik\Ck, Ik := (k, j); (k, j) S n+1 .With these definitions, illustrated in figure 2,the evolution of the solution during a

    macro time step is performed in a loop on intermediate time steps (see Figure 3). At

    each intermediate time step i the solution is updated on all active cells belonging to

    levels k ki, using time step tk = t2Kk, except for the cells in the transition

    regions where a half time step is used. It is also updated on cells in the transition

    region of the immediately coarser level ki 1, using a half time step. (here 2Kki t).

    Thanks to the explicit nature of the scheme, and of the flux computation (2.6), we can

    use the conservation property depicted in Figure 4 to synchronize the solution in the

    manner detailed in the following algorithm

    12

  • 8/3/2019 Local Time Stepping

    13/30

    0 0 0 0 0

    0 0 0 0 0

    0 0 0 0 0

    1 1 1 1 1

    1 1 1 1 1

    1 1 1 1 1

    0 0 0 0 0

    0 0 0 0 0

    0 0 0 0 0

    1 1 1 1 1

    1 1 1 1 1

    1 1 1 1 1

    CK

    CK1C

    K1

    lm m

    l

    Fig. 2. Definitionof index set CK1 and CK, transition zone CK1 and ranges

    of dependence and m for the cells (K, ) and (K, m).

    Algorithm 4.1 Synchronized time evolution for time step tn+i2L

    for each intermediate time step i = 1, . . . , 2K do

    Initialization

    for k = K ki do

    Update indices sets Ck, Ckend for

    Update fluxes on cells that have been modified at previous time step:

    for levels k = K ki1 do

    for j s.t. (k, j) S n+1 doCompute F

    n+(i1)2K

    k,j1/2using (2.3-2.6)

    end for

    end for

    for (ki1 1, j) Cki11 s.t. (ki1, 2j 1) S n+1 do

    Compute Fn+(i1)2K

    ki11,j1/2using (2.3-2.6)

    end for

    Time evolutionfor levels k = L ki do

    use full time step tkfor (k, j) Ck do

    Vn+i2K

    k,j= V

    n+(i1)2K

    k,j

    F

    n+(i1)2K

    k,j+1/2 F

    n+(i1)2K

    k,j1/2

    ,

    end for

    end for

    for levels k = L ki 1 do

    use half time step

    for (k, j) Ck do

    Vn+i2Kk,j = Vn+(i1)2K

    k,j 2 Fn+(i1)2Kk,j+1/2 Fn+(i1)2Kk,j1/2 ,end for

    end for

    Elsewhere the solution remains unchanged

    end for

    13

  • 8/3/2019 Local Time Stepping

    14/30

    4.2 Regriding at intermediate time steps

    An important point in the local time stepping algorithm is the evolution of the adaptive

    grid. In [17], it is shown that a prediction of the grid from one macro time step to the

    next is not efficient when the number of levels is large since the size of the adaptive

    grid increases geometrically. The alternative consists in predicting the evolution of the

    grid at even intermediate time steps, for all levels above the synchronization level and

    perform a partial encoding/decoding of the solution, in the manner described in thefollowing algorithm

    Algorithm 4.2 Intermediate regriding

    for intermediate time step i = 2, 4, . . . , 2K 2 do

    1. Prediction:

    for levels k = K ki do

    if (k, j) n+i2K

    andDkj k then

    (k, j + ) n+(i+1)2K for || sifDk

    j

    2k then

    (k+ 1, 2j) and (k+ 1, 2j + 1) n+(i+1)2Kend if

    end if

    end for

    2. Gradualness:

    for levels k = K ki do

    if (k, j) n+(i+1)2K thenif (k 1, j/2 + ) n+i2

    K

    then

    (k 1, j + ) n+(i+1)2K for || gend if

    end ifend for

    3.

    for levels k = ki + 1 K do

    Check that we always have g cells at level k 1 between two sets of cells at

    level k. Otherwise refine to level k.

    end for

    end for

    for intermediate step i = 2K do

    Perform algorithm 3.3 with gradualness g.

    Perform step 3.

    end for

    The prediction s should be equal to the maximum displacement of a singularity in

    one time step. In the explicit case, it is therefore equal to 1 as in the standard mul-

    tiresolution algorithm 3.3. We will see that for the semi implicit case, it is necessary

    to take into account the fast wave and assume a speed larger than 1. The gradualness

    parameter g must ensure the possibility of regriding and still preserve the transition

    14

  • 8/3/2019 Local Time Stepping

    15/30

    /2

    /2

    /2

    /2

    /2

    /2

    x

    t

    i=2 k =1

    i=3 k =2

    i=4 k =0

    i=1 k =21

    2

    3

    4

    Fig. 3. A three level adaptive grid with transition zones of width 1 rep-

    resented with dotted lines. The intermediate step number is denoted by

    i = 1, . . . ,4, ki denotes the synchronization level. The red and green arrowsindicate the fluxes that are computed at the corresponding time step

    k,j1

    k,j1

    k,j1

    k+1,2j

    k+1,2j

    k+1,2j

    n

    n+1/2

    n+1 n+1

    n+1/2

    n

    F

    F

    Fk,j1/2

    n

    n+1/2

    n

    k+1,2j1/2

    k+1,2j1/2

    k,j2

    n

    n+1

    k,j2

    k,j3/2F n

    k,j3/2

    nF

    1

    2

    k,j3/2

    nF1

    2

    VV

    V V

    V

    V V

    V

    V

    Fig. 4. Flux conservation at interface between level k and k + 1 implies

    2Fnk,j1/2

    = Fnk+1,2j1/2

    + Fn+1/2

    k+1,2j1/2. The solution Vn+

    1/2k,j1

    is used to compute

    Fn+1/2

    k+1,2j1/2

    zone. It is therefore linked to the parameter s through

    g =

    s + r

    2

    + 1 (4.1)

    This rule is illustrated in Figure 5 for speeds 1, 2 and 3. For each example, the pre-

    dicted tree is represented at the beginning of the macro time step, with the singlenon negligible detail symbolized with a . Then the resulting adaptive grid S is

    represented at the different intermediate time steps, along with the progression of the

    singularity, marked with a . The dotted lines indicate the transitions zones.

    4.3 Numerical simulations for the explicit scheme

    In this section we validate the algorithms on a test case. We compare the uniform finite

    volume scheme (U) with two versions of the multiresolution algorithm: (MR) denotes

    the algorithm with global time stepping based on the smallest cell, (LTS) denotes the

    local time stepping with partial regriding at each intermediate time step.

    The simulation is set in a 32km long pipeline. At the initial time the density of the

    mixture is 500kg/m3 until x = 16km and 400kg/m3 beyond. The gas mass fraction is

    15

  • 8/3/2019 Local Time Stepping

    16/30

    a)

    x

    t

    S

    ~

    b)

    S

    Sx

    t

    ~

    c)

    x

    t

    S

    ~

    Fig. 5. Grid prediction at intermediate time steps. indicates the tree atthe beginning of the macro time step, with a single non negligible detail.The evolution of the adaptive grid S includes intermediate regriding every

    two intermediate time steps. The singularity is marked with a . The grid

    propagation speed is (a) s = 1, (b) s = 2, (c) s = 3.

    respectively 0.2 and 0.4 and the speed is uniform and equal to 10m/s. The transport

    wave moves slowly toward the left at a speed 29m/s while two acoustic waves are

    visible on the density and speed components moving in opposite directions at roughly

    263m/s and +238m/s.

    The pressure the law corresponds to a perfect gas and incompressible liquid

    P(,Y) = a2glY

    l (1 Y). (4.2)

    Figure 6 displays the density field obtained after 42s of propagation with the uniform,

    the multiresolution, and the local time stepping schemes. The grid has 5 levels of

    refinement, which amounts to J = 4096 grid points on the smallest level of refinement.

    We use a constant elementary time step on the finest level throughout the simula-

    tion, determined by taking the minimum time step during a previous uniform simula-

    tion. For the 4096 points simulations we use t = 0.0096s. The MR and LTS results

    are obtained with a threshold parameter = 0.005. The crosses for the multiresolution

    and circles for the local time stepping denote the level of refinement used locally to dis-

    cretize the solution. It is read on the right hand side vertical axis. In Figure 7 the range

    of abscissa is zoomed in in the three regions of interest. The quality of approximation

    of the transport wave is the same for the two algorithms. The local time stepping does

    a slightly better job than the standard multiresolution as far as the acoustic waves are

    concerned. This is because there are less projection steps performed and therefore less

    diffusion.

    16

  • 8/3/2019 Local Time Stepping

    17/30

    360

    380

    400

    420

    440

    460

    480

    500

    520

    540

    560

    0 10000 20000 30000 400000

    1

    2

    3

    4

    5

    6

    x

    IniUMR

    tree

    (a)

    360

    380

    400

    420

    440

    460

    480

    500

    520

    540

    560

    0 10000 20000 30000 400000

    1

    2

    3

    4

    5

    6

    x

    IniU

    LTStree

    (b)

    Fig. 6. Density field and grid refinement at t = 42s, for = 0.005. (a)Explicit multiresolutionscheme (MR) against uniform solution (U) on finest

    (5th) level and initial solution (Ini) (b) Local time stepping (LTS) scheme.

    The symbols + and indicate the level of refinement used locally, to be read

    on the right hand side vertical axis

    To study the performance and the robustness of the algorithm we perform a param-eter study. We test two discretizations: J = 4096 points on a hierarchy of 5 levels and

    J = 8192 with 6 levels. The range of the threshold goes from 0 to 102. For each

    set of parameters we compute the solution at t = 42s with the three algorithms and

    calculate the relative error between the adaptive solution reconstructed on the finest

    level at the final time and the solution computed on the uniform finest grid. The er-

    ror is computed for the component which is sensitive to both transport and acoustic

    phenomena and for the gas mass fraction which sees only the transport effect.

    E1() =

    Jj=0

    |j j|

    Jj=0

    |j|

    , E1(Y) =

    Jj=0

    |Yj Yj|

    Jj=0

    |Yj|

    . (4.3)

    We also compute the error with respect to a reference solution computed on a uniform

    mesh at the 9th level of discretization (on 65536 points), that is 8 times finer than the

    simulation on 8192 points. It will be considered as the exact solution.

    Ere f

    1() =

    Jj=0

    |j j|

    J

    j=0 | j|, E

    re f

    1(Y) =

    Jj=0

    |Yj Yj|

    J

    j=0 |Yj|. (4.4)

    In (4.4), j and Yj denote the average of the reference solution on the 8 or 16 cells

    covering cell j. In Figure 8 we display the graph of the error (4.3) with respect to

    the uniform solution on the finest level versus the threshold parameter. Both schemes

    (MR) and (LTS) converge with respect to the threshold parameter which corroborates

    the theoretical estimate (3.5).

    17

  • 8/3/2019 Local Time Stepping

    18/30

    360

    380

    400

    420

    440

    460

    480

    500

    520

    540

    560

    14500 14700 14900 15100 153000

    1

    2

    3

    4

    5

    6

    x

    IniU

    LTSMR

    tree LTStree MR

    (a)

    500

    505

    510

    515

    520

    525

    530

    535

    540

    545

    3000 4000 5000 6000 70000

    1

    2

    3

    4

    5

    6

    x

    IniU

    LTSMR

    tree LTStree MR

    (b)

    370

    375

    380

    385

    390

    395

    400

    22000 24000 26000 28000 300000

    1

    2

    3

    4

    5

    6

    x

    IniU

    LTSMR

    tree LTStree MR

    (c)

    Fig. 7. Density field and grid refinement at t = 42s. Zoom on (a) transport

    wave, (b) left going acoustic wave (c) right going acoustic wave .

    1e-14

    1e-10

    1e-06

    0.01

    1e-10 1e-06 0.01

    E()

    MRLTS

    (a)

    1e-14

    1e-10

    1e-06

    0.01

    1e-10 1e-06 0.01

    E(Y)

    MRLTS

    (b)

    Fig. 8. Convergence versus for 6 levels. Relative error with respect tothe uniform solution on the 6 th level(4.3) on (a) (b) Y, with the standardmultiresolution (MR) and the local time stepping strategy (LTS)

    In Figure 9 we notice that as expected, the error with respect to the reference

    solution (4.4) is bounded below by the error between the uniform solution on the 6th

    level and the reference solution.

    In Figure 10 we study the dependence between the precision and the speed of

    the algorithm, by displaying the relative errors between the adaptive and uniform grid

    18

  • 8/3/2019 Local Time Stepping

    19/30

    0.0001

    0.001

    0.01

    0.1

    1e-10 1e-06 0.01

    Eref()

    MRLTS

    (a)

    0.0001

    0.001

    0.01

    0.1

    1e-10 1e-06 0.01

    Eref(Y)

    MRLTS

    (b)

    Fig. 9. Convergence versus for 5 levels. Relative error with respect tothe reference solution (4.4) on (a) (b) Y, with the standard multiresolution(MR) and the local time stepping strategy (LTS)

    solutions as a function of the gain in computing time. The gain is the ratio between the

    computing time required for the uniform scheme on the finest level of discretization

    and the computing time required by the multiresolution (MR) or the local time stepping

    (LTS) scheme for a given threshold ratio. Each point on these curves corresponds to a

    different value of the threshold parameter . The best CPU gain are achieved for the

    highest value of, but also correspond to the highest error The CPU gain can be as

    high as 10 for a relative error of one per cent for the standard multiresolution and the

    local time stepping goes yet more than twice as fast for a given error level.

    1e-14

    1e-10

    1e-06

    0.01

    0 10 20 30 40

    E()

    CPU(unif)/CPU(adapt)

    MRLTSU

    (a)

    1e-14

    1e-10

    1e-06

    0.01

    0 10 20 30 40

    E(Y)

    CPU(unif)/CPU(adapt)

    MRLTSU

    (b)

    Fig. 10. Convergence versus CPU gain for 6 levels. Relative error with

    respect to uniform solution on (a) (b) Y.

    In Figure 11 we display the error with respect to the reference solution, as a func-

    tion of the CPU gain, for both the 4096 and 8192 points simulations. Here again, each

    point corresponds to a different value of. The CPU gain is computed with respect to

    the CPU for the uniform simulation on the 5th (respectively 6th) level for the multires-

    olution (MR) and local time stepping (LTS) simulations on the 5 level-hierarchy (resp.

    19

  • 8/3/2019 Local Time Stepping

    20/30

    6 level-hierarchy). Both (MR) and (LTS) simulations converge to the error level of the

    uniform grid simulation when goes to 0 which is roughly 103 for 4096 points and

    5.104 for 8192 points. Since the uniform simulation on 8192 points costs roughly 4

    times as much as the one on 4096 points, all multiresolution simulations on the 6 level

    hierarchy which exhibit a CPU gain superior to 4 and an error below 103 are doing a

    better and faster job than the uniform simulation on the 5th level.

    0

    0.002

    0.004

    0.006

    0.008

    0 10 20 30 40

    Eref()

    CPU(unif)/CPU(adapt)

    MR 5LTS 5MR 6LTS 6

    (a)

    0

    0.002

    0.004

    0.006

    0.008

    0 10 20 30 40

    Eref(Y)

    CPU(unif)/CPU(adapt)

    MR 5LTS 5MR 6LTS 6

    (b)

    Fig. 11. Convergence versus CPU gain for 5 and 6 levels. Relative error

    with respect to reference solution on (a) (b) Y.

    5 Local time stepping for the semi-implicit scheme

    The main difficulty to implement local time stepping for the semi implicit scheme lies

    in the discrepancy between speeds of acoustic and kinematic waves. Actually, if we

    use a time step designed on the fast wave speed instead of the slow transport speed as in

    (2.18) the Muller and Stiriba algorithm [17] designed for implicit schemes and CFL= 1is convenient. In that case however, we completely miss the advantage of using an

    implicit scheme for the Lagrange phase of the algorithm, which is meant to enable us

    to use a very large time step. The second stability condition (2.19), which is enforced

    with a very large CFL number (CFLimp = 10 to 20), enables us to design the stencil

    of influence (S.I.)of a given location with respect to the acoustic waves knowing that

    these waves can travel at most CFLimp cells in one time step. At intermediate time

    step i all cells in levels k ki are updated and therefore enter the implicit system at the

    Lagrangian step. Some additional cells belonging to coarser levels k = ki 1 0 must

    be included in the linear systems (2.12) on each side of Di = {Ck}k=ki,...K to compute

    the Lagrangian phase (see Figure 12). They are the cells in the stencil of influence

    of cells at the border ofDi. Equipped with (2.18) and (2.19) we can safely restrict

    this area S .I to a zone of width CFLimp on the borders ofCki not contiguous to Cki ,

    measured in number of cells of size xki .

    The solution of the Lagrange phase is used to compute the Euler projection fluxes

    (2.16) in a manner described in Algorithm 5.4 but only for the cells on which the solu-

    tion should actually be updated. As in the explicit scheme these are the cells belonging

    to the levels above the current synchronization level ki, plus some contiguous cells in

    20

  • 8/3/2019 Local Time Stepping

    21/30

    the level immediately coarser, forming the transition zone Cki1 (of length r + 1 in

    number of cells at level ki 1 in Figure 12). We will see later that cells at the bound-

    aries of the transition zone require a special treatment at the Euler projection step. To

    locate them more easily, we introduce the distances between a given cell ( k, j) and a

    finer level k on its right and on its left

    dl(k, j, k) = min

    ,(k,)Ck j2kk 1

    +, (5.1)

    dr(k, j, k) = min

    ,(k,)Ck

    (j + 1)2k

    k+

    . (5.2)

    The overall algorithm equivalent of algorithm 4.1 in the semi implicit case is the fol-

    lowing

    i=1, kt

    x

    S.I.

    C1

    1=2

    2

    i=2, k =1t

    x

    S.I.

    C 0

    t

    x

    S.I

    C1 3i=3, k =2

    i=4, k =04t

    x

    Fig. 12. Transition zones (Ck) and implicit stencil S.I.. The intermediate

    step number is denoted by i = 1, . . . ,4, the corresponding synchronizationlevel by ki.

    Algorithm 5.1 Synchronized time evolution

    for intermediate time step i = 1, . . . , 2K do

    Lagrange step.

    Compute right hand side (2.14) for (2.12) (see Algorithm 5.2).

    Compute linear system coefficients for (2.12) and solve linear systems (see Algo-

    rithm 5.3).

    Compute Euler projection fluxes (see Algorithm 5.4)

    Time evolution and synchronization (see Algorithm 5.5)

    end for

    21

  • 8/3/2019 Local Time Stepping

    22/30

    The interface quantities are computed at the beginning of each macro time step on

    the synchronized solution. The right hand side of (2.12) should be computed according

    to the following algorithm

    Algorithm 5.2 Right hand side for the linear systems

    for levels k = K ki do

    for (k, j) Ck

    do

    compute right hand side using (2.14), for a full time step advance tk.

    end for

    for k < K and (k, j) Ck do

    compute right hand side for a half time step advance tk/2.

    end for

    end for

    for levels k = ki 1 0 do

    for cells (k, j) s.t. dl(k, j, ki) z or dr(k, j, ki) z do

    compute right hand side for a reduced time step advance tki = tk2kki

    end for

    end for

    We denote by S i the stencil of the implicit systems. It can be a union of discon-

    nected chunks. The upper and lower bidiagonal matrices M+ and M of the linear

    systems are formed as follows

    Algorithm 5.3 Linear systems

    for levels k = K ki do

    compute n+i2K

    k,jusing tk if (k, j) Ck else using tk/2.

    end for

    for level k = ki 1 0 do

    compute n+i2K

    k,jusing tki .

    end forImpose non reflective boundary condition at end of blocks :

    if (k, j + 1) S i then

    M+k;j,j

    = (1 + n+i2K

    k,j) and M+

    k;j,j+1= n+i2

    K

    k,ielse

    M+k;j,j

    = 1 and M+k;j,j+1

    = 0

    end if

    if (k, j 1) S i then

    Mk;j,j

    = (1 + n+i2K

    k,j) and M

    k;j,j1= n+i2

    K

    k,jelse

    Mk;j,j

    = 1 and Mk;j,j1

    = 0

    end if

    In order to compute the Euler projection fluxes (2.16), the interface quantitiesPk,j+1/2 and uk,j+1/2 are computed directly from the Lagrangian phase solution (withthe pressure updated using (2.10), with (2.9).

    22

  • 8/3/2019 Local Time Stepping

    23/30

    Algorithm 5.4 Euler projection fluxes (2.16)

    for levels k = K ki do

    for (k, j) Ck do

    Compute Pn+(i1)2K,j1/2

    andun+(i1)2K,j1/2

    using (2.9).

    Save fluxes at the previous intermediate time step for transition zone end points

    Compute fluxes using (2.16)

    end forend for

    for level k = ki 1 do

    for (k, j) Ik and dl(k, j, ki) r+ 1 or dr(k, j, ki) r+ 1 doCompute Pn+i2K,

    j1/2andun+i2K,

    j1/2using (2.9).

    Compute fluxes using (2.16)

    end for

    end for

    In the case of the explicit scheme the fluxes at the end of the transition zone Ckare not modified and the conservation property depicted in Figure 4 can be used in a

    very simple manner. In case of the semi-implicit scheme, it is not the case anymore,since the solution has been modified during the Lagrangian step, therefore a special

    synchronization must be done on levels k, for ki k < K, at the interface between

    cells (k, j) and (k, j + 1) ifdl(k, j, k + 1) = r + 1 or at the interface between cells

    (k, j 1) and (k, j) ifdr(k, j, k+ 1) = r+ 1.

    Ifdl(k, j, k + 1) = r + 1, the solution on cell (k, j) is updated over tk/2 while

    the solution on cell (k, j + 1) is updated over tk. The flux Fn+(i1)2K,k,j+1/2

    has

    been computed using the synchronized Lagrange step solution and can be used

    straightforwardly in (2.15) for cell (k, j + 1). However, solution on cell (k, j) has

    already been advanced with a half time step at a previous intermediate time step

    i = i 2Kk, using flux Fn+(i 1)2K,

    k,j+1/2. This quantity has not been tampered with

    since then. Therefore, on (k, j) the update formula (2.15) should be replaced by

    Vn+i2K

    k,j = Vn+(i1)2K

    k,i

    t

    2x

    2F

    n+(i1)2K,k,j+1/2

    Fn+(i 1)2K,k,j+1/2

    Fn+(i1)2K,k,j1/2

    . (5.3)

    Similarly ifdr(k, j, k+1) = r+1, the solution on cell (k, j1) is updated over tk

    while the solution on cell (k, j) is updated over tk/2. The flux Fn+(i1)2K,k,j1/2

    has

    been computed using the synchronized Lagrange step solution and can be used

    straightforwardly in (2.15) for cell (k, j 1). However, solution on cell (k, j)

    has already been advanced with a half time step at a previous intermediate time

    step i = i 2Kk, using flux Fn+(i 1)2K,

    k,j1/2. Therefore, on (k, j) (2.15) should be

    replaced by

    Vn+i2K

    k,j = Vn+(i1)2K

    k,j

    t

    2x

    F

    n+(i1)2K,k,j+1/2

    2Fn+(i 1)2K,k,j1/2

    + Fn+(i1)2K,k,j1/2

    . (5.4)

    23

  • 8/3/2019 Local Time Stepping

    24/30

    The time evolution algorithm takes into account this special synchronization and also

    prepares right hand side corrections for the linear systems at the next intermediate time

    step.

    Algorithm 5.5 Time evolution and synchronization

    for levels k = L ki do

    full time step tk

    for (k, j) Ck

    Vn+i2K

    k,j= V

    n+(i1)2K

    k,j t

    x

    F

    n+(i1)2K,k,j+1/2

    Fn+(i1)2K,k,j1/2

    end for

    for levels k = L ki 1 do

    half time step for (k, j) Ck

    Vn+i2K

    k,j= Vn

    +(i1)2K

    k,j t

    2x

    F

    n+(i1)2K,k,j+1/2

    Fn+(i1)2K,k,j1/2

    .

    if k >= ki then

    special evolution equations should be used at the end of transition zone, (5.4)

    ifdr(k, j, k+ 1) = r+ 1 and (5.3) ifdl(k, j, k+ 1) = r+ 1.

    end if

    Elsewhere the solution remains unchanged

    end for

    5.1 Grid prediction and regriding

    The time step used in the semi implicit scheme is designed according the stability

    condition (2.18) which ensures that the slow transport wave can be handled with a

    maximum principle by the explicit projection step. For this part of the solution, the

    prediction of the tree assuming a displacement of a singularity of at most one cell per

    time step is relevant. The fast acoustic waves being treated implicitly at the Lagrange

    step, a singularity in this part of the solution will smooth out in all the domain of com-

    putation in a single time step, losing of course most of its singular nature. To quantify

    this property we study the simple case of the first order forward implicit scheme ap-plied to a linear scalar equation with speed one tU + xU = 0.

    Un+1j = Unj (U

    n+1j U

    n+1j1 ). (5.5)

    We consider a solution at time tn built from a single detail at position Jon level K 1

    in the multiresolution domain:

    V0 = 0, D1 = . . . = DK2 = 0, DK1j = Jj , D

    K = 0.

    After transformation into the physical space using the decoding operator M1, the

    solution is advanced in time using the implicit scheme (5.5) and then transformed back

    in the multiscale representation using the encoding operator M. We display in Figure13 (a) different details of this solution on level K 1, as a function of the coefficient

    = t/x. The strength of the initial detail DK1J

    decreases rapidly and is below 10%

    of its initial value for > 10. The next detail in the direction of the propagation DK1J+1

    has a significant amplitude for [0, 5]. We then represent the two following details

    DK1J1

    and DK1J+2

    . They are already very small, and all others are negligible. The curve

    corresponding to DK1J+1

    indicates that detail DK1J

    has propagated at a speed higher

    24

  • 8/3/2019 Local Time Stepping

    25/30

    than 1 in a manner that cannot be completely neglected at level K 1. In Figure 13

    (b), the details at the coarser level K 2 are displayed. The strength of the detail on

    cell J/2 + 1 is comparable to that on the cell J/2, which also means that some of the

    solution has actually moved with speed 2. This elementary example illustrates that the

    details are damped by the implicit scheme, which is good because it means that they

    will be captured by coarser levels in the multiresolution hierarchy. Nevertheless, to

    ensure that the regriding at intermediate time step does not deteriorate in the mannerdescribed in Figure 5 (b), we modify the prediction of the grid and assume that the

    speed s in the prediction step of Algorithm 4.2 is in fact 3 instead of 1, which will have

    the effect of broadening the tree thanks to the gradualness rule (4.1).

    0 2 4 6 8 10 12 14 16 18 200.2

    0.0

    0.2

    0.4

    0.6

    0.8

    1.0

    J1

    J

    J+1

    J+2

    (a)

    0 2 4 6 8 10 12 14 16 18 200.10

    0.08

    0.06

    0.04

    0.02

    0.00

    0.02

    J/21

    J/2

    J/2+1

    J/2+2

    (b)

    Fig. 13. Details at time t as a function of (a) dK1J+m and (b) dK2J/2+m for

    m = 1, . . . ,2

    5.2 Numerical simulations for the implicit scheme

    360

    380

    400

    420

    440

    460

    480

    500

    520

    540

    560

    0 10000 20000 30000 400000

    1

    2

    3

    4

    5

    6

    7

    x

    IniUMR

    tree

    (a)

    360

    380

    400

    420

    440

    460

    480

    500

    520

    540

    560

    0 10000 20000 30000 400000

    1

    2

    3

    4

    5

    6

    7

    x

    IniU

    LTStree

    (b)

    Fig. 14. Density field and grid refinement computed with the semi-implicitschemes at time t = 41.6s, for = 0.005. (a) multiresolution scheme (b)Local time stepping scheme.

    To illustrate the algorithm presented above we use the same test case as in subsec-

    tion 4.3 for the explicit scheme. In the case of the semi-implicit scheme the coefficient

    25

  • 8/3/2019 Local Time Stepping

    26/30

    360

    380

    400

    420

    440

    460

    480

    500

    520

    540

    560

    14500 14700 14900 15100 153000

    1

    2

    3

    4

    5

    6

    7

    x

    IniU

    LTSMR

    tree LTStree MR

    (a)

    370

    375

    380

    385

    390

    395

    400

    22000 24000 26000 28000 300000

    1

    2

    3

    4

    5

    6

    7

    x

    IniU

    LTSMR

    tree LTStree MR

    (b)

    500

    505

    510

    515

    520

    525

    530

    535

    540

    545

    4000 5000 60000

    1

    2

    3

    4

    5

    6

    7

    x

    IniU

    LTSMR

    tree LTStree MR

    (c)

    Fig. 15. Density field computed with the semi-implicit schemes at time

    t = 41.6s, for = 0.01. Zoom on (a) kinematic wave (b) right goingacoustic wave (c) left going acoustic wave.

    1e-08

    1e-06

    1e-04

    0.01

    1e-10 1e-06

    E()

    MRLTS

    (a)

    1e-08

    1e-06

    1e-04

    0.01

    1e-10 1e-06

    E(Y)

    MRLTS

    (b)

    Fig. 16. Error on (a) density, (b) gas mass fraction with respect to uniform

    solution versus threshold parameter for 6 levels grid hierarchy.

    an must be set globally on the all x range at each time step. The uniform scheme

    provides us with a time step ensuring stability throughout the simulation t = 0.065s

    hence roughly seven times larger than the one used for the explicit schemes simula-

    tions.

    Figure 14 displays the density field computed with the uniform scheme and the

    26

  • 8/3/2019 Local Time Stepping

    27/30

    1e-08

    1e-06

    1e-04

    0.01

    0 4 8 12 16 20

    E()

    CPU(unif)/CPU(adapt)

    MRLTSU

    (a)

    1e-08

    1e-06

    1e-04

    0.01

    0 4 8 12 16 20

    E(Y)

    CPU(unif)/CPU(adapt)

    MRLTSU

    (b)

    Fig. 17. Error on (a) density, (b) gas mass fraction with respect to uniform

    solution versus CPU gain for 6 levels grid hierarchy.

    0.001

    0.002

    0.003

    0.004

    0.005

    0.006

    0.007

    0.008

    0.009

    0.01

    0 4 8 12 16 20

    Eref()

    CPU(unif)/CPU(adapt)

    MR 5LTS 5MR 6LTS 6

    (a)

    0.001

    0.002

    0.003

    0.004

    0.005

    0.006

    0.007

    0.008

    0.009

    0.01

    0 4 8 12 16 20

    Eref(Y)

    CPU(unif)/CPU(adapt)

    MR 5LTS 5MR 6LTS 6

    (b)

    Fig. 18. Error on (a) density, (b) gas mass fraction with respect to uniform

    reference solution versus CPU gain for 5 and 6 levels grid hierarchy.

    adaptive schemes (MR) and (LTS) The zoom on the three different waves displayed in

    Figure 15 show the robustness of the new algorithm. The kinematic wave is reproduced

    as well, if not better as with the standard (MR) scheme. The acoustic waves are also

    well handled even though they are more smoothed out with the local time stepping

    algorithm than with the standard multiresolution.

    A parameter study for varying values of the threshold is presented in Figures 16

    to 18. In Figure 16 we display the relative error (4.3) between the density or the gas

    mass fraction obtained using the uniform scheme or the different adaptive schemes. As

    in the explicit case, the MR and LTS schemes both exhibit a monotonous convergence

    in O(). We also observe that the relative error on the gas mass fraction is two ordersof magnitude smaller than the error on the density. This is quite normal since the gas

    mass fraction is driven by the slow kinetic wave and actually explicitly computed in

    the semi-implicit scheme. The adaptive grid is retains almost all details in the vicinity

    of the discontinuity in the gas mass fraction, which accounts for a much smaller error.

    On the other hand the density sees acoustic waves which are more sensitive to the

    27

  • 8/3/2019 Local Time Stepping

    28/30

    adaptivity of the grid because they are computed with the implicit scheme.

    Figure 17 displays the same relative errors versus the gain in CPU time. For the

    best error level that can be achieved with the local time stepping algorithms we have a

    CPU gain of more than 17, while the gain using the standard multiresolution is around

    11.

    Eventually we display, in Figure 18, the error between the adaptive solution and

    a reference solution obtained using the uniform scheme on a grid corresponding tothe 9th level. The abscissa is the gain in CPU with respect to the uniform solution on

    the finest level. As expected, both schemes MR and LTS converge to the error level

    corresponding to the error Eu between the uniform solution on the finest level, the 5th

    or the 6th, and the reference solution on the 9th level. Compared to the similar curves

    with the explicit scheme in Figure 11, the local time stepping enhancement seems to be

    more advantageous, knowing that the gas mass fraction is the only component where

    precision really matters: all values of threshold tried on the six level hierarchy lead to

    a relative error below that obtained with the uniform scheme on the 5th level.

    In order to compare all the schemes tested in this study we collect in the follow-

    ing table the performances of the six level simulations, in term of computing times,

    for both the explicit and implicit schemes. The number in parenthesis are the ratio

    between the uniform and the adaptive performances. The gain is significant between

    the uniform and adaptive scheme: 9 in the explicit case and 6 in the implicit one.

    With the global time stepping enhancement it becomes spectacular: 15 in both case.

    The number of calls to the equilibrium state laws is also reported in the table, along

    with the computing times. These figures indicate the potential performances of the

    algorithms when realistic thermodynamical closure laws will be used instead of the

    model one (4.2). One should also note that for the test case presented in this table, we

    have used for the explicit scheme a constant time step t = 0.0048 and for the implicit

    one t = 0.0325 that is roughly 7 times larger. These values are the minimum values

    provided by the stability conditions (2.7) and (2.18) throughout a uniform computa-

    tion. The larger time step in the implicit case is counterbalanced by the cost of solving

    the linear systems (2.12) and both schemes end up costing roughly the same in termsof computing times in the uniform case.

    Explicit Uniform MultiresolutionLocal time

    stepping

    CPU(s) 31.55 3.54 (8.9) 2.14 (14.7)

    State law 10493 1105 (9.5) 237 (44.3)

    Semi-implicit Uniform MultiresolutionLocal time

    stepping

    CPU(s) 33.5 5.8 (5.8) 2.11 (15.9)

    State law 17698 2411 (7.3) 345 (51.3)

    Table 1 Computing times and number of calls to state laws comparison for

    the different algorithms. Threshold parameter = 0.005 and a 6-levelshierarchy.

    28

  • 8/3/2019 Local Time Stepping

    29/30

    6 Conclusion

    We have described in details several algorithms to compute the solution of the one

    dimensional multiphase flow, in the framework of a LagrangeEuler projection for-

    mulation of the equations. Both explicit and semi-implicit schemes are presented, and

    for each one, two adaptive enhancement methods are described. The first one is the

    standard multiresolution method already implemented in more complicated cases. It

    is tested here versus the local time stepping algorithm.

    The robustness of the two algorithms has been checked by doing a parameter study.

    Several values have been tried of the threshold parameter and for the number of

    levels. The relative errors between the different adaptive solutions and the uniform one

    present the expected behaviors. The benefits of the local time stepping enhancement

    in terms of computing time are encouraging.

    Acknowledgments: this work was supported by the Ministere de la Recherche under

    grant ERT-20052274: Simulation avancee du transport des hydrocarbures and by the

    Institut Francais du Petrole. The authors also wish to thank S. Muller and S.-M. Kaber

    for fruitful discussions on the redaction of this paper.

    References

    [1] Nikolay Andrianov, Frederic Coquel, Marie Postel, and Quang Huy Tran. A

    relaxation multiresolution scheme for accelerating realistic two-phase flows cal-

    culations in pipelines. Internat. J. Numer. Methods Fluids, 54(2):207236, 2007.

    [2] Michael Baudin, Christophe Berthon, Frederic Coquel, Roland Masson, and

    Quang-Huy Tran. A relaxation method for two-phase flow models with hydro-

    dynamic closure law. Numer. Math., 99:411440, 2005.

    [3] Michael Baudin, Frederic Coquel, and Quang-Huy Tran. A semi-implicit relax-

    ation scheme for modeling two-phase flow in a pipeline. SIAM J. Sci. Comput.,

    27(3):914936, 2005.

    [4] Marsha J. Berger and Phillip Collela. Local adaptive mesh refinement for shock

    hydrodynamics. Journal of Computational Physics, 82:6484, 1989.

    [5] Marsha J. Berger and Joseph Oliger. Adaptive mesh refinement for hyperbolic

    partial differential equations. Journal of Computational Physics, 53:484512,

    1984.

    [6] Albert Cohen. Numerical analysis of wavelet methods, volume 32 ofStudies in

    Mathematics and its Applications. North-Holland Publishing Co., Amsterdam,

    2003.

    [7] Albert Cohen, Mahmoud S. Kaber, Siegfried Muller, and Marie Postel. Fully

    adaptive multiresolution finite volume schemes for conservation laws. Math.

    Comp., 72(241):183225 (electronic), 2003.

    29

  • 8/3/2019 Local Time Stepping

    30/30

    [8] Frederic Coquel, Edwige Godlewski, Benot Perthame, Arun In, and Paul Rascle.

    Some new Godunov and relaxation methods for two-phase flow problems. In

    Godunov methods (Oxford, 1999), pages 179188. Kluwer/Plenum, New York,

    2001.

    [9] Frederic Coquel, Quang-Long Nguyen, Marie Postel, and Quang-Huy Tran.

    Positivity-preserving Lagrange-projection method with large time-steps for mul-

    tiphase flows and Euler IBVPs. submitted.

    [10] Frederic Coquel, Quang-Long Nguyen, Marie Postel, and Quang-Huy Tran.

    Large time-step positivity-preserving method for multiphase flows. To appear

    in proceedings of HYP2006, 2006.

    [11] Frederic Coquel, Quang-Long Nguyen, Marie Postel, and Quang-Huy Tran.

    Time varying grids for gas dynamics. To appear in proceedings of ECMI2006,

    2006.

    [12] Frederic Coquel, Marie Postel, Nicole Poussineau, and Quang Huy Tran. Mul-

    tiresolution technique and explicit-implicit scheme for multicomponent flows. J.

    Numer. Math, 14(3):187216, sep 2006.

    [13] Edwige Godlewski and Pierre-Arnaud Raviart. Numerical approximation of hy-

    perbolic systems of conservation laws, volume 118 ofApplied Mathematical Sci-

    ences. Springer Verlag, New-York, USA, 1996.

    [14] Ami Harten. Multiresolution algorithms for the numerical solutions of hyperbolic

    conservation laws. Comm. Pure Appl. Math., 48:13051342, 1995.

    [15] Philipp Lamby, Siegried Muller, and Youssef Stiriba. Solution of shallow water

    equations using fully adaptive multiscale schemes. Int. Journal for Numerical

    Methods in Fluids, 49, No.4:417437, 2005.

    [16] Siegfried Muller. Adaptive Multiscale Schemes for Conservation Laws, vol-

    ume 27 ofLecture Notes on Computational Science and Engineering. Springer,

    2002.

    [17] Siegried Muller and Youssef Stiriba. Fully adaptive multiscale schemes for con-

    servation laws employing locally varying time stepping. Journal for Scientific

    Computing, pages 493531, 2007. Report No. 238, IGPM, RWTH Aachen.

    [18] Siegried Muller and Youssef Stiriba. A multilevel finite volume method with

    multiscale-based grid adaptation for steady compressible flows. Journal of Com-

    putational and Applied Mathematics, 2007. to appear in the special issue Emer-

    gent wavelet-based algorithms in science and engineering ECCOMAS 2006.

    [19] Stanley Osher and Richard Sanders. Numerical approximations to nonlinear

    conservation laws with locally varying time and space grids. Math. Comp.,

    41(164):321336, 1983.

    30