An efficient, partitioned ensemble algorithm for simulating ensembles of evolutionary MHD flows at low magnetic Reynolds number
Nan Jiang, Michael Schneier
Introduction
Magnetohydrodynamics (MHD) studies the dynamics of electrically conducting fluids in the presence of a magnetic field. It has many applications in astrophysics, planetary science, plasma physics and metallurgical industries, such as MHD turbulence in accretion disks , geodynamo simulations , plasma containment in fusion reactors and magnetic damping of jets and vortices . In a typical laboratory or industrial process, liquid-metal MHD usually has a modest conductivity () and low velocity (), which makes the induced current densities rather modest. When this modest current density is spread over a small area ( in a laboratory), the induced magnetic field is usually found to be negligible by comparison with the imposed magnetic field, . Such flows, i.e. MHD flows that occur at low magnetic Reynolds number, can be modeled by the following reduced MHD system, .
Let be a bounded Lipschitz domain in . The governing equations of the reduced MHD system are: Given known body force and imposed static magnetic field , find the fluid velocity , the pressure and the electric potential such that
Nonlinear dynamical systems such as the MHD system are sensitive to small changes in initial conditions, boundary conditions, body forces and many other input parameters. It is important to understand and quantify the limits of predictability of the system, and to develop computational approaches to reduce simulation time and computational cost while preserving a certain degree of accuracy. Most approaches to represent the uncertainties are ensemble based. Specifically, an ensemble of samples are generated to represent possible events, and then individual simulations are run for each sample. These computations are usually very expensive, and even prohibitive, especially if the size of the ensemble is large. Recently a new ensemble algorithm was proposed for fast calculation of an ensemble of the Navier-Stokes equations , which constructs linear systems with the same coefficient matrix for all realizations at each time step and thus allows the use of the either direct methods such as the LU factorization or iterative methods such as block CG , block GMRS for fast solving the linear systems. In this report, we extend the ensemble algorithm studied in to the reduced MHD system.
Herein we consider computing the reduced MHD system times with different initial conditions and/or body forces. The solution of -th realization, which corresponds to the initial condition and body force , satisfies, for ,
Two aspects need to be considered to construct an efficient ensemble algorithm to solve the above coupled nonlinear system. The first is to use a partitioned method to uncouple the problem into two separate subproblems. This reduces solving a large linear system to solving two much smaller linear systems, which reduces the computational time and memory storage required. Furthermore, uncoupling the system also makes possible the use of highly optimized legacy code for each sub-physics problem, which reduces the main computational complexity. The other aspect is to design an ensemble algorithm for the reduced MHD system such that all ensemble members share one coefficient matrix at each time step.
To start, we first define the ensemble mean of the velocity and the electric potential respectively
where , and ().
We then propose a first order, partitioned, ensemble algorithm given by
Sub-problem 1: Given and , find and satisfying
Sub-problem 2: Given , find satisfying
In Sub-problem 1, moving all the known quantities (at time level ) to the right hand side, one can see all ensemble members have the same coefficient matrix. Sub-problem 2 is a linear problem for that results in one common constant coefficient matrix for all realizations. Sub-Problem 1 and 2 are fully uncoupled at each time step and can be run in parallel. Naturally, if the ensemble is large, it can be divided into several subgroups and then one can apply the algorithm to each subgroup.
This paper is organized into four sections. In Section we establish the notation and give a weak formulation of the reduced MHD system. In Section we prove the long-time stability of the proposed algorithm under a timestep condition. In Section we present the convergence analysis of the algorithm. Several numerical examples are presented in Section to describe the implementation of the algorithm and to demonstrate its efficiency.
The ensemble method was first proposed by Jiang and Layton in to efficiently compute ensembles of Navier-Stokes equations with low/modest Reynolds numbers. For high Reynolds number flows, two ensemble eddy viscosity regularization methods were studied in , and a time relaxation algorithm in . Higher order ensemble methods can be found in . To further reduce the computation cost, incorporating reduced order modeling techniques with the ensemble algorithm was investigated in . An ensemble algorithm for computing flows with varying model parameters were developed in . The ensemble method has also been extended for computing full MHD flows in Elssser variables in .
Notation and preliminaries
Throughout this paper the norm of scalars, vectors, and tensors will be denoted by with the usual inner product denoted by . is the Sobolev space , with norm . For functions defined on , we define the norms, for ,
The norm on the dual space of is defined by
A weak formulation of the reduced MHD equations is: Find , , and for a.e. satisfying
We will use the discrete Gronwall inequality (Lemma 2 below) in the error analysis, see for proof.
Let and for any integer and satisfy
Suppose that for all n, and set . Then,
We denote conforming velocity, pressure, potential finite element spaces based on an edge to edge triangulation () or tetrahedralization () of with maximum element diameter by
We also assume the finite element spaces (, ) satisfy the usual discrete inf-sup / condition for stability of the discrete pressure, see for more on this condition. Taylor-Hood elements, e.g., , , are one such choice used in the tests in Section . We further assume the finite element spaces satisfy the approximation properties of piecewise polynomials on quasiuniform meshes
where the generic constant is independent of mesh size . An example for which the stability condition and the approximation properties are satisfied is the finite elements pair (––), . For finite element methods see for more details.
The discretely divergence free subspace of is
We assume the mesh and finite element spaces satisfy the standard inverse inequality
that is known to hold for standard finite element spaces with locally quasi-uniform meshes . We also define the standard explicitly skew-symmetric trilinear form
The full discretization of the proposed partitioned ensemble algorithm is
Sub-problem 1: Given and , find and satisfying
Sub-problem 2: Given , find satisfying
Stability of the method
In this section, we prove Algorithm (3) is long time, nonlinearly stable under a CFL like time step condition.
Consider the method with a standard spacial discretization with mesh size . Suppose the following time step conditions hold
Set in (14) and multiply through by . This gives
Set in (15) and multiply through by . This gives
The following equality will be used in the next step.
Adding (18) and (19) and using equality (3) gives
Applying Cauchy-Schwarz and Young’s inequality on the right hand side of the equation gives
Next, we bound the trilinear terms using (12), (10) and Young’s inequality.
With this bound, combining like terms, (22) becomes,
With the time step restriction (16) assumed, we have
Summing up (25) and multiplying through by 2 gives
Error Analysis
where and .
To analyze the rate of convergence of the approximation, we assume that the following regularity for the exact solutions:
Let and denote the approximation error of the -th simulation at the time instance . We then have the following error estimates.
For all , if the following time step conditions hold
then, there exists a positive constant independent of the time step such that
In particular, if Taylor-Hood elements (, ) are used, i.e., the piecewise-quadratic velocity space and the piecewise-linear pressure space , and element () is used for , we then have the following estimate.
Assume that , and , are all accurate or better. Then, if is chosen as the elements, we have
The true solution of the reduced MHD system (2) satisfies
where \text{Intp}(u_{j}^{n+1};v_{h})=\frac{1}{N}\big{(}\frac{u_{j}^{n+1}-u_{j}^{n}}{\Delta t}-u_{j,t}(t^{n+1}),v_{h}\big{)}.
where is an interpolant of in , and is an interpolant of in
Setting and , rearranging the nonlinear terms and multiply (38) by , we have
Adding (39) and (40) and using equality (3) gives
We bound the terms on the right hand side of (39) as follows.
Next we analyze the nonlinear terms in (39) one by one. For the first nonlinear term, we have
Using inequality (11) and Young’s inequality, we have the following estimates.
Because is skew-symmetric, we have
For the last nonlinear term in (43), we have
Next, we bound the last two nonlinear terms on the RHS of (39) as follows:
With the assumption , we have
Using the inequality (13), Young’s inequality, and , we get
where we set and . By Young’s inequality, inequality (13), and the result (17) from the stability analysis, i.e., , we also have
For the pressure term in (41), because , for we have
Combining (39)-(61), and taking , we have
By the convergence condition (28), we have
Then, after rearranging terms, (62) reduces to
Summing (63) and multiplying both sides by gives
Using the interpolation inequality (6) and the result (17) from the stability analysis, i.e., , we have
Applying the interpolation inequalities (5), (6), and (7) gives
We now add the following terms to both sides of (67).
Using the triangle inequality on the error equation gives
Applying the interpolation inequalities (5), (6), and (7) and absorbing constants into a new constant yields
Numerical Experiments
In this section we present numerical experiments for Algorithm 3 demonstrating the convergence and stability theorems proven in the previous sections. For all examples we will use the finite element triplet (––) and the finite element software package FEniCS .
For our first test problem we verify the convergence rates proven in section 4 using a variation of the test problem used in . Take the time interval , M = 16, N = 20, , and the imposed magnetic field . We consider the true solution given by
where is a given perturbation. For this problem we will consider two perturbations and . The boundary conditions are taken to be and on . The initial conditions and source terms are chosen to correspond with the exact solution for the given perturbation. As can be seen in tables 1 2 3 and 4 we achieve the expected convergence rates.
2 Efficiency Test
For our second experiment we will consider the same setting as the first numerical experiment except we will use perturbations . In order to measure the efficiency of the ensemble method we compare the CPU time measured in seconds and accuracy of Algorithm 3 versus the non-ensemble IMEX version of Algorithm 3 in terms of the averages and . For both algorithms we will use the direct LU solver MUMPS . We see in tables 5 and 6 that the ensemble algorithm is able to achieve similar accuracy to the non-ensemble algorithm with significant cost savings.
3 Stability Test
In this experiment we test the time step restriction for the stability of our algorithm by using a variation on the test for liquid aluminum performed in . Let , M = 12255, N = 347, , and the imposed magnetic field . We take and the boundary conditions equal to and the initial conditions to be equal to
for which we will consider the two perturbations and . Due to the fact that there is no external energy exchange or body forces the energy in the system should decay to over time assuming the algorithm is stable. For we compute the average energy over a number of different time steps. As we can see in figure 1 our method is unstable for , but becomes stable with .