betaFeedback

WorksPhysics and Astronomy

Multilevel Monte Carlo methods for the Grad-Shafranov free boundary problem

Abstract

The equilibrium configuration of a plasma in an axially symmetric reactor is described mathematically by a free boundary problem associated with the celebrated Grad–Shafranov equation. The presence of uncertainty in the model parameters introduces the need to quantify the variability in the predictions. This is often done by computing a large number of model solutions on a computational grid for an ensemble of parameter values and then obtaining estimates for the statistical properties of solutions. In this study, we explore the savings that can be obtained using multilevel Monte Carlo methods, which reduce costs by performing the bulk of the computations on a sequence of spatial grids that are coarser than the one that would typically be used for a simple Monte Carlo simulation. We examine this approach using both a set of uniformly refined grids and a set of adaptively refined grids guided by a discrete error estimator. Numerical experiments show that multilevel methods dramatically reduce the cost of simulation, with cost reductions typically on the order of 60 or more and possibly as large as 200. Adaptive gridding results in more accurate computation of geometric quantities such as x-points associated with the model.

Introduction

Monte Carlo (MC) techniques are one of the most common strategies for dealing with the quantitative assessment of the accuracy of numerical simulations of physical models with uncertainties. The idea behind these methods is to obtain a large number of samples (typically by numerically solving the associated model) for random realizations of the uncertain parameters, and use these data to gather statistical information about the quantity of interest. However, when the model involves the solution of partial differential equations, the computational effort related to the collection of the data points required can easily become unmanageable. To overcome this difficulty methods like polynomial chaos expansions [46], stochastic Galerkin [18], and stochastic collocation [3] have been used to handle uncertainties associated with a small number of parameters. These techniques, however, often require the development of specialized numerical solvers or rely on the smooth dependence of the model with respect to the parameter values. The multilevel Monte Carlo (MLMC) method was developed [8, 19, 41, 44] as an efficient alternative that does not require additional smoothness assumptions and can take advantage of an existing numerical solver. Given a target1 numerical grid (i.e. a grid whose resolution is considered sufficiently fine) MLMC improves the efficiency of the sampling step by offsetting the bulk of the numerical computations to a sequence of coarser grids where the numerical solution is cheaper.

In the particular context of free-boundary Grad-Shafranov computations subject to parameter uncertainty, the authors have shown that the computational cost can be reduced manyfold by employing a strategy based on stochastic collocation [12]; however, due to the latent possibility of plasma-wall contacts, the smoothness of the mapping between coil currents and equilibria cannot be guaranteed. In this paper, our goal is to overcome this difficulty by approximating the expectation of the equilibrium configuration using a multilevel Monte Carlo Finite-Element (MLMC-FE) approach. We will consider two MLMC-FE algorithms: a classical strategy based on uniformly refined meshes and a variation based on meshes refined adaptively using an a posteriori error estimator. As we shall see, both of these approaches greatly reduce computational costs, with the adaptive strategy being somewhat more effective in computing the approximation of the expectation of geometric properties of the equilibrium configuration.

An outline of the paper is as follows. In § 2, we briefly recall the Grad-Shafranov free boundary problem. § 3 is devoted to the introduction of the Monte Carlo and multilevel Monte Carlo Finite-Element methods. The section concludes with the introduction of an algorithm to compute the optimal number of samples required at each discretization level. In § 4 we present numerical experiments comparing the effectiveness of these strategies with a Monte Carlo strategy based on a single mesh. Concluding remarks are presented in the final § 5. For completeness, the technical mathematical, and algorithmic aspects of the problem and the methods discussed are included as an appendix.

The Grad-Shafranov free boundary problem

The deterministic problem

In a cylindrically symmetric magnetic confinement device, with coordinates (r,z,φ)(r,z,\varphi), the mathematical expression of the equilibrium condition between the hydrostatic and magnetic forces acting on the plasma results in the celebrated Grad-Shafranov equation [21, 36, 42]. This nonlinear elliptic equation relates the poloidal flux function ψ(r,z)\psi(r,z) to the hydrostatic pressure p(ψ)p(\psi) and the toroidal field g(ψ)g(\psi) (both of which are assumed to be functions of ψ\psi only), and the currents IkI_k going through external coils with cross-sectional area SkS_k. Posed in free space, the equation takes the form

−∇⋅(1μr∇ψ)={rddψp(ψ)+12μrddψg2(ψ)in Ωp(ψ),Ik/Skin ΩCk,0elsewhere.(1)-\nabla\cdot\left(\frac{1}{\mu r}\nabla\psi\right)= \begin{cases} r\frac{d}{d\psi}p(\psi)+\frac{1}{2\mu r}\frac{d}{d\psi}g^2(\psi) & \text{in }\Omega_p(\psi),\\ I_k/S_k & \text{in }\Omega_{C_k},\\ 0 & \text{elsewhere.} \end{cases} \tag*{(1)}

Above, μ\mu is the magnetic permeability, ΩCk\Omega_{C_k} denotes the area occupied by the kk-th external coil, Ωp\Omega_p is the plasma confinement region which is not known a priori and must be determined as a problem unknown, making this a free boundary problem. A schematic of a cross-section, for r>0r>0, of a tokamak is depicted in Figure 1. The confinement region Ωp\Omega_p is characterized as the largest region that contains the magnetic axis (defined as the point where ψ\psi has a global maximum) and that is bounded by a closed level set ψ=constant\psi=\mathit{constant}. The solution to this free boundary problem is ubiquitous in nuclear fusion and several computational codes have been developed over the years (see for instance [14, 20, 24, 25, 28, 31] and references therein).

Figure 1. The plasma confinement region Ωp\Omega_p is enclosed by the violet line. The rectangles represent the external coils CkC_k; the grey curved line represents the exterior wall of the vacuum chamber.

A common choice in the literature, first proposed in [37], for the free functions p(ψ)p(\psi) and g(ψ)g(\psi) in the right hand side of (1) is

ddψp(ψ)=j0βr0(1−ψNα1)α2,12ddψg2(ψ)=j0μ0r0(1−β)(1−ψNα1)α2,(2)\frac{d}{d\psi}p(\psi)=j_0\frac{\beta}{r_0}\left(1-\psi_N^{\alpha_1}\right)^{\alpha_2}, \qquad\frac{1}{2}\frac{d}{d\psi}g^2(\psi)=j_0\mu_0r_0(1-\beta)\left(1-\psi_N^{\alpha_1}\right)^{\alpha_2}, \tag*{(2)}

where r0r_0 represents the outer radius of the vacuum chamber and ψN∈[0,1]\psi_N \in[0,1] is a normalization of the flux ψ\psi such that ψN=1\psi_N=1 on the plasma boundary ∂Ωp\partial\Omega_p and ψN=0\psi_N=0 at the magnetic axis. The parameters α1\alpha_1 and α2\alpha_2 control the behavior of ψ\psi around the magnetic axis, and β\beta measures the ratio between the hydrostatic pressure and the magnetic pressure in the plasma, and j0j_0 is a normalization factor.

Incorporating uncertainty

In this article, we will consider that the uncertainty in the model (1) is concentrated in the values of the currents IiI_i going through the external coils. As a result, the function ψ\psi (and all quantities derived from it) are random variables. Obtaining a full description of their probability density functions might not be possible, but an approximate picture can be obtained by exploring the parameter space and computing sample approximations of its expectation and variance. We will model the array of currents as a dd-dimensional random variable ω:=(ω1,…,ωd)\boldsymbol{\omega}:=(\omega_1,\ldots,\omega_d), where dd is the number of confinement coils in the reactor, and the kk-th component of ω\boldsymbol{\omega} is the current going through the kk-th coil. We will consider that ω\boldsymbol{\omega} is uniformly distributed around a baseline vector I=(I1,…,Id)\boldsymbol{I}=(I_1,\ldots,I_d) corresponding to the desired current values in a deterministic model. We will often refer to I\boldsymbol{I} as either the reference or unperturbed currents. Letting τ>0\tau>0 denote the size of the possible perturbation in the current values (relative to the components of I\boldsymbol{I}), the vector ω\boldsymbol{\omega} is then uniformly distributed over the dd-dimensional parameter space

W:=∏k=1d[Ik−τ∣Ik∣,Ik+τ∣Ik∣].(3)\mathcal{W}:=\prod_{k=1}^{d}[I_k-\tau|I_k|,I_k+\tau|I_k|]. \tag*{(3)}

Since coils are independent of each other, the stochastic random currents {ωk}k=1d\{\omega_k\}_{k=1}^{d} are uncorrelated and the joint density function of ω\boldsymbol{\omega} is given by π(ω)=∏k=1dπk(ωk)=∏k=1d12τ∣Ik∣\pi(\boldsymbol{\omega})=\prod_{k=1}^{d}\pi_k(\omega_k)=\prod_{k=1}^{d}\frac{1}{2\tau|I_k|}. The equilibrium configuration determined by the solution to (1) is then the random variable ψ(x,y,ω)\psi(x,y,\boldsymbol{\omega}); we will be primarily interested in efficiently constructing an approximation to its expected value

E[ψ(x,y,ω)]=∫Wψ(x,y,ω)π(ω) dω,(4)\mathbb{E}\left[\psi(x,y,\boldsymbol{\omega})\right]=\int_{\mathcal{W}}\psi(x,y,\boldsymbol{\omega})\pi(\boldsymbol{\omega})\,d\boldsymbol{\omega}, \tag*{(4)}

as well as those of some derived quantities such as the plasma boundary, the location of the x-points, etc.

Monte Carlo and Multilevel Monte Carlo Finite-Element Methods

We now turn our attention to the numerical approximation of the expected value (4). Since the location and shape of the plasma boundary depend on the values of the coil currents, variations of these values could lead to contacts between the plasma and the wall or even loss of confinement. This fact translates into a possible non-smoothness of the mapping between coil currents and the solutions of (1) which may then cause techniques such as stochastic collocation to underperform. Moreover, the computational effort associated with cubature methods scales exponentially with the dimension of the parameter space, seriously limiting their feasibility for estimating (4). This leads to the use of Monte Carlo methods, which are agnostic to both the smoothness of the mapping and the dimensionality of the problem [38], although they have a slow convergence rate (1/21/2) that tends to make them costly. This will be addressed through the use of a multi-level approach.

Monte Carlo Finite-Element method

We will describe the method in terms of a generic solution, uu, to a PDE involving stochastic parameters and its finite element approximation uhu_h, where hh is the mesh parameter of the discretization. Let {ω(i)}1≤i≤N\{\omega^{(i)}\}_{1\leq i\leq N} be a set of NN realizations of the random variable ω\omega giving rise to a sample of NN realizations u(i)=u(ω(i))u^{(i)}=u(\omega^{(i)}) and uh(i)=uh(ω(i))u_h^{(i)}=u_h(\omega^{(i)}) of the exact solution and its finite element discretization. We will assume that all these functions belong to a functional space ZZ endowed with a norm ∥⋅∥Z\|\cdot\|_Z (see the Appendix § 7.1 for details), and we will consider the standard FEM error estimate ∥u(i)−uh(i)∥Z≤C(i)hp\|u^{(i)}-u_h^{(i)}\|_Z\leq C^{(i)}h^p, where pp is the order of the FEM discretization and the constant C(i)C^{(i)} depends only on the problem geometry and the particular values of ω(i)\omega^{(i)}.

The Monte Carlo Finite-Element (MC-FE) estimator AMC(uh)A_{\mathrm{MC}}(u_h) for E(u)\mathbb{E}(u) is defined as the sample mean

AMC(uh):=1N∑i=1Nuh(i).(5)A_{\mathrm{MC}}(u_h):=\frac{1}{N}\sum_{i=1}^{N}u_h^{(i)}. \tag*{(5)}

This estimator is easily shown to be unbiased and to satisfy E(AMC)=E(uh)\mathbb{E}(A_{\mathrm{MC}})=\mathbb{E}(u_h). A quantity that serves as a foundation for examining the spatial and statistical accuracy of the MC-FE estimator is the mean squared error (MSE) defined as

EAMC2:=E[∥E(u)−AMC(uh)∥Z2].\mathcal{E}_{A_{\mathrm{MC}}}^{2}:=\mathbb{E}\left[\|\mathbb{E}(u)-A_{\mathrm{MC}}(u_h)\|_Z^2\right].

It can be shown (see, for instance [4 Theorem 4.3]) that, for linear problems, the Monte Carlo estimator accurately approximates the expected value in the sense that EAMC2≤K(N−1/2+hp)2\mathcal{E}_{A_{\mathrm{MC}}}^{2}\leq K(N^{-1/2}+h^p)^2, where the constant K>0K>0 depends on the problem geometry and the expected values of the problem data. The MSE can be decomposed into terms related to the bias and variance as

EAMC2=∥E(u)−E(uh)∥Z2+E[∥E(uh)−AMC(uh)∥Z2]=∥E(u)−E(uh)∥Z2+V(uh)N=EBias2+EStat2,\mathcal{E}_{A_{\mathrm{MC}}}^{2}=\|\mathbb{E}(u)-\mathbb{E}(u_h)\|_Z^2+\mathbb{E}\left[\|\mathbb{E}(u_h)-A_{\mathrm{MC}}(u_h)\|_Z^2\right]=\|\mathbb{E}(u)-\mathbb{E}(u_h)\|_Z^2+\frac{\mathbb{V}(u_h)}{N}=\mathcal{E}_{\mathrm{Bias}}^2+\mathcal{E}_{\mathrm{Stat}}^2,

where V(u):=E[∥u−E(u)∥Z2]\mathbb{V}(u):=\mathbb{E}[\|u-\mathbb{E}(u)\|_Z^2] and V(AMC(u))=V(u)/N\mathbb{V}(A_{\mathrm{MC}}(u))=\mathbb{V}(u)/N. The last two terms in the expression above implicitly define the discretization error EBias\mathcal{E}_{\mathrm{Bias}} and the sampling (or statistical) error EStat\mathcal{E}_{\mathrm{Stat}} respectively.

If E(u)≠0\mathbb{E}(u)\neq0, the mean squared error can be expressed as a percentage through normalization by the factor ∥E(u)∥Z2\|\mathbb{E}(u)\|_Z^2, leading to the normalized mean squared error E^AMC2\widehat{\mathcal{E}}_{A_{\mathrm{MC}}}^{2}. Since the exact random variable uu is not available, we will approximate the relative mean squared error (nMSE) by

E^AMC2≈∥E(u)−E(uh)∥Z2∥E(uh)∥Z2+V(uh)N∥E(uh)∥Z2=E^Bias2+E^Stat2.(6)\widehat{\mathcal{E}}_{A_{\mathrm{MC}}}^{2}\approx\frac{\|\mathbb{E}(u)-\mathbb{E}(u_h)\|_Z^2}{\|\mathbb{E}(u_h)\|_Z^2}+\frac{\mathbb{V}(u_h)}{N\|\mathbb{E}(u_h)\|_Z^2}=\widehat{\mathcal{E}}_{\mathrm{Bias}}^2+\widehat{\mathcal{E}}_{\mathrm{Stat}}^2. \tag*{(6)}

where E^Bias\widehat{\mathcal{E}}_{\mathrm{Bias}} and E^Stat\widehat{\mathcal{E}}_{\mathrm{Stat}} are relative analogues to the discretization and statistical errors defined above. If the number of grid points for the FEM discretization is MM then, in two dimensions, it is standard to assume that E^Bias=O(M−p/2)\widehat{\mathcal{E}}_{\mathrm{Bias}}=O(M^{-p/2}). Given a target tolerance ϵ\epsilon, the contribution of the statistical and discretization errors towards the total nMSE can be controlled by requiring that

E^Bias2=O(M−p)≤(1−θ)ϵ2,E^Stat2=VhN≤θϵ2,(7)\widehat{\mathcal{E}}_{\mathrm{Bias}}^2=O(M^{-p})\leq(1-\theta)\epsilon^2,\qquad\widehat{\mathcal{E}}_{\mathrm{Stat}}^2=\frac{V_h}{N}\leq\theta\epsilon^2, \tag*{(7)}

where θ∈(0,1)\theta\in(0,1) is known as the splitting parameter, and Vh:=V(uh)/∥E(uh)∥22V_h := \mathbb{V}(u_h) / \lVert\mathbb{E}(u_h)\rVert_2^2. This in turn allows us to estimate the sample size NN and the number of grid points MM required to achieve the desired tolerance as

M≥((1−θ)ϵ2)−1p,N=⌈Vhθϵ2⌉.(8)M \ge\left((1-\theta)\epsilon^2\right)^{-\frac{1}{p}}, \qquad N = \left\lceil\frac{V_h}{\theta\epsilon^2} \right\rceil. \tag*{(8)}

Assuming the average cost to obtain one sample (i.e. to solve (1a) for one value of the coil-currents) is C=O(Mc)C = O(M^c) for some c>0c>0, the total computational cost of the MC-FE estimator can be estimated as

C(AMC)=O(NMc)=O(ϵ−2−2cp).(9)C(A_{\mathrm{MC}}) = O(NM^c) = O\left(\epsilon^{-2-\frac{2c}{p}}\right). \tag*{(9)}

Multilevel Monte Carlo Finite-Element method

MLMC reduces the computational cost associated with sampling—which in our case involves the numerical solution of a non-linear PDE in a target computational mesh—by approximating the expectation of the quantity of interest on the finest mesh by a sequence of control variates on a set of coarse grids that are cheaper to compute [13]. Using the linearity of expectation, the MLMC estimator expresses the quantity of interest on the finest spatial grid, E(uh)\mathbb{E}(u_h), by a telescoping sum involving the numerical approximations of uu on coarser grids. Consequently, MLMC’s workload is shifted from the fine grid to coarser grids, making it more efficient than MC [8]. Cf. e.g. [35] for alternative ways to reduce the costs of MC methods.

To construct meshes that are easy to describe for both uniform and adaptive mesh refinement, we will characterize them using the number of grid points rather than the mesh size. We will refer to ℓ=0,…,L\ell= 0,\ldots,L as the level of a mesh Tℓ\mathcal{T}_{\ell} containing {Mℓ}\{M_{\ell}\} grid points. We will then consider a sequence of meshes T0,…,TL\mathcal{T}_0,\ldots,\mathcal{T}_L with increasing resolution so that {Mℓ}0≤ℓ≤L\{M_{\ell}\}_{0\leq\ell\leq L} defines an increasing sequence and TL\mathcal{T}_L is the finest mesh, and we will denote by uℓu_{\ell} the approximation of uu on the mesh Tℓ\mathcal{T}_{\ell}.

The expectation of the function uu can be approximated by the expectation of the finest approximation uLu_L. Since uL=u0+(u1−u0)+(u2−u1)+⋯+(uL−uL−1)u_L = u_0 + (u_1-u_0) + (u_2-u_1) + \cdots+ (u_L-u_{L-1}), this approximation is given by

E(u)≈E(uL)=E(u0)+∑ℓ=1LE(uℓ−uℓ−1)=∑ℓ=0LE(Yℓ),(10)\mathbb{E}(u) \approx\mathbb{E}(u_L) = \mathbb{E}(u_0) + \sum_{\ell=1}^{L}\mathbb{E}(u_{\ell}-u_{\ell-1}) = \sum_{\ell=0}^{L}\mathbb{E}(Y_{\ell}), \tag*{(10)}

a telescoping sum, where each of the terms

Y0:=u0andYℓ:=uℓ−uℓ−1(for ℓ≥1)(11)Y_0 := u_0 \qquad\text{and} \qquad Y_{\ell} := u_{\ell}-u_{\ell-1} \quad\text{(for $\ell\geq1$)} \tag*{(11)}

can be regarded as a correction of the coarsest approximation u0u_0. If each term E(Yℓ)\mathbb{E}(Y_{\ell}) is estimated by gathering NℓN_{\ell} samples at level ℓ\ell and computing the sample expectations

E(Y0)≈Y^0:=1N0∑i=1N0u0(i),E(Yℓ)≈Y^ℓ:=1Nℓ∑i=1Nℓ(uℓ(i)−uℓ−1(i))(for ℓ≥1),\mathbb{E}(Y_0) \approx\widehat{Y}_0 := \frac{1}{N_0}\sum_{i=1}^{N_0}u_0^{(i)}, \qquad\mathbb{E}(Y_{\ell}) \approx\widehat{Y}_{\ell} := \frac{1}{N_{\ell}}\sum_{i=1}^{N_{\ell}}\left(u_{\ell}^{(i)}-u_{\ell-1}^{(i)}\right) \quad\text{(for $\ell\geq1$)},

then the MLMC-FE estimator at level LL will be unbiased and can be written as

AMLMC(uL):=∑ℓ=0LY^ℓ=1N0∑i=1N0u0(i)+∑ℓ=1L1Nℓ∑i=1Nℓ(uℓ(i)−uℓ−1(i)).(12)A_{\mathrm{MLMC}}(u_L) := \sum_{\ell=0}^{L}\widehat{Y}_{\ell} = \frac{1}{N_0}\sum_{i=1}^{N_0}u_0^{(i)} + \sum_{\ell=1}^{L}\frac{1}{N_{\ell}}\sum_{i=1}^{N_{\ell}}\left(u_{\ell}^{(i)}-u_{\ell-1}^{(i)}\right). \tag*{(12)}

Recalling that E(Y^ℓ)=E(Yℓ)\mathbb{E}(\widehat{Y}_{\ell}) = \mathbb{E}(Y_{\ell}) and V(Y^ℓ)=V(Yℓ)/Nℓ\mathbb{V}(\widehat{Y}_{\ell}) = \mathbb{V}(Y_{\ell})/N_{\ell} we conclude that, for the MLMC-FE estimator, it follows that E(AMLMC)=∑ℓ=0LE(Y^ℓ)=E(uL)\mathbb{E}(A_{\mathrm{MLMC}}) = \sum_{\ell=0}^{L}\mathbb{E}(\widehat{Y}_{\ell}) = \mathbb{E}(u_L) and V(AMLMC)=∑ℓ=0LV(Y^ℓ)=∑ℓ=0LV(Yℓ)/Nℓ\mathbb{V}(A_{\mathrm{MLMC}}) = \sum_{\ell=0}^{L}\mathbb{V}(\widehat{Y}_{\ell}) = \sum_{\ell=0}^{L}\mathbb{V}(Y_{\ell})/N_{\ell}.

As for MC-FE, the mean squared error EAMLMC2\mathcal{E}^{2}_{\mathrm{AMLMC}} can be split into contributions from bias and variance as

EAMLMC2=E[∥E(u)−AMLMC(uL)∥Z2]=∥E(u)−E(uL)∥Z2+∑ℓ=0LV(Yℓ)Nℓ=EBias2+EStat2.\mathcal{E}^{2}_{\mathrm{AMLMC}} = \mathbb{E}\left[\left\|\mathbb{E}(u)-A_{\mathrm{MLMC}}(u_{L})\right\|_{Z}^{2}\right] = \left\|\mathbb{E}(u)-\mathbb{E}(u_{L})\right\|_{Z}^{2}+\sum_{\ell=0}^{L}\frac{\mathbb{V}(Y_{\ell})}{N_{\ell}} = \mathcal{E}^{2}_{\mathrm{Bias}}+\mathcal{E}^{2}_{\mathrm{Stat}}.

Similarly, using E(u)≈E(uL)\mathbb{E}(u)\approx\mathbb{E}(u_{L}), the normalized mean squared error E^AMLMC2\widehat{\mathcal{E}}^{2}_{\mathrm{AMLMC}} can be approximated by

E^AMLMC2≈∥E(u)−E(uL)∥Z2∥E(uL)∥Z2+∑ℓ=0LVℓNℓ=E^Bias2+E^Stat2,(13)\widehat{\mathcal{E}}^{2}_{\mathrm{AMLMC}}\approx\frac{\left\|\mathbb{E}(u)-\mathbb{E}(u_{L})\right\|_{Z}^{2}}{\left\|\mathbb{E}(u_{L})\right\|_{Z}^{2}}+\sum_{\ell=0}^{L}\frac{V_{\ell}}{N_{\ell}}=\widehat{\mathcal{E}}^{2}_{\mathrm{Bias}}+\widehat{\mathcal{E}}^{2}_{\mathrm{Stat}}, \tag*{(13)}

where

Vℓ:=V(Yℓ)/∥E(uL)∥Z2.(14)V_{\ell}:=\mathbb{V}(Y_{\ell})/\left\|\mathbb{E}(u_{L})\right\|_{Z}^{2}. \tag*{(14)}

As above, the parameter θ∈(0,1)\theta\in(0,1) can be used to split the contributions of the two components of the error by requiring E^Bias2≤(1−θ)ϵ2\widehat{\mathcal{E}}^{2}_{\mathrm{Bias}}\leq(1-\theta)\epsilon^{2} and E^Stat2≤θϵ2\widehat{\mathcal{E}}^{2}_{\mathrm{Stat}}\leq\theta\epsilon^{2} where ϵ\epsilon is a predetermined tolerance such that E^AMLMC2≤ϵ2\widehat{\mathcal{E}}^{2}_{\mathrm{AMLMC}}\leq\epsilon^{2}.

Note that each of the terms Yℓ(i):=uℓ(i)−uℓ−1(i)Y_{\ell}^{(i)}:=u_{\ell}^{(i)}-u_{\ell-1}^{(i)} appearing in (12) requires the approximation of u(i)u^{(i)} on adjacent refinement levels using the same value of the parameter ω(i)\omega^{(i)}. However, for FEM discretization, the numerical implementation of this term does not require the solution of the PDE on the two grids Tℓ\mathcal{T}_{\ell} and Tℓ−1\mathcal{T}_{\ell-1}. The realization on the coarse grid can be obtained from the one on the fine grid by either Galerkin projection or interpolation. Projection is the more accurate choice, but it requires the solution of a system involving the mass matrix for each realization. Thus we prefer interpolation, for which costs are minimal and which is of second-order accuracy in our application. To avoid introducing correlation across discretization levels, none of the samples involved in the computation of YℓY_{\ell} is reused for the finer level ℓ+1\ell+1. That is, sampling is done such that, for n≠mn\neq m, the estimates YnY_{n} and YmY_{m} are uncorrelated. However, for any particular YℓY_{\ell} the strong correlation between uℓ(i)u_{\ell}^{(i)} and uℓ−1(i)u_{\ell-1}^{(i)} makes the variance of the correction terms much smaller than the variance of the approximation uLu_{L} in the finest mesh, further improving the statistical approximation.

To quantify the computational effort of the MLMC-FE estimator, let Mℓ,iM_{\ell,i} be the number of grid points for the ii-th sample on mesh level ℓ\ell. We will assume that the computational cost to obtain one sample of uℓ(i)u_{\ell}^{(i)} is Cℓ,i:=C(uℓ(i))=O(Mℓ,ic)C_{\ell,i}:=C(u_{\ell}^{(i)})=O(M_{\ell,i}^{c}), where the exponent c>0c>0 depends on the solver, and will denote the cost of computing the correction term Yℓ(i)Y_{\ell}^{(i)} by Cℓ,i:=C(Yℓ(i))=O(Mℓ,ic)C_{\ell,i}:=C(Y_{\ell}^{(i)})=O(M_{\ell,i}^{c}) for ℓ≥0\ell\geq0 and M−1,i=0M_{-1,i}=0. For a nonlinear problem like the one at hand, the particular realization ω(i)\omega^{(i)} will influence the cost. We will consider the average cost to be of the form

Cℓ=O(Mℓc)(15)C_{\ell}=O(M_{\ell}^{c}) \tag*{(15)}

and use this to estimate the total cost as C(AMLMC)=∑ℓ=0LNℓCℓ=∑ℓ=0LNℓ⋅O(Mℓc)C(A_{\mathrm{MLMC}})=\sum_{\ell=0}^{L}N_{\ell}C_{\ell}=\sum_{\ell=0}^{L}N_{\ell}\cdot O(M_{\ell}^{c}). Using the method of Lagrange multipliers, it is shown in [19] that this total cost, a function of NℓN_{\ell}, can be minimized subject to the constraint E^Stat2≤θϵ2\widehat{\mathcal{E}}^{2}_{\mathrm{Stat}}\leq\theta\epsilon^{2} by the choice

Nℓ=⌈1θϵ2VℓCℓ∑k=0LVkCk⌉.(16)N_{\ell}=\left\lceil\frac{1}{\theta\epsilon^{2}}\sqrt{\frac{V_{\ell}}{C_{\ell}}}\sum_{k=0}^{L}\sqrt{V_{k}C_{k}}\right\rceil. \tag*{(16)}

With this expression for NℓN_{\ell}, the optimal total cost for the MLMC-FE estimator is

C(AMLMC)≤1θϵ2(∑ℓ=0LVℓCℓ)2+∑ℓ=0LCℓ.(17)C(A_{\mathrm{MLMC}})\leq\frac{1}{\theta\epsilon^{2}}\left(\sum_{\ell=0}^{L}\sqrt{V_{\ell}C_{\ell}}\right)^{2}+\sum_{\ell=0}^{L}C_{\ell}. \tag*{(17)}

This analysis of computational cost is established in full generality in [19 Theorem 1].

The formula (16) suggests an iterative procedure for the approximation of E(u)\mathbb{E}(u). Starting from a computational mesh T0\mathcal{T}_0, gather an initial number M~0\widetilde{M}_0 of samples u0(i)u_0^{(i)} and estimate E^Bias\widehat{\mathcal{E}}_{\mathrm{Bias}}, E^Stat\widehat{\mathcal{E}}_{\mathrm{Stat}}, and V0V_0. If E^Stat\widehat{\mathcal{E}}_{\mathrm{Stat}} is larger than the prescribed tolerance, use (16) to update M~0\widetilde{M}_0 and gather additional samples; if E^Bias\widehat{\mathcal{E}}_{\mathrm{Bias}} is above the prescribed tolerance, then add an additional level of spatial refinement. The process continues adding discretization levels and collecting additional and/or samples until both E^Bias\widehat{\mathcal{E}}_{\mathrm{Bias}} and E^Stat\widehat{\mathcal{E}}_{\mathrm{Stat}} fall below the required tolerance, at which point E(u)\mathbb{E}(u) is approximated using equation (10). This simple algorithm, however, presents one challenge: the term VℓV_\ell in equation (16) requires the computation of the term

V(Yℓ)=1Nℓ−1(∑i=1Nℓ∥Yℓ(i)∥Z2−1Nℓ∥∑i=1NℓYℓ(i)∥Z2).(18)V(Y_\ell)=\frac{1}{N_\ell-1}\left(\sum_{i=1}^{N_\ell}\left\|Y_\ell^{(i)}\right\|_Z^2-\frac{1}{N_\ell}\left\|\sum_{i=1}^{N_\ell}Y_\ell^{(i)}\right\|_Z^2\right). \tag*{(18)}

However, the estimated sample sizes {Nℓ}\{N_\ell\} are available only for pre-existing discretization levels, hence whenever an additional mesh refinement is needed, NL+1N_{L+1} cannot be approximated by (16) as this formula uses VL+1V_{L+1} to compute NL+1N_{L+1}. This inconvenience can be overcome by noting that

V(u−uℓ)=E[∥u−uℓ∥Z2]−∥E(u−uℓ)∥Z2≤E[∥u−uℓ∥Z2].(19)V(u-u_\ell)=\mathbb{E}\left[\left\|u-u_\ell\right\|_Z^2\right]-\left\|\mathbb{E}\left(u-u_\ell\right)\right\|_Z^2\leq\mathbb{E}\left[\left\|u-u_\ell\right\|_Z^2\right]. \tag*{(19)}

Hence, the variance V(u−uℓ)V(u-u_\ell) can be estimated by the expectation of the squared discretization error ∥u−uℓ∥Z2\left\|u-u_\ell\right\|_Z^2. For a uniformly refined grid, we can resort to a standard a priori error estimate and assume that E[∥u−uℓ∥Z2]=O(Mℓ−b1)\mathbb{E}[\left\|u-u_\ell\right\|_Z^2]=O(M_\ell^{-b_1}) for some b1>0b_1>0. It then follows that Vℓ=O(Mℓ−b1)V_\ell=O(M_\ell^{-b_1}) and following [40] we can then approximate VL+1V_{L+1} in terms of the known variance VLV_L by

VL+1=(ML+1/ML)−b1VL.(20)V_{L+1}=(M_{L+1}/M_L)^{-b_1}V_L. \tag*{(20)}

Adaptive multilevel Monte Carlo Finite-Element method

In view of the benefits of approximating the quantity of interest across a sequence of increasingly finer meshes, and with the goal of further reducing the computational cost associated with reducing the bias associated with the numerical discretization, it is natural to focus the refinement only on those parts of the mesh where the error is concentrated. Our goal is then to, starting from a computational mesh T0\mathcal{T}_0, generate a family of adaptively refined meshes {Tℓ}0≤ℓ≤L\{\mathcal{T}_\ell\}_{0\leq\ell\leq L} that will produce better approximations of E(u)\mathbb{E}(u) than the ones resulting from consecutive uniform refinements of the initial grid. With this goal in mind, the use of an a posteriori error estimator to guide the construction of the family of meshes has been proposed in the context of multilevel Monte Carlo methods [11, 26, 27, 32].

Residual error estimator. A key ingredient in an adaptive solver is a local error estimator. In our case, for each element KK on the mesh Tℓ\mathcal{T}_\ell, we will use the simple residual-based a posteriori error indicator

ηK,ℓ(ω):=hK2∥∇⋅(1μr∇uℓ(ω))−f(uℓ(ω))∥K+hK3/2∥[ ⁣[1μr∇uℓ(ω)⋅n] ⁣]∥∂K\∂Ω.(21)\eta_{K,\ell}(\omega):=h_K^2\left\|\nabla\cdot\left(\frac{1}{\mu_r}\nabla u_\ell(\omega)\right)-f(u_\ell(\omega))\right\|_K+h_K^{3/2}\left\|\left[\!\left[\frac{1}{\mu_r}\nabla u_\ell(\omega)\cdot n\right]\!\right]\right\|_{\partial K\backslash\partial\Omega}. \tag*{(21)}

where ∂K\partial K is the boundary of the element KK, hKh_K is the diameter of KK, nn is the outward unit normal to the element KK, [ ⁣[⋅] ⁣][\![\cdot]\!] denotes the jump across the edge of an interior element, and ff is the source term defined piecewise on the right-hand side of (1). Following [11, 32], we will further define the mean local and mean global error estimators respectively as

ηK,ℓ:=E(ηK,ℓ(ω))andηℓ2:=∑K∈TℓηK,ℓ2.(22)\eta_{K,\ell}:=\mathbb{E}\left(\eta_{K,\ell}(\omega)\right)\qquad\text{and}\qquad\eta_\ell^2:=\sum_{K\in\mathcal{T}_\ell}\eta_{K,\ell}^2. \tag*{(22)}

For linear deterministic problems, estimators of this form can be shown to be such that there are constants C1,C2>0C_1,C_2 > 0 such that C1ηℓ≤∥u−uℓ∥Z≤C2ηℓC_1\eta_\ell\le\lVert u-u_\ell\rVert_Z \le C_2\eta_\ell. Therefore, the error estimator will accurately locate the regions of high error density and will decay at the same rate as the true error [34]. The global error can then be approximated by adding the local estimators over the entire triangulation. Using these error estimators, the adaptive analogue of (19) can be written as

V(u−uℓ)≤E[∥u−uℓ∥Z2]≈ηℓ2,(23)\mathop{\mathrm{V}}(u-u_\ell) \le\mathbb{E}\left[\lVert u-u_\ell\rVert_Z^2\right] \approx\eta_\ell^2, \tag*{(23)}

which then leads to the following adaptive analogue of the extrapolation formula (20)

VL+1=(ηL+1/ηL)2VL.(24)V_{L+1}=\left(\eta_{L+1}/\eta_L\right)^2V_L. \tag*{(24)}

This estimate can then be used in combination with (16) to obtain an update for the sample size required at each adaptive level.

Adaptive solution cycle. With these definitions in place, we can then describe our strategy, which follows the “SOLVE → ESTIMATE → MARK → REFINE” paradigm familiar from deterministic adaptive solvers [7], as:

  1. Solve: Starting from a fixed number of samples, the problem (1) is solved on the initial mesh T0\mathcal{T}_0.

  2. Estimate: The local mean error estimator is approximated from the sample gathered.

  3. Mark: The set Mℓ\mathcal{M}_\ell containing the smallest possible number of elements in T0\mathcal{T}_0 satisfying

∑K∈MℓηK,ℓ2≥ζηℓ2,(25)\sum_{K\in\mathcal{M}_\ell}\eta_{K,\ell}^2 \ge\zeta\eta_\ell^2, \tag*{(25)}

for some predetermined value ζ∈[0,1]\zeta\in[0,1] is marked for refinement—this marking strategy is known as Dörfler marking in the adaptive finite element community [10].

  1. Refine: The elements marked are refined in such a way that the resulting triangulation Tℓ+1\mathcal{T}_{\ell+1} is shape-regular and conforming. Efforts should be made to make sure that the growth of the number of elements is kept at bay. In our case, we used the implementation given in [16] of the algorithms described in [6, 15, 39].

The steps above are repeated until the error estimator η\eta falls below a certain predetermined value.

A notion of mesh level. For uniformly refined grids, the notion of mesh level is natural: starting from a mesh Tℓ\mathcal{T}_\ell, one step of uniform refinement decreases the mesh parameter hh across the grid by a factor of 1/21/2; the resulting mesh is said to have level ℓ+1\ell+1 and is denoted by Tℓ+1\mathcal{T}_{\ell+1}. For adaptively refined grids, where the mesh parameter is not constant through the grid, the notion of the level does not come so naturally. We will use the fact that, for a uniform refinement, the numerical error decays by a factor of (1/2)p(1/2)^p, (where pp is the order of the FEM solver) with each successive level to extend the notion of mesh level to adaptively refined grids.

Consider a numerical approximation uℓu_\ell obtained on a mesh Tℓ\mathcal{T}_\ell with an associated error estimation given by ηℓ\eta_\ell. We will say that a mesh has level ℓ+1\ell+1 and will denote it by Tℓ+1\mathcal{T}_{\ell+1} if it was obtained from Tℓ\mathcal{T}_\ell by cycling over the adaptive loop using the value (1/2)pηℓ(1/2)^p\eta_\ell as the stopping tolerance. In other words, we will say that an adaptively refined mesh has level ℓ+1\ell+1 if it produces a numerical solution with an error (1/2)p(1/2)^p times smaller than one with level ℓ\ell, just like in the uniform case. We will refer to q:=(1/2)pq := (1/2)^p as the decay factor. In terms of discretization accuracy, after ℓ\ell steps of adaptive refinement, an adaptively refined mesh with level ℓ\ell will have an associated error estimation ηℓ=qℓη0\eta_\ell= q^\ell\eta_0, where η0\eta_0 corresponds to the error estimation at the initial mesh. In our numerical experiments, since the convergence rate of the piecewise linear solver is 2 (when measured in the L2L^2 norm), we shall use a decay factor q=1/4q = 1/4 to define our adaptively refined meshes.

Deterministic adaptive grids. Ideally, in the stochastic setting, all the error estimations collected from the totality of samples would be used to drive the adaptive refinement forward and build an optimal set of meshes at every level. However, due to the iterative nature of the algorithm arising from (16), the optimal mesh at every level would have to be corrected with every new batch of samples and the solutions corresponding to all previous realizations ω(i)\omega^{(i)} would have to be recomputed. The computational cost of re-sampling in this manner quickly becomes impractical.

Instead, following [26, 27, 33], we will construct a sequence of deterministic adaptive grids with partial knowledge about E(u)\mathbb{E}(u) as follows. Starting from a sample {ω(i)}1≤i≤N\{\omega^{(i)}\}_{1\leq i\leq N} (where NN is small and arbitrarily chosen) and a mesh T0\mathcal{T}_0, the PDE is solved and the local error is estimated for every solution u0(i)u_0^{(i)}, resulting in NN local error estimators {ηK,0(ω(i))}1≤i≤N\{\eta_{K,0}(\omega^{(i)})\}_{1\leq i\leq N}. The mean local and global error estimators ηK,0\eta_{K,0} and η0\eta_0 are then approximated by the sample means of the individual estimators. Using this approximation of ηK,0\eta_{K,0}, the mesh T0\mathcal{T}_0 is refined. This process is continued until the approximated mean error estimator satisfies η≤qη0\eta\leq q\eta_0; the resulting mesh is stored and labeled as T1\mathcal{T}_1 (mesh level 1). The previous steps are repeated until a target number of meshes {Tℓ}0≤ℓ≤L\{\mathcal{T}_\ell\}_{0\leq\ell\leq L} have been generated. The process is described in Algorithm 1. Since the family of meshes produced is constructed using random samples of ω\omega, they approximately reduce the error for the approximate expectation E(uh)\mathbb{E}(u_h) by a factor of qq with every increasing level. This family of meshes is then kept fixed during the MLMC run.

Algorithm 1: Generate adaptive deterministic mesh set

Input: Initial mesh T0\mathcal{T}_0, maximum mesh level LL, element marking percentage ζ∈(0,1)\zeta\in(0,1), sample size NN, error decay factor q∈(0,1)q \in(0,1).

Output: Adaptive mesh set {Tℓ}ℓ=0L\{\mathcal{T}_\ell\}_{\ell=0}^{L}.

  1. for ℓ=1,⋯ ,L\ell= 1,\cdots,L do

  2.     Refine = TRUE.

  3.     Set j=1j = 1 and T(j)=Tℓ−1\mathcal{T}^{(j)} = \mathcal{T}_{\ell-1}.

  4.     while Refine do

  5.         for i=1,⋯ ,Ni = 1,\cdots,N do

  6.             (i) Draw a random sample ω(i)\omega^{(i)} from WW.

  7.             (ii) Obtain u(i)u^{(i)} by solving the free boundary problem on T(j)\mathcal{T}^{(j)} using ω(i)\omega^{(i)}.

  8.             (iii) Calculate and accumulate the local and global error estimators ηK,j(ω(i))\eta_{K,j}(\omega^{(i)}) and ηj(ω(i))\eta_j(\omega^{(i)}).

  9.         Compute the mean estimators ηK,j\eta_{K,j} and ηj\eta_j from the accumulated samples.

  10.         Mark & refine the mesh T(j)\mathcal{T}^{(j)} according to ηK,j\eta_{K,j} to obtain T(j+1)\mathcal{T}^{(j+1)}.

  11.         if ηj≤qη1\eta_j \leq q\eta_1 then

  12.             Store T(j)\mathcal{T}^{(j)} as Tℓ\mathcal{T}_\ell.

  13.             Refine = FALSE.

  14.         j=j+1j = j + 1.

Algorithm 2: Multilevel Monte Carlo Finite-Element method

Input: Initial mesh level L=0L = 0, sequence of mesh available {Tℓ}ℓ≥0\{\mathcal{T}_{\ell}\}_{\ell\geq0}, root nMSE ϵ\epsilon, ζ∈(0,1)\zeta\in(0,1), initial sample size Nold={Nℓ}ℓ=0LN_{\mathrm{old}} = \{N_{\ell}\}_{\ell=0}^{L}, counter j=1j = 1, sample size corrections dNℓj={Nℓ}ℓ=0LdN_{\ell}^{j} = \{N_{\ell}\}_{\ell=0}^{L}

Output: {Nℓ}ℓ=0L\{N_{\ell}\}_{\ell=0}^{L}, {Vℓ}ℓ=0L\{V_{\ell}\}_{\ell=0}^{L}, AMLMCA_{\mathrm{MLMC}}.

  1. while ∑ℓ(dNℓj)>0\sum_{\ell}(dN_{\ell}^{j}) > 0 do

  2. for 0≤ℓ≤L0 \leq\ell\leq L do

  3. for i=1,⋯ ,dNℓji = 1,\cdots,dN_{\ell}^{j} do

  4. Solve the free boundary problem on Tℓ\mathcal{T}_{\ell} to get uℓ(i)u_{\ell}^{(i)} for the ii-th sample.

  5. Approximate {Vℓ}ℓ=0L\{V_{\ell}\}_{\ell=0}^{L} by (18).

  6. Update the sample size estimation {Nℓ}ℓ=0L\{N_{\ell}\}_{\ell=0}^{L} by (16).

  7. j=j+1j = j + 1.

  8. dNℓj={Nℓ}ℓ=0L−NolddN_{\ell}^{j} = \{N_{\ell}\}_{\ell=0}^{L} - N_{\mathrm{old}}.

  9. Nold={Nℓ}ℓ=0LN_{\mathrm{old}} = \{N_{\ell}\}_{\ell=0}^{L}.

  10. if ∑ℓ(dNℓj)=0\sum_{\ell}(dN_{\ell}^{j}) = 0 then

  11. if The a posteriori error estimator falls below 1−θϵ∥E(u)∥Z\sqrt{1-\theta}\epsilon\|\mathbb{E}(u)\|_{Z}, then

  12. Compute AMLMCA_{\mathrm{MLMC}} by (12) and terminate the loop.

  13. else

  14. L=L+1L = L + 1.

  15. Approximate VLV_{L} by (20) and compute {Nℓ}ℓ=0L\{N_{\ell}\}_{\ell=0}^{L} and go to Step 1.

Numerical experiments

We now demonstrate and evaluate the performance of the methods presented for the Grad-Shafranov free boundary problem. We examine the efficiency of the three simulation approaches, comparing the CPU times (or computational cost) and the accuracy of some geometric descriptors that are generated from the approximation of E(ψ)\mathbb{E}(\psi) obtained with each of the techniques. Following [14], we consider an ITER geometry with 12 coils and a “baseline” vector of target current intensities II given by

I1=−1.4×106A,I2=−9.5×106A,I3=−2.0388×107A,I4=−2.0388×107A,I5=−9×106A,I6=3.564×106A,I7=5.469×106A,I8=−2.266×106A,I9=−6.426×106A,I10=−4.82×106A,I11=−7.504×106A,I12=1.724×107A.(26)\begin{aligned} I_{1} &= -1.4 \times10^{6} A, & I_{2} &= -9.5 \times10^{6} A, & I_{3} &= -2.0388 \times10^{7} A, & I_{4} &= -2.0388 \times10^{7} A, \\ I_{5} &= -9 \times10^{6} A, & I_{6} &= 3.564 \times10^{6} A, & I_{7} &= 5.469 \times10^{6} A, & I_{8} &= -2.266 \times10^{6} A, \\ I_{9} &= -6.426 \times10^{6} A, & I_{10} &= -4.82 \times10^{6} A, & I_{11} &= -7.504 \times10^{6} A, & I_{12} &= 1.724 \times10^{7} A. \tag*{(26)} \end{aligned}

We will refer to these values as the reference currents. The profiles for pp and gg on the right hand side of (1) follow the form given in (2) with the specific values r0=6.2 mr_{0} = 6.2\,\mathrm{m}, β=0.5978\beta= 0.5978, α1=2\alpha_{1} = 2, and α2=1.395\alpha_{2} = 1.395, and j0=1.3655×106 A/m2j_{0} = 1.3655 \times10^{6}\,\mathrm{A}/\mathrm{m}^{2}. The reactor and coil array geometries follow the ones described in [2]. In our experiments, we will take the vector of current intensities to be subject to uncertainty modeled as a uniformly distributed perturbation of magnitude τ=2%\tau= 2\% centered around the reference values above.

Experiment description

In this section, we present numerical results comparing the three approaches – MC-FE, uniform MLMC-FE, and adaptive MLMC-FE. For the solution of (1), we used the finite element-based solver FEEQS.m [23] developed by Holger Heumann and collaborators as a lightweight Matlab implementation of the code CEDRES++ [14, 24]. The code implements a piecewise linear finite element discretization of a weak formulation of (1) and employs a globalized variation of Newton’s method to resolve the nonlinearity. (The stopping threshold for the relative residual was set to 5×10−115 \times10^{-11}.) For the solution of the perturbed problems, the initial iterate of Newton’s method was taken to be the solution corresponding to the reference currents I\boldsymbol{I}. All tests used the splitting parameter θ=0.5\theta= 0.5 in (7). The user-specified tolerances for the normalized mean squared error range from ϵ=2×10−4\epsilon= 2 \times10^{-4} to 8×10−38 \times10^{-3}. Experiments were conducted using MATLAB R2022a on a System 76 Thelio Major with 256GB RAM and a 64-Core @4.6 GHz AMD Threadripper 3 Processor.

To produce an estimate of the number of samples required on each discretization level, equation (16) requires the knowledge of two problem-dependent parameters: the power cc appearing in the estimate for the computational cost (15), and the normalized variance of the correction terms VℓV_\ell as defined in (14). The normalization factor ∥E(uL)∥Z\lVert\mathbb{E}(u_L) \rVert_Z in (14) was estimated on the finest uniform mesh level (ℓ=5\ell= 5) to be approximately 8.57×10−18.57 \times10^{-1}. To estimate the value of cc, 100 random currents are sampled for different mesh sizes MℓM_\ell, the processing times required to obtain the solutions are averaged for each mesh size, and cc is estimated through a regression. Figure 2 shows the behavior of the average cost as a function of the mesh size MℓM_\ell; from the data displayed, the power law is estimated to be c≈1.09c \approx1.09. Note that this cost estimate is based on Matlab timings and not on the complexity analysis of standard linear solution algorithms. The same samples are also used to estimate the sample means, E(Yℓ)\mathbb{E}(Y_\ell) or E(uh)\mathbb{E}(u_h), and variances, V(Yℓ)V(Y_\ell) or V(uh)V(u_h) dynamically using Welford’s algorithm [45]. As the new samples are gathered, the mean mwm_w and proxy for the variance, sws_w, are updated using the following formulas for the ii-th sample, with mw(0)=0m_w^{(0)} = 0, sw(0)=0s_w^{(0)} = 0:

Figure 2. Mean CPU time to compute 100 realizations of uℓu_\ell, as a function of the number of grid points MℓM_\ell, plotted on a logarithmic scale. The fitted curve indicates that the computational cost CℓC_\ell behaves approximately like Mℓ1.09M_\ell^{1.09}.

mw(i)=mw(i−1)+u(i)−mw(i−1)i,sw(i)=sw(i−1)+⟨u(i)−mw(i−1),u(i)−mw(i)⟩.m_w^{(i)} = m_w^{(i-1)} + \frac{u^{(i)} - m_w^{(i-1)}}{i}, \qquad s_w^{(i)} = s_w^{(i-1)} + \left\langle u^{(i)} - m_w^{(i-1)}, u^{(i)} - m_w^{(i)} \right\rangle.

Using sample size ii, the variance is then given by V(i)=sw(i)/(i−1)V^{(i)} = s_w^{(i)} / (i - 1).

To perform MLMC-FE simulations, the user typically defines and generates a sequence of spatial grids, where, given a tolerance ϵ\epsilon, the fineness of the grid is determined by the requirement that the discretization error (EBias2\mathcal{E}_{\mathrm{Bias}}^2 in (7)) or an estimate of it be small enough. In this study, we generated two types of grids, a set of geometry-conforming uniformly refined grids, and a set of adaptively refined grids constructed using the strategy presented in § 3.3.2 For the uniformly refined grid, we generated a total of six levels of grids. We note that, due to the increasing accuracy of the spline approximation of the curved boundaries, these meshes are not a direct refinement of each other. Instead, each level is characterized by a mesh parameter hℓh_\ell being roughly half of the preceding mesh as determined by the Triangle mesh generator [43]. The adaptive refinement strategy began with the coarsest mesh from the uniform family and applied the weighted L2L_2 a posteriori error estimator specified in (21) and q=1/4q = 1/4 to reflect a similar error decay as for uniform refinement, also using Triangle to generate the desired adaptively refined meshes. The number of grid points for each of these methods on different grid levels is shown in Table 1. Note that the grid sizes for the adaptive meshes are not dramatically smaller than for uniform meshes, which suggests that the solution, as a function of the spatial variables, is fairly smooth.

Level ℓ\ell012345
Uniform26858019304491206974840801934365
Adaptive26856090250991039684119131552282

Table 1. The number of grid points MℓM_\ell for both geometry-conforming uniform and adaptive (q=1/4q = 1/4) meshes as the mesh levels increase from 0 to 5.

Computational cost

Figure 3 shows a variety of computational results, including the error estimator, VℓV_\ell, and CPU time for the two versions of MLMC (and times for full MC). To investigate the convergence behavior of the discretization error, we calculate the a posteriori error estimator for both uniform and adaptive meshes in the same experiment to obtain an estimate of cc for CℓC_\ell before conducting the simulations. The results are displayed in the top left plot in Figure 3, with a dashed line showing a least square fit, indicating that the discretization error of both methods exhibits an asymptotic rate of O(M−1)O(M^{-1}) (or p≈2p \approx2). The similar convergence rate further indicates that the solution to the problem is smooth and the error is equidistributed, rendering the adaptive strategy comparable to uniform mesh refinement. Note that the estimated error is used for variance extrapolation in (24) during the MLMC simulations.

Figure 3. Top left: weighted L2L_2 error (with weight μx\mu x) of estimator CηℓC_{\eta_\ell} vs. number of grid points MℓM_\ell plot. Top right: normalized variance VℓV_\ell vs. number of grid points MℓM_\ell plot. Bottom left: CPU time in seconds vs. tolerance ϵ\epsilon. Bottom right: Monte Carlo convergence rate estimate with tolerance ϵ\epsilon vs. sample size NN. This plot is generated from Table 2.

The top right plot of Figure 3 shows the behavior of VℓV_\ell of (14) for both uniform and adaptive MLMC-FE methods with ϵ=2×10−4\epsilon= 2 \times10^{-4}, using six levels of meshes. It can be seen that both methods demonstrate a decreasing trend in the values of VℓV_\ell as the mesh resolution increases, with a power law decay characterized by b≈2b \approx2 in the least square fit. But there is a regime for a small number of grid points where the asymptotic behavior of the adaptive method is not evident, in contrast to the behavior of the uniform method. As the meshes get finer, the plots of VℓV_\ell for the two methods are close to being parallel.

The computational effort for uniform MLMC-FE and MC-FE scales as O(ϵ−2)O(\epsilon^{-2}) and O(ϵ−3)O(\epsilon^{-3}) respectively, as indicated by the slopes of the least square fitting lines for the red and yellow curves. This observation is consistent with the theoretical cost predictions in Theorem 1 (with b>cb > c) and (9). Theorem 1 also indicates that the majority of computational work is performed on coarse grids. Table 2 shows the sample sizes obtained from (8) for MC-FE and (16) for MLMC-FE, further demonstrating a decrease in NℓCℓN_\ell C_\ell as ℓ\ell increases for the multilevel methods. We also found that the computational cost associated with the smallest tolerance ϵ=2×10−4\epsilon= 2 \times10^{-4} is so large that we were unable to generate MC-FE results on a fine mesh (ℓ=5\ell= 5) with a large sample size. In contrast, both versions of MLMC-FE successfully generated results with this tolerance.3

ϵ\epsilonLevel ℓ=0\ell= 0Level ℓ=1\ell= 1Level ℓ=2\ell= 2Level ℓ=3\ell= 3Level ℓ=4\ell= 4Level ℓ=5\ell= 5
8×10−38 \times10^{-3}5
6×10−36 \times10^{-3}7
4×10−34 \times10^{-3}22
2×10−32 \times10^{-3}83
10−310^{-3}322
8×10−48 \times10^{-4}527
6×10−46 \times10^{-4}869
4×10−44 \times10^{-4}1980
2×10−42 \times10^{-4}8000*
ϵ\epsilonLevel ℓ=0\ell= 0Level ℓ=1\ell= 1Level ℓ=2\ell= 2Level ℓ=3\ell= 3Level ℓ=4\ell= 4Level ℓ=5\ell= 5
8×10−38 \times10^{-3}1022
6×10−36 \times10^{-3}1232
4×10−34 \times10^{-3}32522
2×10−32 \times10^{-3}1522642
10−310^{-3}6911091842
8×10−48 \times10^{-4}8411292332
6×10−46 \times10^{-4}16102314082
4×10−44 \times10^{-4}3791589104153
2×10−42 \times10^{-4}15859234437562132
ϵ\epsilonLevel ℓ=0\ell= 0Level ℓ=1\ell= 1Level ℓ=2\ell= 2Level ℓ=3\ell= 3Level ℓ=4\ell= 4Level ℓ=5\ell= 5
8×10−38 \times10^{-3}1022
6×10−36 \times10^{-3}1933
4×10−34 \times10^{-3}3854
2×10−32 \times10^{-3}1211862
10−310^{-3}69782498
8×10−48 \times10^{-4}144611891276
6×10−46 \times10^{-4}2070218133213
4×10−44 \times10^{-4}50754843156114
2×10−42 \times10^{-4}25871196116684308514

Table 2. The optimal sample size estimation for MC-FE (left), uniform MLMC-FE (middle), and adaptive MLMC-FE (right). The simulations were conducted for a variety of choices of ϵ\epsilon. The computational cost associated with a tolerance of ϵ=2×10−4\epsilon= 2 \times10^{-4} for Monte Carlo was prohibitive; the entry in the table for this tolerance (with an asterisk) is an estimate.

As seen in the bottom left plot of Figure 3, the uniform and adaptive versions of MLMC-FE have similar computational costs of O(ϵ−2)O(\epsilon^{-2}), as evidenced by the similar decay rate of the error estimator and (23). According to (17), the slightly smaller magnitude of the error estimator for the adaptive MLMC-FE suggests a smaller (or comparable) computational cost in the asymptotic regime. However, when ϵ=4×10−4\epsilon= 4 \times10^{-4}, the adaptive MLMC-FE method requires approximately twice as much CPU time (1.79×1031.79 \times10^{3} seconds) compared to the uniform MLMC-FE approach (9.29×1029.29 \times10^{2} seconds) due to a notable increase in VℓV_\ell around Mℓ=104M_\ell= 10^{4}. This also causes the speedups achieved using adaptive refinement to be somewhat smaller than for uniform refinement. Thus, the traditional advantage of adaptive mesh refinement is not clearly present. We also attribute this to the apparent smoothness of the solution. We will demonstrate some advantages of the adaptive strategy in § 4.3.

The bottom right plot of Figure 3 shows that the nMSE tolerance ϵ\epsilon of MC-FE approach declines at O(N−0.51)O(N^{-0.51}), which is consistent with the well-known square root convergence rate. This rate holds since V(uh)V(u_h) remains nearly constant among all levels.

Properties of geometric parameters

Next, we will explore the plasma boundaries and geometric descriptors of the expected poloidal flux ψ\psi resulting from the three methods. To ensure a fair comparison, we will use the results obtained from the

found that the variance VhV_h is close to constant across mesh levels. Consequently, we used (8) to estimate the number of required samples as 8000 in Table 2, approximately four times the number required for ϵ=4×10−4\epsilon= 4 \times10^{-4}. This number was multiplied by the mean CPU time observed for the computations for Figure 2 (120.3 seconds, the largest entry appearing in the figure) to give the estimated total CPU time in Table 3. Table 3 gives quantitative data on the costs in CPU time for the three methods, as well as the speedups achieved by the two multilevel methods. It can be seen that for small tolerance ϵ\epsilon, both these methods reduce the CPU times dramatically, with many examples of speedups greater than a factor of 60 and a best-case speedup of approximately 200.

ϵ\epsilonMC-FE TimeUniform MLMC-FE TimeUniform MLMC-FE SpeedupAdaptive MLMC-FE TimeAdaptive MLMC-FE Speedup
8×10−38 \times10^{-3}5.67e+004.52e+001.33.50e+001.6
6×10−36 \times10^{-3}7.69e+005.25e+001.55.51e+001.4
4×10−34 \times10^{-3}1.30e+022.32e+015.69.01e+0014.4
2×10−32 \times10^{-3}4.83e+024.62e+0110.53.16e+0115.3
10−310^{-3}9.22e+032.47e+0237.31.84e+0250.1
8×10−48 \times10^{-4}1.50e+042.48e+0260.55.73e+0226.2
6×10−46 \times10^{-4}2.48e+044.13e+0260.06.30e+0239.4
4×10−44 \times10^{-4}5.68e+049.29e+0261.11.79e+0331.7
2×10−42 \times10^{-4}9.62e+05*4.21e+03228.51.21e+0479.6

Table 3. The CPU time in seconds for MC-FE (left), uniform MLMC-FE (middle), and adaptive MLMC-FE (right), together with speedups for the multilevel methods, for a variety of choices of ϵ\epsilon. The computational cost associated with a tolerance of ϵ=2×10−4\epsilon= 2 \times10^{-4} for Monte Carlo was prohibitive; the entry in the table for this tolerance (with an asterisk) is an estimate.

MC-FE on the finest uniform mesh as a reference benchmark.

Plasma boundary. To ascertain the expected location of the plasma boundary, we first determine the expected solution to the free boundary problem, E[ψ]\mathbb{E}[\psi], and determine the boundary of this deterministic function. This boundary is depicted, in dark violet, in Figure 4 along with the plasma boundaries obtained from 50 random currents, which are shown in light violet curves. In Figure 5 we present plots depicting the x-points and plasma boundaries of the expected solution ψ\psi computed using only samples and corrections from increasingly finer grids for both uniform and adaptive MLMC-FE approaches. The data was obtained with tolerance ϵ=4×10−4\epsilon= 4 \times10^{-4}. As can be seen when moving from left to right in Figure 5, the result obtained using the information from the coarsest level (leftmost column) is progressively corrected with information from increasingly finer grids, leading to the desired result depicted in the rightmost column.

Overlayed plasma boundaries of 50 random realizations for Monte Carlo, uniform MLMC, and adaptive MLMC simulations

Figure 4. The overlayed plasma boundaries of 50 random realizations are displayed in the top row as violet curves. The solid violet line is the plasma boundary of the expected poloidal flux generated with tolerance ϵ=4×10−4\epsilon= 4 \times10^{-4}. The inner and outer walls of the reactor are displayed in solid black and dark red respectively. The bottom row shows the regions close to the x-points in more detail. The dark green dots are the x-points of the expected solution. Each column from left to right corresponds to: simulation with the Monte Carlo approach, MLMC simulation on geometry-conforming uniform meshes, and adaptive MLMC simulation. All simulations were performed using the discretization level ℓ=5\ell= 5.

Expected plasma boundaries for uniform and adaptive MLMC simulations at levels $\ell=0$ through $\ell=4$

Figure 5. The violet curves represent the expected plasma boundaries for simulations using increasingly finer grids when ϵ=4×10−4\epsilon= 4 \times10^{-4} using the sample sizes specified in Table 2. Each sub-plot focuses on a region near the x-point, maintaining the same zoom-in ratio as the second row of Figure 4. The dark green dots denote the locations of the x-point. The top row shows the results of MLMC-FE on a set of geometry-conforming uniform meshes, while the bottom row displays the results for adaptive MLMC.

Among the three methods, MC-FE yields the smoothest plasma boundaries in the vicinity of the x-point, followed by adaptive MLMC-FE, while the MLMC-FE approach on geometry-conforming uniform meshes manifests the most pronounced irregularity in the plasma boundary. The boundary of the expected solution generated with the uniform grid MLMC-FE method exhibits irregularities as can be seen in Figure 4. These large deformations can be primarily attributed to the additional challenges arising from the curved boundaries. We will address this point in more detail at the end of this section. The top row of Figure 5 demonstrates that using a geometry-conforming mesh provides a more accurate approximation of the curved structure (in black) of the configuration than that in the bottom row. These observations underscore the challenge of striking a balance between preserving geometric fidelity when dealing with curved boundaries and the desired statistical accuracy of the solution.

Geometric descriptors. Table 4 reports some geometric parameters of the expected poloidal flux E[ψ]\mathbb{E}[\psi] in (4). It is observed that these parameters are consistent across different simulation techniques, with agreement typically up to two or, in some cases, one significant digit. Having been derived from E[ψ]\mathbb{E}[\psi] all these values are deterministic. There is, however, uncertainty associated with the corresponding quantities derived from ψ\psi, as they are themselves random variables. Uncertainty on these quantities can be assessed by computing Monte Carlo estimates of their expectations and variances. The multi-level methodology can be used for this purpose without any modification by simply regarding them as quantities of interest in their own right. All the relevant descriptors are computed for each of the samples gathered during the computational loop at the various discretization levels and their expectations and variances are estimated following the same process described on Algorithm 2. The expectations and variances obtained in this fashion are shown in Table 5.

MC-FEUniform MLMC-FEAdaptive MLMC-FE
x point(5.14,-3.29)(5.14,-3.29)(5.14,-3.28)
magnetic axis(6.41,0.61)(6.44,0.56)(6.46,0.54)
strike(4.16,-3.71)(4.16,-3.71)(4.16,-3.71)
points(5.56,-4.22)(5.56,-4.22)(5.56,-4.21)
inverse aspect ratio0.320.320.32
elongation1.861.871.86
upper triangularity0.430.430.43
lower triangularity0.530.530.53

Table 4. Geometric parameters of the expected poloidal flux E[ψ]\mathbb{E}[\psi] from MC-FE, MLMC-FE with geometry-conforming uniform mesh set, and adaptive MLMC-FE. The results are generated with an nMSE 4×10−44 \times10^{-4}.

Geometric parametersMC MeanMC VarianceMLMC Uniform MeanMLMC Uniform VarianceMLMC Adaptive MeanMLMC Adaptive Variance
x point(5.14,-3.29)(2.37e-04,1.44e-03)(5.14,-3.28)(2.44e-04,6.33e-04)(5.14,-3.29)(4.03e-04,2.91e-03)
magnetic axis(6.41,0.61)(1.01e-03,6.11e-04)(6.41,0.60)(2.65e-02,6.28e-03)(6.42,0.60)(3.15e-02,5.81e-03)
strike(4.17,-3.71)(4.46e-03,2.23e-03)(4.16,-3.71)(1.23e-04,4.30e-05)(4.17,-3.71)(4.18e-04,2.00e-04)
points(5.56,-4.22)(2.88e-08,3.28e-03)(5.56,-4.22)(4.05e-09,5.54e-05)(5.56,-4.21)(2.02e-08,2.98e-04)
inverse aspect ratio0.324.76e-060.324.23e-060.324.31e-06
elongation1.861.50e-041.861.83e-031.862.29e-03
upper triangularity0.432.49e-040.431.45e-030.432.08e-03
lower triangularity0.531.08e-040.531.52e-030.531.31e-03

Table 5. Sample mean of the geometric parameters extracted from each realization during three simulations MC-FE, uniform MLMC-FE, and adaptive MLMC-FE. The results are generated with an nMSE 4×10−44 \times10^{-4}.

Despite the advantages of low computational cost, the MLMC-FE-based methods may encounter diffi­ culties in accurately determining the locations of x-points and magnetic axis. Note that the x-points, which correspond to saddle points of the piecewise linear approximation of ψ\psi, can only be located at the nodes of the mesh. The numerical identification of their exact locations, which often relies on changes in the sign of the discrete gradient, can be challenging; see [5, 12, 28] for discussions of the computational difficulties.

In summary, simulations using the uniform MLMC-FE on non-nested geometry-conforming uniform meshes may encounter a substantial challenge in accurately identifying the x-point and achieving less accurate quantities, especially for the plasma boundary, when compared to the results obtained from MC-FE. On the other hand, the adaptive MLMC-FE approach on a nested adaptively refined mesh set produces results that closely align with the MC-FE at a much lower computational cost.

Meshing curved domains and their effect on MLMC estimations

In the deterministic setting this geometric error has the undesired consequence of hindering the decay of the discretization error since, as the mesh is refined, the discretized computational domain does not converge to the semicircle bounded by Γ\Gamma. In the stochastic setting the geometric error manifests itself in rendering the Monte Carlo estimator biased and inconsistent. The inconsistency stems from the fact that, as both the sample size and the mesh level increase, the Monte Carlo estimator does not converge to the expectation of the random variable uu satisfying the free boundary problem. Instead, the estimator converges to the expectation of the random variable that satisfies a perturbation of (29) where the curve Γ\Gamma is not a semicircle, but the initial polygonal approximation. If the initial mesh is fine enough, this geometric bias will likely be too small to affect the estimation.

On the other hand, if an exact descriptor of the curved boundaries is available, the aforementioned difficulty can be overcome by re-sampling the curved boundaries when building the sequence of finer grids, thus allowing for a resolution of the curved structures consistent with the respective mesh parameter. If an exact descriptor is not available it is possible to approximate it with, for instance, a cubic spline representation that interpolates the original polygonal representation. This spline surrogate is then used to re-sample the boundary as the mesh is refined. This strategy, which gives rise to what we refer to as geometry conforming meshes, was implemented for the numerical experiments with uniformly refined meshes and can be seen in use in the top row of Figure 5, where the curved boundary is represented more accurately as the mesh is refined.

Nevertheless, even if the approximation to the problem geometry is now consistent with the discretization error, this approach creates additional challenges. Since the approximations to the curved boundaries are not fixed across mesh levels, the sequence of meshes is no longer nested—not even in the case of uniform refinements. Moreover, due to the fact that the sequence of discrete domains no longer coincides across levels, the domains of definition of the respective discrete solutions will not overlap, and an extrapolation step may be needed to compute the multilevel Monte Carlo estimator on a common computational domain. This strategy, used in our numerical experiments, introduces an additional extrapolation error. In our case this is evident, for instance, in the fact that the plasma boundary of the expected solution E[ψh]\mathbb{E}[\psi_h] is considerably less regular in the geometry-conforming case than it is in the non-geometry-conforming one. This can be seen in Figure 5. The extrapolation error can be taken care of through careful post-processing. One option is to project or interpolate the numerical solutions into a subdomain common to all grids so that no extrapolation is needed for evaluation. This strategy was employed to produce Figure 6 successfully eliminating the spurious oscillations in the plasma boundary. However, doing this requires considerable computational work and reduces the time savings obtained from MLMC.

Figure 6. The violet curves represent the expected plasma boundaries for post-processed simulations using increasingly finer grids when ϵ=4×10−4\epsilon= 4 \times10^{-4} and sample size specified in Table 2. Each sub-plot focuses on a region near the x-point, maintaining the same zoom-in ratio as the second row of Figure 4. The dark green dots denote the locations of the x-point.

One further difficulty is that the re-sampling of the boundaries is impossible to perform in a straightforward fashion in the case of adaptively refined meshes. Thus, the geometric approximation remains fixed at the initial level of refinement. This can be seen in the bottom row of Figure 5, where the solid black line represents the polygonal approximation to the curved boundary of the divertor. The approximation improves as the mesh is refined for the uniformly refined mesh, but stays fixed for the adaptive strategy.

Concluding remarks

The objective of this study is to evaluate the performance of MC-FE and several variants of MLMC-FE for the Grad-Shafranov free boundary problem under high-dimensional uncertainties in the currents. The plasma equilibrium problem presents challenges and complexities associated with the physical properties of the system, the values of the parameters of the experiment, and even the approximation of geometric features of the model. Examples include the degradation of the stability of the equilibrium associated with an increase of plasma elongation or beta; the presence of finite current near the plasma boundary or, as in this study, the complex boundary structures, which must be treated carefully in the context of multilevel methods. These physically grounded challenges typically get reflected in the computations, for instance, as an increase in the difficulty of a linearized algorithm to converge to a desired tolerance or as the need for higher precision in the numerical computation required to resolve the desired features. In other words, complicated physical scenarios typically result in an increase in computational costs which might easily become overwhelming when combined with uncertainty quantification efforts. In cases like these, an MLMC strategy can help to mitigate the costs required to gather statistical information at the expense of potentially overlooking subtle behavior that may not be resolved in the samples gathered in coarse levels of refinement.

It is important to remark that the multilevel Monte Carlo techniques presented rely only on the independence between different realizations across discretization levels and not on the particular probability distribution obeyed by the stochastic parameters. In this study, the current intensities were modeled as independent uniformly distributed random variables, but the method would have worked without any modification even if the current intensities had obeyed correlated distributions as long as realizations across discretization levels are independent of each other. Moreover, further stochastic components—such as the parameters appearing in the profile models in equation (1b)—can be included and handled simultaneously.

In this study, we handled the geometric difficulties in the uniform MLMC-FE case using a sequence of uniform meshes that conform to the curved boundaries in the geometry. We also found that a feature of adaptive MLMC-FE is that adaptive gridding leads to a somewhat better representation of geometric quantities; in contrast, errors introduced by computations on uniform coarse meshes lead to some distortions of some features. The traditional advantage of adaptive refinement reduced computational cost, was less clearly present. But the overall advantage of the MLMC approach in reducing costs is dramatic.

Acknowledgements

All the free boundary computations were done using the code FREEQS. M [23, 24]. The authors are deeply grateful to Holger Heumann, the INRIA CASTOR team, and all the development team of the CEDRES++ free boundary solver for sharing access to the code and for helping us get up to speed with its usage.

Howard Elman has been partially supported by the U. S. Department of Energy under grant DE-SC0018149 and by the U. S. National Science Foundation under grant DMS1819115. Jiaxing Liang has been partially funded by the U. S. Department of Energy under grant DE-SC0018149. Tonatiuh Sánchez-Vizuet has been partially funded by the U. S. National Science Foundation through the grant NSF-DMS2137305.

Appendix

We now describe some technical mathematical and implementation details related to the work presented. This additional material is provided for the sake of completeness but is not needed to follow the discussion from the previous sections.

Weak formulation of the Grad-Shafranov equation

Deterministic problem. We will start by introducing the weak formulation for the Grad-Shafranov problem in the case where all the parameters involved are deterministic. Consider a semi-circle centered at the origin, boundary Γ\Gamma and with radius ρ\rho such that it fully contains all the relevant reactor components depicted in Figure 1. If Ω\Omega denotes the region surrounded by Γ\Gamma then, by construction, for any in Ωc\Omega^{c} the right-hand side of (1) will vanish identically. We will then, following [22], consider the space of real-valued functions

Z:={u:Ω→R∣∫Ωu2x dxdy<∞, ∫Ω∣∇u∣2x dxdy<∞; and u(0,y)=0}∩C0(Ω‾).(27)Z := \left\{u:\Omega\to\mathbb{R}\mid\int_{\Omega}u^{2}x\,dxdy<\infty,\ \int_{\Omega}\frac{|\nabla u|^{2}}{x}\,dxdy<\infty;\ \text{and }u(0,y)=0\right\}\cap C^{0}(\overline{\Omega}). \tag*{(27)}

This space arises naturally when testing equation (1) using the weighted L2L_{2} inner product defined by

⟨u,v⟩:=∫Ωuvx dxdy,\langle u,v\rangle:= \int_{\Omega}uvx\,dxdy,

which leads to the finite energy requirement appearing in the second inequality in the definition (27). The third requirement (u(0,y)=0u(0,y)=0) is a result of the anti-symmetry of the problem with respect to reflections across the axis of symmetry of the reactor and has the effect of ensuring that the quantity

∥u∥Z:=(∫Ω∣∇u∣2x dxdy)1/2(28)\|u\|_{Z}:=\left(\int_{\Omega}\frac{|\nabla u|^{2}}{x}\,dxdy\right)^{1/2} \tag*{(28)}

does indeed define a norm in the space ZZ. We will refer to this norm as the energy norm. The space ZZ defined in (27) endowed with the energy norm (28) is the natural function space to look for variational solutions to the deterministic linearized Grad-Shafranov equation (1). The variational formulation of the problem, as derived in [1, 17, 29], is that of finding ψ∈Z\psi\in Z such that for every test φ∈Z\varphi\in Z it holds that:

∫Ωρ1μx∇ψ⋅∇φ dxdy−∫Ωρ(rp′(ψ)+1μ0xff′(ψ))φ dxdy+∫ΓψNφ dc+∫Γ∫Γ(ψ(x1)−ψ(x2))M(x1,x2)(φ(x1)−φ(x2)) dc(x1) dc(x2)=∑k=1McIkSk∫ΩCkφ dxdy.(29)\int_{\Omega_{\rho}}\frac{1}{\mu x}\nabla\psi\cdot\nabla\varphi\,dxdy-\int_{\Omega_{\rho}}\left(r p'(\psi)+\frac{1}{\mu_{0}x}f f'(\psi)\right)\varphi\,dxdy+\int_{\Gamma}\psi N\varphi\,dc +\int_{\Gamma}\int_{\Gamma}(\psi(x_{1})-\psi(x_{2}))M(x_{1},x_{2})(\varphi(x_{1})-\varphi(x_{2}))\,dc(x_{1})\,dc(x_{2})=\sum_{k=1}^{M_{c}}\frac{I_{k}}{S_{k}}\int_{\Omega_{C_{k}}}\varphi\,dxdy. \tag*{(29)}

Above, the magnetic permeability μ\mu is either a function of ψ\psi inside a region occupied by a ferromagnetic material, μ=μ(∣∇ψ∣2/x2)\mu=\mu(|\nabla\psi|^{2}/x^{2}), or a constant μ=μ0\mu=\mu_{0} elsewhere, xi=(xi,yi)x_{i}=(x_{i},y_{i}) denote position vectors, ΩCk\Omega_{C_{k}} denotes the region occupied by the kk-th coil, and the total number of coils is denoted by McM_{c}. The following quantities, appearing on the left-hand side of (29), are related to the Green’s function associated with the operator on the left-hand side of (1)

N:=1x(1δ++1δ−−1ρ),δ±:=x2+(ρ±y)2,κ(x1,x2):=4x1x2(x1+x2)2+(y1−y2)2,N := \frac{1}{x}\left(\frac{1}{\delta_{+}}+\frac{1}{\delta_{-}}-\frac{1}{\rho}\right), \qquad\delta_{\pm}:=\sqrt{x^{2}+(\rho\pm y)^{2}}, \qquad\kappa(x_{1},x_{2}):=\sqrt{\frac{4x_{1}x_{2}}{(x_{1}+x_{2})^{2}+(y_{1}-y_{2})^{2}}},
M(x1,x2):=κ(x1,x2)2π(x1x2)3/2(2−κ2(x1,x2)2−2κ2(x1,x2)E(κ(x1,x2))−K(κ(x1,x2))).M(x_{1},x_{2}):=\frac{\kappa(x_{1},x_{2})}{2\pi(x_{1}x_{2})^{3/2}}\left(\frac{2-\kappa^{2}(x_{1},x_{2})}{2-2\kappa^{2}(x_{1},x_{2})}E(\kappa(x_{1},x_{2}))-K(\kappa(x_{1},x_{2}))\right).

where E(κ(x1,x2))E(\kappa(x_{1},x_{2})) and K(κ(x1,x2))K(\kappa(x_{1},x_{2})) are complete elliptic integrals of the first and second kind respectively [30].

Accounting for stochasticity. We now consider the stochasticity in the currents and allow the vector of currents to be a dd-dimensional random variable ω\omega uniformly distributed over the parameter space WW defined in (3). It is clear that in this case for any particular realization of the currents ω\omega we will obtain a different equilibrium configuration ψ(ω)\psi(\omega) that belongs to the Banach space ZZ defined in (27). Moreover, since for every ω∈W\omega\in W the resulting equilibrium configuration has finite energy, it then holds for the expected value of the equilibrium that

E(∥ψ∥Z2)<∞.\mathbb{E}\left(\|\psi\|_{Z}^{2}\right)<\infty.

In mathematical terms, we say that the stochasticity of the currents transforms the solution ψ\psi to (1) into a Banach space-valued random variable with finite expected energy. If ω\omega belongs to a complete and separable probability space (W,Σ,P)(W,\Sigma,\mathbb{P}), the class of such random variables forms what is known as a Bochner space [9]. In our particular case, solutions to (1) are mappings from the parameter space WW to the Banach space ZZ that, as functions of ω\omega, belong to the Bochner space

L2(W,Σ,P;Z):={u:W→Z∣u strongly measurable, ∥u∥L2(W,Z)<∞},L^{2}(W,\Sigma,\mathbb{P};Z):=\{u:W\to Z\mid u\text{ strongly measurable},\ \|u\|_{L^{2}(W,Z)}<\infty\},

where the norm ∥⋅∥L2(W,Z)\|\cdot\|_{L^{2}(W,Z)} is precisely defined in terms of the expected energy

∥u∥L2(W,Z):=(∫W∥u(⋅,ω)∥Z2 dP(ω))1/2=(E(∥u(⋅,ω)∥Z2))1/2.\|u\|_{L^{2}(W,Z)}:=\left(\int_{W}\|u(\cdot,\omega)\|_{Z}^{2}\,d\mathbb{P}(\omega)\right)^{1/2}=\left(\mathbb{E}\left(\|u(\cdot,\omega)\|_{Z}^{2}\right)\right)^{1/2}.

Mathematical results on multilevel Monte Carlo

The proceeding analysis on the computational cost to compute the MLMC-FE estimator in terms of the desired relative accuracy ϵ\epsilon is based on the following Theorem (established and proven in [8]), which quantifies the distribution of the computational effort across discretization levels in terms of the relation between the decay rate of the variance of the correction terms, VℓV_{\ell}, and the increase of the computational cost, CℓC_{\ell}, as the mesh is refined. In particular, it states that if the variance of the correction terms decays faster than the increase of computational cost, the dominant computational expense takes place on the coarsest grid—see also [19].

Theorem 1. Suppose there exist positive constants aa, bb, cc such that a≥12min⁡(b,c)a\geq\frac{1}{2}\min(b,c),

(i) ∥E(u−uℓ)∥Z=O(Mℓ−a)\|\mathbb{E}(u-u_{\ell})\|_{Z}=O(M_{\ell}^{-a}),

(ii) Vℓ=O(Mℓ−b)V_{\ell}=O(M_{\ell}^{-b}),

(iii) Cℓ=O(Mℓc)C_{\ell}=O(M_{\ell}^{c}).

Then for any positive ϵ<ϵ−1\epsilon< \epsilon^{-1} small enough, there exists level LL and sample size NℓN_{\ell} for which the multilevel estimator AMLMCA_{\mathrm{MLMC}} has an nMSE with

E[∥u−AMLMC(uL)∥Z2]E[∥u∥Z2]<ϵ2,\frac{\mathbb{E}\left[\left\lVert u-A_{\mathrm{MLMC}}(u_L)\right\rVert_Z^2\right]}{\mathbb{E}\left[\left\lVert u\right\rVert_Z^2\right]} < \epsilon^2,

and the total computation cost CC with bound

C(AMLMC)={O(ϵ−2),b>c,O(ϵ−2(log⁡ϵ)2),b=c,O(ϵ−2−(c−b)a),0<b<c.C\left(A_{\mathrm{MLMC}}\right)= \begin{cases} O\left(\epsilon^{-2}\right), & b>c,\\ O\left(\epsilon^{-2}(\log\epsilon)^2\right), & b=c,\\ O\left(\epsilon^{-2-\frac{(c-b)}{a}}\right), & 0<b<c. \end{cases}

References

  1. [1]R. Albanese, J. Blum, and O. D. Barbieri. On the solution of the magnetic flux equation in an infinite domain. In S. Methfessel and G. Thamas, editors, 8th. European Conference on Computational Physics: Computing in plasma physics, volume 10D of Europhysics Conference Abstracts, pages 41–44. European Physical Society, 1986.
  2. [2]V. Amoskov, A. Belov, V. Belyakov, Y. Gribov, A. Kavin, V. Kukhtin, E. Lamzin, K. Lobanov, N. Maximenkova, A. Mineev, and S. Sytchevsky. Stray magnetic field initiation produced by ferromagnetic elements of the ITER tokamak complex. Plasma Devices and Operations, 17(4):238–249, Dec. 2009.DOI
  3. [3]I. Babuška, F. Nobile, and R. Tempone. A stochastic collocation method for elliptic partial differential equations with random input data. SIAM Journal on Numerical Analysis, 45(3):1005–1034, 2007.
  4. [4]A. Barth, C. Schwab, and N. Zollinger. Multi-level Monte Carlo finite element method for elliptic PDEs with stochastic coefficients. Numerische Mathematik, 119(1):123–161, 2011.
  5. [5]C. Bierig and A. Chernov. Estimation of arbitrary order central statistical moments by the multilevel Monte Carlo method. Stochastic Partial Differential Equations: Analysis and Computations, 4(1):3–40, 2016.DOI
  6. [6]C. Carstensen. An adaptive mesh-refining algorithm allowing for an h stable 1 2 projection onto courant finite element spaces. Constructive Approximation, 20(4):549–564, Oct. 2003.DOI
  7. [7]C. Carstensen, M. Feischl, M. Page, and D. Praetorius. Axioms of adaptivity. Computers & Mathematics with Applications, 67(6):1195–1253, Apr. 2014.pubmed.ncbi.nlm.nih.gov/25983390
  8. [8]K. A. Cliffe, M. B. Giles, R. Scheichl, and A. L. Teckentrup. Multilevel Monte Carlo methods and applications to elliptic PDEs with random coefficients. Computing and Visualization in Science, 14(1):3–15, 2011.DOI
  9. [9]G. Da Prato and J. Zabczyk. Encyclopedia of Mathematics and its Applications: Stochastic Equations in Infinite Dimensions, Series Number 152. Cambridge University Press, Cambridge, England, 2 edition, Apr. 2014.
  10. [10]W. Dörfler. A convergent adaptive algorithm for Poisson’s equation. SIAM Journal on Numerical Analysis, 33(3):1106–1124, 1996.DOI
  11. [11]M. Eigel, C. Merdon, and J. Neumann. An adaptive multilevel Monte Carlo method with stochastic bounds for quantities of interest with uncertain data. SIAM/ASA Journal on Uncertainty Quantification, 4(1):1219–1245, 2016.DOI
  12. [12]H. C. Elman, J. Liang, and T. Sánchez-Vizuet. Surrogate approximation of the Grad-Shafranov free boundary problem via stochastic collocation on sparse grids. Journal of Computational Physics, 448:Paper No. 110699, 20, 2022.DOI
  13. [13]H. R. Fairbanks, A. Doostan, C. Ketelsen, and G. Iaccarino. A low-rank control variate for multilevel Monte Carlo simulation of high-dimensional uncertain systems. Journal of Computational Physics, 341:121–139, 2017.DOI
  14. [14]B. Faugeras and H. Heumann. FEM-BEM coupling methods for Tokamak plasma axisymmetric free-boundary equilibrium computations in unbounded domains. Journal of Computational Physics, 343:201 – 216, 2017.
  15. [15]S. Funken, D. Praetorius, and P. Wissgott. Efficient implementation of adaptive P1-FEM in Matlab (extended preprint). Technical report, Institute for Analysis and Scientific Computing, Vienna University of Technology, 2008.
  16. [16]S. Funken, D. Praetorius, and P. Wissgott. Efficient implementation of adaptive P1-FEM in Matlab. Computational Methods in Applied Mathematics, 11(4):460–490, 2011.DOI
  17. [17]G. Gatica and G. Hsiao. The uncoupling of boundary integral and finite element methods for nonlinear boundary value problems. Journal of Mathematical Analysis and Applications, 189(2):442 – 461, 1995.DOI
  18. [18]R. Ghanem and P. Spanos. A stochastic Galerkin expansion for nonlinear random vibration analysis. Probabilistic Engineering Mechanics, 8(3-4):255–264, 1993.DOI
  19. [19]M. B. Giles. Multilevel Monte Carlo methods. Acta Numerica, 24:259–328, 2015.
  20. [20]P.-A. Gourdain, J.-N. Leboeuf, and R. Neches. High-resolution magnetohydrodynamic equilibrium code for unity beta plasmas. J. Comput. Phys., 216(1):275–299, July 2006.DOI
  21. [21]H. Grad and H. Rubin. Hydromagnetic equilibria and force-free fields. In Proc. Second international conference on the peaceful uses of atomic energy, Geneva, volume 31,190, New York, Oct 1958. United Nations.DOI
  22. [22]V. Grandgirard. Modelisation de l’equilibre d’un plasma de tokamak. Technical report, Université de Franche-Comté, 1999.
  23. [23]H. Heumann. FEEQS.M. http://www-sop.inria.fr/members/Holger.Heumann/Software.html.
  24. [24]H. Heumann, J. Bluhm, C. Boulbe, B. Faugeras, G. Selig, J.-M. Ané, S. Brémond, V. Grandgirard, P. Hertout, E. Nardon, and et al. Quasi-static free-boundary equilibrium of toroidal plasma with CEDRES++: Computational methods and applications. Journal of Plasma Physics, 81(3):905810301, 2015.DOI
  25. [25]H. Heumann and F. Rapetti. A finite element method with overlapping meshes for free-boundary axisymmetric plasma equilibria in realistic geometries. Journal of Computational Physics, 334:522 – 540, 2017.
  26. [26]H. Hoel, E. von Schwerin, A. Szepessy, and R. Tempone. Adaptive multilevel Monte Carlo simulation. In Numerical Analysis of Multiscale Computations, volume 82 of Lect. Notes Comput. Sci. Eng., pages 217–234. Springer, Heidelberg, 2012.DOI
  27. [27]H. Hoel, E. von Schwerin, A. Szepessy, and R. Tempone. Implementation and analysis of an adaptive multilevel Monte Carlo algorithm. Monte Carlo Methods and Applications, 20(1):1–41, 2014.DOI
  28. [28]F. Hofmann. FBT - a free-boundary tokamak equilibrium code for highly elongated and shaped plasmas. Comput. Phys. Commun., 48(2):207–221, Feb. 1988.DOI
  29. [29]G. C. Hsiao and S. Zhang. Optimal order multigrid methods for solving exterior boundary value problems. SIAM Journal on Numerical Analysis, 31(3):680–694, 1994.DOI
  30. [30]J. D. Jackson. Classical Electrodynamics. Wiley, New York, NY, 2nd edition, 1975.
  31. [31]J. Johnson, H. Dalhed, J. Greene, R. Grimm, H. Hsieh, S. Jardin, J. Manickam, M. Okabayashi, R. Storer, A. Todd, D. Voss, and K. Weimer. Numerical determination of axisymmetric toroidal magnetohydrodynamic equilibria. Journal of Computational Physics, 32(2):212–234, Aug. 1979.
  32. [32]A. Khodadadian, M. Parvizi, and C. Heitzinger. An adaptive multilevel Monte Carlo algorithm for the stochastic drift-diffusion-Poisson system. Computer Methods in Applied Mechanics and Engineering, 368:113163, 23, 2020.DOI
  33. [33]R. Kornhuber and E. Youett. Adaptive multilevel Monte Carlo methods for stochastic variational inequalities. SIAM Journal on Numerical Analysis, 56(4):1987–2007, 2018.arxiv.org/abs/1611.06012
  34. [34]S. Larsson and V. Thomée. Partial Differential Equations with Numerical Methods, volume 45 of Texts in Applied Mathematics. Springer-Verlag, Berlin, 2003.DOI
  35. [35]F. Law, A. Cerfon, and B. Pehersdorfer. Accelerating the estimation of collisionless energetic particle confinement statistics in stellarators using multifidelity Monte Carlo. Nucl. Fusion, 62:076019, 2022.DOI
  36. [36]R. Lüst and A. Schlüter. Axialsymmetrische magnetohydrodynamische Gleichgewichtskonfigurationen. Z. Naturf, 12a:850–854, 1957.DOI
  37. [37]J. Luxon and B. Brown. Magnetic analysis of non-circular cross-section tokamaks. Nuclear Fusion, 22(6):813–821, jun 1982.DOI
  38. [38]N. Metropolis and S. Ulam. The Monte Carlo method. Journal of the American Statistical Association, 44:335–341, 1949.
  39. [39]P. Morin, R. H. Nochetto, and K. G. Siebert. Data oscillation and convergence of adaptive FEM. SIAM Journal on Numerical Analysis, 38(2):466–488, Jan. 2000.DOI
  40. [40]M. Motamed and D. Appelö. A multiorder discontinuous Galerkin Monte Carlo method for hyperbolic problems with stochastic parameters. SIAM Journal on Numerical Analysis, 56(1):448–468, 2018.DOI
  41. [41]F. Nobile and F. Tesei. A multi level Monte Carlo method with control variate for elliptic PDEs with log-normal coefficients. Stochastic Partial Differential Equations, Analysis and Computations, 3(3):398–444, 2015.DOI
  42. [42]V. D. Shafranov. On magnetohydrodynamical equilibrium configurations. Soviet Physics JETP, 6:545–554, 1958.
  43. [43]J. R. Shewchuk. Delaunay refinement algorithms for triangular mesh generation. Computational Geometry, 22(1-3):21–74, May 2002.DOI
  44. [44]A. L. Teckentrup, R. Scheichl, M. B. Giles, and E. Ullmann. Further analysis of multilevel monte carlo methods for elliptic PDEs with random coefficients. Numerische Mathematik, 125(3):569–600, Mar. 2013.arxiv.org/abs/1204.3476
  45. [45]B. P. Welford. Note on a method for calculating corrected sums of squares and products. Technometrics, 4(3):419–420, 1962.
  46. [46]D. Xiu. Numerical Methods for Stochastic Computations. Princeton University Press, Princeton, NJ, 2010. A spectral method approach.DOI

Paper details

vlnc:W_224czqqr
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 5

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents