high-resolution finite volume methods for hyperbolic pdes on...

39
High-resolution finite volume methods for hyperbolic PDEs on manifolds Randall J. LeVeque Department of Applied Mathematics University of Washington Supported in part by NSF, DOE

Upload: others

Post on 31-May-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

  • High-resolution finite volume methods for

    hyperbolic PDEs on manifolds

    Randall J. LeVequeDepartment of Applied Mathematics

    University of Washington

    Supported in part by NSF, DOE

  • Overview

    • High-resolution methods for first-order hyperbolic systems• Shock waves in nonlinear problems• Heterogeneous media with discontinuous properties• Godunov-type methods based on Riemann solvers• Second-order correction terms with limiters to minimize

    dissipation and dispersion

  • Software

    CLAWPACK (Conservation LAWs Package):

    http://www.amath.washington.edu/˜claw

    Includes a preliminary version of CLAWMAN for manifolds.

    Developed by• Derek Bale (relativistic flow)• James Rossmanith (geophysical flow on the sphere)

    Also includes AMRCLAW for adaptive mesh refinement onrectangular patches (with Marsha Berger).

  • AMR on a manifold

    −1 −0.5 0 0.5 1−1

    −0.5

    0

    0.5

    1Pressure at time t = 1

    −1 −0.5 0 0.5 1−1

    −0.5

    0

    0.5

    1Pressure at time t = 1.5

    −1 −0.5 0 0.5 1−1

    −0.5

    0

    0.5

    1Pressure at time t = 2

  • Outline

    • Brief review of Godunov-type methods• wave propagation approach• f-wave approach for discontinous fluxes and source terms• curvilinear grids in flat space• manifolds:

    • parallel transport data to cell edges• Express in local orthonormal frame• Solve locally-flat Riemann problem• Metric terms and geometric source term naturally

    incorporated

    References:

    http://www.amath.washington.edu/˜rjl/publications and /students

    J. Pons, Font, Ibanez, Marti, Miralles, General relativistic hydrodynamics with specialrelativistic Riemann solvers, Astron. Astrophys. 339 (1998), 638-642

  • Finite-difference Methods

    • Pointwise values Qni ≈ q(xi, tn)• Approximate derivatives by finite differences• Assumes smoothness

    Finite-volume Methods

    • Approximate cell averages: Qni ≈1

    ∆x

    ∫ xi+1/2

    xi−1/2

    q(x, tn) dx

    • Integral form of conservation law,

    ∂t

    ∫ xi+1/2

    xi−1/2

    q(x, t) dx = f(q(xi−1/2, t)) − f(q(xi+1/2, t))

    leads to conservation law qt + fx = 0 but also directly tonumerical method.

  • Godunov’s method

    Qni defines a piecewise constant function

    q̃n(x, tn) = Qni for xi−1/2 < x < xi+1/2

    Discontinuities at cell interfaces =⇒ Riemann problems.

    PSfrag replacementstn

    tn+1

    Qni

    Qn+1i

    q̃n(xi−1/2, t) ≡ q∨|

    (Qi−1, Qi) for t > tn.

    Fni−1/2 =1

    k

    ∫ tn+1

    tn

    f(q∨|

    (Qni−1, Qni )) dt = f(q

    ∨|

    (Qni−1, Qni )).

  • Riemann solution for the Euler equations

    PSfrag replacements

    ρl

    ul

    pl

    ρ∗l

    u∗

    p∗

    ρ∗r

    u∗

    p∗

    ρr

    ur

    pr

    rarefaction wave shockcontact

    The Roe solver uses the solution to a linear system

    qt + Âi−1/2qx = 0.

    All waves are simply discontinuities.

    Typically a fine approximation if jumps are approximatelycorrect.

  • Wave-propagation viewpoint

    For linear system qt + Aqx = 0, the Riemann solution consists of

    waves Wp propagating at constant speed λp.

    PSfrag replacements

    λ2∆t

    W1i−1/2W1i+1/2

    W2i−1/2

    W3i−1/2

    Qi −Qi−1 =m∑

    p=1

    αpi−1/2

    rp ≡m∑

    p=1

    Wpi−1/2

    .

    Qn+1i = Qni −

    ∆t

    ∆x

    [λ2W2i−1/2 + λ3W3i−1/2 + λ1W1i+1/2

    ].

  • High-resolution method for systems

    Qn+1i = Qni −

    ∆t

    ∆x

    [A+∆Qi−1/2 + A−∆Qi+1/2

    ]−∆t

    ∆x(F̃i+1/2−F̃i−1/2)

    A−∆Qi−1/2 =Mw∑

    p=1

    (spi−1/2

    )−Wpi−1/2

    ,

    A+∆Qi−1/2 =Mw∑

    p=1

    (spi−1/2

    )+Wpi−1/2

    ,

    Correction flux:

    F̃i−1/2 =1

    2

    Mw∑

    p=1

    |spi−1/2

    |(

    1 − ∆t∆x

    |spi−1/2

    |)W̃p

    i−1/2

    where W̃pi−1/2

    is a limited version of Wpi−1/2

    .

  • CLAWPACK

    http://www.amath.washington.edu/˜claw/

    • Fortran codes with Matlab graphics routines.• Many examples and applications to run or modify.• 1d, 2d, and 3d.

    User supplies:• Riemann solver, splitting data into waves and fluctuations

    (Need not be in conservation form)

    • Boundary condition routine to extend data to ghost cellsStandard bc1.f routine includes many standard BC’s

    • Initial conditions — qinit.f

  • Some applications• Gas dynamics, Euler equations• Waves in heterogeneous / random media• Acoustics, ultrasound, seismology• Elasticity, plasticity, soil liquifaction• Flow in porous media, groundwater contamination, oil recovery• Geophysical flow on the sphere• Shallow water equations, bottom topography, tsunami propagation• Chemotaxis and pattern formation• Traffic flow• Crystal growth• Multi-fluid, multi-phase flows, bubbly flow• Streamfunction–vorticity form of incompressible flow• Projection methods for incompressible flow• Combustion, detonation waves• Astrophysics: binary stars, planetary nebulae, jets• Magnetohydrodynamics, shallow water MHD• Relativistic flow, black hole accretion• Numerical relativity — Einstein equations, gravity waves, cosmology

  • Spatially-varying flux functions

    In one dimension:qt + f(q, x)x = 0

    Examples:• Nonlinear elasticity in heterogeneous materials• Traffic flow on roads with varying conditions• Flow through heterogeneous porous media• Solving conservation laws on curved manifolds

  • Riemann problem for spatially-varying flux

    qt + f(q, x)x = 0

    Cell-centered discretization: Flux fi(q) defined in ith cell.PSfrag replacements

    qt + fi−1(q)x = 0 qt + fi(q)x = 0

    Qi−1 Qi

    Qli−1/2

    Qri−1/2

    W1i−1/2

    W2i−1/2

    W3i−1/2

    Flux-based wave decomposition:

    fi(Qi) − fi−1(Qi−1) =m∑

    p=1

    βpi−1/2

    rpi−1/2

    ≡m∑

    p=1

    Zpi−1/2

  • Wave-propagation algorithm using f-waves

    Qn+1i = Qni −

    ∆t

    ∆x[A+∆Qi−1/2 + A−∆Qi+1/2]

    − ∆t∆x

    [F̃i+1/2 − F̃i−1/2]

    Standard version: Qi −Qi−1 =∑m

    p=1 Wpi−1/2

    A−∆Qi+1/2 =m∑

    p=1

    (spi+1/2)−Wpi+1/2

    A+∆Qi−1/2 =m∑

    p=1

    (spi−1/2)+Wpi−1/2

    F̃i−1/2 =1

    2

    m∑

    p=1

    |spi−1/2|(

    1 − ∆t∆x

    |spi−1/2|)W̃pi−1/2.

  • Wave-propagation algorithm using f-waves

    Qn+1i = Qni −

    ∆t

    ∆x[A+∆Qi−1/2 + A−∆Qi+1/2]

    − ∆t∆x

    [F̃i+1/2 − F̃i−1/2]

    Using f -waves: fi(Qi) − fi−1(Qi−1) =∑m

    p=1 Zpi−1/2

    A−∆Qi−1/2 =∑

    p:spi−1/2

    0

    Zpi−1/2,

    F̃i−1/2 =1

    2

    m∑

    p=1

    sgn(spi−1/2)

    (1 − ∆t

    ∆x|spi−1/2|

    )Z̃pi−1/2

  • Source termsqt + f(q)x = ψ(q)

    Quasi-steady problems with near-cancellation:f(q)x and ψ both large but qt ≈ 0.

    Examples:• Atmosphere or stellar dynamics with gravity balanced by

    hydrostatic pressure

    • Shallow water equations in a lake over bottom topography

    Fractional step method: Alternate between

    1. qt + f(x)x = 0,

    2. qt = ψ(q)

    Large motions induced in each step should cancel out, but won’tnumerically.

  • Source termsqt + f(q)x = ψ(q)

    Quasi-steady problems with near-cancellation:f(q)x and ψ both large but qt ≈ 0.

    Examples:• Atmosphere or stellar dynamics with gravity balanced by

    hydrostatic pressure

    • Shallow water equations in a lake over bottom topography

    Fractional step method: Alternate between

    1. qt + f(x)x = 0,

    2. qt = ψ(q)

    Large motions induced in each step should cancel out, but won’tnumerically.

  • Riemann problem with a delta-function source term

    qt + f(q)x = ∆xΨi−1/2 δ(x− xi−1/2)PSfrag replacements

    qt + fi−1(q)x = 0 qt + fi(q)x = 0

    Qi−1 Qi

    Qli−1/2

    Qri−1/2

    W1i−1/2

    W2i−1/2

    W3i−1/2

    Flux is no longer continuous:f(Qri−1/2) − f(Qli−1/2) = ∆xΨi−1/2.

    fi(Qi)−fi−1(Qi−1)−∆xΨi−1/2 =m∑

    p=1

    βpi−1/2

    rpi−1/2

    ≡m∑

    p=1

    Zpi−1/2

  • Multidimensional Hyperbolic Problems

    Integral form of conservation law:

    d

    dt

    ∫∫

    q(x, y, t) dx dy = −∫

    ∂Ω~n · ~f(q) ds.

    If q is smooth then the divergence theorem gives

    d

    dt

    ∫∫

    q(x, y, t) dx dy = −∫∫

    ~∇ · ~f(q) dx dy,

    or ∫∫

    [qt + ~∇ · ~f(q)

    ]dx dy = 0.

    True for all Ω =⇒qt + f(q)x + g(q)y = 0,

  • Finite volume method in 2D

    PSfrag replacementsxi−1/2

    xi+1/2

    yj−1/2

    yj+1/2

    Qij

    xi−1/2

    Qnij ≈1

    ∆x∆y

    ∫ yj+1/2

    yj−1/2

    ∫ xi+1/2

    xi−1/2

    q(x, y, tn) dx dy.

    d

    dt

    ∫∫

    Cij

    q(x, y, t) dx dy =

    ∫ yj+1/2yj−1/2

    f(q(xi+1/2, y, t) dy −

    ∫ yj+1/2yj−1/2

    f(q(xi−1/2, y, t) dy

    +

    ∫ xi+1/2xi−1/2

    g(q(x, yj+1/2, t) dx −

    ∫ xi+1/2xi−1/2

    g(q(x, yj−1/2, t) dx.

    Suggests the unsplit method

    Qn+1ij = Qnij −

    ∆t

    ∆x[Fni+1/2,j − Fni−1/2,j ] −

    ∆t

    ∆y[Gni,j+1/2 −Gni,j−1/2],

  • Unsplit Godunov in 2D

    At each cell edge, the flux is determined by solving a Riemannproblem in the normal direction with data from the neighboringcells.

    qt + f(q)x = 0

    Fni+1/2,j = f(q∨|

    (Qnij , Qni+1,j))

    qt + g(q)y = 0

    Gni,j−1/2 = g(q∨|

    (Qni,j−1, Qnij))

  • Finite volume method on a curvilinear grid(Flat space)

    Two possible approaches:

    1. Transform equations to computational space.Discretize equations that include metric terms, source terms.

    2. Update cell averages in physical space.Solve 1d Riemann problems for physical equations in directionnormal to cell edges to compute flux.

  • Example: Linear acoustics

    Homogeneous medium with

    density ρ ≡ 1, bulk modulus K ≡ 1, sound speed c ≡ 1,p = pressure, u = velocity, T = pI = stress tensor

    ∂tp+

    1√h

    ∂xk

    (√huk

    )= 0

    ∂tum +

    1√h

    ∂xk

    (√hT km

    )= −ΓmnkT kn .

  • One approach:Discretize these equations directly in computational coordinatesxk.

    ∂tp+

    1√h

    ∂xk

    (√huk

    )= 0

    ∂tum +

    1√h

    ∂xk

    (√hT km

    )= −ΓmnkT kn .

    Note:• Spatially varying flux functions• Source term — conservative?

  • Better approach:

    Update cell average of q over physical finite volume cell

    • Store Cartesian velocity components u, v in each cell.• At each cell edge, use data on each side to

    • compute normal velocities at edge,• solve 1d Riemann problem in normal direction,• scale resulting waves by length of side,• use to update cell average

  • Grid mapping:

    PSfrag replacements

    ∆x1

    ∆x2

    PSfrag replacements∆x1

    ∆x2

    J =

    [∂x/∂x1 ∂x/∂x2

    ∂y/∂x1 ∂y/∂x2

    ], H = JTJ =

    [h11 h12h21 h22

    ], h = det(H).

    Lengths of sides in physical space ≈ h11∆x1, h22∆x2,

    Area of cell ≈√h∆x1∆x2.

    Flux differencing around boundary approximates covariantdivergence of flux.

  • Shallow water flow into a cylinder

    −5 −4 −3 −2 −1 0 1 2 3 4 5−5

    −4

    −3

    −2

    −1

    0

    1

    2

    3

    4

    5

    −5 −4 −3 −2 −1 0 1 2 3 4 5−5

    −4

    −3

    −2

    −1

    0

    1

    2

    3

    4

    5q(1) at time t = 1.5

    −5 −4 −3 −2 −1 0 1 2 3 4 5−5

    −4

    −3

    −2

    −1

    0

    1

    2

    3

    4

    5q(1) at time t = 2.25

    −5 −4 −3 −2 −1 0 1 2 3 4 5−5

    −4

    −3

    −2

    −1

    0

    1

    2

    3

    4

    5

    −5 −4 −3 −2 −1 0 1 2 3 4 5−5

    −4

    −3

    −2

    −1

    0

    1

    2

    3

    4

    5q(1) at time t = 1.5

    −5 −4 −3 −2 −1 0 1 2 3 4 5−5

    −4

    −3

    −2

    −1

    0

    1

    2

    3

    4

    5q(1) at time t = 2.25

  • Acoustics on a manifold

    ∂tp+

    1√h

    ∂xk

    (√huk

    )= 0

    ∂tum +

    1√h

    ∂xk

    (√hT km

    )= −ΓmnkT kn .

    Now we must represent velocities in “computational coordinates”

  • At each cell edge:

    • Parallel transport cell-centered velocities to edge,• Change coordinates to a local orthonormal frame at cell edge

    to obtain normal and tangential velocities,• Solve 1d Riemann problem normal to cell edge

    (assuming locally flat)• Scale resulting waves by length of side,

    transform back to cell-centered coordinates,• Update cell averages.

  • CLAWMAN software

    Currently only 2d.

    Requires metric tensor H

    • 2 × 2 matrix as function of x1 and x2,• Used to compute scaling factors for edge lengths, cell areas,• Used for orthonormalization at cell edges.

    Christoffel symbols are needed for parallel transport

    • Computed by finite differencing H.

  • Parallel Transport

    ∂xkum+Γmnku

    n = 0 or∂

    ∂xk

    [u1

    u2

    ]+

    [Γ1

    1k Γ12k

    Γ21k Γ

    22k

    ] [u1

    u2

    ]= 0.

    Approximate using Taylor series:

    um(xk ± 1

    2∆xk

    )≈ um(xk) ∓ 1

    2∆xkΓmnku

    n(xk).

  • Parallel Transport for acoustics

    For acoustics with q = (p, u1, u2)T , solve Riemann problem with

    q`i−1/2,j =

    (I −

    [ 0 0 00 Γ1

    1k Γ12k

    0 Γ21k Γ

    22k

    ])qi−1,j

    and

    qri−1/2,j =

    (I +

    [ 0 0 00 Γ1

    1k Γ12k

    0 Γ21k Γ

    22k

    ])qi,j

  • f-wave formulation

    Split jump in fluxes ∆F into waves.

    ∆F 1 =

    I +

    0 0 00 Γ1

    1k Γ12k

    0 Γ21k Γ

    22k

    ij

    f1ij −

    I −

    0 0 00 Γ1

    1k Γ12k

    0 Γ21k Γ

    22k

    i−1,j

    f1i−1,j

    = f1ij − f1i−1,j − ∆x1ψ1i−1/2,j

    where

    ψ1i−1/2,j = −1

    2

    [

    0Γ111T

    11 + Γ112T21

    Γ211T11 + Γ212T

    21

    ]

    ij

    +

    [0

    Γ111T11 + Γ112T

    21

    Γ211T11 + Γ212T

    21

    ]

    i−1,j

    .

    This is n = 1 portion of the source term

    ψ = −ΓmnkT kn.

  • Acoustics on a manifold

    ∂tp+

    1√h

    ∂xk

    (√huk

    )= 0

    ∂tum +

    1√h

    ∂xk

    (√hT km

    )= −ΓmnkT kn .

    With finite volume formulation,• Source term is automatically incorporated by parallel

    transport of fluxes,• Covariant divergence is handled by use of edge lengths and

    cell volume,• Parallel transport and orthonormalization allows use of

    standard flat-space Riemann solver at interface.

  • Cubed sphere grid

    Six logically rectangular grids arepatched together.

    Data is transferred between patchesusing ghost cells

  • Shallow water on the sphere

    0 0.25 0.5 0.75 1

    0

    0.25

    0.5

    0.75

    1 1D2D

    PSfrag replacements

    t = 0

    Scatterplot of depth vs. lattitude(from north to south pole)

    Solid line is “exact” solutionfrom 1D equation

    0 0.25 0.5 0.75 1

    0

    0.25

    0.5

    0.75

    1 1D2D

    PSfrag replacements

    t = 1.25

    0 0.25 0.5 0.75 1

    0

    0.25

    0.5

    0.75

    1 1D2D

    PSfrag replacementst = 1.25

    t = 2.5

  • Shallow water on the sphere

    0 0.25 0.5 0.75 1

    0

    0.25

    0.5

    0.75

    1 1D2D

    PSfrag replacements

    t = 0

    Scatterplot of depth vs. lattitude(from north to south pole)

    Solid line is “exact” solutionfrom 1D equation

    0 0.25 0.5 0.75 1

    0

    0.25

    0.5

    0.75

    1 1D2D

    PSfrag replacements

    t = 1.25

    0 0.25 0.5 0.75 1

    0

    0.25

    0.5

    0.75

    1 1D2D

    PSfrag replacementst = 1.25

    t = 2.5

  • Outline

    • Brief review of Godunov-type methods• wave propagation approach• f-wave approach for discontinous fluxes and source terms• curvilinear grids in flat space• manifolds:

    • parallel transport data to cell edges• Express in local orthonormal frame• Solve locally-flat Riemann problem• Metric terms and geometric source term naturally

    incorporated

    References:

    http://www.amath.washington.edu/˜rjl/publications and /students

    J. Pons, Font, Ibanez, Marti, Miralles, General relativistic hydrodynamics with specialrelativistic Riemann solvers, Astron. Astrophys. 339 (1998), 638-642

    OverviewSoftwareAMR on a manifoldOutlineGodunov's methodRiemann solution for the Euler equationsWave-propagation viewpointHigh-resolution method for systemsCLAWPACKprnormal Some applicationsSpatially-varying flux functionsRiemann problem for spatially-varying fluxWave-propagation algorithm using f-wavesWave-propagation algorithm using f-waves

    Source termsSource terms

    Riemann problem with a delta-function source termMultidimensional Hyperbolic ProblemsFinite volume method in 2DUnsplit Godunov in 2DFinite volume method on a curvilinear gridExample: Linear acousticsShallow water flow into a cylinderAcoustics on a manifoldCLAWMAN softwareParallel TransportParallel Transport for acousticsf-wave formulationAcoustics on a manifoldCubed sphere gridShallow water on the sphereShallow water on the sphere

    Outline