Quench Co-Simulation of Canted Cos-Theta Magnets

Canted Cos-Theta (CCT) magnets can use conducting formers in which eddy currents are induced during current change. This is relevant during magnet ramping or discharging after a quench, particularly when using energy extraction. CCT magnets provide substantial flexibility in terms of generating the required field shape, including the combined function field in a curved bore. However, this flexibility results in magnet geometry that often requires three-dimensional (3D) quench simulations. We propose a cooperative simulation (co-simulation) developed at CERN as part of the STEAM framework with finite element (FiQuS) and finite difference (LEDET) tools. It allows for a 3D quench simulation of a CCT magnet with great geometrical detail while maintaining reasonable computational cost. FiQuS simulates the transient electromagnetics of the entire magnet and the transient thermal behavior of the formers. The thin 3D insulation layers between the coil windings and formers are collapsed into two-dimensional surfaces, thus considerably reducing the meshing complexity and solution time. LEDET is used for 3D simulation of a quench transient, including heat diffusion in the windings, ohmic loss, and inter-filament coupling loss. Using the finite difference tool for resolving temperatures in coil windings with many turns greatly improves the simulation efficiency. In the co-simulation communication, data exchange, and convergence is controlled and achieved programmatically. A complete numerical approach is proposed, and the CCT magnet simulation results are presented and discussed.

Quench Co-Simulation of Canted Cos-Theta Magnets Mariusz Wozniak , Erik Schnaubelt , Julien Dular , Emmanuele Ravaioli , and Arjan Verweij Abstract-Canted Cos-Theta (CCT) magnets can use conducting formers in which eddy currents are induced during current change.This is relevant during magnet ramping or discharging after a quench, particularly when using energy extraction.CCT magnets provide substantial flexibility in terms of generating the required field shape, including the combined function field in a curved bore.However, this flexibility results in magnet geometry that often requires three-dimensional (3D) quench simulations.We propose a cooperative simulation (co-simulation) developed at CERN as part of the STEAM framework with finite element (FiQuS) and finite difference (LEDET) tools.It allows for a 3D quench simulation of a CCT magnet with great geometrical detail while maintaining reasonable computational cost.FiQuS simulates the transient electromagnetics of the entire magnet and the transient thermal behavior of the formers.The thin 3D insulation layers between the coil windings and formers are collapsed into two-dimensional surfaces, thus considerably reducing the meshing complexity and solution time.LEDET is used for 3D simulation of a quench transient, including heat diffusion in the windings, ohmic loss, and inter-filament coupling loss.Using the finite difference tool for resolving temperatures in coil windings with many turns greatly improves the simulation efficiency.In the co-simulation communication, data exchange, and convergence is controlled and achieved programmatically.A complete numerical approach is proposed, and the CCT magnet simulation results are presented and discussed.Index Terms-Computer-aided engineering, finite difference methods, finite element method, quench protection, superconducting magnets.

I. INTRODUCTION
T HE behavior of a Canted Cosine-Theta (CCT) magnet [1] during a quench transient, as of most superconducting magnets, is dominated by the circuit inductance and resistance.CCT magnets often have a relatively large number of turns with a small cross-section area and, therefore, a relatively high selfinductance and normal-state resistance of its windings.These values can dominate the quench discharge and, therefore, must be correctly calculated.
Calculating the inductance of a CCT magnet in a static case is already involved, as the complex geometry of the windings needs to be resolved in 3 dimensions (3D).The eddy currents in electrically conducting (e.g., aluminium alloy) formers must be included in a transient case since they strongly influence the magnet's differential inductance.
In a static or transient case, the resistance calculation must account for magneto-resistance, and the superconductor fieldand temperature-dependent critical current, so the magnetic field B and temperature T need to be computed.The latter is more challenging in a transient setup as the heat diffusion through typically thin insulation layers and along electrical and thermal conductors needs to be resolved.In addition, the heat generated by the inter-filament coupling losses (IFCL) [2] must be included in the calculation of the fast electromagnetic transients.
The above-mentioned differential inductance and resistance have to be simulated simultaneously, as the conducting formers of the CCT magnet heat up during a transient, affecting both the inductance due to the change of local resistivity affecting the paths of the eddy currents and the resistance of the windings, due to heat reaching them.These quench simulations of CCT magnets have been performed with Finite Element (FE) in 3D, 3D slices or 2D [3], [4].There are also calculations with the lumped-element approach in [5], [6] and in ProteCCT [6], [7], [8], developed at CERN and part of the STEAM (Simulation of Transient Effects in Accelerator Magnets) framework [8].
In this contribution, a simulation approach is presented that allows for a full 3D simulation of a CCT magnet and combines two simulation tools to perform parts of the simulation.The Finite Element Quench Simulator (FiQuS) [9], [10] and Lumped-Element Dynamic Electro-Thermal (LEDET) [11], [12] tools are used.This cooperative simulation (co-simulation) relies on cooperation and data exchange between the tools and has been developed as part of the STEAM framework.This approach is different from [13] despite sharing the same name.In our previous work, we relied on consecutive simulations [14].
The approach has been recently validated against measurements of the curved CCT Fusillo subscale magnet at CERN [15].This paper focuses on the simulation approach and uses a small-scale CCT magnet to showcase it.

A. Finite Element Tool
The open-source FiQuS is coded in Python [16] and, with the help of Gmsh [17], [18] and GetDP [19], [20], performs geometry generation, meshing, solving, and post-processing.Appropriate geometry handling is key for such complex 3D CCT simulations.The CCT winding is accurately placed in channels machined in the formers.For straight CCT magnets, the geometry is fully parametrized using sets of two sizes of 8-noded bricks (8NB) (Fig. 1(a)), which are saved into conductor files (CF) compatible with Opera [21].These are the starting points for generating Channel-Level Conductor Geometry (CG, Fig. 1(b)) and Winding-Level Conductor Geometry (WG Fig. 1(c)).
The geometry of simple cylindrical tubes of formers and shells is also fully parametrized and saved to computer-aided design (CAD) files (e.g., STEP [22]).
The sets of CF and CAD files are an intermediate step, which is particularly useful for more complex geometries, e.g., curved CCT [15].In such cases, these files can be generated by external tools and used in FiQuS.
Importantly, the CAD formers initially do not have the windings channels, and their outer radius is increased (Fig. 1(b)) to make the formers overlap.FiQuS generates the Winding Channels in the Formers (WChF) in a series of Boolean operations using two sets of CF.This results in a conformal geometry of CG and a conformal geometry of the formers and shells with curved conformal surfaces.These are Surface Approximations of Volumetric Layers (SAVL) and approximate the Thin Volumetric Insulation Layers (TVIL) between the windings and the formers or between the formers and shells.The air region geometry is added to the model at the end, and the final Boolean operations are performed.
Creating the SAVL on the geometry level reduces the FE meshing difficulty and complexity and improves the mesh quality.The mesh is coarser, has fewer elements and has elements of higher quality (lower aspect ratio) than meshed TVIL.A tetrahedra mesh was used in the model.
The FE solution consists of coupled magnetoquasistatic and thermal diffusion models, including a special SAVL treatment.The magnetoquasistatic problem is solved in the whole domain with an A-V formulation.The SAVL are modelled as perfectly insulating.As proposed in [23], this is done by introducing a discontinuous contribution A d for the magnetic vector potential A across the SAVL.When A d is properly defined, it ensures a zero current flow condition across the insulating surfaces while maintaining the continuity of the component of the magnetic flux density normal to the surfaces.The thermal problem is solved only in the formers and the shells.The thermal contact of the SAVL is handled by thin-shell thermal approximation as described in [24], with a single layer inside the thin-shell.There is neither a helium cooling of the formers or the shell nor a heat exchange between them, i.e., each part is considered adiabatic.
The thermal problem is weakly coupled to the electromagnetic problem, with volumetric Joule power density p(t) from the electromagnetic problem and temperature T(t) from the thermal problem exchanged between the solutions.The formers and shell electrical and thermal conductivity and heat capacity are temperature dependent [25].The non-linear thermal problem is solved with fixed point iterations in a Picard scheme.
In addition, FiQuS generates the WG required by LEDET, which does not exist at the FE geometry, mesh and solution stages.The WG is only introduced at the post-processing stage (Fig. 2) as the magnetic field components B x , B y , and B z solved for at CG are post-processed to B w , B h , and B l field components along the width, height, and length and at the center of each strand of the WG.For Nb-Ti/Cu strands, the B w and B h components are required for J c (B) scaling and IFCL loss calculation in LEDET.This magnetic field operation is done for static (dI/dt = 0) and transient (dI/dtࣔ0) fields.The magnet inductance L(I) calculation is static and differential (L = U i /(dI/dt), where U i is the magnet inductive voltage) at a given magnet current, I(t).
The surface of the WChF is an interface to the LEDET thermal solution.The temperature is averaged over the WChF surfaces (all three, i.e., left, right and bottom surfaces of the channel together, for each 8NB) and used as a thermal boundary condition, T bc.th.(t) (Fig. 2).The heat flux via WChF surfaces due to the windings and the formers temperature difference is not calculated by LEDET and is neglected.
The electrical circuit is implemented in FiQuS as an ideal current source in series with the magnet coils; see Fig. 3(a).

B. Finite Difference Tool
LEDET is coded in MATLAB [26] with a semi-implicit transient thermal solver that accounts for 3D heat diffusion along and between the windings as well as Joule and IFCL losses [27].LEDET has been used for quench simulations of CCT magnets without formers [14].LEDET can exchange with other tools the relevant geometry, inductance, magnetic field, boundary temperature maps, and thermal connections between the windings.For CCT magnets, FiQuS provides all these data for LEDET directly or via the Python-based STEAM SDK [28].The output of LEDET used by FiQuS is the magnet current versus time during a quench discharge, calculated for the circuit with schematics as shown in Fig. 3(b).

III. CO-SIMULATION SETUP
The magnet design for both tools is captured in a single text file (in YAML format [29]), with additional CF and CAD files if used.The co-simulation schedule is coded in another text file (YAML), which defines the data exchange by input-output file operations.The analysis module of STEAM SDK orchestrates this process.All the input files required to perform the simulations presented here are available [30].The schematic representation of the co-simulation schedule is illustrated in Fig. 2. It involves initial solutions of parts of the problem in FiQuS and LEDET, followed by iterations involving both tools until the results are within a specified convergence tolerance ε.The quantity used here is the magnet current versus time (as in Fig. 4), and the condition is t: |I iter.N (t) -I iter.N-1 (t)| < ε.For the example magnet presented below ε = 1.5 A was used.

IV. EXAMPLE MAGNET
A single aperture, two-layer, straight, dipole CCT magnet without iron yoke and containing 10-wire turns in the channel is studied.The magnet design is based on the MCBRD magnet of the HL-LHC project [31], [32] but with reduced channel turns per layer from 365 to 10.This corresponds to a reduction of total winding turns from 7300 to 200.Magnet and wire details are in [14].The formers' material is EN AW 6082 T6 aluminium alloy, with an RRR of 4.14.The magnet was powered to a current of 500 A and simulated with forced energy extraction, i.e., without introducing a quench in a hot spot.In this way, the coil winding temperature is dominated by the heat input from the formers heating up, a phenomenon called quench-back.

V. RESULTS AND DISCUSSION
An LEDET-only simulation was set up as an initial simulation with no transient inputs from FiQuS to showcase the impact of the co-simulation on the results.This initial simulation uses constant inductance and temperature of WChF surfaces so that no heat reaches the windings from the formers.The discharge curve and maximum winding temperature for the reference simulation are shown in Fig. 4. In this case, the temperature of the windings only rises by a single mK due to the IFCL, and as a result, there is no quench in the windings.In this case, LEDET linearly scales the winding magnetic field with the magnet current to calculate the field-change-dependent IFCL.The effect of the IFCL on magnet inductance is not accounted for in LEDET in 3D [27].In this case, the discharge I(t) is exponential, with time constant τ = L/R proportional to total circuit inductance L and inversely proportional to the total circuit resistance R.
Fig. 4 also shows the first 4 iterations of the co-simulation, after which the results meet the convergence criterion.The difference in the discharge curve with respect to the initial simulation is remarkable and mostly associated with a change of magnet inductance due to eddy currents induced in the formers [33].This is particularly visible at the beginning of the discharge when the current drops with a dI/dt of −294 kA/s, which is 36 times higher than the solution obtained without the formers and shell eddy-currents.The magnet inductance without the eddy current effects (i.e., static) is 5.76 mH, whereas it reduces (36 times) to 0.16 mH when eddy currents are included.The situation changes later in the discharge when the differential inductance exceeds the static inductance, and the current decay rate decreases.In this case, the flux in the magnet does not decrease proportionally with the magnet current, as a large part of it is maintained by the circulating eddy currents in the formers and the shell.The other large effect of co-simulation is the increase of the formers' temperature and heat propagation to the coil windings.In the last iteration, the maximum windings temperature reaches the current sharing temperature (about 8 K) in less than 7 ms.After that point, the maximum winding temperature is dominated by the Joule heating in the conductor.
It is very illustrative to plot the formers and shell temperature distribution together with eddy currents density distribution at 6 ms, i.e., the time at which the latter reaches the highest amplitude (Fig. 5 ).At this time, the power density is maximum, as well as the temperature gradients in the formers and shell.One striking observation, thanks to full 3D simulations, is that the eddy currents largely follow a similar pattern as the nearest winding.In particular, the shell is a simple cylinder (i.e., no channels to affect the current flow), and the eddy currents pattern resembles the nearest (i.e., outer) winding shape.These eddy-current paths differ qualitatively from the cosine-theta distribution that eddy-currents assume in a hollow cylinder subject to transverse field, as suggested, for example, in [6].Another observation is that the channels along the perimeter of each turn have a non-uniform temperature distribution.The temperature distribution is similar to the letter X (looking along the x-axis) with the maximum temperature at its centre, which is the location with the highest power and eddy current density.
The transient temperature solution in WChF surfaces is transferred to LEDET.The resulting winding temperature at t = 8 ms is shown in Fig. 6.The temperature distribution causes the windings to quench where the formers' temperature is the highest.The turns at the bottom of the channel, i.e., turns 1 and 6 (see numbering in Fig. 1(c)), have the best thermal contact with the channel (bottom and side as opposed to side only).These turns are heated up the fastest and quench first.The temperature distribution resulting from co-simulation causes the quench of these turns at the centre of letter X, not necessarily where the highest magnetic field is.
The co-simulation made it possible to benefit from the strength of each tool and to perform a simulation of which each tool is incapable on its own.After a solution was obtained by each of the tools, time-dependent curves were exchanged between the tools.This relatively simple setup has the drawback of needing to iterate and solve in both tools a few times.For the magnet presented here, 4 iterations were necessary.Depending on the change of resistance of the windings in consecutive iterations, we observed that, typically, 3-5 iterations are sufficient and still practical.

VI. CONCLUSION
A CCT magnet co-simulation between the finite elements and finite difference tools of the STEAM framework has been developed.In particular, for such complex 3D geometry, the finite element (FiQuS) tool required a very careful approach to the geometry manipulation and solution stages, as described in detail.This ensures good quality meshes and reasonable computational cost and time.A finite difference (LEDET) tool functionality has been used to work with differential inductance and transient temperature of the former channels as Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.a boundary condition.Thermal diffusion in complex windings has been calculated efficiently with a finite difference approach.
The results for an example magnet provide valuable insights into the behavior of the CCT magnets, particularly their differential inductance, eddy current patterns, formers temperature distribution and the resulting location and timing of quench-back in the windings.

Fig. 1 .
Fig. 1.Conductors representation in simulations: (a) Larger and smaller 8-noded bricks (8NB) shown with dotted and dashed lines, respectively; (b) channel-level conductor geometry (CG), shown with solid lines, with both 8NB shown.The curved surface is conformal with the bounding surface of the layer above (former or shell); and (c) surfaces of winding-level conductor geometry (WG), which is based on the smaller 8NB shown with dashed lines.

Fig. 2 .
Fig. 2. Schematic of the co-simulation workflow, with FiQuS and LEDET shown with rounded or square corner boxes, respectively.Various model parts used by each tool are labelled with abbreviations in the boxes and explained in the legend.

Fig. 4 .
Fig. 4. Simulated current and temperature evolutions during forced energy extraction for cases with and without the co-simulation.

Fig. 5 .
Fig. 5. (a) Channel level conductors geometry (CG), with terminals extending to the boundary of the air region (not shown).At t = 6 ms: (b)-(d) Eddy current density and (e)-(g) temperature of the formers and the shell.In (e)-(g), the FE mesh is clearly visible.