1 Introduction and problem formulation

A tokamak is an experimental magnetic confinement device that explores the physics of plasmas and the possibilities of producing energy by nuclear fusion [13]. It is a candidate technology for the development of an electricity production plant by nuclear fusion operating on the principle of heat exchange with a fluid [4, 5]. Inside the tokamak the energy generated by the fusion of atomic nuclei is absorbed in the form of heat by the walls of the empty chamber. Just like conventional power plants, a fusion power plant uses this heat to produce steam and then, through turbines and alternators, electricity.

The plasma equilibrium in a tokamak is a free boundary problem. The boundary of the plasma is the last closed magnetic flux surface. We denote by Ω the vacuum vessel, by \(\Gamma =\partial \Omega \) its boundary, by \(\Omega _{p}\) the plasma domain, by \(\Gamma _{p}=\partial \Omega _{p}\) its boundary, and by \(\Omega _{V} = \Omega \backslash \overline{\Omega _{p}}\) the vacuum region surrounding \(\Omega _{p}\).

The equation of plasma equilibrium can be written (see [2]) as

$$ \mathcal{S}\psi =0 \quad \text{in } \Omega _{V}, $$
(1)

where ψ is the poloidal flux, and \(\mathcal{S}\) is the Grad–Shafranov operator.

The challenge is controlling the plasma in the heart of the tokamak, in a limited volume and far enough away from any solid element, in particular, the wall of the chamber. In this work, we study the inverse problem: Given a set of boundary data on \(\Gamma _{p}\) and Γ, find a solution ψ of

$$ \textstyle\begin{cases} \mathcal{S}\psi =0 & \text{in } \Omega _{V}, \\ \frac{1}{r} \frac{\partial \psi }{\partial n}=\Phi & \text{ on }\Gamma , \\ \psi =\psi _{m} & \text{ on } \Gamma , \\ \psi =0 & \text{ on } \Gamma _{p}. \end{cases} $$
(2)

We remark that since \(\Gamma _{p}\) is unknown, \(\Omega _{V}\) is also unknown. This problem has been considered in different works, in which control or parametric optimization methods are used [68]. In our previous work [9], we used the topological sensitivity method to find the unknown plasma boundary \(\Gamma _{p}\). We present in this work a new formulation of the inverse problem based on the Kohn–Vogelius method. It leads to define, for any given plasma domain \(D\subset \Omega \), two forward problems.

  • A first problem, associated with the Neumann boundary condition Φ:

    $$ (\mathcal{P}_{n})\textstyle\begin{cases} \text{Find } \psi _{D}^{n} \in H^{1}(\Omega \backslash \overline{D}) \text{ solving } \\ \mathcal{S}\psi _{D}^{n}=0\quad \text{in } \Omega \backslash \overline{D}, \\ \frac{1}{r} \frac{\partial \psi _{D}^{n}}{\partial n}=\Phi\quad \text{on } \Gamma , \\ \psi _{D}^{n}=0\quad \text{on } \partial D. \end{cases} $$
    (3)
  • A second one, associated with the measured velocity \(\psi _{m}\):

    $$ (\mathcal{P}_{d}) \textstyle\begin{cases} \text{Find } \psi _{D}^{d} \in H^{1}(\Omega \backslash \overline{D}) \text{ solving } \\ \mathcal{S}\psi _{D}^{d}=0 \quad \text{in } \Omega \backslash \overline{D}, \\ \psi _{D}^{d}=\psi _{m} \quad \text{ on } \Gamma , \\ \psi _{D}^{d}=0 \quad \text{ on } \partial D. \end{cases} $$
    (4)

Note that if ∂D and the plasma boundary \(\Sigma _{p}\) coincides, then the misfit between the solutions vanishes, and then \({\psi _{D}^{n}} = {\psi _{D}^{d}}\). Using this remark, the studied inverse problem can be solved by minimizing the following energy functional [1012]:

$$\begin{aligned} \mathcal{K}(\Omega \backslash \overline{D}) = \int _{\Omega \backslash \overline{D}} \frac{1}{r} \bigl\vert \nabla \psi _{D}^{n} - \nabla \psi _{D}^{d} \bigr\vert ^{2}\,dx. \end{aligned}$$
(5)

To solve this optimization problem and to reconstruct the unknown plasma domain \(\Omega _{p}\), in this paper, we propose a fast and accurate topological optimization algorithm based on the topological sensitivity analysis concept.

An outline of the paper is as follows:

  • The main ideas of the proposed geometry reconstruction approach are illustrated in the next section.

  • In Sect. 3, we derive a topological asymptotic expansion describing the variation of the Kohn–Vogelius functional \(\mathcal{K}\) with respect to the creation of a small geometric perturbation inside the domain Ω.

  • The implementation of the proposed numerical optimization algorithm is done in Sect. 4. We present some identification results and discuss the influence of some parameters (the location, size, and shape) on the accuracy of the reconstructed plasma domain.

  • Finally, a conclusion is presented in Sect. 5.

2 Proposed reconstruction method

Classical shape optimization methods are based on the shape derivative concept [1315]. The optimization process is limited to determine the optimal location of the initial domain boundary. Its main drawback is that is does not allow any topology changes. The initial and optimal domains have the same topology. To overcome this difficulty, the homogenization theory [1619] represents important developments in this direction. One of its main features consists in considering the domain as a composite material with density ranging from zero to one, rather than defining domains via their characteristic functions, i.e., by a discrete 0–1 valued function. Rather than optimizing the shape by deforming the boundary, the problem was relaxed by considering composite materials defined by a material density distribution and a microstructure. However, the range of application of this approach is mainly restricted to linear elasticity and particular objective functions. For these reasons, global optimization techniques like genetic algorithms and simulated annealing have been proposed (see, e.g., [20]), but these methods have a high computational cost and cannot be applied to industrial problems. To improve the optimization process, the level set method has been used in the field of shape and topology optimization [21, 22]. This approach has been initially introduced by Osher and Sethin [23] for numerically tracking fronts and free boundaries. This method can handle some topology changes. Indeed, the level set can easily remove holes but cannot create new holes in the middle of a shape. In practice, this affect can checked by varying the initialization, which yields different optimal shapes with different topologies.

During the last two decades, the topological sensitivity notion [2428] has received much attention and has been successfully used for solving various shape and topology optimization problems in different fields. The topological sensitivity-based methods are concerned with the variation of a cost function with respect to a topology modification of a domain. The topology of the computational domain can change during the optimization process by creation of holes. The most simple way of modifying the topology consists in creating a small hole in the domain. In the case of structural shape optimization, creating a hole means simply removing some material. In the case of fluid dynamics, where the domain represents the fluid, creating a hole means inserting a small obstacle. The situation is similar in electromagnetism.

In this paper, we use the topological sensitivity concept, and we built a fast and accurate topological optimization algorithm for solving the minimization problem (5) and identifying the unknown plasma domain \(\Omega _{p}\) from boundary measurement of the potential field. The idea is to study the topological sensitivity of the function \(\mathcal{K}\) regarding a small topological domain perturbation \(\omega _{z,\varepsilon }\) of the domain Ω. It leads to an asymptotic expansion of the form

$$ \mathcal{K}(\Omega \backslash \overline{\omega _{z,\varepsilon }}) = \mathcal{K}( \Omega ) + g(\varepsilon ) \delta \mathcal{K}(z) + o \bigl(g( \varepsilon )\bigr), $$

where \(g(\varepsilon )\) is a positive scalar function going to zero with ε. This formula is called the topological asymptotic expansion, and \(\delta \mathcal{K}\) is called the topological gradient. Using this expansion, the minimum of \(\mathcal{K}\) corresponds to the location in Ω where \(\delta \mathcal{K}\) is the most negative. In fact, if \(\delta \mathcal{K}(z)<0\), then \(\mathcal{K}(\Omega \backslash \overline{\omega _{z,\varepsilon }} ) < \mathcal{K}(\Omega )\) for small ε.

In general, this topology optimization approach leads to build a sequence of geometries \((\Omega _{n})_{n\geq 0}\), with \(\Omega _{0}=\Omega \). At the nth iteration the geometry \(\Omega _{n+1}\) is obtained by creating a new geometric perturbation \(\omega _{n}\) in the domain \(\Omega _{n}\); \(\Omega _{n+1}=\Omega _{n}\backslash \overline{\omega _{n}}\). The perturbation \(\omega _{n}\) is constructed as

$$ \omega _{n} = \bigl\{ x \in \Omega _{n}, \text{ such that } \delta \mathcal{K}_{n}(x) \le c_{n} \bigr\} , $$

where \(\delta \mathcal{K}_{n}\) is the associated topological gradient (computed in \(\Omega _{n}\)), and \(c_{n}\) is a negative constant chosen so that \(\mathcal{K}(\Omega _{n}\backslash \overline{\omega _{n}})-\mathcal{K}( \Omega _{n})\) decreases as most as possible.

  • The stopping criteria is given by the natural optimal condition

    $$ \delta \mathcal{K}_{n}(x)\geq 0\quad \forall x\in \Omega _{n}. $$

    This condition coincides with that obtained by Buttazzo and Dal Maso [29] for the Laplace equation using the homogenization theory.

  • This topology optimization algorithm can be viewed as a descent method, where the descent direction is determined by the sensitivity function \(\delta \mathcal{K}_{n}\) (the topological gradient), and the step length is given by the volume variation \(|\omega _{n}|=|\Omega _{n}\backslash \Omega _{n+1}|\).

  • The determination of the optimal step length \(|\omega _{n}|\) (i.e., determination of the optimal value of the constant \(c_{n}\)) is still an open question. In practice, this constant is adjusted using the binary search method.

In this paper, we extend this approach for solving the problem of the plasma magnetic equilibrium in a tokamak. Since the real-time identification of the plasma domain is a key point to access high-performance regimes, we propose in this study a fast and accurate reconstruction algorithm (one-shot algorithm) based on the topological sensitivity analysis method.

3 Topological sensitivity analysis

Using the axisymmetric configuration and an horizontal cut, we can rewrite the used formulation as follows: find the unknown domain \(\Omega _{p}\) occupied by the plasma as the optimal solution to the optimization problem

$$\begin{aligned} \mathcal{K}(\Omega \backslash \overline{D}) = \int _{\Omega \backslash \overline{D}} \gamma (x) \bigl\vert \nabla \psi _{D}^{n}(x) - \nabla \psi _{D}^{d}(x) \bigr\vert ^{2}\,dx, \end{aligned}$$

where \(\psi _{D}^{n}\) and \(\psi _{D}^{d}\) are solutions to the following systems:

$$\begin{aligned}& (\mathcal{P}_{n})\textstyle\begin{cases} \text{Find } \psi _{D}^{n} \in H^{1}(\Omega \backslash \overline{D}) \text{ solving } \\ - \operatorname{div} (\gamma (x) \nabla \psi _{D}^{n}) = 0\quad \text{in } \Omega \backslash \overline{D}, \\ \gamma (x) \nabla \psi _{D}^{n}{\mathbf{n }} = \Phi \quad \text{on } \Gamma , \\ \psi _{D}^{n} = 0 \quad \text{on } \partial D, \end{cases}\displaystyle \end{aligned}$$
(6)
$$\begin{aligned}& (\mathcal{P}_{d}) \textstyle\begin{cases} \text{Find } \psi _{D}^{d} \in H^{1}(\Omega \backslash \overline{D}) \text{ solving } \\ - \operatorname{div} (\gamma (x) \nabla \psi _{D}^{d}) = 0 \quad \text{in } \Omega \backslash \overline{D}, \\ \psi _{D}^{d} = \psi _{m} \quad \text{on } \Gamma , \\ \psi _{D}^{d} = 0 \quad \text{on } \partial D. \end{cases}\displaystyle \end{aligned}$$
(7)

To solve this problem, we derive a topological sensitivity analysis for the Khon–Vogelius-type functional \(\mathcal{K}\). It consists in studying the variation of \(\mathcal{K}\) regarding the presence of a small plasma domain \(\omega _{z,\varepsilon }\) around the point \(z\in \Omega \) with Dirichlet boundary condition on \(\partial \omega _{z,\varepsilon }\).

Using the above notation, we define the function \(\mathcal{K}(\Omega \backslash \overline{\omega _{z,\varepsilon }})\) by

$$\begin{aligned} \mathcal{K}(\Omega \backslash \overline{\omega _{z,\varepsilon }}) = \int _{\Omega \backslash \overline{\omega _{z,\varepsilon }}}\gamma (x) \bigl\vert \nabla \psi _{\varepsilon }^{n} - \nabla \psi _{\varepsilon }^{d} \bigr\vert ^{2}\,dx, \end{aligned}$$

where \(\psi _{\varepsilon }^{n}\) is the solution to the perturbed Neumann problem

$$ \bigl(\mathcal{P}_{\varepsilon }^{n}\bigr)\textstyle\begin{cases} - \operatorname{div} (\gamma (x) \nabla \psi _{\varepsilon }^{n}) = 0 &\text{in } \Omega _{z,\varepsilon }, \\ \gamma (x) \nabla \psi _{\varepsilon }^{n}{\mathbf{n }} = \Phi& \text{on } \Gamma , \\ \psi _{\varepsilon }^{n} = 0& \text{on }\partial \omega _{z, \varepsilon }. \end{cases} $$
(8)

The function \(\psi _{\varepsilon }^{d}\) is the solution to the perturbed Dirichlet problem

$$ \bigl(\mathcal{P}_{\varepsilon }^{d}\bigr) \textstyle\begin{cases} - \operatorname{div} (\gamma (x) \nabla \psi _{\varepsilon }^{d}) = 0 &\text{in } \Omega _{z,\varepsilon }, \\ \psi _{\varepsilon }^{d} = \psi _{m}& \text{on } \Gamma , \\ \psi _{\varepsilon }^{d} = 0& \text{on } \partial \omega _{z, \varepsilon }. \end{cases} $$
(9)

We can derive the following asymptotic expansion for the shape function \(\mathcal{K}\) (see [30]):

Theorem 3.1

Let \(\omega _{z,\varepsilon }\) be a small topological perturbation in Ω of the form \(\omega _{z,\varepsilon }=z+\varepsilon \omega \subset \Omega \). Then the function \(\mathcal{K}\) admits the following asymptotic expansion:

$$\begin{aligned} \mathcal{K}(\Omega \backslash \overline{\omega _{z,\varepsilon }})= \mathcal{K}( \Omega )+ \frac{-2\pi }{\log (\varepsilon )}\gamma (z) \bigl( \bigl\vert \psi ^{d}_{0}(z) \bigr\vert ^{2}- \bigl\vert \psi ^{n}_{0}(z) \bigr\vert ^{2}\bigr) + o\biggl( \frac{-1}{\log (\varepsilon )}\biggr), \end{aligned}$$

where \(\psi _{0}^{n}\) and \(\psi _{0}^{d}\) are solutions to the following systems:

$$\begin{aligned}& \bigl(\mathcal{P}_{0}^{n}\bigr)\textstyle\begin{cases} \textit{Find } \psi _{0}^{n} \in H^{1}(\Omega ) \textit{ solving } \\ - \operatorname{div} (\gamma (x) \nabla \psi _{0}^{n}) = 0 \quad \textit{in } \Omega , \\ \gamma (x) \nabla \psi _{0}^{n}{\mathbf{n }} = \Phi \quad \textit{on } \Gamma , \end{cases}\displaystyle \end{aligned}$$
(10)
$$\begin{aligned}& \bigl(\mathcal{P}_{0}^{d}\bigr) \textstyle\begin{cases} \textit{Find } \psi _{0}^{d} \in H^{1}(\Omega ) \textit{ solving } \\ - \operatorname{div} (\gamma (x) \nabla \psi _{0}^{d}) = 0 \quad \textit{in } \Omega , \\ \psi _{0}^{d} = \psi _{m} \quad \textit{on } \Gamma . \end{cases}\displaystyle \end{aligned}$$
(11)

4 Numerical investigations

4.1 Reconstruction algorithm

In this section, we present a fast and simple one-shot numerical reconstruction algorithm. Our numerical procedure is based on the asymptotic formula presented in Theorem 3.1, which describes the variation of the Kohn–Vogelius-type functional \(\mathcal{K}\) with respect to the creation of a small hole \(\omega _{z,\varepsilon }\) inside the domain Ω. From Theorem 3.1 it follows that the function \(\mathcal{K}\) satisfies the following topological asymptotic expansion:

$$\begin{aligned} \mathcal{K}(\Omega \backslash \overline{\omega _{z,\varepsilon }})= \mathcal{K}( \Omega )+ \frac{-2\pi }{\log (\varepsilon )}\delta \mathcal{K}(z) + o\biggl(\frac{-1}{\log (\varepsilon )} \biggr), \end{aligned}$$

where \(\delta \mathcal{K}\) is the topological gradient defined as

$$ \delta \mathcal{K}(x)=\gamma (x) \bigl( \bigl\vert \psi ^{d}_{0}(x) \bigr\vert ^{2}- \bigl\vert \psi ^{n}_{0}(x) \bigr\vert ^{2}\bigr),\quad x\in \Omega , $$

with solutions \(\psi _{0}^{n}\) and \(\psi _{0}^{d}\) to the Neumann and Dirichlet problems (10)–(11).

According to the main idea of the topological sensitivity analysis method, the unknown plasma domain \(\Omega _{p}\) is likely to be located at the zone where the topological gradient \(\delta \mathcal{K}\) is negative. To present our proposed procedure, we introduce some notations. Let \(\delta _{\min }\) be the most negative value of the topological gradient \(\delta \mathcal{K}\) in Ω (i.e \(\delta _{\min }=\min_{x\in \Omega }\delta \mathcal{K}(x)\)). For all \(\rho \in [0,1]\), we define the zone

$$ \omega _{\rho }= \bigl\{ x\in \Omega ; \delta \mathcal{K}(x)\leq (1- \rho )\delta _{\min } \bigr\} . $$

The aim is reconstructing the location and shape of the unknown plasma domain \(\Omega _{p}\subset \Omega \) from a given measurement of the potential field on the boundary \(\Gamma =\partial \Omega \). The main steps of our numerical reconstruction procedure are summarized in the following “one-shot” algorithm.

Plasma reconstruction algorithm:

  • Step 1: Solve the problems (\(\mathcal{P}^{n}_{0}\)) and (\(\mathcal{P}^{d}_{0}\)),

  • Step 2: Compute the topological gradient \(\delta \mathcal{K}(z)\), \(z\in \Omega \),

  • Step 3: Reconstruct the plasma domain

    $$ \Omega _{p}= \bigl\{ x\in \Omega ; \delta \mathcal{K}(x)=\bigl(1-\rho ^{\star }\bigr) \delta _{\min }< 0 \bigr\} ,$$

    where \(\rho ^{\star }\in \mathopen{]}0,1[\) is chosen to ensure the maximal \(\mathcal{K}\) such that

    $$ \mathcal{K}(\Omega \backslash \overline{\omega _{\rho ^{\star }}}) \leq \mathcal{K}(\Omega \backslash \overline{\omega _{\rho }}),\quad \forall \rho \in (0,1).$$

In this one-iteration algorithm:

  • The location of the unknown plasma is given by the point \(z^{\star }\in \Omega \) where the topological gradient \(\delta \mathcal{K}\) is most negative (i.e., \(z^{\star }= \operatorname*{arg min}_{x\in \Omega }\delta \mathcal{K}(x)\)). In other words, the topological gradient tell us that the plasma domain is located around the point \(z^{\star }\in \Omega \).

  • The size of the domain occupied by the plasma is adjusted via the choice of the parameter \(\rho \in (0, 1)\). Its boundary is approximated by a level-set curve of the topological gradient \(\delta \mathcal{K}\) (i.e., the plasma domain is delimited by a well-chosen isovalue of \(\delta \mathcal{K}\))

    $$ \partial \Omega _{p}= \bigl\{ x\in \Omega ; \delta \mathcal{K}(x)= \bigl(1- \rho ^{\star }\bigr)\delta _{\min } \bigr\} .$$
  • The computation of the plasma domain size (in Step 3) can be considered as a descent method where the step length is given by the volume variation \(|V_{k}|=|\omega _{\rho _{k}}\backslash \omega _{\rho _{k+1}} |\). The determination of \(\rho ^{\star }\) can be viewed as a line search step. However, determining the optimal value of the parameter ρ and optimizing the size of the domain ω solution to

    $$ \min_{\rho \in (0, 1)}\mathcal{K}(\Omega \backslash \overline{\omega _{\rho }})$$

    is still an open question. To speed up the convergence of our optimization algorithm, we perform a binary search approach (dichotomy method) for approaching as most as possible the best value of ρ starting from \(\rho =\frac{1}{2}\).

Remark 4.1

In the particular case where the exact plasma domain \(\Omega _{p}^{\operatorname{ex}}\) is known, the best value \(\rho ^{*}\) of the parameter ρ can be determined as the minimum of the following error functional:

$$\begin{aligned} \operatorname{er}(\rho )= \bigl[\operatorname{meas}\bigl(\Omega _{p}^{\operatorname{ex}}\cup \omega _{\rho }\bigr)- \operatorname{meas}\bigl(\Omega _{p}^{\operatorname{ex}} \cap \omega _{\rho }\bigr) \bigr]/\operatorname{meas}\bigl(\Omega _{p}^{\operatorname{ex}} \bigr) \quad \forall \rho \in (0,1), \end{aligned}$$
(12)

where \(\operatorname{meas}(B)\) is the Lebesgue measure of a set \(B\subset \mathbb{R}^{2}\).

4.2 Numerical implementation

In our numerical implementation the measurements data \(\psi _{m}\) are synthetic, that is, generated by numerical simulations. More precisely, let \(\Omega _{p}^{\operatorname{ex}}\) be the exact plasma domain to be identified. The Dirichlet measurement data \(\psi _{m}\) on the boundary Γ are retrieved as \(\psi _{m}={\psi _{\operatorname{ex}}^{n}}_{\Gamma }\), where \(\psi _{\operatorname{ex}}^{n}\) is the solution to the Neumann problem (see (6)) in the domain \(\Omega \backslash \overline{\Omega _{p}^{\operatorname{ex}}}\)

$$ \textstyle\begin{cases} - \operatorname{div} (\gamma (x) \nabla \psi _{\operatorname{ex}}^{n}) = 0& \text{in } \Omega \backslash \overline{\Omega _{p}^{\operatorname{ex}}}, \\ \gamma (x) \nabla \psi _{\operatorname{ex}}^{n}{\mathbf{n }} = \Phi& \text{on } \Gamma , \\ \psi _{\operatorname{ex}}^{n} = 0& \text{on } \partial \Omega _{p}^{\operatorname{ex}}. \end{cases} $$
(13)

Here the exact plasma domain is used only for generating the measured data \(\psi _{m}\).

In the numerical simulation the vacuum vessel region Ω is defined by the disc with center \(x_{0}=(2, 0)\) and radius \(r=1\), i.e., \(\Omega =B(x_{0}, 1)\). The resolution of the boundary value problems (\(\mathcal{P}^{n}_{0}\)) and (\(\mathcal{P}^{d}_{0}\)) is based on a classical \(\mathbb{P}_{1}\) finite element method. The approximated solutions are computed using a uniform mesh on the boundary Ω (defined by the circle \(\mathcal{C}(x_{0}, 1)\)) with step size \(h=\pi /300\approx 0.01\). The numerical procedure is implemented using the free software FreeFem++ (see http://www.freefem.org/ff++/).

Next, we present some reconstruction results showing the efficiency of the proposed one-shot algorithm.

4.3 Numerical simulations

Here we apply our one-shot numerical algorithm for reconstructing the plasma domain in different situations. We start our numerical investigation by the identification of an unknown elliptical plasma domain from boundary measured data (see Sect. 4.3.1). After that, we will discuss the influence of some numerical parameters on the accuracy of the reconstructed results: the effect of the location in Sect. 4.3.2, the effect of the size in Sect. 4.3.3, and the effect of the shape in Sect. 4.3.4.

4.3.1 Reconstruction results

In this section, we apply our one-shot algorithm for reconstructing an elliptical plasma domain from boundary measurement. The measured data \(\psi _{m}\) is generated using the ellipse \(\Omega ^{\operatorname{ex}}_{p}=B(x_{0},r_{1},r_{2})\) with center \(x_{0}=(2, 0)\) and radii \(r_{1}=0.4\) and \(r_{2}=0.5\).

The obtained numerical results are described in Figs. 1 and 2:

Figure 1
figure 1

Isovalues (left) and 3D view (right) of the topological gradient \(\delta \mathcal{K}\)

Figure 2
figure 2

Exact (delimited by a red line) and obtained (delimited by a black line) plasma domains

− In Fig. 1, we plot the isovalues (level-set curves) of the topological gradient \(\delta \mathcal{K}\). We can note that the zone where the topological gradient g is negative (the red region) nearly coincides with the exact plasma domain \(\Omega ^{\operatorname{ex}}_{p}\) (see Fig. 2). From this figure we can observe that the most negative value of \(\delta \mathcal{K}\) is given by \(\delta _{\min }=-0.0092\), which is reached at the point \(z^{\star }=(1.9, 0)\).

− To compute the optimal value \(\rho ^{\star }\) of the parameter ρ and estimate the size of the reconstructed plasma domain, we study the variation of the error function, which allows us to deduce that the optimal value of ρ is given by \(\rho ^{\star }=0.12\), i.e., \(1-\rho ^{\star }=0.88\). According to our algorithm, the reconstructed plasma domain is defined as

$$ \Omega _{p}= \bigl\{ x\in \Omega ; \delta \mathcal{K}(x)\leq \bigl(1- \rho ^{\star }\bigr)\delta _{\min } \bigr\} ,\quad \text{with } \rho ^{\star }=0.12 \text{ and } \delta _{\min }=-0.0092.$$

− In Fig. 2, we show the exact (delimited by the red line) and reconstructed (delimited by the black line) plasma domains. We conclude here that our numerical algorithm provides an efficient reconstruction result in only one iteration.

4.3.2 Effect of the location

In this section, we discuss the effect of the plasma location on the reconstruction result. The aim is reconstructing a circular plasma \(\Omega ^{\operatorname{ex}}_{p}=z+ 0.2 B(0,1)\) located at the point \(z\in \Omega \). We present in Fig. 3 the isovalues of the topological gradient δK for different plasma locations \(z_{i}\), \(1\leq i\leq 4\). As we can observe here, the topological gradient detects the exact plasma location, i.e., the most negative region coincides with the exact plasma domain.

Figure 3
figure 3

Isovalues of the topological gradient δK showing the plasma locations

4.3.3 Effect of the size

In this section, we discuss the effect of the plasma size on the reconstruction result. We illustrate in Fig. 4 the isovalues of the topological gradient δK for different plasma sizes \(r_{i}\), \(1\leq i\leq 3\).

Figure 4
figure 4

Isovalues of δK for different plasma sizes \(r_{1}=0.3\), \(r_{2}=0.3\), and \(r_{3}=0.7\)

4.3.4 Effect of the shape

In this section, we discuss the effect of the plasma shape on the reconstruction result. The first test is devoted to an elliptical-shaped plasma. The second test is concerned with a rectangular-shaped plasma. As we can observe in Fig. 5, the topological gradient gives a good approximation of the unknown plasma in both cases.

Figure 5
figure 5

Reconstruction of elliptical- and rectangular-shaped plasma

5 Conclusion

This paper is concerned with a topology optimization problem related to the plasma magnetic equilibrium in a tokamak. Since the real-time identification of the plasma domain is a key point to access high-performance regimes, we propose a fast and accurate reconstruction algorithm (one-shot algorithm). Our approach is based on the Kohn–Vogelius formulation and the topological sensitivity analysis method. Compared to the classical geometric reconstruction algorithm, our proposed algorithm has several advantages:

  • Only one iteration is needed to identify the location of the unknown plasma domain, which significantly reduces the running times.

  • The shape of the unknown plasma domain is approximated by a level-set curve of a scalar function, which gives it more flexibility and a wide range of applications.

  • Unlike the classical geometric reconstruction algorithms such as level-set method [21, 22] or homogenization method [16], our numerical approach is not sensitive to the initial geometry. The topological sensitivity analysis method consists in creating some geometric perturbations in the initial domain.