Locally Divergence-Free Central Discontinuous Galerkin Methods for Ideal MHD Equations

Similar documents
An efficient implementation of the divergence free constraint in a discontinuous Galerkin method for magnetohydrodynamics on unstructured meshes

A central discontinuous Galerkin method for Hamilton-Jacobi equations

A Comparative Study of Divergence-Cleaning Techniques for Multi-Dimensional MHD Schemes )

Multi-D MHD and B = 0

A Finite Volume Code for 1D Gas Dynamics

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

State of the Art MHD Methods for Astrophysical Applications p.1/32

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

The RAMSES code and related techniques 2- MHD solvers

On limiting for higher order discontinuous Galerkin method for 2D Euler equations

On divergence-free reconstruction schemes for CED and MHD

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

Divergence-free interpolation of vector fields from point values exact B = 0 in numerical simulations

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

Hyperbolic Divergence Cleaning for the MHD Equations

A Central Discontinuous Galerkin Method for Hamilton-Jacobi Equations

Arbitrary order exactly divergence-free central discontinuous Galerkin methods for ideal MHD equations

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

Positivity-preserving high order schemes for convection dominated equations

AN OPTIMALLY ACCURATE SPECTRAL VOLUME FORMULATION WITH SYMMETRY PRESERVATION

A Space-Time Expansion Discontinuous Galerkin Scheme with Local Time-Stepping for the Ideal and Viscous MHD Equations

arxiv: v1 [astro-ph.im] 23 Feb 2011

Locally divergence-free spectral-dg methods for ideal magnetohydrodynamic equations on cylindrical coordinates

arxiv: v2 [math.na] 4 Mar 2014

Divergence- and Curl-Preserving Prolongation and Restriction Formulas

Bound-preserving high order schemes in computational fluid dynamics Chi-Wang Shu

Riemann Solvers and Numerical Methods for Fluid Dynamics

Dedicated to the 70th birthday of Professor Lin Qun

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

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

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

Fourier analysis for discontinuous Galerkin and related methods. Abstract

The RAMSES code and related techniques I. Hydro solvers

Chapter 1. Introduction

A class of the fourth order finite volume Hermite weighted essentially non-oscillatory schemes

Applying Asymptotic Approximations to the Full Two-Fluid Plasma System to Study Reduced Fluid Models

Finite Volume for Fusion Simulations

Various Hydro Solvers in FLASH3

Constrained Transport Method for the Finite Volume Evolution Galerkin Schemes with Application in Astrophysics

ABSTRACT. A new unsplit staggered mesh algorithm (USM) that solves multidimensional

Computational Astrophysics

A local-structure-preserving local discontinuous Galerkin method for the Laplace equation

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

Hybrid semi-lagrangian finite element-finite difference methods for the Vlasov equation

Part 1: Numerical Modeling for Compressible Plasma Flows

A Comparison between the Two-fluid Plasma Model and Hall-MHD for Captured Physics and Computational Effort 1

The one-dimensional equations for the fluid dynamics of a gas can be written in conservation form as follows:

Runge-Kutta discontinuous Galerkin method with a simple and compact Hermite WENO limiter

arxiv: v3 [physics.comp-ph] 22 Mar 2018

CapSel Roe Roe solver.

A Multi-Dimensional Limiter for Hybrid Grid

A high order adaptive finite element method for solving nonlinear hyperbolic conservation laws

Divergence Formulation of Source Term

A Central Compact-Reconstruction WENO Method for Hyperbolic Conservation Laws

A general well-balanced finite volume scheme for Euler equations with gravity

A Study of 3-Dimensional Plasma Configurations using the Two-Fluid Plasma Model

Entropy stable high order discontinuous Galerkin methods. for hyperbolic conservation laws

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

Solving the Euler Equations!

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

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

TOTAL VARIATION DIMINISHING RUNGE-KUTTA SCHEMES

ALTERNATING EVOLUTION DISCONTINUOUS GALERKIN METHODS FOR HAMILTON-JACOBI EQUATIONS

ALGEBRAIC FLUX CORRECTION FOR FINITE ELEMENT DISCRETIZATIONS OF COUPLED SYSTEMS

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

An interface treating technique for compressible multi-medium flow with. Runge-Kutta discontinuous Galerkin method. Abstract

The Center for Astrophysical Thermonuclear Flashes. FLASH Hydrodynamics

A recovery-assisted DG code for the compressible Navier-Stokes equations

Two-Dimensional Riemann Solver for Euler Equations of Gas Dynamics

ARTICLE IN PRESS Mathematical and Computer Modelling ( )

High-resolution finite volume methods for hyperbolic PDEs on manifolds

Local discontinuous Galerkin methods for elliptic problems

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

PREPRINT November 5, 2007

Extremum-Preserving Limiters for MUSCL and PPM

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS

An Improved Non-linear Weights for Seventh-Order WENO Scheme

arxiv: v1 [math.na] 10 Sep 2018

A Divergence-Free Upwind Code for Multidimensional Magnetohydrodynamic Flows 4

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

NUMERICAL SOLUTION OF HYPERBOLIC PARTIAL DIFFERENTIAL EQUATIONS

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

Weighted ENO Schemes

A Second Order Discontinuous Galerkin Fast Sweeping Method for Eikonal Equations

Constrained hyperbolic divergence cleaning in smoothed particle magnetohydrodynamics with variable cleaning speeds

Finite-Volume-Particle Methods for Models of Transport of Pollutant in Shallow Water

Conservation Laws & Applications

Finite Volume Schemes: an introduction

A Central Rankine Hugoniot Solver for Hyperbolic Conservation Laws

1. Introduction. The Stokes problem seeks unknown functions u and p satisfying

MATHEMATICAL ASPECTS OF NUMERICAL SOLUTION OF HYPERBOLIC SYSTEMS

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

Constrained hyperbolic divergence cleaning in smoothed particle magnetohydrodynamics with variable cleaning speeds

Strong Stability Preserving Properties of Runge Kutta Time Discretization Methods for Linear Constant Coefficient Operators

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

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

RESEARCH HIGHLIGHTS. WAF: Weighted Average Flux Method

A simple robust and accurate a posteriori subcell finite

Approximate Harten-Lax-Van Leer (HLL) Riemann Solvers for Relativistic hydrodynamics and MHD

AMS subject classifications. Primary, 65N15, 65N30, 76D07; Secondary, 35B45, 35J50

Transcription:

Locally Divergence-Free Central Discontinuous Galerkin Methods for Ideal MHD Equations Sergey Yakovlev, Liwei Xu and Fengyan Li Abstract In this paper, we propose and numerically investigate a family of locally divergence-free central discontinuous Galerkin methods for ideal magnetohydrodynamic (MHD) equations. The methods are based on the original central discontinuous Galerkin methods (SIAM Journal on Numerical Analysis 45 (7) 44-467) for hyperbolic equations, with the use of approximating functions that are exactly divergence-free inside each mesh element for the magnetic field. This simple strategy is to locally enforce a divergence-free constraint on the magnetic field, and it is known that numerically imposing this constraint is necessary for numerical stability of MHD simulations. Besides the designed accuracy, numerical experiments also demonstrate improved stability of the proposed methods over the base central discontinuous Galerkin methods without any divergence treatment. This work is part of our long-term effort to devise and to understand the divergence-free strategies in MHD simulations within discontinuous Galerkin and central discontinuous Galerkin frameworks. Introduction The wide use of magnetohydrodynamic (MHD) equations in such areas as astrophysics, space physics and engineering motivates the development of accurate and robust numerical methods for these equations. In this paper, we consider ideal MHD equations which combine the equations of gas dynamics with Maxwell equations when the relativistic, viscous, and resistive effects are neglected. Such equations consist of a system of hyperbolic conservation laws. Besides the standard difficulties in solving nonlinear hyperbolic system, an additional numerical challenge in MHD simulation comes from a divergence-free constraint imposed on the magnetic field. Though this constraint is satisfied by the exact solution provided the initial magnetic field is divergencefree, numerical evidence and mathematical analysis indicate that negligence in dealing with the divergence-free condition may lead to numerical instability or nonphysical features in approximated solutions [4,, 4, ]. Regarding this, several ideas have been developed in the mathematical and This research is supported by NSF grants DMS-6548, DMS-6658 (RTG), NSF CAREER award DMS- 8474, and an Alfred P. Sloan Research Fellowship. Scientific Computing and Imaging Institute, University of Utah, Salt Lake City, UT 84. E-mail: yakovs@sci.utah.edu. DepartmentofMathematicalSciences, RensselaerPolytechnicInstitute, Troy,NY8. E-mail: xul@rpi.edu. Department of Mathematical Sciences, Rensselaer Polytechnic Institute, Troy, NY 8. E-mail: lif@rpi.edu.

engineering community. They include but are not limited to: an elliptic type projection method based on Hodge decomposition [4], generalized Lagrange multiplier methods [7], methods based on the eight-wave formulation with source terms [, ], the constrained transport method [8] and its variants [, 9, 5, 4], methods using the magnetic vector potential [], and locally divergence-free methods []. In this paper we propose and numerically investigate a family of locally divergence-free central discontinuous Galerkin (CDG) methods for ideal MHD equations. This is part of our long-term effort to devise and to understand divergence-free treatments in MHD simulations within discontinuous Galerkin (DG) and CDG frameworks. The proposed methods are based on the CDG methods introduced in [6, 7] for hyperbolic problems, and they use exactly divergence-free approximations inside each mesh element for the magnetic field. Defined on overlapping meshes, our methods evolve two copies of numerical solutions and they do not use any numerical flux as Godnov type methods [, ]. Compared with standard DG methods [], CDG methods allow relatively larger time steps when the accuracy is higher than first order [7, 4]. Similar to standard DG methods, CDG methods do not require any global continuity of numerical solutions, and therefore they enjoy great flexibility in terms of the choice of the type or the accuracy of the local approximating functions. It is exactly this property that allows us to adopt a very simple divergence-free treatment in this paper, which proves (numerically) to be effective and flexible in order to enhance the stability of CDG methods in MHD simulations. This idea was previously used by the third author in standard DG setting to solve Maxwell equations [5] and ideal MHD equations []. Numerical experiments show that the performance of locally divergence-free methods also depends on the base schemes, see for instance the smooth vortex example in Section. by CDG methods and in [] by DG methods. For non-smooth examples, we observe that the base CDG methods can be relatively more stable than the standard DG methods (see Orszag-Tang vortex example and shock-reflection example in Section. and in []), but overall divergence-free treatments are necessary for good numerical stability. We want to point out that many methods, such as finite difference or finite volume methods, do not have the flexibility to easily incorporate into the formulations of the schemes the a priori knowledge of some structures or features of the exact solutions. Previously in [4], by taking advantage of the extra information provided by CDG methods about the solution, we developed second and third order exactly (also called globally) divergencefree CDG methods for ideal MHD equations in a constrained transport [8] type framework, and the methods are recently generalized to arbitrary orders of accuracy in []. It has been demonstrated that these methods are accurate and robust, and more importantly they eliminate any possible source of instability related to the nonzero divergence of the numerical magnetic field. The difference between locally and globally divergence-free piecewise smooth functions is that the latter has inter-element continuity in its normal component. On the other hand, the use of exactly divergence-free approximating functions in the CDG framework limits the shapes of the mesh el-

ements. In addition, from the implementation point of view, exactly divergence-free methods are more practical when the boundary conditions are relatively simple (see shock-reflection example in Section.). This partially motivates us to explore the locally divergence-free strategies in the present work in order to enlarge the range of the MHD problems we can simulate stably with CDG methods. The paper is organized as follows. In Section we describe the equations, introduce solution spaces and define base and locally divergence-free CDG methods for ideal MHD equations. Numerical results are presented in Section, followed by concluding remarks in Section 4. Equations and Central Discontinuous Galerkin Methods. Governing equations We consider the ideal MHD equations which are a system of hyperbolic conservation laws t (ρu)+ with an additional divergence constraint t ρ+ (ρu) =, (.) [ ρuu T + (p+ ] )I B BB T =, (.) t B + (ub T Bu T) =, (.) t E + [(E +p+ ) ] B u B(u B) =, (.4) B =. (.5) Here ρ, p, u = (u x,u y,u z ) T, B = (B x,b y,b z ) T and E denote the density, the hydrodynamic pressure, the velocity field, the magnetic field, and the total energy, respectively. In addition, is the divergence operator, and I is the identity matrix. The ratio of specific heats is denoted by γ and Note that equation (.) can be also written as E = ρ u + B + p γ. t B (u B) = (.6) with being the curl operator. By taking divergence on both sides of (.6), one can see that if the divergence of the magnetic field is zero initially, the exact solution will automatically satisfy the divergence-free constraint (.5) for all time. In this paper, we focus on two dimensions when all unknowns are functions of the spatial variables x and y only. In this case, equations (.)-(.4) can be rewritten in a more compact form t U + x F (U)+ y F (U) = (.7)

where U = (ρ,ρu x,ρu y,ρu z,b x,b y,b z,e) T, and F (U) =(ρu x,ρu x +p+ B B x,ρu xu y B x B y,ρu x u z B x B z,,u x B y u y B x,u x B z u z B x,u x (E +p+ B ) B x (u x B x +u y B y +u z B z )) T, F (U) =(ρu y,ρu y u x B y B x,ρu y +p+ B B y,ρu yu z B y B z, u y B x u x B y,,u y B z u z B y,u y (E +p+ B ) B y (u x B x +u y B y +u z B z )) T. For notational convenience, we will also use U p = (ρ,u x,u y,u z,b x,b y,b z,p) T to denote the primitive variables.. Meshes and discrete spaces Let us consider a rectangular domain Ω = (x min,x max ) (y min,y max ) and a pair of overlapping Cartesian grids. The methods presented in this paper can be generalized to non-cartesian grids and domains with general shapes. Such generalization however increases implementation complexity and is not discussed in this paper. y j+ y j+ y j y j+ y j+ y j } } } } C i,j D i,j I i+ I i I i+ I i+ } } J j } } J j+ J j+ J j+ x i x i+ x i+ x i x i+ x i+ Figure.: Two-dimensional overlapping meshes Let {x i } i and {y j } j be partitions of (x min,x max ) and (y min,y max ) respectively, with x i+,x i+ ), I i+ = (x i,x i+ ), and y j+ = (y j + y j+ ), J j = (y j (x i + x i+ ), I i = (x i 4,y j+ = ),

= (y j,y j+ ). Then Th C = {C i,j} i,j and Th D = {D i,j } i,j define two overlapping meshes for Ω, with C i,j = I i J j and D i,j = I i+ J j+, see Figure.. These meshes are also called primal mesh and dual mesh, respectively. Associated with these meshes, we will define the following discrete J j+ spaces: V h = V,k h W h = W,k h = = { v : v K P k (K), K Th}, (.8) { v : v ( K P k v5 (K), x + v ) } 6 K =, K Th, (.9) y where denotes the corresponding mesh (either C or D), P k (K) = (P k (K)) 8, and P k (K) is the set of polynomials with the total degree at most k on K. Notice that the only difference between these two spaces Vh and W h is in the 5th and 6th componentsoftheirfunctions. WewillcallsolutionspacesWh thelocallydivergence-freespaces, as they contain magnetic fields with zero divergence within each element. A local basis for {(v 5,v 6 ) : v = (v,,v 8 ) T Wh } restricted on K can be obtained by taking the curl of the basis of P k+ (K). For example, let K be a rectangle with center (x i,y j ) and width x i, y j, if we denote X = (x x i )/ x i, Y = (y y j )/ y j, one set of (orthogonal) basis when k = is ( ), ( xi y j X Y ), ( ) Y, ( ), ( ). X For k =, one can add ( xi ) y j (X ), 4XY ( 4 x i ) y j XY Y, ( Y ), ( ) X.. Numerical methods In this section, we consider two CDG methods. The first one is defined using the standard piecewise polynomial space Vh given in (.8). This scheme was originally developed for hyperbolic conservation laws by Liu et al [6], and it will be referred to as the base scheme. The second one is a modification of the base scheme. It uses the locally divergence-free space Wh defined in (.9), and will be called the locally divergence-free CDG method. The base CDG scheme for ideal MHD system is defined as follows: look for ϕ h V C h and 5

ψ h Vh D C, such that for any η Vh and ξ V h D, and for all KC Th C and KD Th D, t ϕ h ηdx = (ψ h ϕ h ) ηdx+ (F (ψ h ) x η +F (ψ h ) y η)dx τ K C K C K C (n F (ψ h )+n F (ψ h )) ηds (.) K C t ψ h ξdx = (ϕ h ψ h ) ξdx+ (F (ϕ h ) x ξ +F (ϕ h ) y ξ)dx τ K D K D K D (n F (ϕ h )+n F (ϕ h )) ξds (.) K D where n = (n,n ) is the outward pointing unit normal vector along the boundary of mesh elements, andτ istheupperboundofthetimestep allowedbythecflcondition(see[6], orequation (.) in Section for the actual choice of τ in our simulation). The locally divergence-free CDG scheme for ideal MHD equations is defined by using spaces Wh C and WD h in the formulation (.)-(.) above... Time discretization C instead of Vh and V h D Up to now we have only defined the semi-discrete CDG method, resulting the method of lines ODE system d Φ = L(Φ). (.) dt This ODE system can be further discretized by strong stability preserving (SSP) methods [6, ]. In Section, the following third order TVD Runge-Kutta method is used in all simulations Φ () = Φ n + t n L(Φ n ), Φ () = 4 Φn + 4 Φ() + 4 t nl(φ () ), Φ n+ = Φn + Φ() + t nl(φ () ), where Φ n (resp. Φ n+ ) is the numerical solution of (.) at t n (resp. t n+ ), and t n = t n+ t n... Nonlinear limiter Similar to other high order numerical methods for nonlinear hyperbolic conservation laws, nonlinear limiters are needed to ensure the numerical stability in many non-smooth examples. The total variation bounded (TVB) minmod slope limiter [, 6] is used in our numerical simulations, and it involves a parameter M. For smooth numerical examples, in order to keep the designed accuracy we choose not to apply the limiter. The limiter can be implemented either in component-wise manner or in local characteristic fields. Even though the characteristic decomposition limiter is 6

more in agreement with the underlying physics of the problems we are considering, in some cases we do use the component-wise limiter when it performs better numerically in the presence of negative pressure. The performance of these implementations will be commented for each example. We will not present the details of the limiter here but mention that after the limiting procedure, the magnetic fields should still be locally divergence-free in locally divergence-free CDG methods. Numerical Examples In all numerical tests, the third-order TVD Runge-Kutta time discretization in Section.. is used. The timestep t and the parameter τ in (.)-(.) are determined dynamically by { max( ux +c x f τ = t = C cfl / ) + max( u y +c y f ) }, (.) min( x) min( y) where c x f and cy f are the fast speed in x and y directions (see [9] for the definition), respectively, and the maxima (minima) are taken over all the computational cells. We take C cfl =. for k = and C cfl =.6 for k =. All simulations in this section are performed for both P and P approximations on uniform meshes. Except for smooth examples, only P results are presented with the consideration that it is relatively harder to achieve numerical stability for higher order methods. When the TVB minmod slope limiter is applied, we use the parameter M =. One shouldbeawarethattheremightbebettervalueofm foreachexampleintermsoftheperformance of the methods.. Examples With Smooth Solutions... Smooth Advection Problem In the first example, a smooth initial configuration of ρ is being advected by the velocity field. The domain is taken to be [,π] [,π] and γ =. The initial data is given by U p = (ρ (x,y),,,,,,,5) with ρ (x,y) = +sin(x+y). This can be regarded as a scalar problem as essentially only density ρ (among all primitive variables) changes with time. Using this simple test, we will illustrate the accuracy of CDG schemes. Since the magnetic field is zero at all time, the locally divergence-free CDG and the base CDG schemes produce identical results. In Table., L errors and convergence orders at time t = 7 are presented. We can observe second and third orders of accuracy for P and P approximations respectively, which are optimal with respect to properties of the approximating spaces.... Smooth Vortex Problem This example was originally introduced by Shu [] in the context of hydrodynamics and was later adapted to MHD equations by Balsara []. In this example, a vortex is introduced through perturbations in velocity and magnetic fields of a base flow, and the dynamical balance is obtained 7

Table.: Smooth advection problem: errors and orders for ρ, base and locally divergence-free CDG schemes P P N N L error Order L error Order 6 6.79e- - 4.49e- -.7e-.7 5.5e-4. 64 64 5.e-.45 6.86e-5. 8 8.e-.6 8.46e-6. through the perturbation in pressure. The vortex is then stably convected in the domain. The initial configuration is given by: with U p = (,+δu x,+δu y,,δb x,δb y,,+δp), (δu x,δu y ) = η π ˆ exp{( r )}, (δb x,δb y ) = ξ π ˆ exp{( r )}, δp = (ξ ( r ) η ) 8π exp( r ). The computational domain is [ 5,5] [ 5,5], γ = 5/, ξ =, η = and r = x +y. We also use ˆ φ = ( φ y, φ x ), and the boundary conditions are periodic. This problem involves a time-dependent magnetic field and therefore, unlike the first example, allows us to make a better assessment of the scheme performance for ideal MHD equations. In Table., we present L errors and convergence orders of the base and the locally divergence-free CDG schemes for ρ, u x, B x and p, and both methods demonstrate optimal convergence orders. In fact P results are better than second order. Moreover, the errors of the locally divergence-free CDG solutions are bigger than those of the base scheme solutions. Such difference in errors can be explained as that the locally divergence-free approximating space is smaller than the standard polynomial space. In other words, for this example, the CDG scheme using larger numerical solution spaces (standard polynomial spaces) produces smaller errors than that using smaller spaces (locally divergence-free spaces). This differs from the observation in [] where the DG scheme equipped with the locally divergence-free space results in comparable or smaller errors than its counterpart using the standard polynomial space.... Smooth Alfvén Wave Problem This problem describes a propagation of a circularly polarized Alfvén wave in the domain[, / cos α] [,/sinα], where α is the wave propagationanglerelative to x-axis. The initial setup is as follows: ρ =, u =, u =.sin(πξ), u z =.cos(πξ), p =., B =, B = u, B z = u z, 8

Table.: Smooth vortex problem: errors and orders for ρ, u x, B x and p, t =, base and locally divergence-free (LDF) CDG schemes ρ u x B x p N N L error order L error order L error order L error order P 6 6.98e- -.e- -.e- -.87e- -.e-.9.9e-.8.8e-. 5.e-.8 64 64.76e-4. 4.5e-.74 4.7e-.75 8.4e-4.66 8 8 4.77e-5.5 5.9e-4.88 5.67e-4.87.e-4.79 P LDF 6 6.8e- -.4e- -.4e- -.87e- -.4e-..9e-.8.e-.5 5.7e-.8 64 64.e-4.4 4.9e-.7 4.6e-.7 8.6e-4.64 8 8 5.e-5.58 5.96e-4.87 6.e-4.87.4e-4.79 P 6 6 7.6465e-4-8.54e- - 8.597e- -.45e- - 5.59e-5.77 5.665e-4.87 5.5689e-4.87 8.954e-5.98 64 64.7785e-6.88 5.688e-5. 5.669e-5.9 8.94e-6.4 8 8.946e-7.7 6.9586e-6. 6.9675e-6. 9.7675e-7.8 P LDF 6 6.68e- -.648e- -.548e- -.98e- -.769e-4.4.574e-.67 4.4798e-.5 4.65e-4.4 64 64 5.95e-5.4.575e-4.84 7.7e-4.67 7.99e-5.44 8 8 7.68e-6.7 4.5685e-5.96 9.87e-5.84.9e-5.7 with γ = 5/ and ξ = xcosα+ysinα, α = 45 o. u = u x cosα+u y sinα, u = u y cosα u x sinα. Alfvén wave propagates periodically towards origin with a constant Alfvén speed B / ρ = and returns to its initial state at integer values of t. For this example both the base and the locally divergence-free CDG schemes produce comparable results. L errors and convergence orders of the base CDG scheme for u x and B x are presented in Table.. We observe optimal orders of convergence for this example.. Non-Smooth Problems In this section we will consider a number of non-smooth problems to further test the performance of proposed schemes, which include Orszag-Tang vortex problem, shock reflection problem, rotor problem, blast problem and cloud-shock interaction problem.... Orszag-Tang Vortex Problem First we consider the Orszag-Tang vortex problem [8]. This example is widely used in the literature due to the complexity of the solution. The initial data is smooth but as the system evolves, multiple shocks form and interact with each other. The initial setup is as follows: U p = (γ, siny,sinx,, siny,sin(x),,γ) 9

Table.: Smooth Alfvén wave problem: errors and orders for u x and B x, t = 5, base CDG scheme P P N N L error Order L error Order u x 6 6 4.4e- -.e-4-6.9e-4.8.9e-5. 64 64 9.76e-5.7 4.8e-6. 8 8.9e-5.5 6.e-7. B x 6 6 4.44e- -.e-4-6.9e-4.79.9e-5. 64 64 9.77e-5.7 4.8e-6. 8 8.9e-5.5 6.e-7. with γ = 5/. The computational domain is [,π] [,π]. Periodic boundary conditions are used. The time development of density for the base CDG scheme is presented in Figure., and it is in agreement with results produced by many methods [4]. Numerical solutions by both the base and the locally divergence-free CDG schemes are overall comparable, see Figure. for the density contour plots at t =. A further examination on the density slices in Figure.4 shows that the numerical solution from the base scheme is slightly more oscillatory. All results reported for this example are obtained with the use of the component-wise limiter, which shows better numerical stability. In fact, with this limiter, both the base and the locally divergence-free schemes can run stably till t = (and beyond). When the characteristic limiter is used, negative pressure is observed around t =.9 for both methods. Despite of this, locally divergence-free scheme runs stably till at least time t = while the base scheme blows up at time t =.9. We want to mention that with the same characteristic limiter, standard DG method with P approximations blows up at t =.6, while the locally divergence-free DG method improves the numerical stability yet runs only up to t = 4.4 []. This points to a relative better stability of the CDG scheme in comparison to standard DG scheme.... Shock Reflection Problem In this subsection, we consider the shock reflection problem introduced in []. The problem is constructed such that a 9 o reflected shock is the equilibrium solution across a Cartesian tube. With the same setup as in [7], the computational domain is [,] [,] and γ =.4. We use U p = U p l as the initial condition, U p = U p t and U p = U p l as the Dirichlet boundary conditions for the top and left boundaries, and reflective and outgoing boundary conditions for the lower and right boundaries, respectively. Here U p l and U p t are set to be U p l = (.,.9,,,,,,5/7), U p t = (.4598,.77, 49,,.688,.9,,.9).

6 6 5 5 4 4 4 5 6 4 5 6 6 6 5 5 4 4 4 5 6 4 5 6 Figure.: Orszag-Tang problem: density contour plots at (from left to right, and top to bottom) t =, t =, t = and t = 4. Mesh size is, P approximation, M =, 5 equally spaced contours with ranges [., 5.79], [.6, 6.8], [.6, 6.8], [.8, 5.7]. 6 6 5 5 4 4 4 5 6 4 5 6 Figure.: Orszag-Tang problem: density contour plots at t =. Mesh size is 9 9, P approximation, M =, 5 equally spaced contours with range [.6, 6.8]. Left: base scheme; right: locally divergence-free scheme.

5.5 5 5 4.5 4 4.5 4.5.5.5.5.5 4 5 6 7.5 4 5 6 7 Figure.4: Orszag-Tang problem: cut plots of density at t =. Mesh size is 9 9, P approximation, M =. Left: x =.6; right: y = ; dots: base scheme; doted line: locally divergence-free scheme. Contour plots of density for both the base and the locally divergence-free CDG schemes are presented in Figure.5. We can observe that the solution produced by the base CDG scheme is more oscillatory than the locally divergence-free solution. A cut plot of density in Figure.6 further shows the oscillatory features of the base CDG scheme solution. Similar observation was reported in [, 7, ], where the oscillation was attributed to the lack of the divergence treatment. We should add that without any divergence-free treatment, the base CDG scheme produces relatively less oscillatory solution than the standard DG scheme (see [] for comparison)... -. -. - -.. -. -. - - -.8 -.6 - -...6.8 -.8 -.6 - -...6.8 Figure.5: Shock reflection problem: 5 equally spaced contours of density. Mesh size is, t = ; left: base scheme, ρ [.99,.]; right: locally divergence-free scheme, ρ [.99,.4]. Though this problem involves several types of boundary conditions along the domain boundary, the proposed locally divergence-free CDG methods can handle these boundary conditions easily. This is in contrast to the globally divergence-free CDG methods in [4], which requires a careful treatment at the top-left corner where a shock passes and at the top-right corner where the boundary conditions change types, in order to define a single-valued electric field flux used in the exactly divergence-free reconstruction (see [4] for more details). For this example both the characteristic limiter and the component-wise limiter perform similarly. Results presented in Figure.5 are obtained using the characteristic limiter.

.6.5.4....9 - - - -. -... Figure.6: Shock reflection problem: cut plot of density along the line x =.. Mesh size is, t = ; dots: base scheme; dotted line: locally divergence-free scheme.... Rotor Problem Below we will consider the rotor example from [4]. The setup of this problem is as follows: there is a dense rotating disk of fluid in the central area of domain, surrounded by the ambient fluid that is at rest initially. The initial condition is given by: U p = (ρ,u x,u y,,.5/ 4π,,,) with γ = 5/ and (, (y )/r,(x )/r ) if r < r, (ρ (x),u x (x),u y (x)) = (+9λ, λ(y )/r,λ(x )/r) if r < r < r, (,,) if r > r, where r =., r =, λ = (r r)/(r r ), r = [(x ) +(y ) ] /. The computational domain is [,] [,]. Periodic boundary conditions are used. Contour plots of density, pressure, hydrodynamic Mach number u /c (with c = γp/ρ), and magnetic pressure B /, from both the base scheme and the locally divergence-free scheme are presented in Figure.7. Note that the solution details are well resolved and are comparable with those in [4, ]. Overall the results produced by two CDG schemes are comparable, with some exception in Mach number contour plots. Indeed, the base scheme solution displays distortions in certain regions (e.g. near points (,5) and (.6,5)), see Figure.8 for the zoomed-in contour plots of Mach number in central region. This agrees with the observations in [], [] and [4], regarding the role of the divergence condition treatment in resolving the solution features. Moreover, fromthecut plotofmachnumber alongthelinex = infigure.9, wecansee some overshoot in the solution produced by the base CDG scheme in the distortion region. For this test problem the use of divergence-free functions to approximate the magnetic field is beneficial. The characteristic limiter is used for this example. The simulation using the component-wise limiter results in a numerical solution with main features being overly smoothed-out.

..9.9.8.8.7.7.6.6......6.7.8.9...6.7.8.9.9.9.8.8.7.7.6.6.......6.7.8.9...6.7.8.9.9.9.8.8.7.7.6.6.......6.7.8.9...6.7.8.9.9.9.8.8.7.7.6.6.......6.7.8.9...6.7.8.9 Figure.7: Rotor problem: from top to bottom - 5 equally spaced contours of density, pressure, Mach number, magnetic pressure with ranges [7, 9.], [.,.78], [.,.4], [.,.68] respectively (the solution range is according to the base scheme simulation). t =.95 on a mesh; left: base scheme; right: locally divergence-free scheme. 4

.7.7.65.65.6.6 5 5 5 5 5 5 5 5 5.6.65.7 5 5 5.6.65.7 Figure.8: Rotor problem: equally spaced contours of (zoomed-in) Mach number. Mesh size is 6 6 with range [.,.4]. Time t =.95; left: base scheme; right: locally divergence-free scheme..5.5...6.7.8.9 Figure.9: Rotor problem: cut plot of Mach number along the line x =. Mesh size is 6 6. Time t =.95; Dots: base scheme; dotted line: locally divergence-free scheme...4. Blast Problem This problem was first introduced by Balsara and Spicer in []. It describes the propagation of a spherical strong fast magneto-sonic shock through a low-β (β = plasma. The initial setup of this problem is as follows: U p = (,,,,/ 4π,,,p ) p (B x+b y)/ =.5e 4) ambient with γ = 5/ and p = { if r <.,., if r., where r = x +y. The computational domain is [,] [,]. Outflow boundary conditions are used. For this problem there is no significant difference between the results produced by the base and locally divergence-free schemes. Contour plots are presented in Figure. for the following quantities produced by the locally divergence-free CDG scheme: density, magnetic pressure, pressure 5

and its negative part min(,p). These results are comparable with those in [, 5]. As pointed out in [] this is a stringent problem to solve. Negative pressure values can be observed near the shock front, similar as in simulations by other methods [5]. The facts that our simulation runs stably in the presence of a large jump in initial pressure, and that the negative pressure values have relatively small magnitude, indicate good performance of CDG methods. The component-wise limiter is used for this problem. The characteristic limiter does not perform stably in this case due to the presence of negative pressure..... -. -. -. -. - - - - - - -. -... - - -. -....... -. -. -. -. - - - - - - -. -... - - -. -... Figure.: Blast problem: top to bottom left to right - 4 equally spaced contours of density, magnetic pressure B, pressure, and negative part of the pressure (min(,p)) with corresponding ranges [.,.4], [45.7, 6.], [.7, 9.7],[.7, ]; mesh size, time t =.; locally divergence-free scheme...5. Cloud-Shock Interaction Here we will consider a cloud-shock interaction problem in which strong MHD shocks interact with a dense cloud. The computational domain [, ] [, ] is divided into three regions: the post-shock region Ω, the pre-shock region Ω, and the cloud region Ω. Regions and corresponding initial 6

values are defined as follows: Ω = {(x,y) : x., y }, Ω = {(x,y) : (x.4) +(y ) <.8}, Ω = {(x,y) :. x, y, (x.4) +(y ).8}; U p = (.88968,,,.54,,,.95,4.64), U p = (,.56,,,,,,.4), U p = (5,.56,,,,,,.4). Outflow boundary conditions are used and γ = 5/. Considerable difference is observed between the performance of the two methods examined in this paper. Locally divergence-free CDG scheme demonstrate much better stability, while the base CDG scheme produces more oscillatory results and its simulation often blows up at an earlier time. In Figure., we present the grayscale images of ρ, B x, B y and p by the locally divergence-free scheme on a 6 mesh at t =.6. And in Figure., oscillation can be seen in the base scheme solutions when compared with the locally divergence-free ones at time t = 4, right before the base scheme blows up. The reported results are obtained using the characteristic limiter. For this example the use of the component-wise limiter leads to numerical instability and a much earlier blow-up of both schemes. Figure.: Cloud-Shock interaction: grayscale images of ρ (top-left), B x (top-right), B y (bottomleft) and p (bottom-right), locally divergence-free scheme; P approximation, mesh size 6, time t =.6. 4 Concluding Remarks Though the base CDG methods were originally introduced for hyperbolic equations and are successful for Euler equations of gas dynamics [6], when applied to ideal MHD system, additional consideration is needed which is related to the divergence-free constraint on the magnetic field. 7

Figure.: Cloud-Shock interaction: from top to bottom - grayscale images of ρ, Bx, By and p, base scheme (left) and locally divergence-free scheme (right); P approximation, mesh size 6, time t = 4. With the use of the divergence-free polynomials as local approximations, a simple strategy is proposed in this paper to impose this constraint, and it is shown to be sufficient to enhance the stability of CDG methods for many commonly used MHD examples. This strategy can be applied directly to three dimensions with general meshes. Compared with our previous work in developing exactly divergence-free CDG methods in [4, ], the proposed methods are more flexible in terms of the shapes of mesh elements and general boundary conditions. On the other hand, in the presence of negative pressure, globally divergencefree methods have relatively better control over the magnitude of negative pressure. This can be seen from the blast example through min(p) in this paper and [4]. For this example, we believe that one would ultimately need positivity preserving techniques to prevent negative pressure in order to have more robust simulations. Compared with DG methods, the CDG methods show relatively better stability, see shock reflection example in the absence of any divergence-free treatment, or Orszag-Tang vortex example 8

in both the base and the locally divergence-free schemes. This may be explained as that central schemes are generally more diffusive than Godunov schemes, and this may be also due to the relatively lower divergence-error as in some central type methods [5]. But overall divergence-free treatments are necessary for good numerical stability of DG and CDG methods for MHD simulations. Moreover, with the use of locally divergence-free approximations for the magnetic field, it is observed from the smooth vortex example that DG methods reduce the errors in the magnetic field especially when k =, while CDG methods increase errors of most unknowns. This example reveals that DG and CDG methods may respond differently to the change of approximating spaces in terms of controlling the actual errors in numerical solutions. References [] N. Aslan and T. Kammash, Developing numerical fluxes with new sonic fix for MHD equations, Journal of Computational Physics (997) 4-55. [] D.S. Balsara, Second order accurate schemes for magnetohydrodynamics with divergence-free reconstruction, Astrophysical Journal Supplement Series 5 (4) 49-84. [] D. S. Balsara and D.S. Spicer, A staggered mesh algorithm using high order Godunov fluxes to ensure solenoidal magnetic fields in magnetohydrodynamic simulations, Journal of Computational Physics 49 (999) 7-9. [4] J.U. Brackbill and D.C. Barnes, The effect of nonzero B on the numerical solution of the magnetohydrodynamic equations, Journal of Computational Physics 5 (98) 46-4. [5] B. Cockburn, F. Li and C.-W. Shu, Locally divergence-free discontinuous Galerkin methods for the Maxwell equations, Journal of Computational Physics 94 (4) 588-6. [6] B. Cockburn and C.-W. Shu, The Runge-Kutta discontinuous Galerkin method for conservation laws V: Multidimensional systems, Journal of Computational Physics 4 (998) 99-4. [7] A. Dedner, F. Kemm, D. Kröner, C.-D. Munz, T. Schnitner and M. Wesenberg, Hyperbolic divergence cleaning for the MHD equations, Journal of Computational Physics 75 () 645-67. [8] C.R. Evans and J.F. Hawley, Simulation of magnetohydrodynamic flows: a constrained transport method, Astrophysical Journal (988) 659-677. [9] T.A. Gardiner and J.M. Stone, An unsplit Godunov method for ideal MHD via constrained transport, Journal of Computational Physics 5 (5) 59-59. [] S.K. Godunov, Symmetric form of the equations of magnetohydrodynamics, Numerical Methods for Mechanics of Continuum Medium (97) 6-4. 9

[] S. Gottlieb, C.-W. Shu and E. Tadmor, Strong stability-preserving high-order time discretization methods, SIAM Review 4 () 89-. [] F. Li and C.-W. Shu, Locally divergence-free discontinuous Galerkin methods for MHD equations, Journal of Scientific Computing (5) 4-44. [] F. Li and L. Xu, Arbitrary order exactly divergence-free central discontinuous Galerkin methods for ideal MHD equations, Journal of Computational Physics v () 655-675. [4] F. Li, L. Xu and S. Yakovlev, Central discontinuous Galerkin methods for ideal MHD equations with exactly divergence-free magnetic field, Journal of Computational Physics () 488-4847. [5] S. Li, High order central scheme on overlapping cells for magneto-hydrodynamic flows with and without constrained transport method, Journal of Computational Physics 7 (8) 768-79. [6] Y.-J. Liu, C.-W. Shu, E. Tadmor and M. Zhang, Central discontinuous Galerkin methods on overlapping cells with a nonoscillatory hierarchical reconstruction, SIAM Journal on Numerical Analysis 45 (7) 44-467. [7] Y. Liu, C.-W. Shu, E. Tadmor, M. Zhang, L stability analysis of the central discontinuous Galerkin method and a comparison between the central and regular discontinuous Galerkin methods, ESAIM: Mathematical Modelling and Numerical Analysis 4 (8) 59-67. [8] S. Orszag and C.-M. Tang, Small-scale structure of two-dimensional magnetohydrodynamic turbulence, Journal of Fluid Mechanics 9 (979) 9-4. [9] K.G. Powell, An approximate Riemann solver for magnetohydrodynamics (that works in more than one dimension), ICASE report No. 94-4, Langley, VA, 994. [] K.G. Powell, P.L. Roe, T.J. Linde, T.I. Gombosi and D.L. De Zeeuw, A solution-adaptive upwind scheme for ideal magnetohydrodynamics, Journal of Computational Physics 54 (999) 84-9. [] J. A. Rossmanith, An unstaggered, high-resolution constrained transport method for magnetohydrodynamic flows, SIAM Journal on Scientific Computing 8 (6) 766-797. [] C.-W. Shu, Essentially non-oscillatory and weighted essentially non-oscillatory schemes for hyperbolic conservation laws, in: B. Cockburn, C. Johnson, C.-W. Shu, E. Tadmor, A. Quarteroni (Eds.), Advanced Numerical Approximation of Nonlinear Hyperbolic Equations, Lecture Notes in Mathematics, Springer, Berlin, 998, vol. 697, pp. 5-4.

[] C.-W Shu, TVB uniformly high-order schemes for conservation laws, Mathematics of Computation 49 (987) 5-. [4] G. Tóth, The B = constraint in shock-capturing magnetohydrohynamics codes, Journal of Computational Physics 6 () 65-65.