## 2 HTS Magnet Design with Genetic Algorithm
Initially, the initial population is generated randomly and tape consumptions (objective function) and magnetic performances, such as center field, field uniformity, mechanical stress, and critical current are calculated by the design program. After that, the design program sorts the design variables set according to the tape consumption and selects those that are highly ranked. The tournament selection method is used in applications. The sets that are highly ranked with a small tape consumption evolve to the next generation according to the GA \begin{table}
\begin{tabular}{c c} \hline \hline
**Constraints** & **Value** \\ \hline Center field & \textgreater{}3 T \\ Field homogeneity @ 5 mm DSV * & \textless{}0.3\% \\ Operating current & \textless{}60\% of \(L_{\text{*}}\) \\ Maximum hoop stress & \textless{}250 MPa \\ Magnet height & \textless{}80 mm \\ Outer radius & \textless{}70 mm \\ \hline \hline \end{tabular}  
* 5 mm DSV *: 5 mm diameter sphere volume; \(L_{\text{*}}\): critical current of the magnet.  
\end{table} 
Table 1: Design Constraints of the 3 T REBCO EMPS Magnet. Figure 3: Structure and design variables of the 3 T REBCO magnet. \[B_{z}(\rho,\varphi,z)=\frac{\text{J}}{2\pi}\frac{a_{2}-a_{1}}{m}\frac{b_{2}-b_{1}}{ n}\sum_{i=1}^{m}\sum_{j=1}^{n}\frac{1}{\rho\sqrt{\left(a_{ij}+\rho\right)^{2}+ \left(z-b_{ij}\right)^{2}}}\left[K+\frac{a_{ij}^{2}-\rho^{2}-\left(z-b_{ij} \right)^{2}}{\left(a_{ij}-\rho\right)^{2}+\left(z-b_{ij}\right)^{2}}E\right]\]  
\[B_{\rho}(\rho,\varphi,z)=\frac{\text{J}}{2\pi}\frac{a_{2}-a_{1}}{m}\frac{b_{2}- b_{1}}{n}\sum_{i=1}^{m}\sum_{j=1}^{n}\frac{z-b_{ij}}{\rho\sqrt{\left(a_{ij}+ \rho\right)^{2}+\left(z-b_{ij}\right)^{2}}}\left[-K+\frac{a_{ij}^{2}+\rho^{2} +\left(z-b_{ij}\right)^{2}}{\left(a_{ij}-\rho\right)^{2}+\left(z-b_{ij}\right) ^{2}}E\right], \tag{2}\]  
where \(a_{2}\) and \(a_{1}\) are the outer radius and inner radius of the coil, and \(b_{2}\) and \(b_{1}\) are the axial coordinates of the top and bottom of the coil, respectively. \(A_{ij}\) and \(b_{ij}\) are correspondingly the radial and axial position of the center point of each HTS turn, and \(K\) and \(E\) are parameters related to the elliptic integral. When designing a magnet, the design program calculates the angle and amplitude at every HTS turn and finds the minimum critical current using the measured critical current data with respect to the temperature and magnetic field, as provided by the HTS tape manufacturer. Details of the critical current calculation are presented in Figure 5. The optimization process then finds the proper operating current based on the critical current constraint. Because excessive magnetic hoop stress can damage the magnet and reduce the critical current [46; 47; 48], the determination of the maximum magnetic hoop stress is essential in the design stage. That is, the generated hoop stress should be lower than the permissible tensile stress of the HTS tape. Based on the specifications of the SuNAM REBCO tape, we set the permissible tensile stress to 250 MPa. The equations used to determine the magnetic hoop stress at the magnet are shown below as Equation (3). \[\frac{1}{r}\frac{d}{dr}\left[r\frac{du}{dr}\right]-\frac{u}{r^{2}}=-\frac{ \left(1-v^{2}\right)}{Y}BJ\]  
\[\sigma_{h}=\frac{Y}{1-v^{2}}\left[v\frac{du}{dr}+\frac{u}{r}\right], \tag{3}\]  
where \(Y\) is [PERSON]'s modulus, \(v\) is [PERSON]'s ratio, \(B\) is the applied magnetic field, \(J\) is the magnet current density, \(u\) is the displacement, and \(\sigma h\) is the magnetic hoop stress [6; 8; 46; 49; 50]. With the repetitive optimization process, we derived the final design of the 3 T REBCO magnet, as shown in Table 2. Figure 6 shows the magnetic field distributions of the design result. Figure 5: Details of the critical current calculation method. The REBCO magnet is composed of eight coil modules, called double-pancake coils (DPC), and generates over 3 T at an operating current of 99 A.