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
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 on rectangular patches (with Marsha Berger).
AMR on a manifold Pressure at time t = Pressure at time t =.5 Pressure at time t = 2 0.5 0.5 0.5 0 0 0 0.5 0.5 0.5 0.5 0 0.5 0.5 0 0.5 0.5 0 0.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 special relativistic Riemann solvers, Astron. Astrophys. 339 (998), 638-642
Finite-difference Methods Pointwise values Q n i q(x i, t n ) Approximate derivatives by finite differences Assumes smoothness Finite-volume Methods Approximate cell averages: Q n i x Integral form of conservation law, xi+/2 x i /2 q(x, t n ) dx t xi+/2 x i /2 q(x, t) dx = f(q(x i /2, t)) f(q(x i+/2, t)) leads to conservation law q t + f x = 0 but also directly to numerical method.
Godunov s method Q n i defines a piecewise constant function q n (x, t n ) = Q n i for x i /2 < x < x i+/2 Discontinuities at cell interfaces = Riemann problems. t n+ ag replacements t n Q n+ i Q n i q n (x i /2, t) q (Q i, Q i ) for t > t n. F n i /2 = k tn+ t n f(q (Q n i, Q n i )) dt = f(q (Q n i, Q n i )).
Riemann solution for the Euler equations rarefaction wave contact shock ρ l u l ρ l u p ρ r u p ρ r u r p l p r The Roe solver uses the solution to a linear system q t + Âi /2q x = 0. All waves are simply discontinuities. Typically a fine approximation if jumps are approximately correct.
Wave-propagation viewpoint For linear system q t + Aq x = 0, the Riemann solution consists of waves W p propagating at constant speed λ p. eplacements λ 2 t W 2 i /2 W i /2 W i+/2 W 3 i /2 Q i Q i = m α p i /2 rp m W p i /2. p= p= Q n+ i = Q n i x[ t λ 2 Wi /2 2 + λ3 Wi /2 3 + λ Wi+/2 ].
High-resolution method for systems Q n+ i = Q n i t x [ A + Q i /2 + A Q i+/2 ] t x ( F i+/2 F i /2 ) Correction flux: F i /2 = 2 A Q i /2 = A + Q i /2 = M w p= M w (s p i /2 ) W p i /2, p= M w (s p i /2 )+ W p i /2, p= ( s p i /2 t ) x sp i /2 W p i /2 where W p i /2 is a limited version of Wp i /2.
CLAWPACK http://www.amath.washington.edu/ claw/ Fortran codes with Matlab graphics routines. Many examples and applications to run or modify. d, 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 cells Standard bc.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: q t + 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 q t + f(q, x) x = 0 Cell-centered discretization: Flux f i (q) defined in ith cell. eplacements W i /2 W 2 i /2 W 3 i /2 Q l i /2 Q r i /2 Q i Q i q t + f i (q) x = 0 q t + f i (q) x = 0 Flux-based wave decomposition: f i (Q i ) f i (Q i ) = m p= β p i /2 rp i /2 m p= Z p i /2
Wave-propagation algorithm using f-waves Q n+ i = Q n i t x [A+ Q i /2 + A Q i+/2 ] t x [ F i+/2 F i /2 ] Standard version: Q i Q i = m p= Wp i /2 A Q i+/2 = A + Q i /2 = F i /2 = 2 m (s p i+/2 ) W p i+/2 p= m (s p i /2 )+ W p i /2 p= m p= ( s p i /2 t ) x sp i /2 W p i /2.
Wave-propagation algorithm using f-waves Q n+ i = Q n i t x [A+ Q i /2 + A Q i+/2 ] t x [ F i+/2 F i /2 ] Using f-waves: f i (Q i ) f i (Q i ) = m p= Zp i /2 A Q i /2 = A + Q i /2 = F i /2 = 2 p:s p i /2 <0 Z p i /2, p:s p i /2 >0 Z p i /2, m p= ( sgn(s p i /2 ) t ) x sp i /2 Z p i /2
Source terms q t + f(q) x = ψ(q) Quasi-steady problems with near-cancellation: f(q) x and ψ both large but q t 0. Examples: Atmosphere or stellar dynamics with gravity balanced by hydrostatic pressure Shallow water equations in a lake over bottom topography
Source terms q t + f(q) x = ψ(q) Quasi-steady problems with near-cancellation: f(q) x and ψ both large but q t 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. q t + f(x) x = 0, 2. q t = ψ(q) Large motions induced in each step should cancel out, but won t numerically.
Riemann problem with a delta-function source term eplacements q t + f(q) x = xψ i /2 δ(x x i /2 ) W i /2 W 2 i /2 W 3 i /2 Q l i /2 Q r i /2 Q i Q i q t + f i (q) x = 0 q t + f i (q) x = 0 Flux is no longer continuous: f(q r i /2 ) f(ql i /2 ) = xψ i /2. f i (Q i ) f i (Q i ) xψ i /2 = m p= β p i /2 rp i /2 m p= Z p i /2
Multidimensional Hyperbolic Problems Integral form of conservation law: d q(x, y, t) dx dy = dt Ω Ω n f(q) ds. If q is smooth then the divergence theorem gives d q(x, y, t) dx dy = dt f(q) dx dy, or Ω True for all Ω = Ω [ q t + f(q) ] Ω dx dy = 0. q t + f(q) x + g(q) y = 0,
Finite volume method in 2D ements y x j+/2 i /2 y j /2 Q ij Q n ij x y yj+/2 y j /2 xi+/2 x i /2 q(x, y, t n ) dx d x i /2 x i+/2 d dt C ij q(x, y, t) dx dy = yj+/2 y j /2 f(q(x i+/2, y, t) dy yj+/2 y j /2 f(q(x i /2, y, t) dy + xi+/2 x i /2 g(q(x, y j+/2, t) dx xi+/2 x i /2 g(q(x, y j /2, t) dx. Suggests the unsplit method Q n+ ij = Q n ij t x [F n i+/2,j F n i /2,j ] t y [Gn i,j+/2 Gn i,j /2 ],
Unsplit Godunov in 2D At each cell edge, the flux is determined by solving a Riemann problem in the normal direction with data from the neighboring cells. q t + f(q) x = 0 F n i+/2,j = f(q (Q n ij, Q n i+,j)) q t + g(q) y = 0 G n i,j /2 = g(q (Q n i,j, Qn ij ))
Finite volume method on a curvilinear grid (Flat space) Two possible approaches:. Transform equations to computational space. Discretize equations that include metric terms, source terms. 2. Update cell averages in physical space. Solve d Riemann problems for physical equations in direction normal to cell edges to compute flux.
Example: Linear acoustics Homogeneous medium with density ρ, bulk modulus K, sound speed c, p = pressure, u = velocity, T = pi = stress tensor t p + h t um + h ( ) h u k x k = 0 ( ) h T km x k = Γ m nk T kn.
One approach: Discretize these equations directly in computational coordinates x k. t p + h t um + h Note: Spatially varying flux functions Source term conservative? ( ) h u k x k = 0 ( ) h T km x k = Γ m nk T kn.
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 d Riemann problem in normal direction, scale resulting waves by length of side, use to update cell average
Grid mapping: cements x 2 PSfrag replacements x x x 2 J = [ ] x/ x x/ x 2 y/ x y/ x 2, H = J T J = [ ] h h 2, h = det(h). h 2 h 22 Lengths of sides in physical space h x, h 22 x 2, Area of cell h x x 2. Flux differencing around boundary approximates covariant divergence of flux.
Shallow water flow into a cylinder 5 5 q() at time t =.5 5 q() at time t = 2.25 4 4 4 3 3 3 2 2 2 0 0 0 2 2 2 3 3 3 4 4 4 5 5 4 3 2 0 2 3 4 5 5 5 4 3 2 0 2 3 4 5 5 5 4 3 2 0 2 3 4 5 5 5 q() at time t =.5 5 q() at time t = 2.25 4 4 4 3 3 3 2 2 2 0 0 0 2 2 2 3 3 3 4 4 4 5 5 4 3 2 0 2 3 4 5 5 5 4 3 2 0 2 3 4 5 5 5 4 3 2 0 2 3 4 5
Acoustics on a manifold t p + h t um + h ( ) h u k x k = 0 ( ) h T km x k = Γ m nk T 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 d 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 x and x 2, 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 x k um +Γ m nk un = 0 or x k [ u u 2 ] Γ +[ k Γ 2k Γ 2 k Γ 2 2k ] [ u u 2 ] = 0. Approximate using Taylor series: u m ( x k ± 2 xk ) u m (x k ) 2 xk Γ m nk un (x k ).
Parallel Transport for acoustics For acoustics with q = (p, u, u 2 ) T, solve Riemann problem with q l i /2,j = (I [ 0 0 0 0 Γ k Γ 2k 0 Γ 2 k Γ 2 2k ]) q i,j and q r i /2,j = (I + [ 0 0 0 0 Γ k Γ 2k 0 Γ 2 k Γ 2 2k ]) q i,j
f-wave formulation Split jump in fluxes F into waves. F = I + 0 0 0 0 Γ k Γ 2k 0 Γ 2 k Γ 2 2k ij f ij I 0 0 0 0 Γ k Γ 2k 0 Γ 2 k Γ 2 2k fi,j i,j = f ij f i,j x ψ i /2,j where ψ i /2,j = 2 [ 0 Γ T + Γ 2 T 2 Γ 2 T + Γ 2 2 T 2 ] ij + [ 0 Γ T + Γ 2 T 2 Γ 2 T + Γ 2 2 T 2 ] i,j This is n = portion of the source term ψ = Γ m nk T kn.
Acoustics on a manifold t p + h t um + h ( ) h u k x k = 0 ( ) h T km x k = Γ m nk T 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 are patched together. Data is transferred between patches using ghost cells
Shallow water on the sphere t=0 D 2D Scatterplot of depth vs. lattitude (from north to south pole) 0.75 0.5 Solid line is exact solution from D equation 0.25 eplacements 0 0 0.25 0.5 0.75
Shallow water on the sphere t=0 D 2D Scatterplot of depth vs. lattitude (from north to south pole) 0.75 0.5 Solid line is exact solution from D equation 0.25 eplacements 0 0 0.25 0.5 0.75 t =.25 t = 2.5 D 2D 0.75 0.75 0.5 0.5 PSfrag replacements 0.25 eplacements t =.25 0 0 0.25 0.5 0.75 D 2D 0.25 0 0 0.25 0.5 0.75
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 special relativistic Riemann solvers, Astron. Astrophys. 339 (998), 638-642