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 (∼106 Ω−1m−1\sim 10^{6}\,\Omega^{-1}m^{-1}) and low velocity (∼1m/s\sim 1m/s), which makes the induced current densities rather modest. When this modest current density is spread over a small area (∼0.1m\sim 0.1m 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 Ω\Omega be a bounded Lipschitz domain in RdR^{d} (d=3)(d=3). The governing equations of the reduced MHD system are: Given known body force f(x,t)f(x,t) and imposed static magnetic field B(x)B(x), find the fluid velocity u(x,t)u(x,t), the pressure p(x,t)p(x,t) and the electric potential ϕ(x,t)\phi(x,t) 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 JJ times with different initial conditions and/or body forces. The solution (uj,pj,ϕj)(u_{j},p_{j},\phi_{j}) of jj-th realization, which corresponds to the initial condition uj0(x)u^{0}_{j}(x) and body force fj(x,t)f_{j}(x,t), satisfies, for j=1,2,...,Jj=1,2,...,J,

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 ujnu_{j}^{n} and the electric potential ϕjn\phi_{j}^{n} respectively

where ujn=uj(x,tn)u_{j}^{n}=u_{j}(x,t_{n}), ϕjn=ϕj(x,tn)\phi_{j}^{n}=\phi_{j}(x,t_{n}) and tn=nΔtt_{n}=n\Delta t (n=0,1,2,...n=0,1,2,...).

We then propose a first order, partitioned, ensemble algorithm given by

Sub-problem 1: Given ujnu_{j}^{n} and ϕjn\phi_{j}^{n}, find ujn+1u_{j}^{n+1} and pjn+1p_{j}^{n+1} satisfying

Sub-problem 2: Given ujnu_{j}^{n}, find ϕjn+1\phi_{j}^{n+1} satisfying

In Sub-problem 1, moving all the known quantities (at time level tnt_{n}) to the right hand side, one can see all ensemble members uju_{j} have the same coefficient matrix. Sub-problem 2 is a linear problem for ϕj\phi_{j} 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 22 we establish the notation and give a weak formulation of the reduced MHD system. In Section 33 we prove the long-time stability of the proposed algorithm under a timestep condition. In Section 44 we present the convergence analysis of the algorithm. Several numerical examples are presented in Section 55 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 Elss¨\ddot{s}sser variables in .

Notation and preliminaries

Throughout this paper the L2(Ω)L^{2}(\Omega) norm of scalars, vectors, and tensors will be denoted by ∥⋅∥\|\cdot\| with the usual L2L^{2} inner product denoted by (⋅,⋅)(\cdot,\cdot). Hk(Ω)H^{k}(\Omega) is the Sobolev space W2k(Ω)W_{2}^{k}(\Omega), with norm ∥⋅∥k\|\cdot\|_{k}. For functions v(x,t)v(x,t) defined on (0,T)(0,T), we define the norms, for 1≤m<∞1\leq m<\infty,

The norm on the dual space of XX is defined by

A weak formulation of the reduced MHD equations is: Find u:[0,T]→Xu:[0,T]\rightarrow X, p:[0,T]→Qp:[0,T]\rightarrow Q, and ϕ:[0,T]→S\phi:[0,T]\rightarrow S for a.e. t∈(0,T]t\in(0,T] satisfying

We will use the discrete Gronwall inequality (Lemma 2 below) in the error analysis, see for proof.

Let D≥0D\geq 0 and κn,An,Bn,Cn≥0\kappa_{n},A_{n},B_{n},C_{n}\geq 0 for any integer n≥0n\geq 0 and satisfy

Suppose that for all n, Δtκn≤1,\Delta t\kappa_{n}\leq 1, and set gn=(1−Δtκn)−1g_{n}=(1-\Delta t\kappa_{n})^{-1}. Then,

We denote conforming velocity, pressure, potential finite element spaces based on an edge to edge triangulation (d=2d=2) or tetrahedralization (d=3d=3) of Ω\Omega with maximum element diameter hh by

We also assume the finite element spaces (XhX_{h}, QhQ_{h}) satisfy the usual discrete inf-sup /LBBhLBB^{h} 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 55. We further assume the finite element spaces satisfy the approximation properties of piecewise polynomials on quasiuniform meshes

where the generic constant C>0C>0 is independent of mesh size hh. An example for which the LBBhLBB_{h} stability condition and the approximation properties are satisfied is the finite elements pair (Pk+1P^{k+1}–PkP^{k}–Pk+1P^{k+1}), k≥1k\geq 1. For finite element methods see for more details.

The discretely divergence free subspace of XhX_{h} 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 uj,hn∈Xhu_{j,h}^{n}\in X_{h} and ϕj,hn∈Sh\phi_{j,h}^{n}\in S_{h}, find uj,hn+1∈Xhu_{j,h}^{n+1}\in X_{h} and pj,hn+1∈Qhp_{j,h}^{n+1}\in Q_{h} satisfying

Sub-problem 2: Given uj,hn∈Xhu_{j,h}^{n}\in X_{h}, find ϕj,hn+1∈Sh\phi_{j,h}^{n+1}\in S_{h} 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 hh. Suppose the following time step conditions hold

Set vh=uj,hn+1v_{h}=u_{j,h}^{n+1} in (14) and multiply through by Δt\Delta t. This gives

Set ψh=ϕj,hn+1\psi_{h}=\phi_{j,h}^{n+1} in (15) and multiply through by Δt\Delta t. 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 vn=v(tn)v^{n}=v(t_{n}) and tn=nΔtt_{n}=n\Delta t.

To analyze the rate of convergence of the approximation, we assume that the following regularity for the exact solutions:

Let eu,jn=ujn−uj,hne_{u,j}^{n}=u_{j}^{n}-u_{j,h}^{n} and eϕ,jn=ϕjn−ϕj,hne_{\phi,j}^{n}=\phi_{j}^{n}-\phi_{j,h}^{n} denote the approximation error of the jj-th simulation at the time instance tnt_{n}. We then have the following error estimates.

For all j=1,…,Jj=1,\ldots,J, if the following time step conditions hold

then, there exists a positive constant CC independent of the time step such that

In particular, if Taylor-Hood elements (k=2k=2, s=1s=1) are used, i.e., the C0C^{0} piecewise-quadratic velocity space XhX_{h} and the C0C^{0} piecewise-linear pressure space QhQ_{h}, and P2P_{2} element (m=2m=2) is used for ShS_{h}, we then have the following estimate.

Assume that ∥eu,j0∥\|e_{u,j}^{0}\|, ∥∇eu,j0∥\|\nabla e_{u,j}^{0}\| and , ∥∇eϕ,j0∥\|\nabla e_{\phi,j}^{0}\| are all O(h2)O(h^{2}) accurate or better. Then, if (Xh,Qh,Sh)(X_{h},Q_{h},S_{h}) is chosen as the (P2,P1,P2)(P_{2},P_{1},P_{2}) elements, we have

The true solution (uj,pj,ϕj)(u_{j},p_{j},\phi_{j}) 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 Ihujn∈VhI_{h}u_{j}^{n}\in V_{h} is an interpolant of ujnu_{j}^{n} in VhV_{h}, and Ihϕjn∈ShI_{h}\phi_{j}^{n}\in S_{h} is an interpolant of ϕjn\phi_{j}^{n} in Sh.S_{h}.

Setting vh=Uj,hn+1∈Vhv_{h}=U_{j,h}^{n+1}\in V_{h} and ψh=Φj,hn+1∈Sh\psi_{h}=\Phi_{j,h}^{n+1}\in S_{h}, rearranging the nonlinear terms and multiply (38) by 22, 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 b∗(⋅,⋅,⋅)b^{*}(\cdot,\cdot,\cdot) 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 ujn+1∈L∞(0,T;H1(Ω))u_{j}^{n+1}\in L^{\infty}(0,T;H^{1}(\Omega)), we have

Using the inequality (13), Young’s inequality, and ujn+1∈L∞(0,T;H1(Ω))u_{j}^{n+1}\in L^{\infty}(0,T;H^{1}(\Omega)), we get

where we set α=C0NCM2\alpha=\frac{C_{0}N}{CM^{2}} and δ=8C02N2C2M4\delta=\frac{8C_{0}^{2}N^{2}}{C^{2}M^{4}}. By Young’s inequality, inequality (13), and the result (17) from the stability analysis, i.e., ∥uj,hn∥2≤C\|u_{j,h}^{n}\|^{2}\leq C, we also have

For the pressure term in (41), because Uj,hn+1∈VhU_{j,h}^{n+1}\in V_{h}, for ∀qj,hn+1∈Qh\forall q_{j,h}^{n+1}\in Q_{h} we have

Combining (39)-(61), and taking C0=124,C1=18C_{0}=\frac{1}{24},C_{1}=\frac{1}{8}, we have

By the convergence condition (28), we have

Then, after rearranging terms, (62) reduces to

Summing (63) and multiplying both sides by 2NΔt2N\Delta t gives

Using the interpolation inequality (6) and the result (17) from the stability analysis, i.e., Δt∑l=0n−1∥∇uj,hl+1∥2≤CM\Delta t\sum_{l=0}^{n-1}\|\nabla u_{j,h}^{l+1}\|^{2}\leq CM, 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 CC 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 (P2P^{2}–P1P^{1}–P2P^{2}) 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 0≤t≤10\leq t\leq 1, M = 16, N = 20, Ω=[0,π]2\Omega=[0,\pi]^{2}, and the imposed magnetic field B=(0,0,1)B=(0,0,1). We consider the true solution (u,p,ϕ)(u,p,\phi) given by

where ϵ\epsilon is a given perturbation. For this problem we will consider two perturbations ϵ1=10−3\epsilon_{1}=10^{-3} and ϵ2=−10−3\epsilon_{2}=-10^{-3}. The boundary conditions are taken to be uh=uϵu_{h}=u_{\epsilon} and ϕh=ϕϵ\phi_{h}=\phi_{\epsilon} on ∂Ω\partial\Omega. 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 1111 perturbations ϵi=10−2−.0009∗i,i=0,…,10\epsilon_{i}=10^{-2}-.0009*i,i=0,\ldots,10. 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 uˉn\bar{u}^{n} and ϕˉn\bar{\phi}^{n}. 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 0≤t≤10\leq t\leq 1, M = 12255, N = 347, Ω=[0,10−1]2\Omega=[0,10^{-1}]^{2}, and the imposed magnetic field B=(0,0,1)B=(0,0,1). We take ff and the boundary conditions equal to and the initial conditions to be equal to

for which we will consider the two perturbations ϵ1=10−1\epsilon_{1}=10^{-1} and ϵ2=10−2\epsilon_{2}=10^{-2}. 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 h=110h=\frac{1}{10} we compute the average energy En=12∥ϕˉn∥2+12∥uˉn∥2E^{n}=\frac{1}{2}\|\bar{\phi}^{n}\|^{2}+\frac{1}{2}\|\bar{u}^{n}\|^{2} over a number of different time steps. As we can see in figure 1 our method is unstable for Δt=110,1100\Delta t=\frac{1}{10},\frac{1}{100}, but becomes stable with Δt=11000\Delta t=\frac{1}{1000} .

References