Scenario optimization for the tokamak ramp-down phase in RAPTOR: Part A. Analysis and model validation on ASDEX Upgrade

We discuss how the combination of experimental observations and rapid modeling has enabled to improve understanding of the tokamak ramp-down phase in ASDEX Upgrade. A series of dedicated experiments has been performed, to disentangle the effect of individual actuators like plasma current, auxiliary heating and plasma shaping. Optimized discharge termination strategies with increased margin with respect to radiative and vertical stability limits are proposed and tested in experiment. Radiative collapse of the edge Te profile after the HL back-transition is avoided by initially maintaining auxiliary heating during L-mode, showing beneficial effects even after the auxiliary heating is turned off. The capability of the RAPTOR code to model the time evolution of the internal inductance ℓi3 has been validated, including the effect of a change in the Ip ramp-down rate and the HL transition timing. The reduction of ℓi3 caused by rapid compression of the plasma cross-section has been quantitatively recovered in simulations. Successful modeling of the ℓi3 time evolution is essential to optimize ramp-down scenarios for future fusion reactors, for which vertical stability and power balance control will be more challenging.


Introduction
The development of safe ramp-down strategies is a critical challenge for the operation of ITER and DEMO.While integrated simulations of magnetic control and the kinetic profile evolution can improve confidence in the performance of optimized ramp-down strategies, it is crucial to test the applied models and observe the complex dynamics at play on presentday devices.The delicate operating space that has to be navigated in order to avoid physics limits has been described in [1], studying a multi-machine database.For various tokamaks, scenarios with dimensionless parameters matching the ITER baseline scenario have been developed, including JET [2], DIII-D [3], TCV and ASDEX Upgrade (AUG) [4].In these experiments, the available control techniques and modeling frameworks can be validated over the different operating phases, including the ramp-down.
The interplay of various operational constraints active during the ramp-down phase have been assessed in various tokamaks.In [5,6], ramp-down optimizations have been performed for TCV, AUG and JET.A faster plasma current rampdown rate was successfully executed on TCV for an ohmic L-mode: simultaneous reduction of the plasma elongation κ with the plasma current allowed to avoid an increase of the time derivative of the vertical magnetic field dB v /dt, which would cause a violation of the radial position control constraint.For AUG, a ramp-down scenario, starting from Hmode, was optimized towards a faster I p ramp.Like the TCV discharges, these optimized trajectories featured a simultaneous reduction of κ, increasing the margin with respect to the vertical stability limit.While experimental validation of these ramp-down traces was hampered by technical machine limitations, some experimental ramp-down traces have been shown in [5], hinting towards a positive impact of a fast reduction of the elongation on the increase of ℓ i3 .An active control scheme to limit the growth rate of the vertical instability, acting on κ and the inner-gap to the wall, has been demonstrated in DIII-D [7].A sufficiently fast reduction of the plasma current is needed to avoid extra central solenoid flux consumption during ramp-down, as illustrated by the ramp-down experiments of an ITER-like DIII-D scenario described in [8].In [9], active edge localized mode (ELM) control during JET termination phases has been studied, to maintain a sufficient density decay rate during H-mode and avoid the accumulation of impurities.
In the present work, an extensive set of AUG ramp-downs is considered.Most of these discharges belong to the AUG ITER baseline program, with nominal flat-top parameters for the on-axis magnetic field B 0 = −1.9T, the plasma current I p = 1.1 MA and the upper triangularity δ top ∼ 0.3.A set of interesting ramp-downs that have been performed within the H-mode density limit program (flat top: B 0 = −2.5 T, I p = 0.8 MA and δ top ∼ 0.0 − 0.3) is also shown.
Pre-programmed actuator time traces for heating, plasma current and shaping have been varied, to understand their relative importance in designing a safe ramp-down strategy, allowing us to make recommendations regarding the respective role of these various actuator traces in the balancing act of designing a reliable ramp-down scenario.The plasma shape is controlled in feedforward, setting the poloidal field coil currents for the expected evolution of plasma current I p and β pol , while β pol is controlled in feedback.
The focus of this work is modeling the impact of various physics drivers like plasma current, shaping and heating traces on the time evolution of the internal inductance ℓ i3 .During the ramp-down phase, the current density profile tends to become increasingly more peaked, increasing the value of ℓ i3 and making vertical position control of the plasma position more challenging.While on AUG, vertical stability is usually ensured by the presence of internal control coils and passive stabilization loops, vertical stability is projected to be an important operating constraint for ramp-downs of future machines.The importance of an optimized time evolution for ℓ i3 for DEMO will be illustrated in the subsequent paper, 'Part B: Safe termination of DEMO plasmas' [10].The capability of the RAPTOR simulator to model the time evolution of ℓ i3 on AUG during rampdown increases confidence regarding the DEMO simulation results.
The remainder of this paper is structured as follows.The workflow to perform post-discharge AUG ramp-down simulations in RAPTOR is discussed in section 2, including a description of the empirical heat and particle transport model and its tuning.The impact of the H-to L-mode (HL) transition timing and auxiliary heating during L-mode on the time evolution of the internal inductance and the margin with respect to a radiative collapse is studied in section 3.In section 4, the use of the plasma current ramp-down rate to tailor the time evolution of the internal inductance is investigated.Finally, section 5 considers changes of the equilibrium geometry during ramp-down.The experimental data includes a discharge featuring a rapid compression of the plasma column, for which the internal inductance and q 95 traces are successfully modeled in RAPTOR.Conclusions are reported in section 6.

Workflow for post-discharge simulations
The RAPTOR set-up applied in this section to model AUG ramp-downs is similar to the set-up that has been applied for ramp-up modeling and optimization of AUG advanced scenarios, as described in chapter 3 of [11] and [12], although a different transport model is applied.Electron heat and density transport and current diffusion along the radial dimension are solved for.The spatial coordinate ρ is defined as the square root of the enclosed toroidal magnetic flux, normalized with respect to the square root of the total toroidal magnetic flux enclosed by the last closed flux surface (LCFS).A gradient-based transport model [6,13] is applied, as presented in section 2.1.Note that the same set-up is used for the DEMO simulations in Part B [10].
Sawteeth are modeled with the Porcelli sawtooth model described in [14,15], triggering sawtooth crashes when the magnetic shear at q = 1 exceeds the critical value s q=1,crit = 0.2.The critical shear s q=1,crit is user-defined and can be adjusted to match the experimentally observed sawtooth period.

Heat and density transport model
The present work mainly relies on the gradient-based transport model in RAPTOR, as described in [6].The assumption underlying this empirical model is the existence of a region in the plasma core where plasma turbulence results in stiff behavior of the corresponding temperature and density profiles.The resilience of the plasma profile gradient scale lengths to increase beyond a critical value is a well-established plasma turbulence characteristic, both experimentally [16] and theoretically [17].The role of transport near the plasma edge in determining the overall confinement has been discussed in [18].
Within the gradient-based transport model, an analytical formula for heat and particle diffusivities is calculated, based on the assumption that in stationary state three radially separated regions are formed: (i) a central region ρ < ρ inv (= ρ q=1 ) with high transport, to mimic the profile flattening caused by sawteeth or other transport-enhancing phenomena (in the absence of a q = 1 surface, we put ρ inv = 0.1, as flattened profiles toward the magnetic axis can occur even in the absence of sawtooth activity, e.g. in the presence of kinetic ballooning modes [19]); (ii) an intermediate stiff core region characterized by constant logarithmic gradients λ Te = − d log Te dρ and λ ne = − d log ne dρ ; (iii) a pedestal region with linear gradients µ Te = − dTe dρ and µ ne = − dne dρ .
Under these assumptions, formulas for heat diffusivity χ e (ρ) and particle pinch V e (ρ) are derived in [20], with analytical dependencies on ρ, T e , n e , the local heat (or particle) flux and the parameters λ Te,ne and µ Te,ne .We repeat these formulas below, compacting the notation by introducing δρ inv = ρ−ρ inv ∆ρ inv and δρ ped = ρ−ρ ped ∆ρ ped .The function f(x) = 1 1+e x is used to implement a smooth transition between the three regions with different transport regimes, with ∆ρ inv and ∆ρ ped defining the widths of the transition areas: with D e = 0.2χ e , assuming the particle confinement time is about 5 times longer compared to the energy confinement time [21].The electron heat flux profile q e is evaluated at every Newton iteration of the RAPTOR implicit solver, by integrating the net electron heat source profile consistent with the kinetic profiles (subtracting the radiated power density).
Presently, the electron particle flux Γ e is set to zero, which is justified in the absence of significant particle sources.
As the logarithmic gradients in the core are assumed to be limited to a value slightly above the critical gradient of the dominant turbulent mode for a given scenario and tokamak, empirical values have been derived for H and L-modes on TCV, AUG and JET in [6].In the present work, we attempt to apply the characteristic logarithmic gradients that have been reported in [6] for H-and L-mode plasmas in AUG, i.e. for H-mode: λ Te = 2.3, ρ ped,Te = 0.9, λ ne = 0.5 and ρ ped,ne = 0.9; and for L-mode λ Te = 3.0, ρ ped,Te = 0.8, λ ne = 1.0 and ρ ped,ne = 0.8.
However, in section 3 we will find that a sudden transition from H-mode to an ohmic L-mode can cause a broad region with comparatively low temperature T e ∼ 10 eV, that in some cases extends to radii ρ ∼ 0.65 (edge cooling).The modeling of T e and n e profiles during this regime is improved by adjusting the gradient-based transport model characteristic logarithmic gradients to λ Te = 4.5, λ ne = 1.5, while maintaining ρ ped = 0.8.These settings are applied for those discharges where a direct transition from H-mode to a L-mode without auxiliary heating is programmed.
The gradient-based transport model implementation in RAPTOR does not rely on boundary conditions set at the pedestal top.Rather, the gradient parameter µ in the edge region is feedback controlled to match global confinement metrics, namely a reference for the line-averaged density and a reference for the confinement enhancement with respect to the IPB98(y,2) scaling law [22].The time traces of µ Te,ne are calculated by summing a feedforward and a feedback contribution.The resulting peripheral temperature gradient µ Te allows to match the prescribed electron confinement quality time evolution with respect to the scaling law, i.e.H e = τ E,e /τ scl . 6he resulting peripheral density gradient µ ne allows to match the prescribed trace of the line-averaged density, which can be set from experimental data or set to a given Greenwald fraction.
The feedback control reference for the line-averaged density is set equal to the H-1 FIR measurement (in case the measurement is corrupted by fringe jumps, a synthetic lineaveraged density is calculated from the IDA [23] profile).
For H e , the same references are applied as in [6], namely H e = 0.4 during H-mode and H e = 0.2 during L-mode.In the following sections we will see that this assumption leads to excellent agreement of the modeled T e (ρ = 0.8, t) trace with the experimental time trace.
A distinct feature of the gradient-based transport model is that the temperature boundary condition can be set at ρ = 1, both for L-and H-mode plasmas.The LH transition is modeled through the user-defined time trace of the H factor and the resulting modifications of the transport coefficients through equations ( 1) and (2).

Equilibrium geometry
Geometry metrics are taken from a sequence of reconstructed MHD equilibria from the IDE code [24].A dense equilibrium time grid with a time step of 0.1 s is selected (for the experiments where the plasma column is rapidly compressed, the time step is reduced to 0.05 s).This allows to capture the effect of changing equilibrium on the diffusion equations solved by RAPTOR.
In these simulations, the time derivative Φb (toroidal flux enclosed by the LCFS) has been neglected (see equations ( 1) and ( 2) in [25]).For the present study, this assumption has a negligible impact and has been verified a posteriori.However, when fast changes of Φ b occur during ramp-down, as is the case in the part B paper [10], Φb can be significant and the corresponding term has been included in the diffusion equations.

Heating and current drive sources
Ion cyclotron heating is modeled with a Gaussian deposition profile centered at ρ dep = 0, assuming full absorption and equal heating to ion and electron species.
Neutral beam heating and current density profiles are extracted from the RABBIT [26] simulation performed within the IDE framework.

Post-discharge simulations
A summary of the performed ramp-down experiments is presented in appendix, to accompany the discussion in the following sections.Comparisons are shown between RAPTOR post-shot simulations of T e (ρ, t), n e (ρ, t) and q(ρ, t), and integrated data analysis (IDA)/integrated data analysis equilibrium (IDE) reconstructions, to validate the performance of the applied simulation set-up over a variety of ramp-down scenarios.The IDA T e and n e profiles are estimated by combining the available profile diagnostics (Thomson scattering, interferometer, ECE . ..) with Bayesian inference techniques [23].The IDE improves equilibrium reconstructions and current profile estimates (equivalently: safety factor q profile estimates) by coupling an inverse kinetic Grad-Shafranov equilibrium solver to a predictive current diffusion solver [24].

The importance of L-mode heating and HL transition timing
Let us consider the comparison between the experimental IDE/IDA reconstruction and the RAPTOR simulation (with gradient-based model) for discharge 40 405, shown in figure 1. 7 The ramp-down features a change in I p ramp-rate around 0.5 s (note: in this paper we define t = 0 s at the start 7 Note that we calculate the internal inductance following the definition ℓ i3 used for the design of ITER, as reported in [27].To convert the internal inductance ℓi from IDE to ℓ i3 , the following equality has been applied: ℓi = , where dlp indicates an infinitesimal line segment in the poloidal direction around the plasma cross-section, with of the plasma current ramp-down).Two effects on the time evolution of ℓ i3 are pronounced: • The reduction of |dI p /dt| during the H-mode phase leads to a flattening of the ℓ i3 time evolution, both in the simulation and in the IDE reconstruction.The effect of the I p trace on ℓ i3 is studied in section 4. • The HL transition around 1.4 s leads to a distinct increase of ℓ i3 .In the following subsection, this rise of ℓ i3 is investigated.

Observation of edge cooling in AUG experiments
In figure 2, the L-mode electron temperature (and density) profile is shown for two discharges that transition from H-mode to an ohmic L-mode (41 388: HL transition initiates around 0.5 s; 40 405: HL transition initiates around 1.4 s; for both discharges the HL transition is initiated by turning off the auxiliary heating).In the absence of auxiliary heating, a broad, relatively cold outer region is formed in the plasma.The magnetic spectrograms indicate the presence of an n = 1 mode, even though no disruption is triggered.Further analysis is required to see if the low edge T e is MHD or transport-driven.The observed dynamics are reminiscent of the edge cooling dynamics observed in JET termination phases [28].Both central temperature hollowing or peripheral cooling of the plasma give rise to a steepened current density profile through the q = 2 surface, increasing the probability of triggering a 2/1 tearing mode that can lead to plasma disruption [29,30].Whilst the former is more common due to central impurity accumulation at lower density and for a flatter q profile, the latter is more prevalent due to edge cooling under the conditions of a peaked q profile and a higher density [28].
In the present paper, the impact of a flattened outer T e profile on the internal inductance is modeled.Stability analysis of the current density profile with respect to the onset of a 2/1 mode, as performed in [28], or the self-consistent modeling of edge cooling with ADAS cooling factor data [31], is outside the scope of this work.

Modeling the impact of edge cooling 3.2.1. Gradient-based transport model.
As the plasma conductivity scales like σ ∼ T 3/2 e , an important impact of the electron temperature on the predicted current density profile during an ohmic L-mode phase can be anticipated.Note that the tendency of the current density to follow the conductivity profile becomes slower for larger, reactor-like plasmas, as the resistive time τ R becomes relatively longer with respect to actuation time scales, allowing a significantly non-stationary loop voltage profile to persist for longer times.Extrapolation should hence be performed with care and by application of models accounting for the changes in relative time scales, as attempted with the DEMO simulations presented in Part B [10].
Applying the default setting of the gradient-based transport model for AUG L-mode plasmas (i.e.λ Te = 3.0, ρ ped,Te = 0.8 [6]), the increase of ℓ i3 during the HL transition is  under-predicted, as shown in figure 3 (green dashed line).The electron temperature in the outer region is over-predicted, while the average logarithmic gradient λ Te is below the experimentally observed core gradients.A better match with the experimental traces can be obtained by raising the logarithmic gradient used by the model, to λ Te = 4.5, while maintaining ρ ped,Te = 0.8.To match the same H e factor, the edge region temperature is reduced, while T e rises more steeply towards the center of the plasma.The rise of the internal inductance during the HL transition is more pronounced, as observed in experiment.As the observed dynamics are captured more accurately, λ Te = 4.5 is applied for modeling those discharges that feature a direct transition from H-mode to an ohmic L-mode (for all these discharges, a significant cooling of the edge has been observed).
From these initial simulations, we can identify the key impact of T e peaking and the gradient of the outer T e profile on the peaking of the current density profile and the resulting value of the internal inductance ℓ i3 .While for λ Te = 3.0, ℓ i3 max ∼ 1.4, for λ Te = 4.5, ℓ i3 max ∼ 1.8.The actual cause of this low edge temperature is outside of the scope of this study.However, to counter this effect, it is proposed to keep finite auxiliary heating during the L-mode phase, to avoid edge radiative cooling and to control the increase of ℓ i3 by avoiding an excessively fast reduction of the edge gradient of T e .In Part B [10], L-mode auxiliary heating is identified as a paramount ingredient of a safe DEMO termination strategy, to avoid a radiative collapse after the HL transition.

Comparison of transport models.
To gain further insight in the L-mode regime with edge cooling, we compare the performance of different transport models in RAPTOR, to predict the ramp-down of discharge 40 405, as presented in figure 4: • the gradient-based model (introduced in section 2.1), with non-standard settings for the L-mode phase, as described previously, • the ad-hoc empirical formula introduced in [32] and updated in [33]: with model settings identical to those applied for the AUG ramp-up modeling in [12] (c ano = 0.15, c neo = 0.50 and c Te = 1.2); • the QuaLiKiz neural network surrogate QLKNN-hyper-10D [34] (similar to the set-up applied for the ITER hybrid simulations in [35]).We summarize the respective set of solved transport equations and the experimental traces ingested for the simulations in table 1.The following observations can be made, based on figure 4.
• While the ad-hoc empirical formula and QLKNN-hyper-10D require a boundary condition T e (ρ = 0.8, t), the gradient-based model only requires an estimate for the global electron heat confinement in H-and L-mode.The T e (ρ = 0.8, t) trace predicted by the simulation agrees well with the IDA measurement (that is used as boundary condition for the simulations with the alternative transport models).• Applying the ad-hoc empirical formula leads to an excellent agreement of the predicted ℓ i3 trace with the experimental reconstruction.This is remarkable since the parameters of the transport model are taken identical to those used to model advanced scenarios in [12].It should however be emphasized that the time evolution of T e (ρ = 0.8, t) is set based on the experimental time trace.In section 3.2.3,we will briefly review the possibility of estimating the T e (ρ = 0.8, t) trace with a scaling law based on data from previous experiments.• QLKNN-hyper-10D seems to overpredict the core temperature during the H-mode phase 8 , leading to an overprediction of the internal inductance.Note that in this case the predicted ∆ℓ i3 during the HL transition is reduced.Solution of the density evolution with QLKNN, which is technically possible in RAPTOR, has not been attempted in this work.
Since the ad-hoc empirical formula recovers the observed ℓ i3 evolution most accurately, this simulation can be used to understand the origins of the increased internal inductance in more detail.

Scaling law estimation of pedestal evolution during ramp-down.
In [12], a scaling law approach has been proposed to estimate the n e T e | ρ=0.8 trace before the discharge, using plasma current I p , total heating power P aux + P oh and line average density n el as input variables: n e T e | ρ=0.8 = α 0 n αn el (P aux + P oh ) αP I αI p .The exponents and coefficient α 0 are derived based on data from previous discharges that have a similar operational scenario.In figure 6, we attempt whether this approach can yield a reasonable estimate of the T e | ρ=0.8 boundary condition for the ramp-down of discharge 40 405, and the resulting time evolution of the internal inductance ℓ i3 .The RAPTOR simulation that applies the ad-hoc empirical transport formula introduced in [32], while using the IDA data as T e boundary condition at ρ = 0.8, is shown in blue.As described in the previous section, this leads to a good agreement with the experimentally inferred time evolution of the internal inductance ℓ i3 .The RAPTOR simulation that applies the same ad-hoc transport model in the core, while setting the T e | ρ=0.8 boundary condition based on the scaling law, is shown in red (note that since the density profile time evolution is defined a priori in this simulation, T e | ρ=0.8 can be calculated from n e T e | ρ=0.8 ).The scaling law overestimates the pedestal pressure during the flat-top phase, while underestimating the pedestal pressure before the HL transition.It is however worth noting that the evolution of the experimental internal inductance is relatively well recovered by the simulation, including the knee point caused by the change in dI p /dt and the maximum value reached during L-mode.The main deficiency of the simulation is the lack of a sharp increase in the internal inductance ℓ i3 during the HL transition, as the scaling law predicts a continuous decrease of T e | ρ=0.8 during the H-mode phase, prior to the HL transition, and a more moderate temperature drop during the HL transition.

Applicability of reduced transport models.
While the reduced transport models discussed above have limited physics fidelity, they provide an attractive pathway for postdischarge interpretation, inter-discharge optimization (see application in [12]), real-time state estimation and modelpredictive control.Let us conclude this section by commenting on the expected applicability of the proposed reduced transport-models on other devices: • The ad-hoc empirical formula has the benefit of being simple and robust.As the number of tuning variables is very small (in this case mainly the coefficients c ano and c Te ), tuning to experimental data can be done quickly.Furthermore, the small number of tuning variables reduces the risk for over-fitting.The model often manages to recover the T e dynamics in the core robustly for different phases of the discharge, even when applying tuning coefficients that have been derived for discharges from a different scenario.
However, an estimate of the pedestal temperature T e ped is required to simulate H-mode.In the present work, a boundary condition has been provided at ρ = 0.8, also during L-mode.• The gradient-based model requires information regarding global confinement metrics (confinement factor for temperature, line-averaged density for density) and core plasma logarithmic gradients.These parameters can be easily calculated from a database of profile measurements, or derived from simulators with higher fidelity, for both L-mode and H-mode.This model furthermore allows extrapolation to future devices, under the assumption that global confinement is well described by the applied confinement scaling law.This transport model has been applied for the DEMO ramp-down simulations in Part B [10].• The QuaLiKiz neural network allows for fast, firstprinciples-based estimates of the diffusivities for the transport of ion and electron heat and electron density.As QLKNN-hyper-10D has been trained over a broad range of dimensionless inputs, the model can be applied for different tokamaks without adaptation of tuning parameters.Like the analytical transport formula mentioned above, an estimate of the pedestal conditions is needed to simulate Hmode.In the present work, a boundary condition has been provided at ρ = 0.8, also during L-mode.When applying the model in the edge region, one should be careful to not apply the model beyond its validity domain.To investigate whether the significant rise of internal inductance that has been observed for a late HL transition to an ohmic L-mode (40 405) can be avoided, new discharges have been designed that feature an earlier HL transition and an L-mode phase with auxiliary heating, while the I p trace is identical.The HL transition of discharges 40 631 and 40 844 is respectively around the start of ramp-down and around 0.4 s (which is right before the kneepoint in the I p trace).Both discharges maintain IC heating during the Lmode phase, respectively 1 MW and 0.5 MW.The temperature traces (T e (ρ = 0.8) and T e (ρ = 0.9)) in figure 7 clearly indicate that the peripheral electron temperature in the Lmode heated discharges decreases more gradually, leading to a reduced internal inductance ℓ i3 .Note that discharges 40 631 and 40 844 maintain higher T e (ρ = 0.8) and T e (ρ = 0.9) even in the phase when all discharges are in an ohmic L-mode.As the ramp-down phase is highly transient, understanding of the plasma state at a given point requires to consider the full dynamic state evolution.

Modeling.
The discharges 40 405, 40 631 and 40 844 have been simulated with the gradient-based transport model in RAPTOR, as illustrated in figure 8.While the three discharges are simulated with an identical I p trace, with a knee point around 0.5 s, the HL transition is initiated at 1.4 s, 0.1 s and 0.4 s, as observed experimentally in the three pulses respectively.For discharge 40 405, with a direct transition to a cold L-mode phase, the transport model uses λ Te = 4.5 during L-mode, as discussed in section 3.2.The two other discharges maintain some auxiliary heating directly after the HL transition and apply the standard setting λ Te = 3 throughout the entire L-mode phase.Applying these settings, T e (ρ = 0.8, t) is predicted reasonably well for all three shots.During the ohmic L-mode phase of discharges 40 631 and 40 844, the ℓ i3 values predicted by RAPTOR differ from the IDE reconstructed data, which show a further rise of ℓ i3 to values above ℓ i3 = 1.5.
Further investigation into the dynamics of ℓ i3 in this phase is required, ideally with the assistance of more complete integrated modeling codes.

The impact of HL timing, ELM behavior and L-mode heating on the density limit
Note that the HL transition timing and L-mode heating are also tightly coupled to the density limit.For the discharges 40 404 and 40 236, with a fast I p ramp-down rate dI p /dt ∼ −700 kA s −1 , large ELM activity disappears during the rampdown, together with a slow density decay and a resulting increase of the Greenwald fraction.Both discharges disrupt during the HL transition.Discharges 40 238 and 40 239, which have the same I p ramp-down rate but feature more significant shaping modifications during the ramp-down (as discussed in section 5), maintain more regular large ELMs, allowing for a faster density decay during H-mode and complete the full ramp-down trajectory.
The importance of ELMs to aid the reduction of density during the ramp-down H-mode has been observed in various experiments [1].Similar to our observations, [8] has reported an increasing Greenwald fraction due to disappearance of ELMs for a ramp-down maintaining a fixed plasma boundary shape.Control of ELMs with vertical kicks has allowed to prolong the ELMy H-mode during ramp-down in JET [9], enabling a reduction of the density and avoiding the accumulation of tungsten.Interestingly, [9] has reported the impact of the I p trace on the ELM behavior, as the evolution of the edge current impacts the pedestal stability.Integrated modeling in [36] addresses the importance of active ELM control schemes on W accumulation in JET terminations, as well as the implications for ITER operation.
Finally, recent first-principles studies, in good agreement with experiments on several tokamaks, have found a power dependence of the L-mode density limit [37].These findings indicate that an increased margin to the density limit can be maintained by maintaining auxiliary heating during (part of the) ramp-down L-mode phase.

Experiment
The time evolution of the plasma current I p has been identified as an effective actuator to tailor the time evolution of the internal inductance ℓ i3 , both experimentally [27] and through analytical modeling [38].For plasma ramp-downs, starting from a fast I p ramp-down rate and subsequently changing to a slower I p ramp-down rate allows to reduce the growth rate of ℓ i3 , while allowing to reach lower I p values earlier in time.
In figure 9, four discharges with different plasma current time traces are shown, each maintaining a relatively constant volume throughout the ramp-down phase.Discharge 40 404 has the fastest I p ramp-down rate, dI p /dt ∼ −700 kA s −1 , resulting in a rapid rise of the internal inductance ℓ i3 , until the discharge disrupts9 with a plasma current I p ∼ 500 kA.Discharges 40 405 and 40 811 have an identical I p evolution as discharge 40 404 in the first segment of the ramp-down phase, but implement a significant reduction of the absolute value of dI p /dt at 0.5 s (|dI p /dt| is essentially halved).The impact on ℓ i3 (t) is important: only a slight increase of the inductance is observed during the time window between the I p knee point and the HL transition (after I p knee point, ℓ i3 continues increases more significantly for 40 811, potentially due to the difference in elongation with respect to 40 405).Likewise, in the (−I p , ℓ i3 ) plane in figure 9 the change of gradient of the ℓ i3 trace around I p ∼ 800 kA is clearly pronounced.
Discharge 40 811 features a second halving of the I p rampdown rate during the L-mode phase, around 2 s.Whether the second I p knee point causes a further reduction in the growth rate of ℓ i3 is not clear from the IDE data.
Discharge 40 840 has a constant ramp-down rate, while covering the same total ramp-down time window as discharge 40 405.Comparing the respective traces in the (−I p , ℓ i3 ) plane in panel (b) of figure 9, both discharges reach similar ℓ i3 values after the HL transition.
As shown in panel (d) of figure 9, the edge poloidal flux difference during ramp-down is similar for the discharges 40 405 and 40 840, while the longer time window spanned by the ramp-down of discharge 40 811 results in a significant increase.For the fast decrease of plasma current in discharge 40 404, the edge poloidal flux difference is close to zero before the disruption occurs.

Evolution of ℓ i3 .
The quantitative effect on ℓ i3 of a change of dI p /dt is well captured in RAPTOR.The good match between experiment and simulation can be illustrated by comparing the IDE and RAPTOR ℓ i3 traces in figure 1 for discharge 40 405 (or in figure A4 in appendix for an I p ramprate change during L-mode for discharge 40 631).
In figure 10, a set of RAPTOR simulations is presented for ramp-downs with different I p traces.While for 40 236 the I p ramp-down rate is maintained fixed around dI p /dt ∼ −700 kA s −1 , for 40 405, 40 631 and 40 844 dI p /dt is halved at 0.5 s and for 40 844 dI p /dt is halved a second time at 2 s).These simulations have all been performed with the gradientbased transport model.Figure 10 also includes an estimate of the resistive time, by evaluating τ res = µ 0 (a/2) 2 ⟨σ neo ⟩, where a is the minor radius and ⟨σ neo ⟩ is the volume average neoclassical conductivity (including a factor accounting for the impact of trapped particles [39,40]).The sudden reduction of τ R corresponds to the HL transition time for the various discharges.Since τ R gives a measure of the time scale of current diffusion in the plasma, a significant impact of I p on the ℓ i3 trace is expected when the I p evolution is fast with respect to the resistive time τ R , as it allows to drive the plasma current density away from the relaxed solution.Note that for the RAPTOR simulations in figure 10, an impact of changing dI p /dt on ℓ i3 is present also during L-mode, indicating that the resistive time τ R is still sufficiently large during L-mode to observe actuation of ℓ i3 with I p during L-mode (e.g. at 0.5 s for 40 631 and at 2 s for 40 844).As mentioned above, the impact of a second I p ramp-rate change during L-mode is not clear from the IDE data (for 40 631 and 40 844, the IDE infers a more significant increase of ℓ i3 compared to the RAPTOR prediction, see figure 8).Before discussing the ramp-down edge poloidal flux difference ∆ψ e modeled in RAPTOR for the discharges presented in figure 10, we compare the edge loop voltage obtained in RAPTOR to the value inferred by the IDE equilibrium reconstruction.This comparison is an additional validation of the gradient-based transport model.A matching loop voltage to the value inferred by the equilibrium reconstruction indicates that the RAPTOR electron temperature profile T e results in a consistent value of the overall plasma resistance.Smoothed time traces of the RAPTOR and IDE loop voltage during the ramp-down phase are presented in figure 11.An excellent agreement is observed for all H-mode phases.Discrepancies are mainly observed during the L-mode phase of discharges 40 405 and 40 844, where the loop voltage in RAPTOR is overpredicted.Modeling the L-mode temperature profile correctly, especially for a discharge like 40 405 where significant edge radiative cooling is present, is challenging for the gradientbased transport model (as already observed in section 3.2; note the difference in temperature profile between RAPTOR and IDA in figure 3).
Due to the offset of the RAPTOR loop voltage during the L-mode phase, the time traces of the poloidal flux ψ e − ψ e (t = 0 s), in the bottom right panel of figure 10, drift off with respect to the IDE reconstruction (not explicitly shown).Nevertheless, we can qualitatively conclude that the RAPTOR simulations of these AUG discharges confirm the experimental observation of an increased edge poloidal flux difference for an extended ramp-down time window or an earlier HL transition.
To evaluate whether or not the central solenoid needs to provide extra flux swing during ramp-down, which is the actual operational constraint, a free-boundary equilibrium code should find the combination of poloidal field coil current trajectories (to maintain the desired plasma equilibrium evolution) and central solenoid current evolution to impose the required boundary flux trace ψ e .While we have not attempted to model the overall ramp-down central solenoid flux consumption, we have observed that for the discharges 40 631 and 40 844, with an early HL transition, additional flux from the central solenoid was required during ramp-down (this has been checked by consulting the time trace of the central solenoid coil current).For discharge 40 405, an overall recharging of the central solenoid took place during ramp-down.

The effect of the plasma shape evolution
5.1.Scan over plasma shape quantities 5.1.1.Experiment.In figure 12, a set of three ramp-downs with a similar plasma current ramp-down rate is compared (dI p /dt ∼ −700 kA s −1 ).This discharge scan was performed to study the effect of shaping.Discharge 40 236 is an attempt to maintain the shape constant throughout ramp-down.A reduction of triangularity δ at constant elongation κ is the aim of discharge 40 238.Conversely, the ramp-down phase of discharge 40 239 attempts to maintain triangularity δ constant, while reducing the elongation κ.
Control over these individual shaping parameters was only partly successful, as can be seen in figure 12.
• Discharge 40 236 maintains a relatively constant volume (and triangularity), while the elongation however decreases (a minor increases from about 0.52-0.55m).• Discharge 40 238 does achieve a reduction of triangularity, while the elongation evolution is similar to discharge 40 236, resulting in a moderate volume reduction.• Discharge 40 239 has only a moderately more significant elongation reduction compared to the other two shots, combined with some decrease of the triangularity, resulting in the most substantial volume reduction (a reduction of about 15%).Based on these experiments, limited conclusions can be drawn regarding the impact of individual shaping parameters.It can be observed that a reduction of the plasma volume results in a slower increase of q 95 and ℓ i3 .Note that the disruption of discharge 40 236 is not caused by loss of vertical controllability, but by a radiative collapse, due to a lack of auxiliary heating after the HL transition.As described in section 3.4, discharges 40 238 and 40 239 maintain a longer large ELM H-mode phase, while the density decay of discharge 40 236 is slower as the ELMs disappear during the early ramp-down phase.

Modeling.
We have performed a set of RAPTOR simulations for discharges 40 236 and 40 239 to investigate whether the model can capture the impact of the equilibrium evolution on ℓ i3 (t).The RAPTOR simulations are shown in appendix: while for discharge 40 236, the predicted ℓ i3 trace matches closely the value reconstructed by the IDE (figure A1), RAPTOR seems to over-predict ℓ i3 for discharge 40 239, thus under-predicting the impact of the shape adjustments (figure A2).
Figure 13 presents two additional simulations, where the underlying equilibrium data used for the RAPTOR simulations has been swapped amongst the two discharges.Repeating the simulation of discharge 40 236 with the geometry evolution of discharge 40 239 (with the decreasing volume), leads to a decrease of the predicted ℓ i3 by RAPTOR, matching the ℓ i3 trace simulated for 40 239.Conversely, repeating the simulation of 40 239 with the geometry evolution of discharge 40 236, leads to an increase of the predicted ℓ i3 by RAPTOR, matching the ℓ i3 trace simulated for 40 236.We conclude that for a smaller plasma volume at a given plasma current, a broader current density profile and hence a lower ℓ i3 value is observed.For the broader current density profile, the q = 1 radius moves outward, as visible in panel (c) of figure 13.The effect of sawteeth on the ℓ i3 evolution is limited in the RAPTOR simulations.

Experiment.
During the termination of H-mode density limit experiments in AUG, a rapid compression of the plasma column has been executed, in an attempt to counter the increase of the internal inductance ℓ i3 , as applied in discharge 41 388.Halfway through the ramp-down phase, the plasma transitions from a diverted to a limited phase, and the crosssection is compressed and moved towards the inner limiter (some plasma boundary shapes are illustrated in figure 16).The evolution of various shaping parameters are shown in figure 14.Note the rapid reduction of volume and elongation as the plasma poloidal cross-section is contracted and the shaping is reduced, resulting in a circular cross-section.A fast reduction of both q 95 and the internal inductance ℓ i3 during the compression phase is observed in the IDE reconstruction.When the plasma current reaches I p ∼ 110 kA, the plasma disrupts as the excessive reduction of q 95 results in an MHD instability.The second discharge shown in figure 14 (40 750), remains diverted throughout the ramp-down.While the plasma volume and the elongation reduce significantly, there is no fast compression phase and both q 95 and ℓ i3 increase monotonically.

Modeling.
To understand the dynamics of the rampdown phases of discharges 41 388 and 40 750 in more detail, RAPTOR simulations have been performed for both discharges.As both discharges have a HL transition to an ohmic L-mode, the non-standard L-mode setting of the gradient-based transport model with λ Te = 4.5 is applied.Furthermore, for these two discharges, an electron confinement factor H e = 0.3 (instead of default value H e = 0.4) leads to an improved agreement with the experimental data (during H-mode).
Figure 15 gives an overview of some of the modeled traces in RAPTOR, including electron temperature at various radii (ρ = [0 0.2 0.4 0.6 0.8]), the line average density, the plasma volume and the internal inductance ℓ i3 .For both discharges, the RAPTOR-simulated ℓ i3 evolution recovers closely the experimentally observed trace.The dynamics of the internal inductance can be understood by considering the T e traces at various radii.Both discharges have a HL transition shortly after t = 0.5 s, leading to a distinct decrease of the outer T e traces (no auxiliary heating is maintained), increasing the growth rate of the ℓ i3 trace.At a later time during the L-mode phase, around t = 0.6 s, an increase of the line-averaged density is observed.Note that the line average density reference for the gradient-based transport model is the experimentally observed trace.The density rise is most pronounced for discharge 41 388.The observed density peaking causes a reduction of the central electron temperature traces.This effect is recovered by the RAPTOR simulation, as visible in figure 15.As the temperature profile and the (dominantly ohmic) current density profile broaden, the observed reduction of the internal inductance ℓ i3 results.Note however that an additional impact from the changing equilibrium geometry can be expected, as the plasma column is compressed.
To isolate the effects of the density rise and the plasma compression on the internal inductance evolution, three additional simulations have been performed, as presented in figure 16.The post-shot simulation, applying the line average density trace and the equilibrium sequence observed in the experiment, is shown in blue.
• The first sensitivity study, shown with red dashed lines, maintains the observed density increase, but keeps the underlying equilibrium geometry constant from t = 0.65 s onward.As a first, obvious consequence, we can see that the value of q 95 continues to increase as the plasma current reduces.While the initial ℓ i3 reduction after t = 0.65 s is little affected, the absence of the plasma compression leads to an increase of ℓ i3 towards the end of the simulated time window.• A second simulation, shown with green dash-dotted lines, maintains the original equilibrium evolution, with the plasma compression, while imposing an artificial density reference without the density rise observed in experiment.In this case the initial reduction of ℓ i3 after t = 0.65 s is less pronounced.However, the plasma compression still leads to an important decrease of ℓ i3 by the end of the simulation.• A final simulation, shown with magenta dotted lines, is run with a constant equilibrium geometry from t = 0.65 s and the artificial density trace without density increase.
The most significant increase of ℓ i3 is observed for this simulation.
We conclude that, according to these simulations, rapid compression of the plasma column leads to a significant reduction of the internal inductance, due to the impact of the changing geometry, which can be reinforced by a simultaneous density rise.While rapid compression is promising to increase the margin to vertical instabilities, the implications regarding proximity to the ideal MHD limit, density limit and radiative collapse have to be carefully monitored.

Conclusion
The ramp-down phases of a series of ITER baseline and Hmode density limit discharges performed in ASDEX Upgrade are analysed and modeled with the same gradient-based transport model for heat and density transport that has been applied for the DEMO ramp-down studies in part B [10].Continued auxiliary heating after the HL transition allows for a gradual decrease of the outer T e gradient, rather than a sudden collapse due to edge radiative cooling.While regular ELMs are important for a sufficient density decay during Hmode, auxiliary heating after the HL transition aids to control the power balance in L-mode and to increase the margin to the density limit, considering the density limit power-dependence reported in [37].Even in cases where a disruption could be avoided, the edge radiative collapse causes a sharp rise of the internal inductance ℓ i3 , which would endanger vertical stability on future machines.Interestingly, the higher outer T e gradient for an auxiliary heated L-mode plasma persists after the auxiliary heating is eventually turned off, highlighting the inherently dynamic nature of the ramp-down plasma state evolution.The abrupt increase of ℓ i3 can be captured by RAPTOR, applying either the gradient-based model with an increased logarithmic gradient parameter λ Te , or a simple adhoc transport formula with boundary condition provided at ρ = 0.8, highlighting the importance of the pedestal temperature T e ped on the ℓ i3 dynamics.Extrapolation of current diffusion effects to tokamaks with a different relative scale of the resistive time τ R with respect to the characteristic time of actuator traces, demands a model-based approach.
The role of the plasma current ramp-down rate dI p /dt as an effective actuator to tailor the time evolution of the internal inductance ℓ i3 has been confirmed in experiment.A reduction of |dI p /dt| has a significant and immediate impact, limiting the subsequent growth rate of ℓ i3 .As a larger ratio of the resistive time τ R to actuation time scales is expected for larger, reactor-like plasmas, actuation of ℓ i3 through I p is expected to be very efficient for DEMO.For the AUG discharges modeled in RAPTOR, an increased ramp-down time and a longer Lmode phase lead to a significant increase of the poloidal flux consumption.
For a given I p trace, reducing volume and shaping during ramp-down is beneficial to limit the increase of ℓ i3 (and q 95 ).While the effect of individual shaping parameters (κ, δ) is unclear, a slower increase of ℓ i3 is observed when the plasma cross-section is reduced, both in simulation and experiment.
A rapid compression of the plasma column has been attempted during the ramp-down of H-mode density limit experiments.The fast dynamics of this highly transient phase are captured by RAPTOR simulations, imposing the time-varying equilibrium geometry and the line average density measured in experiment.Simulations have quantified the respective impact of a concurrent density rise observed in experiment, broadening the T e profile, and the changing geometry during the plasma compression phase.While plasma compression is a promising technique to limit the ℓ i3 increase during ramp-down, further simulations and experiments would help to further understand the interplay between individual shaping parameters and the ℓ i3 evolution.Furthermore, an excessive compression should be avoided, as a sharp decrease of q 95 causes the violation of ideal MHD limits.
The successful application of the RAPTOR code and reduced transport models to recover the dynamics observed in a wide range of AUG ramp-down experiments, including the impact of plasma current, auxiliary heating and plasma shaping, encourage further application of plasma simulators to design safe termination strategies.Table A1.An overview is given of the ramp-down experiments discussed in this paper.In this paper, t = 0 s is redefined as the final time point of the flat-top phase, i.e. t = t shot − t end of flat-top .The final plasma current I p,final indicates whether the ramp-down was completed without disruption (<0.1 MA), or whether a disruption ended the ramp-down prematurely, either due to radiative collapse (in boldface) or due to an MHD instability due to a significant decrease of q 95 (underlined).The Ip ramp-down rate is indicated; fast: d Ip /dt ∼ −700 kA s −1 ; moderate: d Ip /dt ∼ −300 kA s −1 ; double: d Ip /dt ∼ −700 kA s −1 to d Ip /dt ∼ −300 kA s −1 at 0.5 s; triple: d Ip /dt ∼ −700 kA s −1 to d Ip /dt ∼ −300 kA s −1 at 0.5 s to d Ip /dt ∼ −150 kA s −1 at 2 s.The timing for the HL transition is specified, as well as whether auxiliary heating is initially maintained during the L-mode phase.Finally, some remarks are given regarding the shaping evolution strategy.

Figure 2 .
Figure 2. Te and ne profiles for discharges 41 388 (a) and 40 405 (b), after the transition from H-mode to an ohmic L-mode, when a broad, relatively cold outer region is formed in the plasma (measurements by Thomson scattering and ECE, and IDA inferred profiles).

Table 1 .
Overview of the set of solved transport equations and the experimental traces ingested for the RAPTOR simulations in figure4, with three different transport models.For He(t), default confinement levels are used, respectively He = 0.4 during H-mode and He = 0.2 during L-mode[6].The transition in the reference trace initiates the HL transition in the simulation.Transport modelEquations solvedTaken from experimentGradient-based modelTe, ne and current diffusion (ψ) n el (and He)Ad-hoc empirical formulaTe and current diffusion (ψ) ne and Te(ρ = 0.8)QuaLiKiz neural networkTe, T i and current diffusion (ψ) ne and T e,i (ρ = 0.8)

Figure 5
illustrates how the sudden collapse of temperature in the outer plasma region (ρ > 0.75) at the HL transition leads to a significant reduction of ohmic and bootstrap driven current in this region, causing an important peaking of the current density profile.The electron temperature profile T e is shown before (1.4 s) and after (1.7 s) the HL transition, as measured by Thomson and ECE diagnostics, and inferred by the IDA.The bottom right plot, showing the enclosed plasma current integral, shows that after the HL transition, about 80% of the plasma current is located inside ρ = 0.5.

Figure 6 .
Figure 6.The ramp-down phase of discharge 40 405 is simulated in RAPTOR with the ad-hoc empirical transport formula introduced in [32].The boundary condition Te(ρ = 0.8, t) is respectively taken from the experimental reconstruction, or estimated based on a scaling law based on previous AUG ITER baseline discharges, following the approach proposed in [12].The vertical dashed line indicates the observed HL transition time.(a) ℓ i3 (t); (b) Te(ρ = 0.8, t).

Figure 9 .
Figure 9. Reconstruction of internal inductance and edge poloidal flux difference during ramp-down for discharges with different traces of the plasma current.(a) Ip(t); (b) IDE ℓ i3 versus −Ip; (c) IDE ℓ i3 (t); (d) edge poloidal flux difference during ramp-down ∆ RD ψe versus −Ip (here the CLISTE reconstruction is shown because the reconstruction contains data points up to a later time point compared to the IDE for discharge 40 840).

Figure 11 .
Figure 11.Evolution of the edge plasma loop voltage in RAPTOR (red dash-dotted lines) and in the IDE reconstruction (blue solid lines).(a)-(d) smoothed trace of U pl (ρ, t) at ρ = 1.In RAPTOR, the gradient-based transport model is used.

4. 2 . 2 .
Poloidal flux consumption.The loop voltage at ρ = 1 is the time derivative of the local poloidal flux: U pl e = dψ e /dt.Note that the time derivative of the magnetic flux at the last closed flux surface (LCFS) that is generated by the coil currents in the central solenoid and the poloidal field coils, should match the sum of the edge loop voltage U pl e and the voltage related to the plasma external inductance d(L ext I p )/dt.

Figure 16 .
Figure 16.Sensitivity study in RAPTOR for discharge 41 388 on the effect of plasma column compression and density evolution on the internal inductance ℓ i3 and q 95 .The post-shot simulation is shown in solid blue lines.In red dahsed lines, an additional simulation is shown where the equilibrium is maintained constant during ramp-down.In green dash-dotted lines, an additional simulation is shown where an artificial line-avaraged density time trace without increase is imposed.Finally, a simulation featuring both of these two modifications is shown in magenta dotted lines.(a) Ip(t); (b) plasma volume V(t); (c) n el (t); (d) Te(ρ, t) at ρ = 0 and ρ = 0.8; (e) q 95 (t); (f) ℓ i3 (t); (g) IDE reconstruction of last closed flux surface at various times during ramp-down (these equilibria are indicated with stars in panels (a) and (b)).