Abstract
We present a divergence-free semi-implicit finite volume scheme for the simulation of the ideal magnetohydrodynamics (MHD) equations which is stable for large time steps controlled by the local transport speed at all Mach and Alfvén numbers. An operator splitting technique allows to treat the convective terms explicitly while the hydrodynamic pressure and the magnetic field contributions are integrated implicitly, yielding two decoupled linear implicit systems. The linearity of the implicit part is achieved by means of a semi-implicit time linearization. This structure is favorable as second-order accuracy in time can be achieved relying on the class of semi-implicit IMplicit–EXplicit Runge–Kutta (IMEX-RK) methods. In space, implicit cell-centered finite difference operators are designed to discretely preserve the divergence-free property of the magnetic field on three-dimensional Cartesian meshes. The new scheme is also particularly well suited for low Mach number flows and for the incompressible limit of the MHD equations, since no explicit numerical dissipation is added to the implicit contribution and the time step is scale independent. Likewise, highly magnetized flows can benefit from the implicit treatment of the magnetic fluxes, hence improving the computational efficiency of the novel method. The convective terms undergo a shock-capturing second order finite volume discretization to guarantee the effectiveness of the proposed method even for high Mach number flows. The new scheme is benchmarked against a series of test cases for the ideal MHD equations addressing different acoustic and Alfvén Mach number regimes where the performance and the stability of the new scheme is assessed.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Compressible magnetized plasma flows are mathematically modeled by the equations of magnetohydrodynamics (MHD), that constitute a first order hyperbolic system of nonlinear partial differential equations (PDE). Potential practical applications concern astrophysics to describe plasma flows in the magnetosphere of neutron stars, or inertial and magnetic confinement fusion, in order to calibrate or design fusion reactors for civil energy production.
The dynamics of plasma flows can involve different time scales, that correspond to the characteristics of the governing PDE system. The multi-scale nature of the MHD equations can be analyzed by considering the Mach number \({M}_{c}\), which is the ratio between the fluid velocity and the sound speed, and the Alfvén number \({M}_b\), that represents the ratio between the fluid velocity and the speed of the Alfvén wave related to the magnetic field. Different values of \({M}_{c}\) and \({M}_b\) yield different fluid regimes, and, consequently, the nature of the governing equations can change passing for instance from hyperbolic to elliptic. A classical example is given by low Mach number flows, which are dominated by acoustic waves, hence recovering an incompressible fluid regime in the stiff relaxation limit for \({M}_{c}\rightarrow 0\). On the other hand, the material speed is of the same order than the acoustic wave speeds in high Mach number flows, thus leading to compressible fluids with shock waves. Another source of stiffness arises for highly magnetized flows, i.e. for \({M}_b\rightarrow 0\), that are typically encountered in Tokamak scenarios for magnetic confinement fusion applications.
The numerical resolution of the MHD equations is therefore very challenging if the numerical method is required to deal with the entire spectrum of the different time scales. Explicit Godunov-type finite volume schemes [4, 40, 42] exhibit excellent shock-capturing properties that can perfectly handle high Mach number flows. However, if different regimes coexist in the flow, two main problems are generated by the different time scales that can be assumed by the model: (i) the computational time step obeys a stability condition that is constrained by the magnitude of the fastest characteristic speeds, hence leading to very small time steps in the stiff relaxation limits of the model which make the simulation extremely slow, and, ultimately, even impossible to be accomplished; (ii) the numerical viscosity does not have the correct scaling but is of order \(\mathcal {O}(1/{M}_{c})\) which is especially severe for low Mach number flows and therefore the accuracy of the solution is compromised [29, 41].
To tackle these challenges, a first strategy consists in rescaling the dissipation term in the numerical flux so that the numerical viscosity becomes independent of the Mach number [8, 9, 11, 22]. A fully implicit time integration has then to be adopted to circumvent the restrictive time step condition [47, 61], which leads to a highly nonlinear system to be solved with a large number of unknowns, or local time stepping techniques can be foreseen [1, 19]. Another possibility is instead given by the implicit treatment of only one part of the system to be solved while keeping the remaining part explicit [10, 20, 25, 26, 31, 32, 37, 49]. The terms responsible to a possible stiffness of the governing model undergo an implicit discretization in which no numerical diffusion is needed, since stability follows from implicitness, so that the above mentioned problems of explicit solvers can be simultaneously solved. This technique makes often use of the class of IMplicit–EXplicit (IMEX) time integrators forwarded e.g. in [2, 13, 14, 16, 52, 53], that have been developed with the specific purpose of dealing with multiple time scales, typically a slow and a fast time scale. Furthermore, these IMEX schemes are proven to be Asymptotic Preserving (AP) and, some even Asymptotically Accurate (AA) meaning that they recover a consistent discretization of the limit model also with high order accuracy.
Besides the multi-scale character, the MHD equations embed another constraint on the divergence of the magnetic field, which must remain zero at all times because no magnetic monopoles exist in nature. This is an involution that has to be carefully taken into account by the numerical scheme, since in principle it is not satisfied at the discrete level. In the literature, there are three main approaches to satisfy the solenoidal property of magnetic field in a numerical scheme: (i) the use of staggered grids is typically adopted to cancel the divergence errors, which requires the knowledge of the electric field [7, 62]; (ii) divergence cleaning methods [28, 51] add one hyperbolic equation to the MHD system in order to transport away the divergence errors, which require the determination of the cleaning speed as a new parameter; (iii) constrained transport schemes on collocated grids that also make use of the electric field [38, 43, 44].
The aim of this paper is to design a numerical scheme for the ideal MHD equations that can handle fast time scales which might be induced by both the stiff limits \({M}_{c}\rightarrow 0\) and \({M}_b\rightarrow 0\), while retaining shock-capturing properties in the case of high Mach number flows. To face the multi-scale nature of the model, we rely on the implicit–explicit approach, whereas the divergence-free involution is preserved by means of mimetic finite difference operators [45, 48, 50] on collocated meshes. For the low Mach number regime, we follow the schemes forwarded in [20] for compressible viscous flows. This approach has been extended to magnetohydrodynamics in [10, 25], thus devising asymptotic preserving methods for the hydrodynamic sub-system of the MHD model up to third order space-time accuracy. On staggered meshes, semi-implicit finite volume schemes have been developed in [31], and hybrid finite volume/finite element methods are presented in [37]. These schemes are second order accurate in space and first order accurate in time. For the low Alfvén regime, the only semi-implicit scheme currently available in the literature is presented in [36] with first order in time accuracy, where staggered grids are used, and the implicit sub-system results to be non-linearly coupled, hence requiring to resort to a fixed point algorithm to linearize the problem combined with a nested Newton algorithm which is very challenging in practice.
In this work, we propose a novel semi-implicit finite volume scheme that is second order accurate in both space and time. The semi-implicit IMEX strategy of [12] is adopted to devise an overall second-order all Mach and Alfvén number scheme that only involves linear implicit systems for the fast scales. Consequently, neither Newton solvers nor Picard iteration techniques will be needed. A standard explicit TVD finite volume method is employed for the non-linear convective terms. To respect the involution on the magnetic field, simple collocated grids are used onto which we design a structure-preserving div-curl operator that is retrieved as the second order version of the div-curl discontinuous Galerkin operators recently forwarded in [17]. To this end, the MHD model is reformulated in terms of the magnetic potential which generates the magnetic field by its curl.
The paper is structured as follows. In Sect. 2, we briefly recall the model of ideal MHD equations and its non-dimensional formulation in terms of Mach and Alfvén number. Then, the numerical scheme is introduced in Sect. 3 where we first focus on the operator splitting in a one-dimensional framework and subsequently describe the multi-dimensional time semi-discrete scheme based on the magnetic potential instead of evolving the magnetic field. In the multi-dimensional case, we especially focus on the cell-centered operators that are designed to preserve exactly the div-curl involution constraint for the magnetic potential. This finally yields a divergence-free fully discrete multi-dimensional finite volume scheme. In Sect. 4, a series of test problems in up to three space dimensions is presented to numerically verify the performance of the numerical schemes at various Mach and Alfvén numbers. A section providing a summary and an outlook to future developments concludes the paper.
2 Governing Equations
We consider the ideal MHD equations on a three-dimensional domain \(\Omega \subset \mathbb {R}^3\) where \({\textbf {x}}= (x,y,z) \in \Omega \) is the vector of spatial coordinates and \(t \in \mathbb {R}^+_0\) denotes the time coordinate. They write
Therein, the density is denoted by \(\rho \), the pressure by p, the velocity field by \({\textbf {v}}= (u,v,w)\) and the magnetic field by \({\textbf {B}}= (B_x, B_y, B_z)\) which obeys
hence imposing that the magnetic field lines are always closed. The identity matrix is denoted by \(\mathbb {I}\). The total energy density is composed of the internal energy \(\rho e\), the kinetic energy \(\rho k\) and the magnetic energy density \( m \):
The system is closed by the ideal gas equation of state (EOS)
with \(\gamma \) representing the ratio of specific heats. Thus, the pressure is a linear function of the total energy density \(\rho E\) and can be computed as \(p = (\gamma - 1)(\rho E - \rho k -{m})\). Further, the sound speed, the so-called total and directional Alfvén speeds are defined respectively by
where \({\textbf {n}}\) denotes a unit vector pointing normal to the flow direction. The ideal MHD system (1) exhibits 8 characteristic speeds \(\lambda _{\{1\ldots 8\}}\) in normal direction \({\textbf {n}}\) given by
where \(c_{s,f}\) denote the slow and fast magneto-sonic wave speeds which read
For a detailed discussion of the ideal MHD Eq. (1) and its structure see e.g. [55].
2.1 Scaling of the Ideal MHD Equations
The MHD system (1) is characterized by multiple time scales, which depend on the physical phenomena under consideration. A sub-system of the ideal MHD equations is indeed given by the Euler equations of gas dynamics, in which a stiffness might be originated in the momentum equations by the pressure waves. In this case, the sound speed is much faster than the local fluid velocity, thus weakly compressible flows are retrieved. The scaling parameter is the Mach number, defined as \({M}_{c}= \Vert {\textbf {v}}\Vert /c\), and these flows are typically affected by a low Mach regime. Another interesting case is given by large magnetic fields, where the Alfvén speeds \( b \) are significantly faster than the local velocity or even faster than the sound speed c. Analogously to the Mach number, we can define a parameter \({M}_b= \Vert {\textbf {v}}\Vert /b\) associated to the Alfvén speed \( b \), which is referred to as Alfvén Mach number.
To analyze the influence of those parameters on the dynamics of the model, we consider the non-dimensional formulation of the ideal MHD equations (1). To that end, we employ a decomposition of a dimensional variable \( q \) in the associated non-dimensional variable \(\tilde{q}\) and a reference value \(q_\text {ref}\) that contains the units of measurements as well. Thus we can write \(q = \tilde{q} q_\text {ref}\). The convective scale is given by \(v_\text {ref}= x_\text {ref}/t_\text {ref}\), where \(x_\text {ref}\) and \(t_\text {ref}\) denote the reference length and time respectively. Further, we have a reference density \(\rho _\text {ref}\), sound speed \(c_\text {ref}\), pressure \(p_\text {ref}= \rho _\text {ref}c_\text {ref}^2\), specific internal energy \(e_\text {ref}= c_\text {ref}^2\) and a reference Alfvén speed \(b_\text {ref}\) associated to the magnetic field. Inserting this decomposition into the governing equations, the rescaled non-dimensional MHD system writes
where the total energy is given by
Introducing the plasma-beta parameter \(\beta = \tilde{p}/\tilde{m}\), which is given by ratio between (reference) pressure and (reference) magnetic pressure, the non-dimensional formulation (8) can be rewritten as
where the total energy is given by
which is closer to the formulation known from the Euler equations with \({M}_{c}\) in front of the kinetic energy contribution [20].
2.2 Novel 3-Split form of the Ideal MHD Equations
Let us consider only one space dimension, so that the MHD system (1) reduces to
with the definitions
To handle multiple time scales, we resort to a flux splitting technique that permits to design different time discretizations according to the stiffness of each resulting sub-system. Following [36], the fluxes of the MHD system (1) are split into three contributions: (i) convective fluxes \({\textbf {f}}^c\) related to u; (ii) pressure fluxes \({\textbf {f}}^p\) related to p; (iii) magnetic fluxes \({\textbf {f}}^b\) related to \({\textbf {B}}\). Here, we propose the following definitions
Note that the convective flux \({\textbf {f}}^c\) is convex in the first two components with respect to \((\rho , \rho u)\), and the remaining non-zero components are passive transport with u. We further remark that the above splitting is different from the formulation proposed in [59] for the Euler equations which was applied in [31, 36] on the MHD system. The difference here is that in (14) the hydrodynamic component of the energy flux is not split into a convective and a pressure part, but is entirely assigned to the pressure fluxes \({\textbf {f}}^p\). In particular, the magnetic energy contribution \( m \) will also play a role in the fluxes \({\textbf {f}}^p\). The novel 3-split form of the one-dimensional system (12) is then given in compact notation by
In the following we detail for each sub-system the associated set of eigenvalues.
-
1.
For the convective sub-system
$$\begin{aligned} \frac{\partial {\textbf {q}}}{\partial t} + \frac{\partial {\textbf {f}}^c({\textbf {q}})}{\partial x} = {\textbf {0}}, \end{aligned}$$(16a)we find the following real eigenvalues
$$\begin{aligned} \lambda ^c_{1,2,3,4} = 0, \quad \lambda ^c_{5,6,7,8} = u . \end{aligned}$$(16b)Thus sub-system (16a) is weakly hyperbolic since one eigenvector associated to \(\lambda ^c = 0\) is missing. The characteristic speeds depend only on the fluid flow.
-
2.
For the pressure sub-system
$$\begin{aligned} \frac{\partial {\textbf {q}}}{\partial t} + \frac{\partial {\textbf {f}}^p({\textbf {q}})}{\partial x} = {\textbf {0}}, \end{aligned}$$(17a)we find the following eigenvalues
$$\begin{aligned} \lambda ^p_{1,2,3,4,5,6} = 0, \quad \lambda ^p_{7,8} = \frac{1}{2}\left( u \mp \sqrt{u^2 + 4 (c^2 - (\gamma -1)(m+k+u^2))} \right) , \end{aligned}$$(17b)with a full set of corresponding eigenvectors. Compared to the eigenvalues of the pressure sub-system derived in [31, 36], we notice the additional contribution of the specific magnetic and kinetic energy. We remark that the eigenvalues \(\lambda ^p_{7,8}\) might become complex in the case of highly magnetized fluids, thus the pressure sub-system may result to be elliptic.
-
3.
For the magnetic sub-system
$$\begin{aligned} \frac{\partial {\textbf {q}}}{\partial t} + \frac{\partial {\textbf {f}}^b({\textbf {q}})}{\partial x} = {\textbf {0}}, \end{aligned}$$(18a)we find the following real eigenvalues
$$\begin{aligned} \lambda ^b_{1,2,3,4} = 0, \quad \lambda ^b_{5,6} = \frac{1}{2}\left( u \mp \sqrt{u^2 + 4 \left( \frac{B_x}{\sqrt{4\pi \rho }} \right) ^2} \right) , \quad \nonumber \\ \lambda ^b_{7,8} = \frac{1}{2}\left( u \mp \sqrt{u^2 + 4 \left( \frac{\Vert {\textbf {B}}\Vert ^2}{\sqrt{4\pi \rho }} \right) ^2} \right) . \end{aligned}$$(18b)Associated with \(\lambda ^b = 0\) there are two eigenvectors missing thus the magnetic sub-system is weakly hyperbolic.
Looking at the eigenvalues of the three sub-systems, it is clear that for low Mach number flows, the acoustic sound speed c in (17b) becomes dominant compared to the material speed u of the flow, hence needing an implicit discretization of the terms related to the pressure. This is also confirmed by analyzing the non-dimensional system (8) for \({M}_{c}\rightarrow 0\). Likewise, if the magnitude of the magnetic field \(\Vert {\textbf {B}}\Vert \) increases, i.e. when \(\beta \rightarrow 0\) in (10), the MHD model is dominated by the magnetic sub-system (18a) with eigenvalues \(\lambda ^b\). As such, an implicit treatment of the terms related to the magnetic field would allow for a larger stability region of the resulting numerical method. The numerical scheme which will be designed in this work starts from these considerations.
3 Numerical Scheme
Our objective is to construct a numerical scheme for the ideal MHD equations (1) which is stable independently of the parameters \({M}_{c}\) and \(\beta \) which are associated to the scaling of the pressure (and internal energy) and the strength of the magnetic field, respectively. To achieve this goal, we rely on the novel 3-split formulation (15), dividing the fluxes into explicitly and implicitly treated terms. In particular, the pressure and magnetic sub-systems with \({\textbf {f}}^p\) and \({\textbf {f}}^b\) are discretized implicitly, while we retain an explicit scheme for the convective sub-system with \({\textbf {f}}^c\).
This approach simultaneously yields two main advantages: (i) no degradation of accuracy occurs which would be caused for explicit schemes by excessive numerical viscosity for low Mach number flows as it scales with the inverse of the Mach number, see e.g. [29, 46]; (ii) improvement of the computational efficiency of the scheme in the low Mach number or low plasma-beta regime, since the stability of the scheme is guaranteed by a time step imposed only by the velocity of the local fluid flow \({\textbf {v}}\).
However, the resulting implicit system is in general nonlinear due to the non-linearity of the implicitly treated flux terms. Moreover, this implies a huge computational overhead since nonlinear solvers would be required to solve large coupled systems. To overcome this problem, the non-linearity can be treated by adopting a fixed point iteration algorithm, that has been successfully applied to low Mach number flows for the Euler and MHD systems [31, 32]. If the magnetic sub-system is discretized implicitly as done in [36], the nonlinear coupling is even stronger, thus a fixed point method combined with a nested Newton solver [24] has to be employed, which makes the resulting method quite demanding in terms of implementation and computational efficiency. Furthermore, there is no guarantee of convergence since the contraction constant which satisfies the Banach–Cacciopoli theorem is actually unknown.
Therefore, our goal is to give a numerical scheme which only includes linear systems to be solved reducing the computational costs without modifying the model equations (1). Furthermore, a 3-split form as given in (15) and proposed in [36] is not suitable for the class of IMEX Runge–Kutta methods [3, 53] that allows only the splitting according to two time scales, namely a slow and a fast scale. Hence dealing with a 2-split form of the governing equations is favorable and we will detail how to resort to a semi-implicit IMEX discretization of the fluxes, following the time integrators proposed in [12] yielding an overall second-order time discretization.
Besides the treatment in time, the MHD equations require to be compliant with the divergence-free property of the magnetic field (2). A widespread technique consists in the use of staggered grids [62], since it has been shown that an electric field defined on a mesh that is dual with respect to the mesh of the magnetic field allows the divergence-free condition to be preserved up to machine accuracy. Nevertheless, the staggering of the meshes can become cumbersome, especially in higher dimensions. Consequently, we prefer to adopt a collocated approach utilizing a reformulation of the governing equations in terms of the magnetic potential \({\textbf {A}}\) [43, 44]. Since the magnetic field \({\textbf {B}}\) is the curl of \({\textbf {A}}\), a mimetic finite difference div-curl operator will then be designed following the general approach introduced in [17].
Summarizing, we will first derive the time semi-discrete numerical scheme in one space dimension where the focus lies on the semi-implicit formulation of the flux splitting. Since the divergence-free constraint reduces to \(\partial _x(B_x) = 0\), we solve for the magnetic field directly. Secondly, the time semi-discrete numerical scheme in multiple space dimensions is considered, where the magnetic field \({\textbf {B}}\) is replaced by the curl of the magnetic potential, i.e. \({\textbf {B}}= \nabla \times {\textbf {A}}\). Thirdly, the extension to second order time accuracy is carried out relying on semi-implicit IMEX time marching schemes. Then, the details of the spatial discretization are provided, including the structure-preserving div-curl operator needed to respect the solenoidal property of the magnetic field at the discrete level upon which the section is concluded with the description of the fully discrete numerical scheme.
Space and time computational domain. The three-dimensional computational domain is defined in terms of the spatial intervals as \(\Omega =[x_{\min };x_{\max }] \times [y_{\min };y_{\max }] \times [z_{\min };z_{\max }]\), and it is discretized using a Cartesian grid composed of \(N_x \times N_y \times N_z\) cells. The characteristic mesh sizes are then given by
The time interval \(T=[0; t_f]\) is discretized by time steps \({\Delta t}= t^{n+1}-t^n\) which are always subject to a CFL-type stability condition that is only based on the characteristic speeds of the convective sub-system (16a). Thus, with \(|\lambda ^{c}|^n\) denoting the maximum eigenvalue of the convective sub-system (16b) at the time level \(t^n\), the CFL condition is given by
3.1 Time Semi-discrete Scheme in One Space Dimension
We consider the one-dimensional MHD system (12)–(13). The divergence free condition on the magnetic field in one dimension reduces to \(\partial _x(B_x) = 0\), thus the first component of the magnetic field needs to be constant, that is \(B_x=const\).
Applying a forward Euler method on the interval \([t^{n};t^{n+1}]\) to the convective sub-system (16a), we obtain the intermediate states \({\textbf {q}}^\star \) for density and momentum as
The remaining flux terms will be considered implicitly, leading to a coupling of the magnetic field with the momentum and energy equation. The two implicit sub-systems will be solved sequentially.
-
1.
The coupling of the magnetic field with the momentum equation provides the magnetic field at the new time level \({\textbf {B}}^{n+1}\).
-
2.
The coupling of the energy with the momentum equation yields the total energy density at the new time level \((\rho E)^{n+1}\).
The time discretization of the implicit magnetic subsystem reads
Note that the density at the new time \(\rho ^{n+1}\) is known after the explicit step (21), and \(B_x\) is constant. Furthermore, the pressure \(p^n\) in the momentum equation (22a) accounts for more physical information in the computation of the new magnetic field. In addition, this contribution is treated explicitly inspired by the approach forwarded in [21] for an implicit treatment of the viscous terms in the compressible Navier–Stokes equations. We remark that we could even not consider the pressure contribution at this stage, since here the momentum equation is needed only to provide a flux for the magnetic sub-system, and we are not solving for the momentum at the new time level. Formal substitution of the evolution equations (22a)–(22c) into the equation for the magnetic field components (22d)–(22e) yields the following sub-system for the unknowns \(B_y^{n+1}\) and \(B_z^{n+1}\):
where
Thanks to the semi-implicit discretization of the term \(\Vert {\textbf {B}}\Vert ^2 \approx {\textbf {B}}^n\cdot {\textbf {B}}^{n+1}\) in the \(x-\)momentum equation (22a), the above system is linear.
Finally, we can write the implicit system for the energy. Since the magnetic field at the new time level \({\textbf {B}}^{n+1}\) is known from the solution of (23), the approaches introduced in implicit–explicit schemes for the Euler equations can be readily applied. Following [3], the energy sub-system reads
Let us notice that a semi-implicit scheme has again been applied to the split fluxes (14), in which the chosen discretization for the terms \(\left( \rho E^n + p^n\right) u^{n+1}\) in \({\textbf {f}}^p\) and \(\frac{\Vert {\textbf {B}}^{n+1}\Vert ^2}{8 \pi } u^n\) in \({\textbf {f}}^b\) allows to retrieve a linear sub-system. Indeed, defining
and inserting the \(x-\)momentum equation (26a) into (26b), the following elliptic equation on the total energy is obtained
where
We recall that the density \(\rho ^{n+1}\) at the new time level is already known from the explicit step (21) as the mass flux is contained in the explicitly treated convective sub-system given in (14). The implicit energy equation (28) is thus a linear problem for the scalar unknown \((\rho E)^{n+1}\). This is because of: (i) the choice of the ideal gas EOS (4); (ii) the semi-implicit time discretization in the pressure and magnetic fluxes \({\textbf {f}}^p\) and \({\textbf {f}}^b\) of (14).
Once the total energy at the new time level is obtained, the x-component of the momentum can be updated according to (26a) and the y- and z-components according to (22b) and (22c), respectively.
Remark 1
(On the stability of the time semi-discrete scheme) In the semi-implicit discretizations designed for both the magnetic and the energy sub-systems, given by (23) and (26), respectively, we make use of a time linearization of the nonlinear terms such that we only have to solve linear systems. Consequently, the proposed schemes cannot be expected to be unconditionally stable, as it would be granted by solving the corresponding original nonlinear sub-systems. However, the time step of our schemes is always limited by the convective sub-system, where we have a CFL stability condition oriented towards the fastest material wave as given in (20). Therefore, we do not use arbitrarily large time steps in our numerical scheme, but they are always limited by the fastest material wave speed. For high Mach number flows, the flow speed is indeed responsible for the most severe restriction, while for low Mach number flows only weak shocks might arise. In those regimes, our scheme is stable which is also numerically verified in the results presented in Sect. 4. Nevertheless, a thorough study and analysis of the stability condition of the proposed semi-implicit linearization would be necessary.
3.2 Time Semi-discrete Scheme in Multiple Space Dimensions
In multiple space dimension, the preservation of the divergence-free property of the magnetic field at the discrete level is extremely important to ensure physically admissible solutions. According to [23], violating the \(\nabla \cdot {\textbf {B}}= 0\) constraint leads to non-physical phenomena, e.g spurious numerical monopoles may be generated or magnetic field lines may break into open lines. To guarantee that condition (2) is obeyed, instead of solving for \({\textbf {B}}\) directly, as done in the one-dimensional case, we use the magnetic vector potential \({\textbf {A}}\) which generates the magnetic field by its curl. Thus, since \(\nabla \cdot {\textbf {B}}= \nabla \cdot (\nabla \times {\textbf {A}}) = 0\), the objective of the numerical scheme is to preserve the div-curl property exactly up to machine precision. The details will be discussed later in Sect. 3.4. Here, we provide the semi-discrete scheme in time for the ideal MHD system in multiple space dimensions equipped with \({\textbf {A}}\) instead of \({\textbf {B}}\).
The system of equations is non-conservative for the time evolution of \({\textbf {A}}\), and it is given by
with the identity
The structure of the time semi-discrete scheme is the same as in the one-dimensional case, but the magnetic sub-system is now written in terms of \({\textbf {A}}\). Consequently, we focus only on the magnetic sub-system where \((\rho {\textbf {v}})^\star \) and \(\rho ^{n+1}\) are known from the convective step (21). Then, assuming that \({\textbf {B}}^n = \nabla \times {\textbf {A}}^n\) is fulfilled at the current time step, the magnetic sub-system writes
Analogously to the one-dimensional case, plugging the momentum equations (33a) into (33b) yields
where
We remark that a semi-implicit discretization has been employed for the terms \(\Vert \nabla \times {\textbf {A}}\Vert ^2 \approx (\nabla \times {\textbf {A}}^n) \cdot (\nabla \times {\textbf {A}}^{n+1})={\textbf {B}}^n \cdot (\nabla \times {\textbf {A}}^{n+1})\) and \((\nabla \times {\textbf {A}}) \otimes ( \nabla \times {\textbf {A}}) \approx (\nabla \times {\textbf {A}}^n) \otimes ( \nabla \times {\textbf {A}}^{n+1})={\textbf {B}}^n \otimes ( \nabla \times {\textbf {A}}^{n+1})\). The magnetic potential at the new time level permits to easily evaluate the new magnetic field as \({\textbf {B}}^{n+1} = \nabla \times {\textbf {A}}^{n+1}\).
Analogously to the one-dimensional case, we obtain the implicit energy update (28) in a multi-dimensional setting, which remains a linear system with the scalar unknown \((\rho E)^{n+1}\). After solving the energy sub-system, the momentum equations can be updated according to
where the new magnetic field \({\textbf {B}}^{n+1}\) is used, and the new pressure \(p^{n+1}\) is computed by (27).
We remark at this point, that the scheme is asymptotic preserving (AP) for \({M}_b=1\) and \({M}_{c}\) tending to zero for well-prepared initial data towards the incompressible Euler equations. For a proof see [49], where the AP property is proven in the context of an IMEX finite volume scheme for single-temperature two-fluid all speed flows. The numerical scheme for the Euler sub-system coincides with the scheme presented in this work, thus the proof can be applied directly on the time semi-discrete scheme presented in this section for \({M}_b= \mathcal {O}(1)\).
3.3 Second Order Time Discretization
The semi-discrete scheme presented in the previous section is first order accurate in time. To achieve second order of accuracy, we rely on the class of semi-implicit IMplicit–EXplicit (IMEX) time integrators proposed in [12]. These Runge–Kutta methods perfectly fit to our semi-discrete scheme since we have applied a time linearization to the 3-split form of the fluxes (14). Such linearization is typically referred to as semi-implicit technique.
Without loss of generality, let us consider the one-dimensional system (12)–(13) and the associated time semi-discrete scheme presented in Sect. 3.1. According to [12], the governing equations can be written in the form of an autonomous system
with initial condition \({\textbf {q}}_0={\textbf {q}}(t=0)\). The function \(\mathcal {H}\) represents the spatial approximation of the flux terms (13) that will be detailed later, and it is a function of two arguments, namely the explicit and the implicit state vector \({\textbf {q}}_E\) and \({\textbf {q}}_I\), respectively. To integrate the system (37) in time, Implicit–Explicit Runge–Kutta schemes are used, see e.g. [53] for Stiffly Accurate (SA) IMEX-RK methods widely used for the construction of multi-scale schemes. An IMEX-RK scheme is described by a double Butcher tableau
with the matrices \((\tilde{A},A) \in \mathbb {R}^{s \times s}\) and the vectors \((\tilde{c},c,\tilde{b},b) \in \mathbb {R}^s\). The tilde symbol refers to the explicit scheme and matrix \(\tilde{A}=(\tilde{a}_{ij})\) is a lower triangular matrix with zero elements on the diagonal, while \(A=({a}_{ij})\) is a triangular matrix which accounts for the implicit scheme, thus having non-zero elements on the diagonal. Here, we adopt the LSDIRK2 scheme from [3], which is represented by the following tableaux
with \(\alpha =1-1/\sqrt{2}\) and \(\tilde{c}=1/(2\alpha )\). Since \(\tilde{b}=b\) and \( b \) coincides with the last stage in \( A \) in (39), the LSDIRK2 scheme is SA which is a crucial property for assuring asymptotic consistency and accuracy of the scheme, see also [15]. To obtain a semi-implicit IMEX-RK method, let us first set \({\textbf {q}}_E^n={\textbf {q}}^n\) and \({\textbf {q}}_I^n = {\textbf {q}}^n\), then the stage fluxes for \(i = 1, \ldots , s\) are calculated as
Note that the evaluation of the stage fluxes (40c) requires the solution of an implicit system, that corresponds to the implicit magnetic and energy sub-systems given by (23) and (28), respectively.
Finally, the numerical solution is updated with \({\textbf {q}}^{n+1}={\textbf {q}}^{s}\), i.e. the solution coincides with the last Runge–Kutta stage because of the Stiffly Accurate property of the chosen IMEX scheme (39).
3.4 Discrete Spatial Operators
A triple index \(i j k\) referred to each space direction allows a cell to be uniquely identified, whereas half indices are adopted to label cell interfaces in \(x-\), \(y-\) and \(z-\)direction, namely \((i+\frac{1}{2} j k)\), \((i j+\frac{1}{2} k)\) and \((i j k+\frac{1}{2})\), respectively. The cell barycenter has coordinates \((x_i,y_j,z_k)\), and \(|\omega ^{i j k}|={\Delta x}{\Delta y}{\Delta z}\) is the cell volume. Collocated grids are adopted for the spatial discretization of the numerical solution, thus the discrete representation of a generic scalar quantity \(q({\textbf {x}})\) at a fixed time is expressed in each cell in the finite volume sense as the cell average
Likewise, we denote by \({\textbf {q}}({\textbf {x}})=(q_x,q_y,q_z)\) a generic vector, whose components undergo the same cell centered discretization (41), hence implying \({\textbf {q}}_{i j k}=(q_{x,i j k},q_{y,i j k},q_{z,i j k})\).
We introduce a set of discrete spatial operators that will be employed in the numerical scheme.
Numerical flux operator . To compute numerical fluxes, we rely on the numerical flux operator which is defined in the \(x-\)direction by
where is a Rusanov–type numerical flux function which reads
with f(q) representing the physical convex flux related to variable q, and \(q_{i+\frac{1}{2} j k}^\pm \) denoting the boundary extrapolated values of the quantity q at the cell interface \((i+\frac{1}{2} j k)\). The numerical dissipation is computed as
thus it is only proportional to the material speed u in \(x-\)direction. The above operator can be easily extended to the other spatial directions, namely
A first order accurate numerical flux is obtained by choosing \(q_{i+\frac{1}{2} j k}^+=q_{i+1 j k}\) and \(q_{i+\frac{1}{2} j k}^-=q_{i j k}\) in (43). To attain second order of accuracy, a TVD reconstruction is carried out for the quantity \(q({\textbf {x}})\) in each spatial direction, hence obtaining a piecewise polynomial representation \(r({\textbf {x}})\) which, in \(x-\)direction for cell \(\omega _{i j k}\), writes
with the expansion coefficients computed using a minmod limiter [58] as
A second order numerical flux is then obtained by setting \(q_{i+\frac{1}{2} j k}^+=r_{i+1 j k}(x_{i+\frac{1}{2}})\) and \(q_{i+\frac{1}{2} j k}^-=r_{i j k}(x_{i-\frac{1}{2}})\) in (43).
Central flux operator . The operator is the same as but zero numerical dissipation is considered, i.e. \(\alpha _{i+\frac{1}{2} j k}=0\) in (43), hence obtaining a second order central flux operator.
Differential operator . This operator applies to two generic quantities \(h({\textbf {x}})\) and \(q({\textbf {x}})\). In \(x-\)direction, it computes a second derivative with second order of accuracy of the form \(\partial _x(h \, \partial _x q)\) by
with the interface quantities \(h_{i\pm 1/2 j k}\) given by the arithmetic average
The multidimensional extension writes .
Gradient operator . The gradient operator is computed at the aid of a second order central finite difference discretization:
Curl operator . The curl operator, directly applied to the vector \({\textbf {q}}\), follows from the computation of the gradient operator. Indeed, it simply writes
Divergence operator . The divergence operator also makes use of the gradient operator (50) as follows
It is easy to check that the chosen divergence and curl operators are structure preserving, meaning that they satisfy the algebraic identity \(\nabla \cdot (\nabla \times {\textbf {q}})=0\) at the discrete level, namely
This relation is crucial for ensuring the solenoidal property of the magnetic field at the discrete level. A proof of the div-curl relation (53) can be found in Appendix A of [17].
Laplace operator . This operator approximates the Laplacian of a scalar function with a second order central finite difference discretization for a space-dependent diffusion coefficient \(\kappa \) as
3.5 Fully Discrete Scheme in Multiple Space Dimensions
A single time step of the new semi-implicit method from time \(t^n\) to \(t^{n+1}\) in a fully discrete set-up is made of the following steps.
-
1.
Solve the explicit convective sub-system based on the flux \({\textbf {f}}^c\) for density and momentum as
(55a)(55b)(55c)(55d)Let us notice that \(\rho ^{\star }_{i j k}=\rho ^{n+1}_{i j k}\), thus the density at the next time level is already available. Furthermore, the explicit contribution of momentum is given by the vector
$$\begin{aligned} (\rho {\textbf {v}})^{\star }_{i j k}=((\rho u)^{\star }_{i j k},(\rho v)^{\star }_{i j k},(\rho w)^{\star }_{i j k})^\top . \end{aligned}$$ -
2.
Solve the implicit magnetic sub-system (34) and obtain the vector potential \({\textbf {A}}_{i j k}^{n+1}\) from
(56)with the right hand side
(57)Therein, following [44], we have added numerical dissipation by means of the Laplace operator (54) applied to all components of \({\textbf {A}}\) to stabilize the numerical scheme especially in high Mach and Alfvén regimes. The diffusion coefficients are proportional to the eigenvalues of the magnetic sub-system (18b), e.g. \(\kappa _x=|\lambda ^b| {\Delta x}\). The resulting Laplace operators are discretized implicitly, thus the extra viscosity does not affect the stability of the overall scheme based on the material CFL condition (20). To compute the solution of this linear system (56), (57), we use the GMRES method [57] up to a prescribed tolerance (typically set to \(10^{-14}\)).
-
3.
Compute the magnetic field and the magnetic energy density at the next time level as
(58)Thanks to the structure preserving property (53), the magnetic field \({\textbf {B}}_{i j k}^{n+1}\) is divergence-free up to machine accuracy.
-
4.
After inserting the definition for \(p^{n+1}\) via (27) in the momentum equation (36), one can summarize all known terms, including the implicit magnetic fluxes \({\textbf {f}}^b\), in the intermediate quantities \((\rho {\textbf {v}})^{\star \star }\) and \((\rho E)^{\star \star }\). Therein, all magnetic contributions are evaluated at the new time level \({\textbf {B}}^{n+1}\). Using notation (58) for the magnetic energy density, they read
(59a)(59b)(59c)(59d) -
5.
Solve the elliptic equation for the total energy \((\rho E)_{i j k}^{n+1}\) according to
(60)with the right hand side
(61)Even in this case, the linear system is solved with the GMRES method up to a residual of the order of \(10^{-14}\).
-
6.
Update the momentum at the next time level \((\rho {\textbf {v}})_{i j k}^{n+1}\) according to
(62a)(62b)(62c)which is equivalent to (36) after the introduction of the new pressure (27).
Summarizing, to stabilize the numerical scheme, we have introduced two sources of artificial viscosity. The first one is the dissipative part of the explicit Rusanov flux proportional to the local fluid velocity \({\textbf {v}}\), and the second one via an implicit Laplacian operator in the magnetic sub-system proportional to the local eigenvalue \(\lambda ^b\) of the magnetic-subsystem. In particular, the magnetic dissipation contributes to the stability of the numerical scheme especially in high Mach and Alfvén Mach number regimes. Since it is treated implicitly, the material time step restriction does not need to be restricted to guarantee the stability of the numerical scheme.
4 Numerical Results
In the sequel, we present a large suite of test cases for ideal MHD aiming at demonstrating the accuracy, robustness and effectiveness of our new scheme in different regimes of both the Mach and the Alfvén number. If not otherwise specified, we set \(\gamma = 3/5\) and the time step \({\Delta t}\) is computed according to the stability condition (20) with \(\text {CFL} = 0.9\), which only depends on the material waves. The novel scheme is labeled with SIFV-EB , that stands for Semi-Implicit Finite Volume method with implicit discretization for the energy (E) and the magnetic field (B). If not stated otherwise, it is always used the second order version of the SIFV-EB scheme in space and time.
Boundary conditions for the magnetic potential \({\textbf {A}}\) In all the following test problems we always perform a linear extrapolation to determine the boundary conditions for the magnetic potential \({\textbf {A}}\). Without loss of generality, let us consider the component \(A_{x,i}\) for a cell attached to the left boundary \(x_{i-1/2}=x_{\min }\) of the computational domain, i.e. \(i=1\). The sought boundary state \(A_{x,b}\) in x-direction is formally located at \(x_b=x_{\min }-{\Delta x}/2\) and is computed as
This procedure applies for all the components of \({\textbf {A}}\) and all the spatial directions \({\textbf {x}}\). The Laplace operator in (56), which accounts for artificial viscosity in the implicit update of the magnetic potential, can thus be applied without any modification.
4.1 Accuracy of the Numerical Scheme
We test the accuracy of the numerical scheme on a slight modification of the analytical vortex solution forwarded in [4] on the two-dimensional computational domain \(\Omega =[-5;5]\times [-5;5]\). The vortex is constructed as a perturbation \(\delta {\textbf {q}}\) on top of an unperturbed magnetohydrodynamics background flow given by the constant states \({\textbf {q}}_0 = (\rho _0, {\textbf {v}}_0,p_0, {\textbf {0}})\). The perturbations of the velocity and magnetic field are given by
with the constants \(\tilde{v} = \sqrt{2\pi }\) and \({\tilde{B}} = \sqrt{4 \pi }\). The perturbation of the magnetic field is generated by the magnetic potential perturbation in z-direction \(\delta A_z = \frac{{\tilde{B}}}{2\pi } \, \exp (1-r^2)\). The pressure is set such that it balances the centrifugal force generated by the circular motion against the centripetal force stemming from the tension in the magnetic field lines. In radial coordinates, with the generic radial position \(r = \sqrt{x^2 + y^2}\), the equation for the pressure perturbation writes
with the definitions
Integration of (66) yields
We set the background velocity field to \({\textbf {v}}_0 = (1,1,0)\), thus the vortex is moving diagonally through the computational domain, and the background pressure is \(p_0 = 1\). Since the novelty of the scheme is the stability under a material time step which is independent of the sound and Alfvén speeds, we study the experimental order of convergence (EOC) under a variation of the Alfvén speeds. To this end, let us note that simply adding a constant background magnetic field does not yield an analytic solution of the ideal MHD equations in this setup. Thus, since the Alfvén speeds depend on the inverse of the density, the Alfvén Mach number can be decreased by lowering the background density \(\rho _0\). We underline that decreasing the density will increase the sound speed as well, and the kinetic influence on the pressure perturbation (68) will decrease. However, the contribution of the magnetic field remains the same for all the cases considered. We remark that, due to a zero background magnetic field, it is not possible to compute the Alfvén Mach number \(M_b\) over the whole computational domain. Therefore, the maximal acoustic Mach number \(M_c\) and Alfvén speed b are reported in Table 1 for different background densities \(\rho _0 = 10^{-k}\), \(k = 0, \ldots , 5\).
The simulations are run on a sequence of successively refined meshes until the final time \(t_f=1\). In Table 2, the \(L^2\) error in \(\rho , u, p, B_x\) and \(A_z\) are summarized. We observe that, for all regimes, the expected EOC of two is achieved. Furthermore, the scheme performs well for small values of the density. We recall, however, that the scheme is not naturally positivity preserving.
To demonstrate the advantage of having a scale independent CFL stability condition, we plot in Fig. 1 the ratio between a fully explicit time step restricted by the fastest characteristic speeds against the time step given by the CFL condition of our scheme (20). The SIFV-EB scheme allows, especially for low acoustic and Alfvén Mach numbers, to use a time step which is several orders of magnitude larger than the one of an explicit scheme while maintaining second order accuracy in space and time.
4.2 1D Riemann Problems
Next, we consider a series of Riemann Problems (RP) which are standard one-dimensional test cases for ideal MHD solvers. The setup is detailed in Table 3 and it is taken from [30]. They have already been used to validate for instance the Osher-type scheme [33] or the HLLEM Riemann solver presented in [30]. We compare the results obtained with our new SIFV-EB scheme against the exact solution, that has been computed with an exact Riemann solver that has kindly been provided by Falle and Komissarov [34, 35] and which is labeled in Figs. 2 and 3 as reference solution. For an alternative exact Riemann solver of the MHD equations, see also [60]. These test cases verify the robustness of the new SIFV-EB scheme in the case of moderate and high Mach number flows. The computational domain is given by \(\Omega =[-0.5;0.5]\) and the grid is made of 2000 cells along the \(x-\)direction with Dirichlet boundaries.
For each RP, depicted in Figs. 2 and 3. The SIFV-EB scheme is able to capture the correct shock position and all waves accurately for RP2–RP7. In particular, the overshoot in density and pressure in RP1 is an artifact that also appears in approximate solutions produced with the HLLEM scheme from [30], the Osher-type scheme [33] or the Rusanov scheme. Moreover, RP7 contains an isolated steady Alfvén wave which is well resolved. However, small perturbations of density and pressure appear around the jump position. To further investigate the nature of these errors, we compare the solution to an explicit second order MUSCL-FV scheme using a TVD limiter in Fig. 4 with the same mesh resolution. We can observe that these artifacts also arise with the same order of magnitude using the explicit solver. This is comparable to the errors that appear in the density and pressure for RP1 which have been reproduced with different approximate Riemann solvers, see e.g. [30, 33].
Overall, the new SIFV-EB scheme is clearly more diffusive than an explicit approximate Riemann solver. This is due to the semi-implicit nature and the material time stepping, based on the fluid velocity u, that allows much larger time steps. This is illustrated in Fig. 5 where a comparison between the material time stepping \(\Delta t\) of the SIFV-EB scheme with respect to a fully explicit time step \(\Delta t_\text {MHD}\), enforced by the fast magneto-sonic wave speeds \(\lambda _{1,8}\), is given. Even though most RP are placed in a compressible regime, our scheme allows for larger time steps that is reflected by slightly more diffusive fast traveling waves, while the material waves are captured accurately, as expected. Let us note that the first time step is always given by a magneto-sonic explicit time step \(\Delta t = \Delta t_\text {MHD}\), since tests RP1, RP3 and RP4 are initialized with a zero velocity u which would lead to an infinitely large first time step and thus to inaccurate numerical results. Since this yields \(\Delta t/\Delta t_\text {MHD} = 1\) for the first time step, we have plotted the ratio starting from the second time step in Fig. 5. Moreover, the time step ratio remains almost constant for those Riemann problems which satisfy a maximum principle for the velocity u.
4.3 Blast Wave
The MHD blast wave problem introduced in [7] represents a challenging test since it contains a strong magnetic field and a jump in the pressure of four orders of magnitude. The initial density is constant \(\rho = 1\), the initial velocity field is set to zero \((u,v,w) = (0,0,0)\) and the magnetic field is \({\textbf {B}}= (70,0,0)\). The computational domain \(\Omega =[-0.5;0.5]\times [-0.5;0.5]\) is paved with \(N_x \times N_y=1024 \times 1024\) cells, and Dirichlet boundary conditions are imposed everywhere. Inside the circular region \(r < 0.1\) with \(r = \sqrt{x^2 + y^2}\), the pressure is set to \(p = 1000\) whereas outside it is assigned with \(p = 0.1\). Thus initially, the Alfvén waves are faster than the sound speed inside the circular domain, that are given by \({b} = 70\) and \(c = 37.4166\), respectively. Here, we set \(\gamma = 1.4\) and the final time is chosen to be \(t_f = 0.01\). The results at final time for density, pressure, magnitude of the velocity computed as \({\textbf {v}}^2\) as well as the magnetic energy density m are displayed in Fig. 6 for the second-order SIFV-EB scheme. We observe that there are no oscillations arising in the simulation and all waves are captured accurately. The results compare qualitatively well with the literature [6, 18, 36].
4.4 Ideal MHD Rotor Problem
The next test case concerns a benchmark for the ideal MHD equations, the so-called rotor problem proposed in [7], which is characterized by a big density difference inside and outside of the rotor. The computational domain is given by the square \(\Omega =[-0.5;0.5]\times [-0.5;0.5]\) with Dirichlet boundaries, and it is discretized using \(N_x \times N_y=1024 \times 1024\) control volumes. The background pressure and magnetic field are constant and set to \(p = 1\) and \({\textbf {B}}= (2.5,0,0)^T\), respectively. The corresponding magnetic vector potential in z-direction is \(A_z = 2.5 y\). The density and velocity field are defined differently inside and outside of the rotor, i.e.
The ratio of specific heats is set to \(\gamma = 1.4\) and the simulation is run until the final time \(t_f=0.25\). In Fig. 7, the results for the second-order SIFV-EB scheme are plotted for the density, pressure, acoustic Mach number \({M}_{c}\) and the magnetic energy density m. The scheme, though spanning a Mach number regime from weakly compressible to compressible with \({M}_{c}> 1\), yields results that compare well with simulations reported in literature see e.g. [18, 31].
Furthermore, in Fig. 8 we also monitor the error in the divergence of the magnetic field, which is measure in the \(L_{\infty }\) norm over the whole computational domain at all time instants. For both the blast wave and the rotor problem we achieve a discrete divergence-free condition up to machine accuracy. Alongside, the new semi-implicit schemes allows the time step to be still larger than the one of a fully explicit scheme, even if strong shocks occur in these test cases. Looking at the right panel of Fig. 8, we clearly see that the SIFV-EB method can lead to a time marching scheme with a time step that is up to four times larger than a classical explicit solver.
4.5 Orszag–Tang Vortex
We consider the well-known Orszag–Tang vortex for the two-dimensional ideal MHD equations [27, 54, 56]. The initial condition is smooth and reads
The magnetic field \({\textbf {B}}\) is generated by the z-component of the magnetic potential
Though initially smooth, the dynamics develop shocks along the diagonal direction in combination with a vortex located at the center of the computational domain, which is defined by \(\Omega =[0;1]\times [0;1]\) with periodic boundaries. We use a mesh made of \(N_x \times N_y=1024 \times 1024\) cells. Figure 9 depicts snapshots of the pressure computed with our second-order SIFV-EB scheme at times \(t = \{0.5, 1, 2, 4\}\). The features of the flows and the development of the shock are captured well and the results are qualitatively in very good agreement with those reported in the literature [5, 6, 31].
4.6 Field Loop Advection
We solve the magnetic field loop advection problem originally proposed in [39], in the low Mach number version of [31] with \(\rho = 1\), an initial velocity field \((u,v,w) = (2,1,0)\) and the pressure \(p = 10^5\). The computational domain is given by \(\Omega =[-1;1]\times [-0.5;0.5]\) with periodic boundaries, and we use a mesh composed of \(N_x \times N_y = 512 \times 256\) cells. The magnetic field is prescribed by the magnetic vector potential in z-direction given by
where \(A_0=10^{-3}\), \(R = 0.3\) and \(r = \sqrt{x^2 + y^2}\). This test case is very challenging because of a singular point in the magnetic field \({\textbf {B}}\) at the center of the computational domain. This setting places the flow in a low acoustic Mach number regime \({M}_{c}\approx 6 \cdot 10^{-3}\) and high Alfvén Mach number regime \({M}_b\approx 7.9 \cdot 10^3\). To make the test more challenging, we perform four different simulations with a progressively increasing value of \(A_0\), reaching a configuration with an Alfvén Mach number \({M}_b\approx 7.9\) corresponding to \(A_0=1\). The final time is chosen to be \(t_f = 1\), and the results are depicted in Fig. 10. The shape of the magnitude of the magnetic field remains qualitatively unchanged despite the difference in the Alfvén Mach number, hence demonstrating that the new SIFV-EB scheme is independent of the magnetic scales. Indeed, the time step for all the simulations is the same and is only determined by the convective velocity \((u,v)=(2,1)\) which transports the loop diagonally through the domain.
In Fig. 11 we show the errors related to the divergence of the magnetic field for all four simulations, demonstrating that the discrete divergence-free condition is preserved up to machine accuracy. The infinity norm of the divergence of \({\textbf {B}}\) is considered over the whole domain and at each time level.
4.7 Magnetized Kelvin Helmholtz Instability
We consider the setup for the Kelvin–Helmholtz instability recently proposed in [47] for ideal MHD. The computational domain is the rectangular box \(\Omega =[0;2]\times [-0.5;0.5]\) with periodic boundaries. It is paved with a computational grid made of \(N_x \times N_y = 512 \times 256\) control volumes. A uniform density \(\rho =\gamma \) with \(\gamma =1.4\) and a uniform pressure \(p=1\) is initially assigned to the fluid. The velocity and the magnetic field are prescribed as a function of the parameter \(M_x\), which represents the maximum acoustic Mach number of the horizontal flow. The velocity field is given by
with the perturbation \(\eta (x)\)
The magnetic field at the initial time is uniform and horizontal, i.e. \(B_x=0.1 \, M_x\), and the associated \(z-\)component of the magnetic potential is given by \(A_0=B_x \, y\). This configuration at time \(t=0\) leads to a unit adiabatic sound speed and to a minimum Alfvén mach number \(M_{b,\min {}}=11.82\). The simulation is run with different values of \(M_x\) until the final time \(t_f=t_{\max }/6\) with \(t_{\max }=4.8/M_x\). The flow develops a smooth and resolved interface across the shear flow, hence yielding to convergent results in the early stages of the dynamics. Figure 12 plots the acoustic Mach number at the end of the simulation. It is rescaled with the prescribed value of \(M_x\). Note that all the results are almost identical since excessive numerical dissipation is avoided thanks to the central implicit discretization of the pressure and the magnetic terms. Fully explicit schemes would not preserve the vortical structures as the value of \(M_x\) gets smaller, as noticed in [47]. Furthermore, our SIFV-EB scheme can run these test cases with a time step that is up to 10,000 times larger compared to a fully explicit method, as shown in Fig. 13.
4.8 3D Cloud-Shock Interaction Problem
As last test case we consider the 3D cloud-shock interaction problem. The computational domain is given by \(\Omega =[0;1]^3\) with Dirichlet boundary conditions, and we employ a computational mesh with a total number of \(N_x=N_y=N_z=180^3\) cells, corresponding to approximately \(16.5 \cdot 10^6\) degrees of freedom. The initial condition is taken from [44] where the initial shock front is located at \(x_0 = 0.0\) with
The associated magnetic vector potential writes
This shock front travels towards a spherical cloud of density \(\rho = 10\) situated at \({\textbf {x}}= (0.25,0.5,0.5)\) with radius \(r=0.15\). The final time is set to \(t_f = 0.06\). In Fig. 14, we compare the first against the second order SIFV-EB scheme. The density profiles along the planes cutting through the center of the initial cloud position are displayed. The first snapshot is taken shortly after the shock front hits the density cloud, the second one after the shock front passes through the cloud, and the third one shortly before the shock front leaves the computational domain. One can observe that the second-order scheme greatly improves the resolution of the flow structures, which are qualitatively in very good agreement with the results presented in [44]. This test case demonstrates the capability of the SIFV-EB scheme to handle genuinely 3D magnetized flows at reasonable compute times due to the linear implicit structure of our novel SIFV-EB scheme.
5 Conclusions
In this work, we have introduced a new divergence-free semi-implicit finite volume method for the simulation of ideal magnetized flows in multiple space dimensions. To tackle the time multi-scale nature of the governing equations, a flux splitting technique is adopted, which allows to separate the convective terms, the hydrodynamic pressure contribution and its magnetic counterpart. More specifically, the non-linear convective contribution is discretized explicitly with a classical finite volume scheme, while we use a finite difference semi-implicit strategy to compute the hydrodynamic pressure and the magnetic fluxes, that ultimately yields two linear systems to be solved at each time step of the algorithm. We underline that these two systems are uncoupled, thus firstly we solve for the unknown magnetic field, and secondly we determine the unknown pressure contribution. This approach makes the scheme very efficient, especially in the low acoustic or Alfvén regimes, since the time step is restricted by a milder CFL stability condition that is only based on the material waves. Furthermore, no numerical dissipation is added in the discretization of the implicit pressure fluxes, hence the scheme does not pollute the solution in the low acoustic Mach number regime, contrarily to standard explicit finite volume methods. To satisfy the solenoidal property of the magnetic field, the equations are written in terms of the magnetic vector potential in a multi-dimensional setting, and a set of finite difference operators are specifically designed to mimic the algebraic property of the zero div-curl at the discrete level, thus preserving the structure of the underlying model. The entire spatial discretization is cell-centered, and second-order of accuracy is achieved by means of a TVD reconstruction procedure in the finite volume scheme. The class of semi-implicit IMEX Runge–Kutta schemes is employed to reach second-order accuracy also in time. The new schemes have been thoroughly tested in terms of accuracy and robustness against a wide set of test cases, addressing different acoustic and Alfvén Mach number regimes, demonstrating the capability of our novel methods to span a wide range of physical settings in ideal MHD.
In the future, we plan to carry out a theoretical and numerical study of the limit models in the low Alfvén Mach number, which is still rather unexplored. The extension of the presented approach to unstructured meshes is also foreseen, with particular care in the development of divergence-free operators that can guarantee the solenoidal property of the magnetic field. Finally, future research lines will consider the application to viscous and resistive MHD equations in the context of Tokamak simulations.
Data Availability
The datasets generated during the current study are available from the corresponding author upon reasonable request.
Code Availability
The code is written in Fortran programming language and is available upon reasonable request addressed to the corresponding author.
References
Altmann, C., Belat, T., Gutnic, M., Helluy, P., Mathis, H., Sonnendruecker, E., Angulo, W., Herard, J.-M.: A local time-stepping discontinuous Galerkin algorithm for the MHD system. In ESAIM: Proceedings, vol. 28, pp. 33–54 (2009)
Ascher, U.M., Ruuth, S.J., Spiteri, R.J.: Implicit-explicit Runge–Kutta methods for time-dependent partial differential equations. Appl. Numer. Math. 25, 151–167 (1982)
Avgerinos, S., Bernard, F., Iollo, A., Russo, G.: Linearly implicit all Mach number shock capturing schemes for the Euler equations. J. Comput. Phys. 393, 278–312 (2019)
Balsara, D.: Second-order accurate schemes for magnetohydrodynamics with divergence-free reconstruction. Astrophys. J. Suppl. Ser. 151, 149–184 (2004)
Balsara, D.S.: Multidimensional HLLE Riemann solver: application to Euler and magnetohydrodynamic flows. J. Comput. Phys. 229(6), 1970–1993 (2010)
Balsara, D.S., Dumbser, M.: Divergence-free MHD on unstructured meshes using high order finite volume schemes based on multidimensional Riemann solvers. J. Comput. Phys. 299, 687–715 (2015)
Balsara, D.S., Spicer, D.S.: A staggered mesh algorithm using high order Godunov fluxes to ensure solenoidal magnetic fields in magnetohydrodynamic simulations. J. Comput. Phys. 149(2), 270–292 (1999)
Barsukow, W.: Truly multi-dimensional all-speed schemes for the Euler equations on Cartesian grids. J. Comput. Phys. 435, 110216 (2021)
Barsukow, W.: All-speed numerical methods for the Euler equations via a sequential explicit time integration. J. Sci. Comput. 95(2), 53 (2023)
Birke, C., Boscheri, W., Klingenberg, C.: A well-balanced semi-implicit IMEX finite volume scheme for ideal Magnetohydrodynamics at all Mach numbers. J. Sci. Comput. 98(2), 34 (2024)
Birke, C., Chalons, C., Klingenberg, C.: A low Mach two-speed relaxation scheme for the compressible Euler equations with gravity. Commun. Math. Sci. 21 (2023)
Boscarino, S., Filbet, F., Russo, G.: High order semi-implicit schemes for time dependent partial differential equations. J. Sci. Comput. 68, 975–1001 (2016)
Boscarino, S., Pareschi, L.: On the asymptotic properties of IMEX Runge–Kutta schemes for hyperbolic balance laws. J. Comput. Appl. Math. 316, 60–73 (2017)
Boscarino, S., Pareschi, L., Russo, G.: A unified IMEX Runge–Kutta approach for hyperbolic systems with multiscale relaxation. SIAM J. Numer. Anal. 55(4), 2085–2109 (2017)
Boscarino, S., Qiu, J.-M., Russo, G., Xiong, T.: A high order semi-implicit IMEX WENO scheme for the all-Mach isentropic Euler system. J. Comput. Phys. 392, 594–618 (2019)
Boscarino, S., Russo, G.: On a class of uniformly accurate IMEX Runge–Kutta schemes and applications to hyperbolic systems with relaxation. SIAM J. Sci. Comput. 31, 1926–1945 (2009)
Boscheri, W., Dimarco, G., Pareschi, L.: Locally structure-preserving div-curl operators for high order discontinuous Galerkin schemes. J. Comput. Phys. 486, 112130 (2023)
Boscheri, W., Dumbser, M., Balsara, D.S.: High-order ADER-WENO ALE schemes on unstructured triangular meshes-application of several node solvers to hydrodynamics and magnetohydrodynamics. Int. J. Numer. Methods Fluids 76(10), 737–778 (2014)
Boscheri, W., Dumbser, M., Zanotti, O.: High order cell-centered Lagrangian-type finite volume schemes with time-accurate local time stepping on unstructured triangular meshes. J. Comput. Phys. 291, 120–150 (2015)
Boscheri, W., Pareschi, L.: High order pressure-based semi-implicit IMEX schemes for the 3D Navier–Stokes equations at all Mach numbers. J. Comput. Phys. 434, 110206 (2021)
Boscheri, W., Tavelli, M.: High order semi-implicit schemes for viscous compressible flows in 3d. Appl. Math. Comput. 434, 127457 (2022)
Bouchut, F., Klingenberg, C., Waagan, K.: A multiwave approximate Riemann solver for ideal MHD based on relaxation. I: theoretical framework. Numer. Math. 108, 7–42 (2007)
Brackbill, J.U., Barnes, D.C.: The effect of nonzero \(\nabla \cdot B\) on the numerical solution of the magnetohydrodynamic equations. J. Comput. Phys. 35(3), 426–430 (1980)
Brugnano, L., Casulli, V.: Iterative solution of piecewise linear systems. SIAM J. Sci. Comput. 30, 463–472 (2007)
Chen, W., Wu, K., Xiong, T.: High order asymptotic preserving finite difference WENO schemes with constrained transport for MHD equations in all sonic Mach numbers. J. Comput. Phys. 488, 112240 (2023)
Cordier, F., Degond, P., Kumbaro, A.: An asymptotic-preserving all-speed scheme for the Euler and Navier–Stokes equations. J. Comput. Phys. 231, 5685–5704 (2012)
Dahlburg, R.B., Picone, J.M.: Evolution of the Orszag–Tang vortex system in a compressible medium. I. Initial average subsonic flow. Phys. Fluids B 1(11), 2153–2171 (1989)
Dedner, A., Kemm, F., Kröner, D., Munz, C.-D., Schnitzer, T., Wesenberg, M.: Hyperbolic divergence cleaning for the MHD equations. J. Comput. Phys. 175(2), 645–673 (2002)
Dellacherie, S.: Analysis of Godunov type schemes applied to the compressible Euler system at low Mach number. J. Comput. Phys. 229, 978–1016 (2010)
Dumbser, M., Balsara, D.S.: A new efficient formulation of the HLLEM Riemann solver for general conservative and non-conservative hyperbolic systems. J. Comput. Phys. 304, 275–319 (2016)
Dumbser, M., Balsara, D.S., Tavelli, M., Fambri, F.: A divergence-free semi-implicit finite volume scheme for ideal, viscous, and resistive magnetohydrodynamics. Int. J. Numer. Methods Fluids 89, 16–42 (2019)
Dumbser, M., Casulli, V.: A conservative, weakly nonlinear semi-implicit finite volume scheme for the compressible Navier–Stokes equations with general equation of state. Appl. Math. Comput. 272, 479–497 (2016)
Dumbser, M., Toro, E.F.: On universal Osher-type schemes for general nonlinear hyperbolic conservation laws. Commun. Comput. Phys. 10(3), 635–671 (2011)
Falle, S.A.E.G.: Rarefaction shocks, shock errors, and low order of accuracy in ZEUS. ApJ 577(2), L123–L126 (2002)
Falle, S.A.E.G., Komissarov, S.S.: On the inadmissibility of non-evolutionary shocks. J. Plasma Phys. 65(1), 29–58 (2001)
Fambri, F.: A novel structure preserving semi-implicit finite volume method for viscous and resistive magnetohydrodynamics. Int. J. Numer. Methods Fluids 93, 3447–3489 (2021)
Fambri, F., Zampa, E., Busto, S., Río-Martín, L., Hindenlang, F., Sonnendrücker, E., Dumbser, M.: A well-balanced and exactly divergence-free staggered semi-implicit hybrid finite volume/finite element scheme for the incompressible MHD equations. J. Comput. Phys. 493, 112493 (2023)
Fey, M., Torrilhon, M.: A constrained transport upwind scheme for divergence-free advection. In: Hyperbolic Problems: Theory, Numerics, Applications: Proceedings of the Ninth International Conference on Hyperbolic Problems held in CalTech, Pasadena, March 25–29, 2002, pp. 529–538 (2003)
Gardiner, T.A., Stone, J.M.: An unsplit Godunov method for ideal MHD via constrained transport. J. Comput. Phys. 205(2), 509–539 (2005)
Godunov, S.: Finite difference methods for the computation of discontinuous solutions of the equations of fluid dynamics. Mat. Sb. 47, 271–306 (1959)
Guillard, H., Murrone, A.: On the behavior of upwind schemes in the low Mach number limit:II. Godunov type schemes. Comput. Fluids 33, 655–675 (2004)
Harten, A., Lax, P., van Leer, B.: On upstream differencing and Godunov-type schemes for hyperbolic conservation laws. SIAM Rev. 25, 35–61 (1983)
Helzel, C., Rossmanith, J.A., Taetz, B.: An unstaggered constrained transport method for the 3D ideal magnetohydrodynamic equations. J. Comput. Phys. 230(10), 3803–3829 (2011)
Helzel, C., Rossmanith, J.A., Taetz, B.: A high-order unstaggered constrained-transport method for the three-dimensional ideal magnetohydrodynamic equations based on the method of lines. SIAM J. Sci. Comput. 35(2), A623–A651 (2013)
Hyman, J.M., Shashkov, M.: Natural discretizations for the divergence, gradient, and curl on logically rectangular grids. Comput. Math. Appl. 33, 81–104 (1997)
Klein, R.: Semi-implicit extension of a Godunov-type scheme based on low Mach number asymptotics I: one-dimensional flow. J. Comput. Phys. 121, 213–237 (1995)
Leidi, G., Birke, C., Andrassy, R., Higl, J., Edelmann, P.V.F., Wiest, G., Klingenberg, C., Röpke, F.K.: A finite-volume scheme for modeling compressible magnetohydrodynamic flows at low Mach numbers in stellar interiors. A &A 668, A143 (2022)
Lipnikov, K., Manzini, G., Shashkov, M.: Mimetic finite difference method. J. Comput. Phys. 257, 1163–1227 (2014)
Lukáčová-Medvid’ová, M., Peshkov, I., Thomann, A.: An implicit-explicit solver for a two-fluid single-temperature model. J. Comput. Phys. 498, 112696 (2024)
Margolin, G., Shashkov, M., Smolarkiewicz, P.K.: A discrete operator calculus for finite difference approximations. Comput. Methods Appl. Mech. Eng. 187, 365–383 (2000)
Munz, C.-D., Omnes, P., Schneider, R., Sonnendrücker, E., Voss, U.: Divergence correction techniques for Maxwell solvers based on a hyperbolic model. J. Comput. Phys. 161(2), 484–511 (2000)
Osher, S., Solomon, F.: A partially implicit method for large stiff systems of ODE’s with only few equations introducing small time-constants. SIAM J. Numer. Anal. 13, 645–663 (1976)
Pareschi, L., Russo, G.: Implicit-explicit Runge–Kutta schemes and applications to hyperbolic systems with relaxation. J. Sci. Comput. 25, 129–155 (2005)
Picone, J.M., Dahlburg, R.B.: Evolution of the Orszag-Tang vortex system in a compressible medium. II. Supersonic flow. Phys. Fluids B 3(1), 29–44 (1991)
Roe, P.L., Balsara, D.S.: Notes on the eigensystem of magnetohydrodynamics. SIAM J. Appl. Math. 56(1), 57–67 (1996)
Tang, C.-M., Orszag, S.A.: Small-scale structure of two-dimensional magnetohydrodynamic turbulence. J. Fluid Mech. 90(1), 129–143 (1979)
Saad, Y., Schultz, M.: GMRES: a generalized minimal residual algorithm for solving nonsymmetric linear systems. SIAM J. Sci. Stat. Comput. 7, 856–869 (1986)
Toro, E.F.: Riemann Solvers and Numerical Methods for Fluid Dynamics: a Practical Introduction. Springer, New York (2009)
Toro, E.F., Vázquez-Cendón, M.E.: Flux splitting schemes for the Euler equations. Comput. Fluids 70, 1–12 (2012)
Torrilhon, M.: Non-uniform convergence of finite volume schemes for Riemann problems of ideal magnetohydrodynamics. J. Comput. Phys. 192(1), 73–94 (2003)
Viallet, M., Baraffe, I., Walder, R.: Towards a new generation of multi-dimensional stellar evolution models: development of an implicit hydrodynamic code. A &A 531, A86 (2011)
Yee, K.: Numerical solution of initial boundary value problems involving Maxwell’s equations in isotropic media. IEEE Trans. Antennas Propag. 14(3), 302–307 (1966)
Acknowledgements
WB received financial support by Fondazione Cariplo and Fondazione CDP (Italy) under the project No. 2022-1895 and by the Italian Ministry of University and Research (MUR) with the PRIN Project 2022 No. 2022N9BM3N. WB is member of the GNCS-INdAM (Istituto Nazionale di Alta Matematica) group.
Funding
Open access funding provided by Università degli Studi di Ferrara within the CRUI-CARE Agreement. WB received financial support by Fondazione Cariplo and Fondazione CDP (Italy) under the project No. 2022-1895 and by the Italian Ministry of University (MUR) with the PRIN Project 2022 No. 2022N9BM3N.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no conflict of interest.
Ethics Approval
Not applicable.
Consent to Participate
Not applicable.
Consent for Publication
Not applicable.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Boscheri, W., Thomann, A. A Structure-Preserving Semi-implicit IMEX Finite Volume Scheme for Ideal Magnetohydrodynamics at all Mach and Alfvén Numbers. J Sci Comput 100, 67 (2024). https://doi.org/10.1007/s10915-024-02606-1
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s10915-024-02606-1
Keywords
- Semi-implicit
- Divergence-free
- Low Mach and low Alfvén number flows
- Magnetohydrodynamics
- Finite volume scheme