Unstaggered constrained transport methods for ideal magnetohydrodynamic equations

advertisement
DISSERTATION
Unstaggered constrained transport methods for ideal
magnetohydrodynamic equations
by
Bertram Taetz
A thesis submitted for the degree
Doctor of Science
Faculty of Mathematics
Ruhr University Bochum
Bochum, June 2012
Dissertation advisor:
Prof. Dr. Christiane Helzel
First reviewer:
Prof. Dr. Christiane Helzel,
Department of Numerical Mathematics,
Ruhr University Bochum, Germany
Second reviewer:
Prof. Ph.D. J.A. Rossmanith,
Department of Mathematics,
Iowa State University, USA
Date of oral examination: 10. September 2012
II
Abstract
The ideal magnetohydrohynamic (MHD) equations are important in modeling different
phenomena in a wide range of plasma physical applications. This thesis focuses on the
development of finite volume methods for numerical solutions of the ideal MHD equations
on Cartesian, logically rectangular, and hexahedral mapped grids. One major challenge in
numerically solving the MHD equations in more than one space dimension is to control
the divergence-errors of the magnetic field on the discrete level. For two-dimensional (2D)
Cartesian grids, Rossmanith developed an unstaggered constrained transport (CT) method,
which computes a divergence-free magnetic field from a magnetic potential. The basic idea is
to solve the MHD equations together with the evolution equation of the magnetic potential for
one time step; subsequently, a new magnetic field is computed as the curl of the potential. This
magnetic field satisfies a certain discrete divergence-free condition exactly.
This thesis is concerned with the construction of three-dimensional unstaggered CT methods.
The first new part is the extension of the unstaggered CT method of Rossmanith
to three-dimensional Cartesian grids.
In contrast to the two-dimensional case, the
three-dimensional evolution equation of the magnetic vector potential introduces additional
degrees of freedom due to the choice of gauge conditions. Different gauge conditions are
discussed and the Weyl gauge is advocated, which leads to a weakly hyperbolic evolution
equation of the vector potential. This weak hyperbolicity holds additional challenges for a
numerical discretization and two different methods are proposed to overcome these.
The first approach is based on suitable operator splitting in combination with a one-step finite
volume method, namely the wave propagation method of Langseth and LeVeque. This method
works well on Cartesian grids, which is confirmed by several numerical tests.
The second approach is more general and is in particular developed for mapped grids. Here
a new combination of a path-conservative discretization for quasi-linear hyperbolic systems,
applied to linear weakly hyperbolic systems, is introduced. The method of lines approach is
utilized, using a strong stability preserving Runge-Kutta method for the time discretization
and a spatial discretization based on least squares reconstructions. Consistency and stability
is confirmed for one-dimensional weakly hyperbolic systems; the discretization is subsequently
generalized to be applicable in two and three space dimensions. This unsplit approach allows a
straight-forward extension of the whole scheme to logically rectangular and hexahedral mapped
grids, as well as to high-order of accuracy. The new CT method is presented and robustness,
as well as accuracy, is confirmed in various numerical tests. Most of the main results presented
in this thesis can be found in the following papers in condensed form:
• C. Helzel, J.A. Rossmanith, B. Taetz, An unstaggered constrained transport method for
the 3D ideal magnetohydrodynamic equations, J. Comput. Phys., 230:3803-3829, 2011,
arXiv:1007.2606, http://arxiv.org/abs/1007.2606
• C. Helzel, J.A. Rossmanith, B. Taetz, A high-order unstaggered constrained
transport method for the 3d ideal magnetohydrodynamic equations based on the
method of lines, to appear in SIAM J. Sci. Comput. (SISC), arXiv:1203.3760,
http://arxiv.org/abs/1203.3760.
III
IV
Acknowledgements
This dissertation would not have been possible without the guidance and the help of several
people who in one way or another contributed to the preparation and completion of this thesis.
First and foremost I would like to express my sincere appreciation to my thesis advisor
Prof. Dr. Christiane Helzel for her patience, guidance and opportunities that she made possible
during this study. Her interest in new interesting scientific questions, as well as her expertise
in numerical analysis and scientific computing and the countless discussions about various
things related to this work, were greatly helpful.
I am grateful that I had the opportunity to meet Prof. Ph.D. James A. Rossmanith. I want
to thank him for his encouragement and support. His great ideas and friendly attitude greatly
inspired my work and me.
Prof. Dr. Rüdiger Verfürth and Prof. Dr. Christian Kreuzer always provided kind support
when there were questions regarding my academic requirements.
Prof. Dr. Rainer Grauer provided the opportunity of interesting contacts and discussions for
this project.
Last but not least I am grateful for the support of my family and friends throughout the
time as student. In particular, I want to thank my father Dr. Guenther Taetz, my brother
Christoph Taetz and Britta Drees for their valuable contributions and suggestions.
This work was supported by Deutsche Forschungsgemeinschaft (DFG) through the research
unit FOR 1048 “Instabilities, turbulence and transport in cosmic magnetic fields”, with the
particular project A4: “Logically rectangular grid methods for the simulation of compressible
MHD equations in circular and spherical domains” (Project leader: Prof. Dr. Christiane
Helzel).
V
VI
Contents
1 Introduction
1.1 Project rationale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Numerical challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3 Thesis overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 The ideal MHD equations
2.1 Basic equations . . . . . . . . . . . . . . . . . . . . .
2.2 The hyperbolic structure of the ideal MHD equations
2.2.1 Ideal MHD in 1D . . . . . . . . . . . . . . .
2.2.2 Ideal MHD in more than one space dimension
2.2.3 The 8-wave formulation . . . . . . . . . . . .
2.3 The role of ∇ · B = 0 in numerical discretizations . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3 Methods to control ∇ · B in numerical discretizations
3.1 Projection methods . . . . . . . . . . . . . . . . . . . . . .
3.2 Hyperbolic divergence cleaning methods . . . . . . . . . .
3.3 Flux distribution methods . . . . . . . . . . . . . . . . . .
3.3.1 Constraint preserving schemes using potential based
3.4 Constrained transport methods . . . . . . . . . . . . . . .
3.4.1 A staggered constrained transport method in 2D .
3.4.2 An unstaggered constrained transport method . .
3.4.3 The unstaggered magnetic potential advection
constrained transport method of Rossmanith in 2D
4 Vector potential equations
4.1 Coulomb gauge . . . . .
4.2 Lorentz-like gauge . . . .
4.3 Helicity-inspired gauge .
4.4 Weyl gauge . . . . . . .
and gauge
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
conditions
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . .
. . . .
. . . .
fluxes
. . . .
. . . .
. . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5
. 6
. 7
. 8
. 9
. 13
. 14
.
.
.
.
.
.
.
17
18
18
19
20
21
21
24
.
.
.
.
.
.
.
. . . . . . . . . . . . 25
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5 An unstaggered constrained transport method for 3D Cartesian
a splitting method
5.1 The wave propagation method . . . . . . . . . . . . . . . . . . . .
5.1.1 The 1D wave propagation method for conservation laws . . .
5.1.2 1D linearized Riemann solvers . . . . . . . . . . . . . . . .
5.1.3 High-order correction fluxes . . . . . . . . . . . . . . . . . .
5.1.4 The 2D wave propagation method for conservation laws . .
5.1.5 Transverse Riemann solvers . . . . . . . . . . . . . . . . . .
VII
.
.
.
.
.
.
1
1
2
3
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
27
27
28
29
30
grids using
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
31
32
32
32
34
35
36
CONTENTS
5.1.6
5.2
5.3
A modified 2D wave propagation method for linear
non-conservative equations . . . . . . . . . . . . . . .
5.1.7 A 3D wave propagation method for conservation laws
An unstaggered constrained transport framework in 3D . . .
5.2.1 The evolution of the magnetic vector potential . . . .
5.2.2 Additional limiting in the weakly hyperbolic solve . . .
5.2.3 Computing the initial potential . . . . . . . . . . . . .
5.2.4 Boundary conditions for the magnetic vector potential
5.2.5 Discretization of the 2.5-dimensional problem . . . . .
Numerical experiments . . . . . . . . . . . . . . . . . . . . . .
5.3.1 Test cases in 2.5-dimensions . . . . . . . . . . . . . . .
5.3.2 Test cases in 3D . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
6 A two-dimensional high-order unstaggered constrained transport method for
logically rectangular grids based on the method of lines
6.1 The method of lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.1.1 Multidimensional reconstruction on logically rectangular grids . . . . . .
6.1.2 Possible problems with least squares reconstructions on highly stretched
grid cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.1.3 Multidimensional non-oscillatory reconstructions . . . . . . . . . . . . .
6.1.4 High-order semi-discrete form for conservation laws in 1D . . . . . . . .
6.1.5 Multidimensional spatial discretization on logically rectangular grids . .
6.1.6 A diffusive limiting with respect to the derivative . . . . . . . . . . . . .
6.2 Outline of the constrained transport algorithm and temporal discretization . . .
6.3 The rotor example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
40
41
42
48
50
51
52
53
53
55
63
63
65
68
69
75
76
81
89
91
7 A high-order unstaggered and unsplit constrained transport method for 3D
hexahedral grids
93
7.1 Multidimensional reconstruction on 3D hexahedral grids . . . . . . . . . . . . . 93
7.1.1 Multidimensional spatial discretization on 3D hexahedral grids . . . . . 96
7.2 Spatial discretisation of non-conservative hyperbolic systems . . . . . . . . . . . 98
7.2.1 Non-conservative hyperbolic systems . . . . . . . . . . . . . . . . . . . . 98
7.3 Weakly hyperbolic systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
7.3.1 An example which illustrates the difficulty with weakly hyperbolic
systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
7.3.2 One dimensional weakly hyperbolic systems . . . . . . . . . . . . . . . . 110
7.4 Spatial discretization of the magnetic vector potential . . . . . . . . . . . . . . 114
7.5 The discretization of ∇ × A on mapped grids . . . . . . . . . . . . . . . . . . . 115
7.6 The discrete divergence-free condition on mapped grids . . . . . . . . . . . . . . 117
7.7 Numerical tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
7.7.1 2.5-dimensional tests (convergence study) . . . . . . . . . . . . . . . . . . 119
7.7.2 2.5-dimensional tests (shock capturing) . . . . . . . . . . . . . . . . . . . 121
7.7.3 3D tests (convergence study) . . . . . . . . . . . . . . . . . . . . . . . . . 123
7.7.4 3D tests (shock capturing) . . . . . . . . . . . . . . . . . . . . . . . . . 123
VIII
CONTENTS
8 Conclusions and outlook
8.1 Conclusions . . . . . . . . . . . . . . . .
8.2 Outlook . . . . . . . . . . . . . . . . . .
8.2.1 Extensions of the new CT scheme
8.2.2 Generalizing numerical tools . . .
8.2.3 Application to physical problems
A Left eigenvectors
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
127
127
127
128
128
128
129
IX
CONTENTS
X
Chapter 1
Introduction
The aim of this thesis is to develop robust numerical methods to solve the ideal
magnetohydrodynamic (MHD) equations in two and three space dimensions (2D, 3D). The
focus lies on finite volume methods for Cartesian and general logically rectangular (2D), as
well as hexahedral (3D) mapped grids. Discretizations that can achieve high-order accuracy
for smooth solutions, while obtaining high-resolution on discontinuous solution structures, are
presented.
The introductory chapter gives a brief rationale for studying ideal MHD equations in general
and on mapped grids, before introducing numerical challenges considered in this thesis; finally,
an overview of the thesis is presented.
1.1
Project rationale
One of the simplest systems of equations for modeling the dynamics of plasmas are the ideal
MHD equations. These equations model a non-relativistic, single species plasma that is assumed
to be a perfect conductor, inviscid, and composed of a gas that obeys the ideal gas law [87]. With
single species plasma we refer to a mixture of electrons, neutrons and ions that is electrically
neutral.
Despite simplifications from the physical point of view, the ideal MHD equations give a good
model for several applications, particularly in the solar and astrophysical context [57], or can
be utilized as a building block for the derivation of other models [102], [27]. Nevertheless, the
ideal MHD equations pose considerable challenges in terms of mathematical perspectives, as
discussed below.
This thesis was initiated in order to overcome numerical challenges for methods working on
two- and three-dimensional Cartesian and mapped grids. In particular, methods for the MHD
equations on mapped grids of the form as introduced by Calhoun et al. [16] in 2008, are of
interest in the research unit FOR 10481 , since these grids could be used for the simulation
of coronal mass ejection (CME). The mappings are constructed in such a way that a single
Cartesian grid is mapped to a spherical domain by not suffering from pole singularities, as
latitude-longitude grids do. Note that Cartesian or general structured mapped grids are popular
in astrophysical plasma simulations, since the underlying grid and data structure are convenient
1
FOR 1048, “Instabilities, turbulence and transport in cosmic magnetic fields” is a research unit of the Ruhr
University Bochum, which supported this thesis through the project A4: “Logically rectangular grid methods
for the simulation of compressible MHD equations in circular and spherical domains” (Project leader: C. Helzel).
The whole research unit is supported by Deutsche Forschungsgemeinschaft (DFG).
1
Introduction
for extensions to adaptive mesh refinement and parallel computing [35], [30], [13], [12].
1.2
Numerical challenges
The ideal MHD equations are partial differential equations, which form a system of nonlinear
hyperbolic conservation laws. Subsequently, shocks (discontinuities in the solution structure)
can arise, even from smooth initial data, which holds the general challenge of an appropriate
shock capturing property for the underlying numerical scheme. Moreover, these equations are
equipped with a linear constraint, namely that the magnetic field is divergence-free for all space
and time. A major challenge related to numerical solutions of the ideal MHD equations in more
than one space dimension is an appropriate treatment of the divergence-free condition of the
magnetic field on the discrete level. Lacking the control of the divergence in the magnetic
field can introduce nonlinear instabilities, even for schemes that satisfy this condition up to the
consistency error of the related scheme; this can be particularly challenging across shocks. To
guarantee a discrete divergence-free condition, so called constrained transport (CT) schemes
have become one of the most popular methods. The basic idea is to evolve a magnetic potential
in time and compute a divergence-free magnetic field as a curl of the potential. One way to do
this is by introducing a second “staggered” grid for the magnetic potential, which allows the
construction of a divergence-free magnetic field on the “primary grid”.
However, discretizing the evolution equation on one grid (unstaggered CT) considerably
simplifies the generalization of these schemes to mapped grids and adaptive mesh refinement.
An unstaggered 2D Cartesian grid CT method, has been introduced by Rossmanith [89] in
2006.
The first new part of this thesis focuses on the generalization of this CT scheme to
three-dimensional Cartesian grids. The main challenge concerns a suitable discretization for
the evolution equation of the magnetic vector potential, which introduces additional degrees of
freedom due to the choice of so called gauge conditions. Different gauge conditions allow the
evolution equation to be written in different hyperbolic forms, with different advantages and
disadvantages. The Weyl gauge condition advocated in this thesis leads to a weakly hyperbolic
evolution equation, which needs an appropriate discretization. A robust way to approximate the
weakly hyperbolic evolution equation on Cartesian grids was found by an appropriate splitting
method. The main points of this approach have already been published in 2011 in joint work
with Helzel and Rossmanith, see [51].
In order to have a CT scheme that is applicable to logically rectangular (2D) and hexahedral
(3D) mapped grids as introduced by Calhoun et al. [16] in 2008, we develop another new
unstaggered CT method based on the method of lines discretization. Apart from several
advantages of these grids for finite volume discretizations, a particular difficulty is given
by non-smoothly varying mappings and the lack of an existing smooth inverse mapping to
an orthogonal coordinate system. Least squares reconstruction techniques are utilized to
appropriately reconstruct the required values on these grids. Besides the generalization to
mapped grids, the method of lines discretization allows a direct extension of the whole scheme,
including the ideal MHD equations and the CT method, to high-order of accuracy. In this
context the weakly hyperbolic evolution equation in 3D is discretized by an unsplit spatial
discretization. To the best of our knowledge, this unsplit spatial discretization has been applied
for the first time to weakly hyperbolic systems. The main ideas of this approach have already
been submitted [50] in collaborative work with Helzel and Rossmanith.
2
1.3 Thesis overview
1.3
Thesis overview
In Chapter 2 the ideal MHD equations are introduced and the hyperbolic structure of these
equations is discussed. Finite volume methods are often based on eigenvector decompositions,
thus eigenvectors with a suitable scaling are presented. Furthermore, the numerical role of the
divergence-free condition of the magnetic field is explained.
Chapter 3 outlines a review of existing methods to control the divergence of the magnetic field
on the discrete level. The focus is on existing CT methods and the CT method of Rossmanith
[89] in 2D.
In Chapter 4 different gauge conditions related to the evolution equation of the magnetic vector
potential in three space dimensions are examined. Different gauge conditions lead to different
systems for the evolution equation, yielding different challenges to overcome. Finally the Weyl
gauge condition is chosen, which leads to a weakly hyperbolic system.
In Chapter 5 a novel approach that extends the CT method of Rossmanith to 3D Cartesian grids
using the wave propagation method of Langseth and LeVeque [59] together with an appropriate
operator splitting for the weakly hyperbolic evolution equation of the vector potential. Note
that the description of the wave propagation method, as well as the notation, is based on the
book of LeVeque [65].
Chapter 6 introduces a new CT method based on the method of lines discretization in 2D. Here a
spatial discretization is utilized that uses reconstructed values obtained by weighted essentially
non-oscillatory (WENO) least squares reconstructions. For the temporal discretization of the
coupled system consisting of ideal MHD variables and the magnetic vector potential a strong
stability preserving Runge-Kutta method is used.
This CT method is subsequently extended to 3D hexahedral grids in Chapter 7, where
the main focus lies on an unsplit spatial discretization of linear weakly hyperbolic systems.
The discretization presented there is related to a high-order version of a path-conservative
discretization based on the generalized Rusanov flux [19]. Path-conservative discretizations are
usually utilized for non-conservative strictly hyperbolic systems, having discontinuous solution
structures. Accuracy and stability considerations of these discretizations transfer to the weakly
hyperbolic case in 1D. This discretization is subsequently generalized to 3D and applied to the
weakly hyperbolic evolution equation of the magnetic vector potential. Finally, discretizations
for the curl of the magnetic vector potential on mapped grids (as well as the satisfaction of a
divergence-free condition) is discussed.
3
Introduction
4
Chapter 2
The ideal MHD equations
The ideal magnetohydrodynamic (MHD) equations are a common model for the macroscopic
behavior of collisionless plasma [21, 42, 78]. These equations model the fluid dynamics of
an interacting mixture of positively and negatively charged particles, where each species is
assumed to behave as a charged ideal gas. Under the MHD assumption, this mixture is taken
to be quasi-neutral, meaning that as one species moves, the other reacts instantaneously. This
assumption allows one to collapse what should be two sets of evolution equations (for the
positively and negatively charged particles) into a single set of equations for the total mass,
momentum, and energy of the mixture. Furthermore, the resulting dynamics are assumed to
happen on slow time scales compared to the propagation time of light waves, which yields a
simplified set of Maxwell equations. Finally, the term ideal refers to the fact that we assume
a perfect conducting fluid and thus have the ideal Ohm’s law: E = B × u, where E is the
electric field, B is the magnetic field, and u is the macroscopic velocity of the plasma fluid.
The assumption of perfect conductivity omits further resistivity terms.
All of the above described simplifications conspire to turn the original two-fluid plasma model
[58], [54] into a system that can be viewed as a modified version of the compressible Euler
equations from gas dynamics. In particular, the ideal MHD system can be written as a
system of hyperbolic conservation laws, where the conserved quantities are mass, momentum,
energy, and magnetic field. Furthermore, this system is equipped, just as the compressible
Euler equations are, with an entropy inequality that features a convex scalar entropy and a
corresponding entropy flux. Indeed, the scalar entropy, with some help from the fact that the
magnetic field is divergence-free, can be used to define entropy variables in which the ideal
MHD system is in symmetric hyperbolic form [10, 41]. This form is used to derive eigenvalues
and eigenvectors having suitable scaling properties.
In this chapter we present the ideal MHD equations. We in particular describe the
evolution equation for the magnetic field. Furthermore, the divergence-free condition for
the magnetic field, is discussed. Subsequently we explore the hyperbolic structure of the
equations, depict the eigenstructure and discuss the different waves related to the eigenvalues
and eigenvectors. Note that the eigenstructure is essential for the wave propagation method
advocated in chapter 5.
Finally we consider numerical challenges related to the divergence-free condition of the
magnetic field.
5
The ideal MHD equations
2.1
Basic equations
Throughout this thesis we use the notation ∇, ∇·, ∇2 , ∇× for the gradient, divergence,
Laplacian (or vector Laplacian) and curl, respectively. For two vectors u and v, which are
typically in R3 , uvT denotes the tensor product, i.e.
 1 1 1 2 1 3 
uv uv uv
T

u2 v 1 u2 v 2 u2 v 3  .
uv =
u3 v 1 u3 v 2 u3 v 3
The divergence of this tensor is defined by
∇ · uvT := ∂x (v 1 u) + ∂y (v 2 u) + ∂z (v 3 u).
The partial derivative of a vector u : Rd → Rn , with respect to x (say), will either be denoted
.
by ux , ∂x u or ∂u
∂x
The ideal MHD equations can be written in the following conservation form




ρu ρ
1
T
2
ρu

Id − BBT 
 + ∇ · ρuu + p +1 2 kBk

∂t 
E 
 u E + p + kBk2 − B (u · B)  = 0,
2
B
BuT − uBT
(2.1.1)
∇ · B = 0.
(2.1.2)
We often use one of the following short forms
qt + ∇ · FM HD = 0 or
qt + ∂x f (q) + ∂y f 2 (q) + ∂z f 3 (q) = 0,
1
(2.1.3)
(2.1.4)
where F = (f 1 |f 2 |f 3 ). In the ideal MHD equations ρ, ρu, and E are the total mass, momentum
and energy densities of the plasma system and B is the magnetic field. The thermal pressure,
p, is related to the conserved quantities through the ideal gas law
1
1
2
2
p = (γ − 1) E − kBk − ρkuk ,
(2.1.5)
2
2
where γ = 5/3 is the ideal gas constant. Note that we always consider (2.1.1) together with
given initial data and suitable boundary conditions.
The equation for the magnetic field comes from Faraday’s law
Bt + ∇ × E = 0,
(2.1.6)
where the electric field, E, is approximated by Ohm’s law
1
J.
(2.1.7)
σ
Here σ describes the conductivity of the fluid and J the current flow, which can be approximated
from Maxwell’s equations by neglecting displacement currents to be1
E=B×u+
1
J ≈ √ ∇ × B,
µ0
1
Note that the magnetic field is already rescaled by incorporating the factor
6
(2.1.8)
√1
µ0
into the definition of B.
2.2 The hyperbolic structure of the ideal MHD equations
with µ0 being the magnetic constant. Therefore,
Bt ≈ ∇ × (u × B) + η∇2 B,
(2.1.9)
where η is proportional to the inverse of the conductivity (η ∝ σ1 ) and is known as resistivity.
The perfect conductivity assumption (σ = ∞) for the ideal MHD equations omits resistivity
terms in the evolution equation of the magnetic field and allows the Ohm’s law to be written
as
E = B × u.
(2.1.10)
Under the Ohm’s law assumption, we can rewrite Faraday’s law (2.1.6) in the following
divergence form
Bt + ∇ × (B × u) = 0
⇔ Bt + [(∇ · u) + (u · ∇)]B − [(∇ · B) + (B · ∇)]u = 0
⇔ Bt + ∇ · BuT − uBT = 0.
(2.1.11)
Since the electric field is determined entirely from Ohm’s law, we do not require an evolution
equation for it; and thus, the only other piece that we need from Maxwell’s equations is the
divergence-free condition of the magnetic field
∇ · B = 0,
(2.1.12)
which is a physical law, that is assumed to hold (reflecting that “magnetic monopoles” have
never been observed).
Note that system (2.1.1), along with the equation of state (2.1.5), provides a full set of equations
for the time evolution of all eight state variables: (ρ, ρu, E, B). A complete derivation and
discussion of the MHD system (2.1.1)-(2.1.2) can be found in several standard plasma physics
textbooks (e.g. [21, 42, 78]). A detailed disscusion of the equations, also with regard to the
numerics, has been provided by Torrilhon in [99].
2.2
The hyperbolic
equations
structure
of
the
ideal
MHD
Let us first define what hyperbolicity means for conservation laws. We begin by defining the
flux Jacobian in general normal direction n
M (n, q) := ∂q (F · n),
(2.2.1)
where |n| = 1 is a vector that points into a specific direction. Here
q ∈ Rm , F ∈ Rm×d , n ∈ Rd and M (n, q) ∈ Rm×m
where m is the number of unknowns and d is the number of space dimensions.
For d = 3 this allows a conservation law
qt + ∂x f 1 (q) + ∂y f 2 (q) + ∂z f 3 (q) = 0
(2.2.2)
to be written in quasi-linear form
qt + M (q)qx + M 2 (q)qy + M 3 (q)qz = 0.
7
(2.2.3)
The ideal MHD equations
Definition 1. Equations of the general quasi-linear form
qt + M 1 (q)qx1 + . . . + M d (q)qxd = 0
(2.2.4)
are hyperbolic if, for any q ∈ Ω and for any n = (n1 , . . . , nd )T ∈ Rd such that |n| = 1, the
matrix
M (n, q) = M 1 n1 + . . . + M d nd
(2.2.5)
is diagonalizable and with m real eigenvalues and a complete family of right eigenvectors.
Note that these conditions allow us to view the solution (of the hyperbolic system) in terms of
propagating waves, and indeed hyperbolic systems typically arise from physical processes that
give wave motion or advective transport [60].
The ideal MHD equations form a hyperbolic system and we present the wave structure of the
ideal MHD equations below. Note, the wave structure is closely related to the eigenstructure
of the equations, since the eigenvalues can be interpreted as wave speeds and eigenvectors as
directions of the propagating waves.
2.2.1
Ideal MHD in 1D
Consider the one dimensional MHD equation in x-direction
qt + ∂x f 1 (q) = 0.
Componentwise the equations in 1D read



ρu1
ρ
2

 ρu1 
ρu1 + p + 21 kBk2 − B12




 ρu2 
ρu1 u2 − B1 B2




 ρu3 
ρu1 u3 − B1 B3


∂t 
 E  + ∂x  u1 (E + p + 1 kBk2 ) − B1 (u · B)
2



 B1 

0




 B2 
u1 B2 − u2 B1
B3
u1 B3 − u3 B1
(2.2.6)






 = 0.





(2.2.7)
One immediately observes that the sixth equation simplifies to
Bt1 = 0.
(2.2.8)
Meaning that every spatial variation in B 1 remains stationary in time and consequently has
a wave speed of zero (resulting in a set of only seven waves for the eight equations). This
should seem unphysical, since we would expect every wave speed to be defined relative to the
gas velocity u by Galilean invariance. However, due to the divergence-free condition (2.1.2)
Bx1 = 0, since By2 = 0 and Bz3 = 0, resulting in B 1 being constant in space and time for the
purely 1D ideal MHD system and the equation for B 1 can in fact be dropped from the system
and treated as a parameter in the remaining system of seven equations. In multidimensional
MHD flow the situation is different and numerical methods built on seven waves can be more
sensitive, since numerical errors in satisfying ∇ · B = 0 are stationary on the grid. A source
term needs to be added to obtain eight waves and restore Galilean invariance with further
benefits from the numerical point of view, as described in the next section.
8
2.2 The hyperbolic structure of the ideal MHD equations
2.2.2
Ideal MHD in more than one space dimension
Godunov developed in 1972 [41] a symmetrization technique for the ideal MHD equations,
which allows to write the ideal MHD equations into symmetric hyperbolic form by augmenting
the system with a source term and thus allows the derivation of a full set of eight eigenvectors
with corresponding eigenvalues. This modified ideal MHD equations (ideal MHD equations
with source term) can be written as



 

ρu 0
ρ
1
2
T
T


ρu

 + ∇ · ρuu + p +1 2 kBk
Id − BB  + (∇ · B)  B  = 0,
(2.2.9)
∂t 
2
u · B
E 
 u E + p + kBk − B (u · B) 
2
u
B
BuT − uBT
∇ · B = 0.
(2.2.10)
In short form
qt + ∇ · FM HD + (∇ · B)S = 0.
(2.2.11)
Note that the source term (∇ · B)S is zero on the analytical level, due to (2.2.10), but it has
an impact on the entropy variables, stated below, and the numerical solution of the equations.
The eigenvalues and eigenvectors, presented below, are based on this modified form of the ideal
MHD equations using the entropy symmetrization theory of Barth [9].
Eigenvector scaling
Apart from degenerate scaling, any scaling of eigenvectors satisfies the eigenvalue problem.
However, numerical discretization techniques sometimes place additional demands on the form
of right eigenvectors. As noted by Balsara [[9],page: 198] in his study of high-order Godunov
methods, several of the schemes he studied that interpolate “characteristic” data (see for
example Harten et al. [46]) showed accuracy degeneration that depended on the specific scaling
of the eigenvectors of the flux Jacobian. In the characteristic interpolation approach, the
solution data is projected onto the local right eigenvectors of the flux Jacobian, interpolated
between cells and finally transformed back. The interpolant thus depends on the eigenvector
form. Entropy symmetrization theory (as discussed below) provides a systematic approach to
the scaling of eigenvectors. This is especially useful in MHD flow where the right eigenvectors
must be carefully scaled, especially near the so called triple umbilic point, where fast, slow and
Alfén wave speeds coincide, see [15]2 .
Theorem 1. (Eigenvector Scaling) [9]. Let M ∈ Rm×m be an arbitrary diagonalizable matrix
and S the set of all right symmetrizers:
S = {B ∈ Rm×m | B is symmetric positiv definit, MB is symmetric}
(2.2.12)
Further, let R ∈ Rm×m denote the right eigenvector matrix which diagonalizes M
M = RΛR−1
with r distinct eigenvalues, Λ = diag(λ1 Idm1 ×m1 , . . . , λr Idmr ×mr ). Then for each B ∈ S
there exists a symmetric block diagonal matrix T = diag(Tm1 ×m1 , . . . , Tmr ×mr ) that block scales
columns of R, R̃ = RT , such that
B = R̃R̃T ,
2
M = R̃ΛR̃−1 ,
Eigenvector scaling description is mainly taken from [9].
9
(2.2.13)
The ideal MHD equations
which imply
M B = R̃ΛR̃T .
(2.2.14)
According to [9], we can determine the eigenstructure of the MHD equations by first writing
(2.2.9) in terms of conservative variables in quasi-linear form
qt + M 1 qx + M 2 qy + M 3 qz = 0,
(2.2.15)
where M l = M l (q), l = 1, 2, 3 are the Jacobian matrices with the incorporated source term in
x-, y- and z-direction. Equivalently we can write these equations in symmetric form
qq∗ q∗t + M̃ 1 q∗x + M̃ 2 q∗y + M̃ 3 q∗z = 0
(2.2.16)
with q∗ being the entropy variables

− s +
 γ−1

q∗ := (γ − 1) 

γ+1
− Ep
γ−1
ρu
p
− ρp
ρB
p
+
kBk2
2p



,

where s = log(pρ−γ ) is the entropy for the ideal MHD equations and

ρ
ρuT
E − 12 kBk2
ρu
ρuuT + pId
ρHu
1 

2
2
∗
qq :=

a2 p
1
2
T
2
ρHu
ρH − γ−1
+ a kBk
γ − 1  E − 2 kBk
γ
p
0
00T
B
ρ
(2.2.17)
0T
00T
p T
B
ρ
p
Id
ρ



,

(2.2.18)
with a the sound speed, a2 = γp/ρ and H the specific total enthalpy, H = a2 /(γ − 1) + kuk2 /2.
Furthermore, the matrices above transform as
M̃ l = M l qq∗
for l = 1, 2, 3.
(2.2.19)
Consider arbitrary combinations M (n) = n1 M 1 + n2 M 2 + n3 M 3 in unit normal direction n.
From the Eigenvector Scaling Theorem, it follows
M (n) = R̃(n)Λ(n)R̃T (n).
(2.2.20)
and qq∗ = R̃(n)R̃T (n), where R̃(n) is the matrix of right eigenvectors, which are computed
with respect to the matrix
M̃ (n) = M (n)qq∗ .
Note that qq∗ is independent of the normal direction n. This fact indicates that the entropy
scaled eigenvectors, based on the matrix M̃ (n) are well defined, independent of the normal
direction. This is not self-evident at all, in fact singularities have been observed using “naively
scaled” eigenvectors, see [9].
Furthermore, (2.2.20) states that entropy scaled eigenvectors can diagonalize the system matrix
of the ideal MHD system for conservative variables (2.2.15) in normal direction n, making them
a suitable candidate for numerical methods using eigenvectors in general normal direction, as
advocated in this thesis.
10
2.2 The hyperbolic structure of the ideal MHD equations
To determine the actual eigenstructure of the coefficient matrices M̃ (n) and M (n), it is most
convenient to rewrite the quasi-linear form of the modified MHD equations (2.2.15) in primitive
variables w = (ρ, u, p, B)T to be
1
−1 2
−1 3
wt + q−1
w M qw wx + qw M qw wy + qw M qw wz = 0.
(2.2.21)
Here qw denotes the derivatives of the conservative variables with respect to the primitive
variables


1
0T
0
0T
 u
ρId 0 00T 
.
qw := 
(2.2.22)
1
1
2
 2 kuk ρuT γ−1
BT 
0
00T 0
Id
The coefficient matrix in primitive variables in normal direction can be stated as


u·n
ρnT
0
0T
1
 0
n ρ1 (nBT − B · n) 
(u · n)Id
ρ

.
M na (n) := q−1
M
(n)q
=
w
w
 0

γpnT
u·n
0
T
0
Bn − B · n
0
(u · n)Id
(2.2.23)
Now “naively” scaled eigenvectors may be obtained for matrix (2.2.23), see [9], which exhibit
several forms of degeneracy as carefully described in [84].
However, the entropy scaled eigenvectors we use, namely
1
8
R̃pr (n) := [r̃pr
| . . . |r̃pr
],
can be obtained from the following matrix
M pr (n) := M na (n)q−1
w q q ∗ qw .
(2.2.24)
Note that eigenvectors in conservative variables, can be recovered from the eigenvectors in
primitive variables as follows
R̃(n) = qw R̃pr (n).
(2.2.25)
In order to present the entropy scaled eigensystem of the MHD equations, which are associated
√
with the primitive variable system, it is useful to define b = B/ ρ and
1
1p 2
c2f,s := (a2 + b2 ) ±
(a + b2 )2 − 4a2 (b · n)2
2
2
(2.2.26)
as well as the following notation also used by Roe and Balsara [84]
αf2
a2 − c2s
:= 2
,
cf − c2s
αs2
c2f − a2
:= 2
.
cf − c2s
(2.2.27)
Moreover we define n⊥ to be a unit vector orthogonal to n lying in the plane spanned by n and
b, i.e. n⊥ · n = 0, kn⊥ k = 1, n⊥ ∈ span{n, b}. The resulting entropy scaled eigensystem, as
11
The ideal MHD equations
stated in [9], reads
Entropy and Divergence Waves: λ1,2 = u · n
1
r̃pr
 √ 
ρ
r

γ−1
0

,
=

0 
γ
0
(2.2.28)

2
r̃pr

0
r

1
 0 
=

0 
γ
an
(2.2.29)
Alfvén Waves: λ3,4 = λ±a = u · n ± b · n = u · n ± ca

r 
1
=

2
0
p
∓ ρ (n⊥ × n)
q 0
p
(n⊥ × n)
ρ
√
(2.2.30)





(2.2.31)
Fast Magneto-acoustic Waves: λ5,6 = λ±f = u · n ± cf
(2.2.32)
3,4
±a
r̃pr
= r̃pr
√
αf ρ

r
1
2γ
⊥ )n−(b·n)n⊥ )
 αf a2 n+αs a((b·n
√
 ±
ρc

√ f

αf ρa2
αs an⊥





(2.2.33)
Slow Magneto-acoustic Waves: λ7,8 = λ±f = u · n ± cs
(2.2.34)
5,6
r̃pr
=
±f
r̃pr
=
√
αs ρ

7,8
r̃pr
=
±s
r̃pr
r
=
1
2γ
αs a(b·n)n+αf c2f n⊥ )

√
 ±sgn(b · n)
ρcf

√
2

αs ρa
−αf an⊥



.

(2.2.35)
p
See appendix A, for the entropy scaled left eigenvectors ˜lpr
, p = 1, . . . , 8.
The eigenvalues are well-ordered in the sense that
λ1 ≤ λ2 ≤ λ3 ≤ λ4 ≤ λ5 ≤ λ6 ≤ λ7 ≤ λ8 .
(2.2.36)
See Figure 2.1 for an illustration of the waves at a 1D interface. The fast and slow magnetosonic
waves are genuinely nonlinear, while the remaining waves are linearly degenerate3 .
Here the wave corresponding to λ1 (Entropy wave) carries arbitrary variations in the density,
ρ, while all other variables are constant. The Divergence wave carries variations in ∇ · B by
treating the quantity (∇ · B)/ρ as a passively convected scalar (see [83] or section 2.2.3 below).
In MHD the magnetic field resists transverse motion, resulting in purely transverse waves,
which are known as Alvén waves (λ3,4 ), propagating at the Alvén velocity
ca = b · n,
3
See e.g. [65] for a classification of waves.
12
(2.2.37)
2.2 The hyperbolic structure of the ideal MHD equations
Figure 2.1: Shown are the waves of the ideal MHD equations.
relative to the fluid. These waves are also known as intermediate waves [62]. The remaining
sets of waves are the fast and slow genuinely nonlinear magnetosonic waves λ5,6 and λ7,8 ,
with the fast and slow magnetosonic speeds ±cf , ±cs (2.2.26). The waves satisfy the relation
cs ≤ ca ≤ cf .
To further categorize the MHD equations we define
Definition 2. A system of the form (2.2.4):
• is said to be strictly hyperbolic, if it is hyperbolic and the eigenvalues are also distinct.
• is said to be non-strictly hyperbolic, if it is hyperbolic but the eigenvalues are not
necessarily distinct. In other words, the pth eigenvalue of M (n, q) is real and has the
same geometric and algebraic multiplicity, but that multiplicity may be greater than one.
The ideal MHD equations are hyperbolic but not strictly hyperbolic in all cases, rather they
are non-strictly hyperbolic. Consequently, in special cases some wave speeds may be equal,
which leads to features such as Riemann solutions4 that involve both a shock and a rarefaction
wave across one and the same wave, which is known as a compound wave [15], [65].
The most interesting case, where wave speeds coincide, is cf = cs = ca = a, which occurs, if
(B 2 )2 + (B 3 )2 = 0 and (B 1 )2 = a2 . This situation has come to be called the triple umbilic point
[15], [62] and needs special care to be taken e.g. for eigenvector scaling as mentioned above.
Moreover, there exist special initial data for the Riemann problem of the MHD equations,
where the solution of the Riemann problem could be non unique [99]. For numerical methods
solving the MHD equations, this could lead to a non-uniform convergence behaviour (“pseudo
convergence”) as investigated e.g. in [98] and [99].
2.2.3
The 8-wave formulation
As mentioned for 1D MHD, the linearized ideal MHD equations (without the source term)
support seven propagating plane-wave solutions5 and a stationary plane-wave solution, which
4
See [65] or section 5.1.2 for the definition of a Riemann problem and the description of Riemann solutions.
The seven propagating waves are made up of two fast magnetosonic, two Alfvén, two slow magnetosonic,
and an entropy wave.
5
13
The ideal MHD equations
is the divergence wave and has speed zero in this case. The source term as introduced above not
only symmetrizes the ideal MHD equations and restores Galilean invariance, but also changes
the divergence wave in such a way that it propagates with the fluid velocity (u · n) and the
divergence of the magnetic field satisfies the following convection equation
(∇ · B)t + ∇ · (u∇ · B) = 0.
(2.2.38)
From the numerical point of view, the difference between a stationary and a propagating
divergence wave turns out to be very significant. Powell [82] and Powell et al. [83] showed
that numerical methods applied to the MHD equations with the symmetrizing source term
were much more stable than the same methods applied to the original MHD equations. The
modified form of the MHD equations (2.2.9) has come to be called the 8-wave formulation,
since this form of the equations supports eight propagating plane wave solutions. Although
this approach has been used with some success (see Powell et al. [83]), it does have a significant
drawback: the 8-wave formulation is non-conservative and difficulties with obtaining the correct
weak solution across discontinuities have been documented in the literature (see for example
Tóth [96]). Note that despite the fact that we use the eigenvalues and eigenvectors of the
8-wave formulation of the MHD equations, we still solve the MHD equations in conservative
form (i.e., without the Godunov-Powell source term) in this thesis.
2.3
The role of ∇ · B = 0 in numerical discretizations
The additional equation (2.1.2) (∇ · B = 0) for the MHD equations (2.1.1) is not needed in the
time evolution of the conserved variables in the following sense
If (2.1.2) is true at some time t = T , then the evolution equation (2.1.1) guarantees
that (2.1.2) is true for all time.
This result follows from taking the divergence of Faraday’s law (2.1.11), which yields
0 = ∇ · [Bt + ∇ · (BuT − uBT )]
= ∇ · [Bt + ∇ × (B × u)]
= (∇ · B)t + ∇ · (∇ × (B × u))
{z
}
|
=0
= (∇ · B)t .
For this reason, (2.1.2) should not be regarded as constraint (such as the ∇ · u = 0 constraint
for the incompressible Navier-Stokes equations), but rather as involution [24].
Although ∇ · B = 0 is an involution, and therefore has no dynamic impact on the evolution
of the exact MHD system, the story is more complicated for numerical discretizations of the
system. Usual numerical discretizations of the MHD equations can only guarantee that the
divergence of the magnetic field is of the order of the numerical truncation error
∇ · B = O(∆xp , ∆y p )
(on smooth solution structures). This can be particularly problematic across shocks, where the
discrete divergence can become very large [89], [87]
∇ · B 1.
14
(2.3.1)
2.3 The role of ∇ · B = 0 in numerical discretizations
This can lead to unphysical solutions such as negative density or pressure.
Brackbill and Barnes [14] gave a physical explanation as to why ∇ · B = 0 should be satisfied
in some appropriate discrete sense.
If ∇ · B 6= 0, then the magnetic force,6
1
T
2
F = ∇ · BB − kBk Id ,
2
T
= ∇ · (BB ) − ∇(BT B)
(2.3.2)
in the direction of the magnetic field
F · B = ∇ · (BT BB) − ∇(BT B) · B
= (BT B)(∇ · B) = kBk2 (∇ · B),
(2.3.3)
will not in general vanish
F · B = kBk2 (∇ · B) 6= 0.
(2.3.4)
If this spurious forcing becomes too large, it can lead to numerical instabilities (see for example
[14, 89, 96]). More discussions on this topic is presented by Evans and Hawley [36].
6
Here we use ∇φ for the gradient of φ, with φ being a scalar function. Furthermore the product rule:
∇ · (φB) = (∇φ) · B + φ∇ · B holds.
15
The ideal MHD equations
16
Chapter 3
Methods to control ∇ · B in numerical
discretizations
In this chapter we give a short review of some existing methods to control the divergence of the
magnetic field on the discrete level. Figure 3.1, which is reproduced from [89], illustrates, what
can go wrong if the divergence is not sufficiently controlled. Here we consider the Orszag-Tang
Figure 3.1: The thermal pressure at t = 0.633 for the Orszag-Tang vortex. Plots (a) and (c)
show the solution computed without explicite control over ∇ · B. Plots (b) and (d) show the
solution with a CT method. (e) shows max|∇ · B| as a function of time for the method without
explicite control over ∇ · B. Note the sharp increase in the divergence near t = 0.633. These
plots demonstrate how unphysical oscillations can appear in calculations that do not explicitly
control the divergence of the magnetic field. (Figure taken from [89]).
17
Methods to control ∇ · B in numerical discretizations
vortex example1 . See for example section 5.3, for a slightly modified version of the initial data
in the 3D setting.
Shown is the pressure of the ideal MHD equations in 2D at time t = 0.633, computed by a
finite volume method that does not explicitly control the divergence of the magnetic field ,
see Figure 3.1a, in comparison to a method that controls the divergence via the constrained
transport method of section 3.4.3, Figure 3.1b. The configuration consists of smooth initial
data that leads to a system of supersonic MHD turbulence, with several MHD shocks. One can
observe that the solution still looks smooth, nevertheless on can see that unphysical oscillatory
behaviour occurs due to the lack of explicitly controlling the divergence of the magnetic field
in Figure 3.1a.
This example clearly demonstrates that keeping the divergence of the magnetic field small is
crucial for numerical stability. Starting with the paper of Brackbill and Barnes [14] in 1980,
several approaches for controlling errors in ∇ · B have been proposed [3], [105], [83], [82], [28],
[104], [38], [100], [36]. An in-depth review of many of these methods can be found in Tóth [96].
We give an overview of some selected methods and will concentrate on constrained transport
methods, in section 3.4.
3.1
Projection methods
Projection methods for ideal MHD are based on a predictor-corrector approach for the magnetic
field. Some standard finite volume or finite difference method is used to solve the ideal MHD
equations from time tn to tn+1 . The approximate magnetic field that is predicted at time tn+1
is denoted by B∗ . It is well known (Helmholtz Theorem) that a vector field can be decomposed
into the sum of a divergence-free function (the curl of a vector potential, denoted by ∇ × A)
and the gradient of a scalar function, denoted by ψ. Thus we can write
B∗ = ∇ × A + ∇ψ.
(3.1.1)
Taking the divergence on both sides yields a Poisson equation for ψ
∇2 ψ = ∇ · B∗ .
(3.1.2)
Now the magnetic field can be corrected in the form
Bn+1 := B∗ − ∇ψ.
(3.1.3)
See Tóth [96], Balsara and Kim [7] for further discussion. This method is attractive for it allows
a variety of methods, such as finite volume, Discontinuous Galerkin finite element methods or
other discretizations, to be used in the prediction step and then only requires one Poisson solve
per time-step to correct it. The clear disadvantage of this approach is that it requires a global
elliptic problem to be solved, whereas the ideal MHD equations are purely hyperbolic. This
could be especially computationally inefficient in the case of adaptively refined grids.
3.2
Hyperbolic divergence cleaning methods
This method was introduced by Dedner et al. [28] and is closely related to the above described
projection method and shares some properties with the 8-wave formulation. The basic idea
1
The Orzag-Tang vortex example, is a well known test for numerical method for ideal MHD equations and
appears several times in the literature e.g. [96], [89], [105].
18
3.3 Flux distribution methods
is to solve again for the divergence error in the magnetic field. Instead of solving an elliptic
equation, however, a damped hyperbolic equation is prescribed for the divergence error. This
can be written as
Bt + ∇ · (BuT − uBT ) + ∇ψ = 0,
D(ψ) + ∇ · B = 0,
(3.2.1)
(3.2.2)
where D is a linear differential operator of the form
D(ψ) =
1
1
ψ + 2 ψ,
2 t
ch
cp
(3.2.3)
with c2p and c2h being adjustable parameters. Plugging this choice for D into (3.2.2) we can
write a hyperbolic equation for ψ with a source term as
ψt + c2h ∇ · B = −
c2h
ψ.
c2p
(3.2.4)
This does not produce an exact divergence-free magnetic field; however, it allows for the
divergence error to be propagated and damped away from where it is originated. The main
advantage of this method is that it is easy to implement and requires no elliptic solve. This
method has already been used several times in different MHD simulations e.g. [27], [102], [34].
The main disadvantage is that there are two tunable parameters, which have to be set
empirically: the speed of the error propagation (c2h ) and the rate at which the divergence
error is damped (c2p ). Furthermore, this method can produce wrong solutions along shocks due
to the source term in the evolution equation of ψ (3.2.4).
3.3
Flux distribution methods
Another quite elegant way to satisfy a discrete divergence-free condition, at least locally, has
been introduced by Torrilhon [99] and relies on so called flux distributions denoted by ΦĈ . The
basic idea (depicted for 2D Cartesian grids) is, to take the finite volume update of the magnetic
field in flux difference form
∆t
∆t
n
(Fi+1/2,j − Fi−1/2,j ) −
(Fi,j+1/2 − Fi,j−1/2 )
(3.3.1)
Bn+1
i,j = Bi,j −
∆x
∆y
and reformulate it by taking flux distributions,
n
Bn+1
i,j = Bi,j +
∆t
(Φi+1/2,j + Φi−1/2,j + Φi,j+1/2 + Φi,j−1/2 )|Ci,j .
∆x∆y
(3.3.2)
Here we have e.g. Fi+1/2,j = −fi+1/2,j (0, 1)T , where f = u1 B 2 − u2 B 1 and Φi+1/2,j |Ci,j =
fi+1/2,j (0, ∆y)T . Now the key step is, to redefine the flux distributions to be Φdiv
, by taking a
Ĉ
weighted average of the neighbouring interface fluxes. This average has to be chosen in such
a way as to obtain a consistent flux at the corresponding interface, together with a resulting
update of the magnetic field that satisfies a locally defined discrete divergence operator, denoted
by div ∗ . Figure 3.2 (right hand side) shows a possible distribution for Φdiv
i+1/2,j that can be used
to compute an update of the magnetic field, which satisfies a discrete divergence, defined as
div∗ B :=
2
2
1
1
{Bi+1,j
}y − {Bi−1,j
}y {Bi,j+1
}x − {Bi,j−1
}x
+
,
2∆x
2∆y
19
(3.3.3)
Methods to control ∇ · B in numerical discretizations
where e.g.
1 1
1
1
(Bi,j+1 + 2Bi,j
+ Bi,j−1
)
4
1 1
1
1
:=
(Bi+1,j + 2Bi,j
+ Bi−1,j
).
4
1
{Bi,j
}y :=
(3.3.4)
1
{Bi,j
}x
(3.3.5)
The resulting update will then have the following general form
Figure 3.2: This Figure illustrates the flux distributions for a classical finite volume scheme in
flux difference form (left side) and a flux distribution of a new average, Φdiv , which computes a
magnetic field update that satisfies the local divergence operator div ∗ , (right hand side). Figure
is taken from [99]

n
Bn+1
i,j = Bi,j +
∆t 
|Ci,j |

X
Φdiv
(B n )|Ci,j 
Ĉ
(3.3.6)
Ĉ∈{Ci,j }∪N (Ci,j )
where N (Ci,j ) denotes the neighbourhood of cell Ci,j with cell area |Ci,j | and the flux
distributions ΦĈ (B n )|Ci,j are related to cell Ci,j . This method has in particular been generalized
to triangular grids [99] and up to fourth order of accuracy on Cartesian grids [2].
3.3.1
Constraint preserving schemes using potential based fluxes
A related method has recently been introduced by Mishra and Tadmor [74] based on a genuinely
multidimensional fluxes for finite volume methods as presented in [72], [73]. The basic idea of
this multidimensional setting is to take into account multidimensional (transverse) information,
by defining fluxes based on genuinely two-dimensional stencils.
On a 2D Cartesian grid, so called numerical potentials φi+1/2,j+1/2 , ψi+1/2,j+1/2 are defined
on each vertex of the grid. These are defined to be consistent with the flux functions in
x- and y-direction, respectively, and can be constructed via an averaging of the genuinely
multidimensional fluxes on the corners or edges of the cell. Taking a suitable form of the
potentials, the spatial discretization of the numerical update is rewritten in terms of the
constructed numerical potentials and satisfies a discrete divergence-free condition for the
magnetic field.
20
3.4 Constrained transport methods
3.4
Constrained transport methods
The constrained transport (CT) approach for ideal MHD was first introduced by Evans and
Hawley [36]. The method is, at least in its original formulation, introduced with a staggered
magnetic and electric field. Since the introduction of the CT framework, several variants and
modifications have been introduced, including the work of Balsara [6], Balsara and Spicer [8],
Dai and Woodward [25], Fey and Torrilhon [38], Londrillo and Del Zanna [68], Rossmanith [89],
Ryu et al. [90], and De Sterck [92]. An overview of many of these approaches, as well as the
introduction of a few more variants, can be found in Tóth [96]. In particular, Tóth [96] showed
that a staggered magnetic field is not necessary. The CT framework, at least several versions of
it, can also be viewed as a kind of predictor-corrector approach for the magnetic field. Roughly
speaking, the idea is to again compute all of the conserved quantities with a standard finite
volume method. From these computed quantities one then constructs an approximation to
the electric field through the ideal Ohm’s law. This electric field can subsequently be used to
update the magnetic vector potential, which in turn, can be used to compute a divergence-free
magnetic field. The general concept is explained in more detail below. The main advantages
of this approach are that (1) there is no elliptic solve and (2) there are no free parameters to
choose such as in the hyperbolic divergence-cleaning technique.
3.4.1
A staggered constrained transport method in 2D
This section breifly describes the staggered CT method of Evans and Hawley [36]2 .
Since the magnetic field, B, satisfies the divergence-free condition, it can be written as a curl
of a magnetic potential
B = ∇ × A.
(3.4.1)
Using the evolution equation for the magnetic field (Faraday’s law) as well as Ohm’s law
(E = B × u) for a perfect conductor, we can derive
Bt + ∇ × E = 0
⇔ (∇ × A)t + ∇ × E = 0
⇔ ∇ × (At + E) = 0
⇒ At + E = −∇ψ.
(3.4.2)
The scalar field ψ whose gradient (∇ψ) appears on the right hand side of (3.4.2) will be discussed
in chapter 4.
In two space dimensions, we only need to consider the z-component of the magnetic potential
A3 , which yields
B 1 = A3y
B 2 = −A3x
(3.4.3)
and
E · e3 = (B × u) · e3 = −u1 B 2 + u2 B 1
(3.4.4)
with e3 ∈ R3 the unit vector in z-direction. Independent of the space dimensions, the key
property of the magnetic potential is that it exists and a divergence-free magnetic field can
21
Methods to control ∇ · B in numerical discretizations
A3 , E
2
[Bst
]
A3 , E
[∇ · B] = 0
1
[Bst
]
1
[Bst
]
2
[Bst
]
A3 , E
A3 , E
Figure 3.3: An example of a staggered grid configuration of Evans and Hawley. Taken from
[89].
be directly computed from it. In [36], Evans and Hawley try to take advantage of this on a
numerical level by introducing a staggered grid as shown in Figure 3.3. The grid configuration
on a Cartesian grid is as follows
at cell centers:
at cell corners:
ρi,j , ρui,j , Ei,j Bi,j ,
3
A3i−1/2,j−1/2 , Ei−1/2,j−1/2
,
at left edge:
[Bst ]1i−1/2,j ,
at bottom edge:
[Bst ]2i,j−1/2 .
If the magnetic potential is known, the magnetic field at cell edges, with indices (i − 1/2, j),
(i, j − 1/2), can be computed as follows
1
A3i−1/2,j+1/2 − A3i−1/2,j−1/2
∆y
1
A3i−1/2,j−1/2 − A3i+1/2,j−1/2 .
=
∆x
1
[Bst
]i−1/2,j =
(3.4.5)
2
[Bst
]i,j−1/2
(3.4.6)
It can be shown that the magnetic field [Bst ]1 , [Bst ]2 satisfies the following discrete
divergence-free condition up to machine precision
[∇ · B]i,j =
1
2
1
2
[Bst
]i+1/2,j − [Bst
]i−1/2,j [Bst
]i,j+1/2 − [Bst
]i,j−1/2
+
= 0.
∆x
∆y
(3.4.7)
In order to update the fluid variables, we also need a cell-centered representation of the magnetic
field. This can be obtained by simple linear interpolation
2
1
1
1
[Bst
]i+1/2,j + [Bst
]i−1/2,j ,
2
1
2
2
]i,j+1/2 + [Bst
]i,j−1/2 .
=
[Bst
2
[B 1 ]i,j =
(3.4.8)
[B 2 ]i,j
(3.4.9)
Description for staggered CT is mainly taken from [89].
22
3.4 Constrained transport methods
Tóth [96] showed that with these definitions, the cell-centered magnetic field also satisfied a
discrete divergence-free condition
[B 1 ]i+1,j + [B 1 ]i+1,j+1 − ([B 1 ]i,j + [B 1 ]i,j+1 )
2∆x
[B 2 ]i,j+1 + [B 2 ]i+1,j+1 − ([B 2 ]i,j + [B 2 ]i+1,j )
+
= 0.
2∆y
[∇ · B]i,j =
(3.4.10)
(3.4.11)
In order to obtain a complete numerical method for the MHD equations, an update for the
magnetic potential that couples to the other variables must be provided. The full constrained
transport algorithm in the 2D case can be summarized as follows
1 n
2 n
Step 0 Primary quantities: ρn , ρun , E n , [Bst
] , [Bst
] , (B 3 )n , (A3 )n .
Step 1 Average edge magnetic field
1
1 n
1 n
[Bst
]i+1/2,j + [Bst
]i−1/2,j
2
1
2 n
2 n
=
[Bst
]i,j+1/2 + [Bst
]i,j−1/2
2
⇒ [B 1 ]ni,j =
⇒ [B 2 ]ni,j
Step 2 Solve the MHD equations using a finite volume method. The result is denoted by
ρn+1 , ρun+1 , E n+1 , B∗ .
Step 3 Construct the electric field at cell corners, e.g.
n+1/2
n+1/2
n+1/2
Ei−1/2,j−1/2 = Bi−1/2,j−1/2 × ui−1/2,j−1/2
using some appropriate interpolations of un , un+1 and Bn , B∗ on a suitable stencil on the
grid.
Step 4 Update the magnetic potential
n+1/2
⇒ (A3i−1/2,j−1/2 )n+1 = (A3i−1/2,j−1/2 )n + ∆tEi−1/2,j−1/2
(3.4.12)
Step 5 Compute B = ∇ × A
1 n+1
[Bst
]i−1/2,j
=
2 n+1
[Bst
]i,j−1/2 =
1
∆y
1
∆x
(A3i−1/2,j+1/2 )n+1
−
(A3i−1/2,j−1/2 )n+1
,
(3.4.13)
(A3i−1/2,j−1/2 )n+1 − (A3i+1/2,j−1/2 )n+1 .
(3.4.14)
In other words, the algorithm says that we begin with primary quantities. The magnetic
field is averaged to cell centers so that the ideal MHD equations can be solved with e.g. a
high-resolution finite volume method. After updating the cell-centered quantities, an electric
field at cell corners is constructed. This electric field is then used to update the magnetic
potential. Finally, the magnetic potential is used to obtain the updated magnetic field values.
In the algorithm described above every step is clearly defined, however, for Step 3, several
methods have been proposed in the literature, see Tóth [96] for a review. There are several
other staggered CT methods that are closely related to these methods, see [92], [67], [68],[6].
23
Methods to control ∇ · B in numerical discretizations
3.4.2
An unstaggered constrained transport method
We now turn to a CT method in 2D which is unstaggered. Unstaggered in this context means
that no second “staggered” grid (as shown in Figure 3.3) for discrete quantities on e.g. the
corners is needed. This second grid was used above to compute the evolution of the magnetic
potential as well as the magnetic field itself. The unstaggered discretization has the advantage
that all quantities are discretized on the same grid, which makes it easier to adapt the whole
method to general mapped grids and/or adaptive mesh refinement, since there is no second
(staggered) grid that needs to be considered.
Tóth [96] introduced a fully cell-centered version of the Evans and Hawley approach. This
approach conserves the following definition of a discrete divergence
[∇ · B]i,j
[B 1 ]i+1,j − [B 1 ]i−1,j [B 2 ]i,j+1 − [B 2 ]i,j−1
+
= 0,
=
2∆x
2∆y
(3.4.15)
which is achieved by the following definition of the magnetic field
1
(A3
− A3i,j−1 )
2∆y i,j+1
1
=
(A3i−1,j − A3i+1,j ).
2∆x
[B 1 ]i,j =
(3.4.16)
[B 2 ]i,j
(3.4.17)
With that definition, Step 1 from the algorithm in section 3.4.1 is removed and we may
summarize the unstaggered algorithm as follows
Step 0 Primary quantities: ρn , ρun , E n , [B 1 ]n , [B 2 ]n , (B 3 )n , (A3 )n .
Step 1 Solve the MHD equations using a finite volume method
⇒ ρn+1 , ρun+1 , E n+1 , B∗ .
Step 2 Construct the electric field at cell centers e.g.
n+1/2
Ei,j
= (Bi,j × ui,j )n+1/2 =
(Bi,j × ui,j )n + (Bi,j × ui,j )∗
.
2
Step 3 Update the magnetic potential
n+1/2
⇒ (A3i,j )n+1 = (A3i,j )n + ∆tEi,j
(3.4.18)
Step 4 Compute B = ∇ × A
[B 1 ]n+1
i,j =
[B 2 ]n+1
i,j
=
1
∆y
1
∆x
(A3i,j+1 )n+1 − (A3i,j−1 )n+1 ,
(A3i−1,j )n+1 − (A3i+1,j )n+1 .
(3.4.19)
(3.4.20)
The weakness of cell centered CT methods as described above, is that it generally does not
satisfy a total variation diminishing (TVD),3 or a non-oscillatory property for the magnetic
3
For the definition of total variation (TV) as well as total variation diminishing (TVD) of a grid function,
see section 5.1.6.
24
3.4 Constrained transport methods
field, computed from the potential. The various constructions of the electric fields as proposed
in the literature, with applying centered differences (as in Step 4) to compute the magnetic
field, do not guarantee any control of the total variation of the magnetic field. This issue
was addressed and solved by staggered CT methods of Londrillo and Del Zanna [67], [68] and
Balsara [6], with taking more carefully chosen reconstructions of the electric field from the
staggered grid.
3.4.3
The unstaggered magnetic potential advection
constrained transport method of Rossmanith in 2D
In this section we describe an alternative CT approach introduced by Rossmanith [89], which
allows a completely cell centered update of the magnetic potential, together with a TV-stable
update for the magnetic field (here the update satisfies a 1D TVD property).
This approach is based on rewriting Faraday’s law as well as Ohm’s law using B = ∇ × A to
obtain
(∇ × A)t + ∇ × ((∇ × A) × u) = 0
⇒ At + (∇ × A) × u = −∇ψ
⇒ A3t + u1 A3x + u2 A3y = 0.
|{z}
(3.4.21)
(3.4.22)
(3.4.23)
in 2D
Note that in general the choice of the magnetic potential is not unique. Equation (3.4.22)
indicates that further degrees of freedom can be introduced by the scalar function ψ, which has
different choices that are known as gauge conditions and will be discussed in chapter 4. However,
ψ is only relevant in the three-dimensional setting, since ψ(x, y)z = 0 for all x, y in 2D. Let us
now depict the CT scheme of Rossmanith, which he refers to as mpact. He solves the basic
MHD equations (2.1.1) using a high-resolution finite volume method, here he utilizes the wave
propagation algorithm of LeVeque, see [65] or section 5.1.4 for a brief description. Moreover the
scalar non-conservative advection equation (3.4.23) will be solved on the same grid using the
second order accurate version of the wave propagation algorithm for non-conservative equations
explained in section 5.1.6. The mpact scheme can thus be summarized to be
Step 0 Primary quantities ρn , ρun , E n , [B 1 ]n , [B 2 ]n , (B 3 )n , (A3 )n .
Step 1 Solve the MHD equations using a finite volume method
⇒ ρn+1 , ρun+1 , E n+1 , B∗ .
(NOTE: B∗ is not needed anymore and does not need to be stored.)
Step 2 Time average the velocity field
n+1/2
ui,j
1
= (uni,j + un+1
i,j ).
2
Step 3 Solve the magnetic potential equation (3.4.23) using un+1/2 to obtain (A3 )n+1 .
25
Methods to control ∇ · B in numerical discretizations
Step 4 Compute B = ∇ × A
[B 1 ]n+1
i,j =
[B 2 ]n+1
i,j =
1
∆y
1
∆x
(A3i,j+1 )n+1 − (A3i,j−1 )n+1 ,
(A3i−1,j )n+1 − (A3i+1,j )n+1 .
(3.4.24)
(3.4.25)
In other words, this algorithm tells us that in Step 1 all of the conservative variables are
updated via a finite volume method. The only problem is that the resulting magnetic field is
not divergence-free. In order to correct this problem, he solves an evolution equation for the
magnetic potential (Step 3). When the magnetic potential is advanced in time, the new velocity
field is no longer an unknown since it is already computed self-consistently in Step 1, therefore,
it can be solved for the magnetic potential simply by computing it along the time-averaged
velocity field. Once the magnetic potential is computed at the new time level, a new magnetic
field is computed from the potential in such a way that it satisfies a discrete divergence-free
condition (Step 4). The coupling between the fluid variables and the magnetic potential
comes from the fact that in the update for the fluid variables the magnetic field is needed,
which is computed by the magnetic potential (using a discrete curl operator). The discrete
divergence-free condition (3.4.15) of the magnetic field is exactly satisfied by this method (up
to machine precision). Note that the velocity is needed at the intermediate value in time, un+1/2
in Step 3, in order to guarantee full second order accuracy in time for the CT-step.
The properties of the scheme can be summarized as follows
1. All quantities, including all components of the magnetic potential, are treated as
cell-centered;
2. The magnetic potential is evolved together with the eight conserved MHD variables via
a modified non-conservative high-resolution wave propagation scheme; and
3. Special limiters, which will be introduced in section 5.1.6 are applied in the evolution to
the magnetic potential, which control unphysical oscillations in the magnetic field.
For discussions about boundary conditions of the magnetic potential we refer the reader to [89]
or section 5.2.4.
This method has been used with adaptive mesh refinement (AMR) in [88]. The original CT
method of Rossmanith [89] was limited to the spatially two-dimensional case. He restricted
his considerations to Cartesian and spherical (smoothly varying) mapped grids, using shallow
water MHD [86], [87].
In this thesis we extend this method to three dimensional Cartesian grids and invent a new
related CT method for (possibly) non-smoothly varying mapped grids. In the next section
we discuss different choices for the gauge conditions, which are relevant for the spatially
three-dimensional case of the evolution equation for the magnetic vector potential (3.4.22).
Subsequently, we extend the CT method of Rossmanith to three dimensional Cartesian
grids, using the wave propagation algorithm of Langseth and LeVeque [59], together with
an appropriate splitting method for the evolution of the vector potential. In chapter 6 and 7
we present a new CT method, which extends the 2D and 3D method to (also non-smoothly
varying) logically rectangular and hexahedral mapped grids, respectively, by changing to a
method of lines discretization.
26
Chapter 4
Vector potential equations and gauge
conditions
In this section we briefly discuss several gauge conditions and their consequences for the
evolution of the magnetic vector potential. As shown in (3.4.22), the evolution equation for the
magnetic vector potential can be derived to be
At + (∇ × A) × u = −∇ψ,
(4.0.1)
where ψ : Rd → R is an arbitrary scalar function. Different choices of ψ represent different
gauge condition choices.
Before we explore various gauge conditions, however, we want to point out again that the
situation in the pure two-dimensional case (e.g. in the x, y-plane) is much simpler. The only
component of the magnetic vector potential that influences the evolution in this case is A3 (i.e.,
the component of the potential that is perpendicular to the evolution plane); and furthermore,
all gauge choices lead to the same equation
A3t + u1 A3x + u2 A3y = 0,
(4.0.2)
where A3 is uniquely defined up to an additive constant, since ψ(x, y)z = 0, for all x, y ∈ R.
In 3D the situation is more complicated. The basic system reads
 1

  1
 2
  1
A
0 −u2 −u3
A
u
0 0
A
2
1
3  2
A2  + 0 u1



0
A
A
+ −u 0 −u
A3 t
0 0
u1
A3 x
0 0 u2
A3 y
 3
 
 
u
0 0 A1
ψx
3
2




0
u
0 A
+
= − ψy  .
1
2
3
−u −u 0 A z
ψz
4.1
(4.0.3)
Coulomb gauge
One choice for the gauge is to take the magnetic vector potential to be solenoidal
(divergence-free)
∇ · A = 0,
(4.1.1)
27
Vector potential equations and gauge conditions
resulting in the Coulomb gauge. We are now able to add −u ∇ · A to the left-hand side of
(4.0.1) and obtain an equation for the potential that is in symmetric hyperbolic form
 1
 1
  1
 2
  1
A
−u −u2 −u3
A
u
−u1 0
A
2
1
2
3  2
A2  + −u2 u1



0
A
A
+ −u −u −u
A3 t
−u3 0
u1
A3 x
0 −u3 u2
A3 y
(4.1.2)
 
  1
 3
ψx
A
u
0 −u1
u3 −u2  A2  = − ψy  .
+ 0
A3 z
−u1 −u2 −u3
ψz
The main difficulty with this approach, however, is that at each time step one must solve a
Poisson equation to determine the Lagrange multiplier ψ
−∇2 ψ = ∇ · [(∇ × A) × u] .
(4.1.3)
Having to solve an elliptic equation in each time step makes this approach have the same
efficiency problems as the projection method.
4.2
Lorentz-like gauge
Usually the Lorentz gauge condition is known as
ψt
= ∇ · A,
c2
(4.2.1)
where c denotes the speed of light. In the ideal MHD setting, since the speed of light is taken
to be infinite, the Lorentz and Coulomb gauges are equivalent. However, one possibility is
to introduce a fictitious wave speed, ξ, that is larger than all other wave speeds in the MHD
system. We can then take
ψt = ξ 2 ∇ · A,
(4.2.2)
which results in the following evolution

 1
0 −u2 −u3
A
1

A2 
0
 3 +  0 u
0
A 
0
u1
2
ψ t
ξ
0
0
 3
u
0
0
3
 0
u
0
+
−u1 −u2 0
0
0 ξ2
equation for (A, ψ)
 
 2
1 A1
u
2



0 A 
−u1

+
 0
0 A3 
0
ψ x
0
  1
0 A
 2
0
 A3  = 0.
1 A 
0
ψ z
0
0
0 −u3
0 u2
ξ2 0
  1
0
A


1 A2 

0 A3 
0
ψ y
(4.2.3)
The flux Jacobian of this system in some direction n (where knk = 1) can be written as
 2 2

n u + n3 u3
−n1 u2
−n1 u3
n1
 −n2 u1
n1 u1 + n3 u3
−n2 u3
n2 
.
N (n) = 
(4.2.4)
 −n3 u1
−n3 u2
n1 u1 + n2 u2 n3 
n1 ξ 2
n2 ξ 2
n3 ξ 2
0
28
4.3 Helicity-inspired gauge
The eigenvalues of this matrix are
n
o
λ = −ξ, ξ, u · n, u · n .
(4.2.5)
If ξ > |u · n|, the right-eigenvectors of N (n) are complete, and thus, the system is hyperbolic.
Although this seems like a potentially useful gauge choice, Rossmanith found previously that
numerical solutions to system (4.2.3) did not produce accurate magnetic fields. In particular,
he observed errors in the location of strong shocks, which might be related to the fact that on
the discrete level
∇ × ∇ψ 6= 0,
(4.2.6)
thus leading to errors in B.
4.3
Helicity-inspired gauge
Another gauge possibility is to directly set the scalar function, ψ, to something useful. One
such choice is
ψ = u · A,
(4.3.1)
which is inspired by the magnetic helicity B · A. This yields the system
At + u1 Ax + u2 Ay + u3 Az = M A,
(4.3.2)


u1x u2x u3x
 1 2 3

M := − 
uy uy uy  .
u1z u2z u3z
(4.3.3)
with
One obvious approach for solving this equation is via operator splitting, whereby equation
(4.3.2) is split into three decoupled advection equations
At + u1 Ax + u2 Ay + u3 Az = 0,
(4.3.4)
and a ‘linear’ ordinary differential equation1
At = M A.
(4.3.5)
The main difficulty with this approach is that the matrix M in equation (4.3.5) could (and
often does) have eigenvalues that have a positive real part; thereby, causing this system to be
inherently unstable. For this reason, numerical tests, which have also previously been performed
by Rossmanith, were generally not successful.
1
This equation is linear in the sense that the velocity, u, is taken to be frozen in time at t = tn+1/2 .
29
Vector potential equations and gauge conditions
4.4
Weyl gauge
The choice that we finally settled on is the Weyl gauge
ψ = 0.
(4.4.1)
In this approach, the resulting evolution equation is simply (4.0.1) with a zero right-hand side.
This gauge is the most commonly used one in the description of constrained transport methods
(see for example [67, 96]).
As we describe in detail in section 5.2.1 of the next chapter, the resulting system is only weakly
hyperbolic. This is due to the fact that there are certain directions in which the matrix of
right-eigenvectors of the system matrix does not have full rank. This degeneracy causes some
numerical difficulties, which we were able to overcome through the creation of a modified wave
propagation scheme (as described in detail in the next chapter) as well as by switching to an
appropriate method of lines discretization (as presented in chapter 7).
30
Chapter 5
An unstaggered constrained transport
method for 3D Cartesian grids using a
splitting method
In this section we introduce our extension of the CT algorithm of Rossmanith to
three-dimensional Cartesian grids1 . All three properties mentioned in section 3.4.3 are extended
to the three-dimensional case, where we have to evolve a vector potential (instead of a scalar
equation in 2D) using the following system of evolution equations
At + (∇ × A) × u = −∇ψ,
(5.0.1)
as derived in section 3.4.3. This holds the additional challenge that (5.0.1) needs to be solved
using suitable gauge conditions for ψ. For the Weyl-gauge condition advocated in this thesis we
have to solve a weakly hyperbolic system (which is defined below). Thus the main challenges
for the extension to 3D Cartesian grids are
1. Developing a wave propagation scheme for this non-conservative weakly hyperbolic
evolution equation of the vector potential; and
2. Constructing appropriate limiters that again have the effect of limiting the magnetic
potential in such a way as to produce a non-oscillatory magnetic field.
In this chapter we start with a short introduction of the wave propagation algorithm of LeVeque
[65] in 1D, 2D and the extension of Langseth and LeVeque [59] to 3D, which will be used as part
of a building block for the new CT scheme. Moreover a modification of the wave propagation
method, introduced by Rossmanith [89], will be presented. This modification is suitable for a
second order accurate evolution of a scalar advection equation with variable coefficients. To be
able to compute the magnetic potential in order to obtain a non-oscillatory magnetic field from
it, a limiting strategy, proposed by Rossmanith for the 2D case, will be stated. Thereafter,
we introduce a CT framework in 3D, with the main focus on the new discretisation of the
evolution equation for the magnetic vector potential. This discretization consists of the 2D
discretization of Rossmanith, together with suitable splitting approaches. Additional limiting
for the weakly hyperbolic part of the system will be discussed afterwards, before finally turning
to the numerical validation of this new scheme at the end of the chapter.
1
The main results of this chapter have already been published in 2011 [51] with partial contributions of the
author.
31
An unstaggered constrained transport method for 3D Cartesian grids using a splitting method
5.1
The wave propagation method
In this section we introduce the wave propagation method in 1D, 2D and 3D, with the
modification as mentioned above.
5.1.1
The 1D wave propagation method for conservation laws
In general the method is based on solving 1D Riemann problems to construct a second order
accurate numerical update for smooth solutions to hyperbolic conservation laws. The scheme is
numerically conservative, shock-capturing and stable up to a CFL number of one. Note that the
wave propagation method has been successfully applied to many problems including combustion
and detonation waves [48], [49], relativistic hydrodynamics [4], magnetohydrodynamics in 2D
[89] and shallow water magnetohydrodynamics [87],[86]. Consider a conservation law in 1D and
the quasi-linear form of it
qt + ∂x f (q) = 0
⇔ qt + M (q)qx = 0.
For a cell Ci = [xi−1/2 , xi+1/2 ], xi+1/2 − xi−1/2 = ∆x the general form of the wave propagation
method in the first order case is
Qn+1
= Qni −
i
∆t +
(A ∆Qi−1/2 + A− ∆Qi+1/2 )
∆x
where
Qni
1
≈
∆x
ˆ
(5.1.1)
xi+1/2
q(x, tn ) dx
(5.1.2)
xi−1/2
is an approximation to the cell average at time t = tn and A± ∆Q are fluctuations that have the
∗
following relations to numerical fluxes, denoted by Fi−1/2
that are computed at each interface
(xi−1/2 and xi+1/2 ) by solving Riemann problems at the interfaces
∗
A+ ∆Qi−1/2 = Fi − Fi−1/2
(5.1.3)
∗
A− ∆Qi+1/2 = Fi+1/2
− Fi .
(5.1.4)
Here Fi = f (Qi ) denotes the flux evaluated by the cell averaged quantities. This would lead to
a finite volume method in the conservative flux difference form
Qn+1
= Qni −
i
∆t ∗
∗
(F
− Fi−1/2
).
∆x i+1/2
(5.1.5)
Finite volume methods based on Riemann problems are also known as Godunov methods [65].
5.1.2
1D linearized Riemann solvers
The fluctuations are constructed by solving locally linearized Riemann problems at each
interface xi−1/2 .
The Riemann problem in general, consists of a hyperbolic equation together with piecewise
32
5.1 The wave propagation method
constant initial data having a single jump discontinuity [65].
In our case this is defined by the system
qt + M̂i−1/2 qx = 0,
(5.1.6)
with initial data
(
Qi−1
q(x, 0) =
Qi
if x < xi−1/2
,
if x > xi−1/2
(5.1.7)
where
M̂i−1/2 ≈ ∂q f (q(xi−1/2 , t))
(5.1.8)
is an approximate flux Jacobian that is considered to be constant in the Riemann problem. In
particular we use
M̂i−1/2 = ∂q f (Q̂i−1/2 )
with
(Qi−1 + Qi )
.
(5.1.9)
2
p
We denote the eigenvalues, right eigenvectors and left eigenvectors of M̂i−1/2 by spi−1/2 , ri−1/2
p
and li−1/2
with p = 1, . . . , m, where m = 8 for the ideal MHD equations. For existence and
uniqueness results of Riemann problems in general see [37]. In the case of the ideal MHD
equations see e.g. [99]. In order to solve the Riemann problem above the flux difference is
decomposed along the eigenvectors of M̂i−1/2 2 .
Based on the eigenvectors and eigenvalues, the fluctuations A− ∆Qi−1/2 and A+ ∆Qi−1/2 can be
defined by decomposing the flux difference along the right eigenvectors into so called f-waves,
p
denoted by Zi−1/2
, with wave speeds spi−1/2 , to be
Q̂i−1/2 =
∆Fi−1/2 = (Fi − Fi−1 ) =
m
X
p
p
βi−1/2
ri−1/2
=
i=1
=
X
p
Zi−1/2
p
Zi−1/2
i=1
X
+
p
Zi−1/2
p:spi−1/2 >0
p:spi−1/2 <0
m
X
X
+
p
Zi−1/2
,
p:spi−1/2 =0
−1
where βi−1/2 = Ri−1/2
(Fi − Fi−1 ) is referred to as wave strength.
Definition 3. The fluctuations using f-waves, denoted by A± ∆Q are defined as
A+ ∆Qi−1/2 :=
X
p
Zi−1/2
+
spi−1/2 >0
A− ∆Qi−1/2 :=
X
1 X
p
Zi−1/2
2 p
(5.1.10)
1 X
p
Zi−1/2
.
2 p
(5.1.11)
si−1/2 =0
p
Zi−1/2
+
spi−1/2 <0
si−1/2 =0
It is well known that the linearized Riemann solver can fail in cases, where the exact Riemann
problem is a transonic rarefaction (see [65] for more details). In order to avoid this problem
we make use of an entropy fix similar to the one introduced by Harten and Hyman [47]. Note
that for high-order methods as introduced in chapter 6 an entropy fix based on Rusanov fluxes
yields satisfying results, see [65] for the justification of this choice.
2
See [65] for a detailed introduction of the solution to the Riemann problem in the context of the wave
propagation method.
33
An unstaggered constrained transport method for 3D Cartesian grids using a splitting method
5.1.3
High-order correction fluxes
A second order accurate version of the wave propagation method can be obtained by first
constructing a second order accurate Taylor series in time and then using the underlying
conservation law to turn time derivatives in space derivatives (this procedure is also known
as Lax-Wendroff procedure [65])
1
q(x, t + ∆t) = q(x, t) + ∆tqt (x, t) + ∆t2 qtt (x, t) + O(∆t3 )
2
1 2
= q − ∆t(fx ) + ∆t ((M fx )x ) + O(∆t3 ).
2
Here we use M = M (q) and f = f (q). After discretizing in space, the general update reads
∆t +
∆t
(A ∆Qi−1/2 + A− ∆Qi+1/2 ) −
(F̃i+1/2 − F̃i−1/2 ),
(5.1.12)
∆x
∆x
which is the first order update (5.1.1), extended by the high-resolution correction flux
m
1X
∆t p
p
p
F̃i−1/2 =
sgn(si−1/2 ) 1 −
|si−1/2 | Z̃i−1/2
,
(5.1.13)
2 p=1
∆x
Qn+1
= Qni −
i
where
p
p
p
Z̃i−1/2
= Zi−1/2
φ(θi−1/2
).
(5.1.14)
In the above expression φ is a limiter function and θp approximates the magnitude of the
solution gradient near x = xi−1/2 . Since we have already computed a wave decomposition, a
p
natural choice for θi−1/2
is to define it as the strength of the wave in upwind direction, compared
to the strength of the current wave. This can be expressed by projecting the wave in upwind
direction on the current one, using the scalar product of the waves
p
θi−1/2
=
p
p
ZI−1/2
· Zi−1/2
p
p
Zi−1/2
· Zi−1/2
(5.1.15)
with
(
i − 1 if spi−1/2 > 0
I=
i + 1 if spi−1/2 < 0.
(5.1.16)
With the aid of Hartens theorem [45] and further restrictions provided by Sweby [95] it is
possible to select functions φ(θ) that cause the wave propagation method to be TVD, while
still being second order accurate (except on extrema). Note that the Lax-Wendroff method
(φ = 1) leaves the TVD region for some value of θ. Some common choices for limiter functions
that lie in both the TVD and the more restrictive Sweby region are given by


1 if |θ| > 1 and θ > 0
Minmod : φ(θ) = θ if |θ| < 1 and θ > 0
(5.1.17)


0 if θ ≤ 0
MC : φ(θ) = max(0, min((1 + θ)/2, 2, 2θ)).
(5.1.18)
It is important to note that, because the update procedure actually depends on the solution
through the wave limiter function, the TVD wave propagation method uses a nonlinear
numerical update, even if we discretize a linear PDE. See [65], [87] for more about TVD limiter
of the wave propagation method.
34
5.1 The wave propagation method
5.1.4
The 2D wave propagation method for conservation laws
Let us now briefly introduce the extension of the wave propagation method to 2D. Consider
the two-dimensional conservation law
qt + ∂x f 1 (q) + ∂y f 2 (q) = 0,
(5.1.19)
which has the following short form
qt + ∇ · F = 0,
(5.1.20)
with F = (f 1 |f 2 ). Using the chain-rule, the system (5.1.19) can be written in quasi-linear form
qt + M 1 (q)qx + M 2 (q)qy = 0,
(5.1.21)
with M l (q) = ∂q f l , l = 1, 2 being the flux Jacobian in the x- and the y-direction, respectively.
Based on the quasi-linear form of the system (5.1.21), the Cartesian grid high-resolution wave
propagation method of LeVeque [65] can be written in the form
∆t
∆t
−
−
A+
A+
1 ∆Qi−1/2,j + A1 ∆Qi+1/2,j −
2 ∆Qi,j−1/2 + A2 ∆Qi,j+1/2
∆x
∆y
∆t ∆t 1
1
2
2
F̃i+1/2,j − F̃i−1/2,j
−
F̃i,j+1/2
− F̃i,j−1/2
.
(5.1.22)
−
∆x
∆y
n
Qn+1
i,j = Qi,j −
Here Qni,j denotes a cell average of the solution q in cell Ci,j of a Cartesian grid at time level
tn , the fluctuations are direct generalizations of the 1D case. E.g.
A+
1 ∆Qi−1/2,j :=
X
p
Zi−1/2,j
+
spi−1/2,j >0
A−
1 ∆Qi−1/2,j :=
X
1 X
p
Zi−1/2,j
2 p
(5.1.23)
1
2
(5.1.24)
si−1/2 =0
p
Zi−1/2,j
+
spi−1/2,j <0
X
p
Zi−1/2,j
.
spi−1/2,j =0
High-resolution correction fluxes in the x-direction have the form
m
1X
∆t p
p
p
1
F̃i−1/2,j =
sgn(si−1/2,j ) 1 −
|si−1/2,j | Z̃i−1/2,j
.
2 p=1
∆x
(5.1.25)
Like in 1D, Z̃i−1/2,j , is a limited f-wave to obtain a non-oscillatory update of the cell averages.
2
The same can be defined in y-direction, to obtain A±
2 ∆Qi,j−1/2 as well as F̃i,j−1/2 .
Consider the following Taylor series expansion of the true solution in time, at t = tn together
with the underlying PDE (5.1.19) respectively (5.1.21) to replace time derivatives with space
derivatives
1
q(tn + ∆t, x) = q + ∆tqt + ∆t2 qtt + O(∆t3 )
2
1
= q − ∆t(fx + fy2 )
1 2
+
∆t [(M 1 fx1 )x + (M 2 fy2 )y
2
+ (M 1 fy )x + (M 2 fx )y ] + O(∆t3 ).
|
{z
}
transverse terms
35
(5.1.26)
An unstaggered constrained transport method for 3D Cartesian grids using a splitting method
Figure 5.1: Picture of the transverse fluctuations. Taken from [87].
If we compare this Taylor expansion with the discretization (5.1.22) (without limiters), then
we would be able to approximate all terms of the Taylor series (5.1.26) to second order on
smooth solutions, except the ones marked as transverse terms, which are truly multidimensional.
We use transverse Riemann solvers to approximate the transverse terms to obtain a truly
multidimensional one-step method, which is second order accurate on smooth solutions. This
method is in particular suitable to give high-resolution on discontinuous solution structures, if
limiters are applied to the correction fluxes in x-, y-direction, respectively. This can be done in
an analogous way as in the 1D case.
5.1.5
Transverse Riemann solvers
The description of this subsection is mostly taken from [87] and is generally based in [65]. The
normal Riemann solver in say the x-direction, produces left- and right-going fluctuations at
cell interface (xi−1/2 , yj ). Although these fluctuations travel into cell (xi−1 , yj ) and (xi , yj ), the
surrounding cells (xi−1 , yj−1 ), (xi−1 , yj+1 ), (xi , yj−1 ) and (xi , yj+1 ) should also be modified in a
multidimensional problem. To compute how these cells are affected, let us first define left- and
right going fluctuations to which high-resolution corrections have been added
∗
A±
1 ∆Qi−1/2,j
=
A±
1 ∆Qi−1/2,j
∓
m
X
sign(spi−1/2,j )
p=1
∆t p
p
|si−1/2,j | Z̃i−1/2,j
.
1−
∆x
Now, we have to determine how much of each fluctuation travels up and how much travels
down for the update of the corresponding cells. This can be done by decomposing the left- and
right fluctuations using the flux Jacobian in the other coordinate direction
− ±
∗
∗
+ ±
∗
A±
1 ∆Qi−1/2,j = A2 A1 ∆Qi−1/2,j + A2 A1 ∆Qi−1/2,j .
(5.1.27)
±
∗
Therefore, A+
2 A1 ∆Qi−1/2,j tells us how much of the left and right going fluctuation is up-going
±
∗
and A−
2 A1 ∆Qi−1/2,j tells us how much is down-going. This decomposition again requires
us to compute eigenvalues, eigenvectors and fluctuations that is why we will refer to this
decomposition as transverse Riemann solution. An illustration of the multidimensional update
36
5.1 The wave propagation method
process is shown in Figure 5.1. Once the transverse Riemann problems have been solved, the
correction fluxes in the update (5.1.22) are modified as follows
∆t + +
A A ∆Q∗i−1/2,j
2∆x 2 1
∆t − +
2
= F̃i,j−1/2
−
A A ∆Q∗i−1/2,j
2∆x 2 1
∆t + −
2
A A ∆Q∗i−1/2,j
= F̃i−1,j+1/2
−
2∆x 2 1
∆t − −
2
= F̃i−1,j−1/2
−
A A ∆Q∗i−1/2,j .
2∆x 2 1
2
2
F̃i,j+1/2
= F̃i,j+1/2
−
(5.1.28)
2
F̃i,j−1/2
(5.1.29)
2
F̃i−1,j+1/2
2
F̃i−1,j−1/2
(5.1.30)
(5.1.31)
The same procedure is carried out to compute how much of the up- and down-going fluctuations
1
are modified in a completely
travel left and right. After this is done, the correction fluxes F̃i−1/2,j
analogous fashion in the other coordinate direction. This final modification to the correction
fluxes provide us with the full wave propagation method in two space dimensions to second order
of accuracy on smooth solutions and high-resolution on discontinuous solutions. Furthermore
the incorporation of the transverse fluctuations into the correction fluxes not only improves
accuracy, but also the stability of the numerical method, which enables the method to be
stable for CFL numbers up to 1 (for linear systems), see [65].
Theorem 2. [87], [65], [64] The wave propagation method as described above is an
O(∆x2 , ∆y 2 , ∆t2 ) approximation to the exact solution of the system (5.1.19) in the domain
(x, y, t) ∈ Γ provided the following conditions are satisfied
1. Equation (5.1.19) is hyperbolic
2. q(x, y, t) ∈ C 1 and F(q, (x, y)) ∈ C 1 for all (x, y, t) ∈ Γ.
3. The linearized Jacobian is a consistent approximation to the flux Jacobian M = ∂q F.
The proof consists of comparing the discretization with the Taylor expansion (5.1.26). All
terms, except the ones marked with “transverse terms” can be approximated to second order of
accuracy using the one dimensional wave propagation method in x- and y-direction, respectively
[65], [5]. The transverse corrections incorporated into the correction fluxes, by transverse
Riemann solvers, approximate the remaining transverse terms [64].
Theorem 3. [87], [65] The wave propagation method as described above is stable for Courant
numbers up to 1 (for linear constant coefficient conservation laws). The Courant number is
defined as
CF L = max(λ∗1 ∆t/∆x, λ∗2 ∆t/∆y)
λ∗1 = max(|spi−1/2,j |)
(5.1.32)
(5.1.33)
= max(|spi,j−1/2 |)
(5.1.34)
i,j,p
λ∗2
i,j,p
(5.1.35)
where λ∗1 and λ∗2 are maximum wave speeds in the x−, respectively y−direction.
This theorem has been validated in [63] using von Neumann stability analysis. In [87] it is argued
that in practice, this algorithm also works for variable coefficient and nonlinear conservation
laws.
37
An unstaggered constrained transport method for 3D Cartesian grids using a splitting method
5.1.6
A modified 2D wave propagation method for linear
non-conservative equations
In this section we are concerned with a second order accurate extension of the wave propagation
algorithm for a non-conservative linear equation with variable coefficients. Consider the scalar
non-conservative linear advection equation
qt + u1 (x, y)qx + u2 (x, y)qy = 0.
(5.1.36)
A straight-forward extension of the wave propagation algorithm as presented in [65], only leads
to a formally first order accurate approximation of the equation (5.1.36), as noted in [65].
We now briefly state the modified version of the wave propagation algorithm as presented by
Rossmanith in [89], which yields a second order accurate scheme for (5.1.36); this version is
also used in our computations below. The general scheme can be written in the following form
∆t −
(A ∆Qi+1/2,j + A+
1 ∆Qi−1/2,j )
∆x 1
∆t −
−
(A ∆Qi,j+1/2 + A+
2 ∆Qi,j−1/2 )
∆y 2
∆t 2−
∆t 1−
1+
2+
(F̃i+1/2,j − F̃i−1/2,j
)−
(F̃i,j+1/2 − F̃i,j−1/2
).
−
∆x
∆y
n
Qn+1
i,j = Qi,j −
(5.1.37)
The fluctuations can be defined in the same way as in section 5.1.4. The difference to the wave
propagation form as presented in [65] are the correction fluxes. Here two distinct correction
1−
1+
1−
fluxes are defined for each interface, namely F̃i+1/2,j
and F̃i+1/2,j
, where F̃i+1/2,j
is associated
1+
with the solution in cell Ci,j and F̃i+1/2,j with the solution in Ci+1,j . We can summarize the
discretization in the following way
−
A−
1 ∆Qi−1/2,j = (si−1,j ) Wi−1/2,j ,
+
A+
1 ∆Qi−1/2,j = (si,j ) Wi−1/2,j ,
(5.1.38)
(5.1.39)
with si,j = u1i,j and
(
s if s < 0,
(s)− =
,
0 otherwise,
(
s if s > 0,
(s)+ =
0 otherwise,
si−1/2,j = (u1 )i−1/2,j
Wi−1/2,j = (Qi,j − Qi−1,j ).
(5.1.40)
(5.1.41)
(5.1.42)
The high-resolution correction fluxes are given by
1−
F̃i−1/2,j
1+
F̃i−1/2,j
1
∆t si−1/2,j
|si−1,j | 1 −
si−1,j Wi−1/2,j ,
=
2
∆x |si−1,j |
1
∆t si−1/2,j
=
|si,j | 1 −
si,j Wi−1/2,j ,
2
∆x |si,j |
38
(5.1.43)
(5.1.44)
5.1 The wave propagation method
s
+s
where si−1/2,j = i,j 2 i−1,j . To achieve full second order of accuracy in 2D, multidimensional
(transverse) corrections need to be included and can be written in the form
1 ∆t 1 + +
1−
1−
(u )i (u2 ∆Q − 2F̃ 2+ )i,j−1/2
F̃i+1/2,j = F̃i+1/2,j −
2 ∆y
+
2+
+ (u1 )−
)i+1,j−1/2
i (u2 ∆Q − 2F̃
−
2−
+ (u1 )+
)i,j+1/2
i (u2 ∆Q + 2F̃
2−
−
∆Q
+
2
F̃
)
+ (u1 )−
(u
i+1,j+1/2 .
2
i
(5.1.45)
The second order consistency proof for this discretization can be found in [89].
TVD limiting with respect to the derivative
Using the CT method of Rossmanith, the magnetic field will be computed as the curl of the
magnetic potential B = ∇ × A, which can be done using a discrete curl operator taking central
finite differences for a second order accurate approximation. To guarantee that the magnetic
field (computed by the derivatives of the magnetic potential) will be non-oscillatory across
discontinuities we need to ensure that the central difference approximation of the derivatives
are TV-stable. Rossmanith [89] accomplished this with a modified limiting strategy for the
wave propagation algorithm used for the evolution of the magnetic potential. To understand
the difference of the modified limiters in comparison to the limiters discussed in section 5.1.3,
note that the limiters of section 5.1.3 are applied to waves, which can be interpreted as limiters
applied an approximation of slopes (first derivatives). The main idea of this new limiting
strategy is to apply limiters to wave differences, which may be interpreted as limiting applied
to the approximation of the second derivatives.
These modified limiters are also applied to the correction fluxes
1
∆t si−1/2,j
1−
|si−1,j | 1 −
si−1,j Wi−1/2,j φi−1/2,j
(5.1.46)
F̃i−1/2,j =
2
∆x |si−1,j |
1
∆t si−1/2,j
1+
F̃i−1/2,j =
|si,j | 1 −
si,j Wi−1/2,j φi−1/2,j
(5.1.47)
2
∆x |si,j |
WI−1/2,j · Wi−1/2,j
φi−1/2,j = φ
,
(5.1.48)
Wi−1/2,j · Wi−1/2,j
where φ and I are defined as in section 5.1.3. Using these limiters the theorem below can be
proved. Before, we state the theorem, we define the total variation (TV) of a grid function and
the total varaition diminishing (TVD) property of a method.
Definition 4. [65] We define the total variation of a grid function Q to be
T V (Q) = kQkT V =
∞
X
|Qi − Qi−1 |.
i=−∞
Definition 5. [65] A two-level method is called total variation diminishing (TVD), if for
any set of data Qn , the values Qn+1 computed by the method satisfy
k(Qn+1 )kT V ≤ k(Qn )kT V .
39
An unstaggered constrained transport method for 3D Cartesian grids using a splitting method
Theorem 4. [89] The wave propagation method with the wave-difference limiting procedure
outlined above when applied to the advection equation,
qt + q x = 0
has the following properties
1. The total variation of the cell-edge derivative,
n
=
Bi+1/2
Qni+1 − Qni
,
∆x
is nonincreasing in time:
TV
n+1
(Bi+1/2
)
=
∞
X
n+1
n+1
0
n
).
) ≤ . . . ≤ T V (Bi+1/2
|Bi+1/2
− Bi−1/2
| ≤ T V (Bi+1/2
i=−∞
2. The total variation of the cell-centered derivative
Qn − Qni−1
1 n
n
+ Bi−1/2
) = i+1
Bin = (Bi+1/2
2
2∆x
is bounded by the total variation of the initial cell-edge derivative
TV
(Bin+1 )
:=
∞
X
n+1
0
|Bi+1
− Bin+1 | ≤ T V (Bi+1/2
).
i=−∞
See [89] for the proof of this theorem and a numerical example in 1D, which will be reproduced
in section 6.1.6, in order to test a new limiting strategy.
5.1.7
A 3D wave propagation method for conservation laws
In order to discretize the MHD equations in 3D we briefly introduce the wave propagation
algorithm of Langseth and LeVeque [59] for 3D Cartesian grids
qt + ∇ · F = 0
(5.1.49)
with F = (f 1 |f 2 |f 3 ), which can be written in quasi-linear form
qt + M 1 (q)qx + M 2 (q)qy + M 3 (q)qy = 0.
(5.1.50)
with M l (q) = M l = ∂q f l , l = 1, 2, 3 being the flux Jacobian in x-, y- and z- direction.
In an analogous fashion like in section 5.1.4 we can write a one step discretization on Cartesian
grids as
∆t
∆t
−
−
A+
A+
1 ∆Qi−1/2,j,k + A1 ∆Qi+1/2,j,k −
2 ∆Qi,j−1/2,k + A2 ∆Qi,j+1/2,k
∆x
∆y
∆t
∆t 1
−
1
−
A+
∆Q
+
A
∆Q
−
F̃
−
F̃
i,j,k−1/2
i,j,k+1/2
3
3
i−1/2,j,k
∆z
∆x i+1/2,j,k
∆t
∆t
2
2
3
3
−
F̃i,j+1/2,k
− F̃i,j−1/2,k
−
F̃i,j,k+1/2
− F̃i,j,k−1/2
.
(5.1.51)
∆y
∆z
n
Qn+1
i,j,k = Qi,j,k −
40
5.2 An unstaggered constrained transport framework in 3D
Comparing the discretization with a Taylor expansion in time for the 3D system (5.1.50) yields
1
q(tn + ∆t, x) = q + ∆tqt + ∆t2 qtt + O(∆t3 )
2
= q − ∆t(fx1 + fy2 + fz3 )
1 2
+
∆t [(M 1 fx1 )x + (M 2 fy2 )y + (M 3 fz3 )z
2
+ (M 1 fy2 )x + (M 1 fz3 )x + (M 2 fx1 )y + (M 2 fz3 )y + (M 3 fx1 )z + (M 3 fy2 )z ]
|
{z
}
transverse terms
3
+ O(∆t ).
(5.1.52)
The cross derivatives (transverse terms) are approximated using transverse Riemann solvers in
the desired directions, see [65] or section 5.1.4.
It was found that, in order to increase stability for a CFL number up to 1 (for linear systems),
one needs to consider purely three-dimensional contributions using double transverse Riemann
solvers, see [59] for more details.
5.2
An unstaggered constrained transport framework in
3D
The constrained transport framework is based on using the magnetic vector potential, A :
R+ × R3 → R3 , whose curl yields the magnetic field
B = ∇ × A.
(5.2.1)
A key feature of the proposed method is that the magnetic vector potential is updated alongside
the conserved variables: q = (ρ, ρu, E, B)T . We give an outline of our method that lists all of
the key steps necessary to completely advance the solution from its current state at time t = tn
to its new state at time t = tn+1 = tn + ∆t
Step 0 Start with the current state:
(ρn , ρun , E n , Bn , An ).
Step 1 Update MHD variables via a standard finite volume scheme
(ρn , ρun , E n , Bn )
=⇒
Step 2 Define the time-averaged velocity:
ρn+1 , ρun+1 , E ∗ , B∗ .
un+1/2 = 21 (un + un+1 ).
Step 3 Using the above calculated velocity, un+1/2 , solve the magnetic potential version
of the induction equation
At + (∇ × A) × un+1/2 = −∇ψ.
This updates the vector potential: An
=⇒
41
An+1 .
An unstaggered constrained transport method for 3D Cartesian grids using a splitting method
Step 4 Compute the new magnetic field from the curl of the vector potential (B = ∇×A)
n+1
n+1
B 1 ijk
B2
n+1
B3
n+1
ijk
ijk
n+1
n+1
n+1
[A3 ]i j+1 k − [A3 ]i j−1 k [A2 ]i j k+1 − [A2 ]i j k−1
−
,
=
2∆y
2∆z
n+1
n+1
n+1
n+1
[A1 ]i j k+1 − [A1 ]i j k−1 [A3 ]i+1 j k − [A3 ]i−1 j k
=
−
,
2∆z
2∆x
n+1
n+1
n+1
n+1
[A2 ]i+1 j k − [A2 ]i−1 j k [A1 ]i j+1 k − [A1 ]i j−1 k
=
−
,
2∆x
2∆y
(5.2.2)
(5.2.3)
(5.2.4)
Step 5 Set the new total energy density value based on one of the following options3
Option 1: Conserve total energy
E n+1 = E ∗ .
Option 2: Keep the pressure the same before and after the constrained transport
step (this sometimes helps in preventing the pressure from becoming negative,
although it sacrifices energy conservation)
E n+1 = E ∗ +
1
kBn+1 k2 − kB∗ k2 .
2
The above described algorithm guarantees that at each time step, the following discrete
divergence is identically zero
n+1
[∇ ·
B]n+1
ijk
n+1
n+1
n+1
[B 1 ]i+1 j k − [B 1 ]i−1 j k [B 2 ]i j+1 k − [B 2 ]i j−1 k
+
=
2∆x
2∆y
3 n+1
3 n+1
[B ]i j k+1 − [B ]i j k−1
+
= 0.
2∆z
(5.2.5)
The details corresponding to the discretization for the evolution equation of the magnetic vector
potential are described in the next sub-sections.
5.2.1
The evolution of the magnetic vector potential
We now describe a numerical method for the evolution equation of the magnetic vector potential
using the Weyl gauge, i.e., for the discretization of (4.0.1) with zero right hand side. The
equation can be written in the form
At + N1 (u) Ax + N2 (u) Ay + N3 (u) Az = 0,
(5.2.6)
with


 2

 3

0 −u2 −u3
u
0 0
u
0 0
0  , N2 = −u1 0 −u3  , N3 =  0
u3 0 .
N1 = 0 u1
1
2
1
0 0
u
0 0 u
−u −u2 0
(5.2.7)
Here u1 , u2 , u3 ∈ R, denotes the components of the fluid velocity field u. This evolution equation
is only weakly hyperbolic.
3
In this thesis we always choose Option 1 in order to exactly conserve energy.
42
5.2 An unstaggered constrained transport framework in 3D
Weak hyperbolicity
In section 2.2 we already defined a strictly and a non-strictly hyperbolic system. Let us now
extend these definitions with the definition of weak hyperbolicity, in 3D.
Definition 6. (Weak hyperbolicity) The quasi-linear system
qt + M 1 (q)qx + M 2 (q)qy + M 3 (q)qz = 0
(5.2.8)
is weakly hyperbolic if the matrix
M (n, q) = n1 M 1 (q) + n2 M 2 (q) + n3 M 3 (q)
(5.2.9)
has real eigenvalues for all knk = 1, n ∈ R3 , but is not necessarily diagonalizable. In other
words, the pth eigenvalue of M (n, q) is real but may have an algebraic multiplicity larger than
its geometric multiplicity.
Now we can show that (5.2.6) is only weakly hyperbolic. Consider the system matrices (5.2.7)
of system (5.2.6) in an arbitrary direction n with knk = 1.

 2 2
n u + n3 u 3
−n1 u2
−n1 u3
n1 u1 + n3 u3
−n2 u3  .
(5.2.10)
n1 N1 + n2 N2 + n3 N3 =  −n2 u1
3 1
3 2
1 1
−n u
−n u
n u + n2 u 2
The eigenvalues of this system are
λ = 0, n · u, n · u ;
(5.2.11)
and therefore, we always have real eigenvalues. The eigenvectors can be written in the following
form

"
# n1
n2 u3 − n3 u2
u1 (u · n) − n1 kuk2
R = r(1) r(2) r(3) = n2
n3
n3 u1 − n1 u3
n1 u2 − n2 u1
u2 (u · n) − n2 kuk2  .
u3 (u · n) − n3 kuk2
(5.2.12)
Assuming that kuk =
6 0 and knk = 1, the determinant of the matrix R can be written as
det(R) = −kuk3 cos(α) sin2 (α),
(5.2.13)
where α is the angle between the vectors n and u. The difficulty is that for any non-zero
velocity vector, u, one can always find four directions, α = 0, π/2, π, and 3π/2, such that
det(R) = 0. In other words, for every kuk =
6 0 there exists four degenerate directions in which
the eigenvectors are incomplete. Therefore, system (5.2.6)–(5.2.7) is only weakly hyperbolic.
Note that in the case u = 0, there is no motion at all, since N1 , N2 , N3 are all zero and thus
this case is not of interest.
An example: the difficulty with weakly hyperbolic systems
We illustrate the main difference between strictly hyperbolic and weakly hyperbolic systems
with the following simple example. Let
u
−ε 1 u
+
= 0,
(5.2.14)
v t
0 ε v x
43
An unstaggered constrained transport method for 3D Cartesian grids using a splitting method
where ε ∈ R is a constant. The eigen-decomposition of the flux Jacobian can be written as
follows
1 2ε −1
−ε 1
1 1
−ε 0
−1
= RΛR =
·
·
.
(5.2.15)
0 ε
0 2ε
0 ε 2ε 0 1
Since the eigenvalues are always real, this system is hyperbolic. For all ε 6= 0, the system is
strictly hyperbolic, and for ε = 0 the system is weakly hyperbolic. Since we have the exact
eigen-decomposition, we can write down the exact solution for the Cauchy problem for all ε
1
u
v0 (x + εt) − v0 (x − εt)
u0 (x + εt) − 2ε
.
(5.2.16)
=
v
v0 (x − εt)
In the weakly hyperbolic limit we obtain
u
u0 (x) − t v00 (x)
lim
=
.
v0 (x)
ε→0 v
(5.2.17)
The change in dynamics between the strictly and weakly hyperbolic regimes is quite dramatic:
in the strictly hyperbolic case the total energy is conserved, while in the weakly hyperbolic case
the amplitude of the solution grows linearly in time.
For further discussions about weakly hyperbolic systems and a possible unsplit spatial
discretization, see section 7.3.1.
Strang splitting
We briefly introduce the general concept of Strang splitting, which is frequently used in different
contexts, like the operator splitting approach below. In 1968, G. Strang proposed the “Strang
splitting” [65, 87]. The basic idea behind this sort of splitting is to split an equation or a system
of equations into simpler pieces. Consider an equation of the general form
qt = L1 (q) + L2 (q) + L3 (q).
(5.2.18)
We can split this system for example into three sub problems of the following form
qt = L1 (q),
(5.2.19)
qt = L2 (q),
(5.2.20)
qt = L3 (q).
(5.2.21)
Now we want to solve these sub-problems in such a way that it accurately approximates the
solution of the original equation (5.2.18). If (5.2.19) - (5.2.21) are solved to second order, then
to obtain a second order method for the full problem (5.2.18) one can apply the following
update
∆t/2
Step 1:
(half time step with L1 ) Q∗ = L1
Step 2:
Step 3:
(half time step with L2 ) Q∗∗ = L2 (Q∗ )
∗∗
(full time step with L3 ) Q∗∗∗ = L∆t
3 (Q )
Step 4:
(half time step with L2 ) Q∗∗∗∗ = L2
Step 5:
(half time step with L1 ) Qn+1 = L1
(Qn )
∆t/2
∆t/2
∆t/2
44
(Q∗∗∗ )
(Q∗∗∗∗ ).
5.2 An unstaggered constrained transport framework in 3D
Here each sub-step needs to be solved for the desired step (half or full time step) using a
method of appropriate order of accuracy. With a Taylor series expansion one can show that
the prescribed approximation order, of the resulting update, can be reached. The final update
can be written as
∆t/2
Qn+1 = L1
∆t/2
L2
∆t/2
L∆t
3 L2
∆t/2
L1
Qn .
(5.2.22)
It should be noted that in general, even if (5.2.19) - (5.2.21) are solved exactly, there is an
O(∆t2 ) operator splitting error [65]. The Strang splitting works well for a wide range of
problems and will be employed in our first approach to obtain a 3D CT method for the MHD
equations.
An operator split approach for the evolution of the magnetic potential
In the case of the magnetic vector potential equation (5.2.6)–(5.2.7), the weak hyperbolicity
is only an artifact of how we are evolving the magnetic potential. One should remember that
the underlying equations (i.e., the ideal MHD system) are in fact hyperbolic. One way to
understand all of this is to remember that the true velocity field, u, depends on the magnetic
potential in a nonlinear way. That is, even though there might be instantaneous growth in
the vector potential due to the weak hyperbolicity in the potential equation, this growth will
immediately change the velocity field in such a way that the overall system remains hyperbolic.
Numerically, however, we must construct a modified finite volume method that can handle this
short-lived weak hyperbolicity. Through some experimentation with various ideas, we found
that simple operator splitting techniques lead to robust numerical methods. In particular, we
found that there are two obvious ways to split system (4.0.1) into sub-problems.
A first splitting
The first possibility is based on a decomposition of the form
Sub-problem 1:
A1t + u2 A1y + u3 A1z = 0,
A2t − u1 A1y = 0,
A3t − u1 A1z = 0,
Sub-problem 2:
Sub-problem 3:
A1t − u2 A2x = 0,
A2t + u1 A2x + u3 A2z = 0,
A3t − u2 A2z = 0,
A1t − u3 A3x = 0,
A2t − u3 A3y = 0,
(5.2.23)
(5.2.24)
(5.2.25)
A3t + u1 A3y + u2 A3x = 0.
First, consider Sub-problem 1.
The first equation can be approximated using the
two-dimensional method described in section 3.4.3, together with the discretizations introduced
in section 5.1.4. Once the quantity A1 is updated, central finite difference approximations can
be used to update A2 and A3 . We denote the numerical solution operator for Sub-problem 1,
45
An unstaggered constrained transport method for 3D Cartesian grids using a splitting method
2 and 3 by L1 , L2 and L3 , respectively. Then a Strang-type operator splitting method can be
written in the form
∆t/2
An+1 = L1
∆t/2
L2
∆t/2
L∆t
3 L2
∆t/2
L1
An .
(5.2.26)
Discretization of Sub-problem 1
Let us now explain the spatial discretization of Sub-problem 1 on one particular (sub) time
step in the Strang splitting, denoted by ∆τ = τ n+1 − τ n . Note that this time step may differ
from the total time step ∆t. The other Sub-problems may be treated analogously. We start
with solving the 2D problem
A1t + u2 A1y + u3 A1z = 0,
(5.2.27)
with the modified wave propagation method of Rossmanith, introduced in section 5.1.6
(including the limiting with respect to the derivative). In this splitting we refer to the numerical
solution of (5.2.27), as hyperbolic solve. The updates of A2 and A3
A2t − u1 A1y = 0,
(5.2.28)
A3t
(5.2.29)
1
−u
A1z
= 0,
are discretized using the centered finite difference operators in the y- and the z-direction applied
to A1
n
n
[A1 ]ij+1k − [A1 ]ij−1k
:=
,
2∆y
n
n
[A1 ]ijk+1 − [A1 ]ijk−1
1 n
Dz A ijk :=
,
2∆z
n
Dy A1 ijk
n+ 1
(5.2.30)
(5.2.31)
1
together with a time averaged velocity field [u1 ]i,j,k2 ≈ u1 (τ n+ 2 ), using an arithmetic average of
the velocity fields at the two time levels τ n and τ n+1 .
The update reads
2 n+1 2 n
∆τ
A ijk = A ijk +
2
3 n+1 3 n
∆τ
A ijk = A ijk +
2
1 n+ 12 1 n
1 n+1 u ijk Dy A ijk + Dy A ijk
(5.2.32)
1 n+ 12 1 n
1 n+1 u ijk Dz A ijk + Dz A ijk
.
(5.2.33)
and
We refer to the numerical solutions of (5.2.32), (5.2.33), as weakly hyperbolic solve.
Sub-problems 2 and 3 can be handled analogously. Note that this splitting consists of splittings
with respect to different planes, Sub-problem 1 is a discretization with partial derivatives in
the y- and the z-direction, Sub-problem 2 in the x- and the z-direction and Sub-problem 3 in
the x- and the y-direction.
46
5.2 An unstaggered constrained transport framework in 3D
A second splitting
A second approach to split (5.2.6) is based on dimensional splitting, i.e., we consecutively solve
the problems in x-, y- and z-direction
Sub-problem 1:
Sub-problem 2:
A1t − u2 A2x − u3 A3x = 0,
A2t + u1 A2x = 0,
A3t + u1 A3x = 0,
A1t + u2 A1y = 0,
A2t − u1 A1y − u3 A3y = 0,
A3t + u2 A3y = 0,
Sub-problem 3:
(5.2.34)
A1t + u3 A1z = 0,
A2t + u3 A2z = 0,
A3t − u1 A1z − u2 A2z = 0.
(5.2.35)
(5.2.36)
We now present a numerical method that is based on this second splitting.
Discretization of Sub-problem 1
The evolution of A2 and A3 is described by two decoupled scalar transport equations, which
have the form
1
A2t + u1 (τ n+ 2 , x) A2x = 0,
A3t + u1 (τ
n+ 21
(5.2.37)
, x) A3x = 0.
(5.2.38)
We assume that cell average values of A2 and A3 are given at time τ n and we wish to approximate
A2 and A3 at time τ n+1 . In our application, cell centered values of the advection speed u1 are
given at the intermediate time level (see Step 2 of the algorithm from 5.2). The update for
all i, j, k and ` ∈ {2, 3} can be obtained by a one dimensional version of the modified wave
propagation method of section 5.1.6, with the limiting strategy, as presented in 5.1.6.
The update in this one dimensional version has the form
i
` n+1 ` n
∆τ h −
A ijk = A ijk −
A ∆A`i+ 1 j k + A+ ∆A`i− 1 j k
2
2
∆x
i
∆τ h `−
`+
−
F̃ 1 − F̃i−
,
1
jk
2
∆x i+ 2 j k
(5.2.39)
with
` n
` n
`
Wi−
A
A i−1 j k ,
:=
−
1
jk
ijk
(5.2.40)
2
`
A− ∆A`i− 1 j k := min(u1i−1 j k , 0) Wi−
,
1
jk
(5.2.41)
`
A+ ∆A`i− 1 j k := max(u1i j k , 0) Wi−
,
1
jk
(5.2.42)
2
2
2
2
47
An unstaggered constrained transport method for 3D Cartesian grids using a splitting method
and
!
`−
F̃i+
1
jk
1
1 1
∆τ ui+ 12 j k 1
u
:= |uijk | 1 −
2
∆x |u1ijk | ijk
!
`+
F̃i−
1
jk
1
1 1
∆τ ui− 12 j k 1
u
:= |uijk | 1 −
2
∆x |u1ijk | ijk
2
2
`
`
Wi+
φ
θ
1
ijk ,
jk
(5.2.43)
`
`
Wi−
φ θijk
.
1
jk
(5.2.44)
2
2
Here u1ijk is a cell centered value and u1i− 1 jk = 12 (u1i−1jk + u1ijk ) is a face centered value. Once
2
we have updated A2 and A3 , we update A1 by discretizing the equation
A1t − u2 A2x − u3 A3x = 0.
For this we use a finite difference method of the form
1 n+1 1 n
n+1 ∆τ 2 n+ 21 2 n
u ijk Dx A ijk + Dx A2 ijk
A ijk = A ijk +
2
3 n+1 3 n+ 21 3 n
,
+ u ijk Dx A ijk + Dx A ijk
(5.2.45)
(5.2.46)
where Dx is the standard centered finite difference operator in the x-direction, defined in an
analogous way as above. We refer to the numerical solution of (5.2.37) and (5.2.38) as hyperbolic
solves and the numerical solution of equation (5.2.45) as the weakly hyperbolic solve.
5.2.2
Additional limiting in the weakly hyperbolic solve
For the spatially two-dimensional case, the limiting of wave-differences eliminates unphysical
oscillations in the magnetic field. In the three-dimensional case, the equation for the magnetic
potential is more challenging and only weakly hyperbolic. The wave-difference limiting strategy
as outlined in section 5.1.6 is generally insufficient in controlling unphysical oscillations in the
magnetic field variables, in this combination of hyperbolic and weakly hyperbolic solves. In
particular, the step that produces unphysical oscillations is the weakly hyperbolic solve. Since
this part of the update is quite different from standard upwind numerical methods for hyperbolic
equations, there is no obvious place to introduce wave-difference limiters. This complex update
can introduce some oscillations in the magnetic potential and ultimately in the magnetic field.
In fact we have observed some oscillations in the magnetic field for the violent cloud-shock
interaction problem discussed in section 5.3.2.
We describe in this section an approach based on adding artificial diffusion to this part of the
update in order to remove these unphysical oscillations.
We introduce a diffusive limiter which is inspired by the artificial viscosity method that is often
used in other numerical schemes such as the discontinuous Galerkin approach [79]. Note that
the diffusive limiting approach will be discussed in more detail in the context of a high-order
discretization for the evolution equation of the magnetic potential in section 6.1.6.
The additional diffusion can be interpreted as a change of the equations belonging to the weakly
hyperbolic solve.
In the first splitting, instead of discretizing (5.2.32), (5.2.33) (for the first sub-problem), we
discretize the problem with an added dissipative term
A2t − u1 A1y = ε2 A2yy ,
(5.2.47)
A3t
(5.2.48)
1
−u
A1z
= ε
48
3
A3zz .
5.2 An unstaggered constrained transport framework in 3D
In the second splitting we discretize
A1t − u2 A2x − u3 A3x = ε1 A1xx ,
(5.2.49)
instead of (5.2.45). The parameters ε1 , ε2 , ε3 depend on the solution structure and controls the
amount of artificial diffusion. We choose
ε
1
ε2
ε3
1
= 2ν α
1 ∆x
2
,
∆t
∆y 2
= 2ν 2 α2
,
∆t
∆z 2
= 2ν 3 α3
,
∆t
(5.2.50)
(5.2.51)
(5.2.52)
where ν l for l = 1, 2, 3 is a positive constant that will be discussed below, αl is a smoothness
indicator that is close to zero in smooth regions and close to 0.5 near discontinuities. We add
this additional diffusion term to each weakly hyperbolic equation in our first splitting, to be
Sub-problem 1:
A1t + u2 A1y + u3 A1z = 0,
A2t − u1 A1y = ε2 A2yy ,
A3t − u1 A1z = ε3 A3zz ,
Sub-problem 2:
Sub-problem 3:
A1t − u2 A2x = ε1 A1xx ,
A2t + u1 A2x + u3 A2z = 0,
A3t − u2 A2z = ε3 A3zz ,
A1t − u3 A3x = ε1 A1xx ,
A2t − u3 A3y = ε2 A2yy ,
A3t
1
+u
A3y
2
+u
A3x
(5.2.53)
(5.2.54)
(5.2.55)
= 0.
The dimensionally split algorithm (second splitting) reads
Sub-problem 1:
Sub-problem 2:
A1t − u2 A2x − u3 A3x = ε1 A1xx ,
A2t + u1 A2x = 0,
A3t + u1 A3x = 0,
A1t + u2 A1y = 0,
A2t − u1 A1y − u3 A3y = ε2 A2yy ,
A3t + u2 A3y = 0,
Sub-problem 3:
(5.2.56)
A1t + u3 A1z = 0,
A2t + u3 A2z = 0,
A3t − u1 A1z − u2 A2z = ε3 A3zz .
(5.2.57)
(5.2.58)
Consider the discretization used in sub-problem (5.2.56) as an example (the other discretizations
49
An unstaggered constrained transport method for 3D Cartesian grids using a splitting method
are treated analogously, with respect to the desired directions). The numerical update in the
weakly hyperbolic solve can be written as
1 n+1 1 ∗
1 n
1 n ∆τ
1 n
να A i−1jk − 2 A ijk + A i+1jk ,
A ijk = A ijk + 2
∆t
(5.2.59)
∗
where [A1 ]ijk is given from update (5.2.46). Stability requires that
0≤2
1
∆τ
να ≤ ,
∆t
2
(5.2.60)
which can be achieved if we assume that ∆τ ≤ ∆t and we take
0≤α≤
1
2
1
0≤ν≤ .
2
and
(5.2.61)
In our proposed method, α is a smoothness indicator and ν is a user-defined parameter (typically
ν 1) that can be tuned to control the amount of numerical dissipation across discontinuities
in the magnetic field.
The smoothness indicator α is computed according to the formulas
1
1
al
ar
− ,
−
α = max
,
(5.2.62)
al + ar 2 al + ar 2
with
n
n
2 o−2
2 o−2
al = + A1ijk − A1i−1jk
, ar = + A1i+1jk − A1ijk
.
(5.2.63)
The parameter is introduced only to avoid division by zero and is in practice taken to be
= 10−8 . The smoothness indicator is designed to distinguish between the following cases
1. If A1 is smooth for x ∈ (xi−1 , xi+1 ), then
A1ijk − A1i−1jk = O(∆x),
and
A1i+1 jk − A1ijk = O(∆x).
In this case one can show that
α = O(∆x),
which shows that the overall numerical method still retains O(∆t2 , ∆x2 ) accuracy.
2. If A1 is non-smooth in (xi−1 , xi ) and smooth in (xi , xi+1 ), then ar al and α ≈ 21 .
3. If A1 is non-smooth in (xi , xi+1 ) and smooth in (xi−1 , xi ), then al ar and α ≈ 12 .
In all cases α ≤ 1/2, which guarantees that the numerical update will be stable up to CFL
number one.
5.2.3
Computing the initial potential
Constrained transport schemes require an initial magnetic potential4 . In many cases, however,
the initial conditions will only be given in terms of the magnetic field and it may be difficult to
4
This subsection has mainly been taken from [89].
50
5.2 An unstaggered constrained transport framework in 3D
obtain an analytic form for the initial A. In this case, we can compute the magnetic potential
by solving a Poisson equation of the form
∇ × B = ∇ × ∇ × A = ∇(∇ · A) − ∇2 A
⇒ ∇2 A = −∇ × B
(5.2.64)
(5.2.65)
where we have assumed, without loss of generality, that the initial magnetic potential is
solenoidal (divergence-free) (∇ · A = 0). Note that the magnetic potential at later times
will in general not satisfy ∇ · A = 0. Once the initial magnetic potential has been determined,
the initial magnetic field should be redefined by applying a discrete operator to compute the
curl of the magnetic potential, in order to guarantee a discrete divergence-free magnetic field.
On Cartesian grids finite-differences can be used, for mapped grids see section 7.5.
5.2.4
Boundary conditions for the magnetic vector potential
In this thesis we consider boundary conditions for the magnetic vector potential which
correspond to the following boundary conditions for the conserved quantities of the MHD
equations
1. periodic boundary conditions
2. zero-order extrapolation.
Below, we briefly state how the boundary conditions for the conserved quantities can be
implemented (see e.g. [65] for further discussions on boundary conditions). Nevertheless,
the main focus of this subsection will be, how to implement the boundary conditions of the
corresponding magnetic vector potential.
The periodic boundary conditions for the conserved quantities can be realized by copying the
appropriate computational grid values into ghost-cells, which are cells that simply extend the
grid in a natural way. Consider for example the x-lower side of a 3D domain. There we impose
Q0,j,k = QL,j,k
and Q−1,j,k = QL−1,j,k
(5.2.66)
where j = −1, 0, 1, . . . , M, M + 1, M + 2, k = −1, 0, 1, . . . , N, N + 1, N + 2 and L, M , N denote
the number of regular grid points in the x-, y- and z-direction. If the magnetic field is periodic,
then the potential will in general consist of a linear part corresponding to the mean magnetic
field5 , denoted by < B >= (< B 1 >, < B 2 >, < B 3 >)T and a periodic part, Ā, corresponding
to the zero-mean part of the magnetic field
A1 (x, y, z) = Ā1 (x, y, z) + c11 < B 2 > z − c21 < B 3 > y,
A2 (x, y, z) = Ā2 (x, y, z) + c12 < B 3 > x − c22 < B 1 > z,
A3 (x, y, z) = Ā3 (x, y, z) + c13 < B 1 > y − c23 < B 2 > x,
where the coefficients c1l , c2l for l = 1, 2, 3 are determined by the initial values for the magnetic
vector potential. For periodic boundary conditions the linear part is linearly extrapolated while
the periodic part is handled in the same way as the conserved quantities.
5
Mean magnetic field in this context refers to the mean magnetic field with respect to the whole domain, see
also section 5.3.2.
51
An unstaggered constrained transport method for 3D Cartesian grids using a splitting method
Zero-order extrapolation of the conserved quantities means, to simply copy the outermost
computational cells to the ghost cells. E.g. on the x-lower side we set
Q0,j,k = Q1,j,k
and Q−1,j,k = Q0,j,k
(5.2.67)
with the indices defined as above. In order to find a magnetic potential, which is consistent
with a zeroth-order magnetic field, we need an appropriate form of linear extrapolation. Keep
in mind that
 3

Ay − A2z
∇ × A =  A1z − A3x  .
A2x − A1y
Consider the x-direction, for the magnetic potential to be constant copies of the outermost
magnetic field values, we need to linearly extrapolate all components of A with a partial
derivative in x−direction. This are A2 and A3 . The other component, A1 , can simply be
copied as for the conserved quantities. Consequently, on e.g. the x-lower side we have
A10,j,k = A11,j,k
(5.2.68)
A20,j,k = A21,j,k +
(A21,j,k
A22,j,k )
−
∆x
∆x = 2A21,j,k − A22,j,k
A30,j,k = 2A31,j,k − A32,j,k
(5.2.69)
(5.2.70)
and
A1−1,j,k = A11,j,k
A21,j,k )
−
∆x
= 3A31,j,k − 2A32,j,k .
A2−1,j,k = A20,j,k +
A3−1,j,k
(5.2.71)
(A20,j,k
∆x = 3A21,j,k − 2A22,j,k
(5.2.72)
(5.2.73)
In an analogous way we have to apply linear extrapolation in the y− direction to all components
having a partial derivative in the y-direction, while taking a zero-order extrapolation for
the remaining component. The same is done for the z-direction. Note that we use linear
extrapolation of the magnetic potential for reflecting boundary conditions as well, which is
briefly explained in section 5.3. This procedure can be used for 2D in an analogous way, as
already discussed in [89] (for the scalar potential A3 ).
5.2.5
Discretization of the 2.5-dimensional problem
In order to construct and analyze methods for the three-dimensional MHD equations, it is
instructive to also look at the so-called 2.5-dimensional case. In this case we assume that u
and B are three-dimensional vectors, but all conserved quantities [ρ, ρu, E, B]T are functions
of only two spatial variables, say x = (x, y)T . Since Bz3 = 0, we can obtain a divergence-free
magnetic field by employing a constrained transport algorithm that only updates B 1 and B 2 ,
and which treats B 3 as just another conserved variable in the base scheme. In other words, one
could simply update the transport equation for A3 ,
A3t + u1 A3x + u2 A3y = 0,
52
(5.2.74)
5.3 Numerical experiments
via the 2D method as described in section 3.4.3, then compute the first two components of
the magnetic field from discrete analogs of B 1 = A3y and B 2 = −A3x , and let the base scheme
update B 3 since it does not enter the 2.5-dimensional divergence of the magnetic field
Bx1 + By2 = 0.
An alternative approach to handling the 2.5-dimensional case, one that will allow us to test the
important features of the proposed 3D scheme, is to consider the full magnetic vector potential
evolution equation in the (x, y)-plane. In this case system (5.2.6) reduces to
A1t − u2 A2x − u3 A3x + u2 A1y = 0,
(5.2.75)
A2t
= 0,
(5.2.76)
= 0.
(5.2.77)
1
+u
A2x
A3t
−
+
1
u A1y
u1 A3x
−
+
3
u A3y
u2 A3y
Approximate solutions to these equations can be computed via the method outlined in section
5.2.1 and section 5.2.2. The magnetic field can be obtained via discrete analogs of
B 1 = A3y ,
B 2 = −A3x ,
and B 3 = A2x − A1y .
Because the numerical update based on the scheme presented in section 5.2.1 and section 5.2.2
is not equivalent to the method of section 3.4.3 in 2.5-dimensions, we expect to see some
differences in the solution of the magnetic field. However, since the two methods are very
closely related, we expect to obtain similar results. Numerical examples for the 2.5-dimensional
case comparing the 2D constrained transport method of [89] (section 3.4.1) and the proposed
3D method are discussed in section 5.3.
5.3
Numerical experiments
We present several numerical experiments in this section. All the numerical tests are carried
out in the clawpack software package [61], which can be freely downloaded from the web. In
particular, the current work has been incorporated into the mhdclaw extension of clawpack,
which was originally developed by Rossmanith [85].
5.3.1
Test cases in 2.5-dimensions
We begin by presenting numerical results for two problems in 2.5 dimensions (i.e., the solution
depends only on the independent variables (x, y, t), but all three components of the velocity
and magnetic field vectors are non-zero). The two examples that are considered are
1. Smooth Alfvén wave; and
2. Cloud-shock interaction.
The first example involves an infinitely smooth exact solution of the ideal MHD system. The
second example involves the interaction of a high-pressure shock with a high-density bubble
(i.e., a discontinuous example).
53
An unstaggered constrained transport method for 3D Cartesian grids using a splitting method
Mesh
L∞ Error in B 1
L∞ Error in B 2
L∞ Error in B 3
64 × 128
6.731 × 10−4
2.38 × 10−3
1.296 × 10−2
128 × 256
1.684 × 10−4
5.952 × 10−4
3.237 × 10−3
256 × 512
4.231 × 10−5
1.493 × 10−4
8.085 × 10−4
512 × 1024
1.057 × 10−5
3.741 × 10−5
2.000 × 10−4
Order
1.997
1.997
2.006
Mesh
L∞ Error in A1
L∞ Error in A2
L∞ Error in A3
64 × 128
1.294 × 10−2
1.287 × 10−2
1.421 × 10−2
128 × 256
3.228 × 10−3
3.222 × 10−3
3.552 × 10−3
256 × 512
8.063 × 10−4
8.060 × 10−4
8.878 × 10−4
512 × 1024
2.089 × 10−4
1.997 × 10−4
2.270 × 10−4
Order
1.984
2.003
1.989
Table 5.1: Error tables for the 2.5-dimensional Alfvén problem at time t = 1.5 using proposed
dimensional split scheme. All simulations are run at a CFL number of 0.8. This table shows
that all components of the magnetic field and all components of the magnetic potential converge
at second order accuracy.
Smooth Alfvén wave problem
We first verify the order of convergence of the constrained transport method for a smooth
circular polarized Alfvén wave that propagates in direction n = (cos φ, sin φ, 0)T towards the
origin. This problem has been considered by several authors (e.g. [89, 96]), and is a special
case (θ = 0) of the 3D problem described in detail in section 5.3.2. Here we take φ = tan−1 (0.5)
and solve on the domain
1
1
× 0,
.
(5.3.1)
(x, y) ∈ 0,
cos φ
sin φ
The solution consists of a sinusoidal wave propagating at constant speed without changing
shape, thus making it a prime candidate to verify order of accuracy.
In Table 5.1, we show the convergence rates for the 2.5-dimensional test problem. Here all three
components of the magnetic field have been updated in the constrained transport method and
the magnetic potential was approximated using a dimensional split method for (5.2.75)–(5.2.77).
The table clearly shows that the proposed method is second-order accurate in all of the magnetic
field components, as well as the magnetic potential components. The reported errors are of the
same magnitude as those reported in Table 7.1 of [89] (page 1786), where the two-dimensional
algorithm based on a scalar transport equation for the magnetic potential was used.
54
5.3 Numerical experiments
Cloud-shock interaction problem
Next we consider a problem with a strong shock interacting with a relatively large density
jump in the form of a high-density bubble that is at rest with its background before the
shock-interaction. This problem has also been considered by several authors (e.g. [89, 96]),
however, in previous work a solution was always obtained by treating B 3 as a standard conserved
variable. Here we compare such an approach in the form of the method described in [89], against
the method that is proposed in this thesis. In our new method all three components of the
magnetic field are computed from derivatives of the magnetic vector potential. The details of
the initial conditions are written in section 5.3.2.
In Figure 5.2 we show numerical results for the 2.5-dimensional problem. For the newly
proposed method we take ν = 0.02 as our artificial diffusion parameter. We compare the
scheme from [89] that only updates B 1 and B 2 using the scalar evolution equation for the vector
potential (5.2.74) with the new constrained transport method that updates all components of
the magnetic field. Although these methods compute B 3 in very different ways, using very
different limiters, these plots show that they nonetheless produce similar solutions. This result
gives us confidence that the proposed method is able to accurately resolve strong shocks despite
the somewhat unusual approach for approximating the magnetic field.
(a)
(b)
Figure 5.2: The 2.5-dimensional cloud-shock interaction problem. Shown here are the
out-of-plane magnetic field at time t = 0.06 as calculated on a 512×512 mesh using (a) the
scheme of [89] with only A3 , and (b) the proposed scheme using the full vector potential A.
5.3.2
Test cases in 3D
We present numerical results for three-dimensional versions of three classical MHD test
problems
1. Smooth Alfvén wave;
2. Rotated shock tube problem;
3. Orszag-Tang vortex; and
55
An unstaggered constrained transport method for 3D Cartesian grids using a splitting method
4. Cloud-shock interaction.
Two-dimensional versions of these problems have been studied by many authors, see for instance
[89, 96]. Our test calculations will all be based on the splitting (5.2.34)–(5.2.36).
Smooth Alfvén wave problem
We first verify the order of convergence of the constrained transport method for a smooth
circular polarized Alfvén wave that propagates in direction n = (cos φ cos θ, sin φ cos θ, sin θ)T
towards the origin. Here φ is an angle with respect to the x-axis in the x, y-plane and θ is an
angle with respect to the x, z-plane. Initial values for the velocity and the magnetic field are
specified in the direction n as well as the orthonormal directions t = (− sin φ, cos φ, 0)T and
r = (− cos φ sin θ, − sin φ sin θ, cos θ)T
u(0, x) = un n + ut t + ur r,
B(0, x) = B n n + B t t + B r r,
(5.3.2)
(5.3.3)
un = 0, B n = 1,
ut = B t = 0.1 sin(2π n · x),
ur = B r = 0.1 cos(2π n · x).
(5.3.4)
(5.3.5)
(5.3.6)
where
The initial density and pressure are constant and set to
ρ(0, x) = 1
and
p(0, x) = 0.1,
(5.3.7)
√
respectively. This choice guarantees that the Alfvén wave speed is |vA | = Bn / ρ = 1, which
means that the flow agrees with the initial state whenever the time is an integer value. The
computational domain is taken to be
1
1
1
Ω = 0,
× 0,
× 0,
,
(5.3.8)
cos φ cos θ
sin φ cos θ
sin θ
with periodic boundary conditions imposed on the conserved variables in all three coordinate
directions: (ρ, ρu, E, B). Our initial condition for the magnetic potential is
1
sin φ sin(2π n · x),
(5.3.9)
A1 (0, x) = z B 2 −
20π
1
A2 (0, x) = x B 3 +
cos φ sin(2π n · x),
(5.3.10)
20π
1
A3 (0, x) = y B 1 +
cos(2π n · x),
(5.3.11)
20π cos θ
where hBi denotes the average magnetic field over the computational domain
˚
1
hBi :=
B(t, x, y, z) dx dy dz = (cos φ cos θ, sin φ cos θ, sin θ)T .
(5.3.12)
|Ω|
Ω
We note that even though the magnetic field is time-dependent, its average, hBi, is
time-independent. Therefore, the magnetic potential consists of a linear (time-independent) and
a periodic (time-dependent) part. Boundary conditions for the magnetic potential are handled
as described in section 5.2.4. In Table 5.2 we show the results of a numerical convergence study
in the three-dimensional case with θ = φ = tan−1 (0.5) ≈ 26.5651◦ . These results confirm that
our method is second order accurate.
56
5.3 Numerical experiments
Mesh
L∞ Error in B 1
L∞ Error in B 2
L∞ Error in B 3
16 × 32 × 32
1.022 × 10−2
2.787 × 10−2
2.382 × 10−2
32 × 64 × 64
2.577 × 10−3
7.075 × 10−3
6.101 × 10−3
64 × 128 × 128
6.487 × 10−4
1.782 × 10−3
1.549 × 10−3
Order
1.990
1.989
1.978
Mesh
L∞ Error in A1
L∞ Error in A2
L∞ Error in A3
16 × 32 × 32
1.902 × 10−1
1.460 × 10−1
1.187 × 10−1
32 × 64 × 64
4.816 × 10−2
3.747 × 10−2
2.995 × 10−2
64 × 128 × 128
1.220 × 10−2
9.528 × 10−3
7.564 × 10−3
Order
1.981
1.975
1.985
Table 5.2: Error tables for the 3D Alfvén problem at time t = 1. This table shows that all
components of the magnetic field and all components of the magnetic potential converge at
second order accuracy. The approximate order of accuracy is computed by taking the log2 of
the ratio of the error on the 32 × 64 × 64 mesh to the error on the 64 × 128 × 128 mesh.
Rotated shock tube problem
We now consider the shock tube problem described in [71, 93]. In this test case a
one-dimensional shock tube problem is computed in a three-dimensional domain. In order
to define the problem, we consider a coordinate transformation of the form
 
  
cos(α) cos(β)
cos(α) sin(β) sin(α)
x
ξ
η  =  − sin(β)


cos(β)
0
y ,
(5.3.13)
ζ
− sin(α) cos(β) − sin(α) sin(β) cos(α)
z
which maps the Cartesian coordinates (x, y, z)T to the rotated coordinate system (ξ, η, ζ)T .
Vectors transform as follows
 x 
  ξ
B
cos(α) cos(β) − sin(β) − sin(α) cos(β)
B
B y  =  cos(α) sin(β) cos(β) − sin(α) sin(β)  B η  .
(5.3.14)
z
ζ
B
sin(α)
0
cos(α)
B
The Riemann initial data is taken to be
ρ, uξ , uη , uζ , p, B ξ , B η , B ζ (0, x)
  1.08, 1.2, 0.01, 0.5, 0.95, √2 ,
4π
=
 1, 0, 0, 0, 1, √2 , √4 , √2
4π
4π
4π
3.6
√
, √24π
4π
if ξ < 0,
(5.3.15)
if ξ ≥ 0,
where the velocity vector and the magnetic field are given in the rotated coordinate frame. As
the initial condition for the magnetic potential (in the rotated coordinate frame) we use
Aξ , Aη , Aζ (0, x) = 0, ξB ζ , ηB ξ − ξB η .
(5.3.16)
57
An unstaggered constrained transport method for 3D Cartesian grids using a splitting method
The solution of the Riemann problem at later times remains a function of ξ. This fact
is used to extend the computed values to ghost cell values. The computational domain is
Ω = [−0.75, 0.75] × [0, 0.015625] × [0, 0.015625], which is discretized using 768 × 8 × 8 grid
cells. By using α = tan−1 (0.5) and β = tan−1 (0.25 cos α), we obtain simple formulas for
the extension of the numerical solution to the ghost cells. To define ghost cell values in the
Cartesian y-direction, we can for instance use the relation q(i, j, k) = q(i + 1, j − 2, k). In the
z-direction we can use q(i, j, k) = q(i + 1, j, k − 4). The ghost cell values in the x-direction were
computed via extrapolation. We present numerical results at time t = 0.2 as scatter plots of
the three-dimensional solution plotted as a function of ξ.
As already documented by other authors, we also observe some oscillations in particular in the
B ξ component of the magnetic field. These oscillations do not appear if the shock tube initial
data are aligned with the mesh. In Figure 5.3 we show approximations of the solution at time
t = 0.2. These plots are scatter plots, where the output of the three-dimensional computation is
plotted as a function of ξ. The solid line in these plots is obtained by computing solutions of the
one-dimensional Riemann problem on a very fine mesh (using 104 grid cells). The computation
was performed using the minmod limiter and the diffusive limiter with ν = 0.05. As expected,
with a less diffusive limiter the amplitude of the oscillations becomes stronger, by increasing ν,
the amplitude of the oscillations becomes weaker.
Orszag-Tang vortex
Our next test problem is the Orszag-Tang vortex problem. This is a standard test case for the
two-dimensional MHD equations. Here we add a small perturbation to the initial velocity field
that depends on the vertical direction.
The initial condition is
ρ(0, x) = γ 2 , p(0, x) = γ,
T
u(0, x) = −(1 + ε sin z) sin y, (1 + ε sin z) sin x, ε sin(z) ,
T
B(0, x) = − sin y, sin(2x), 0 .
Here we used ε = 0.2. The initial condition for the magnetic potential is
T
A(0, x) = 0, 0, cos y + cos(2x) .
(5.3.17)
(5.3.18)
(5.3.19)
(5.3.20)
The computational domain is a cube with side length 2π. Periodicity is imposed in all three
directions. These computations have been performed with the high-resolution constrained
transport method with monotonized central limiter and the diffusive limiter using ν = 0.05. In
Figures 5.4 we show schlieren plots of pressure in the x, y-plane for z = π at different times.
Cloud-shock interaction problem
Finally we consider the cloud-shock interaction problem. The initial conditions consist of a
shock that is initially located at x = 0.05
ρ, u1 , u2 , u3 , p, B 1 , B 2 , B 3 (0, x)
(5.3.21)
(3.86859, 11.2536, 0, 0, 167.345, 0, 2.1826182, −2.1826182) if x < 0.05,
=
(1, 0, 0, 0, 1, 0, 0.56418958, 0.56418958)
if x ≥ 0.05,
58
5.3 Numerical experiments
and a spherical cloud of density ρ = 10 with radius r = 0.15 and centered at (0.25, 0.5, 0.5).
The cloud is in hydrostatic equilibrium with the fluid to the right of the shock. The initial
condition for the magnetic potential is
(2.1826182 y, 0, −2.1826182 (x − 0.05))T
if x < 0.05,
A(0, x) =
(5.3.22)
T
(−0.56418958 y, 0, 0.56418956 (x − 0.05)) if x ≥ 0.05.
This test problem can be computed on the unit cube with inflow boundary conditions on the
left side and outflow conditions (zeroth-order extrapolation) on all other sides as shown in
section 7.7. Here, we instead use the symmetry of the problem and compute the problem only
in a quarter of the full domain, i.e. in [0, 1] × [0.5, 1] × [0.5, 1] and impose reflecting boundary
conditions at the lower boundary in the y and z-directions. For the conserved quantities, the
reflecting boundary condition is implemented in the standard way, i.e., by copying the values
of the conserved quantities from the first grid cells of the flow domain to the ghost cells. The
normal momentum component in the ghost cells is negated. The components of the magnetic
potential are linearly extrapolated to the ghost cells. In Figure 5.5, we show a schlieren plot
of the density at t = 0.06. Here the diffusive limiter described in section 5.2.2 was used with
ν = 0.02.
59
An unstaggered constrained transport method for 3D Cartesian grids using a splitting method
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
Figure 5.3: The rotated Riemann problem. Scatterplots of various components of solution
at time t = 0.2 using the constrained transport algorithm. The solid line in each panel is a
highly-resolved 1D simulation.
60
5.3 Numerical experiments
(a)
(b)
Figure 5.4: The 3D Orszag-Tang vortex problem. Shown in these panels are schlieren plots
of pressure in the x, y-plane at (a) time t = 3 and z = π and (b) t = 3.5 and z = π. These
solutions were computed on a mesh with 150 × 150 × 150 grid cells.
Figure 5.5: The 3D cloud-shock interaction problem. Shown is a schlieren plot of the density
for the problem using a mesh with 200 × 100 × 100 grid cells at time t = 0.06.
61
An unstaggered constrained transport method for 3D Cartesian grids using a splitting method
62
Chapter 6
A two-dimensional high-order
unstaggered constrained transport
method for logically rectangular grids
based on the method of lines
This chapter is devoted to a new two-dimensional constrained transport method, which
generalizes the CT method of Rossmanith, described in section 3.4.3, with the following features
1. The method is applicable to general logically rectangular grids;
2. The accuracy of the whole scheme can be higher than second order.
Moreover, the method avoids unphysical oscillations in the magnetic field, while retaining the
required order of accuracy on smooth solutions, using a new limiting strategy; this strategy is
in particular suitable for logically rectangular grids.
Note that a generalization of the wave propagation method to logically rectangular grids
is possible and described in [65]. However, we observed some inaccuracies when trying
to generalize the modified wave propagation method, as introduced in section 5.1.6, to
non-smoothly varying logically rectangular grids. In particular the derivative of the computed
magnetic potential, needed for the magnetic field, has been inaccurate in the presence of
non-smoothly varying meshes.
For this reason we developed a new scheme using a different discretization. In this thesis
we advocate the method of lines, which allows to decouple the spatial and temporal
discretization. The scheme proposed below is build on spatially reconstructions using
least-square approximations, which has found to be more flexible in this context.
In the following we explain the method of lines together with the spatial reconstruction and
discretization used in this thesis. The temporal discretization of the whole constrained transport
scheme and the limiting of the magnetic potential with respect to the derivative will be presented
thereafter. The robustness of the scheme is validated numerically at the end of the chapter.
6.1
The method of lines
A possibility to obtain a high-order accurate method in space and time is by separating the space
and time discretization. The approach of first discretizing in space and then discretizing in time
63
A two-dimensional high-order unstaggered constrained transport method for logically
rectangular grids based on the method of lines
is well known as the method of lines. In general, many high-order accurate numerical methods
for PDE’s, (including finite element, finite volume, finite difference and spectral methods), are
based on the method of lines approach [60], [55]. The general concept can be understood as
follows. Consider an evolution PDE of the general form
∂t q(x, t) = L(q, t),
q(x, 0) = q0 (x),
(6.1.1)
with q ∈ Rm , where m is the number of equations and L is a differential operator. The
method of lines involves first discretizing in space, x ∈ Rd , to form a discrete operator L that
approximates the differential operator L. Q is an approximation of q at all discrete points. This
is known as semi-discretization and results in a typically large system of ordinary differential
equations (ODE’s), which can be written as
∂t Q(t) = L(Q, t)
Q(0) = Q0 .
(6.1.2)
System (6.1.2) is then solved using a numerical ODE solver, where in this thesis a special class of
Runge-Kutta methods, known as strong stability preserving (SSP) Runge-Kutta methods, are
exploit, see e.g. [44, 43, 55] for a complete derivation. The strong stability preserving property
refers to a monotonicity, contractivity and positivity property of the method. Runge-Kutta
methods that can be represented in so called Shu-Osher Form, meaning that the method consists
of a convex combination of forward Euler steps, with a modified time step size, are referred to
as SSP Runge-Kutta methods. The 2nd and 3rd order SSP Runge-Kutta methods, used in this
thesis are presented in the following examples.
Example 1. A two step second order SSP Runge-Kutta method for (6.1.2) can be written in
the form
Q(1) = Qn
Q(2) = Q(1) + ∆tL(Q(1) )
1 (1)
(Q + Q(2) + ∆tL(Q(2) )).
Qn+1 =
2
(6.1.3)
(6.1.4)
(6.1.5)
The time step restriction for this method is the same as for the forward Euler method.
Example 2. A three step third order SSP Runge-Kutta method for (6.1.2) can be written in
the form
Q(1) = Qn
Q(2) = Q(1) + ∆tL(Q(1) )
3 (1) 1 (2) 1
Q(3) =
Q + Q + ∆tL(Q(2) )
4
4
4
1 (1) 2 (3) 2
n+1
Q + Q + ∆tL(Q(3) ).
Q
=
3
3
3
(6.1.6)
(6.1.7)
(6.1.8)
(6.1.9)
The time step restriction for this method is again the same as for the forward Euler method.
Note that every explicit SSP Runge-Kutta method can be transformed into the form
Qn+1
= Qni + ∆t(L∗ ),
i
(6.1.10)
where L∗ is some linear combination of the spatial discretizations in the different stages of
the Runge-Kutta method, with coefficients that add up to one. This yields a conservative
discretization, in the case of a flux difference discretization of a conservation law.
64
6.1 The method of lines
6.1.1
Multidimensional reconstruction on logically rectangular grids
In this section we introduce the multidimensional least squares reconstruction procedure for
general logically rectangular grids used for a high-order finite volume discretization. We can
ni,j+1/2
x1
x2
x = X1 (ξ, η)
1
η
ni−1/2,j
y = X2 (ξ, η)
0
ξ
1
x0
x3
Figure 6.1: An example of a logically rectangular grid cell in physical space (x, y) (right hand
side) with the corresponding cell in reference coordinates (ξ, η).
always represent all coordinate points of a logically rectangular grid cell Ci,j on a reference cell
0 ≤ ξ, η ≤ 1 by constructing a bilinear map. Considering the (lower) corners (x0 and x3 in
Figure 6.1) we can construct a linear interpolation as
X(ξ, 0) = (1 − ξ)x0 + ξx3 .
(6.1.11)
X(ξ, 1) = (1 − ξ)x1 + ξx2
(6.1.12)
In an analogous way we obtain
for the (upper) corners. Taking another linear interpolation between (6.1.11) and (6.1.12) yields
the bilinear map
X(ξ, η) = (1 − η)((1 − ξ)x0 + ξx3 ) + η((1 − ξ)x1 + ξx2 ),
(6.1.13)
which can be written in the form
X(ξ, η) = c00 + c10 ξ + c01 η + c11 ξη.
(6.1.14)
Here c00 , . . . , c11 ∈ R2 are c00 = x0 , c10 = x3 − x0 , c01 = x1 − x0 and c11 = x0 − x3 + x2 − x1 .
Obviously X(0, 0), X(0, 1), X(1, 0), X(1, 1) are the corners of the cell. Using this bilinear map
we can compute the area of the logically rectangular cell as well as the basis functions of the
reconstruction matrix, needed for the reconstruction as described later in this section.
For the reconstruction polynomial we use the following ansatz
q̃i,j (x) = Qi,j +
K̃
X
k=1
65
ck φk (x)
(6.1.15)
A two-dimensional high-order unstaggered constrained transport method for logically
rectangular grids based on the method of lines
with x ∈ R2 and
Qi,j
1
=
|Ci,j |
ˆ
q dC
Ci,j
being the vector of m cell averages, belonging to cell Ci,j with cell volume/area |Ci,j |. We
further have
ˆ
1
φk (x) = Ψk −
Ψk dC
|Ci,j | Ci,j
consisting of the (possibly) scaled basis
Ψk = s
l+m
l
m
(x − xi,j ) (y − yi,j ) , 0 ≤ l + m ≤
K̃ + d
d
=: dpoly ,
with s = (|Ci,j |)1/d and d = 2 (in this 2D case). In all computations below we use
s = 1. However, the scaling has found to be important on very fine meshes. Note that
the generalization to dimension d 6= 2 is straight forward.
Due to the form of the reconstruction polynomial (6.1.15), together with the zero mean basis
functions, the conservation of the cell average is incorporated into the reconstruction polynomial
and thus we always have
ˆ
1
q̃i,j dC = Qi,j .
(6.1.16)
|Ci,j | Ci,j
For a reconstruction polynomial of degree K̃ we need at least dpoly − 1 cells beside Ci,j , to define
the polynomial coefficients in a reconstruction procedure. These cells are typically those closest
to Ci,j . We call the collection of these cells, together with Ci,j , the stencil
S=
l[
max
lmax ≥ dpoly ,
Cl ,
(6.1.17)
l=1
where lmax denotes the stencil size. With this stencil the interpolation requirement can be
stated as
ˆ
1
q̃ dC = Ql for all Cl ∈ S.
(6.1.18)
|Cl | Cl
Consequently, we have to solve the following system
ˆ
1
q̃ dC = Ql
|Cl | Cl
K̃ ˆ
1 X
⇔ Qi,j +
ck φk dC = Ql
|Cl | k=1 Cl
K̃
1 X
⇔
|Cl | k=1
(6.1.19)
(6.1.20)
ˆ
ck φk dC = Ql − Qi,j ,
(6.1.21)
Cl
for all Cl ∈ S\Ci,j , which can be restated in matrix form to be
Dc = b
66
(6.1.22)
6.1 The method of lines
with the reconstruction matrix
Dl,k
1
=
|Cl |
ˆ
φk dC.
(6.1.23)
Cl
We have bl = (Ql − Qi,j ) with l = 1, . . . , lmax − 1 and the coefficient vector c = (c1 , . . . , cK̃ )T .
The reconstruction matrix can be computed with the aid of the bilinear map (6.1.14) together
with multidimensional Gaussian quadrature rules (also known as Gaussian cubature rules) of
appropriate order, see [94]. Instead of the bilinear map, we could also use a triangulation of each
logically rectangular cell, together with suitable quadrature rules on simplices. This, however,
will not be considered here since a direct generalization to three-dimensional hexahedral grids
is not as straight-forward as a direct generalization of the bilinear map (6.1.14), see section 7.1.
As mentioned above, we need at least lmax = dpoly cells for the reconstruction stencil to satisfy
the interpolation requirement. In one space dimension the minimal choice of a reconstruction
stencil is in general sufficient. In more than one space dimension things can be more
complicated. In the case of a minimal choice for the stencil, the reconstruction matrix D
has a similar form as a generalized Vandermond matrix (see [22]). This Vandermond matrix
can be singular for certain reconstruction point configurations (although the points do not
coincide), which means that the reconstruction matrix D could be singular on general meshes,
due to the grid geometry. Furthermore the condition number could be bad, which is mostly
due to the choice of the basis. One way to obtain a better condition number and to have
more flexibility in the case of “singular“ point configurations is by taking a larger stencil and
minimizing (6.1.22) in the sense of a constrained least squares problem. This can be stated as
minkDc − bkL2
c
with the constraint
(6.1.24)
ˆ
q̃i,j dC = Qi,j .
(6.1.25)
Ci,j
Note that the constraint is already analytically incorporated into system (6.1.22) by means
of (6.1.16). Consequently, we only have to compute (6.1.22) in a least squares sense. The
coefficients for the reconstruction polynomial of degree K̃, obtained by the least squares process,
can reproduce polynomials up to order p = K̃ + 1 exactly (if the mesh is not badly stretched,
see section 6.1.2). In other words, for q being sufficiently smooth, we have
q̃i,j (x − xi,j ) − q(x) = O(∆xps ),
(6.1.26)
for an interpolation at point x inside the whole stencil S [76], [77]. Here xi,j denotes the cell
center of cell Ci,j and ∆xs is some characteristic length chosen for the underlying grid (e.g. the
shortest edge of a cell).
Note that solving the least squares procedure with a normal equation has some advantages
concerning the speed of the reconstruction. Consider the normal equation, corresponding to
(6.1.22), which reads
DT Dc = DT b.
We could store the Moore-Penrose-Inverse
MI = (DT D)−1 DT
67
(6.1.27)
A two-dimensional high-order unstaggered constrained transport method for logically
rectangular grids based on the method of lines
on each cell as a pre-computational step and recover the coefficients of the reconstruction
polynomial by a simple matrix vector multiplication on each cell
c = MI b.
(6.1.28)
Note that storing the Moore-Penrose-Inverse on each cell could lead to a large storage
requirement especially in 3D.
In the case of a Cartesian grid, we only need to store one reconstruction matrix for one particular
cell which can be used for all other cells, too, because the basis functions are defined relative
to each cell center. This leads to a low storage requirement in the Cartesian grid case. One
possible disadvantage, of using the normal equation to solve the over determined system, is
the condition number (say K) of the reconstruction matrix, which is squared for the normal
equation and might introduce problems for ill conditioned reconstruction matrices. This could
be in particular critical, when using unscaled basis functions in a multidimensional setting
and on very fine grids. One possibility to compute a stable Moore-Penrose-Inverse, when
being close to a ill conditioned reconstruction matrix, can be obtained using a singular value
decomposition of DT D, as noted in [97]. Another possibility to compute the least squares
problem (6.1.24) consists in using a QR-decomposition with Householder reflexion, which gives
a condition number proportional to K, see e.g. [11]. Note that this approach does not allow
the storage of a Moore-Penrose-Inverse and is thus computationally more expensive.
Similiar approaches of constrained least squares reconstruction techniques have been applied
successfully to triangular grids as well as on logically rectangular grids in e.g. [32], [97],[33].
For other solution recovery techniques see e.g. [11].
A note on stencil selection for logically rectangular grids
Some numerical tests revealed that for a linear reconstruction polynomial on a Cartesian grid
or a smoothly varying mapped grid a reconstruction stencil of five cells in a symmetric form
seems to be sufficient, e.g.
S = {Ci,j , Ci−1,j , Ci,j+1 , Ci+1,j , Ci,j−1 }.
(6.1.29)
On non-smoothly varying grids a symmetric stencil including cell Ci,j and all the immediate
neighbours gave better results for some grid configurations.
S = {Ci,j , Ci−1,j , Ci,j+1 , Ci+1,j , Ci,j−1 ,
Ci−1,j−1 , Ci−1,j+1 , Ci+1,j+1 , Ci+1,j−1 } .
(6.1.30)
(6.1.31)
This stencil is in particular well suited for quadratic reconstructions and has been used in
most computations shown in this thesis. In general it seems to be most accurate to include
cells, which are geometrically closest to the cell center of Ci,j . Concerning the amount of cells
to be included into the stencil for the least square problem, the number of lmax ≥ 1.5K̃ has
been suggested in [32] for triangular grids. See also [97] for stencil selections on mixed grids
(triangular- and logically rectangular grids).
6.1.2
Possible problems with least squares reconstructions on highly
stretched grid cells
Problems of least-square reconstructions on stretched grids have been reported e.g. in [80], [81],
[29]. In the following we give a motivation for possible accuracy problems, which can arises in
68
6.1 The method of lines
the context of least-square reconstructions including stretched grid cells.
In statistics a least squares problem statement usually requires one to fit a range of observations
to the properties of a given function. Suppose that we obtain data by mistake at some points
(say Pk , k = 0, . . .), which lie beyond an actual solution range of interest. Such observations are
called outliers [80]. It is well known in statistics that being included in the data set, the outlier
may seriously worsen the results of the least squares reconstruction. The detection of outliers in
statistics is based on the assumption that for a given function, say P (x), x ∈ R2 , an observation
may be extreme with respect to the x value or P value. In [80] it is shown that outliers with
respect to the x value, such as reconstruction data based on a stencil including highly stretched
grid cells, may decrease the accuracy of the reconstruction procedure. There are some general
ways to improve accuracy on grids with badly deformed grid cells. One popular way is to
introduce inverse distance weighting functions [76], [77], [81], which can be denoted by
Wn,n =
|xNn
1
,
− xi,j |
n = 1, . . . , lmax ,
(6.1.32)
with xi,j being the cell center of cell Ci,j and xNn the cell center of the nth neighbouring cell
in the stencil S, where n is a local numbering of the stencil. E.g. for the cell to the left hand
side of Ci,j we have n = 2 and N2 = (i − 1, j), with a clockwise local numbering starting at the
lower left neighbouring cell of Ci,j .
This weighting functions can be incorporated into the reconstruction problem (6.1.24), which
leads to a weighted reconstruction problem of the form
W Dc = W b
(6.1.33)
and can be minimized in the sense of a weighted least squares system
minkW (Dc − b)kL2 .
c
(6.1.34)
The weighting can lower the influence of distant points (outlier) in the least square
reconstruction [76], [77]. Nevertheless, this approach restores the accuracy order of the
reconstruction only in certain situations and not in general [81]. Another obvious way to
improve the accuracy and the order of the reconstruction is to use an ansatz polynomial of
higher order. This leads to a more accurate fitting to the underlying data. The increase of
basis functions, to obtain a higher order fitting can be done for all directions in the same way
(isotropic) or, when using grid aligned coordinates, one can also increase the amount of basis
functions in the direction of large grid spacing only (anisotropic) [81], [29].
A different promising approach to recover the accuracy is to use approximate mapped least
squares methods. This approach has been tested on grids with a high aspect ratio, see [29].
High aspect ratio in this context refers to the grid spacing in one direction, which differs greatly
from the one in the other directions.
The approximate mapped least squares method includes the application of the least squares
minimization to a locally constructed coordinate system, depending on the distance function
in a curved geometry. Other multidimensional high-order reconstruction techniques based on
1D reconstructions for orthogonal coordinate systems can be found in [106], [70].
6.1.3
Multidimensional non-oscillatory reconstructions
In this section we discuss weighted essentially non-oscillatory (WENO) reconstructions, which
do not suffer from Gibbs phenomenon near steep gradients or discontinuous solutions. Here,
we mainly focus on genuinely multidimensional limiting processes.
69
A two-dimensional high-order unstaggered constrained transport method for logically
rectangular grids based on the method of lines
Multidimensional WENO reconstructions
In this section we discuss an essentially non-oscillatory reconstruction procedure, which means
the magnitude of the oscillations decays as O(∆xps ) where p is the order of reconstruction
accuracy and ∆xs is a characteristic grid length. The approach described in this section is
known as WENO method [91], [53] and extends the essentially non-oscillatory (ENO) method
[46],[91]. Let us briefly review the ENO method before presenting the WENO method in
detail.
The basic idea of the ENO methods is to use “adaptive stencils”, which means to utilize
reconstruction polynomials on different stencils and avoid including the cells with discontinuities
(if possible) into the reconstruction stencil for the final reconstruction polynomial, which will
then be used for reconstructions in cell Ci,j . The ENO reconstruction on a scalar function,
denoted by q̃, in 1D satisfies a TVB condition in the following sense.
Theorem 5. [46], [91] For any piecewise smooth q(x), possibly having jump discontinuities,
there exist an ∆x0 > 0 and a scalar function z(x), such that, for all ∆x ≤ ∆x0
q̃(x) = z(x) + O(∆xK̃+1 )
(6.1.35)
T V (z) ≤ T V (q).
(6.1.36)
where
The main difference of the WENO method in contrast to the ENO method is that the WENO
method takes not one, but all candidate reconstructions into account by computing a convex
combination of these reconstructions. This convex combination is constructed in such a way
that reconstructions, on a stencil having a discontinuity, obtain a weight which is lower than
the consistency error. This leads to a decay of possibly oscillatory coefficients as the grid
is refined. Taking all reconstructions into account was found to be more robust, since this
technique responds more smoothly to changes in the data [91]. See Figure 6.2 for an illustration
of the general procedure for a WENO reconstruction of a scalar function q. For a history
about the development of WENO methods in more than one space dimension on triangular
and logically rectangular grids, see [11], [32], [97], [52]. The direct limiting of the vector
reconstruction,denoted by q̃i,j , component by component on the conserved variables, might give
satisfying results for reconstructions of order two in most cases [11]. However, (in particular) if
the reconstruction order is increased, limiting on the conserved quantities does not necessarily
avoid oscillatory behaviour. Here limiting on transformed variables has been found to be more
successful. We consider limiting on characteristic variables as well as limiting on primitive
variables in this thesis.
Limiting on characteristic variables
In this approach we follow closely the WENO reconstruction of [32], [33]. One way to obtain
an essentially non-oscillatory reconstruction consists of limiting the polynomial reconstructions
q̃i,j with (say m) components on characteristic variables. The basic idea is to transform the sets
of coefficients, belonging to each component of the reconstruction polynomial, in the conserved
quantities (locally) into m sets of coefficients on characteristic variables. Having transformed
the coefficients the limiting is applied componentwise. Subsequently, the coefficients are
transformed back to conservative variables. This procedure yields a similar justification of
70
6.1 The method of lines
q̃1
q̃iW EN O = ω1 q̃1 + ω2 q̃2 + ω3 q̃3
q̃3
q̃2
xi−2
xi−1
xi
xi+1
xi+2
sectorial stencil (left)
central stencil
sectorial stencil (right)
Figure 6.2: Example of reconstructions on central and sectorial stencils in 1D, which can be
used to compute a WENO reconstruction polynomial of the scalar function q, represented by
cell averages.
an essentially non-oscillatory reconstruction as in the case of a scalar equation, since this
transformation could be interpreted as (local) decoupling of the set of variables.
In the following form of limiting procedure we are interested in one WENO polynomial,
which is valid in the whole cell. This requires to consider all possible characteristic directions
simultaneously, in order to finally deliver a reconstruction polynomial in conserved variables,
that is the combination of the smoothest reconstructions in each direction.
In more detail, we apply the WENO weighting algorithm to each transformed coefficient,
depending on the characteristic direction. For logically rectangular grids, we consider the
normal direction ns to each side of the cell as characteristic direction. We include different
stencils, consisting of a central stencil S1 , which covers cell Ci,j in a symmetric manner and
sectorial stencils Sl with l = 2, . . . , Smax .
Typically we take Smax = 5 together with sectorial stencils to each edge of the cell Ci,j . However,
in some computations it might be advantageous to take sectorial stencil distributed along each
edge and corner of the cell. In 2D this results in Smax = 9.
In the following description, used for reconstructions up to 3rd order of accuracy, we take a
centered reconstruction polynomial based on a stencil containing cell Ci,j and all the immediate
neighbours. For such a symmetric choice of the central stencil, we can take the central stencils
of each neighbouring cell, which shares an edge with cell Ci,j for a choice of the sectorial stencils.
Therefore we can use S1 = Si,j , S2 = Si−1,j , S3 = Si,j+1 , S4 = Si+1,j , S5 = Si,j−1 as a simple
choice of stencils.
Let the vector of coefficients cln = (cl1,n , . . . , clm,n )T , denote the nth coefficient-vector of the lth
stencil, Sl , belonging to all m components of the reconstruction q̃l . Here we have n = 1, . . . , K̃
and l = 1, . . . , Smax .
71
A two-dimensional high-order unstaggered constrained transport method for logically
rectangular grids based on the method of lines
Consider the left side of the cell Ci,j , with normal direction ns = ni−1/2,j . We can transform
the coefficients into characteristic variables, denoted by ĉln , as follows
ĉln = Rn−1s cln ,
n = 1, . . . , K̃
(6.1.37)
where Rns is the matrix of right eigenvectors (belonging to the system matrix) in direction ns ,
of the hyperbolic system. Rns is evaluated for the normal direction ns at the arithmetic average
of the cell averages, 12 (Qi,j + QNl̃ ). Here Nl̃ is the index of the neighbouring cell Cl̃ , where we
could use a local clockwise numbering (˜l = 1, . . . , 4) for the neighbouring cells sharing an edge
with Ci,j , e.g. for the left cell we have N1 = (i − 1, j).
To explain the procedure in detail, we apply the whole WENO method for a particular direction
ns .
1. Use (6.1.37) to transform the coefficients of all stencils Sl with l = 1, . . . , k into
characteristic variables.
2. Compute the following nonlinear weights componentwise (p = 1, . . . , m) for the
coefficients ĉln = (ĉl1,n , . . . , ĉlm,n )T of each stencil Sl
ω̃ p
ωlp = Pk l
(6.1.38)
p
v=1 ω̃v
with
λl
ω̃lp =
,
( + σlp )r
(
λ1 if l = 1
λl =
1 else.
(6.1.39)
(6.1.40)
λ1 and r are parameter values of the scheme, which need to be specified. According to
[91] we choose
X ˆ
p
σl =
|Cl ||β|−1 (∂ β q̃pl )2 dC
(6.1.41)
1≤|β|≤K̃
Cl
for the smoothness indicator. Note that β ∈ Nd denotes a multindex. Furthermore we
always need to have
k
X
p
ωl ≥ 0,
ωlp = 1,
l=1
due to stability and consistency requirements [91].
3. Compute the WENO weighted coefficients on the characteristic variables for cell Ci,j as
EN O
ĉW
p,n
=
k
X
ωlp ĉlp,n ,
n = 1, . . . , K̃,
p = 1, . . . , m
l=1
EN O
4. Transform the limited coefficients ĉW
back to coefficients for the conservative
n
variables, using
EN O
EN O
cW
= Rns ĉW
,
n
n
and save these limited coefficients.
72
n = 1, . . . , K̃
(6.1.42)
6.1 The method of lines
Here we used = 10−5 , r = 4 and λ1 = 103 according to [97]. This procedure will be repeated
for all directions s ∈ {(i − 1/2, j), (i, j + 1/2), (i + 1/2, j), (i, j − 1/2)}.
Now we are left with a set of limited coefficients for each direction ns . We would like to select
the smoothest set of coefficients among these, which can be accomplished with an ENO-type
selection, as depicted below for the 2D case. Note that we have four directions, ns , in 2D, while
we would have six direction, according to the six faces, in 3D.
• Suppose we have a local numbering of the four directions s = (i − 1/2, j), (i, j + 1/2), (i +
1/2, j), (i, j − 1/2), namely l = 1, . . . , 4, then compute the oscillation indicators σlp (as
defined in (6.1.41)) for to the four sets (l = 1, . . . , 4) of coefficients (6.1.42).
• The smoothest set of coefficients is selected according to an ENO-type algorithm
(
1 if σlp = min(σ1p , . . . , σ4p )
p
ωl =
(6.1.43)
0 else
• The coefficients for the reconstruction polynomials in conservative variables, valid in the
whole cell Ci,j are then given by
EN O
cW
p,n
=
4
X
ωlp clp,n
n = 1, . . . , K̃,
p = 1, . . . , m
(6.1.44)
l=1
This sort of limiting yields very accurate results, but is expensive in comparison with a simple
componentwise limiting.
Note that limiting on characteristic variables gives no direct treatment to handle negative
density or pressure due to the reconstruction, since there is no explicit limiting on those
(primitive) variables. One simple way to deal with this challenge is to use the final WENO
EN O
reconstruction q̃W
obtained by taking the coefficients of (6.1.44) to reconstruct point
i,j
values on e.g. Gaussian points (used by quadrature rules) and take those point values for a
transformation to primitive variables. If the density or the pressure is negative at one of the
Gaussian points considered, the whole polynomial q̃i,j can be switched to first order by setting
all coefficients to zero, which yields a constant representation by the cell average.
Limiting on primitive variables
In this section we consider one simple but computationally effective way for a WENO limited
reconstruction on primitive variables for general logically rectangular grids. Working on
primitive variables is convenient to maintain physically meaningful properties of the system,
such as the density and the pressure of a fluid, which should remain positive.
For an example of a transformation of conserved variables to primitive ones, consider the
conserved variables of the 2D Euler equations of gas dynamics [65], q = (ρ, ρu1 , ρu2 , E)T . ρ is
called the density of a fluid, u1 , u2 are the velocities in the x-, y-direction, respectively. E is the
total energy and can be decomposed into kinetic energy and the specific internal energy
E=
1
+ ρ(u21 + u22 ),
|2 {z
}
p
γ−1
| {z }
specific internal energy
73
kinetic energy
A two-dimensional high-order unstaggered constrained transport method for logically
rectangular grids based on the method of lines
where γ is a constant, known as the adibatic index. Let us now consider a componentwise
reconstruction of the discrete version of the conserved quantities on cell Ci,j , namely q̃i,j . From
the form of the conserved quantities q, it is clear that a usual componentwise limiting on
the conserved variables using e.g. the WENO algorithm could lead to a control of oscillatory
behaviour in the conserved quantities. Nevertheless, the pressure could be negative due to
oscillations produced by the reconstruction in the pressure, which is not controlled explicitly.
The primitive variables of the 2D Euler equations are given by w = (ρ, u1 , u2 , p)T . One can
easily transform the conserved variables q into the primitive variables w by setting
q1

q2 /q1
w=

q3 /q1
q2
(1 − γ)(q4 − 21 ( q21 +



.

q32
))
q1
(6.1.45)
It is obvious that the above mentioned problem could be handled by taking the reconstruction
and limiting componentwise on the primitive variables. This yields the following WENO
algorithm
1. Transform the cell averages of the discrete conservative variables for the whole grid into
discrete primitive variables, denoted by W (using e.g. (6.1.45) for the Euler equations).
2. Use the multidimensional reconstruction procedure as described in section 6.1.1, to obtain
a reconstruction polynomial w̃i,j on each cell. Store the coefficients of this polynomial on
a central stencil Si,j = S1 and on sectorial stencils Sl for l = 2, . . . , k = Smax (which can
be chosen in the same way as in section 6.1.3).
3. Compute the nonlinear weights componentwise (p = 1, . . . , m) for each reconstruction
w̃l = (w̃l1 , . . . , w̃lm )T of each stencil Sl using (6.1.38) - (6.1.41).
4. Compute the WENO polynomial of cell Ci,j by
w̃pW EN O
=
k
X
ωlp w̃lp
l=1
on primitive variables.
This reconstruction can now be used to compute fluxes at the cell edges or fluctuations in the
cell and at the cell edges. Note that we have considerably less computational cost compared
to the limiting on characteristic variables, since only one transformation per cell, together
with only one application of the componentwise limiting is needed. Furthermore, in the case
of characteristic variables we had to do the limiting in each direction ns for s denoting the
edges of the cell, together with an ENO-type limiting to select the smoothest reconstruction
among those. However, this simple algorithm can be at most second order accurate, due to the
following reason.
In a finite volume framework we represent the discrete conserved quantities on cell Ci,j by
using cell averages Qi,j . These are in particular a second order accurate representation of the
conserved quantities at the cell centre (due to the mid-point rule). Consequently the simple
transformation of e.g. the pressure by the cell averaged quantities yields the following discrete
74
6.1 The method of lines
4
representation of the pressure denoted by Wi,j
1 q¯2 q¯2
4
Wi,j
= (1 − γ)(q¯4 − ( 2 + 3 ))
2 q¯1 q¯1
1 (Q2i,j )2 (Q3i,j )2
= (1 − γ)(Q4i,j − ( 1 +
))
2 Qi,j
Q1i,j
(6.1.46)
(6.1.47)
´
with q¯p = |C1i,j| Ci,j qp dC for p = 1, . . . , m. Since the integrals of the conserved quantities, q¯p ,
are approximated to second order by the cell averaged quantities, we can not hope to have a
better than second order accurate approximation, if we use the transformation in step (1.) of
the above algorithm, no matter how accurate the reconstruction in primitive variables will be.
It is possible to increase the order of accuracy for the transformation between conservative
and primitive variables for finite volume methods, at least on Cartesian and smoothly varying
mapped grids, see e.g. [70]. However, this approach will not be considered in this thesis,
since it is limited to logically rectangular grids having a smooth inverse mapping. Which is a
requirement that is not necessary for the approach advocated here.
6.1.4
High-order semi-discrete form for conservation laws in 1D
Consider the integral conservation law in 1D
ˆ
ˆ
∂t q dV = −
f · n dA = −[f (q(xi+1/2 , t)) − f (q(xi−1/2 , t))]
Ω
(6.1.48)
∂Ω
which has to hold on any control volume Ω. One might derived the conservation form of a
finite volume method by integrating over a cell Ci , averaging by the volume of the cell |Ci | and
integrating in time.
However, in this section we build our method on the so called semi-discrete form of (6.1.48),
which can be achieved, by taking
ˆ
1
1
q dx = −
(f (q(xi+1/2 , t)) − f (q(xi−1/2) , t))
(6.1.49)
∂t
∆x Ci
∆x
and discretizing the right hand side
Fi−1/2 ≈ f (q(xi−1/2 , tn )).
(6.1.50)
Let Qi (t) denote the cell average of the conserved quantity at time t, then can we write the
method in the form
1
∂t Qi (t) = −
(Fi+1/2 (t) − Fi−1/2 (t)).
(6.1.51)
∆x
We call (6.1.51) the semi-discrete form of the conservation law, which defines a system
of ODEs for the cell average values.
Note that if we have a smooth flux function f and a reconstruction, q̃, of order p to q on smooth
solutions, we obtain
Fi−1/2 − f (qi−1/2 ) = O(∆xp ) and
Fi+1/2 − f (qi+1/2 ) = O(∆xp ),
(6.1.52)
(6.1.53)
for q being sufficiently smooth. Consequently, the right hand side of (6.1.51) is a pth order
approximation to the right hand side of (6.1.49), in the presence of a sufficiently smooth solution
structure.
75
A two-dimensional high-order unstaggered constrained transport method for logically
rectangular grids based on the method of lines
Qpi−1
Qpi
Qpi−1
1st order
Qpi
Qpi−1
2nd order
Qpi
3rd order
Figure 6.3: Example of interface values of reconstructions from the left and right for a
polynomial reconstruction of 1st -, 2nd - and 3rd order. A Riemann solver can be used to obtain
one consistent value at the interface, depending on both reconstructed values (left and right).
High-order spatial discretization for conservation laws
The right hand side of (6.1.51) will now be discretized by a numerical flux function Fi−1/2 =
+
−
+
F(Q−
i−1/2 , Qi−1/2 ), where Qi−1/2 and Qi−1/2 are values at the interface xi−1/2 to the left and
right. The values are obtained by pth order accurate WENO reconstructions, evaluated at the
+
interface i.e. q̃i−1 (xi−1/2 ) = Q−
i−1/2 and q̃i (xi−1/2 ) = Qi−1/2 .
+
Having Q−
i−1/2 and Qi−1/2 we can use a monotone and consistent two point flux function,
such as the Godunov flux or the Rusanov flux, see [65] or section 6.1.5 below. This provides
a spatial discretization of order p (for smooth solution structures) to the right hand side of
(6.1.51), while being essentially non-oscillatory on discontinuities.
6.1.5
Multidimensional
rectangular grids
spatial
discretization
on
logically
So far we discussed high-order accurate (limited) reconstructions of the quantities needed to
compute the fluxes (or fluctuations) on each cell, as well as a 1D spatial discretizations for
conservation laws. To obtain a multidimensional high-order approximation to the underlying
PDE, we also need to consider high-order accurate quadrature formulas for the integrals needed.
In this section we consider a generalization of the spatial discretization, introduced above, to
two-dimensional logically rectangular grids as well as a discretization based on fluctuations.
Hyperbolic conservation laws
Consider the two-dimensional conservation law in short form
qt + ∇ · F = 0
(6.1.54)
with F = (f 1 |f 2 ). We take the semi-discrete form of the finite volume method for a logically
rectangular cell in two space dimensions Ci,j . The change of the cell average of the conserved
76
6.1 The method of lines
quantity in this grid cell is described by
¨
1
∇ · F dA
∂t Qi,j (t) = −
|Ci,j | Ci,j
‹
1
F · ν dl
= −
|Ci,j | ∂Ci,j
4 ˆ
1 X
= −
(F · ν)In dl
|Ci,j | n=1 ∂CIn
"ˆ
ˆ
1
(F · n)i+1/2,j dl −
(F · n)i−1/2,j dl
= −
|Ci,j | ∂Ci+1/2,j
∂Ci−1/2,j
#
ˆ
ˆ
+
(F · n)i,j+1/2 dl −
(F · n)i,j−1/2 dl ,
∂Ci,j+1/2
∂Ci,j−1/2
where ν ∈ R2 is the outward pointing normal vector along the outer boundary of the grid cell
and n is the normal direction as shown in Figure 6.1. Note that ni−1/2,j is the outward pointing
normal vector to cell Ci−1,j and inward pointing normal to Ci,j (which will be frequently used
in the numerical computations). Furthermore In ∈ R2 ,
In ∈ {(i − 1/2, j), (i, j + 1/2), (i + 1/2, j), (i, j − 1/2)}
are the indices for the edges of cell Ci,j . We can describe the grid cell in reference coordinates
(ξ, η) using the bilinear map (6.1.14). At each edge either ξ or η are zero or one. The line
integrals over the cell sides can be discretized using e.g. Gaussian quadrature of appropriate
order.
Let us consider the discretization of the left edge as an example. Using
X(0, η) = (1 − η)x0 + ηx1 ,
(6.1.55)
for 0 ≤ η ≤ 1 we can describe the left side of cell Ci,j . Defining the tangent vector to the edge
ti−1/2,j = (X(0, η))η = x1 − x0 ,
(6.1.56)
we can obtain the outward pointing normal vector to cell (i − 1, j) and inward pointing normal
to (i, j) to be
x21 − x20
kni−1/2,j kni−1/2,j =
.
(6.1.57)
−(x11 − x10 )
Consequently the line integral on the left edge can be written as
ˆ
ˆ 1
(F · n)i−1/2,j dl =
F(X(0, η)) · ni−1/2,j |`|i−1/2,j dη,
(∂C)i−1/2,j
0
where |`|i−1/2,j = kX(0, η)η k2 represents the length of the side (∂C)i−1/2,j . This can now
be discretized using Gaussian quadrature of appropriate order, e.g. using the well known
one-dimensional Gauss Legendre quadrature, to obtain
ˆ 1
F(X(0, η)) · ni−1/2,j |`|i−1/2,j dη
0
Ng
1X
l
≈
βl (F̆i−1/2,j
)|`|i−1/2,j .
2 l=1
77
(6.1.58)
A two-dimensional high-order unstaggered constrained transport method for logically
rectangular grids based on the method of lines
l
Here F̆i−1/2,j
≈ (F(X(ξ¯l , η̄l )) · ni−1/2,j ), is the discrete flux, Ng the number of Gaussian
points, βl the Gaussian weights and ξ¯l , η̄l being the transformed Gaussian points on [0, 1] for
l
can be discretized using the solutions of
a Gaussian-Legendre quadrature. The term F̆i−1/2,j
rotated Riemann problems at the Gaussian points or by a monotone flux function as explained
in the following.
Numerical fluxes in normal direction
We have to solve Riemann problems on each edge of the cell Ci,j to obtain a stable spatial
discretization especially in the presence of discontinuous solutions. In the multidimensional
case we need to solve one dimensional Riemann problems in normal direction to the considered
side at each Gaussian point.
Consider the left side of cell Ci,j , denoted by ∂Ci−1/2,j .
The flux normal to this side at Gaussian point l will be denoted by
+
(F(X(ξ¯l , η̄l )) · ni−1/2,j ) = F(Q−
gl , Qgl ) · ni−1/2,j
+
1
2
−
+
2
= f 1 (Q−
gl , Qgl )ni−1/2,j + f (Qgl , Qgl )ni−1/2,j ,
where gl = (i − 1/2, j)l , l = 1, . . . , Ng is the lth Gaussian point on the side (i − 1/2, j)
+
and Q−
gl , Qgl are the reconstructed values to the left and to the right of the Gaussian point.
Note that the normal vector ni−1/2,j is constant along the side in the case of a 2D logically
+
rectangular grid. The points Q−
gl , Qgl can be obtained by the limited reconstruction for cell
Ci−1,j and cell Ci,j . We want to approximate the boundary integrals using one dimensional
Riemann solutions of locally linearized jacobian matrizes in the considered normal direction.
For an introduction concerning one dimensional Riemann solutions in general normal direction
for constant coefficient linear systems, see [65]. We can write a one dimentional system in
normal direction as
qt + ∂n F(q) = 0
⇔ qt + n1 fx1 + n2 fy2 = 0.
(6.1.59)
(6.1.60)
The locally linearized quasi-linear system in normal direction n = ni−1/2,j at gl can be stated
as
qt + M̆gl ∂n q = 0,
(6.1.61)
M̆gl = Mg1l n1i−1/2,j + Mg2l n2i−1/2,j .
(6.1.62)
with the system matrix
Now we are left with the one dimensional Riemann problem consisting of (6.1.61), with initial
+
data Q−
gl and Qgl to the left and right of the Gaussian point gl . Using the eigenvectors of M̆gl
and writting the flux in normal direction as F̆(q) = F(q) · ni−1/2,j , we can decompose the flux
difference
−
∆(F̆)li−1/2,j = (F(Q+
gl ) − F(Qgl )) · ni−1/2,j
78
6.1 The method of lines
into f-waves as defined in section 5.1.2. The fluctuations can be generalized in normal direction
ni−1/2,j , with respect to gl , by defining
X
1 X p
(6.1.63)
Zg l ,
Zgpl +
Ă+ ∆Qli−1/2,j :=
2 p
p
p:s̆gl =0
p:s̆gl >0
Ă− ∆Qli−1/2,j :=
X
1 X p
Zg l ,
2 p
Zgpl +
p:s̆pgl <0
(6.1.64)
p:s̆gl =0
with s̆pgl being the pth eigenvalue of M̆gl and the f-waves are defined in an analogous way as in
section 5.1.2, but with respect to gl . The discrete flux function in normal direction denoted by
F̆i−1/2,j , can now be defined as
l
+
l
F̆i−1/2,j
:= F̆(Q+
gl ) − Ă ∆Qi−1/2,j
(6.1.65)
−
l
= F̆(Q−
gl ) + Ă ∆Qi−1/2,j .
This approach yields very accurate solutions in particular in regions with discontinuous
solutions. Nevertheless, it can be quite expensive to use, since we need a full wave decomposition
of the linearized matrix M̆gl at every Gauss point at every edge of every cell.
Note that a high-order accurate reconstruction for the values Q± on the interfaces lessens the
need for a very accurate solution of the Riemann problem in most cases.
Therefore, it is often satisfactory to use a high-order reconstruction together with a
computationally cheaper approximate solutions to the Riemann problem without loosing much
of the resolution, as already noted in e.g. [91]. Some cheaper approximate Riemann solvers
are the HLL, HLLE solvers [65]. The Rusanov flux is in particular a consistent monotone flux
which can be generalized for high-order reconstructed values Q±
gl in normal direction using
1
−
+
−
l
F̆i−1/2,j
= (F̆(Q+
gl ) + F̆(Qgl ) − agl (Qgl − Qgl ))
2
p
with agl = max(|s̆gl |), p = 1, . . . , m.
(6.1.66)
Fluctuation form for conservation laws
Consider the quasi-linear form of (6.1.54), which can be restated to be
qt + M 1 (q)qx + M 2 (q)qy = 0.
(6.1.67)
The fluctuation form of a finite volume method for conservation laws as introduced in the
context of the wave propagation method in section 5.1, can now be generalized to high-order
methods on two-dimensional logically rectangular grids. This can be obtained in a rather
natural way, based on a discretization of (6.1.67). We can write the semi-discrete form as
!
2
X
−1
∂t Qi,j (t) =
A∆Qi,j +
[(|`|Ă+ ∆Q)In + (|`|Ă− ∆Q)In +en ] .
(6.1.68)
|Ci,j |
n=1
Here In ∈ R2 , In ∈ {(i − 1/2, j), (i, j − 1/2)} are the lower edges of the cell Ci,j and en ∈ R2
denotes the canonical basis vectors for n = 1, 2. The inner integral is
A∆Qi,j := A1 ∆Qi,j + A2 ∆Qi,j
ˆ
ˆ
1
=
M (q̃)q̃x dC +
Ci,j
Ci,j
79
(6.1.69)
M 2 (q̃)q̃y dC.
(6.1.70)
A two-dimensional high-order unstaggered constrained transport method for logically
rectangular grids based on the method of lines
We can transform this inner integral to the reference cell 0 ≤ ξ, η ≤ 1 using the bilinear map
(6.1.14), which gives
ˆ
M 1 (q̃)q̃x + M 2 (q̃)q̃y dC
Ci,j
1
¨
[M 1 (q̃(X(ξ, η)))q̃(X(ξ, η))x + M 2 (q̃(X(ξ, η))q̃(X(ξ, η))y ]|DX(ξ, η)| dC.
=
0
Together with the reconstruction q̃ and the partial derivatives of it, we can compute this
integral using multidimensional quadrature rules, see e.g. [94]. Note that the absolute value of
the determinant for the Jacobian of the bilinear map, denoted by |DX(ξ, η)|, is not constant
and needs to be evaluated at each quadrature point.
The boundary integrals are approximated using fluctuations in normal direction n, which
corresponds to the wave motion into the cell or out of the cell. The fluctuations have the
following property
ˆ
+
−
M 1 (q)qx + M 2 (q)qy dl.
(6.1.71)
(|`|Ă ∆Q)In + (|`|Ă ∆Q)In ≈
∂CIn
In a similar way as for the fluxes, we can discretize the line integral of e.g. the left side (In =
(i − 1/2, j)) as follows
ˆ
+
Ă+ ∆Q(l) dl
(|`|Ă ∆Q)i−1/2,j :=
∂Ci−1/2,j
ˆ
1
Ă+ ∆Q(X(0, η))|`|i−1/2,j dη
=
0
ng
≈
1X
βl (Ă+ ∆Qli−1/2,j )|`|i−1/2,j
2 l=1
(6.1.72)
where Ă+ ∆Qli−1/2,j are fluctuations at the lth Gaussian point on the left edge.
Numerical fluctuations in the normal direction
We now generalize the fluctuations defined in section 5.1, to general normal direction on each
Gaussian point. To do this we pick a particular direction, say, ni−1/2,j and consider a, locally
linearized, system matrix of (6.1.67) at the Gaussian point gl = (i − 1/2, j)l
M̆gl = Mg1l n1i−1/2,j + Mg2l n2i−1/2,j .
(6.1.73)
In the same way as described for the fluxes, above, we can define the fluctuations based on
f-waves, which works only for conservation laws, at least in this direct extension1 .
In a rather similar way as described in section 5.1.6 we can use the eigenvalues and eigenvectors
of (6.1.73) to decompose the jump
−
∆Qli−1/2,j = Q+
gl − Qgl
1
See [66] for extensions to non-conservative hyperbolic systems based on f-waves.
80
(6.1.74)
6.1 The method of lines
into waves Wgpl with wave speeds s̆pgl .
Using these waves and wave speeds we are able to define fluctuations in normal direction at
the Gaussian point gl as follows
+
Ă
∆Qli−1/2,j
m
X
=
(s̆pgl )+ Wgpl
Ă− ∆Qli−1/2,j =
p=1
m
X
(s̆pgl )− Wgpl .
(6.1.75)
(6.1.76)
p=1
Alternatively, we can define the fluctuations by constructing, at each interface, a simple path
of the quantity q in state space as described in section 7.2. Note in particular that methods of
the form (6.1.68) can be applied both for the discretization of the 2D MHD equations as well
as the scalar non-conservative transport equation (4.0.2) for the magnetic potential.
6.1.6
A diffusive limiting with respect to the derivative
Let us now turn to a limiting strategy for the magnetic potential that can be used in the method
of lines context and on logically rectangular grids. The limiting with respect to the derivative
as considered in section 5.1.6 relies on the wave propagation algorithm and is based on TVD
limiters, which limits the accuracy of magnetic field to at most second order.
Since we use a different discretization here and aim to be able to have an accuracy of higher
than second order on smooth solutions, we introduce a new limiting strategy that fits into this
framework.
The strategy is first explained for the 1D advection equation
qt + uqx = 0,
(6.1.77)
where q : R × R+ → R is continuous but not necessarily continuously differentiable. The
advection speed u ∈ R is assumed to be constant and we restrict to the case u > 0. We use
the method introduced above (1D case) for the spatial discretization, together with the third
order accurate SSP Runge Kutta method to update the advected quantity q. In order to limit
the solution we add artificial viscosity2 to the problem, i.e. instead of (6.1.77) we approximate
an advection diffusion equation (regularized equation) of the form
qt + uqx = ε(x) qxx .
(6.1.78)
This scalar advection-diffusion equation can also be written as a system of first order equations
(which is often easier to discretize in hyperbolic schemes)
qt + uqx = ε(x) dx ,
d − qx = 0.
(6.1.79)
(6.1.80)
Diffusive limiting on the solution
The limiting strategy below is inspired by the viscosity limiting proposed by Persson et al. [79].
Note that we already introduced a diffusive limiting strategy in section 5.2.2, which is related
2
In the context of the evolution of the magnetic potential in ideal MHD, the term numerical viscosity really
refers to numerical resistivity.
81
A two-dimensional high-order unstaggered constrained transport method for logically
rectangular grids based on the method of lines
to the strategy here. The difficulty is to appropriately choose the added viscosity to avoid
spurious oscillatory behaviour while not lowering the order of accuracy on smooth solutions.
In addition, the limiting should not restrict the time step dictated by the CFL condition.
Usually the viscosity, ε(x), is chosen such that a thin layer is added to the solution near
discontinuities, to be able to resolve the possible discontinuous data as a steep gradient (of the
regularized equation). Near discontinuities Persson et al. [79] proposed to take ε = O(∆xs /p)
with ∆xs being a characteristic mesh size (∆xs = ∆x in 1D) and p the order of the
approximating polynomial.
Moreover the artificial viscosity should be zero (ε = 0) away from discontinuities, which allows
an approximation of order p to smooth data.
This approach was found to be slightly inferior to usual shock capturing techniques of finite
volume methods, such as e.g. WENO limiting, in cases of low polynomial approximation
order (p = 1, 2). However, for high-order polynomial approximations the situation is found
to be different, since the amount of viscosity needed to resolve the shock profile is only
O(∆xs /p). Keeping ∆xs fixed the amount of artificial viscosity needed, scales like 1/p and
the accuracy in the neighbourhood of the shock becomes O(∆xs /p), which is favorably to most
standard approaches (see [79]). To detect discontinuities in the solution q in the context of a
Discontinuous Galerkin finite element discretization, Persson et al. [79] introduced a smoothness
indicator (α∗ ), which (roughly speaking) requires the approximate solution to be at least
continuous. The amount of viscosity, depends on the smoothness indicator Se and is taken
to be constant on each cell. The smoothness indicator is defined as
Se =
(q∗ − q̂, q∗ − q̂)e
,
(q∗ , q∗ )e
where q∗ denotes a local pth order expansion of the solution and q̂ is a truncated expansion
up to order p − 1. (·, ·)e denotes the standard inner product in L2 at the element Ωe . For a
possible comparison of the artificial viscosity chosen by [79], to the viscosity introduced by the
new method of the next sub-section, we present the formulas of [79] below



0 if α < s0 − κ
ε=
η
2


η
0)
1 + sin π(α−s
2κ
if s0 − κ ≤ α ≤ s0 + κ
if α > s0 + κ.
Here, α = log10 (Se ) and the parameter η ∝ ∆xs /p, s0 ∝ 1/p4 and κ is chosen empirically,
sufficient large as to obtain a sharp but smooth solution-profile.
Diffusive limiting on the derivative
The key idea of this section is to redefine the amount of viscosity added, by introducing a new
smoothness indicator which adds artificial viscosity to the solution, depending on a discontinuity
(or steep gradient) in the derivative, qx , of the solution, q, rather than on the solution itself as
shown above.
The requirements, which we want to be satisfied by ε(x), can be summarized as follows.
1. It should be small enough to satisfy the stability constraint
ε(x)∆t
1
≤
2
(∆x)
2
82
(6.1.81)
6.1 The method of lines
with a time step, which is dictated by the underlying hyperbolic system (CFL condition)
of the explicit time-stepping method.
2. It should be large enough to avoid spurious oscillations in the computed derivative of q
(due to Gibbs phenomenon).
3. The artificial viscosity should not degrade the accuracy of the scheme for smooth solution
structures.
To be able to handle all these requirements we define the viscosity as follows, using the set
I(S) = {i − 1, i, i + 1}, denoting the indices of the corresponding stencil S = {Ci−1 , Ci , Ci+1 }.
We define
(
0
if S ≤ σi ,
ε := ηα = η 1 + sin π ∆S − π2
if S > σi ,
2
with
η = 0.2
(∆x)2
,
∆t
(6.1.82)
and the smoothness indicator
( π
1
1
+
sin
π
∆S
−
S > σi ,
2
α= 2
0
S ≤ σi ,
(6.1.83)
where
S = max(σi−1 , σi+1 ), ∆S = S − σi ,
σ̃l
λl
σl = P
, σ̃l =
,
((∆x)4 + θl )e
v∈I(S) σ̃v
ˆ
1
θl =
(∂xx q̃l |Cl |2 )2 dC, l ∈ I(S).
|Cl | Cl
(6.1.84)
The parameters are set to be λi−1 = λi+1 = 1 and e = 4. λi may be set empirically, typically
λi ∈ [102 , 105 ] gives satisfying results in this configuration. Here the general concept is, the
higher the value λi , the steeper the gradient (of the derivative in cell Ci ) has to be, in order to
introduce the limiting viscosity. η is the maximum amount of viscosity
that can be added and
P
α is a smoothness indicator with values α ∈ [0, 1), since we have l∈I(S) σl = 1 and σl ∈ (0, 1),
σl > 0 for all l ∈ I(S). The values are chosen in such a way that α approaches 1 on very steep
gradients in the derivative of the reconstruction in Ci (i.e. steep second derivative, resulting
in θi >> θi−1 , θi+1 ). Furthermore α is 0 in smooth regions of the derivative (θi−1 , θi+1 ≈
θi ). Consequently, the diffusive limiting will only influence the accuracy of the scheme, if
α 6= 0 i.e in the case of a steep gradient detected by the smoothness indicator. Otherwise
the full approximation order of the underlying scheme can be reached. This fact is confirmed
numerically, see Table 6.1.6 below.
From the form of the viscosity, it is clear that we do not obtain a further time step restriction
due to the viscosity limiting. Since ε = O(∆x) (at least) we are always consistent with the
underlying PDE. Now we can test this limiting on a 1D advection example that was first
introduced in [89].
83
A two-dimensional high-order unstaggered constrained transport method for logically
rectangular grids based on the method of lines
(a)
(b)
Figure 6.4: The solution to the 1D advection equation and its derivative on a periodic domain
after one revolution using the 3rd order algorithm. panel (a) shows how standard WENO
limiting performs on the solution, and panel (b) shows how the limiter proposed in this thesis
performs.
Consider (6.1.77) with u = 1 on the interval 0 ≤ x ≤ 1 and double periodic boundary conditions.
The initial data is the following piecewise linear function


0





(x − 0.25)/0.075
q(0, x) = 2



(0.75 − x)/0.075



0
if
if
if
if
if
x ≤ 0.25,
0.25 ≤ x ≤ 0.4,
0.4 ≤ x ≤ 0.6,
0.6 ≤ x ≤ 0.75,
0.75 ≤ x.
Note that q(0, x) is continuous, but its first derivative is discontinuous. The challenge is to
control oscillations in both q(t, x) and qx (t, x).
We compare the solution and its derivative as computed by two different limiters: (a) a standard
WENO limiter that is essentially non-oscillatory in q(t, x), but not necessarily in qx (t, x), and (b)
the proposed limiter as described above. Third order accurate average values of the derivatives
84
6.1 The method of lines
Mesh
100
200
400
Order
L1 Error in q
9.542 × 10−4
1.205 × 10−4
1.510 × 10−5
2.996
L1 Error in qx
3.035 × 10−3
3.715 × 10−4
4.582 × 10−5
3.019
Table 6.1: Error tables for the 1D advection example to confirm 3rd order of accuracy on a
smooth solution structure using the proposed limiting strategy.
qx (t, x) are computed by
ˆ x 1
i
i+ 2
1 h 1
qx (t, x) dx =
q t, xi+ 1 − q t, xi− 1
2
2
∆x x 1
∆x
i− 2
1
1 1 −
+
−
+
≈
Qi+ 1 (t) + Qi+ 1 (t) −
Qi− 1 (t) + Qi− 1 (t) .
2
2
2
2
∆x 2
2
(6.1.85)
We use a CFL number of 0.7 in both simulations and a linear weight of λi = 105 . The solution
and its derivative at time t = 1 (i.e., after one revolution) are shown in Figure 6.4, where panel
(a) is the WENO limiter and panel (b) is the proposed limiter. The approximation of q(1, x)
looks very similar in both cases. However, there are obvious differences in the computed results
for qx (t, x); the proposed limiter avoids spurious oscillations in qx (t, x). In comparison with the
TVD scheme of [89] the limiting introduced here (which can also be used in a one-step scheme)
seems to be slightly more diffusive. This however is a general problem if a method of lines
approach is used instead of a Lax-Wendroff type method.
The ability of the scheme to reach the full order of accuracy on smooth solutions is confirmed
in the following test example. We consider (6.1.78) with u = 1, x ∈ [−5, 5] and initial data
2
q0 (x) = e−x ,
2
(q0 (x))x = e−x (−2x).
(6.1.86)
The computation of the derivative and settings of the limiter and the CFL number are the
same as above. The results are compared with the exact solutions q0 (x − ut), (q0 )x (x − ut) at
time t = 0.5 and the L1 error is shown in Table 6.1.6. One can clearly see that we obtain 3rd
order of accuracy to the solution and to the derivative.
Multidimensional limiting with respect to the derivative
The limiting strategy as introduced above can be generalized to multidimensional mapped grids
in the following way. Consider the scalar advection equation in 2D
qt + u1 qx + u2 qy = 0,
(6.1.87)
a regularized equation of (6.1.87) can be written as
qt + u1 qx + u2 qy = ε(x, y)∇2 q.
(6.1.88)
Note that the regularized equation (6.1.88) can in particular be written as a first order system
qt + u1 qx + u2 qy = ε(x, y)∇ · d
d = ∇q.
85
(6.1.89)
(6.1.90)
A two-dimensional high-order unstaggered constrained transport method for logically
rectangular grids based on the method of lines
We can now apply a usual spatial discretization for the left hand side of (6.1.88), see section
6.1.5. The second derivatives, needed for the right hand side of (6.1.88), can either be obtained
by introducing further field variables (6.1.90) and store a constructed first derivative, or by
using the the second derivative of the reconstruction itself (for a polynomial degree of p ≥ 2).
A multidimensional strategy to define the viscosity ε = εi,j , can be stated as a straight-forward
extension of the 1D strategy in the following sense. Consider the stencil S consisting of cell Ci,j
and all immediate neighbours in 2D that share an edge or a corner with Ci,j . Like in the 1D
case we denote I(S) to be the set of indices corresponding to the stencil S. Now we can define
ε := ηα,
(6.1.91)
with
η = 0.2
(∆xs )2
∆t
(6.1.92)
and the smoothness indicator
( 1
α=
2
1 + sin π ∆S −
π
2
0
S > σi,j ,
S ≤ σi,j
(6.1.93)
where
S=
max (σl ),
l∈I(S)\(i,j)
σl = P
σ̃l
v∈I(S)
1
θl =
|Cl |
ˆ
σ̃v
,
σ̃l =
∆S = S − σi,j ,
λl
,
((∆x)4 + θl )e
(∇2 q̃l |Cl |)2 dC,
(6.1.94)
l ∈ I(S).
Cl
The parameters λl , λi,j , e are chosen analogously to the 1D case. Moreover, ∆xs is chosen to be
the smallest edge of cell Ci,j . For the definition of the viscosity, η, we can also use η = O(∆xs )
(e.g. η = 0.5∆xs ), by taking the time step restriction (6.1.81) into account.
This approach can be extended to linear systems by applying it componentwise. Moreover it
can be generalized to 3D by extending the stencil S to be all neighboring grid cells that share
a face, an edge or a corner point with the considered grid cell Ci,j,k . For the computation of
θ, the Laplacian of q̃ in 3D is used and (|Cij |) is replaced by (|Cijk |). As characteristic length
(∆xs ) in the computation of η and σ, we use the smallest edge of the considered grid cell Ci,j,k .
An numerical example in 2D
Let us consider a multidimensional extension of a similar test example as for the 1D case in
section 6.1.6.
Consider the scalar advection equation (6.1.87) with u1 = u2 = 1 on the computational domain
86
6.1 The method of lines
√
(x, y) ∈ [0, 2]2 with periodic boundary conditions


(s − 0.25)/0.075





2





(0.75 − s)/0.075
q(x, y, 0) = (s − 0.25)/0.075



2





(0.75 − s)/0.075



0
everywhere and initial data
if 0.25 ≤ s ≤ 0.4,
if 0.4 ≤ s ≤ 0.6,
if 0.6 ≤ s ≤ 0.75,
if 1.25 ≤ s ≤ 1.4,
if 1.4 ≤ s ≤ 1.6,
if 1.6 ≤ s ≤ 1.75,
else.
(6.1.95)
for s = cos(β)x − sin(β)y with β = −π/4. Note that this is exactly two times the initial profile
of the 1D example of section 6.1.6 along the diagonal axis of the computational domain. Using
this configuration one can directly apply periodic boundary conditions without modifications.
Figure
√ 6.5 shows a scatter plot of the approximated partial derivative in x-direction at time
t = 2 (after one evolution along the diagonal) together with the exact derivative qx (red
line) of the initial data. The partial derivative has been computed using the same high-order
strategy as presented in section 7.5, below. A 3rd order accurate version of a conservative spatial
discretization, as described in section 6.1.5, has been used for the scalar equation (6.1.87). For
the temporal discretization we utilize the third order strong stability preserving Runge-Kutta
method of section 6.1.
We use the multidimensional limiter with λi,j = 104 and a CFL number of 0.5, in both cases.
This example shows that the proposed diffusive limiter can be extended to multidimensional
Cartesian and mapped grids. For further information about the mapping, see section 6.3.
87
A two-dimensional high-order unstaggered constrained transport method for logically
rectangular grids based on the method of lines
(a)
t=1.4142135
10
8
8
6
6
4
4
2
2
0
qx
qx
t=1.4142135
10
0
−2
−2
−4
−4
−6
−6
−8
−8
−10
−10
0
0.5
1
1.5
0
0.5
1
1.5
(b)
0
0.5
1
1.5
0
0.5
1
1.5
1.4
1.2
1
y
0.8
0.6
0.4
0.2
0
0
0.2
0.4
0.6
0.8
1
1.2
1.4
x
(c)
Figure 6.5: (a) shows a scatter plot on a (200 × 200) Cartesian mesh along the diagonal
s = cos(β)x
√ − sin(β)y with β = −π/4 of the approximated partial derivative in x-direction, at
time t = 2, after one complete evolution along the diagonal. The red line shows the exact
solution. (b) shows the same computation on the mapped grid depicted in (c), with the same
amount of grid cells. One can observe that the limiting works on the Cartesian and mapped
grid.
88
6.2 Outline of the constrained transport algorithm and temporal discretization
6.2
Outline of the constrained transport algorithm and
temporal discretization
Having described the spatial discretization for the conservative ideal MHD equations and the
non-conservative scalar advection equation, together with the new limiting with respect to
the derivative for the magnetic vector potential, we are now ready to present the temporal
discretization of our new CT method.
The temporal discretization couples the temporal update of the conserved quantities (MHD
variables) with the temporal update of the magnetic vector potential, using a SSP Runge-Kutta
method. To explain this coupling, step by step, we denote the semi-discrete form of the MHD
equations (2.1.4) by
∂t Qmhd (t) = L1 (Qmhd (t)),
(6.2.1)
where Qmhd (t) represents the grid function at time t consisting of all cell averaged values of
the conserved quantities from the MHD equations (ρ, ρu, E, B). L1 (Qmhd (t)) represents the
spatial discretization of the MHD equations as described in section 6.1.5, using WENO limited
reconstructions.
The semi-discrete form of the evolution equation for the potential (3.4.22) has the general form
∂t QA (t) = L2 (QA (t), Qmhd (t)),
(6.2.2)
where QA (t) is the grid function at time t consisting of the cell averaged values of the magnetic
vector potential, A. Note that the evolution of the potential depends on the velocity field,
which we take to be given from the solution step of the MHD equations. This is reflected in the
notation used in (6.2.2). For the spatial discretization of the potential equation in 2D (scalar
advection equation) we take the discretization of section 6.1.5 together with the limiting of
section 6.1.6.
We can write both systems (6.2.1) and (6.2.2) as one, by introducing
QM HD (t)
∂t U(t) = ∂t
(6.2.3)
QA (t)
and
L1 (Qmhd (t))
L (QM HD (t), QA (t)) =
L2 (QA (t), Qmhd (t))
(6.2.4)
∂t U(t) = L∗ (QM HD (t), QA (t)).
(6.2.5)
∗
to be
If the discrete spatial operator L∗ (QM HD (t), QA (t)) is computed to the desired order of
accuracy, we can update both QM HD and QA in time to the desired order of accuracy, using
an appropriate time discretization, like a SSP Runge-Kutta method of the desired order of
accuracy. However, updating both systems in this way does not give any divergence-free update
of the magnetic field at the end of time step tn+1 , since we have not used the magnetic potential
to compute it, so far.
Exactly this coupling will be done in the following by recomputing the magnetic field from
the magnetic potential in each sub-stage of a SSP Runge-Kutta method. This might introduce
problems in terms of accuracy (and stability), if the magnetic potential is evolved with a velocity
89
A two-dimensional high-order unstaggered constrained transport method for logically
rectangular grids based on the method of lines
field computed at the wrong intermediate time. However, we obtained good results (up to third
order) by treating the velocity field as being part of an unsplit time integration as shown above,
resulting in the velocity field computed at the last sub-stage of the Runge Kutta method.
We now explain one time step of the constrained transport algorithm using the three stage 3rd
order SSP Runge-Kutta method of section 6.1, which has the following form
(1)
(1)
Stage 1. Start with Qmhd = Qnmhd and QA = QnA , then update via
(2∗)
(1)
(1)
Qmhd = Qmhd + ∆t L1 Qmhd ,
(2)
(1)
(1)
(1)
QA = QA + ∆t L2 QA , Qmhd ,
(2∗)
where Qmhd = ρ(2) , (ρu)(2) , E (2) , B(2∗) and B(2∗) denotes the predicted value of the
(2∗)
magnetic field in the first Runge-Kutta stage. The magnetic field components of Qmhd
(2)
(2)
are then replaced by ∇ × QA ; we denote this result by Qmhd = ρ(2) , ρu(2) , E (2) , B(2) .
(1)
(1)
(2)
(2)
Stage 2. Start with Qmhd , QA , Qmhd , and QA , then update via
1 (2)
1
3 (1)
(2)
(3∗)
Qmhd = Qmhd + Qmhd + ∆t L1 (Qmhd ),
4
4
4
3 (1) 1 (2) 1
(3)
(2)
(2)
QA = QA + QA + ∆t L2 (QA , Qmhd ).
4
4
4
(3∗)
The magnetic field components of Qmhd = ρ(2) , ρu(3) , E (3) , B(3∗) are then replaced by
(3)
(3)
∇ × QA ; we denote this result by Qmhd = ρ(3) , ρu(3) , E (3) , B(3) .
(1)
(1)
(3)
(3)
Stage 3. Start with Qmhd , QA , Qmhd , and QA , then update via
1 (1)
2 (3)
2
(∗)
(3)
Qmhd = Qmhd + Qmhd + ∆t L1 (Qmhd ),
3
3
3
1 (1) 2 (3) 2
(3)
(3)
Qn+1
= QA + QA + ∆t L2 (QA , Qmhd ).
A
3
3
3
(∗)
The magnetic field components of Qmhd = ρn+1 , ρun+1 , E n+1 , B(∗) are then replaced by
n+1
n+1
∇ × Qn+1
, ρun+1 , E n+1 , Bn+1 ).
A ; we denote this result by Qmhd = (ρ
rd
For smooth solutions, this procedure gives an update of the grid function Qn+1
mhd that is 3 order
accurate in time. This fact is confirmed numerically via test computations done in section 7.7.
In each stage, we take one Euler step on the magnetic vector potential equation (3.4.22). In
each of these stages we evaluate the spatial discretization operator, L2 , at the current values
of the potential, QA , and the current velocity values that can be obtained from Qmhd . Just
as in the constrained transport approaches as presented in section 3.4.3 and chapter 5, during
the Euler step on the evolution equation of the magnetic potential, we view the velocity u as
a given function and thus view the evolution equation (3.4.22) as a closed equation for the
magnetic potential A.
Discretization of ∇ × A on logically rectangular grids
A discretization of ∇ × A on logically rectangular mapped grids can be derived as 2D version
of the discretization introduced for 3D hexahedral mapped grids in section 7.5.
90
6.3 The rotor example
6.3
The rotor example
As numerical test for the proposed algorithm to solve the MHD equations we consider the rotor
example [89], [96] on both a Cartesian and a logically rectangular grid (Figure 6.6). The logically
rectangular mapped grid is of the same form as Figure 6.5c and is a slightly modified version
of the circular inclusion grid shown in [16]. Note, that this mapping is non-smoothly varying
(along the diagonals of the circular inclusion) and thus has no continuously differentiable inverse
mapping. This could result in difficulties, when trying to transform the physical coordinates
into a set of orthogonal reference coordinates. The proposed algorithm, however, works directly
in physical coordinates using least squares reconstructions and thus works well even on this
non-smoothly varying mapping. For the computation, we take a domain with (x, y) ∈ [0, 1]2
and zeroth order extrapolated boundary conditions on all four sides. We used a grid resolution
of 256 × 256 and a CFL number of 0.5. Here a 3rd order spatial reconstruction together with
a WENO limiting on characteristic variables as described in section 6.1.3 taking Smax = 9,
with all immediate neighbouring reconstructions as sectorial stencils, has been used. In order
to compute the fluxes on each interface for the base scheme, a linearized Riemann solver with
the entropy scaled eigenvectors, as discussed in section 2.2, has been applied. The magnetic
potential uses fluctuations based on the 2D version of the generalized Rusanov fluxes of section
7.4. For the limiting with respect to the derivative as described above, we took η = 0.5∆xs and
λi,j = 103 . The initial data can be interpreted as a dense rotating disk of fluid with ρ = 10,
u1 =p
−v0 (y − 0.5)/r0 and u2 = v0 (x − 0.5)/r0 out to the radial distance r < r0 = 0.1 where
r = (x − 0.5)2 + (y − 0.5)2 . The ambient fluid is at rest with ρ = 1 and u1 = u2 = 0 for
r > r1 = 0.115. The fluid between the rotating and the ambient fluid at r0 < r < r1 has linear
density and angular speed profiles with ρ = 1+9f , u1 = −f v0 (y−0.5)/r and u2√= f v0 (x−0.5)/r,
where f = (r1 − r)/(r1 − r0 ). We use v0 = 1, p = 0.5 (pressure), B1 = 2.5/ 4π, B2 = 0 and
the adiabatic index γ = 5/3. We set A3 = B1 y for the initial magnetic potential and use
boundary conditions as discussed in section 5.2.4. It can be seen that the proposed algorithm
works well on both, the Cartesian and the non-smoothly varying, mapped grid. Furthermore,
the numerical solution compares well with the results obtained in [89] and [96].
(a)
(b)
Figure 6.6: (a) shows a contour plot of the magnetic pressure kBk2 /2, computed by the proposed
CT-algorithm, at time t = 0.295 on a Cartesian grid with 256 × 256 grid cells. (b) shows this
computation on the mapped grid of the same form as shown in Figure 6.5c, using the same
amount of grid cells.
91
A two-dimensional high-order unstaggered constrained transport method for logically
rectangular grids based on the method of lines
92
Chapter 7
A high-order unstaggered and unsplit
constrained transport method for 3D
hexahedral grids
Let us now extend the CT method introduced in chapter 6 to 3D hexahedral grids1 . This
method generalizes the 3D concept of section 5 in the following ways
1. We remove the need for operator splitting by switching to an appropriate method of lines
discretization together with a non-conservative finite volume method for the evolution
equation of the magnetic vector potential.
2. We increase the spatial and temporal order of accuracy of the entire method to third
order, using a third-order SSP Runge Kutta time-stepping method and a third-order
finite volume spatial discretization. (The method should be extendable to any order of
accuracy.)
3. We develop the method to be applicable on both Cartesian and general hexahedral
mapped grids.
We use the CT method depicted in section 6.2 for the temporal discretization of the 3D
scheme. In this chapter, we start with the generalization of the spatial reconstruction and
spatial discretization of the previous chapter, to 3D hexahedral mapped grids. Thereafter we
discuss an unsplit spatial discretization of general non-conservative hyperbolic systems and in
particular linear weakly hyperbolic systems, which leads to a high order accurate discretization
of the (possibly weakly hyperbolic) evolution equation of the magnetic vector potential. We
discuss the discretization of ∇ × A on mapped grids as well as the satisfaction of a discrete
divergence-free condition. Finally we present several numerical test computations.
7.1
The
Multidimensional reconstruction on 3D hexahedral
grids
multidimensional
reconstruction
on
three-dimensional
hexahedral
grids
is
a
1
Some results of this chapter have already been submitted in march 2012 [50], with major contributions of
the author.
93
A high-order unstaggered and unsplit constrained transport method for 3D hexahedral grids
x5
x7
x4
1
1
x2
X(ξ, η, ζ)
η
x6
x1
ζ
0
ξ
x0
1
x3
Figure 7.1: An example of a hexahedral cell in physical space (x, y) (right hand side) and the
corresponding reference cell with coordinates (ξ, η, ζ).
straight-forward extension of the reconstruction on two-dimensional logically rectangular
grids. In this section we present the trilinear map and how it is used for the computation of
the multidimensional integrals arising in the reconstruction procedure. Moreover, we make
some remarks on reconstruction stencils used in this thesis.
The bilinear map as described in section 6.1.1 can easily be extended to a trilinear map
by taking the bilinear map for the upper and lower surfaces and interpolate between those
surfaces. This yields the following representation of the cell Ci,j,k in reference coordinates
0 ≤ ξ, η, ζ ≤ 1
X(ξ, η, ζ) = c000 + c100 ξ + c010 η + c001 ζ
+ c110 ξη + c101 ξζ + c011 ηζ + c111 ξηζ
(7.1.1)
with c000 = x0 , c100 = (x3 − x0 ), c010 = (x1 − x0 ), c001 = (x4 − x0 ), c110 = (x2 − x1 + x0 − x3 ),
c101 = (x7 −x4 +x0 −x3 ), c011 = (x5 −x4 +x0 −x1 ) and c111 = (x6 −x5 +x4 −x7 +x3 −x0 +x1 −x2 ).
See Figure 7.1 for an example of a cell with corresponding reference cell in local reference
coordinates. Note that we recover the two-dimensional bilinear map (6.1.14) by setting ζ = 0.
The trilinear map (7.1.1) can be used to compute the volume of the cell Ci,j,k , denoted by
|Ci,j,k |, using the determinant of the Jacobian
ˆ 1ˆ 1ˆ 1
∂X
dξ dη dζ.
(7.1.2)
|Cijk | =
∂(ξ, η, ζ)
0
0
0
In particular the basis functions for the reconstruction matrix, can be computed by
three-dimensional quadrature rules [94], on the reference cell. E.g. for X(ξ, η, ζ) =
(X1 (ξ, η, ζ), X2 (ξ, η, ζ), X3 (ξ, η, ζ))T we have
ˆ
ˆ 1ˆ 1ˆ 1
∂X
1
x − xi,j,k dC =
(X1 (ξ, η, ζ) − x1i,j,k )
dξ dη dζ,
(7.1.3)
∂(ξ, η, ζ)
Ci,j,k
0
0
0
where x1i,j,k denotes the x-component of the coordinate vector xi,j,k , representing the cell center.
Furthermore, the faces of the cell can be represented as follows. The face corresponding to
(i, j, k − 1/2) for example (i.e. lower face in z-direction) is described by
X(ξ, η, 0) = c000 + c100 ξ + c010 η + c110 ξη,
(7.1.4)
which maps the points of the reference cell ξ, η ∈ [0, 1] to a so called ruled surface embedded
in R3 , spanned by the four corners of the corresponding side of the hexahedral cell.
94
7.1 Multidimensional reconstruction on 3D hexahedral grids
In a similar way we obtain the lower face in x-direction and y-direction, using X(0, η, ζ) and
X(ξ, 0, ζ). The upper faces of each direction can be described by replacing 0 with 1 in the
description above. In order to further describe the grid cell surface, belonging to (i, j, k − 1/2),
we define vectors
t(1) :=
∂X
= c100 + c110 η,
∂ξ
t(2) :=
∂X
= c010 + c110 ξ,
∂η
which are tangent vectors to coordinate lines at the spanned surface. The surface metric tensor
(aij )i,j=1,2 is defined as
aij := t(i) · t(j) , i, j, = 1, 2
(7.1.5)
and a = a11 a22 − a12 a21 denotes the determinant of the metric tensor, which is used to compute
areas, as described below. The unit normal vector to the grid cell face can be computed by
ni,j,k−1/2 :=
t(1) × t(2)
.
|t(1) × t(2) |
(7.1.6)
Note, as before ni,j,k−1/2 is an outward pointing normal to cell (i, j, k−1) and an inward pointing
normal for cell (i, j, k). The area element dA on the grid cell interface transforms according to
dA :=
√
a dξ dη = |t(1) × t(2) | dξ dη.
(7.1.7)
Note that the vector n and the determinant a are functions of ξ and η. Analogously we can
express the area element and a normal vector at all other grid cell faces. Now we can compute
the area of the face at I3 = (i, j, k − 1/2)
¨
|A|I3 :=
1 dA
∂CI3
ˆ
1
ˆ
=
0
1
√
a dξ dη
0
as well as an averaged normal direction at the interface
¨
1
c
nI3 :=
t(1) × t(2) dA
|A|I3 ∂CI3
ˆ 1ˆ 1
p
1
=
(t(1) × t(2) ) a(ξ, η) dξ dη.
|A|I3 0 0
Note on stencil selection on 3D hexahedral grids
The general remarks of section 6.1.1 also apply for the three-dimensional case. We use the
following stencil for linear reconstructions
S = {Ci,j,k , Ci−1,j,k , Ci,j+1,k , Ci+1,j,k , Ci,j−1,k , Ci,j,k−1 , Ci,j,k+1 }.
(7.1.8)
For quadratic reconstructions we use all immediate neighbours by excluding the eight corners
(cells that just share a single point with cell Ci,j,k ). For further suggestions about stencils that
could be used on 3D mixed grids (triangular- and hexahedral grids), see [101].
95
A high-order unstaggered and unsplit constrained transport method for 3D hexahedral grids
7.1.1
Multidimensional spatial discretization on 3D hexahedral
grids
Finally, we extend the spatial discretization for logically rectangular grids of section 6.1.5 to
three dimensional hexahedral grids. In most parts this is a straight-forward extension from
what has been described for logically rectangular grids using the trilinear map.
Nevertheless, some care has to be taken, since the faces of a three-dimensional hexahedral cell
are surfaces depending on the four corners of the hexahedron at that side. Therefore we have
to compute surface integrals on each side of the cell, to define the fluxes and fluctuations in
normal direction to the considered surface. Note that in contrast to logically rectangular grids
(2D), where normal vectors are constant on each edge, the normal vectors on the corresponding
side of a hexahedral grid cell (3D) may vary, due to possible surface curvature. This requires
the computation of normal vectors on each point (of the surface), where they are needed (e.g.
Gaussian quadrature points). Furthermore, for the surface integrals along the sides, we have
to take the surface element into account.
Conservation laws
Consider a three-dimensional hyperbolic system of the general form
qt + ∇ · F = 0,
where the columns of the matrix F = (f 1 |f 2 |f 3 ) are the flux functions in the x−, y− and
z−direction, respectively. We consider the semi-discrete form of the finite volume method for
a three-dimensional grid cell Cijk . The change concerning the cell average of the conserved
quantity in grid cell Ci,j,k is described by
˚
1
∇ · F dV
∂t Qijk (t) = −
|Cijk |
Cijk
"
(7.1.9)
1
=−
F · ν dA,
|Cijk | ∂Cijk
where ν is the outward pointing normal vector along the outer boundary of the grid cell. At
each face of a three-dimensional grid cell, one of the variables ξ, η, ζ is either zero or one and
the face is represented by a ruled surface, see section 7.1. Using this fact, together with the
normal direction as defined in section 7.1, we can express (7.1.9) on the reference cube by
"ˆ ˆ 1
1 p
p
−1
∂t Qijk (t) =
F · n(η, ζ) a(η, ζ) 1 − F · n(η, ζ) a(η, ζ) 1
dη dζ
|Cijk | 0 0
i+ 2 jk
i− 2 jk
ˆ 1 ˆ 1 p
p
+
F · n(ξ, ζ) a(ξ, ζ)
− F · n(ξ, ζ) a(ξ, ζ)
dξ dζ
i j+ 12 k
i j− 12 k
0
0
#
ˆ 1 ˆ 1 p
p
+
F · n(ξ, η) a(ξ, η)
− F · n(ξ, η) a(ξ, η)
dξ dη .
1
1
0
ij k+ 2
0
ij k− 2
(7.1.10)
We integrate over grid cell faces on the reference cell 0 ≤ ξ, η, ζ ≤ 1 using two-dimensional
Gaussian quadrature rules [94], e.g. a tensor products of the well known one dimensional
96
7.1 Multidimensional reconstruction on 3D hexahedral grids
quadrature rules can be utilized. The fluxes, interface-normal-directions and surface elements
are computed on each Gaussian quadrature point, using a monotone flux function normal to
the face. This can be done as a straight-forward extension to 3D, from what has been presented
for 2D logically rectangular grids, in chapter 6.
Fluctuation form for conservation laws
Consider the quasi-linear system
qt + M 1 (q)qx + M 2 (q)qy + M 3 (q)qz = 0,
(7.1.11)
where M l = ∂q f l for l = 1, 2, 3 are the flux Jacobian matrices in each direction. We can write
a semi-discrete form of (7.1.11) in a similar way as in section 6.1.5, and obtain
!
3
X
−1
A∆Qi,j,k +
[(|A|(Ă+ ∆Q))In + (|A|(Ă− ∆Q))In +en ] .
∂t Qi,j,k (t) =
|Ci,j,k |
n=1
Here |A| denotes the surface area of the corresponding cell face. In ∈ R3 ,
In = {(i − 1/2, j, k), (i, j − 1/2, k), (i, j, k − 1/2)}
are the indices for the lower faces of the cell Ci,j,k in x-, y- and z-direction, respectively. en ∈ R3 ,
n = 1, 2, 3 are the canonical basis vectors.
We denote the fluctuation in normal direction as Ă+ ∆QIn . This leads to the following
discretization for the contribution of face In = (i, j, k − 1/2) for wave motion into cell Ci,j,k in
normal direction nIn ,
¨
+
(|A|Ă ∆Q)In =
Ă+ ∆QIn dA
ˆ
∂CIn
1ˆ 1
p
[Ă+ ∆Q(X(ξ, η, 0)) a(ξ, η)]In dξdη.
=
0
(7.1.12)
0
Equation (7.1.12) can be discretized using multidimensional quadrature rules together with a
discrete representation of the fluctuations at the quadrature points ξ¯l , η̄m in normal direction,
+
¯
denoted by Ă+ ∆Ql,m
In := Ă ∆Q(X(ξl , η̄m , 0))In . This discrete representation can be chosen as
an extension to 3D from what is explained in section 6.1.5. Using e.g. a tensor product of 1D
Gaussian quadrature rules, we can write the discretization as
ˆ 1ˆ 1
p
[Ă+ ∆Q(X(ξ, η, 0)) a(ξ, η)]In dξdη
0
≈
0
ng ng
1XX
4
√ l,m
a)In .
βl βm Ă+ ∆Ql,m
(
In
l=1 m=1
Finally we can compute the inner integral
A∆Qi,j,k = A1 ∆Qi,j,k + A2 ∆Qi,j,k + A3 ∆Qi,j,k
˚
=
M 1 (q̃)q̃x + M 2 (q̃)q̃y + M 3 (q̃)q̃z dC,
(7.1.13)
Ci,j,k
using three-dimensional quadrature rules / cubature rules in a straight forward generalization
of the computation on 2D logically rectangular grids in section 6.1.5.
97
A high-order unstaggered and unsplit constrained transport method for 3D hexahedral grids
7.2
Spatial discretisation of non-conservative hyperbolic
systems
Let us first discuss some discretizations of non-conservative hyperbolic systems in 1D, before
focusing on 1D weakly hyperbolic systems and the generalizations to 3D.
7.2.1
Non-conservative hyperbolic systems
In this section we discuss some discretizations to general hyperbolic systems of the quasi-linear
form
qt + N (q)qx = 0,
(7.2.1)
which are not necessarily conservation laws. In the following we refer to hyperbolic quasi-linear
systems where N (q) is not a flux Jacobian, as non-conservative hyperbolic systems. This is
related to the fact that these systems do not reduce to a conservation law which means that
they can not be written in divergence form.
A first-order discretization
It turns out that the semi-discrete fluctuation form
∂t Qi (t) = −
1
(A+ ∆Qi−1/2 + A− ∆Qi+1/2 )
∆x
(7.2.2)
is a quite convenient form to work with in the case of non-conservative hyperbolic systems.
One famous way to solve non-conservative hyperbolic systems uses path-conservative methods.
In the following we discuss the basic ideas of path-conservative methods in slightly more detail,
since it will have a close relation to the discretization for weakly hyperbolic systems.
For conservation laws, the well known Rankine-Hugoniot condition, see e.g. [65], can be derived
from the integral form of the conservation law. This condition is essential for the determination
of the correct propagation speed of a discontinuity. Basically the Riemann solver is built up
in such a way as to satisfy this condition, which makes it a feasible method to deal with
discontinuous solution structures in an accurate way. Note that if q is discontinuous at
some point, then qx contains delta functions supported at the same points where N (q) is
discontinuous and thus the “non-conservative product” N (q)qx is not well defined, even in
the distribution sense. Path-conservative methods are based on a theory that gives sense to
the non-conservative product N (q)qx by defining a path Ψ in state space along which N (q)qx
can be measured. This path resolves the ambiguity by determining how q varies within the
discontinuity, which means that it gives sense to the non-conservative product [66]. The idea
behind path-conservative methods is based on the theory of Dal Maso, Lefloch and Murat [26]
(DLM), which regards the non-conservative product, not as a distribution, but as a bounded
Borel measure. Let us briefly motivate the principle2 .
When q is smooth on a Borel set B, this measure is defined by
ˆ
[N (q)qx ](B) :=
N (q)qx dx.
(7.2.3)
B
2
This short review is close to section 2.1 in [20]
98
7.2 Spatial discretisation of non-conservative hyperbolic systems
The problem arises when q is a jump discontinuity at x = {0} (say)
(
QL , x < {0}
q=
.
QR , x > {0}
(7.2.4)
Regarding N (q)qx as a measure it is required that
[N (q)qx ] = Cδ{0} ,
where δ0 is the Dirac measure at x = {0} and C is a constant to be determined. If N (q) would
be a Jacobian matrix N (q) = Df (q),
ˆ [N (q)qx ]({0}) = lim
N (q)qx dx
→0 −
ˆ f (q)x dx
= lim
→0
−
= f (QR ) − f (QL ).
Thus C = f (QR ) − f (QL ) in this case. As a consequence, the definition proposed by DLM is to
introduce a path Ψ, such that Ψ(0) = QL and Ψ(1) = QR and define
ˆ 1
∂Ψ
dl δ{0} .
(7.2.5)
N (Ψ(l))
[N (q)qx ] :=
∂l
0
Then this gives a value to C and does indeed recover the correct results in the case when N (q)
is a Jacobian matrix. This idea motivates the central theorem of Dal Maso-Lefloch-Murat.
Theorem 6. [20], [26] (Dal Maso-LeFloch-Murat Non-Conservative Product) Let Ψ : [0, 1] ×
Rm ×Rm → Rm be a Lipschitz continuous family of paths which satisfies the following properties:
1. ∀QL , QR ∈ Rm ,
Ψ(0, QL , QR ) = QL
Ψ(1, QL , QR ) = QR .
2. ∃k > 0, such that ∀QL , QR ∈ Rm , ∀l ∈ [0, 1],
|
∂Ψ
(l, QL , QR )| ≤ k|QL − QR |.
∂l
3. ∃k > 0, such that ∀QL , QR , Q∗L , Q∗R ∈ Rm , ∀l ∈ [0, 1],
|
Ψ
Ψ
(l, QL , QR ) − (l, Q∗L , Q∗R )| ≤ k(|QL − QR | + |Q∗L − Q∗R |).
∂l
∂l
Then there exist a unique real-valued Borel measure, denoted by [N (q)qx ]Ψ , on R characterized
by:
1. If q is continuous on a Borel set, B, then,
ˆ
[N (q)qx ]Ψ (B) =
N (q)qx dx.
B
99
A high-order unstaggered and unsplit constrained transport method for 3D hexahedral grids
2. If q is discontinuous at the point x0 then,
ˆ 1
∂Ψ
+
+
N (Ψ(l, q(x−
(l, q(x−
[N (q)qx ]Ψ ({x0 }) =
0 ), q(x0 )))
0 ), q(x0 )) dl.
∂l
0
This Borel measure is called the non-conservative product of N (q) and qx .
Using the non-conservative product, weak solutions are defined as follows.
Definition 7. We say q is a weak solution of (7.2.1) if and only if
ˆ ˆ
qφt + [N (q)qx ]Ψ φ dxdt = 0,
R+
R
as measures, for all test functions φ ∈ C01 (R × R+ ).
Moreover, this weak formulation allows us to define a generalized Rankine-Hugoniot Jump
Condition as given by LeFloch [40].
Theorem 7. [20] (DLM Rankine-Hugoniot Jump Condition). Let Ψ be the family of paths as
in Theorem 6. Let q be a solution to (7.2.1) in the weak sense, with respect to this family of
paths, and let q be smooth throughout a region D, except along a curve x = γ(t) which divides
D into two regions DL and DR , and along which q has a jump discontinuity. Then,
ˆ 1
∂Ψ
0
γ (t)(QR − QL ) =
N (Ψ(l, QL , QR ))
(l, QL , QR ) dl,
∂l
0
where,
QR (t) =
lim
(x,t)→(γ(t),t),
q(x, t),
QL (t) =
lim
q(x, t),
(x,t)→(γ(t),t),
(x,t)∈DL
(x,t)∈DR
are the values of q at either side of the discontinuity.
In practical problems it is frequently difficult to determine the correct path and often a
straight-line path is used. The following path, which connects two states QR , QL in state
space, will be referred to as a straight-line path
Ψ(l) = Ψ(l, QL , QR ) := QL + l(QR − QL ),
0 ≤ l ≤ 1.
(7.2.6)
Using the straight-line path in state space, the generalized Rankine-Hugoniot condition for a
discontinuity can be written as
ˆ 1
N (Ψ(l)) dl(QR − QL ) = γ 0 (t)(QR − QL ).
(7.2.7)
0
Definition 8. [19] A function N (Ψ(l, QL , QR )) : [0, 1] × Rm × Rm → Rm×m is called a Roe
linearization if it satisfies the following properties
• for any QL , QR ∈ Ω ⊂ Rm and all l with 0 ≤ l ≤ 1, N (Ψ(l, QL , QR )) has m distinct real
eigenvalues,
• for every Q ∈ Ω, N (Ψ(l, Q, Q)) = N (Q), for all l
100
7.2 Spatial discretisation of non-conservative hyperbolic systems
• for any QL , QR ∈ Ω
ˆ
1
N (QL , QR )(QR − QL ) :=
N (Ψ(l, QL , QR ))
0
∂Ψ
(l, QL , QR ) dl.
∂l
In the following we refer to
AΨ := N (QL , QR )
with the properties above as Roe matrix.
The Roe matrix can be used, along with the straight-line path for a rigorous definition of a
path-conservative method by splitting
ˆ 1
∂Ψ(l))
AΨ ∆ Qi−1/2 =
N (Ψ(l))
dl
∂l
0
ˆ 1
N (Ψ(l)) dl ∆Qi−1/2 .
=
0
±
into left- and right-going fluctuations A ∆Qi−1/2 .
The generalized Rusanov method
One way to obtain a path-conservative method for non-conservative hyperbolic systems is by
using a generalization of the Rusanov flux, together with the Roe matrix. Note that the
following approach will be particularly important for weakly hyperbolic systems, as discussed
later in this chapter.
According to [19], the left- and right going fluctuations can be defined as
1
A+ ∆Qi−1/2 := [AΨi−1/2 + α(QL , QR )Id](QR − QL )
2
1
A− ∆Qi−1/2 := [AΨi−1/2 , −α(QL , QR )Id](QR − QL )
2
where α(QL , QR ) is a positive number such that
(7.2.8)
(7.2.9)
|spi−1/2 | ≤ α(QL , QR ), p = 1, . . . , m.
Here sp represents the eigenvalues of the Roe matrix (AΨ ). Note that we only need an estimate
of the fastest eigenvalue and thus only partial knowledge of the eigenstructure is required.
Let us give a motivation of the form considered here and some properties related to the
fluctuation form (7.2.2).
The relation to the Rusanov flux can be seen by considering the case of a conservation law in
∂f
quasi-linear form, which means N (q) = M (q) = ∂q
is a Jacobian matrix. In this situation the
generalized Rankine-Hugoniot condition of theorem (7) reduces to the usual Rankine-Hugoniot
condition
f (QR ) − f (QL ) = s(QR − QL ).
This allows the Roe matrix to be written as
ˆ
1
AΨi−1/2 (QR − QL ) =
M (Ψ(l))
ˆ0 1
(7.2.10)
∂Ψ(l)
dl
∂l
∂f (Q(l))
dl
∂l
0
= f (QR ) − f (QL ).
=
101
A high-order unstaggered and unsplit constrained transport method for 3D hexahedral grids
Consider the first order case, which means QR = Qi and QL = Qi−1 . If we use the above
derivation of the Roe matrix in formulas (7.2.8) and (7.2.9), these fluctuations coincide with
the following ones
Rus
A− ∆Qi−1/2 = Fi−1/2
− f (Qi−1 )
+
A ∆Qi−1/2 = f (Qi ) −
Rus
Fi−1/2
,
(7.2.11)
(7.2.12)
Rus
is the Rusanov flux in the x-direction, which can be obtained from (6.1.66).
where Fi−1/2
Plugging these fluctuations in the fluctuations form (7.2.2) yields exactly the semi-discrete
Rusanov method.
This shows that the generalized Rusanov method reduces to the conservative Rusanov method
in the case of a conservation law.
Another important property of the fluctuations is
ˆ
+
1
−
A ∆Qi−1/2 + A ∆Qi−1/2 =
N (Ψ(l, QL , QR ))
0
∂Ψ
(l, QL , QR ) dl,
∂l
(7.2.13)
which plays a double role. On the one hand this property is used to approximate the
punctual contribution associated with the discontinuity at the boundary of each cell and on
the other hand (due to the second Roe-linearization-property) it is a consistency requirement.
Further properties of the generalized Rusanov fluctuations (7.2.8), (7.2.9) such as the positivity
preserving property can be proved, see [19].
A necessary condition for stability of the generalized Rusanov method for linear
systems
Note that we use the index
√ j for the grid spacing in this subsection to avoid confusion with the
imaginary number i = −1.
The above mentioned property (7.2.13) would also be satisfied by defining fluctuations in the
form
1
[AΨj−1/2 ]
2
1
:=
[AΨj−1/2 ].
2
A+ ∆Qj−1/2 :=
(7.2.14)
A− ∆Qj−1/2
(7.2.15)
This, however, yields a generally unstable method as we see later in this section. The particular
form of the fluctuations (7.2.8) and (7.2.9) are due to stability reasons. We discuss the stability
for the resulting method
Qn+1
= Qnj −
j
∆t +
(A ∆Qj−1/2 + A− ∆Qj+1/2 ).
∆x
(7.2.16)
Assume we apply (7.2.16) to a constant coefficient linear hyperbolic system with periodic
boundary conditions
qt + N qx = 0,
102
(7.2.17)
7.2 Spatial discretisation of non-conservative hyperbolic systems
with q ∈ Rm , N ∈ Rm×m . Using the fluctuations (7.2.8) and (7.2.9) the method can be written
in the form
∆t +
(A ∆Qj−1/2 + A− ∆Qj+1/2 )
∆x
∆t
= Qnj −
[AΨ (Qj − Qj−1 ) + α(Qj − Qj−1 )
2∆x
+ AΨ (Qj+1 − Qj ) − α(Qj+1 − Qj )]
∆t
[AΨ (Qj+1 − Qj−1 ) − α(Qj+1 − 2Qj + Qj−1 )] .
= Qnj −
2∆x
Qn+1
= Qnj −
j
(7.2.18)
According to ([75], page: 107) von Neumann analysis for this problem is possible (there a
similar analysis is done for the Lax-Wendroff method). Each of the components of Q will be a
multiple of the same Fourier mode which is denoted by
(Qnj )p = (g)n eiξ(j∆x) ,
p = 1, . . . , m.
(7.2.19)
We look for solutions of the form
Q̂n+1 (ξ) = (g)n eiξ(j∆x) Q̂,
(7.2.20)
where Q̂ is a constant vector. A necessary condition for stability of the scheme is
|g| ≤ 1.
For (7.2.20) being a solution, if applied to the scheme (7.2.18), the following system
∆t
∆t
(sin(ξ∆x)) +
α(cos(ξ∆x)Id − Id)) Q̂ = 0
gId − (Id − iAΨ
∆x
∆x
(7.2.21)
needs to hold. For this to be true, Q̂ needs to be an eigenvector of AΨ . Assume we take the
eigenvector Q̂ corresponding to the eigenvalue of largest magnitude (λp = α) and introduce
ν = α∆t
, then we obtain
∆x
[gId − (Id − iν(sin(ξ∆x)Id) + ν(cos(ξ∆x)Id − Id))] Q̂ = 0.
(7.2.22)
This yields
g = 1 − iνsin(ξ∆x) + ν(cos(ξ∆x) − 1) (for all components)
⇒ g = (1 − ν) + νe−iξ∆x ,
which is a circle of radius ν centered at 1 − ν and thus
p
|g| = (1 − ν)2 + ν 2 + 2(1 − ν)νcos(ξ∆x) ≤ 1,
(7.2.23)
(7.2.24)
(7.2.25)
if 0 ≤ ν ≤ 1. We conclude that the discretization (7.2.16) using the fluctuations (7.2.8) and
(7.2.9) satisfies a necessary condition for stability in the usual 2-norm, provided
ν=
α∆t
≤ 1,
∆x
103
(7.2.26)
A high-order unstaggered and unsplit constrained transport method for 3D hexahedral grids
which is exactly the well known Courant-Friedrichs-Lewy (CFL) condition for a three-point
method. Note that using the unstable fluctuations (7.2.15), we obtain
g = 1 − νsin(ξ∆x),
(7.2.27)
which may be generally unstable in the 2-norm, since |g| might be larger than 1 + K∆t for
K > 0 being a constant.
Comparing the methods using the unstable fluctuations (7.2.15) and the generalized Rusanov
flux, we see, from (7.2.18), that the unstable method is extended by the term
−
α∆x (Qj+1 − 2Qj + Qj−1 )
∆t α
( (Qj+1 − 2Qj + Qj−1 )) = −∆t(
).
∆x 2
2
∆x2
(7.2.28)
This additional term can be interpreted as numerical diffusion, since using it, we rather
approximate a system of the form
qt + N qx = βqxx ,
(7.2.29)
with β = ∆xα/2. Nevertheless, this approximation is still consistent with the original system
(7.2.17) to O(∆x), since β depends on the grid spacing.
A note on the computation of the Roe-matrix
In the non-conservative case we typically use the straight-line path to compute the Roe matrix
ˆ
AΨ =
1
N (Ψ(l, QL , QR )) dl.
(7.2.30)
0
This integral can either be computed analytically, which may be difficult for complicated
systems, or numerically as proposed in [17].
Possible problems using path-conservative methods
Path-conservative methods have been applied successfully in many applications (e.g. [17],
[66],[31]).
However, Castro et al. [18] reported that non-conservative schemes generate a convergence error
source-term, which is supported on shock trajectories. This error is numerically measured for
some nonlinear systems arising in fluid dynamics. It was found in [18] that this error vanishes
identically only if systems have non-conservative products associated with linearly degenerate
characteristic fields, which includes linear non-conservative hyperbolic systems. Consequently,
if we view the non-conservative evolution equation of the magnetic potential (4.0.1) as a linear
system, with a given velocity field, this error source-term is not expected to be in the numerical
solution of the magnetic vector potential.
Concerning path conservative schemes applied to nonlinear hyperbolic systems, Abgrall and
Karni [1] observed that a formally path-conservative scheme (for the Euler equations in
Lagrangian coordinates), can converge to the wrong weak solution. An alternative approach
to overcome this shortcomings has been proposed in [39]. This approach relies on entropy
conservative discretizations with suitable chosen numerical diffusion operators.
104
7.2 Spatial discretisation of non-conservative hyperbolic systems
A high-order discretization
Consider the integral form of (7.2.1), i.e.
ˆ
ˆ
1
1
∂t (
q dx) = −
N (q)qx dx.
∆x Ci
∆x Ci
(7.2.31)
Now we can separate the integral on the right hand side into an integral over the inner part of
Ci , denoted by Ċi = (xi−1/2 , xi+1/2 ) and an integral over the boundary ∂Ci . This yields
ˆ
ˆ
1
1
q dx) = −
N (q)qx dx
(7.2.32)
∂t (
∆x Ci
∆x Ċi
#
ˆ xi−1/2 +
ˆ xi+1/2
+ lim
N (q)qx dx + lim
N (q)qx dx . (7.2.33)
→0
→0
xi−1/2
xi+1/2 −
Now we assume to have a smooth representation of the solution q inside each cell Ċi and we
allow discontinuities on the cell boundaries. The inner part (7.2.32) can be approximated using
the polynomial reconstruction q̃ (and derivatives) of the quantities to be
ˆ
ˆ
1
1
N (q)qx dx ≈
N (q̃)q̃x dx = A∆Qi .
(7.2.34)
∆x Ċi
∆x Ċi
The integral (7.2.34) can be computed exactly to the accuracy of the reconstruction polynomial,
by taking e.g. Gaussian quadrature of suitable order. The boundary terms (7.2.33) can be
approximated using the wave propagation interpretation of the solution by solving Riemann
problems at the interfaces xi−1/2 and xi+1/2 , see also section 5.1.2 and 5.1.6. Consider a locally
linearized system matrix N̂i±1/2 ≈ N (q(xi±1/2 )) and corresponding wave speeds in ascending
order λ1i±1/2 < . . . < λm
i±1/2 at the interfaces xi±1/2 . Furthermore, we define the fastest wave
speed at interface xi−1/2 by λl = max(λm
i−1/2 , 0) and the slowest wave speed at xi+1/2 with
1
λr = min(λi+1/2 , 0). Then we can approximate the boundary terms in (7.2.33) as
ˆ
ˆ
xi−1/2 +
N (q)qx dx ≈
lim
→0
xi−1/2
xi−1/2 +λli−1/2 ∆t
lim
∆t→0
N̂i−1/2 qx dx
xi−1/2
≈ A+ ∆Qi−1/2
and
ˆ
N (q)qx dx ≈
lim
→0
ˆ
xi+1/2 +
xi+1/2
xi+1/2 −λri+1/2 ∆t
lim
∆t→0
N̂i+1/2 qx dx
xi+1/2
≈ A− ∆Qi+1/2 .
−
−
+
Here ∆Qi−1/2 = Q+
i−1/2 − Qi−1/2 and ∆Qi = Qi+1/2 − Qi−1/2 , see Figure 7.2 for an illustration of
the impact concerning the different integrals, for the time evolution of the solution. Denoting
Q± = Q±
i−1/2 , generally the sum of the fluctuations can be computed using
ˆ
+
−
+
−
1
N (Ψ(l, Q+ , Q− ))
A ∆Q + A ∆Q = AΨ (Q − Q ) =
0
105
∂Ψ
(l, Q+ , Q− ) dl.
∂l
A high-order unstaggered and unsplit constrained transport method for 3D hexahedral grids
2
Wi−1/2
3
Wi−1/2
1
Wi+1/2
∆t
xi−1/2
xi+1/2
xi−1/2 + s3i−1/2 ∆t
xi+1/2 + s1i+1/2 ∆t
Figure 7.2: The time evolution of the reconstructed solution q̃ for a system with three waves
corresponding to the eigenvalues s1 < 0 < s2 < s3 in cell Ci . Figure is based on [55].
We utilize the same strategies as described above, in order to split AΨ ∆Q into the components
A− ∆Q and A+ ∆Q, using e.g. high-order versions of the fluctuations (7.2.8) and (7.2.9), with
QL = Q− and QR = Q+ , as presented in section 7.4 for the 3D case. The interpretations above,
enable us to write a semi-discrete fluctuation form for (7.2.31) as follows
∂t Qi (t) = −
1
(A+ ∆Qi−1/2 + A− ∆Qi+1/2 + A∆Qi ).
∆x
(7.2.35)
The order of accuracy obtained by using the spatial discretization (7.2.35) can be stated,
provided we have a spatial reconstruction operator for the fluctuations at the boundary as
described in the following.
The usual choice to define a general reconstruction operator is the following3 : given a sequence
{Qi (t)} of values at the cells, first an approximation function is constructed at every cell Ci ,
based on the values of Qi (t) at some neighbor cells (the stencil)
q̃i (x, t) = q̃i (x; Qi−l (t), . . . , Qi+r (t)),
(7.2.36)
for some natural numbers r, l. These approximation functions are computed by an interpolation
or approximation procedure, such as e.g. a ENO, WENO or a least squares reconstruction
+
procedure. Once these functions have been constructed, Q−
i+1/2 (respectively Qi+1/2 ) is
calculated by taking the limit of q̃i (respectively q̃i+1 ) to the left (respectively right) of xi+1/2 .
Consider a spatial reconstruction operator of order p that is, an operator that associates to a
+
given sequence {Qi } two new sequences {Q−
i−1/2 } and {Qi−1/2 }, in such a way that, whenever
ˆ
1
Qi =
q(x) dx
(7.2.37)
∆x Ci
for some smooth function q, we have that
p
Q±
i−1/2 = q(xi−1/2 ) + O(∆x ).
(7.2.38)
With this reconstruction operator we can summarize the spatial accuracy of (7.2.35) in the
theorem below.
3
Description mainly taken from [69].
106
7.2 Spatial discretisation of non-conservative hyperbolic systems
Theorem 8. [69] Consider the discretization (7.2.35) for the system (7.2.31). Let us assume
that N (q) is of class C 2 with bounded derivatives and AΨ is bounded. Let us also suppose that
the pth -order reconstruction operator is such that, given a sequence defined by
ˆ
1
q(x) dx
Qi =
∆x Ci
for some smooth function q, we have that
q̃i (x) = q + O(∆xs ),
∀x ∈ Ci , q̃i,x = qx + O(∆xr ),
∀x ∈ Ci .
Then (7.2.35) is an approximation of order at least γ = min(p, s+1, r+1) to the system (7.2.31)
in the following sense
+
−
−
+
−
A+
i−1/2 (Qi−1/2 (t) − Qi−1/2 (t)) + Ai+1/2 (Qi+1/2 (t) − Qi+1/2 (t))
ˆ xi+1/2
+
N (q̃i (x, t))(q̃i (x, t))x dx
xi−1/2
xi+1/2
ˆ
=
N (q(x, t))qx (x, t) dx + O(∆xγ ),
(7.2.39)
xi−1/2
for every smooth enough solution q, Q±
i+1/2 (t) being the associated reconstructions and q̃i (x, t)
the approximation functions corresponding to the sequence
ˆ xi+1/2
1
Qi (t) =
q(x, t) dx.
(7.2.40)
∆x xi−1/2
Proof.[69] On the one hand, as the reconstruction operator is of order p, we have
+
−
−
+
−
p
A+
i−1/2 (Qi−1/2 (t) − Qi−1/2 (t)) + Ai+1/2 (Qi+1/2 (t) − Qi+1/2 (t)) = O(∆x ).
On the other hand,
ˆ
ˆ
xi+1/2
xi+1/2
N (q̃i (x, t))q̃i,x (x, t) dx −
x
ˆ i−1/2
xi+1/2
N (q(x, t))qx dx
xi−1/2
[N (q̃i (x, t)) − N (q(x, t))]q̃i,x (x, t) dx
=
x
ˆ i−1/2
xi+1/2
N (q(x, t))[q̃i,x (x, t) − qx (x, t)] dx
+
xi−1/2
= O(∆xs+1 ) + O(∆xr+1 ).
The equality (7.2.39) can be derived from the above equality’s. Note that the reconstruction operator introduced in section 6.1.1 yields a pth order accurate
approximation to q in Ci and a (p − 1)th order accurate approximation to qx in Ci . This gives
a pth order accurate approximation in the sense of theorem 8.
Let us briefly consider the case of a variable coefficient non-linear system of the form
qt + N (q, x)qx = 0.
107
(7.2.41)
A high-order unstaggered and unsplit constrained transport method for 3D hexahedral grids
Assume a smoothly varying system matrix N (·, x) within cell Ci . The spatial variation in the
cell is either given or suitable reconstructed and denoted by Ñi (·, x). In this case, we could use
the discretization (7.2.35) with the inner integral defined as
ˆ
ˆ
1
1
N (q, x)qx dx ≈
Ñ (q̃, x)q̃x dx = A∆Qi
(7.2.42)
∆x Ċi
∆x Ċi
and the fluctuations defined by e.g. (7.2.8), (7.2.9). The matrix AΨ for the fluctuations could
be defined, using the straight-line path, to be
ˆ 1
Ñ (Ψ(l), φ(l)) dl.
(7.2.43)
AΨ :=
0
Here φ(l) describes a straight-line path for the spatial variation of the system matrix. See
section (7.3) for a simplified example.
Consider now a matrix of the simpler form N (q, x) = N (x) for the system matrix in (7.2.41).
In this case, we can proceed as presented above and the matrix AΨ (utilizing the straight-line
path) simplifies to be
ˆ 1
AΨ =
Ñ (φ(l)) dl.
(7.2.44)
0
This case is considered in more detail for weakly hyperbolic systems below.
7.3
Weakly hyperbolic systems
To explain problems that can arise for numerical methods discretizing weakly hyperbolic
systems, we first consider a one dimensional model system and then start with a 1D
discretization, which is consistent with weakly hyperbolic systems.
Thereafter, this
discretization will be extended to multidimensional mapped grids to be applicable to the
(possibly weakly hyperbolic) evolution equation of the magnetic vector potential in 3D.
To the best of our knowledge, it is the first time that this kind of method is applied to weakly
hyperbolic systems.
7.3.1
An example which illustrates the difficulty with weakly
hyperbolic systems
Weakly hyperbolic systems differ greatly in the underlying dynamics from strictly of non-strictly
hyperbolic systems, we illustrate this point with the following simple example4 . This system
slightly generalizes the example of section 5.2.1.
Consider the system
1
q
u β q1
= 0,
(7.3.1)
+
q2 t
0 v q2 x
| {z }
N
where β, u, v ∈ R are constant. The eigen-decomposition of the system matrix N can be written
in the form
1
u β
β
1
u 0
0
−1
−1
= RΛR =
·
·
.
(7.3.2)
0 v
v−u 0
0 v u−v u−v β
4
Equations for the example are taken from [65].
108
7.3 Weakly hyperbolic systems
Since the eigenvalues (u and v) are always real, this system is hyperbolic. For all u 6= v, the
system is strictly hyperbolic. For u = v the system is only weakly hyperbolic. Note that in the
case u → v the eigenvectors
β
1
1
2
r =
,r =
0
v−u
are collinear and the matrix R becomes singular.
Moreover, in this case (u = v) the algebraic multiplicity is two, but the geometric multiplicity
is only one.
Observe, that solving a Riemann problem with arbitrary states QL , QR by an eigenvector
decomposition (QR − QL = α1 r1 + α2 r2 ) with α = R−1 (QR − QL ), will not be possible in
the weakly hyperbolic case.
Let us derive an exact solution for the model system (7.3.1). One possibility to obtain such
a solution is, to solve the second equation exactly (which is a scalar advection equation) and
then take a singular source interpretation using Duhamel’s principle, to obtain the solution for
the first equation (see also [65], [60]). This yields
q 2 (x, t) = q 2 (x − vt, 0)
ˆ
(7.3.3)
t
q 1 (x, t) = q 1 (x − ut, 0) − β
qx2 (x − ut + (u − v)τ ) dτ.
(7.3.4)
0
Thus we have in the strictly hyperbolic case (u 6= v)
q 2 (x, t) = q 2 (x − vt, 0)
q 1 (x, t) = q 1 (x − ut, 0) −
β
[q 2 (x − vt, 0) − q 2 (x − ut, 0)].
u−v
If q 2 (x, t) is a differentiable function, then we can also obtain a solution in the weakly hyperbolic
case (u = v), which is
q 2 (x, t) = q 2 (x − vt, 0)
1
1
ˆ
q (x, t) = q (x − ut, 0) − β
1
= q (x − ut, 0) −
t
qx2 (x − vt, 0) dτ
0
βtqx2 (x
− vt, 0).
Note that the change in dynamics between the strictly and weakly hyperbolic regimes is quite
dramatic: in the strictly hyperbolic case the total energy is conserved while in the weakly
hyperbolic case the amplitude of the solution grows linearly in time.
Figure 7.3 shows an evolution of the system (7.3.1) on a domain x ∈ [−1, 1] with initial data
2
q 1 (x, 0) = q 2 (x, 0) = e−(10x) .
(7.3.5)
We use u = v = 1 and β = 1 which is the weakly hyperbolic case for this system. This system
is solved until t = 0.2 and t = 0.5. Note that the system in this example can not be solved
with an eigenvector decomposition as used by classical Riemann solvers, since R−1 is singular.
In this computation we used a 3rd order accurate version of the spatial discretization of the
next section, together with the 3rd order accurate SSP Runge-Kutta method of example 2 in
section 6.1. One can clearly see, that the exact solution (red line) is well approximated. In fact
this example can be used to confirm 3rd order of accuracy for this discretization. Note that the
109
A high-order unstaggered and unsplit constrained transport method for 3D hexahedral grids
Current time = 0.500000
6
4
4
2
2
q1
q1
Current time = 0.200000
6
0
−2
−4
−4
−0.8
−0.6
−0.4
−0.2
0
x
0.2
0.4
0.6
0.8
−6
−1
1
6
6
4
4
2
2
q2
q2
−6
−1
0
−2
0
−2
−4
−4
−0.8
−0.6
−0.4
−0.2
0
x
0.2
0.4
0.6
0.8
−6
−1
1
−0.6
−0.4
−0.2
0
x
0.2
0.4
0.6
0.8
1
−0.8
−0.6
−0.4
−0.2
0
x
0.2
0.4
0.6
0.8
1
0
−2
−6
−1
−0.8
Figure 7.3: An example of the discussed weakly hyperbolic system solved with the discretization
to section 7.3.2 on a grid with 200 grid cells, up to t = 0.2, 0.5. The red line denotes the exact
solution, the blue points are the approximate solutions computed by the algorithm. Observes
the transport and growing deformation, due to the weak hyperbolicty, in component q 1 , in time.
The initial data of q 2 is simply transported.
initial data in both components are the same, however, one can observes that the initial profile
in q 1 is transported and deformed, due to the weak hyperbolicity, while the initial profile in q 2
is simply transported. Furthermore, the amplitude of the deformation growth linearly in time.
For further physical interpretations of this weakly hyperbolic system see [[65], page 365].
7.3.2
One dimensional weakly hyperbolic systems
The evolution equation of the magnetic vector potential is a weakly hyperbolic system with
spatially varying system matrix. Thus we restrict our considerations in this section to weakly
hyperbolic systems of the form
qt + N (x)qx = 0,
(7.3.6)
with q : R × R+ → Rm and N (x) ∈ Rm×m . We assume q to be at least continuous and
the system (7.3.6) is assumed to be weakly hyperbolic, (see definition 6, section 5.2.1). As in
the classical non-conservative hyperbolic case we wish to construct a method of the following
general form
∂t Qi (t) = −
1
(A+ ∆Qi−1/2 + A− ∆Qi+1/2 + A∆Qi ).
∆x
(7.3.7)
However, the terms A± ∆Q can not be approximated by wave (eigenvector) decomposition as
in [5, 56, 63], due to the weak hyperbolicity. Consistent fluctuations A± ∆Q in this case will be
derived below.
Let q̃ be a piecewise polynomial reconstruction of the function q. Furthermore, let Ñ (x) denote
a piecewise polynomial approximation of the matrix N (x)
Ñ (x) = Ñi (x) for x ∈ xi− 1 , xi+ 1 ,
2
2
(7.3.8)
s
Ñi (x) = N (x) + O (∆x ) .
110
7.3 Weakly hyperbolic systems
We denote with Q±
the reconstructed values at the grid cell interface. Analogously we define
i− 21
+
−
1
1
:=
lim
Ñ
x
−
ε
and
N
:=
lim
Ñ
x
+
ε
.
(7.3.9)
Ni−
1
i−1
i
i−
i−
i− 1
ε→0
2
2
2
ε→0
2
Using these reconstructions, we now derive a finite volume discretization of the form (7.3.7)
which approximates the integral terms in the following manner
ˆ x 1 −ε
i+ 2
A∆Qi ≈ lim
N (x) qx dx,
(7.3.10)
ε→0
xi− 1 +ε
ˆ
2
xi−1/2 +ε
A+ ∆Qi−1/2 ≈ lim
ε→0
A− ∆Qi+1/2 ≈ lim
N (x) qx dx,
(7.3.11)
x
ˆ i−1/2
xi+1/2
N (x) qx dx.
ε→0
(7.3.12)
xi+1/2 −ε
The integral in (7.3.10) is approximated by replacing N (x) and q by the approximating
polynomials Ñi and q̃i , i.e.
ˆ x 1
i+ 2
Ñi (x) q̃i,x dx.
A∆Qi :=
xi− 1
2
This integral can then be computed using Gaussian quadrature of appropriate order. In order
to be able to compute these fluctuations, we introduce a regularization of q at each grid cell
interface of the form

Q−
(t)
:
x ≤ xi− 1 − ε,

i− 12

2

x−x
+ε
i− 1
ε
2
Qi− 1 (t, x) =
, t : x ∈ xi− 1 − ε, xi− 1 + ,
Ψi− 1
2ε
2
2
2
2


+

Qi− 1 (t)
:
x ≥ xi− 1 + ε,
2
2
where Ψi− 1 is a path connecting Q−
(t) and Q+
(t). A similar regularization has already been
i− 1
i− 1
2
2
2
introduced by P. Le Floch [40] as an illustration for the definition of a non-conservative product
at a discontinuity. Using this regularization, we first construct an expression for the sum of the
left and right-going fluctuations at the grid cell interface xi− 1 , which should approximate the
2
boundary integral terms, i.e., we wish to express
ˆ x 1 +ε
i− 2
−
+
A ∆Qi− 1 + A ∆Qi− 1 ≈ lim
N (x) qx dx.
2
ε→0
2
xi− 1 −ε
2
This integral is approximated by replacing q with the regularized function Q and by replacing
the matrix N with the piecewise polynomial approximation Ñ (x), i.e., we set
ˆ x 1 +
i− 2
+
ε
−
Ñ (x) Qi− 1 (t, x) dx.
A ∆Qi− 1 + A ∆Qi− 1 = lim
(7.3.13)
2
2
ε→0
xi− 1 −ε
x
2
2
x−xi− 1 +
2
After the substitution l =
and by defining φ(l) := xi− 1 − + l(xi− 1 + − (xi− 1 − )),
2
2
2
2
the integral in (7.3.13) can be written as
ˆ x 1 +
ˆ 1
i− 2
ε
Ñ (x) Qi− 1 (t, x) dx =
Ñ (φ(l)) Ψi− 1 (l, t) dl.
(7.3.14)
xi− 1 −ε
2
x
0
2
111
2
l
A high-order unstaggered and unsplit constrained transport method for 3D hexahedral grids
In order to resolve this integral, we choose the simple straight-line path
+
−
,
Ψi− 1 = Q−
Q
1 + l
1 − Q
1
i−
i−
i−
2
and obtain
ˆ
1
Ñ (φ(l)) Ψi− 1 (l, t)
ˆ
2
0
2
1
dl =
l
0
2
(7.3.15)
2
−
Ñ (φ(l)) dl Q+
(t)
−
Q
(t)
.
i− 1
i− 1
2
(7.3.16)
2
The integral on the right-hand side can be split into two pieces
ˆ 1
ˆ 1/2
ˆ 1
Ñ (φ(l)) dl =
Ñi−1 (φ(l)) dl +
Ñi (φ(l)) dl,
0
0
(7.3.17)
1/2
which corresponds to a division into pieces on the left and right of the (possible) discontinuity
xi− 1 . We then take the limit ε → 0 and obtain
2
ˆ
lim
ε→0
ˆ
1/2
Ñi−1 (φ(l)) dl +
0
!
1
Ñi (φ(l)) dl
1/2
1 −
1 +
= Ni−
N 1 =: N
1 +
2
2
2 i− 2
Ψi− 1
.
(7.3.18)
2
Thus we have
A− ∆Qi− 1 + A+ ∆Qi− 1 = N
2
2
Ψi− 1
2
− Q−
).
(Q+
i− 1
i− 1
2
(7.3.19)
2
Following Castro et al. [19] (see section 7.2.1) and using relationship (7.3.19), we are now able to
define the left and right-going fluctuations, with partial knowledge of the eigenstructure of N Ψ
(i.e., if we know the eigenvalues or an estimate of the largest absolute value of the eigenvalues)
we can define
#
!
"
1
+
−
−
A ∆Qi+1/2 =
(7.3.20)
N
− αi+1/2 Id Qi+ 1 − Qi+ 1
2
2
2 | Ψi+1/2 {z
}
generalized Rusanov flux
and
A+ ∆Qi−1/2
"
1
N
=
2 |
!
#
Ψi−1/2
+ αi−1/2 Id
{z
}
Q+
− Q−
,
i− 1
i− 1
2
(7.3.21)
2
generalized Rusanov flux
where Id ∈ Rm×m is the identity matrix. For each i, αi±1/2 are positive numbers with
|λki±1/2 | ≤ αi±1/2 ,
for k = 1, . . . , m,
where λki±1/2 represents the k th eigenvalue of N Ψ
.
i±1/2
Let us summarize the above results in the following corollary.
Corollary 1. Let (7.3.6) be a weakly hyperbolic system. q be sufficiently smooth. Furthermore
N be sufficiently smooth inside cell Ci but might be discontinuous (but bounded) at the
boundaries (∂Ci ). Moreover let N Ψ
be bounded, q̃i (x), q̃i,x (x), Q±
be defined as for
i± 12
i±1/2
theorem 8 and
Ñi (x) = N (x) + O(∆xs ),
112
∀x ∈ Ċi .
(7.3.22)
7.3 Weakly hyperbolic systems
Then the discretization (7.3.7), with
"
1
N
A− ∆Qi+1/2 =
2
!
#
Ψi+1/2
Q+
− Q−
i+ 1
i+ 1
− αi+1/2 Id
2
(7.3.23)
2
and
A+ ∆Qi−1/2
"
1
=
N
2
!
#
Ψi−1/2
ˆ
A∆Qi :=
+ αi−1/2 Id
,
Q+
− Q−
i− 1
i− 1
2
(7.3.24)
2
xi+ 1
2
Ñi (x) q̃i,x dx
(7.3.25)
xi− 1
2
where N
Ψi±1/2
as defined in (7.3.18), αi±1/2 is a positive number satisfying
|λki±1/2 | ≤ αi±1/2 < ∞ for
k = 1, . . . , m,
and λki±1/2 representing the k th eigenvalue of N Ψ
, is a semi discrete finite volume
i±1/2
discretization of order γ = min(p, s + 1, r + 1) to the weakly hyperbolic system (7.3.6).
Proof. Starting at the beginning of this subsection (7.3.2) a consistent derivation of the
spatial finite volume discretization operator for system (7.3.6) has been shown, without using
any other information of the eigenstructure of N or N Ψ , than the eigenvalues (or an estimate
of the spectral radius), which shows the applicability to weakly hyperbolic systems.
The accuracy statement follows directly from the proof of theorem 8, applied to the semi discrete
integral form of the weakly hyperbolic system 7.3.6, using Ñi (x) = N (q̃i ). Remark 1. If the reconstruction q̃i is constant in each cell with a forward Euler time
discretization, then the discretization (7.3.7) with (7.3.25), (7.3.24), (7.3.23) is a consistent
finite volume approximation to the weakly hyperbolic system (7.3.6) and is stable in the sense
of section 7.2.1.
In this case the inner integral is zero, since q̃i,x = 0 and the discretization can be interpreted
as difference scheme of the same form as in section 7.2.1 (first order case). Thus the scheme
exhibits the same consistency and stability properties as derived there.
Remark 2. Another possibility to define the fluctuations without using any knowledge of the
eigenstructure of N Ψ is
"
!
2 #
∆x
∆t
1
2N Ψ 1 −
Id −
N Ψ 1
Q+
− Q−
(7.3.26)
A− ∆Qi+1/2 =
i+ 21
i+ 12
i+ 2
i+ 2
4
∆t
∆x
and
A+ ∆Qi−1/2
"
1
2N
=
4
∆x
∆t
+
Id +
Ψi− 1
∆t
∆x
2
N
2 #
Ψi− 1
2
!
Q+
.
− Q−
i− 1
i− 1
2
(7.3.27)
2
These fluctuations are derived from the generalized FORCE scheme [17, 19], which is a convex
combination of the generalized Lax-Friedrichs and the generalized Lax-Wendroff scheme.
113
A high-order unstaggered and unsplit constrained transport method for 3D hexahedral grids
7.4
Spatial discretization
potential
of
the
magnetic
vector
We introduce a spatial discretization for the magnetic vector potential using the Weyl gauge
(see chapter 4). This yields the following weakly hyperbolic system of the evolution equations
for the magnetic vector potential in 3D (as first introduced in section 5.2.1), which can be
written as
At + N1 (u) Ax + N2 (u) Ay + N3 (u) Az = 0,
with


 2

 3

0 −u2 −u3
u
0 0
u
0 0
0  , N2 = −u1 0 −u3  , N3 =  0
u3 0 .
N1 = 0 u1
0 0
u1
0 0 u2
−u1 −u2 0
The problem of the weak hyperbolicity has been circumvented in section 5.2.1 using an operator
splitting approach.
However, the operator splitting approaches is not straight-forward to extend for the application
to general logically rectangular/hexahedral grids which are of interest in this chapter. Note that
a high-order extension of the discretization (and splitting) used in chapter 5 is in particular not
straight-forward.
We now introduce a multidimensional extension of the unsplit (spatial) discretization for linear
weakly hyperbolic systems as described above. This discretization can be used for the weakly
hyperbolic evolution equation of the magnetic potential and allows the scheme to be applied
to general mapped grids. Furthermore, we obtain high-order of accuracy.
A spatially unsplit multidimensional discretization of the evolution equation for
the magnetic vector potential
Using the results of corollary 1 we can discretize the evolution equation of the magnetic vector
potential, by introducing a multidimensional generalization of the inner integral A∆Qi and
the fluctuations A± ∆Q. This generalizations can be derived from section 6.1.5, 7.1.1. Using
the general form of the formulas (6.1.76), (6.1.76) and (7.1.13), in the 3D setting. The key
step consists in redefining the fluctuations to be applicable in the weakly hyperbolic case, as
presented above. Starting with the fluctuations, we can derive the formulas below at a face e.g.
I1 = (i − 1/2, j, k) to be
ˆ
1
ˆ
1
+
(|A|Ă ∆Q)I1 =
0
p
[Ă+ ∆Q(X(0, η, ζ)) a(η, ζ)]I1 dηdζ
(7.4.1)
p
[Ă− ∆Q(X(0, η, ζ)) a(η, ζ)]I1 dηdζ.
(7.4.2)
0
and
ˆ
1
ˆ
−
(|A|Ă ∆Q)I1 =
0
1
0
The equations (7.4.1), (7.4.2) can now be discretized using multidimensional quadrature rules
together with a discrete representation of the fluctuations at the quadrature points (η̄l , ζ̄m )
+
in normal direction, denoted by Ă+ ∆Ql,m
I1 ≈ Ă ∆Q(X(0, η̄l , ζ̄m ))I1 . This can be done in an
analogous way for all faces In for n = 1, 2, 3 and their opposite faces In + en . Here In and en are
defined in the same way as in section 7.1.1. Those fluctuations can be defined in normal direction
114
7.5 The discretization of ∇ × A on mapped grids
n = nIl,m at each Gaussian point for the two reconstructed values Q+ = Q+
, Q− = Q−
as
Il,m
Il,m
1
1
1
well as the path connecting the two states Ψ = ΨIl,m , to be
1
1
Ă+ ∆Ql,m
i−1/2,j,k = (N
2
1
l,m
Ă− ∆Qi−1/2,j,k = (N
2
Ψ
(n)l,m + α(Q+ , Q− )Id)(Q+ − Q− )
(7.4.3)
Ψ
(n)l,m − α(Q+ , Q− )Id)(Q+ − Q− )
(7.4.4)
with
|s̆pIl,m | ≤ α(Q+ , Q− ),
p = 1, . . . , m.
1
The system matrix as defined in (7.3.18) (for the 1D case) can be generalized in normal direction
to be
ˆ 1
N̆ (Ψ(l, Q+ , Q− )) dl
(7.4.5)
N Ψ (n) =
0
1 1 −
=
n (N1 + N1+ ) + n2 (N2− + N2+ ) + n3 (N3− + N3+ ) ,
2
(7.4.6)
with Nl± for l = 1, 2, 3 defined in an analogous way as in (7.3.9). The inner integrals can be
defined in the same way as in (7.1.13)
A∆Qi,j,k = A1 ∆Qi,j,k + A2 ∆Qi,j,k + A3 ∆Qi,j,k
˚
=
Ñ 1 q̃x + Ñ 2 q̃y + Ñ 3 q̃z dC.
(7.4.7)
(7.4.8)
Ci,j,k
This yields the following, familiar, semi-discrete form for a multidimensional (possibly) weakly
hyperbolic system (7.1.12))
−1
∂t Qi,j,k (t) =
|Ci,j,k |
!
3
X
A∆Qi,j,k +
[(|A|(Ă+ ∆Q))In + (|A|(Ă− ∆Q))In +en ] .
n=1
This semi-discrete form can now be used for the evolution of the magnetic vector potential in
the constrained transport algorithm as described in section 6.2.
7.5
The discretization of ∇ × A on mapped grids
During each stage of the constrained transport algorithm (section 6.2), we obtain the corrected
magnetic field from taking the curl of the magnetic potential. We now discuss some discrete
curl operators for mapped grids.
In the CT schemes [51, 89], see section 3.4.3, the cell averaged values of the magnetic field
were computed using centered finite difference approximations. However, this curl operator is
limited to Cartesian grids and to second order of accuracy.
We wish to compute a discrete curl of the magnetic vector potential
B = ∇ × A = A3y − A2z ,
115
A1z − A3x ,
A2x − A1y
T
.
(7.5.1)
A high-order unstaggered and unsplit constrained transport method for 3D hexahedral grids
In particular, we wish to compute (a possibly high-order accurate) estimate of the cell average of
B for a general logically rectangular (2D) or hexahedral (3D) grid cell. Utilizing the divergence
theorem, we can write
˚
˚
1
1
B dC =
∇ × A dC
(7.5.2)
|Ci,j,k |
|Ci,j,k |
Ci,j,k
Ci,j,k
‹
1
ν × A dA.
(7.5.3)
=
|Ci,j,k | ∂Ci,j,k
Thus, e.g. the first component of the magnetic field, B 1 , in grid cell Ci,j,k can be expressed in
the form
˚
1
1
Bijk =
A3y − A2z dV
|Cijk |
C
" ijk
1
(7.5.4)
A3 ν 2 − A2 ν 3 dA,
=
|Cijk | ∂Cijk
where ν = (ν 1 , ν 2 , ν 3 ) ∈ R3 is the outward pointing unit normal vector along the boundary
∂Cijk of the considered grid cell. The integrals over all the faces of a grid cell can be evaluated
on the reference cell using the trilinear map (7.1.1), as discussed in section 7.1. Using the
definition of the surface normal vector n and the determinant a of the mapping as defined for
the grid cell interfaces in Section 7.1, we obtain
X n ˆ 1ˆ 1
p
1
1
Bijk =
±
dηdζ
A3 n2 (η, ζ) − A2 n3 (η, ζ)
a(η, ζ) 1
|Cijk | ±=+,−
i± 2 ,j,k
0
0
ˆ 1ˆ 1
p
3 2
2 3
(7.5.5)
A n (ξ, ζ) − A n (ξ, ζ)
±
a(ξ, ζ)
dξdζ
i,j± 12 ,k
0
0
ˆ 1ˆ 1
o
p
a(ξ, η)
±
A3 n2 (ξ, η) − A2 n3 (ξ, η)
dξdη
.
1
0
i,j,k± 2
0
For the evaluation of the surface integral in (7.5.5), we first replace the integrals with a Gaussian
quadrature rule of the appropriate degree of precision, then we reconstruct A2 and A3 on the grid
cell boundaries at each of the quadrature points using the piecewise polynomial reconstruction
of A. To be more precise, at each of these quadrature points we take the value of A to be
the average of the reconstructed values from the two grid cells that share a face. We note that
this discretization leads to a conservative update of the magnetic field. For a smooth magnetic
potential the average of the reconstructed values agrees with the correct interface value of the
magnetic potential up to the order used in the reconstruction. The computation of the cell
averages of B 2 and B 3 can be done in an analogous way using
"
1
2
A1 ν 3 − A3 ν 1 dA
Bijk =
|Cijk | ∂Cijk
"
1
3
A2 ν 1 − A1 ν 2 dA.
Bijk =
|Cijk | ∂Cijk
A different second order accurate way to compute the curl of the magnetic potential can be
obtained by reconstructing the magnetic potential to the corners of the cell Ci,j,k . Then an
averaging of all reconstructions to the corners, from cells that share the corner with cell Ci,j,k
116
7.6 The discrete divergence-free condition on mapped grids
can be used to obtain a magnetic potential at that corner. E.g. for corner Ci−1/2,j−1/2,k−1/2 ,
average the reconstructions to this corner from all cells that share this corner with cell Ci,j,k ,
to have Ãi−1/2,j−1/2,k−1/2 . To compute a second order accurate value of the magnetic vector
potential at the center of the face (Ci−1/2,j,k , say), we can average the values at the corners
1
Ãi−1/2,j,k = (Ãi−1/2,j−1/2,k−1/2 + Ãi−1/2,j+1/2,k−1/2 + Ãi−1/2,j+1/2,k+1/2 + Ãi−1/2,j−1/2,k+1/2 ).
4
Taking the face averaged normal directions as defined in section 7.1, we can compute a second
order accurate magnetic field on smoothly varying grids using the formulas above together with
a multidimensional Gaussian quadrature with one point at each the face center.
7.6
The discrete divergence-free condition on mapped
grids
In this section we discuss in which sense the divergence of the magnetic field is controlled
in a discrete sense by computing the curl of the magnetic vector potential on mapped grids,
in the way introduced above (section 7.5). We will observe that a discrete divergence-free
condition can only be achieved for a certain discretization in a certain sense and not in general.
To be more precise we did not yet find a way to use the potential for the computation of a
discrete magnetic field, where we could use the magnetic field to exactly satisfies a discrete
divergence-free condition. This was previously used on Cartesian grids in [51] (chapter 5).
However, the second order accurate way to compute the magnetic field, as described in the
end of section 7.5, can be used to compute a magnetic field, that satisfies a discrete version of
[∇ · (∇ × A)]i,j,k = 0 (a divergence-free condition) up to machine precision.
Note that the difference to the discretization in section 5 is that we do not plug in the discrete
magnetic field into a discrete divergence operator to obtain a discrete divergence-free condition.
Instead we rather use the magnetic potential in two different discrete operators. In the general
case (arbitrary high-order of reconstruction and quadrature rules in section 7.5) we can argue
that the magnetic potential satisfies a divergence-free condition up to the discretization error of
the reconstruction of the magnetic potential. Note that in the high-order accurate computation
of the magnetic field the discrete divergence-free condition is still sufficiently controlled (even
across shocks in the magnetic field), since the magnetic potential is always assumed to be at
least continuous in contrast to the magnetic field. This means that the discrete version of
[∇ · (∇ × A)]i,j,k = 0 will always be limited by the (high-order) reconstruction error O(∆xps )
(for smooth solutions and a pth order accurate reconstruction) and by the discretization error
O(∆xs ) for continuous but not necessarily continuous differentiable solutions of the magnetic
potential. Here ∆xs denotes a characteristic grid cell length. Note that the 2D case is just a
2D (projected) version of the 3D formulas (below) and the arguments transfer accordingly.
The 3D case
Let us first consider a definition of the divergence-free condition [∇·(∇×A)]i,j,k = 0 on mapped
grids.
We can write the cell average of the divergence operator applied to the curl operator on cell
117
A high-order unstaggered and unsplit constrained transport method for 3D hexahedral grids
C = Ci,j,k in the following way, using the Gauss theorem
˚
1
∇ · (∇ × A) dC
[∇ · (∇ × A)]i,j,k =
|C|
C
‹
1
=
(∇ × A) · ν dC
|C| ∂C
6 ¨
1 X
[(∇ × A) · ν]Ĩn dC,
=
|C| n=1 SĨ
(7.6.1)
(7.6.2)
n
where Ĩn ∈ {(i−1/2, j, k), (i+1/2, j, k), (i, j −1/2, k), (i, j +1/2, k), (i, j, k −1/2), (i, j, k +1/2)}
and ν being the (outer) unit normal direction. In addition we can rewrite the curl operator on
a hexahedral mapped grid cell at face S = SIn using the Stokes theorem
¨
˛
[(∇ × A) · ν]Ĩn dC =
(A · τ ) dl
(7.6.3)
SĨn
∂S
=
4 ˆ
X
n=1
(A · τ ) dl.
(7.6.4)
ln
Here τ denotes the unit tangential vector to the edges (ln ) of the surface (S). Let us now
consider a second order accurate computation of the magnetic field by the magnetic vector
potential using corner (averaged) values (as described in the end of section 7.5).
We are able to derive a second order accurate formula for the divergence of the curl applied
to the potential, using the trapezoidal rule and the reconstructed values at the cell corners.
Consider e.g. the face I˜1 = (i − 1/2, j, k) and edge l1 .
ˆ
1
(7.6.5)
(Ã · τ ) dl ≈ ( (Ãi−1/2,j−1/2,k−1/2 + Ãi−1/2,j+1/2,k−1/2 ) · τ I˜1 )|`1 |,
2
l1
where |`1 | denotes the length of the edge and τ I1 the unit tangential vector of this edge, as
required by the Stokes theorem. Clearly this will be an approximation of order two to the line
integral on the left hand side of (7.6.5), if the reconstructed values à are accurate enough.
Writing out formula (7.6.2), respectively (7.6.4) using the discretization (7.6.5) yields exactly
zero (up to machine precision). Consequently, this discretization can be used to compute the
magnetic field, while satisfying a discrete divergence-free condition, which is zero.
Let us now turn to the high-order case. Consider a componentwise polynomial reconstruction
of the magnetic vector potential in cell Ci,j,k , denoted by Ã, which is pth order accurate on
smooth solutions. Using the analytic derivatives of the reconstructed magnetic potential we
can always compute a magnetic field, which is exactly divergence-free, since
 3

Ãy − Ã2z
∇ × Ã =  Ã1z − Ã3x 
(7.6.6)
2
1
Ãx − Ãy
and
∇ · (∇ × Ã) = Ã1yz − Ã1zy + Ã2zx − Ã2xz + Ã3xy − Ã3yx = 0.
118
(7.6.7)
7.7 Numerical tests
Of course, this also transfers to the cell average definition in cell C = Ci,j,k
˚
˚
1
1
B dC =
∇ × Ã dC
|C|
|C|
C
C
(7.6.8)
and
[∇ · (∇ × A)]i,j,k
1
=
|C|
˚
∇ · (∇ × Ã) dC = 0.
(7.6.9)
C
However, computing a magnetic field in this way yields a non-conservative computation of the
magnetic field in contrast to the way as described in section 7.5. Note that a non-conservative
computation of the magnetic field is firstly not as accurate as a conservative computation
(validated by numerical tests) and secondly the magnetic field is part of the conservative MHD
equations and should be computed in a conservative manner.
However, the conservative way to compute the magnetic field, as introduced in section 7.5, may
not be suitable to satisfy a discrete divergence up to machine precision.
Nevertheless, the control of the divergence error has found to be appropriate to stabilize the
numerical solution of the MHD equations, as shown by several numerical tests in section 7.7.
For smooth solutions, our numerical computations confirm 3rd order of accuracy.
7.7
Numerical tests
Several numerical examples on Cartesian and mapped grids are shown in this section. These
examples are used to both verify the third-order of accuracy in space and time, as well as the
shock-capturing ability of the scheme.
A note on high-order initial data on mapped grids
Up to second order of accuracy, the initial data evaluated at each cell center coincides with
the cell averaged values. In order to obtain the full high-order of accuracy on mapped grids,
we generally need to compute the cell-averages to the desired order of accuracy, by taking
high-order quadrature rules.
7.7.1
2.5-dimensional tests (convergence study)
The setup (initial data, boundary conditions) of the smooth Alfvén wave problem as used for
the convergence study in this section is the same as in section 5.3. In Table 7.1, we show the
results of a numerical convergence study of the new constrained transport algorithm on a 2D
Cartesian grid. We obtain full third order convergence rates in all conserved quantities, as well
as all the magnetic vector potential components.
We have also computed this test problem on a mapped grid, which is a scaled version of a grid
from Colella et al. [23] that is described by the mapping
X̄(xc , yc ) = x̃ + αl
d
Y
p=1
119
sin(x̃p ),
(7.7.1)
A high-order unstaggered and unsplit constrained transport method for 3D hexahedral grids
32 × 64
64 × 128
128 × 256
256 × 512
EOC
ρ
5.128 × 10−4
6.495 × 10−5
8.150 × 10−6
1.020 × 10−6
2.998
ρu1
2.413 × 10−4
3.097 × 10−5
3.924 × 10−6
4.933 × 10−7
2.992
ρu2
6.059 × 10−4
7.548 × 10−5
9.412 × 10−6
1.176 × 10−6
3.000
ρu3
5.142 × 10−4
6.469 × 10−5
8.099 × 10−6
1.014 × 10−6
2.998
32 × 64
64 × 128
128 × 256
256 × 512
EOC
B1
2.877 × 10−4
3.583 × 10−5
4.464 × 10−6
5.581 × 10−7
3.000
B2
5.754 × 10−4
7.166 × 10−5
8.928 × 10−6
1.116 × 10−6
3.000
B3
5.123 × 10−4
6.437 × 10−5
8.057 × 10−6
1.008 × 10−6
2.999
32 × 64
64 × 128
128 × 256
256 × 512
EOC
A1
3.583 × 10−5
4.489 × 10−6
5.626 × 10−7
7.041 × 10−8
2.998
A2
6.921 × 10−5
8.628 × 10−6
1.076 × 10−6
1.344 × 10−7
3.000
A3
1.053 × 10−4
1.327 × 10−5
1.661 × 10−6
2.077 × 10−7
2.999
E
1.301 × 10−4
1.653 × 10−5
2.075 × 10−6
2.599 × 10−7
2.997
Table 7.1: Convergence study of the 2.5-dimensional smooth Alfvén wave problem on a
Cartesian mesh. The tables show the L1 -error at time t = 1 in the different physical quantities
computed using the constrained transport algorithm. The experimental order of convergence
(EOC) is computed by comparing the error for the two finest grids. All simulations are
performed using a CFL number of 0.5.
120
7.7 Numerical tests
for l = 1, . . . , d with d the dimension of the problem. Note that X̄ should not be confused
with the local bilinear or triangular map, denoted by X. In the 2D example we take d = 2,
α1 = α2 = 1/10 and
!
xc
|lxc |
yc
|lyc |
x̃ = 2π
,
(7.7.2)
with xc , yc being the x- and y-coordinates of the computational grid (which is mapped), note
that this grid in general differs from the reference cell described before and thus we take a
different notation here. |lxc | and |lyc | denotes the length of the whole underlying computational
(Cartesian) grid in x-, and y-direction.
The mapping for the 3D Orzag-Tang vortex example, below, is constructed using d = 3,
α1 = α2 = α3 = 1/2 and
 x 
c

x̃ = 2π 
|lxc |
yc
|lyc |
yc
|lzc |

.
(7.7.3)
The mapped (2D) grid used for the convergence study is shown in panel (a) of Figure 7.4. Table
7.2 confirms the third order convergence rate also for the mapped grid computation. Note that
the error on the mapped grid is only slightly larger than the error on the Cartesian grid. The
least squares approach for the piecewise polynomial reconstructions leads to the correct order,
only on grids that do not have highly stretched grid cells, see section 6.1.2. We have observed
that, a convergence study on the grid 7.4b does not give the full order of accuracy.
1
0.9
2
0.8
0.7
1.5
y
y
0.6
0.5
1
0.4
0.3
0.5
0.2
0.1
0
(a)
0
0.5
x
0
1
0
0.2
0.4
(b)
0.6
0.8
1
x
Figure 7.4: Shown in this figure are the mapped grids used in (a) the convergence study of the
smooth Alfvén wave problem, and (b) the cloud-shock interaction problem.
7.7.2
2.5-dimensional tests (shock capturing)
We also studied the cloud-shock interaction problem in the 2.5-dimensional case. The general
setup is again the same as in section 5.3. In the 2.5-dimensional case we show results for B 3
as computed by the new constrained transport algorithm that updates all three components
121
A high-order unstaggered and unsplit constrained transport method for 3D hexahedral grids
32 × 64
64 × 128
128 × 256
EOC
ρ
1.975 × 10−3
2.631 × 10−4
3.333 × 10−5
2.981
ρu1
7.167 × 10−4
9.756 × 10−5
1.245 × 10−5
2.970
ρu2
1.223 × 10−3
1.557 × 10−4
1.953 × 10−5
2.996
ρu3
7.711 × 10−4
9.745 × 10−5
1.222 × 10−5
2.996
32 × 64
64 × 128
128 × 256
EOC
B1
4.827 × 10−4
6.014 × 10−5
7.511 × 10−6
3.001
B2
9.735 × 10−4
1.213 × 10−4
1.513 × 10−5
3.002
B3
9.483 × 10−4
1.219 × 10−4
1.534 × 10−5
2.990
32 × 64
64 × 128
128 × 256
EOC
A1
7.355 × 10−5
9.358 × 10−6
1.175 × 10−6
2.994
A2
1.260 × 10−4
1.595 × 10−5
2.000 × 10−6
2.996
A3
1.749 × 10−4
2.216 × 10−5
2.776 × 10−6
2.997
E
5.230 × 10−4
6.955 × 10−5
8.820 × 10−6
2.980
Table 7.2: Convergence study of the 2.5-dimensional smooth Alfvén wave problem on a mapped
grid. The tables show the L1 -error at time t = 1 in the different physical quantities computed
using the constrained transport algorithm. The experimental order of convergence (EOC) is
computed by comparing the error for the two finest grids. All simulations are performed using
a CFL number of 0.5.
(a)
(b)
Figure 7.5: The 3rd component of the magnetic field at time t = 0.06 (a) on a 256 × 256
Cartesian grid and (b) on the mapped grid shown in figure 7.4 (right) using the 3rd order
version of the algorithm. Here the 2.5-dimensional problem was implemented in such a way
that all three components of the magnetic field were updated in the constrained transport step.
of the magnetic field. The results compare well with those obtained by our splitting method
of chapter 5. We compute the solution both on a Cartesian grid as well as on a mapped grid.
For the mapped grid computation we use a grid of the form shown in panel (b) of Figure 7.4.
This is a small modification of a grid with circular inclusion discussed in [16]. The initial cloud
position is inside the circular region of the mapped grid. The results on both grids compare
122
7.7 Numerical tests
16 × 32 × 32
32 × 64 × 64
64 × 128 × 128
EOC
ρ
2.055 × 10−3
2.684 × 10−4
3.419 × 10−5
2.973
ρu1
9.992 × 10−4
1.343 × 10−4
1.679 × 10−5
3.000
ρu2
1.716 × 10−3
2.213 × 10−4
2.764 × 10−5
3.001
ρu3
1.911 × 10−3
2.532 × 10−4
3.110 × 10−5
3.025
E
5.133 × 10−4
6.611 × 10−5
8.701 × 10−6
2.926
16 × 32 × 32
32 × 64 × 64
64 × 128 × 128
EOC
L1 Error in B 1
1.231 × 10−3
1.581 × 10−4
1.957 × 10−5
3.014
L1 Error in B 2
1.805 × 10−3
2.304 × 10−4
2.869 × 10−5
3.006
L1 Error in B 3
1.778 × 10−3
2.296 × 10−4
2.818 × 10−5
3.026
16 × 32 × 32
32 × 64 × 64
64 × 128 × 128
EOC
L1 Error in A1
1.588 × 10−4
2.340 × 10−5
2.550 × 10−6
3.198
L1 Error in A2
2.933 × 10−4
3.642 × 10−5
4.780 × 10−6
2.930
L1 Error in A3
2.869 × 10−4
3.671 × 10−5
4.617 × 10−6
2.991
Table 7.3: Convergence study of the 3D smooth Alfvén wave problem on a Cartesian grid. The
tables show the L1 -error at time t = 1 in the different physical quantities computed using the
constrained transport algorithm. The experimental order of convergence (EOC) is computed
by comparing the error for the two finest grids. All simulations are performed using a CFL
number of 0.6.
well, although the solution structure is slightly sharper resolved on the Cartesian mesh (see
Figure 7.5).
7.7.3
3D tests (convergence study)
Finally, we have performed a convergence study for the three-dimensional smooth Alfvén wave
problem on a Cartesian grid. The results, which again confirm the third order convergence rate,
are presented in Table 7.3. The initial values and the computational domain for this problem
are described in section 5.3.
7.7.4
3D tests (shock capturing)
Next we present numerical results of the proposed method for a 3D cloud-shock interaction
problem as well as an Orzag-Tang example. This computations have been performed using a
second order version of the proposed algorithm. The least squares reconstructions are limited
with respect to primitive variables as explained in section 6.1.3. The initial data and boundary
conditions are again taken from section 5.3.
123
A high-order unstaggered and unsplit constrained transport method for 3D hexahedral grids
3D Cloud-shock interaction problem and 3D Orzag-Tang vortex
We now consider the cloud shock and the Orzag-Tang example as described in section 5.3.2.
The Orzag-Tang vortex example is computed on a Cartesian grid (Figure 7.7a) and on the
smoothly varying mapped grid (Figure 7.8), as shown in Figure 7.7b. One can observe that
the pressure computed on the Cartesian grid compares well with the pressure computed on
the mapped grid. In particular do those plots compare well with the 3D Orzag-Tang example
of section 5.3.2. This example shows, that the proposed CT algorithm works well on both
Cartesian and as well as on a 3D hexahedral mapped grid.
Figure 7.6: This figure shows the density at time t = 0.06 on a three-dimensional Cartesian
grid using 150 × 150 × 150 grid cells. For this simulation we used a 2nd order version of the
proposed algorithm.
124
7.7 Numerical tests
(a)
(b)
Figure 7.7: The 3D Orszag-Tang vortex problem. Shown in these panels are schlieren plots of
the pressure in the x, y-plane at (a) time t = 3.5 and z = π on a Cartesian grid and (b) on the
mapped grid of Figure 7.8. These solutions were computed on a mesh with 150 × 150 × 150
grid cells using a 2nd order version of the proposed algorithm.
7
6
5
z
4
3
2
0
1
0
8
2
4
6
6
4
2
0
8
y
x
Figure 7.8: 3D smooth mapped grid used for the Orzag-Tang vortex example.
125
A high-order unstaggered and unsplit constrained transport method for 3D hexahedral grids
126
Chapter 8
Conclusions and outlook
In this chapter conclusions are given together with motivations for further research to related
questions, in form of an outlook.
8.1
Conclusions
In this thesis two versions of unstaggered constrained transport methods for the
three-dimensional ideal MHD equations have been developed. The first CT method directly
generalizes the method of Rossmanith [89] from 2D to 3D Cartesian grids. This has been done
in the context of a one-step finite volume method, namely the wave propagation algorithm of
Langseth and LeVeque [59], together with a splitting method to handle the weakly hyperbolic
evolution equation of the magnetic vector potential. Here, different choices for appropriate
splittings have been developed. The robustness and accuracy of the new scheme has been
tested in several numerical test examples.
Furthermore, a new unstaggered constrained transport method has been developed using the
method of lines discretization, with a spatial discretization based on WENO least squares
reconstructions and a SSP Runge-Kutta temporal discretization. It has been shown that this
allows a generalization of the unstaggered CT method, mentioned above, to logically rectangular
(2D) and hexahedral (3D) mapped grids as well as to high-order of accuracy. In this thesis
we developed the method up to 3rd order of accuracy in space and time. In this context an
unsplit spatial discretization based on the generalized Rusanov flux [19] has been generalized
to linear weakly hyperbolic systems. Consistency and stability in the 2-norm have been derived
for this discretization in 1D. Moreover, this unsplit approach is extended to be applicable in
two and three space dimensions as well as on mapped grids. Subsequently, this discretization
has been applied to the weakly hyperbolic evolution equation of the magnetic vector potential
and was tested on Cartesian as well as on mapped grids. Finally, discretizations of the curl
operator applied to the magnetic potential, on mapped grids, have been presented with a short
discussion about the satisfaction of a divergence-free condition on the discrete level.
8.2
Outlook
The outlook is separated in three sub-sections. The first concerns the general extension of
the new CT method, which has been presented in the method of lines discretization in this
thesis. The second addresses general problems that came up along the way of constructing the
127
Conclusions and outlook
CT method. Finally, a motivation is given for possible configurations in physical applications,
where the new CT method could be advantageous.
8.2.1
Extensions of the new CT scheme
One interesting question is, can the new CT method of chapter 6, 7, be extended to very
high-order one-step schemes, based on the ADER approach [32], [33]. One particular issue
in this extension, could be the construction of a high-order accurate velocity field for the
evolution equation of the magnetic vector potential.
An extension to other spatial discretizations, like the Discontinuous Galerkin finite element
discretization, would be interesting.
Furthermore, an extension to adaptively refined grids, would be interesting. Note that the
unstaggered nature of the CT scheme should be convenient in this context.
8.2.2
Generalizing numerical tools
The multidimensional least squares reconstruction procedure as developed in section 6.1.1
suffers from accuracy degeneration on highly-stretched grid cells, as noted in section 6.1.2.
Transforming the reconstruction to a simple linearly reconstructed reference frame of a logically
rectangular or hexahedral mapped grid, as done in [97], [101], does not solve the problem. The
approximate mapped least squares approach as introduced in [29] seems to be promising, but
needs to be generalized to general mapped grids and is thus subject of further research.
8.2.3
Application to physical problems
It would be interesting to apply the new CT method developed in this thesis to MHD simulations
that use the mapped grids developed by Calhoun et al. [16], along with suitable boundary
conditions that utilize the circular or spherical grid geometry. Note that these grids do in
particular not suffer from a pole singularity (in comparison to a latitude-longitude grid). This
fact transfers to 3D extensions of these grids. Therefore, simulations that use the spherical
geometry and need to be extended up to the origin of a spherical inclusion, should be possible.
Complex applications like the simulation of coronal mass ejection, will require to extend or
replace the ideal MHD equations by more general complex models. A general extension of the
new CT method in the context of two-fluid MHD, as e.g. shown in [58] would be interesting.
128
Appendix A
Left eigenvectors
In this section we state the left eigenvectors of the entropy scaled eigenvectors depicted in
section 2.2.2, computed with Mathematica [103]. These are the row vectors of the following
matrix
1
8 −1
[R̃pr (n)]−1 = [r̃pr
, . . . , r̃pr
] ,
with r̃p , p = 1, . . . , 8 being the right eigenvectors in normal direction, see section 2.2.2.
We use the following notation/shortcuts in addition to the notation of section 2.2.2


t1
• t =  t2  = n⊥
t3
 


T × N1
t2 n3 − n2 t3
• T × N =  T × N2  =  t3 n1 − n3 t1  = t × n
T × N3
t1 n2 − n1 t2
• sgnbn = sign(b · n)
• BN = B · n
• BT = B · t
• N T = n · t.
With this notation in mind, the left eigenvectors read
129
(A.0.1)
Left eigenvectors

1
q
−1+γ √
ρ
γ


0


0


0
1 T
(˜lpr
) := 
 − q 1 √
 a2 −1+γ ρ
γ


0


0














0









2
T
(˜lpr ) := 








−n2 t1 t2 −n3 t1 t3 +n1 (t2 2 +t3 2 )
a(n3 2 (t1 2 +t2 2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 ))
q
1
γ
q
1
γ
q
1
γ
−t2 (n1 t1 +n3 t3 )+n2 (t1 2 +t3 2 )
a(n3 2 (t1 2 +t2 2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 ))
n3 (t1 2 +t2 2 )−(n1 t1 +n2 t2 )t3
a(n3 2 (t1 2 +t2 2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 ))
0








3,4
T
(˜lpr ) := 








0
0
0
0
0
∓ρT ×N1
√ √
2 p(n3 2 (t1 2 +t2 2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 ))
∓(−n3 t1 ρ+n1 t3 ρ)
√ √
2 p(n3 2 (t1 2 +t2 2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 ))
∓(ρT ×N3 )
√ √
2 p(n3 2 (t1 2 +t2 2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 ))
0
T ×N1
√
2(n3 2 (t1 2 +t2 2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 )) pρ
T ×N2
√
√
2(n3 2 (t1 2 +t2 2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 )) pρ
T ×N3
√
√
2(n3 2 (t1 2 +t2 2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 )) pρ
√
130








,
















,







131
√
0
q
2a(n3 2 (t1 2 +t2 2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 )) γ1 (α2f +α2s )











,












 ρcf (a(n2 2 t1 −n1 n2 t2 +n3 (n3 t1 −n1 t3 )) ραf +((B3n2 t1 −B2n3 t1 −B3n1 t2 +B2n1 t3 )(−n3 t2 +n2 t3 )+B1(nq2 2 t1 2 +n3 2 t1 2 −2n1 n2 t1 t2 −2n1 n3 t1 t3 +n1 2 (t2 2 +t3 2 )))αs )
√
 ±
√
√
2sgnbn(n3 2 (t1 2 +t2 2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 )) γ1 (aBN2 α2s + ρc2f αf (a ραf +BTαs ))


√
ρcf (((n3 t1 −n1 t3 )(B3n2 t1 −B3n1 t2 +B1n3 t2 −B1n2 t3 )+B2((n1 2 +n3 2 )t2 2 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )))αs +a ραf (−n1 n2 t1 +n1 2 t2 +n3 T ×N1 ))

q
±
√

√
√
2sgnbn(n3 2 (t1 2 +t2 2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 )) γ1 (aBN2 α2s + ρc2f αf (a ραf +BTαs ))

√

2
2
2
2
2
2
2
1 t3 +n2 (−n3 t2 +n2 t3 )) ραf +αs (B3(n3 (t1 +t2 )−2n3 (n1 t1 +n2 t2 )t3 +(n1 +n2 )t3 )+B2(n3 t1 −n1 t3 )T ×N3 +B1(−n3 t2 +n2 t3 )T ×N3 ))
 ± ρcf (a(−n1 n3 t1 +n
q
√
√
√

2sgnbn(n3 2 (t1 2 +t2 2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 )) γ1 (aBN2 α2s + ρc2f αf (a ραf +BTαs ))

7,8
T
αs
(˜lpr ) := 
q √
√

2a2 γ1 ρ(α2f +α2s )


(n2 2 t1 −n1 n2 t2 +n3 (n3 t1 −n1 t3 ))αf

q
−√

2
2
2
2a(n3 (t1 +t2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 )) γ1 (α2f +α2s )


αf (−n1 n2 t1 +n1 2 t2 +n3 T ×N1 )

q
−√

2
2
2a(n3 2 (t1 +t2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 )) γ1 (α2f +α2s )


(−n1 n3 t1 +n1 2 t3 +n2 (−n3 t2 +n2 t3 ))αf
q
−√
2
2
2a(n3 2 (t1 +t2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 )) γ1 (α2f +α2s )

√
0
√
ρcf ((n2 t1 t2 +n3 t1 t3 −n1 (t2 2 +t3 2 )) ρc2f αf −aBNαs (−n2 2 t1 +n1 n2 t2 +n3 T ×N2 ))

q
 ∓√
√
√
2a(n3 2 (t1 2 +t2 2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 )) γ1 (aBN2 α2s + ρc2f αf (a ραf +BTαs ))


√ 2
2
2
2
ρcf ((−t2 (n1 t1 +n3 t3 )+n2 (t1 +t3 )) ρcf αf −aBNαs (−n1 n2 t1 +n1 t2 +n3 T ×N1 ))
 ±
 √2a(n 2 (t 2 +t 2 )−2n n t t −2n t (n t +n t )+n 2 (t 2 +t 2 )+n 2 (t 2 +t 2 ))q 1 aBN2 α2 +√ρc2 α a√ρα +BTα
s ))
3
1
2
3
3
1
2
1 3 1 3
2 2 1 1
3 3
2
1
f

s
f f(
γ(

2 +t 2 +(n t +n t )t √ρc2 α +a −n n t +n 2 t +n (−n t +n t ) BNα
ρc
−n
t
((
(
)
)
(
)
s
)
3
1
2
1
1
2
2
3
1
3
1
1
3
2
3
2
2
3
f
f
 ±√
f
q
√
√

2a(n3 2 (t1 2 +t2 2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 )) γ1 (aBN2 α2s + ρc2f αf (a ραf +BTαs ))

5,6 T
α
˜

f
(lpr ) := 
q √
√
2a2 γ1 ρ(α2f +α2s )


(n2 2 t1 −n1 n2 t2 +n3 (n3 t1 −n1 t3 ))αs

q
√

2a(n3 2 (t1 2 +t2 2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 )) γ1 (α2f +α2s )


αs (−n1 n2 t1 +n1 2 t2 +n3 T ×N1 )

q
√

2a(n3 2 (t1 2 +t2 2 )−2n1 n3 t1 t3 −2n2 t2 (n1 t1 +n3 t3 )+n2 2 (t1 2 +t3 2 )+n1 2 (t2 2 +t3 2 )) γ1 (α2f +α2s )


(−n1 n3 t1 +n1 2 t3 +n2 (−n3 t2 +n2 t3 ))αs












.












Left eigenvectors
132
Bibliography
[1] R. Abgrall and S. Karni. A comment on the computation of non-conservative products.
Journal of Computational Physics, (229):2759–2763, 2010.
[2] R. Artebrant and M. Torrilhon. Increasing the accuracy in locally divergence-preserving
finite-volume-schemes for mhd. J. Comp. Phys., 6(227):3405–3427, 2008.
[3] J. Balbas, E. Tadmor, and C.C. Wu. Non-oscillatory central schemes for one- and
two-dimensional MHD equations. J. Comp. Phys., 201:261–285, 2004.
[4] D.S. Bale. Wave propagation algorithms on curved manifolds with applications to
relativistic hydrodynamics. PhD thesis, University of Washington, Seattle, Washington,
2002.
[5] D.S. Bale, R.J. LeVeque, S. Mitran, and J.A. Rossmanith. A wave propagation method
for conservation laws and balance laws with spatially varying flux functions. SIAM J.
Sci. Comp., 24:955–978, 2003.
[6] D.S. Balsara.
Second-order-accurate schemes for magnetohydrodynamics with
divergence-free reconstruction. Astrophys. J. Suppl., 151:149–184, 2004.
[7] D.S. Balsara and J. Kim. A comparison between divergence-cleaning and staggered-mesh
formulations for numerical magnetohydrodynamics. Astrophys. J., 602:1079—1090, 2004.
[8] D.S. Balsara and D. Spicer. A staggered mesh algorithm using high order Godunov fluxes
to ensure solenoidal magnetic fields in magnetohydrodynamic simulations. J. Comp.
Phys., 149(2):270–292, 1999.
[9] T.J. Barth. Numerical methods for gasdynamic systems on unstructured meshes. Lecture
Notes in Computational Science and Engineering, 5:195–285, 1998.
[10] T.J. Barth. On the role of involutions in the discontinuous Galerkin discretization of
Maxwell and magnetohydrodynamic systems. In IMA Volume on Compatible Spatial
Discretizations, volume 142. Springer-Verlag, 2005.
[11] T.J. Barth and H. Deconinck. High-order methods for computational Physics. Springer,
1999.
[12] M. Berger, D. A. Calhoun, C. Helzel, and R. J. LeVeque. Locically rectangular finite
volume methods with adaptive refinement on the sphere. Philos. Trans. Royal Soc.,
367:4483–4496, 2009.
133
BIBLIOGRAPHY
[13] M.J. Berger and P. Colella. Local adaptive mesh refinement for shock hydrodynamics. J.
Comp. Phys., 82:64–84, 1989.
[14] J.U. Brackbill and D.C. Barnes. The effect of nonzero ∇ · b on the numerical solution of
the magnetohydrodynamic equations. J. Comp. Phys., 35:426–430, 1980.
[15] M. Brio and C.C. Wu. An upwind differencing scheme for the equations of ideal
magnetohydrodynamics. J. Comp. Phys., 75:400–422, 1988.
[16] D.A. Calhoun, C. Helzel, and R.J.LeVeque. Logically rectangular grids and finite volume
methods for PDEs in circular and spherical domains. SIAM Review, 50(4):723–752, 2008.
[17] A. Canestrelli, A. Siviglia, M. Dumbser, and E.F. Toro. Well-balanced high-order centred
schemes for non-conservative hyperbolic systems. applications to shallow water equations
with fixed mobile bed. Advances in Water Resources, 32(6):834–844, 2009.
[18] M.J. Castro, P.G. LeFloch, M.L. Munoz-Ruiz, and C. Parés. Why many theories of shock
waves are necessary. convergence error in formally path-consistent schemes. Journal of
Computational Physics, 227:8107–8129, 2008.
[19] M.J. Castro, A. Pardo, C. Parés, and E.F. Toro. On some fast well-balanced
first order solvers for nonconservative systems. Mathematics of Computation, 79(S
0025-5718(09)02317-5), 2010.
[20] N. Chalmers and E. Lorin. Approximation of non-conservative hyperbolic systems based
on different shock curve definitions.
[21] F.F. Chen. Introduction to Plasma Physics and Controlled Fusion. Plenum Press, 1984.
[22] C.K. Chui and M.J. Lai. Vandermonde determinant and lagrange interpolation in rs .
[23] P. Colella, M. Dorr, J. Hittinger, and D.F. Martin. High-order finite volume methods in
mapped coordinates. J. Comput. Phys., 230:2952–2976, 2011.
[24] C. Dafermos. Hyperbolic Conservation Laws in Continuum Physics. Springer, 2010.
[25] W. Dai and P.R. Woodward. A simple finite difference scheme for multidimensional
magnetohydrodynamic equations. J. Comp. Phys., 142(2):331–369, 1998.
[26] G. DalMaso, P. LeFloch, and F. Murat. Definition and weak stability of nonconservative
products. Journal de Mathematiques pures et appliquees, 74(6):483–548, 1995.
[27] A. Dedner. Solving the System of Radiation Magnetohydrodynamics: for solar physical
simulations in 3d. PhD thesis, Albert-Ludwigs-Universit”at Freiburg, 2003.
[28] A. Dedner, F. Kemm, D. Kröner, C.-D. Munz, T. Schnitzer, and M. Wesenberg.
Hyperbolic divergence cleaning for the MHD equations. J. Comput. Phys., 175:645–673,
2002.
[29] B. Diskin and J. Thomas. Accuracy of gradient reconstruction on grids with high aspect
ratio. NIA Report, (2008-12), 2008.
[30] J. Dreher and R. Grauer. Racoon ii, http://www.tp1.ruhr-uni-bochum.de/ jd/racoon/.
134
BIBLIOGRAPHY
[31] M. Dumbser, A. Hidalgo, M. Castro, C. Pares, and E.F. Toro. FORCE schemes on
unstructured meshes II: Non-conservative hyperbolic systems. Comput. Methods Appl.
Mech. Engrg., 199:625–647, 2010.
[32] M. Dumbser and M. Käser. Arbitary high order non-oscillatory finite volume schemes on
unstructured meshes for linear hyperbolic systems. Journal of Computational Physics,
(221):693–723, 2007.
[33] M. Dumbser, M. Käser, V.A. Titarev, and E.F. Toro. Quadrature-free non-oscillatory
finite volume schemes on unstructured meshes for nonlinear hyperbolic systems. Journal
of Computational Physics, (226):204–243, 2007.
[34] M. Dumbser and O. Zanotti. Very high order pn pm schemes on unstructured meshes for
the resistive relativistic mhd equations. J. Comp. Phys., (228):6991–7006, 2009.
[35] F. Effenberger, K. Thust, L. Arnold, R. Grauer, and J. Dreher. Numerical simulation
of current sheet formation in a quasiseparatrix layer using adaptive mesh refinement.
Physics of Plasmas, 18(032902), 2011.
[36] C. Evans and J.F. Hawley. Simulation of magnetohydrodynamic flow: A constrained
transport method. Astrophys. J., 332:659–677, 1988.
[37] L. C. Evans. Partial Differential Equations, volume 19. American Mathematical Society,
2002.
[38] M. Fey and M. Torrilhon. A constrained transport upwind scheme for divergence-free
advection. In T.Y. Hou and E. Tadmor, editors, Hyperbolic Problems: Theory, Numerics,
and Applications, pages 529–538. Springer, 2003.
[39] U.S. Fjordholm and S. Mishra. Accurate numerical discretisations of non-conservative
hyberbolic systems. Mathematical Modelling and Numerical Analysis, (46):187–206, 2012.
[40] P. Le Floch. Shock waves for nonlinear hyperbolic systems in nonconservative form. IMA
Preprint Series, (593), October 1989.
[41] S.K. Godunov. Symmetric form of the magnetohydrodynamic equations. Numerical
Methods for Mechanics of Continuum Medium, 1:26–34, 1972.
[42] T.I. Gombosi. Physics of the Space Environment. Cambridge University Press, 1998.
[43] S. Gottlieb, D. Ketcheson, and C.W. Shu. Strong Stability Preserving Runge-Kutta and
Multistep Time Discretizations. World Scientific, 2011.
[44] S. Gottlieb, C.W. Shu, and E. Tadmor. Strong stability-preserving high-order time
discretization methods. SIAM Review, 43(1):89–112, 2001.
[45] A. Harten. High resolution schemes for hyperbolic conservation laws. J. Comp. Phys.,
49:357–393, 1983.
[46] A. Harten, B. Engquist, S. Osher, and S.R. Chakravarthy. Uniformly high order essentially
non-oscillatory schemes, iii. Journal of Computational Physics, 71:231–303, 1987.
135
BIBLIOGRAPHY
[47] A. Harten and J.M. Hyman. Self-adjusting grid methods for one-dimensional hyperbolic
conservation laws. J. Comp. Phys., 50:235–269, 1983.
[48] C. Helzel. Numerical Approximation of Conservation Laws with Stiff Source Terms for the
Modelling of Detonation Waves. PhD thesis, Otto-von-Guericke-Universit”at Magdeburg,
2000.
[49] C. Helzel, R.J. LeVeque, and G. Warnecke. A modified fractional step method for the
accurate approximation of detonation waves. SIAM J. Sci. Comp., pages 1489–1510,
2000.
[50] C. Helzel, J. Rossmanith, and B. Taetz. A high-order unstaggered constrained transport
method for the 3d ideal magnetohydrodynamic equations based on the method of lines.
to appear in SIAM J. Sci. Comput. http://arxiv.org/abs/1203.3760.
[51] C. Helzel, J. Rossmanith, and B. Taetz. An unstaggered constrained transport method
for the 3d ideal magnetohydrodynamic equations. J. Comp. Phys., 230:3803–3829, 2011.
[52] C. Hu and C.-W. Shu. Weighted essentially non-oscillatory schemes on triangular meshes.
Journal of Computational Physics, (150):97–127, 1999.
[53] G.S. Jiang and C.-W. Shu. Efficient implementation of weighted eno schemes. J. Comp.
Phys., 126:202–228, 1996.
[54] M.-B. Kallenrode. Space Physics. Springer, 1998.
[55] D. I. Ketcheson. High Order Strong Stability Preserving Time Integrators and Numerical
Wave Propagation Methods for Hyperbolic PDEs. PhD thesis, 2009.
[56] D.I. Ketcheson, M. Parsant, and R.J. LeVeque. High-order wave propagation algorithms
for general hyperbolic problems, 2011. submitted.
[57] J. Kleimann. 4π models of cmes and icmes (invited review). Springer Science+Business,
2012.
[58] H. Kumar. Finite volume methods for the two-fluid mhd equations. (2010–29), September
2010.
[59] J.O. Langseth and R.J. LeVeque. A wave propagation method for three-dimensional
hyperbolic conservation laws. J. Comp. Phys., 165:126–166, 2000.
[60] R. J. LeVeque. Finite Difference Methods for Ordinary and Partial Differential Equations,
Steady State and Time Dependent Problems. SIAM, 2007.
[61] R.J. LeVeque. The clawpack software package. Available from
http://www.amath.washington.edu/∼claw.
[62] R.J. LeVeque. Nonlinear Conservation Laws and Finite Volume Methods for Astrophysical
Fluid Flow. Springer-Verlag, 1997.
[63] R.J. LeVeque. Wave propagation algorithms for multidimensional hyperbolic systems. J.
Comput. Phys., 131:327–353, 1997.
136
BIBLIOGRAPHY
[64] R.J. LeVeque. Finite volume methods for conservation laws and hyperbolic systems.
Cambridge University Press, 2001.
[65] R.J. LeVeque. Finite Volume Methods for Hyperbolic Problems. Cambridge University
Press, 2002.
[66] R.J. LeVeque. A well-balanced path-integral f-wave method for hyperbolic problems with
source terms. Journal of Scientific Computing, (48):209–226, 2010.
[67] P. Londrillo and L. Del Zanna. High-order upwind schemes for multidimensional
magnetohydrodynamics. Astrophys. J., 530:508–524, 2000.
[68] P. Londrillo and L. Del Zanna. On the divergence-free condition in Godunov-type schemes
for ideal magnetohydrodynamics: the upwind constrained transport method. J. Comp.
Phys., 195:17–48, 2004.
[69] M.Castro, J.M. Gallardo, and C.Parés. High order finite volume schemes based on
reconstruction of states for solving hyperbolic systems with nonconservative products.
applications to shallow-water systems. Math. Comp., 75(255):1103–1134, 2006.
[70] P. McCorquodale and P. Colella. A high-order finite-volume method for conservation
laws on locally refined grids. Comm. Appl. Math. and Comp. Sci., 6(1), 2011.
[71] A. Mignone and P. Tzeferacos. A second-order unsplit Godunov scheme for cell-centered
MHD: The CTU-GLM scheme. J. Comp. Phys., 229:2117–2138, 2010.
[72] S. Mishra and E. Tadmor. Constraint preserving schemes using potential-based fluxes i.
multidimensional transport equations. Comm. Comput. Phys., 9(3):688–710, 2011.
[73] S. Mishra and E. Tadmor. Constraint preserving schemes using potential-based fluxes
ii. genuinely multi-dimensional systems of conservation laws. SIAM J. Num. Anal.,
49(3):1023–1045, 2011.
[74] S. Mishra and E. Tadmor. Constraint preserving schemes using potential-based fluxes
iii. genuinely multi-dimensional schemes for mhd equations. Mathematical Modelling and
Numerical Analysis, (46):661–680, 2012.
[75] K.W. Morton and D.F. Mayers. Numerical Solutions of Partial Differential Equations.
Cambridge University Press, 1994.
[76] C. O.-Gooch. High-order eno schemes for unstructured meshes based least-squares
reconstruction. 1997.
[77] C. O.-Gooch, A. Nejat, and K. Michalak. On obtaining high-order finite-volume solutions
to the euler equations on unstructured meshes. 2007.
[78] G.K. Parks. Physics of Space Plasmas: An Introduction. Addison-Wesley, 1991.
[79] P.-O. Persson and J. Perraire.
methods. AIAA, 2006.
Sub-cell shock capturing for discontinuous Galerkin
[80] N. B. Petrovskaya. The accuracy of least-square approximation on highly stretched
meshes. Int. J. Comput. Meth., 5:449–462, 2008.
137
BIBLIOGRAPHY
[81] N.B. Petrovskaya. A quadratic least-squares solution reconstruction in a boundary layer
region. Commun. Numer. Meth. Engng., 2009.
[82] K.G. Powell. An approximate Riemann solver for magnetohydrodynamics (that works in
more than one dimension). Technical Report 94-24, ICASE, Langley, VA, 1994.
[83] 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. J. Comp. Phys., 154:284–309, 1999.
[84] P.L. Roe and D. Balsara. Notes on the eigensystem of magnetohydrodynamics. SIAM
Appl. Math., 56:57–67, 1996.
[85] J.A. Rossmanith. The mhdclaw software package. Available from
http://www.math.wisc.edu/∼rossmani/MHDCLAW.
[86] J.A. Rossmanith. A constrained transport method for the shallow water mhd equations.
In T.Y. Hou and E. Tadmor, editors, Hyperbolic Problems: Theory, Numerics,
Applications, pages 851–860. Springer, 2002.
[87] J.A. Rossmanith. A Wave propagation Method with Constrained Transport for Ideal and
Shallow Water Magnetohydrodynamics. PhD thesis, 2002.
[88] J.A. Rossmanith. A high-resolution constrained transport method with adaptive mesh
refinement for ideal MHD. Comp. Phys. Comm., 164:128–133, 2004.
[89] J.A. Rossmanith. An unstaggered, high-resolution constrained transport method for
magnetohydrodynamic flows. SIAM J. Sci. Comp., 28:1766–1797, 2006.
[90] D.S. Ryu, F. Miniati, T.W. Jones, and A. Frank. A divergence-free upwind code for
multidimensional magnetohydrodynamic flows. Astrophys. J., 509(1):244–255, 1998.
[91] C.-W. Shu. Essentially non-oscillatory and weighted essentially non-oscillatory schemes
for hyperbolic conservation laws. ICASE Report, (97-65), 1997.
[92] H. De Sterck. Multi-dimensional upwind constrained transport on unstructured grids for
“shallow water” magnetohydrodynamics. In Proceedings of the 15th AIAA Computational
Fluid Dynamics Conference, Anaheim, California, page 2623. AIAA, 2001.
[93] J.M. Stone and T. Gardiner. A simple unsplit Godunov method for multidimensional
MHD. New Astronomy, 14:139–148, 2009.
[94] A.H. Stroud. Approximate Calculation of Multiple Integrals. Prentice-Hall Inc., 1971.
[95] P.K. Sweby. High resolution schemes using flux limiters for hyperbolic conservation laws.
SIAM J. Num. Anal., 21:995–1011, 1984.
[96] G. Tóth. The ∇ · B = 0 constraint in shock-capturing magnetohydrodynamics codes. J.
Comp. Phys., 161:605–652, 2000.
[97] V.A. Titarev, P. Tsoutsanis, and D. Drikakis. WENO schemes for mixed-element
unstructured meshes. Commun. Comput. Phys., 8(3):585–609, 2010.
138
BIBLIOGRAPHY
[98] M. Torrilhon. Non-uniform convergence of finite volume schemes for riemann problems
of ideal magnetohydrodynamics. 192:73–94, 07 2003.
[99] M. Torrilhon. Zur Numerik der Idealen Magnetohydrodynamic. PhD thesis, 2003.
[100] M. Torrilhon.
Locally divergence-preserving upwind finite volume schemes for
magnetohydrodynamics. SIAM J. Sci. Comp., 26:1166–1191, 2005.
[101] P. Tsoutsanis, V.A. Titarev, and D. Drikakis. Weno schemes for mixed-element
unstructured meshes in three space dimensions. Journal of Computational Physics,
230(4):1585–1601, 2011.
[102] M. Wesenberg. Efficient finite-volume schemes for magnetohydrodynamic simulations in
solor physics. PhD thesis, Universität Freiburg, 2003.
[103] Inc. Wolfram Research. Mathematica Edition: Version 8.0. Wolfram Research, 2010.
[104] H.C. Yee and B. Sjögreen. Non-linear filtering and limiting in high order methods for
ideal and non-ideal MHD. Journal of Scientific Computing, 27:507–521, 2006.
[105] A.L. Zachary, A. Malgoli, and P. Colella. A higher-order Godunov method for
multidimensional ideal magnetohydrodynamics. SIAM J. Sci. Comp., 15:263–284, 1994.
[106] R. Zhang, M. Zhang, and C.W. Shu. On the order of accuracy and numerical performance
of two classes of finite volume WENO schemes. Comm. Comput. Phys., 9:807–827, 2011.
139
BIBLIOGRAPHY
140
List of Figures
2.1
Shown are the waves of the ideal MHD equations. . . . . . . . . . . . . . . . . . 13
3.1
The thermal pressure at t = 0.633 for the Orszag-Tang vortex. Plots (a) and
(c) show the solution computed without explicite control over ∇ · B. Plots
(b) and (d) show the solution with a CT method. (e) shows max|∇ · B| as a
function of time for the method without explicite control over ∇ · B. Note the
sharp increase in the divergence near t = 0.633. These plots demonstrate how
unphysical oscillations can appear in calculations that do not explicitly control
the divergence of the magnetic field. (Figure taken from [89]). . . . . . . . . . . 17
3.2
This Figure illustrates the flux distributions for a classical finite volume scheme in
flux difference form (left side) and a flux distribution of a new average, Φdiv , which
computes a magnetic field update that satisfies the local divergence operator div ∗ ,
(right hand side). Figure is taken from [99] . . . . . . . . . . . . . . . . . . . . . 20
3.3
An example of a staggered grid configuration of Evans and Hawley. Taken from
[89]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.1
Picture of the transverse fluctuations. Taken from [87]. . . . . . . . . . . . . . . 36
5.2
The 2.5-dimensional cloud-shock interaction problem. Shown here are the
out-of-plane magnetic field at time t = 0.06 as calculated on a 512×512 mesh
using (a) the scheme of [89] with only A3 , and (b) the proposed scheme using
the full vector potential A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.3
The rotated Riemann problem. Scatterplots of various components of solution
at time t = 0.2 using the constrained transport algorithm. The solid line in each
panel is a highly-resolved 1D simulation. . . . . . . . . . . . . . . . . . . . . . . 60
5.4
The 3D Orszag-Tang vortex problem. Shown in these panels are schlieren plots
of pressure in the x, y-plane at (a) time t = 3 and z = π and (b) t = 3.5 and
z = π. These solutions were computed on a mesh with 150 × 150 × 150 grid cells. 61
5.5
The 3D cloud-shock interaction problem. Shown is a schlieren plot of the density
for the problem using a mesh with 200 × 100 × 100 grid cells at time t = 0.06. . 61
6.1
An example of a logically rectangular grid cell in physical space (x, y) (right hand
side) with the corresponding cell in reference coordinates (ξ, η). . . . . . . . . . 65
6.2
Example of reconstructions on central and sectorial stencils in 1D, which can be
used to compute a WENO reconstruction polynomial of the scalar function q,
represented by cell averages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
141
LIST OF FIGURES
6.3
6.4
6.5
6.6
7.1
7.2
7.3
7.4
7.5
7.6
7.7
7.8
Example of interface values of reconstructions from the left and right for a
polynomial reconstruction of 1st -, 2nd - and 3rd order. A Riemann solver can
be used to obtain one consistent value at the interface, depending on both
reconstructed values (left and right). . . . . . . . . . . . . . . . . . . . . . . . .
The solution to the 1D advection equation and its derivative on a periodic domain
after one revolution using the 3rd order algorithm. panel (a) shows how standard
WENO limiting performs on the solution, and panel (b) shows how the limiter
proposed in this thesis performs. . . . . . . . . . . . . . . . . . . . . . . . . . .
(a) shows a scatter plot on a (200 × 200) Cartesian mesh along the diagonal
s = cos(β)x − sin(β)y with
√ β = −π/4 of the approximated partial derivative
in x-direction, at time t = 2, after one complete evolution along the diagonal.
The red line shows the exact solution. (b) shows the same computation on the
mapped grid depicted in (c), with the same amount of grid cells. One can observe
that the limiting works on the Cartesian and mapped grid. . . . . . . . . . . . .
(a) shows a contour plot of the magnetic pressure kBk2 /2, computed by the
proposed CT-algorithm, at time t = 0.295 on a Cartesian grid with 256 × 256
grid cells. (b) shows this computation on the mapped grid of the same form as
shown in Figure 6.5c, using the same amount of grid cells. . . . . . . . . . . . .
An example of a hexahedral cell in physical space (x, y) (right hand side) and
the corresponding reference cell with coordinates (ξ, η, ζ). . . . . . . . . . . . . .
The time evolution of the reconstructed solution q̃ for a system with three waves
corresponding to the eigenvalues s1 < 0 < s2 < s3 in cell Ci . Figure is based on
[55]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
An example of the discussed weakly hyperbolic system solved with the
discretization to section 7.3.2 on a grid with 200 grid cells, up to t = 0.2, 0.5. The
red line denotes the exact solution, the blue points are the approximate solutions
computed by the algorithm. Observes the transport and growing deformation,
due to the weak hyperbolicty, in component q 1 , in time. The initial data of q 2 is
simply transported. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Shown in this figure are the mapped grids used in (a) the convergence study of
the smooth Alfvén wave problem, and (b) the cloud-shock interaction problem. .
The 3rd component of the magnetic field at time t = 0.06 (a) on a 256 × 256
Cartesian grid and (b) on the mapped grid shown in figure 7.4 (right) using
the 3rd order version of the algorithm. Here the 2.5-dimensional problem was
implemented in such a way that all three components of the magnetic field were
updated in the constrained transport step. . . . . . . . . . . . . . . . . . . . . .
This figure shows the density at time t = 0.06 on a three-dimensional Cartesian
grid using 150 × 150 × 150 grid cells. For this simulation we used a 2nd order
version of the proposed algorithm. . . . . . . . . . . . . . . . . . . . . . . . . . .
The 3D Orszag-Tang vortex problem. Shown in these panels are schlieren plots
of the pressure in the x, y-plane at (a) time t = 3.5 and z = π on a Cartesian grid
and (b) on the mapped grid of Figure 7.8. These solutions were computed on a
mesh with 150 × 150 × 150 grid cells using a 2nd order version of the proposed
algorithm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3D smooth mapped grid used for the Orzag-Tang vortex example. . . . . . . . .
142
76
84
88
91
94
106
110
121
122
124
125
125
List of Tables
5.1
5.2
Error tables for the 2.5-dimensional Alfvén problem at time t = 1.5 using
proposed dimensional split scheme. All simulations are run at a CFL number
of 0.8. This table shows that all components of the magnetic field and all
components of the magnetic potential converge at second order accuracy. . . . . 54
Error tables for the 3D Alfvén problem at time t = 1. This table shows
that all components of the magnetic field and all components of the magnetic
potential converge at second order accuracy. The approximate order of accuracy
is computed by taking the log2 of the ratio of the error on the 32 × 64 × 64 mesh
to the error on the 64 × 128 × 128 mesh. . . . . . . . . . . . . . . . . . . . . . . 57
6.1
Error tables for the 1D advection example to confirm 3rd order of accuracy on a
smooth solution structure using the proposed limiting strategy. . . . . . . . . . . 85
7.1
Convergence study of the 2.5-dimensional smooth Alfvén wave problem on a
Cartesian mesh. The tables show the L1 -error at time t = 1 in the different
physical quantities computed using the constrained transport algorithm. The
experimental order of convergence (EOC) is computed by comparing the error
for the two finest grids. All simulations are performed using a CFL number of 0.5.120
Convergence study of the 2.5-dimensional smooth Alfvén wave problem on a
mapped grid. The tables show the L1 -error at time t = 1 in the different
physical quantities computed using the constrained transport algorithm. The
experimental order of convergence (EOC) is computed by comparing the error
for the two finest grids. All simulations are performed using a CFL number of 0.5.122
Convergence study of the 3D smooth Alfvén wave problem on a Cartesian grid.
The tables show the L1 -error at time t = 1 in the different physical quantities
computed using the constrained transport algorithm. The experimental order of
convergence (EOC) is computed by comparing the error for the two finest grids.
All simulations are performed using a CFL number of 0.6. . . . . . . . . . . . . 123
7.2
7.3
143
LIST OF TABLES
144
Curriculum Vitae
Name:
Bertram Taetz
Date of Birth: November, 21st , 1982
Place of Birth: Wuppertal, Germany
Education
Summer 2012
Dr.rer.nat., Mathematics, Ruhr University Bochum,
Bochum, Germany.
Date of oral examination: 10. September 2012.
Summer 2009
M.Sc., Mathematics, Ruhr University Bochum,
Bochum, Germany.
Minor subject: Physics.
Summer 2008
B.Sc., Mathematics, Ruhr University Bochum,
Bochum, Germany.
2007 - 2008
Erasmus scholarship, study Abroad at Durham University,
Durham, England.
Summer 2003
Graduation from high-school (Abitur), Johannes Rau Gymnasium,
Wuppertal, Germany.
145
146
Declaration of independence
I certify that the work presented here is, to the best of my knowledge and belief, original and
the result of my own investigations, except as acknowledged, and has not been submitted, either
in part or whole, for a degree at this or any other University.
Place,
Date
Signature
147
Download