WorksPhysics and Astronomy
Implementation and verification of a new free boundary module for Resistive Wall Modes simulations with the nonlinear 3D full MHD code SpeCyl
Abstract
Self-consistent numerical simulations of free boundary instabilities, such as resistive wall modes (RWMs) and external kink modes, require special attention given their relevance on the path towards magnetic fusion based nuclear reactors. In this work, a new implementation and a verification benchmark are presented for the nonlinear three-dimensional (3D) full magneto-hydrodynamics (MHD) code SpeCyl, which self-consistently combines a free flow 3D treatment for the edge plasma velocity with double resistive wall thin shell magnetic boundary conditions, capable of capturing the essential features of common setups in experimental devices. Two coaxial resistive shells surround the plasma. Vacuum conditions are assumed between and outside the resistive shells, whose relative positions and time constants can be varied on purpose. The implementation is extensively verified against Shafranov's analytic theory, valid for a circular cross section large aspect ratio tokamak and assuming a flat current profile. The correctness of newly implemented Boundary Conditions (BCs) is confirmed by the good agreement obtained for the linear growth rates of (m=2,n=1) RWM and external kink, over a wide range of wall positions, resistive shell time constants, and for different initial reference equilibria. The (m=2,n=1) RWM growth rates are also benchmarked against previous different RWMs modelling and successful validation studies for RFX-mod tokamak plasmas. The new BCs make SpeCyl a flexible and robust tool to investigate free boundary MHD modes in large aspect ratio magnetic confinement configurations, such as those achieved with the RFX-mod machine and expected in RFX-mod2.
Introduction
One of the main concerns for a thermonuclear fusion reactor is the uncontrolled growth of magneto-hydrodynamic instabilities, potentially capable of leading to a fast termination of the plasma discharge, with ensuing severe electromagnetic, thermal and mechanical loads dissipated on the reactor components in a short time. This is the case of tokamak plasmas, where major disruption events[1, 2], possibly triggered by free boundary instabilities[3, 4, 5, 6] such as Vertical Displacement Events (VDEs), external kink modes and Resistive Wall Modes (RWMs), can terminate the plasma discharge and degrade the first wall of the confining machine[3, 7].
In this work, the focus is on the numerical implementation and verification analysis of linear growth rates for the specific instability class of RWMs, i.e., modes which would be stable in presence of a perfectly conducting boundary but become unstable on the characteristic resistive time scale of a realistic resistive boundary. These unstable modes play a key role in magnetic fusion machines[8, 9] and require stabilizing action from external control systems. Active feedback control systems[10] of external coils are currently intensively pursued[1] to reproduce the effects of a highly conducting wall, after the seminal proposal by Bishop[11], which was initially developed for a Reversed Field Pinch (RFP) configuration.
More specifically, this work aims at implementing and verifying a new boundary module in the nonlinear visco-resistive MHD numerical code SpeCyl[12], motivated by the goal of increasing the realism of the electromagnetic boundary front-end to enable the investigation of MHD instabilities such as the RWMs[13, 14] and the Resistive Wall Tearing Modes. The new setup consists of two resistive shells implemented in the computational tool for visco-resistive MHD plasma simulations. The inner shell mimics plasma facing components, while a second coaxial resistive thin shell plays the role of the main conducting structure and enables the simulation of RWMs[8, 15, 16, 17].
This study constitutes a mandatory step towards the introduction of feedback system modelling interaction with 3D nonlinear MHD. The inclusion of conductive/resistive structures is needed to correctly capture the growth rates of RWMs. In fact, mirror currents induced in the resistive shell by the evolution of RWMs play an essential role in slowing down such instabilities[18, 19, 20], with respect to no-wall conditions, to the time scale of the resistive time of the shell. Reliable modelling of the amplitude of mirror currents and of their exponential decay as magnetic perturbations penetrate the shell is also key for fusion reactor integrated modelling, to predict the electromechanical force density distribution that may result in loads that the structures must withstand[21, 22, 23, 24].
The new boundary module is verified in two stages. First, a verification against analytical solutions[18] is presented, on a class of flat current tokamak equilibria in a cylindrical plasma. The study of linear growth rates for the () RWM is discussed, by varying the outer shell resistivity in SpeCyl from an ideal wall case (external kink mode limit) to increasingly large wall resistivity. Then, a benchmark study with respect to previous realistic tokamak successful modelling[25] related to RFX-mod is discussed, and serves to anticipate a future more systematic validation of SpeCyl against experimental results.
The paper is organized as follows: Section II presents an overview of the SpeCyl code, including the set of MHD equations and the flow boundary conditions. Section III introduces the thin shell treatment and the set of newly implemented equations, which are detailed in § 0.4 at the numerical level. The analytical model assumed as a reference for the first verification activity is presented in § 0.5. The setup adopted for simulations, together with their general features, is introduced in Section VI and the numerical results are described in Section VII. The second verification benchmark against previous successful realistic RFX-mod modelling is presented in Section VIII, while a summary and final outlook are provided in § 0.9. Three appendices are included, which deal with: the definition of double vacuum magnetic fields (Appendix A), the theoretical framework to produce a perturbative stability analysis in the rectified tokamak (Appendix B) and the elements for the derivation of the so-called Shafranov’s flat current model (Appendix § 0.7.3).
The SpeCyl code
SpeCyl is a viscoresistive non-linear three-dimensional full MHD code[12], which simulates the evolution of the magnetic field and of the flow field by means of a predictor-corrector scheme within a spectral approach[26, 27]. Cylindrical coordinates are adopted to write such fields, obeying the following set of equations[3]:
The pressure term is neglected in the momentum equation, and the plasma density profile is assumed to be constant (). is the plasma current density, is the kinematic viscosity, is the plasma resistivity and is the electric field. The transport coefficients ( and , with the dynamic viscosity) are assumed to be scalar fields. All terms are set in dimensionless form, using suitable reference quantities: ; ; ; ; ; . In these expressions, hatted terms are in physical units and , , while is the Alfvén velocity and is the Alfvén time. Their expressions are (being the vacuum permeability and the minor plasma radius) and . Equations (1) - (5) depend only on two dimensionless parameters, namely the Lundquist number and the viscous Lundquist number , which regulate the importance of diffusion for both equations[12]. The MHD model presented above is numerically solved in the computational domain constituted by a straight periodic cylinder, so that , , and (being the major plasma radius). Periodic boundary conditions are enforced at the two bases of the cylinder as in toroidal geometry. Consistently, the equations are Fourier-transformed in the coordinates, and finite differences are adopted along the radial coordinate to discretize differential operators. The non-linearities inherent in the simulated equations and the time advancing are dealt with using a semi-implicit treatment and a predictor-corrector scheme[28, 29, 30].
Given that Equations (1) - (5) are a set of partial differential equations, suitable boundary conditions for , must be specified for their solution. The new magnetic BCs are extensively presented in Sections III, § 0.4, while the flow BCs are briefly outlined hereafter. The fully three-dimensional free normal flow velocity BCs implemented in SpeCyl have already proved essential in modelling free boundary instabilities with remarkable accuracy[30, 31]. Such flow BCs allow for a full 3D spectrum of velocity modes at the plasma edge, which couples with the magnetic field spectrum and increases the numerical complexity of the scheme. Discrete convolutions in the Fourier space manage the coupling of velocity and magnetic field harmonics. The flow BCs in SpeCyl are derived according to the treatment given in Ref.32 for the case of a zero- paramagnetic pinch equilibrium but could be generalized to finite pressure models, as pointed out in Ref.30. Based on the axisymmetric pinch velocity contribution, SpeCyl adopts a general expression for the velocity modes, which has the shape of a flow. An edge velocity proportional to is retrieved from Ohm’s law at , taking its cross product with , i.e.:
The orthogonal velocity is obtained by assuming , while for the parallel velocity a natural choice (and easily generalizable) is to set a null value,
This assumption ( denotes the direction parallel to the total magnetic field at the edge) is justified because the parallel velocity in MHD instability dynamics is typically negligible. The edge velocity then reads:
The ordering assumption made in Equation (8) can be intended as a convenient closure for Equation (6), suitable for the boundary of a warm plasma. Neglecting the Ohmic term that accounts for the diffusive-resistive flux, i.e. , means considering negligible electromagnetic forces on the flow spatial scales and thus acting as a force-free condition at the plasma boundary. Then, the magnetic energy flux due to external modes is put in direct relation with the Poynting vector on the left hand side of Equation (6), which results particularly effective in studying ideal MHD modes that are influenced by external conductors, e.g. the RWMs. In the limit of a small amplitude plasma displacement (i.e. when a linear stability analysis is performed), the edge velocity of Equation (8) can be decomposed along , retaining the three components which couple to the 3D edge magnetic field by means of discrete convolutions.
The following decomposition is adopted throughout the work for the electric, magnetic and velocity fields, where is the unit vector aligned with the radial direction, while the subscript “t” addresses the components of the field that are tangential to the wall, i.e. : , , .
Derivation of magnetic BCs
The electromagnetic boundary in SpeCyl employs a thin shell treatment2, adopted to model conductive/resistive elements enclosing the plasma. Introducing the generic shell position , the thin shell modelling assumes that the radial component of is continuous throughout the thin shell, i.e.,
The symbols , identify an infinitesimally displaced radial position (positive and negative) with respect to , and the vertical bar denotes the associated difference of evaluations. The integration of the Ampère-Maxwell law across the shell3 yields the expressions for the electromagnetic fields in correspondence with the resistive thin wall. For a generic radial position , thin shell relations2 are obtained as:
In Equations (9) - (11) the spectral nature appears through the superscripts , which denote Fourier harmonics in the azimuthal and axial periodic coordinates, while the subscript “t” denotes the components of the tangential field, as stated in the previous section. A proof of the identities in Equation (10) making use of Green’s functions can be found in Ref.[33]. The physical properties of the thin wall are contained in the adjustable wall time constant :
In the previous expression, is the radial position of the shell, is its thickness, and represents the conductivity of the shell. The thin shell treatment can be regarded as the limiting case of the thick-wall treatment[8, 15, 34] when the thin shell ordering is valid, i.e.: . Various experimental conditions of interest can be reproduced within a thin shell treatment depending on the time scales on which the modes penetrate the solid conductors. These are determined according to the Alfvén time , which sets the different regimes for the diffusion of magnetic field modes through solid walls, also introducing in the picture the target time for the simulation :
the condition defines the case of an infinitely conductive wall. In other words, and thus the diffusion-less case of an ideal shell is addressed;
the condition reproduces the case of a wall having finite resistivity;
the condition instead sets instant-diffusion features, thus implying a sort of vacuum-wall transparent to magnetic fields. This condition, which was already used in Refs.[30, 31], will be employed in this study (unless otherwise stated) for the magnetic boundary at to mimic a free interface between the plasma and the vacuum.
The description of the electromagnetic boundary is completed with the expression for the radial electric field, obtained by applying the divergence operator to Equation (11) and using the gauge invariance for :
Equations (10), (11) naturally reproduce the field expressions for the limiting cases discussed above, namely the ideal wall and the transparent wall conditions. For an ideal shell, and so is fixed in time and . On the other hand, a transparent wall condition is characterized by and, owing to the finiteness of other fields, the continuity of and of the radial derivative of are implied.
Figure 1 illustrates the geometry of the new SpeCyl BCs: the plasma is surrounded by two coaxial cylindrical shells. The thin inner resistive shell (already present in Refs.[30, 31]) corresponds to the plasma edge at (this position is fixed by construction because the inner shell coincides with the outermost node of the plasma radial grid, as explained in § 0.4) and a second thin resistive shell is placed at . The outer ideal shell is placed at with (typically far from the plasma) and serves to close the system of equations. Vacuum conditions are assumed in between the three coaxial conducting elements. The resistivity of the shells (as specified through the time constants ) and their mutual distances are freely adjustable (by means of normalized positions , ), allowing flexibility in investigating various experimental conditions. The presence of a second resistive shell of wall constant equal to requires not only to account for the evolution of the magnetic field components on it, but also to update the analytic expressions for magnetic field spectral components in the double coaxial vacuum. In addition, the double shell setup of Figure 1 must be self-consistently merged with the already existing 3D flow velocity treatment at the plasma edge, preserving a notable feature of SpeCyl[31] with respect to other nonlinear MHD codes. A former set of BCs, implementing the hitherto described physical framework but only including the inner resistive shell in was non-linearly verified[30] against the PIXIE3D code[35]. Together with a previous verification study[36], this proved the quantitative reliability of both SpeCyl and PIXIE3D codes over different test cases (tokamak and RFP configurations).

Figure 1. The SpeCyl double shell set-up, represented both with radial and axial views. The new implementation requires the modelling of a second resistive shell whose dynamics depends on and a second vacuum region, and their self-consistent coupling to other SpeCyl features.
The new boundary module developed within this work is expected to increase the realism of the simulations performed with the new version of SpeCyl, especially when investigating RWMs. These instabilities require the presence of a resistive shell at finite distance from the plasma edge, where the free finite velocity couples with the magnetic field. The main equations arising from this approach are highlighted in the rest of this section, while in Appendix A the analytical derivation of the double vacuum treatment is given in detail together with the development of the double vacuum coefficients. The starting point are the renewed expressions of the amplitudes of the components of , where identifies the vacuum region considered:
Equations (14)–(16) provide the expressions for the vacuum magnetic field harmonics, understood to be in Fourier space, involved in the definition of the new BCs. These are now discussed for the general case , and in § 0.4 their discretized version will be presented. The form of BCs for the axisymmetric mode remains unchanged and can be found in Ref.[30]. The first two equations are a specific version of Equation (10) for the two thin shells in and . The partial radial derivatives of are written as a combination of and , resorting to the double vacuum coefficients for the magnetic field harmonics. The index denotes the first or second vacuum region, while the indices are set as , according to the procedure detailed in Appendix A. In brief, for the second shell at :
while for the form of BC results in:
The subscript “pl” addresses the edge of the plasma domain. The non-axisymmetric tangential magnetic field components are determined enforcing the continuity of the tangential electric field (along ), for each Fourier mode in , using Equation (11):
In both of these expressions, the left hand side represents the tangential electric field on the plasma side derived from Ohm’s law, while the right hand side is the thin shell expression, which employs double vacuum coefficients and , detailed in the Appendix A. The convolution product over the entire spectrum of modes produces a nonlinear term that must be dealt with to obtain a linear system with a spectral approach, as discussed in § 0.4.
Implementation of the new boundary module
The numeric implementation of BCs derived in Section III must comply with the nonlinear and spectral structure of SpeCyl. From now on, the superscript identifies the generic time-step of the iterative SpeCyl workflow[27, 30] and for each , the newly implemented boundary module enforces the BCs by solving a system of 7 equations in 7 unknowns. Three discrete radial positions are involved in the formulation: two belong to the plasma radial mesh and are and (edge node), while the third is the location of the second resistive shell, i.e., . In the previous expressions, is the total number of radial mesh nodes and is the uniform spacing of the plasma mesh nodes. Then, the unknowns of the boundary module (for each mode and for each time step) are:
Three equations to determine them arise as a consequence of the backward step of the so-called Thomas algorithm[37], a simplified form of Gaussian elimination that can be used to solve tri-diagonal systems of equations. In fact, the spectral approach combined with a finite differences scheme to discretize second order derivatives (Laplace operator) produces a tri-diagonal mode-dependent linear system. The Thomas algorithm is computationally less expensive than other methods[37], although based on a forward and backward step. These steps set constraints in the way the mesh unknowns are processed, because the coefficients entering the linear system depend both on the radial position (mesh dependency) and on the mode indices (modal dependency). Three conditions expressed as linear relations linking the magnetic field unknowns at the edge mesh nodes , arise. They are constraints of numerical nature that propagate the boundary values to the inner plasma column radial mesh points:
The full expression of the modal coefficients is omitted here because they are already encoded in the previous versions of SpeCyl and have not been modified.
The remaining four equations are obtained starting from the equations introduced in the last part of Section III. The Equations (17), (18) are discretized in time using a first order Euler scheme of implicit type, so that their main unknowns become the Fourier components of and , respectively. Moreover, Equation (18) contains a radial partial derivative which is discretized according to a first order finite difference written on the plasma mesh nodes. They result in:
and
The route for the last two equations is longer: several steps are devised to access the algebraic version of Equations (19), (20) that are compatible with the spectral nature of SpeCyl. First, the real space representation of is split in two terms, to isolate the axisymmetric velocity components which couple to the generic magnetic field harmonic:
It is then required to obtain a linear equation for each mode and for each time-frame when the cross product is inserted back into Equations (19), (20). Moving to the spectral space (application of the Fourier operator ) means defining an algebraic modal representation based on time dependent matrices. The terms in Equation (27) are suitably represented as a row-by-column product between the square matrix and the column vector in the discrete Fourier space, where the contracted indices run over all the couples allocated in the simulation. To show this, the first contribution to the azimuthal component (along ) of is considered (a similar procedure holds for the second, i.e., ):
Equation (28) requires knowledge of the full magnetic field spectrum at a specific time-frame, meaning that the nonlinearity is not yet removed but isolated in the non-axisymmetric terms
A deconvolution procedure[26] is adopted to treat them. This preserves the SpeCyl modal-based solution (serial solution of each Fourier harmonic) and allows individual inversion of each equation for the mode when enforcing the boundary conditions. Taking advantage of the iterative structure of SpeCyl (see Refs. 26,27), the terms which couple with the non-axisymmetric velocity part in the convolution are evaluated explicitly, using their value at the prior time-step. So, taking into account the predictor-corrector advancement in time, the spectral character of SpeCyl and the deconvolution procedure yield the following expression, derived from Equation (28), for the first component of the azimuthal part of the already mentioned:
Equation (30) constitutes a single term of the cross product entering Equation (19). Using the expressions of the magnetic fields according to the coefficients listed in the final part of the Appendix A, the spectral, time and space discretized representations of the Equations (19), (20) then read:
and
Equations (22) - (26) and (31), (32) constitute the system of 7 equations that form the new boundary module: its solution, subject to an evident coupling along the coordinates , , defines the edge values of the magnetic field components, which are used by the code as BCs to solve the MHD model in the plasma domain. These values reflect the presence of the double shell/vacuum setup depicted in Figure 1. Apart from the values of plasma quantities, updated at each time-step , the hitherto described boundary module depends on constant parameters (such as the , and coefficients) that can be computed before the simulation starts. The only additional time-dependent spectral unknown is the radial magnetic field at the outer thin shell in . This additional dynamic variable is employed for the vacuum field calculations (see Appendix A) at each time-step, and complies with the spectral nonlinear implementation of the SpeCyl.
The Shafranov's flat current model (FCM)
The Shafranov’s flat current model[18, 38] (FCM) provides analytical solutions for the dynamics of kink modes and RWMs on simplified equilibria in a current-carrying pinch. It has already been used for numerical verification studies addressed by different nonlinear codes such as JOREK[39, 40], NIMROD[41], M3D-C1[42], XTOR-2F[43] and SpeCyl[31]. The model is based on the straight tokamak limit, achieved for a vanishing inverse aspect ratio , and it descends from the linearization of the ideal MHD equations around a given equilibrium, when assuming flat profiles for the plasma density and the plasma current . Details on the procedure are given in the Appendix B. The analytical model allows an exact shape for the eigenfunction (or plasma displacement ) to be obtained and produces the expression of a dispersion relation that yields the linear growth rate of the instabilities.
Although this model is already presented in the literature (e.g. in [18]), its derivation is retraced here through its main steps, also enriched by the graphical outcomes of a purposely developed Newton algorithm to solve the general dispersion relation, as shown in Figure 2. Two routes are available to derive the FCM: the first recasts the model into a particular version of the Energy Principle (a notable result of ideal MHD[44, 45]), while the second consists of solving a suitable Boundary Value Problem (BVP) for the so called magnetic flux function , as done in [18]. The two approaches can be proven equivalent because algebraic relations exist among their unknowns, as pointed out by Equations (60), (61). The reason for the equivalence is the frozen-in-law of ideal MHD. Being the system periodic, the magnetic flux function, i.e. the linear perturbation to the equilibrium flux, is Fourier analysed in the coordinates, giving:
Figure 2. Dispersion relations from the linear analytical theory described in Section V for the mode and considering a large aspect ratio tokamak with flat current profile with . The dimensionless growth rate , where is the inverse aspect ratio, is represented as a function of the shell proximity . The red curve is for a typical dimensionless wall time constant and will be used for the benchmark with SpeCyl simulations. The green curve is obtained for the ideal wall limit when . In this limit case, only the external kink instability is found, when the shell proximity exceeds the ideal wall instability threshold , marked by the dotted vertical line. Both the red and the green curves asymptotically converge to the so-called no-wall limit , horizontal dashed line) when the conducting shell is moved far away from the plasma. The blue curve is an approximation only valid when the plasma inertia can be neglected, i.e. for sufficiently low values of , when the wall position is close to the plasma edge.
This implies that the growth rate will depend on the mode numbers of the considered MHD instability, in addition to relevant parameters such as the Alfvén time accounting for plasma inertia and wall time constant . The equilibrium addressed to start the perturbative analysis enters the picture through the safety factor , defined as
In the specific case of Shafranov’s model, the safety factor turns out to be constant in the plasma domain, as a consequence of a uniform axial current density profile. All details are found in Appendix B: departing from specific assumptions for the field profiles of interest, the growth rate dispersion relation is derived by solving a BVP for of Equation (33). The modal dispersion relation for MHD resistive wall modes and external kink modes is presented in Equation (35), which yields the growth rate of the MHD instability considered as a function of the uniform (over the radial coordinate in the plasma domain) q-value , the resistive wall time constant and its relative position with respect to the plasma edge [18]:
where and . If no root of this equation exists with a positive real part, the plasma is stable. Compared to the corresponding expression in [18], Equation (35) presents a factor in the numerator of the right hand side, given the use of the “poloidal” Alfvén time . In addition, it differs by a factor 2 in the fraction before the term , due to the adopted definition for . Being Equation (35) a nonlinear expression of shape , a Newton algorithm has been developed to compute the predicted growth rate , to compare it with the one obtained from the SpeCyl code with an equivalent setup. The general solution of Equation (35), valid for both RWMs and external kink modes, is shown as a function of wall proximity in Figure 2 (red curve for RWM), for the case of the mode with . For an ideal wall, and so the corresponding dispersion relation reads
This is the specific case of the external kink mode that corresponds to the green curve in Figure 2. This mode becomes unstable when the ideal shell is placed further from the plasma than the critical proximity , where is the position of the shell. The threshold
just mentioned is obtained by imposing , in Equation (35) and reads
For and , it follows that . Without any wall surrounding the unstable plasma, which means for , the instability growth rate in the so-called no-wall limit is obtained. The latter obeys the expression indicated by the horizontal dashed line in Figure 2:
Finally, an approximation of Equation (35) is valid in the regime for which the growth rate is sufficiently small, i.e., when (which implies assuming the typical condition with ). This approximation neglects the role of plasma inertia: the condition coincides with having the MHD response of the system occurring on a timescale that results much slower than the Alfvén time. In such a case, the dispersion relation, shown by the blue curve in Figure 2, becomes
Only for small growth rates and when the wall position is placed close to the plasma edge, the agreement between the blue and the red curves is relatively good. In general, the plasma inertia cannot be neglected and plays an important role in the full dispersion relation of Equation (35). However, Equation (39) is useful because it shows that in the RWM limit (i.e., when ) for a given mode, a given equilibrium, and wall position, the growth rate is inversely proportional to the wall time constant .
Verification setup and preliminary tests
Setup and consistency check
| 5 | 2 | 0.05 | 900 |
Table 1. Parameters adopted for the simulations with SpeCyl.
The numerical setup adopted in SpeCyl to reproduce the same conditions and profiles that characterize Shafranov’s FCM described in the previous section is illustrated in Table I.
The inverse aspect ratio is set sufficiently small to retrieve the straight tokamak limit: is obtained by setting the plasma major and minor radius equal to and , respectively. The resistivity and the kinematic viscosity of the plasma are assumed to be uniform along the radial coordinate. In addition, previous studies[31] suggested setting both the plasma kinematic viscosity and the plasma resistivity equal to , as the best compromise to approach ideal plasma conditions in a visco-resistive MHD code. The adopted time-step is and the discretization along the radial coordinate employs mesh points equally spaced, selected after preliminary tests that showed satisfactory numerical convergence of the expected growth rate for such a value. The numerical simulations consider a spectrum of harmonics composed by the equilibrium axisymmetric mode (, ) and by 5 non-axisymmetric components, characterized by a fixed helical pitch , for .
The equilibrium fields , are self-consistently calculated in SpeCyl, combining Ohm’s law and a force-free version of the momentum balance equation[32]. For ideal plasma conditions, the plasma current roughly scales with the (uniform) inverse plasma resistivity: Figure 3(a-c) illustrates the resulting profiles obtained for , and . Panel (d) also represents the adopted plasma density, which is assumed to be uniform over the plasma domain. A vertical red line marks the edge between the plasma region and the surrounding vacuum.
Figure 3. Equilibrium profiles for the verification of SpeCyl against the Shafranov’s flat current model: panel (a) represents the circular cross section safety factor according to Equation (66); the plasma domain and the external vacuum region are separated by means of a red vertical line. The equilibrium magnetic fields are represented in panel (b), where the magnitude of the azimuthal field has the functional shape deduced in Equation (65). In panel (c), the plasma current density profiles are depicted. It is observed that , which is consistent with the relation assumed in the derivation of the analytical model, i.e. , when and according to the SpeCyl normalization. Panel (d) represents the plasma density, assumed to be uniform in the computational domain.
The analytical FCM assumes a free plasma-vacuum interface at . To reproduce this condition in SpeCyl, the time-scale of the inner shell is set such that . This results in a transparent wall (instantaneous magnetic diffusion, negligible wall conductivity) consistent with the free boundary treatment, which has already been proven to be a suitable set-up for the modelling of free boundary MHD linear modes[31], due to the 3D velocity BCs (see Section II). Consequently, the second wall time constant (denoted as in the theoretical derivation of § 0.5) will be the only shell time constant whose values will be varied in the verification of the FCM discussed below, thus acting as the only effective conducting structure. In the rest of the paper, the attention is focused on the mode . The initial equilibrium[32], is destabilized by means of a velocity perturbation whose magnitude is set by , which reads:
A consistency test is devised to check the effective numerical implementation of the set of equations that make up the new boundary module. Given a typical SpeCyl simulation of a RWM with the new boundary conditions developed in § 0.4, the test considers the continuity of across neighbouring media for each time-step of the SpeCyl workflow: in correspondence with the plasma edge , it compares the evolution of , when obtained according to the two routes onto which Equations (19), (20) are built. The plasma side expression (in dashed red) computes the tangential components via
the generalized Ohm’s law, reading:
while the vacuum side expression (in black) results in a particular version of (11), which reads as follows:
Equation (41) evaluates plasma fields at the time frame , numerically determined according to the MHD equations solved in the plasma domain. Equation (42) considers numerically computed plasma fields together with the resistive shell fields at , and magnetic field expressions based on double vacuum coefficients , presented in the Appendix A. The test is particularly meaningful due to the intrinsic non-linearities involved in the timestepping scheme[27, 30] and because the electric field is not directly evolved by SpeCyl. Equation (41) and Equation (42) are here computed in post-processing and combine the multiple dependences on all modes of , . In this sense, the agreement displayed in Figure 4 for the entire duration of the simulation tested, including both the linear growth phase and the nonlinear saturation phase, is significative. and are evolving almost identically when comparing their plasma side value and their vacuum side value. This confirms the new BCs are correctly framed into the SpeCyl iterative and modal dependent structure, determining a coherent evolution of the simulated quantities. The smooth behaviour in the saturation phase highlights the absence of edge field errors when the amplitudes of the harmonic components entering the convolutions are of comparable magnitude.
Figure 4. Comparison of the edge tangential electric fields in panel (a) and in panel (b), considering the case: mode , safety factor , shell position and wall constant . For both the azimuthal and toroidal electric fields, the plasma expression in is compared to the vacuum expression in , for the whole duration of the simulation.
Comparison of SpeCyl profiles with the linear theory
This subsection presents the dynamics and field profiles of a SpeCyl simulation with the new BCs (covering both the linear and nonlinear phases) and comparison with Shafranov’s FCM linear analytical theory. The same simulation already introduced in the previous subsection is considered with , , resulting in an unstable RWM. The outcome of the simulation is reported in Figure 5. Panel (a) of Figure 5 shows the evolution in time of the value of at the plasma boundary (red curve) and at the resistive shell (blue curve): a linear stage and a nonlinear (or saturated) stage can be identified in both curves. Panel (b) displays the evolution in time of the azimuthal magnetic field discontinuity across the two shells, obtained as
Figure 5. Features of a typical SpeCyl simulation using the new BCs, with , and . In panel (a), the time evolution of edge radial magnetic fields is shown. The red line denotes the at the radial position, while the blue line denotes the at . A linear and a saturated stage are present in their evolution. The black dashed line represents the linear fit employed to estimate growth rates linear trend. The vertical green dashed line identifies a time snapshot in the linear stage and the cyan one has the same role for the saturated stage. The same colours are employed in the subsequent panels. Panel (b) adopts the same approach of panel (a) to represent . Panel (c) shows the profile over the radial coordinate, for the two time snapshots in the linear and nonlinear phases, respectively. The linear behaviour matches the Shafranov’s flat current model analytical expectations, indicated by the dashed black line. The cyan saturated profile displays a smoother behaviour at the plasma edge. The vertical dashed lines represent the two thin shells at (red) and at (blue).
For the plasma edge, the notation refers to the field value at in the plasma domain, while the notation refers to the vacuum field value at . For the shell in , refers to the field value computed in the inner vacuum region, while refers to the field values in as computed in the outer vacuum region. The azimuthal magnetic field discontinuity is directly related to the axial electric field because of (11) and Ohm’s law for the resistive shell gives the corresponding current density.
The red curve in panel (b) of Figure 5 represents the discontinuity of for the shell in having the wall time constant set as : its magnitude over time is small (), meaning that the azimuthal magnetic field is nearly continuous when comparing its plasma value and its vacuum value. This confirms the transparent wall nature of the inner shell, for which the magnetic field diffusion is almost instantaneous with respect to the plasma mode timescales. The blue curve in the same panel refers to the shell in , for which : the magnitude of the time evolution of is larger due to the finite conductivity of the shell.
Panel (c) of Figure 5 shows the radial profile of the magnetic field component (the eigenfunction) for both the plasma and the double vacuum region. Outside the plasma domain, the profile from SpeCyl is extended using a combination of Bessel functions that arise as a solution of the cylindrical Laplace problem (see Appendix A) for the double vacuum region associated with . In the plasma domain , the green profile, which refers to the linear stage of the mode, increases as a linear function in . Indeed, the FCM (introduced in § 0.5) is also reported for comparison as a black dashed line: the predicted eigenfunction (see Appendix § 0.7.3) is characterized by a very simple analytical solution, which goes linearly with and matches the simulation results.
The radial derivative of the linear profile (in green) is discontinuous across the thin shell in with wall time constant , due to the presence of a transient localized current. In fact, according to Equation (10), the evolution of the radial magnetic field across the resistive shell is driven by the slope imbalance of in the two regions. A resistive thin shell will then damp the currents over the penetration time . The linear profile (in green) also shows an apparent discontinuity in its radial derivative for , which is not expected due to the transparent wall nature of the inner shell. A closer inspection of the linear profile confirms that the discontinuity of the radial derivative is localized just inside the edge of the plasma domain (), where surface currents3, induced by RWM instability, occur. In the large aspect ratio limit, the axial component of such a current perturbation is predominant. The perturbation is associated with a discontinuity in and, due to the solenoidal condition for , it also determines the discontinuity mentioned above for . The presence of surface current perturbations in the linear phase of free-boundary instabilities, such as external kinks and RWMs, is expected from analytical theory[46] and was already discussed in the SpeCyl external kink simulations[31].
Finally, to conclude, in panel (c) the radial profile associated with a saturated time snapshot is represented in cyan: the linear character in the plasma is lost and the profile is smoother across the resistive shell in (even if the discontinuity is not completely removed), because the mode has almost completely penetrated it. In other words, the cyan profile in the region resembles the one valid for a single vacuum, as if the outer shell was not present.
Extended verification study: comparison of growth rates
The verification of the new BCs in the SpeCyl code focuses on the mode, addressing the main parameters that affect the RWM stability. In particular, three tests are proposed to verify the correctness of the implementation, with the objective of reproducing the FCM growth rates. The first is based on SpeCyl simulations for three discrete wall time constants , while spans a range between 1 and 2; the second test considers two values of and a wide range for the dimensionless variable . Both tests are associated with a specific equilibrium, being fixed. The third test aims, instead, to demonstrate the robustness of the new boundary module against variations in the equilibrium configuration, in a similar way with respect to the analysis found in Ref.[47]. The FCM determines a uniform safety factor profile across the radial coordinate; therefore, the variations of correspond to different flat current values and equilibria. These tests add to previous verification studies of the SpeCyl code[30, 31], including for the first time the RWM stability.
Verification with respect to the shell proximity
The linear growth rates resulting from SpeCyl are obtained by fitting the amplitude of the radial magnetic field during the linear phase, as exemplified in panel (a) of Figure 5. The results of the first test are shown in Figure 6: the new version of SpeCyl reproduces the analytical growth rates with good agreement, especially in the RWM regime when the wall position is close to the edge of the plasma. In addition, the threshold for the transition of the RWM into an external kink (around the critical proximity threshold , depicted as a black dotted vertical line in Figure 6) is correctly captured by SpeCyl growth rates: the solid blue line valid for shows a steep increase in the growth rate value close to , as expected from the change in the nature of the mode. The transition is progressively less steep for the other two curves with increasingly small wall time constants, because of the smaller difference in the growth rate between the RWM and the external kink mode regimes. For other cases, at larger values and for smaller wall time constants (i.e. for low conductivity shells), the presence of an offset between the predicted growth rates and the simulated ones is observed.
Figure 6. Comparison of growth rates estimates obtained by means of SpeCyl and the numerically solved dispersion relations. The asterisks are the SpeCyl estimated growth rate values, while the three solid lines are the analytical predictions, obtained for a discrete each and in a range of between 1 and 2. The edge safety factor considered is and the focus is on the mode.
The relatively small offset reaches its asymptotic value for large values: this is evident when comparing the numerical and analytical no-wall limit growth rates, approached for increasing values of . SpeCyl reproduces ideal MHD instabilities on slightly longer timescales with respect to the ideal plasma embedded in the analytic theory, especially in the external kink regime. This is consistent with the fact that the best agreement is achieved for relatively small growth rates, such as those of the RWMs. A possible explanation for the observed offset of the numerical growth rates with respect to the analytical ones in the no-wall limit is related to the ideal plasma conditions () assumed by the analytical theory. The SpeCyl code solves a more complete set of equations that assume a visco-resistive plasma (, are small but finite). It is therefore reasonable to expect the plasma non-idealities to introduce an additional effect with respect to the plasma inertia accounted for in the analytical theory. Indeed, as observed in Refs.30,31, the agreement with ideal theory improves as the visco-resistive dissipation is reduced (i.e., when , are increased), although the discrepancy could not be entirely removed.
Verification with respect to the wall time constant
The second test addresses the verification of the impact of the wall time constant. Figure 7 confirms the good agreement shown by the first test. In this case, growth rates are reported for two discrete wall positions and with the wall time constant covering six decades. The bi-logarithmic representation is consistent with the one given in Refs.^{42,48} and allows the inverse dependence of on the wall time constant to be shown when investigating a close-fitting configuration (see Equation (39)). Figure 7 displays two solid curves: the blue corresponds to a wall position further from the plasma than the critical threshold (thus the kink mode still is unstable even if the wall was perfectly ideal), while the red is obtained for a wall position within such a threshold (thus the kink mode would be completely stable in the ideal wall limit: in this sense, only the red line represents a proper RWM). The critical threshold is also represented as a dotted black line. The growth rate estimates are in good agreement with the expected trend.
Figure 7. Comparison of growth rates estimates produce by SpeCyl and the numerically solved dispersion relations for two discrete values of , with spanning over six decades. The solid lines are the analytic predictions, while the asterisks are the SpeCyl estimates. The edge safety factor is , for the mode .
Verification with respect to the reference equilibria
The third verification test is reported in Figure 8. In this case, SpeCyl simulations are performed for varying , with fixed wall position and wall time constant . The quantity represented on the y-axis incorporates the value of the edge safety factor, according to the treatment given in Refs.[31, 47]. The new version of the code is confirmed to be capable of producing reliable growth rate estimates also as the initial equilibrium is varied. The average relative error is found around 6%, at most. In particular, a better agreement with the analytical growth rates is confirmed for the RWM regime (i.e., the range between and ). Figure 8 represents a black dashed line for the edge safety factor value corresponding to the transition from RWM to an external kink: the threshold value is obtained by inverting the proximity threshold expression of Equation (37) and fixing the wall position . For , the discriminating edge safety factor is : those equilibria characterized by are associated with a RWM instability, while those equilibria for which are prone to an external kink instability. In conclusion, the general result of the three tests is that the simulations performed with the new boundary module predict growth rates that agree well with those computed by the linear analytical model. In particular, the mean relative error is found around 6%, when analysing the entire set of simulations. A much smaller error around 3 − 4% was found in the RWM regime with small growth rates. It should be noted that a similar magnitude of the discrepancy (∼ 6%) was observed when investigating the results of simulations performed with the previous version of the code[31]. In that case, using the external kink dispersion relation (Equation (36)) as a reference and considering , the maximum discrepancy was found around 6%, as in the present study.
Figure 8. Comparison of growth rates estimates for the mode, obtained by means of SpeCyl (asterisks) and the numerically solved dispersion relation (blue curve) for with in the range between 1 and 2, for a fixed shell position . The other solid lines are the limit cases analytical predictions: the black one corresponds to the no-wall limit, while the red one is the ideal wall limit. The black dashed vertical line represents the critical edge safety factor (uniform and equal to due to Shafranov’s model assumptions), separating the equilibria destabilized by a RMW and those destabilized by an external kink.
Benchmark against RFX-mod device modelling
A second verification study of the new SpeCyl code is now presented, adopting a class of large aspect ratio equilibria initially studied by Wesson[5, 44], which replaces the FCM used for the just discussed extensive verification. The Wesson’s model allows simulations with more realistic safety factor profiles and has been shown to reproduce (when realistic parameters for the conducting structures are employed) the spontaneous RWM growth rates observed in the RFX-mod machine operated as a circular cross section low-current Ohmic tokamak[25]. The spirit of this section is to compare the SpeCyl linear growth rates prediction with those obtained with RFXlocking[49] simulations, using the same setup with current profile and shell parameters aiming at reproducing tokamak experiments in the RFX-mod device, as described in Ref.25. This activity constitutes a preliminary step in view of future validation studies[50] of the new SpeCyl code developed within this work, directly against the RFX-mod experimental measurements.
RFXlocking is a cylindrical code for the solution of the MHD force-balance equation (Newcomb’s equation) in the zero-pressure formulation, coupled with models for passive and active conductive structures surrounding the plasma. It was developed to model the feedback control of Tearing Modes (TMs) in the RFP configuration of the RFX-mod device[49] and later adapted to study both RWMs[25] and TMs[51] in RFX-mod tokamak discharges. The code is also used for other devices, such as JET[52]. In the study[25] targeted for this second verification test, the Wesson’s current profile was adopted with , to obtain a safety factor profile consistent with estimates from target RFX-mod tokamak discharges, with and . These profiles are represented in Figure 9. The code employed the realistic aspect ratio for RFX-mod (with plasma minor
Figure 9. Wesson’s profile for the equilibrium axial current and corresponding safety factor .
and major radius equal to m, m, respectively) and the actual position and time constants of the passive structures corresponding to the Inconel alloy vacuum vessel ( m, ms) and of the Passive Stabilizing Shell (PSS)[53] made of copper ( m, ms). In the absence of feedback control, the natural growth rate of the RWM was calculated by RFXlocking to be equal to s, very close to the value of s measured in the target RFX-mod tokamak discharge.
The same numerical setup has been reproduced in the SpeCyl code, with the main difference, with respect to RFXlocking, that the inner resistive wall is by construction located at the plasma radius . For this reason, a scan in has been performed, from the most conservative assumption of a transparent wall (), for which higher growth rates than in RFXlocking are expected and thus requiring a tighter control law, to the least conservative condition when the actual time constant of 3 ms is used, as in RFXlocking, although with the wall touching the plasma. Regarding the outer conducting shell, the proper shell proximity is used, with three values of the PSS time constant: the nominal value of 100 ms for a thin copper shell, the effective value of 125 ms as estimated in RFX-mod by penetration of the vertical field () in vacuum (and interpreted as the effect of the outer mechanical stainless steel support structureRef. 54), and an intermediate value of 115 ms. It is worth remarking that the shell time constants estimated in Ref. 54 must be doubled for direct comparison with those of this work, as they are based on a definition that differs by a factor of 1/2 from that of Equation (12). Such wall time constants are converted into dimensionless units, required in SpeCyl, by computing the Alfvén time consistent with the RFX-mod plasma parameters taken from Ref. 25 and listed in Table II. The Alfvén time obtained is . The resulting wall time constants in Alfvénic units are (corresponding to 3 ms) and (corresponding to 100 ms).
| Core electron density | ||
| Plasma current | ||
| Minor plasma radius | ||
| Inverse aspect ratio | ||
| Edge safety factor |
Table II. Experimental parameters for the target RFX-mod tokamak discharges for Resistive Wall Modes studies, as found in Ref. 25.
The resulting growth rates, converted into physical units, are represented in Figure 10. The flexible setup characterizing the new version of SpeCyl allows for a sensitivity analysis. Looking from left to right, for transparent wall conditions at (), is insensitive to the inner shell and depends only on , while, as grows to large values, decays. The blue curve in Figure 10 is the reference and obtained for a PSS with a wall time constant . The curve shows the growth rate behaviour as the first wall at the plasma edge moves from a transparent wall setup to the effective wall constant value for the Inconel vessel (rightmost value corresponding to ). For the transparent wall limit, SpeCyl predicts the () RWM growth rate as , while for the realistic it gives . As a reference, the value of was produced by RFXlocking simulations[25], which was shown to be in good agreement with the experimental observations for RFX-mod, giving , as already mentioned. A similar trend for varying is observed in the other two curves for , , although with lower growth rates consistent with the longer time constants of the stabilizing shell.
Figure 10. SpeCyl estimates for growth rates obtained with the setup in Ref.[25].
Overall, the natural growth rates computed by SpeCyl fall in the correct order of magnitude as predicted by RFXlocking and observed in the target RFX-mod experiments. The best agreement is found for the nominal value of (as in RFXlocking) and in the transparent limit of the inner wall. On the other hand, when the inner wall is included with the nominal time constant as in RFXlocking, the resulting growth rate is 25% smaller than what the latter predicted. However, it must be kept in mind that the SpeCyl result must be regarded as conservative because the inner wall is placed at the plasma boundary instead of being located at a finite distance as in RFXlocking, in which, due to the presence of graphite tiles, there is a 3 cm gap between the plasma edge and the inner wall location. In addition, RFXlocking neglects plasma inertia, whereas SpeCyl accounts for it. Therefore, the outcome of this second and more realistic verification exercise of the new SpeCyl boundary module can be said to be substantially satisfactory and to confirm the improved predictive capabilities of the new code version. Future investigations will address a more in-depth validation with respect to RFX-mod observations and will also aim to deliver predictions for the upcoming RFX-mod2 device.
Summary and final outlook
This paper presents a fundamental improvement of the SpeCyl boundary module: a double shell/double vacuum treatment for the magnetic field was derived and self-consistently merged with the pre-existing free flow treatment at the plasma edge[26], enabling the simulation of RWMs. This task required the numerical implementation of new equations in the boundary module, addressing a double wall and a double vacuum dynamics compliant with the spectral and nonlinear nature of SpeCyl. A successful extensive verification against Shafranov’s analytical theory was performed for the (, ) resistive wall and external kink modes, based on a set of different equilibrium configurations characterized by uniform current profiles. Next, flexibility in the choice of the wall positions and of the wall time constants was fully exploited for the second satisfactory benchmark study against RFX-mod tokamak modelling, which proved the abilities of SpeCyl towards realistic experimental modelling and growth rates prediction. The two verifications confirmed the predictive capabilities of the numerical tool in the case of a circular section large aspect ratio tokamak and opened the path for the further use of SpeCyl for physics-based studies focused on the RFX-mod[53, 55] and RFX-mod2[56, 57] machines, in both RFP and tokamak configurations. In summary, the magneto-fluid boundary conditions are now addressed in the SpeCyl code with high-fidelity and self-consistency, enabling a reliable estimation of growth rates for free boundary instability scenarios. These features (similarly to the case of VDEs[14, 58, 59]), are crucial for the simulation of RWMs, ubiquitous and dangerous modes arising from the unavoidably finitely conducting structures enclosing the plasma.
This study is part of a wider effort[60, 61] aimed at improving the predictive capability of the SpeCyl code with a focus on both the tokamak and specifically the RFP configuration[62, 63], which is actively investigated at Consorzio RFX (Padua, Italy). The coupling between internal MHD dynamics and a realistic magnetic front-end in the RFP configuration will be the subject of future investigations concerning the magnetic feedback control of the experiments. Adopting the double shell implementation as a basis, the further inclusion of feedback control coils is believed to be important for numerical studies on RFX-mod and RFX-mod2[64, 65], also considering the RFP interest in the improved confinement Quasi Single Helicity (QSH) states[36, 60, 66]. These are self-organized states characterized by a large scale helical structure, with the dominance of one saturated mode over the rest of the spectrum. Until now, numerical investigations of QSH states have relied on the enforcement of Magnetic Perturbations (MPs) at the plasma edge: these externally set perturbations confirmed the possibility of inducing the selected helical state, driving the QSH plasma rearrangement[66], and were able to sustain the achieved RFP configuration[67] on time scales longer than the penetration time of passive resistive shells. In addition, MPs were proven to be essential to mitigate sawtooth activity in MHD tokamak modelling[68]. In general, the aim of these MPs was to mimic a modal radial magnetic field[66] at the plasma edge (which in real experiments is produced by control coils): the double shell implementation discussed in this work could make this picture even more realistic, since the second resistive shell located in the double coaxial vacuum (and the planned feedback control coils) is expected to naturally and self-consistently sustain the radial magnetic field modes at the plasma boundary. Moreover, the double shell implementation will improve the estimation of the expected MHD perturbation levels[64] at the RFX-mod2 boundary, which is crucial for a quantification of plasma-wall interaction determining the attainable high current plasma regimes. To conclude, the new implementation of SpeCyl achieved with this work allows for further physics-based studies aiming to closely reproduce the experimental settings.
Author Contributions
Francesco Galeazzi: Conceptualization (lead); Software (lead); Formal analysis (lead); Investigation (lead); Methodology (lead); Visualization (lead); Writing – original draft (lead); Writing – review & editing (lead). Daniele Bonfiglio: Conceptualization (lead); Writing – original draft (equal); Writing – review & editing (lead); Formal analysis (equal); Investigation (equal); Methodology (lead). Luca Spinicci: Conceptualization (equal); Writing – review & editing (lead); Formal analysis (equal); Investigation (equal); Methodology (equal). Susanna Cappello: Conceptualization (equal); Writing – review & editing (equal); Investigation (equal); Methodology (equal); Supervision (lead).
Acknowledgments
The authors would like to thank the colleagues G. Marchiori and P. Zanca for helpful discussions and valuable suggestions during the development of this paper. This work has been partially supported by the Program Implementation Agreement PRN MASE - ENEA of 2024/07/12 for activities set out in Art.3 c1d D.M. n. 386 2023/11/17 and Consorzio RFX. This work has been partially funded by the EPSRC Fusion Grant 2022/27 [grant number EP/W006839/1].
Declaration of interest
The authors have no conflict of interest to disclose.
Data availability statement
Data supporting the findings of this study were obtained using SpeCyl (Consorzio RFX non-public code) and are stored on a private computing server. The data are available from the corresponding author upon request, subject to authorization from Consorzio RFX.
Double vacuum coefficients
This section provides details about the magnetic field in the double vacuum region surrounding the cylindrical plasma. In addition, the expression of the double vacuum coefficients employed throughout the investigation is shown. In the vacuum surrounding the plasma, there is no charge or current density: the (quasi) magneto-static problem descends from the Maxwell equations assuming , . The irrotational character of the magnetic field is met if each Fourier mode of the magnetic field satisfies
where is a scalar modal potential of shape
Using the solenoidal condition, the Laplace equation is obtained; its version in cylindrical coordinates gives the modified Bessel equation for :
The potential then has the following expression, when , and taking advantage of the subscript to address the vacuum region for which the expression holds:
The constants are determined by suitable boundary conditions, and are the modified Bessel functions69 of order . The most general shape of this potential is introduced in the next lines, while a discussion of special cases (either the case of large aspect ratio equivalent to , and the axisymmetric case ()) can be found in Ref. 26. The general double-vacuum expressions for the magnetic field components are obtained by solving two BVPs accounting for the magnetic behaviour in correspondence of the vacuum domain edges: for a perfect conductor, the normal component of is null, and so . For resistive materials, the sustained can be different from zero. In general, the tangential components of are free but must meet the solenoidal condition. These physical conditions are related to using Equation (44), which implies . The first BVP to determine is solved in the vacuum region for which , assuming two finite values for at the edges. These are , , determined according to the dynamics of the corresponding thin shell described by Equation (10). Such fields are the computational unknowns managed and evolved by SpeCyl, resulting fundamental in defining the equations of the renewed boundary module, as presented in § 0.4. The second BVP to determine is solved in the vacuum region for which and imposes , as boundary values. The ideal wall radius, i.e. , is typically set to a large value, so that the presence of such a wall does not affect the dynamics and is only used to close the system of equations. However, if needed, it can also be placed at a finite distance to the plasma and other conducting elements, for instance to represent a thick/quasi-ideal structure.
The modal values of are reported below, built as combinations of the derivatives of modified Bessel functions (denoted , ) and highlighting the role of shell-fields. Each of the two vacuums is addressed by the subscript :
These constants are constructed according to:
Taking advantage of the latter expressions, the radial magnetic field modes result as follows, for the first and second vacuums (see Equation (14) in Section III):
Along tangential directions , Equation (44) combined with the assumed periodic character causes algebraic conditions dependent on the shape of to arise. These yield, taking advantage of Equation (47):
and
Equations (A9), (A10) are rewritten to highlight the role of , and evaluated for , to comply with their use in Equations (31), (32) of the renewed boundary module aiming at enforcing the continuity of tangential electric fields for the thin shell in :
These, in turn, require the definition of (again ):
This appendix ends by presenting the double vacuum coefficients requested by the evolution of the general harmonic of the radial magnetic field in correspondence with the two thin shells in (Equations (25), (26)). Their expression is built on the expressions discussed so far and reads:
For , i.e. the large aspect ratio case, SpeCyl adopts suitable coefficients in which Bessel functions are replaced by polynomials of order .
MHD stability in the straight tokamak limit
The MHD linear stability analysis, employed for the derivation of the theoretical growth rates mentioned in this work, is here reviewed in the limit of a vanishing inverse aspect ratio tokamak with circular cross section. The study departs from a static equilibrium () and adopts a perturbative perspective, having the poloidal flux function and the instability growth rate as the main unknowns of the problem. Equilibrium quantities are denoted by the subscript “0”, and perturbed quantities are denoted by a “” placed before their respective symbols. The starting MHD equations4 are the linearized momentum equation (which in principle considers the pressure contribution) and the linearized induction equation (the second is generated by a suitable combination of Equations (2) - (5)), as follows:
In the derivation of these equations from the basic MHD plasma modelling, the density field has been assumed constant, in compliance with the approach followed by SpeCyl5. The perturbed velocity and magnetic fields ( and , respectively) are as: , , where is the axial (or toroidal) unit vector and and are the poloidal flux function and the stream function, respectively. The main unknown is , because the ideal version () of Equation (58) produces the relation . The modal expression for is written as follows, so that Equations (57), (58) are Fourier transformed in the periodic coordinates , :
The two key elements in Equation (59) are the mode eigenfunction and the mode growth rate . Two important relations involving are:
The first arises from the indefinite partial time-integrated ideal perturbed evolution equation for , once set and where is the plasma displacement. The factor is a function dependent on the mode and equilibrium considered. Its expression reads
in which the superscript denotes equilibrium fields. The second condition arises directly from the radial projection of , in which the perturbed radial magnetic field is rewritten as , in accordance with the SpeCyl notation. From now on, the modal indices appearing in , are removed to access a more compact notation. The Laplace operator acting on the scalar field , decomposed into its orthogonal part (the one associated with coordinates ) and into its parallel part (associated with coordinate ), reads
The perpendicular part enters the main theoretical tool adopted to derive the dispersion relation, whereas the parallel term vanishes in the large aspect ratio limit. The torque balance equation (also adopted in Ref.⁴⁰) describes the electromagnetic torques acting on the unstable plasma column and is now derived in the ideal limit of MHD, i.e., assuming vanishing plasma resistivity and dynamic viscosity . An equation for is obtained by applying the curl to the perturbed momentum balance equation (Equation (57)) and isolating its component, after some manipulations:
The previous equation involves the safety factor for a circular cross section toroidal plasma, as expressed by Equation (34). Through , the specific version of the torque balance equation (Equation (64)) will depend on the equilibrium profiles adopted for , (or equivalently ), and . The next step consists of integrating the torque balance equation over the radial coordinate, after having assumed a specific shape for the above mentioned profiles. The integration makes then evident that the only relevant quantities entering Equation (59) are and , as anticipated. These results are basically equivalent to those achievable with the Energy Principle⁴⁵,⁷⁰, whose main unknown is the plasma displacement . This second approach is only briefly outlined to present some of its basic features necessary to define the characteristic features of the Shafranov’s FCM: in particular, it will yield the shape for . Plasma displacement is Fourier decomposed as , in which the plasma modal displacement is . The equivalence of the two methods is discussed in Ref.³¹ and is based on the relation already presented, i.e. Equation (60). The result presented so far will now become particular, once the profiles are given a specific shape.
Analytic details on the Shafranov’s FCM
The Shafranov’s flat current model[38] assumes for the equilibrium axial current density and mass density a sharp step profile in correspondence to the plasma edge, expressed as , . The static Ampère-Maxwell law projected along allows writing the poloidal component of at equilibrium:
The axial magnetic field is assumed to be uniform, i.e. . These results allow computing the expression of the safety factor, where :
These two profiles (represented in Figure 3) are crucial to characterize the torque balance, i.e. Equation (64). Once substituted and having introduced a suitable numerical factor proportional to , the torque balance equation reads
The latter is singular when a resonance is met, i.e., when . In the current investigation and the resonance radius is externally localized with respect to the plasma. Equation (67) holds for and is rewritten multiplicating by and eliminating the function from all terms because its radial partial derivative can be expressed proportionally to , i.e. . The meaning of , is clear from Equation (59). The resulting equation is further integrated on the radial coordinate, as anticipated in the previous section, defining a suitable integration domain across using positively and negatively displaced radii addressed by means of , . This procedure is simplified by the presence of Dirac delta functions, generated by the partial radial derivatives of quantities dependent on the Heaviside step function: , . The polynomial term arising in (the one associated with the partial derivative in , see Equation (63)) is neglected because its continuity in cancels the corresponding contribution after integration. By doing so, the right hand side of Equation (67) is rewritten as the partial radial derivative of a product containing a Heaviside step function, which then cancels out the corresponding contribution for . The torque balance equation describes the electromagnetic torques that develop when the equilibrium is perturbed, ending in a differential condition for that indeed describes the linearized modal-dependent dynamics of the unstable cylindrical plasma:
The square brackets in the first term denote the evaluation across the radial position , generating two terms (for , ). The expected discontinuity of is often referenced in the kink or tearing mode investigation literature[40, 41] using the symbol . The previous condition is used as the first boundary condition to solve a suitable BVP for in the vacuum surrounding the plasma, where it obeys . The shape of this general solution is easily retrieved when solving Equation (67) in vacuum, i.e. for vanishing current and density . The second boundary condition arises by integrating over the diffusion equation for the magnetic field perturbation in a thin shell at , generated from Equation (58) when the flow field is vanishing, i.e.:
The solution of the BVP produces the dispersion relation of the mode, conveyed by Equation (35), which accounts for both the plasma response at the MHD level (condition (C4)) and the presence of the thin resistive wall in (described by condition (C5)). Although only a single resistive shell has been included in the analytical model presented here, the discussion can be extended to multiple wall configurations[18] and also to the direct inclusion of feedback coils.
The appendix ends by showing how Shafranov’s flat current model assumptions are employed to predict the shape for the radial magnetic field modes, given all the elements introduced so far. To obtain or , the easiest route is to rely on results that can be derived starting from the final considerations of Appendix B. By simple arguments departing from the Energy Principle[45, 70] and setting the analysis in the straight tokamak case for an incompressible plasma with negligible pressure gradients[31], the plasma modal displacement results in the (poloidal) plane and reads:
where is the edge value of the radial displacement and plays a role similar to . For the mode , the radial plasma displacement results in a linear function in , because . Given the same mode and taking advantage of the equilibrium profiles characterizing the FCM (Equation (65)), the shape of the factor results:
Combining the last result with Equations (60), (61) produces the analytical shape for radial magnetic field mode in the plasma domain. It results in a linear function in , as is for . In fact:
The analytical shape prediction for is used in Section VI, where the comparison of the analytical radial profiles with the one obtained in a typical SpeCyl simulation is provided.
References
References
- [1]I. Bandyopadhyay, V. Igochine, O. Sauter, S. A. Sabbagh, J.-K. Park, E. Nardon, F. Vilone, M. Maraschek, G. Pautasso, N. Eidietis, et al., Nuclear Fusion 65, 103001 (2025).
- [2]Tokamak Disruption Simulation Project, https://tds-scidac.github.io/gallery/ (2023).
- [3]D. Biskamp, Nonlinear Magnetohydrodynamics (Cambridge University Press, 1993).DOI
- [4]R. S. Granetz, I. H. Hutchinson, J. Sorci, J. H. Irby, B. LaBombard, and D. Gwinn, Nuclear Fusion 36, 545 (1996).
- [5]J. A. Wesson, Tokamaks, 3rd ed. (Oxford University Press, 2004) Chap. 6.
- [6]A. Marx and H. Lütjens, Plasma Physics and Controlled Fusion 59, 064009 (2017).
- [7]M. Siccinio, W. Biel, E. Fable, T. Franke, F. Janky, P. Lang, M. Mattei, F. Maviglia, F. Palermo, O. Sauter, M. Tran, S. Van Mulders, and H. Zohm, Fusion Engineering and Design 179, 113123 (2022).
- [8]C. Gimblett, Nuclear Fusion 26, 617 (1986).
- [9]M. S. Chu and M. Okabayashi, Plasma Physics and Controlled Fusion 44, R1 (2002).
- [10]M. L. Walker, P. de Vries, F. Felici, and E. Schuster, Fusion Engineering and Design 96–97, 87 (2015).
- [11]C. M. Bishop, Plasma Physics and Controlled Fusion 31, 1179 (1989).
- [12]S. Cappello and D. Biskamp, Nuclear Fusion 36, 571 (1996).
- [13]H. R. Strauss, A. Pletzer, W. Park, S. Jardin, J. Breslau, and L. Sugiyama, Computer Physics Communications 164, 40 (2004), proceedings of the 18th International Conference on Numerical Simulation of Plasmas.
- [14]S. Jones, L. Chacón, J. Hamilton, D. Barnes, and A. Yagüe-López, (2026), 10.48550/arXiv.2606.05446.
- [15]T. Hender, C. Gimblett, and D. Robinson, Nuclear Fusion 29, 1279 (1989).
- [16]D. Schnack and S. Ortolani, Nuclear fusion 30, 277 (1990).
- [17]E. A. Saad and P. R. Brunsell, Plasma Physics and Controlled Fusion 64, 055011 (2022).
- [18]18Y. Liu, R. Albanese, A. Portone, G. Rubinacci, and F. Villone, Physics of Plasmas 15, 072516 (2008).
- [19]19R. Fitzpatrick, Nuclear Fusion 33, 1049 (1993).
- [20]20M. G. Haines, C. G. Gimblett, and R. J. Hastie, Plasma Physics and Controlled Fusion 55, 055002 (2013).
- [21]21R. Sparago, F. J. Artola, and M. Hoelzl, Plasma Physics and Controlled Fusion 67, 045021 (2025).
- [22]22L. E. Zakharov, S. A. Galkin, S. N. Gerasimov, and JET-EFDA Contributors, Physics of Plasmas 19, 055703 (2012).
- [23]23F. J. Artola, C. R. Sovinec, S. C. Jardin, M. Hoelzl, I. Krebs, and C. Clauser, Physics of Plasmas 28, 052511 (2021), https://pubs.aip.org/aip/pop/article-pdf/doi/10.1063/5.0037115/13919605/052511_1_online.pdf.
- [24]24N. Isernia, V. D. Pustovitov, F. Villone, and V. Yanovskiy, Plasma Physics and Controlled Fusion 61, 115003 (2019).
- [25]25P. Zanca, L. Marrelli, R. Paccagnella, A. Soppelsa, M. Baruzzo, T. Bolzonella, G. Marchiori, P. Martin, and P. Piovesan, Plasma Physics and Controlled Fusion 54, 094004 (2012), published August 2012.
- [26]26L. Spinicci, 3D Nonlinear MHD modelling studies: Plasma Flow and Realistic Magnetic Boundary Impact on Magnetic self-organisation in Fusion Plasmas, Phd thesis (2023), joint research doctorate in Fusion Science and Engineering (XXXV Cohort).
- [27]27F. Galeazzi, Development of resistive wall boundary conditions in the nonlinear MHD code SpeCyl for magnetically confined fusion plasmas, Master’s thesis, Politecnico di Milano (2025), Advisors: Matteo Passoni, Daniele Bonfiglio, Luca Spinicci.
- [28]28D. S. Harned and W. Kerner, Journal of Computational Physics 60, 62 (1985).
- [29]29D. Schnack, D. Barnes, Z. Mikic, D. S. Harned, and E. Caramana, Journal of Computational Physics 70, 330 (1987).
- [30]30L. Spinicci, D. Bonfiglio, L. Chacón, S. Cappello, and M. Veranda, AIP Advances 13, 095111 (2023), published 11 September 2023.
- [31]31L. Spinicci, D. Bonfiglio, S. Cappello, and M. Veranda, Journal of Plasma Physics 90, 995900601 (2024), published December 2024.
- [32]32G. L. Delzanno, L. Chacón, and J. M. Finn, Physics of Plasmas 15, 122102 (2008).
- [33]33V. D. Pustovitov, Physics of Plasmas 15 (2008), 10.1063/1.2943711, 072501.
- [34]34G. F. Nalesso and S. Costa, Nuclear Fusion 20, 1890 (1980).
- [35]35L. Chacón, Physics of Plasmas 15, 056103 (2008).
- [36]36D. Bonfiglio, L. Chacón, and S. Cappello, Physics of Plasmas 17, 082501 (2010).
- [37]37A. Quarteroni, F. Saleri, and P. Gervasio, Numerical Mathematics, 2nd ed., Texts in Applied Mathematics, Vol. 37 (Springer, 2010).
- [38]38V. D. Shafranov, Soviet Physics – Technical Physics 15, 175 (1970).
- [39]39M. Hoelzl, G. T. A. Huijsmans, P. Merkel, C. Atanasiu, K. Lackner, E. Nardon, K. Aleynikova, F. Liu, E. Strumberger, R. McAdams, I. Chapman, and A. Fil, Journal of Physics: Conference Series 561, 012011 (2014).
- [40]R. McAdams, Non-linear Magnetohydrodynamic Instabilities in Advanced Tokamak Plasmas, Ph.D. thesis, University of York, York, UK (2014), chapter 5.
- [41]A. L. Becerra, Resistive Wall and Error Field Studies Using the Extended MHD Code NIMROD, Master of science thesis, University of Wisconsin–Madison (2016).
- [42]N. M. Ferraro, S. C. Jardin, L. L. Lao, M. S. Shephard, and F. Zhang, Physics of Plasmas 23, 056114 (2016).
- [43]A. Marx and H. Lütjens, Plasma Physics and Controlled Fusion 59, 064009 (2017).
- [44]J. Wesson, Nuclear Fusion 18, 87 (1978).
- [45]J. P. Freidberg, Ideal MHD (Cambridge University Press, 2014) Chap. 8, 11.
- [46]L. E. Zakharov, Physics of Plasmas 18, 062503 (2011).
- [47]M. Tanaka, T. Tsuda, and T. Takeda, Nuclear Fusion 13, 119 (1973).
- [49]P. Zanca, Plasma Physics and Controlled Fusion 51, 015006 (2009).
- [50]M. Greenwald, Physics of Plasmas 17, 058101 (2010).
- [51]P. Zanca, R. Paccagnella, C. Finotti, A. Fassina, G. Manduchi, R. Cavazzana, P. Franz, C. Piron, and L. Piron, Nuclear Fusion 55, 043020 (2015).
- [52]A. Tonel, L. Piron, P. Zanca, D. Terranova, E. Delabie, K. Kirov, M. Lennholm, S. Menmuir, P. Martin, J. Contributors, and E. T. E. Team, Plasma Physics and Controlled Fusion (2025).
- [53]P. Piovesan, D. Bonfiglio, and F. e. a. Auriemma, Physics of Plasmas 20, 056112 (2013).
- [55]S. Peruzzo, M. Agostini, P. Agostinetti, M. Bernardi, P. Bettini, T. Bolzonella, A. Canton, L. Carraro, R. Cavazzana, S. D. Bello, et al., Fusion Engineering and Design 123, 59 (2017), proceedings of the 29th Symposium on Fusion Technology (SOFT-29) Prague, Czech Republic, September 5-9, 2016.
- [56]S. Peruzzo, M. Bernardi, R. Cavazzana, S. D. Bello, M. D. Palma, L. Grando, E. Perin, R. Piovan, A. Rizzolo, F. Rossetto, et al., Fusion Engineering and Design 136, 1605 (2018), special Issue: Proceedings of the 13th International Symposium on Fusion Nuclear Technology (ISFNT-13).
- [57]L. Marelli et al., in Proceedings of the 50th EPS Conference on Controlled Fusion and Plasma Physics (–, 2024) 8–12 July 2024.
- [58]S. E. Kruger, C. R. Sovinec, D. D. Schnack, and E. D. Held, Computer Physics Communications 64, 34 (2004).
- [59]K. J. Bunkers and C. R. Sovinec, Physics of Plasmas 27, 112505 (2020).
- [60]R. Lorenzini, E. Martines, P. Piovesan, D. Terranova, P. Zanca, M. Zuin, A. Alfier, D. Bonfiglio, F. Bonomo, A. Canton, et al., Nature Phys 5, 570–574 (2009).
- [61]M. Veranda, D. Bonfiglio, S. Cappello, D. F. Escande, F. Auriemma, D. Borgogno, L. Chacón, A. Fassina, P. Franz, M. Gobbin, D. Grasso, and M. E. Puiatti, Nuclear Fusion 57, 116029 (2017).
- [62]S. Cappello, D. Bonfiglio, D. F. Escande, S. C. Guo, A. Alfier, and R. Lorenzini, AIP Conference Proceedings 1069, 27 (2008).
- [63]D. F. Escande, What is a Reversed Field Pinch? Rotation and momentum transport in magnetized plasmas, Vol. 2 (P. H. Diamonds, X. Garbet, P. Ghendrih, and Y. Sarazin, World Scientific, 2014) Chapter 6, pp. 247–286.
- [64]L. Marrelli, R. Cavazzana, D. Bonfiglio, M. Gobbin, G. Marchiori, S. Peruzzo, M. E. Pujatti, G. Spizzo, D. Voltolina, P. Zanca, et al., Nuclear Fusion 59, 076027 (2019).
- [65]L. Marrelli, M. Barbisan, P. Bettini, M. Brombin, L. Carraro, O. D. Pascale, G. Dilecce, L. Grando, N. Marconato, S. Peruzzo, et al., Nuclear Fusion 66, 076032 (2026).
- [66]D. Bonfiglio, M. Veranda, S. Cappello, D. F. Escande, and L. Chacón, Physical Review Letters 111, 085002 (2013).
- [67]R. Paccagnella, D. Terranova, and P. Zanca, Nuclear Fusion 47, 990 (2007).
- [68]D. Bonfiglio, M. Veranda, S. Cappello, D. F. Escande, and L. Chacón, Plasma Physics and Controlled Fusion 59, 014032 (2017).
- [70]J. P. Freidberg, Plasma Physics and fusion energy (Cambridge University Press, 2014).








