1 Introduction

Superconducting technology has attracted particular attention in recent years owing to the significant improvement in the electromagnetic and mechanical properties of high-temperature superconductors (HTS). The high current density of HTS allows the operation of intense magnetic fields and the compact design of electromagnetic devices in advanced applications (Bruzzone et al. 2018; Hahn et al. 2019; Parkinson et al. 2017; Sykes et al. 2018; Uglietti 2019). Superconducting materials have a characteristic critical current density above which the superconductivity is destroyed. In addition, the critical current density depends on the magnetic field applied to the superconducting materials (Hu et al. 2016; Molodyk et al. 2021; Zhang et al. 2018). The non-linearity of the critical current density with respect to the magnetic field is a characteristic of type-II superconductors, which are made of alloys or impure metals and have inherent features different from those of type-I. All HTS belong to the type-II superconductors. The relationship between the critical current density and the magnetic field is important for practical applications. The magnetic field may hinder any increase in the current required by the system or may force the design of bulky systems operating at current densities significantly below the critical current. Therefore, it is necessary to design superconducting systems considering the critical current conditions to prevent a phase transition to the normal resistive state and to operate at maximum performance.

Design optimization problems can be solved using gradient-free or gradient-based methods. Gradient-free optimization methods, such as genetic algorithm, simulated annealing, and particle swarm optimization, do not require gradient information from the simulation model and have been generally applied to superconducting system design problems (Hekmati and Hekmati 2016; Jang et al. 2020; Miura et al. 2019; Shen et al. 2020). These optimization algorithms have a high probability of searching for a point near a global optimum. However, numerous iterations are required to obtain an optimal solution. In particular, a large number of overhead computations are involved in solving large-scale shapes or increasing the number of design variables. Gradient-based methods use the sensitivity information obtained by calculating the derivatives of the objective functions with respect to the design variables. The main advantage of this approach is that it can converge to an optimal solution with fewer function computations than those in the gradient-free approach (Izui et al. 2015; Li et al. 2019). Therefore, gradient-based methods may perform more efficiently than gradient-free methods in a shorter time period and with minimum cost for design problems in complex and large-scale applications.

Design sensitivities can be obtained by utilizing either the finite difference method or analytic differentiation method. The finite difference method computes the sensitivities by approximating derivatives with finite differences. Therefore, its accuracy depends on the size of the perturbation step. The analytic differentiation method can be divided into discrete and continuum methods (Choi and Kim 2004). The discrete method involves the derivative of the discretized system equation, which is obtained using an applied numerical analysis method. Optimization schemes using the discrete approach were introduced to design superconducting systems operating under critical current conditions (Byun et al. 2003, 2004; Kang et al. 2003; Lee et al. 2004; Park et al. 2003). In this approach, although the design sensitivities are more accurate than those utilizing the finite differential approach, the computation is still significantly expensive because of the mesh sensitivity. For the continuum method, the material-derivative concept of continuum mechanics is used to derive the design sensitivity (Kim et al. 2001; Wang and Li 2013; Xia et al. 2011). Continuum sensitivity is expressed in a simple analytical form of the surface integral on the design boundary. The continuum approach facilitates to determine sensitivity more accurately and efficiently, regardless of the discrete condition of the numerical method. The continuum method has already been applied to various design problems of electromagnetic systems, including electrostatic systems, magnetostatic systems, eddy current systems, and DC conductor systems (Cheon et al. 2018; Lee et al. 2018; Park 2019; Seo and Park 2019; Seo et al. 2018). In the continuum sensitivity problem of magnetostatic systems, the source current density was regarded as a constant value (Park 2019; Seo et al. 2018). For the efficient use of superconducting materials with high input currents, it is necessary to design superconducting systems by considering critical current conditions. Therefore, the conventional sensitivity of magnetostatic systems is not suitable for the design optimization of superconducting systems in which the input current depends on the applied magnetic field.

In this study, the design sensitivity of the superconducting system was derived using the continuum method, and a design optimization was constructed based on the continuum sensitivity. The superconducting system was intended to operate at critical current densities, which are expressed as a function of the magnitude and orientation of the magnetic field applied to the superconducting material. The design sensitivity of the superconducting system was derived using the material derivative concept of continuum mechanics. In addition, an adjoint variable technique was introduced to explicitly express sensitivity in terms of the design velocity field. The derived design sensitivity was applied to an optimization scheme and was used to obtain the design velocity field that changes the material shape to optimize system performance. The shape variation was expressed using the level set method. The proposed optimization method was verified using numerical examples.

2 Continuum sensitivity of superconducting systems under critical current densities

In this section, we present a general three-dimensional sensitivity to shape variations of superconducting systems under critical current conditions. The design sensitivity was derived using a continuum method based on the material derivative concept of continuum mechanics.

2.1 Definition of design problem

Fig. 1
figure 1

Superconducting system for describing the shape design of the interface between superconducting material and magnetic material

The superconducting system described for designing the shape of the superconducting material is shown in Fig. 1. The system domain \({\Omega }\) consists of domains \({\Omega}_1\) and \({\Omega}_2\), which are referred to as a magnetic material with a reluctivity \(\nu _1\) and a superconducting material with reluctivity \(\nu _2\) and current density J\(_2\), respectively. The system materials are assumed to have linear magnetic properties. In addition, the superconducting system operates under critical current conditions. Therefore, the operating current density depends on the magnitude and orientation of the magnetic field, B\(_c\) and \(\theta _c\), which makes the critical current density the lowest in the superconducting material. The shape of the superconducting material is represented by the interface \(\gamma\) between \({\Omega}_1\) and \({\Omega}_2\). The domain \({\Omega}_1\) has the outer boundary \({\Gamma}\), which consists of the Dirichlet boundary \({\Gamma}^0\) and Neumann boundary \({\Gamma}^1\). The unit vector n is the outward normal vector on \(\gamma\) and \({\Gamma}\).

A general objective function for designing a superconducting system is defined as follows:

$$\begin{aligned} \begin{aligned} F =&\int _{{\Omega}} g_1({\mathbf{A}} _1,{\mathbf{B}} ({\mathbf{A}} _1)) m_p \, {\text{d}}{\Omega} \\&+ \int _{{\Omega}} g_2({\mathbf{A}} _2,{\mathbf{B}} ({\mathbf{A}}_2)) m_p \, {\text{d}}{\Omega} \end{aligned} \end{aligned}$$
(1)

where g is a continuously differentiable function with respect to its arguments, A is the magnetic vector potential, and B( ) is the curl operator, where B(A) is the magnetic flux density. Subscripts 1 and 2 indicate that the functions and variables belong to \({\Omega}_1\) and \({\Omega}_2\), respectively. The characteristic function \(m_p\) is expressed as follows:

$$\begin{aligned} m_p \equiv \left\{ \begin{array}{cc} 1 \quad &{} {\mathbf{x}} \in {\Omega}_p \\ 0 \quad &{} {\mathbf{x}} \notin {\Omega}_p \end{array}\right. \end{aligned}$$
(2)

where \({\Omega}_p\) is the integral domain of the objective function.

2.2 Variational formulation

The governing differential equations for state variables A\(_1\) and A\(_2\) in the superconducting system are as follows:

$$\begin{aligned}&\nabla \times \nu _1 \nabla \times {\mathbf{A}}_1 = \mathbf{0} \quad {\mathrm{in}} \, {\Omega}_1 \end{aligned}$$
(3)
$$\begin{aligned}&\quad \nabla \times \nu _2 \nabla \times {\mathbf{A}}_2 = {\mathbf{J}}_2(B_c^2 , \theta _c) \quad {\mathrm{in}} \, {\Omega}_2 \end{aligned}$$
(4)

These equations have a unique solution for A, which is obtained by applying the outer boundary conditions of the homogeneous Dirichlet and homogeneous Neumann boundary conditions to \({\Gamma}^0\) and \({\Gamma}^1\), respectively.

$$\begin{aligned}&{\mathbf{A}}_1 = \mathbf{0} \quad {\mathrm{in}} \, {\Gamma}^0 \end{aligned}$$
(5)
$$\begin{aligned}&\quad \frac{\partial {\mathbf{A}}_1}{\partial n} = \mathbf{0} \quad {\mathrm{in}} \, {\Gamma}^1 \end{aligned}$$
(6)

If the superconducting and magnetic materials have different values of reluctivity, the magnetic field B has a discontinuity at \(\gamma\).

$$\begin{aligned} {\mathbf{n}} \times \nu _1 {\mathbf{B}} ({\mathbf{A}}_1) = {\mathbf{n}} \times \nu _2 {\mathbf{B}} ({\mathbf{A}}_2) \quad {\mathrm{on}} \, \gamma \end{aligned}$$
(7)

The variational state equation can be derived using the variation method of the virtual work principle (Sabonnadiere and Coulomb 1987). The differential state Eq. (3) and (4) are multiplied by arbitrary virtual vector potentials \(\mathbf{\bar{A}}_1\) and \(\mathbf{\bar{A}}_2\), respectively, and are integrated over the system domain. Thereafter, using the boundary and interface conditions of the magnetic vector potential and field given in (5), (6), and (7), we can obtain a variational state equation in an integral form with the first-order derivatives of A as follows:

$$\begin{aligned}&\int _{{\Omega}_1} \nu _1 {\mathbf{B}} ({\mathbf{A}}_1) \cdot {\mathbf{B}} (\bar{\mathbf{A}}_1) \, {\text{d}}{\Omega} + \int _{{\Omega}_2} \nu _2 {\mathbf{B}} ({\mathbf{A}}_2) \cdot {\mathbf{B}} (\bar{\mathbf{A}}_2) \, {\text{d}}{\Omega} \nonumber \\&= \int _{{\Omega}_2} {\mathbf{J}}_2(B_c^2 , \theta _c) \cdot \bar{\mathbf{A}}_2 \, {\text{d}}{\Omega} \qquad \forall \bar{\mathbf{A}}_1 , \bar{\mathbf{A}}_2 \in {\Phi } \end{aligned}$$
(8)

where \({\Phi}\) is the space of the admissible vector potential (Adams and Fournier 2003). This variational equation is derived from a magnetostatic system composed of linear magnetic materials with constant values of reluctivity and driven by a field-dependent source current. To avoid the derivative of the current density in the source term while deriving the sensitivity, we divide (8) by the magnitude of the current density \(J_2(B_c^2 , \theta _c)\).

$$\begin{aligned}&\int _{{\Omega}_1} \nu _{J 1}(B_c^2 , \theta _c) {\mathbf{B}} ({\mathbf{A}}_1) \cdot {\mathbf{B}} (\bar{\mathbf{A}}_1) \, {\text{d}}{\Omega} \nonumber \\&+ \int _{{\Omega}_2} \nu _{J 2}(B_c^2 , \theta _c) {\mathbf{B}} ({\mathbf{A}}_2) \cdot {\mathbf{B}} (\bar{\mathbf{A}}_2) \, {\text{d}}{\Omega} \nonumber \\&= \int _{{\Omega}_2} {\mathbf{j}}_2 \cdot \bar{\mathbf{A}}_2 \, {\text{d}}{\Omega} \qquad \forall \bar{\mathbf{A}}_1 , \bar{\mathbf{A}}_2 \in {\Phi} \end{aligned}$$
(9)

where

$$\begin{aligned} \nu _J(B_c^2 , \theta _c) \equiv \frac{\nu }{J_2(B_c^2 , \theta _c)} \end{aligned}$$
(10)

This variational equation indicates that the magnetostatic system is transformed from a linear magnetic system to a field-dependent nonlinear magnetic system and is given a unit current density. Equation (9) can be rewritten with an energy form \(a(\nu _J(B_c^2 , \theta _c), {\mathbf{A}} , \mathbf{\bar{A}})\) and a source form \(l(\mathbf{\bar{A}})\) as follows:

$$\begin{aligned} a(\nu _J(B_c^2 , \theta _c), {\mathbf{A}} , \mathbf{\bar{A}}) = l(\mathbf{\bar{A}}) \end{aligned}$$
(11)

where

$$\begin{aligned} a(\nu _J(B_c^2 , \theta _c),&{\mathbf{A}} , \bar{\mathbf{A}}) \equiv \int _{{\Omega}_1} \nu _{J 1}(B_c^2 , \theta _c) {\mathbf{B}} ({\mathbf{A}}_1) \cdot {\mathbf{B}} (\bar{\mathbf{A}}_1) \, {\text{d}}{\Omega} \nonumber \\&+ \int _{{\Omega}_2} \nu _{J 2}(B_c^2 , \theta _c) {\mathbf{B}} ({\mathbf{A}}_2) \cdot {\mathbf{B}} (\bar{\mathbf{A}}_2) \, {\text{d}}{\Omega} \end{aligned}$$
(12)
$$\begin{aligned} l(\mathbf{\bar{A}}) \equiv \int _{{\Omega}_2} {\mathbf{j}}_2 \cdot \mathbf{\bar{A}}_2 \, {\text{d}}{\Omega} \end{aligned}$$
(13)

The variational state equation is treated as an implicit equality constraint in this design problem. This implies that the critical current condition is included in the constraint when applied to the state equation.

2.3 Adjoint variable method

An adjoint variable technique is introduced to explicitly express sensitivity in terms of the design variables. The adjoint equation is expressed as follows:

$$\begin{aligned}&\int _{{\Omega}_1} {\boldsymbol{\upnu}}_{J \kappa 1} \cdot {\mathbf{B}} ({\boldsymbol{\uplambda}}_1) \cdot {\mathbf{B}} (\bar{\boldsymbol{\uplambda }}_1) \, {\text{d}}{\Omega} \nonumber \\&+ \int _{{\Omega}_2} {\boldsymbol{\upnu}}_{J \kappa 2} \cdot {\mathbf{B}} ({\boldsymbol{\uplambda}}_2) \cdot {\mathbf{B}} (\boldsymbol{\bar{\uplambda}}_2) \, {\text{d}}{\Omega} \nonumber \\&= \int _{{\Omega1}} \left( \mathbf{g} _{{\mathbf{A}}1} \cdot {\boldsymbol{\bar{\uplambda}}}_1 + {\mathbf{g}}_{{\mathbf{B}}1} \cdot {{\mathbf{B}}} ({\boldsymbol{\bar{\uplambda}}}_1)\right) m_p \, {\text{d}}{\Omega} \nonumber \\&+ \int _{{\Omega2}} \left( \mathbf{g} _{{\mathbf{A}}2} \cdot {\boldsymbol{\bar{\uplambda}}}_2 + \mathbf{g} _{{\mathbf{B}}2} \cdot {\mathbf{B}} (\boldsymbol{\bar{\uplambda }}_2)\right) m_p \, \\& {\text{d}}{\Omega} \nonumber \qquad \forall {\boldsymbol{\bar{\uplambda}}}_1 , {\boldsymbol{\bar{\uplambda}}}_2 \in {\Phi} \end{aligned}$$
(14)

where the notations \(\boldsymbol{\uplambda}\) and \(\boldsymbol{\bar{\uplambda }}\) describe the adjoint variable and virtual potential, respectively. \({\boldsymbol{\upnu}}_{J \kappa}\) is defined as a symmetric tensor, which can be expressed as follows:

$$\begin{aligned} {\boldsymbol{\upnu}}_{J \kappa } \equiv \nu _J {\mathbf{I}} + 2 \kappa {\mathbf{B}} ({\mathbf{A}} ) {\mathbf{B}} ({\mathbf{A}} )^{\mathrm{T}} \end{aligned}$$
(15)

where

$$\begin{aligned} \kappa \equiv \frac{\partial \nu _J}{\partial B_c^2} \frac{\partial B_c^2}{\partial B^2} + \frac{\partial \nu _J}{\partial \theta _c} \! \left( \frac{\partial \theta _c}{\partial B_{c \parallel }^2} \frac{\partial B_{c \parallel }^2}{\partial B^2} + \frac{\partial \theta _c}{\partial B_{c \perp }^2} \frac{\partial B_{c \perp }^2}{\partial B^2}\right) \end{aligned}$$
(16)

I is the identity tensor, B is the magnitude of the magnetic field, and B\(_{c \parallel }\) and B\(_{c \perp }\) are the parallel and perpendicular components of the magnetic field, respectively. The parameter \(\kappa\) is derived from the partial time derivative of \(\nu _J\), which is detailed in the following subsection, and it includes the sensitivities to changes in the critical current density with respect to changes in the magnitude and orientation of the magnetic field. gA and gB denote the derivatives of g in (1) with respect to A and B, respectively.

$$\begin{aligned}&{\mathbf{g}}_{{\mathbf{A}}} \equiv \frac{\partial g}{\partial {\mathbf{A}} } = \left[ \frac{\partial g}{\partial A_x}, \frac{\partial g}{\partial A_y}, \frac{\partial g}{\partial A_z} \right] ^\mathrm {T} \end{aligned}$$
(17)
$$\begin{aligned}&\quad {\mathbf{g}}_{{\mathbf{B}}} \equiv \frac{\partial g}{\partial {\mathbf{B}} } = \left[ \frac{\partial g}{\partial B_x}, \frac{\partial g}{\partial B_y}, \frac{\partial g}{\partial B_z} \right] ^\mathrm {T} \end{aligned}$$
(18)

Equation (14) represents an adjoint system with the adjoint vector potential \({\boldsymbol{\uplambda}}\), where the material property is described by \({\boldsymbol{\upnu}}_{J \kappa }\) corresponding to the magnetic reluctivity of a magnetostatic system, and the sources are given by \({\mathbf{g}}_{{\mathbf{A}}} m_p\) and \({\mathbf{g}}_{{\mathbf{B}}} m_p\) corresponding to the current density and permanent magnetization, respectively.

2.4 Derivation of continuum sensitivity

Objective function (1) has an implicit dependency on state variable A, which is obtained from the state equation. In this continuum approach, the Lagrange multiplier method was employed for the implicit equality constraint of the variational state equation. An augmented objective function G is defined by adding the variational state Eq. (11) to the objective function (1).

$$\begin{aligned} G = F + l({\mathbf{\bar{A}}}) - a(\nu _J(B_c^2 , \theta _c), {\mathbf{A}} , {\mathbf{\bar{A}}}) \qquad {\mathbf{\bar{A}}} \in {\Phi} \end{aligned}$$
(19)

This function G can be regarded as a domain integral of a function h(\(\nu _J(B_c^2 , \theta _c), {\mathbf{A}} , {\mathbf{\bar{A}}}\)) over \(\Omega\), as follows:

$$\begin{aligned} G = \int _{{\Omega}} h(\nu _J(B_c^2 , \theta _c), {\mathbf{A}} , {\mathbf{\bar{A}}}) \, {\text{d}}{\Omega} \qquad {\mathbf{\bar{A}}} \in {\Phi} \end{aligned}$$
(20)

The design sensitivity is derived by taking the material derivative of the augmented objective function. By applying the material derivative formula to (20), \(\dot{G}\) can be obtained as the sum of the domain and boundary integrals as follows (Haug et al. 1986):

$$\begin{aligned} \dot{G} =&\int _{{\Omega}} h'(\nu _J(B_c^2 , \theta _c), {\mathbf{A}} , \bar{{\mathbf{A}}}) \, {\text{d}}{\Omega} \nonumber \\&- \int _{{\Gamma}} h(\nu _J(B_c^2 , \theta _c), {\mathbf{A}} , \bar{{\mathbf{A}}}) V_n \, d{\Gamma} \qquad \bar{{\mathbf{A}}} \in {\Phi} \end{aligned}$$
(21)

where \(V_n\) is the normal component of the velocity vector V on \(\gamma\). The partial derivatives of A and \({\mathbf{\bar{A}}}\) with respect to time t are obtained from the material derivative expression (Park 2019).

$$\begin{aligned}&{\mathbf{A}} ' = \dot{{\mathbf{A}}} - {\mathbf{V}} \cdot \nabla {\mathbf{A}} \end{aligned}$$
(22)
$$\begin{aligned}&\quad {\mathbf{\bar{A}}}' = {\mathbf{\dot{\bar{A}}}} - {\mathbf{V}} \cdot \nabla {\mathbf{\bar{A}}} \end{aligned}$$
(23)

The partial time derivative of \(\nu _J(B_c^2, \theta _c )\) can be achieved as follows:

$$\begin{aligned} \nu _J'(B_c^2, \theta _c )&= \frac{\partial \nu _J}{\partial B_c^2} \frac{\partial B_c^2}{\partial B^2} \frac{\partial B^2}{\partial t} \nonumber \\&\quad + \frac{\partial \nu _J}{\partial \theta _c} \! \left( \frac{\partial \theta _c}{\partial B_{c \parallel }^2} \frac{\partial B_{c \parallel }^2}{\partial B^2} + \frac{\partial \theta _c}{\partial B_{c \perp }^2} \frac{\partial B_{c \perp }^2}{\partial B^2}\right) \! \frac{\partial B^2}{\partial t} \nonumber \\&= 2 \kappa {\mathbf{B}} ({\mathbf{A}} ) \cdot {\mathbf{B}} ({\mathbf{A}}') \end{aligned}$$
(24)

where \(\kappa\) is defined in (16).

Using the adjoint equations, variational identities, and boundary conditions, a formula for the design sensitivity can be derived in an analytical form of a surface integral on the interface between the superconducting and magnetic materials as follows:

$$\begin{aligned} \dot{G}&= \int _{{\Gamma}} \left[ \left( \nu _{J2} - \nu _{J1} \right) {\mathbf{B}} ({\mathbf{A}} _1) \cdot {\mathbf{B}} (\mathbf{\uplambda }_2) \right. \nonumber \\&\qquad - 2 \kappa \left( {\mathbf{B}} ({\mathbf{A}} _2) - {\mathbf{B}} ({\mathbf{A}} _1) \right) \cdot {\mathbf{B}} ({\mathbf{A}} _2) \ {\mathbf{B}} ({\mathbf{A}} _2) \cdot {\mathbf{B}} ({\boldsymbol{\uplambda}}_2) \nonumber \\&\qquad \left. - \mathbf{j} _2 \cdot {\boldsymbol{\uplambda}}_2 \right] V_n \, d{\Gamma} \end{aligned}$$
(25)

The design sensitivity of the superconducting system provides information about the variation rate of the system performance with respect to the velocity field, \(V_n\). The interface variation causes changes in the material properties, source conditions, and magnetic fields on both sides. The first term of the sensitivity describes the influence of the magnetic permeability exchange on the system performance. The second term results from a change in the magnetic field, which affects the current density in the superconducting material. The third term indicates the effect of changes in the current density region. Moreover, each integrand has \({\boldsymbol{\uplambda}}\) or \(\kappa\) related to the sensitivity of the current density with respect to the magnetic field. Therefore, the dependence of the design sensitivity on the critical current condition is confirmed.

3 Design optimization based on continuum sensitivity analysis

An optimization scheme using the derived continuum sensitivity for designing superconducting systems is presented in this section. The shape of the superconducting materials evolves with the design velocity field obtained from the design sensitivity. The shape evolution was expressed using the level set method.

3.1 Optimization scheme

Fig. 2
figure 2

Flowchart of the design optimization based on the continuum sensitivity analysis

The optimal design presented in this paper is a simulation-based design procedure that improves the performance of the superconducting system by evolving the design variables of the superconducting material shapes. A schematic of the design procedure is presented in Fig. 2. The flow chart additionally indicates the tools used in each procedure during the design optimization.

The definition of the optimization problem at the beginning of the procedure is important to attain a successful design. In this step, the objective function was determined to represent the system performance numerically and apply to the sensitivity evaluation. Thereafter, we created the initial geometry of the superconducting system and set the design variables. The governing equation of the superconducting system was employed with the applied magnetic permeability and critical current conditions. The numerical model was completed using the boundary conditions for the state variables.

After specifying the design problem, an optimization iteration was performed. A numerical analysis of the superconducting system was conducted using a numerical method. In this study, the finite element method (FEM) was used to solve partial differential equations. The results of the system analysis were used to evaluate the objective function. When it was confirmed that the objective function does not converge to a solution, a sensitivity analysis was performed. To calculate the design sensitivity, we analyzed the adjoint system by solving the adjoint equation in (14) using the FEM. In this numerical analysis, calculations of the material property \({\boldsymbol{\upnu}}_{J \kappa }\) and the sources \({\mathbf{g}}_{{\mathbf{A}}} m_p\) and \({\mathbf{g}}_{{\mathbf{B}}} m_p\) are involved, in which the critical current condition and the objective function are used. Thereafter, the design velocity field \(V_n\) was obtained such that the shape of the superconducting material evolves and the system performance is optimized. Design optimization requires a geometry modeling technique for expressing the shape variation. In this study, we introduced a level set method to express the shape of the superconducting material that evolves according to \(V_n\). After the shape deformation, the finite element mesh is regenerated to match the material interface with the boundaries of finite elements. This technique is called the adaptive level set method and allows the interface to clearly distinguish between different materials (Lee et al. 2014; Park 2019). The numerical analysis of the superconducting system is performed again, and the iterative procedure is continued until the convergence criterion is attained.

3.2 Design velocity field

The design sensitivity in (25) is expressed in terms of the design velocity field \(V_n\). In other words, the sensitivity indicates the variation rate of the objective function owing to \(V_n\). For instance, when \(V_n\) is determined such that the sensitivity becomes negative, the shape of the superconducting materials evolves such that the objective function is reduced. An approach to determine the function \(V_n\) for an optimization problem is to make the integrand of the design sensitivity a perfect square.

$$\begin{aligned} V_n =&k_\mathrm {opt} \left[ \left( \nu _{J2} - \nu _{J1} \right) {\mathbf{B}} ({\mathbf{A}}_1) \cdot {\mathbf{B}} (\boldsymbol{\uplambda}_2) \right. \nonumber \\&- 2 \kappa \left( {\mathbf{B}} ({\mathbf{A}}_2) - {\mathbf{B}} ({\mathbf{A}}_1) \right) \cdot {\mathbf{B}} ({\mathbf{A}}_2) \ {\mathbf{B}} ({\mathbf{A}}_2) \cdot {\mathbf{B}} (\boldsymbol{\uplambda}_2) \nonumber \\&\left. - {\mathbf{j}} _2 \cdot {\boldsymbol{\uplambda}}_2 \right] \end{aligned}$$
(26)

where the coefficient \(k_\mathrm {opt}\) determines the sign of the design sensitivity in (25) and is assigned -1 or 1, respectively, to minimize or maximize the objective function. When a material forming the design interface \(\gamma\) with the superconducting material is set to have the same magnetic permeability as that of the superconducting material, the first and second terms of the design sensitivity in (25) disappear. In this case, the design velocity field can be simply represented by the current density and adjoint variable as follows:

$$\begin{aligned} V_n = -k_\mathrm{opt} \, {\mathbf{j}}_2 \cdot {\boldsymbol{\uplambda}}_2 \end{aligned}$$
(27)

The shape of the superconducting material is evolved based on \(k_\mathrm {opt}\) and materialized using a geometric modeling method for the design optimization.

3.3 Level set method

The level set method is a geometric modeling tool that provides easy and efficient schemes for expressing shape variations (Deaton and Grandhi 2014; van Dijk et al. 2013; Lin et al. 2021; Liu et al. 2014). The level set method was applied to design optimization for the numerical analysis of superconducting material shapes.

Fig. 3
figure 3

Level set function representing the shape of a superconducting system that changes according to the design velocity

The surface of the superconducting material \(\gamma\) is implicitly represented using a level set function \(\phi\).

$$\begin{aligned} \gamma = \left\{ {\mathbf{x}} \, | \, \phi ({\mathbf{x}}) = 0 \right\} \end{aligned}$$
(28)

where x=(x,y,z). This closed curve is called the zero level set of \(\phi\). Figure 3 shows an illustration of the level set function representing the geometry a superconducting system. The level set function \(\phi\) is assumed to have negative values inside the superconducting material and positive values outside it.

The shape variation of the superconducting material can also be expressed using the level set function as a function of time t, and the zero-level set is

$$\begin{aligned} \gamma = \left\{ ( {\mathbf{x}} (t) , t ) \, | \, \phi ( {\mathbf{x}} (t) , t ) = 0 \right\} \end{aligned}$$
(29)

The level set function \(\phi\) satisfies the level set equation derived as the total derivative of \(\phi\) with respect to t.

$$\begin{aligned} \frac{\partial \phi }{\partial t} + V_n \left| \nabla \phi \right| = 0 \end{aligned}$$
(30)

where \(V_n\) denotes the normal component of the interface velocity as shown in Fig. 3. By considering that the surface shape changes with respect to \(V_n\), the level set equation can be applied to design optimization. The design velocity in (26) is substituted into the level set equation in (30). The level set equation, a type of the first-order Hamilton–Jacobi equation, is then solved numerically using the FEM. The solution \(\phi\) provides a change in the shape of the superconducting material to optimize system performance.

4 Numerical examples

The design optimization method based on the continuum sensitivity analysis was applied to the design problems of superconducting systems. The design problem of infinite solenoids was intended to validate the design sensitivity of the superconducting systems derived in this study. Additionally, in the design problem of the magnetic resonance imaging (MRI) solenoid, the intrinsic ability of the derived sensitivity to design the superconducting system was compared with that of the sensitivity for magnetostatic systems with constant current density.

4.1 Infinite superconducting solenoid

Fig. 4
figure 4

Initial configuration of infinite superconducting solenoid with magnetic material inside

Fig. 5
figure 5

Variation of coil shape and magnetic field in the design optimization of infinite superconducting solenoid with magnetic material inside: Design time of a 0 s, b 1 s, c \(1 \times 10^2\) s, and d \(2 \times 10^4\) s

Fig. 6
figure 6

Objective function with respect to the design time corresponding to infinite superconducting solenoid with magnetic material inside shown in Fig. 5

In this example, we considered the shape design for two types of two-dimensional (2D) axisymmetric infinite solenoids in which superconducting coils were used. One was assumed to have a different magnetic permeability between the superconducting coil and the material inside. The other was set to the same permeability for both materials.

The integral domain of the objective function and initial geometry of an infinite solenoid are shown in Fig. 4, where the superconducting coil and magnetic material have different values of permeability. The relative permeability of the magnetic material was set to 2. The superconducting coil is regarded to be wound by an HTS and modeled with a relative permeability of 1. The current density in the superconducting coil is given according to a critical current condition, where the critical current density depends on the magnitude and orientation of the magnetic field (Ainslie et al. 2010; Gömöry 2006).

$$\begin{aligned} J(B_c^2,\theta _c) = \frac{J_{c0}}{1+\sqrt{\frac{B_c^2 \left( k^2 \cos ^2 \theta _c + \sin ^2 \theta _c \right) }{B_0^2}}} \end{aligned}$$
(31)

where \(J_{c0}\) is the zero-field critical current density, k is the anisotropy factor, and \(B_0\) is the characteristic magnetic field. Each parameter is given by \(J_{c0} = 10^8\) A/m\(^2\), \(k = 0.186\), and \(B_0 = 0.653\) T. The orientation angle \(\theta _c\) is defined with respect to the z-axis. The design objective was to distribute a uniform field in the domain \({\Omega}_p\). The objective function defined to be minimized in the design optimization is as follows:

$$\begin{aligned} F = \int _{{\Omega}} \left( {\mathbf{B}} - {\mathbf{B}}_{\mathrm{obj}} \right) ^2 m_p \, {\text{d}}{\Omega} \end{aligned}$$
(32)

where \({\mathbf{B}}_{\mathrm{obj}}\) is the target magnetic field and is set to 3 T in the z-direction. The optimal shape of the infinite solenoid can be analytically predicted by calculating the current density in (31) and using Ampere’s law. It is evident that the optimal coil has a hollow cylindrical shape. As a design problem to validate the derived sensitivity, the initial geometry of the solenoid was artificially set to deviate from the solution. The design variable was defined as the shape of the inner surface of the superconducting coil. The shape of the outer surface of the coil was fixed. A numerical model of the superconducting solenoid was completed by employing the governing equations in (3) and (4) with the given material and source properties as well as the boundary conditions shown in Fig. 4.

The iterative design optimization procedure was performed as described in Sect. 3.1. The numerical analysis was conducted using the FEM software package COMSOL Multiphysics. In the sensitivity analysis, \(\kappa\) in (16) was obtained using the function given in (31) as the critical current density. The adjoint sources \({\mathbf{g}}_{{\mathbf{A}}}\) in (17) and \({\mathbf{g}}_{{\mathbf{B}}}\) in (18) were calculated by substituting the objective function in (32). The design sensitivity was calculated from the solution of the state and adjoint equations. The design velocity field \(V_n\) in the design sensitivity was determined as (26) with \(k_\mathrm {opt} = -1\) to minimize the objective function. The computed \(V_n\) was applied to the level set equation in (30).

Figure 5 shows the changes in the shape of the superconducting coil and the magnetic field distribution in the design optimization. As expected, the coil finally attained the optimal shape of a hollow cylinder. The solenoid had a coil thickness of approximately 0.017 m. The magnetic field was also formed in the desired distribution with a magnitude of 3 T inside the solenoid. The current density of the superconducting coil was adjusted each time the coil shape varied during the optimization process. In the optimal configuration, the coil had a current density of approximately \(7\times 10^7\) A/m2. It was confirmed that the design result was consistent with the analytic solution satisfying Ampere’s law with the given critical current condition in (31). The variation of the objective function presented in Fig. 6 numerically demonstrated that the design of the superconducting solenoid decreased the objective function and improved the system performance.

In the following design, shape optimization was performed for another infinite superconducting solenoid in which the materials on both sides of the design interface had the same permeability. Fig. 7 shows the initial configuration of a solenoid consisting of a superconducting coil and air inside. The relative permeabilities of the two materials were set to 1. The current density of the superconducting coil follows the current condition given in (31). The objective function, design variable, governing equations, and boundary conditions were provided with the same specifications as those in the previous design problem. In the sensitivity analysis and shape deformation, as the superconducting coil and air had the same magnetic permeability values, the design velocity field \(V_n\) was presented as (27) with \(k_\mathrm {opt}=-1\).

Fig. 7
figure 7

Initial configuration of infinite superconducting solenoid with air inside

Fig. 8
figure 8

Variation of coil shape and magnetic field in the design optimization of infinite superconducting solenoid with air inside: Design time of a 0 s, b 1 s, c \(1 \times 10^2\) s, and d \(2 \times 10^4\) s

Fig. 9
figure 9

Objective function with respect to the design time corresponding to infinite superconducting solenoid with air inside shown in Fig. 8

Figure 8 shows the variation in the shape of the coil and magnetic field during the optimization process. The shape of the solenoid becomes a hollow cylinder, consistent with previous design results. However, the thickness of the coil increased owing to the decrease in the permeability of the material inside the solenoid. The superconducting coil had a thickness of approximately 0.044 m, and the magnetic field was 3 T inside the solenoid. As the magnitude of the magnetic field in the superconducting coil was larger than that in the previous design, the applied current density decreased to \(5.39 \times 10^7\) A/m\(^2\). These design results were in agreement with the analytic solution. Further, the objective function converges to a minimum value through design optimization, as shown in Fig. 9.

4.2 MRI solenoid

In this example, the optimal design of a 2D axisymmetric MRI solenoid was performed for each case in which a superconductor and a normal conductor were applied. The continuum sensitivity derived in this study was used for the design optimization of the superconducting solenoid. The design results were compared with those obtained through the sensitivity analysis of the magnetostatic system with a normal conducting coil and constant current density.

Fig. 10
figure 10

Initial configuration of MRI solenoid

Figure 10 shows the integral domain of the objective function and the initial geometry of the MRI solenoid. The design objective was to obtain a uniform magnetic field of 2 T in \({\Omega}_p\). The objective function was represented by (32) with \({\mathbf{B}}_{\mathrm{obj}} = 2{\mathbf{z}}\) and was minimized through optimal design. The surface of the superconducting coil was considered as the design variable. In this study, there were no additional constraints related to the artificial shape, such as position, size, or volume.

In the superconducting solenoid, the coil had the same material and source properties as those of the previous design problem for an infinite superconducting solenoid. The design optimization was also performed similar to that in the previous example. As the relative permeability of the coil and air is set to 1, \(V_n\) in the design sensitivity and level set equation can be given as (27) with \(k_\mathrm {opt} = -1\).

Fig. 11
figure 11

Variation of coil shape and magnetic field in the design optimization of MRI solenoid with superconducting coil: Design time of a 0 s, b 10 s, c \(5 \times 10^2\) s, d \(1 \times 10^4\) s, e \(1.8 \times 10^4\) s, and f \(8 \times 10^4\) s

Fig. 12
figure 12

Objective function with respect to the design time corresponding to MRI solenoid with superconducting coil shown in Fig. 11

Figure 11 shows the change in the shape of the coil and field distribution of the superconducting solenoid in the design optimization. During initial optimization iterations, the volume of the superconducting coil increased rapidly, and the magnitude of the magnetic field in \({\Omega}_p\) approached 2 T. Subsequently, the shape of the coil evolved to improve the homogeneity of the magnetic field. Eventually, the coil split into two parts to form another topology. Figure 12 shows that these shape variations cause the objective function to decrease.

Fig. 13
figure 13

Variation of coil shape and magnetic field in the design optimization of MRI solenoid with normal conducting coil: Design time of a 0 s, b 3 s, c \(4 \times 10^2\) s, d \(5 \times 10^3\) s, e \(2 \times 10^5\) s, and f \(2.4 \times 10^5\) s

In addition to the superconducting solenoid, an optimal design of the MRI solenoid with a normal conducting coil was performed. This design problem is identical to the previous MRI solenoid design, except for the current condition of the normal conducting coil. The current density was set to a constant value of \(3.01 \times 10^7\) A/m\(^2\), which was applied to the optimal coil of the superconducting MRI solenoid as a critical current density. During the optimization process, the design sensitivity was calculated using the sensitivity formula derived for magnetostatic systems with a constant current density (Park 2019).

$$\begin{aligned} \dot{G} = \int _{{\Gamma}} \left[ \left( \nu _{2} - \nu _{1} \right) {\mathbf{B}} ({\mathbf{A}}_1) \cdot {\mathbf{B}} ({\boldsymbol{\uplambda}}_2) - {\mathbf{J}}_2 \cdot {\boldsymbol{\uplambda}}_2 \right] V_n \, d{\Gamma} \end{aligned}$$
(33)

The adjoint variable \({\boldsymbol{\uplambda}}\) was obtained by solving the adjoint equation as follows:

$$\begin{aligned}&\int _{{\Omega}_1} \nu _1 {\mathbf{B}} ({\boldsymbol{\uplambda}}_1) \cdot {\mathbf{B}} ({\boldsymbol{\bar{\uplambda}}}_1) \, {\text{d}}{\Omega} + \int_{{\Omega}_2} \nu _2 {\mathbf{B}} ({\boldsymbol{\uplambda}}_2) \cdot {\mathbf{B}} ({\boldsymbol{\bar{\uplambda}}}_2) \, {\text{d}}{\Omega} \nonumber \\&= \int _{{\Omega}_1} \left({\mathbf{g}}_{{\mathbf{A}}}{_1} \cdot {\boldsymbol{\bar{\uplambda}}}_1 + {\mathbf{g}}_{{\mathbf{B}}_1} \cdot {\mathbf{B}} ({\boldsymbol{\bar{\uplambda}}}_1)\right) m_p \, {\text{d}}{\Omega} \nonumber \\&+ \int _{{\Omega}_2} \left( {\mathbf{g}}_{{\mathbf{A}}}{_2} \cdot {\boldsymbol{\bar{\uplambda}}}_2 + {\mathbf{g}}_{{\mathbf{B}}}{_2} \cdot {\mathbf{B}} ({\boldsymbol{\bar{\uplambda}}}_2)\right) m_p \, {\text{d}}{\Omega} \nonumber \qquad \forall {\boldsymbol{\bar{\uplambda}}}_1 , {\boldsymbol{\bar{\uplambda}}}_2 \in {\Phi} \end{aligned}$$
(34)

In this design problem, with the same permeability setup of the normal conducting coil and air, the design velocity field can be presented as follows:

$$\begin{aligned} V_n = k_{\mathrm{opt}} \, {\mathbf{J}}_2 \cdot {\boldsymbol{\uplambda}}_2 \end{aligned}$$
(35)

where \(k_\mathrm {opt}\) was set to −1 to minimize the objective function.

Fig. 14
figure 14

Objective function with respect to the design time corresponding to MRI solenoid with normal conducting coil shown in Fig. 13

The variation of the normal conducting solenoid and its magnetic field during design optimization is shown in Fig. 13. The solenoids shown in this figure have the same objective function values as those of the superconducting solenoids shown in Fig. 11, except for the initial configuration. The optimal solenoid generated a uniform magnetic field of 2 T in \({\Omega}_p\), similar to the design result of the superconducting solenoid. However, the shape of the normal conducting coil was found to be different from the optimal shape of the superconducting coil. Although the objective function value was the same, the width and height of the optimized coil in the normal conducting solenoid were larger than those in the superconducting solenoid, and the coil volume was also 1.24 times larger. In general, the magnetic field inside a solenoid is distributed uniformly by increasing the size of the coil. Additionally, the parallel and perpendicular components of the applied magnetic field in the normal conducting coil that determine the critical current density in the case of a superconducting material were 0.374 T and 1.372 T, respectively. These values were lower than the magnetic fields of 0.734 T and 1.513 T in the superconducting coil. When the magnetic field values of the normal conducting coil are substituted into (31), the critical current density is calculated as \(3.23 \times 10^7\) A/m\(^2\), which is higher than the applied current density of \(3.01 \times 10^7\) A/m\(^2\). This indicates that if a superconducting solenoid is designed to have a certain magnetic field by using the design sensitivity with a constant current density, the maximum performance deviates from the target design objective.

The difference in these design results arises from the state equations under different input current conditions and the design sensitivities derived using these state equations. The design sensitivity of the superconducting system was derived using the constraint of the variational state equation including the critical current condition. Therefore, design optimization using the derived sensitivity prevents the volume expansion of the superconducting material and leads to a compact design. Figure 14 shows that the objective function of the normal conducting solenoid decreases differently with respect to the superconducting solenoid during the optimization process. It should be noted that, during the design optimization of superconducting systems, the critical current condition is involved in the overall optimization process, such as the current density in the superconducting system, the material property of the adjoint system, and the adjoint variable in the design sensitivity and velocity field.

5 Conclusion

In this study, the design sensitivity for superconducting systems under critical current conditions was derived using the material derivative concept of continuum mechanics and the adjoint variable method. Owing to the dependence of the current density on the magnetic field, the material property of the adjoint system depended on the sensitivity of the current density with respect to the magnetic field and was described using a symmetric tensor. The sensitivity formula was derived in the analytical form as a surface integral on the interface between the superconducting material and its surroundings. The design sensitivity includes an integrand involving the differentiation of the current density with respect to the magnetic field. In addition, all integrands have an adjoint variable that depends on the sensitivity of the current density.

Based on the design sensitivity, an optimization scheme for the shape design of superconducting systems was developed. The shape variation in the design optimization was expressed using the level set method. The level set equation and the design sensitivity were coupled by a common term of the velocity field, \(V_n\). This coupling enables design optimization of superconducting systems by solving the level set equations in the time domain without additional boundary parameterization techniques.

The design sensitivity and optimization method were validated through design problems for superconducting systems. The design example of infinite superconducting solenoids indicates that the numerical results obtained by the design optimization are in agreement with the analytic solution. This confirms that the continuum sensitivity derived from this study works correctly in the design of superconducting systems. In a further example, the MRI solenoid design using the derived sensitivity demonstrated different results from those of the designs using the sensitivity for magnetostatic systems with constant current densities. For the two optimal solenoids, although the current density of the coil and the homogeneity of the target magnetic field were the same, the superconducting coil had a smaller size and volume. This validates the inherent ability of the derived design sensitivity to perform compact designs of superconducting systems operating with critical currents.

The design sensitivity and optimization method presented in this paper can be applied to various design problems to attain the optimal structure and maximum performance of superconducting systems under critical current conditions. The design sensitivity can be employed for various design purposes, such as magnetic field distribution, system energy, force/torque, and energy loss. Moreover, the optimization scheme can be effectively used in practical problems while meeting the structural requirements by adding constraints such as the size, location, and volume of superconducting materials.

Based on the design sensitivity, advanced studies of design sensitivity for superconducting systems can be conducted in the future. In addition to the shape sensitivity, the sensitivity for the topology design of superconducting systems can be studied. Moreover, further studies on design sensitivity can be conducted by considering the temperature dependence of the current density and the magnetic nonlinearity of the material property. Furthermore, multi-objective optimization for the magnetic and mechanical design of superconducting materials can also be studied in conjunction with structural sensitivity.