DREAM includes support for introducing ions to the plasma through Shattered Pellet Injections (SPI). The user can initialise an arbitrary number of shards with given initial sizes, positions, velocities and compositions. This class deals with the settings for the initialization and evolution of the shard sizes, positions and velocities as well as the distribution of the ablated material around the shards. The compositions are set by adding an ion species for every species the pellet is composed of and connecting this ion species to the relevant shards, see the documentation for the Ions class.
There are six types of modes with various options for the SPI modelling:
the ablation mode, which determines the model used for the evolution of the shard radii
the velocity mode, which determines the motion of the shards
the deposition mode, which determines the spread of the ablated material around the shards
the shift mode, which determines the mode used for the shift of the ablated material due to the plasmoid drift effect
the heat absorbtion mode, which determines the absorbtion of heat flowing into the neutral cloud surrounding the shards
the cloud radius mode, which determines the calculation of the radius of the neutral cloud. This radius is used to determine the cross section for the heat absorbtion (if included), and also determines the length scale of the deposition kernel (if the deposition kernel used has a finit width).
This section describes the various modes available in all these five categories.
The available ablation modes are
Name |
Description |
|---|---|
|
No ablation (default) |
|
Ablation according to the Neutral Gas Shielding (NGS) formula
presented by P. Parks at TSDW 2017, calculated using the fluid
density and temperature ( |
|
Similar to |
The available velocity modes are
Name |
Description |
|---|---|
|
The shards do not move (default) |
|
Prescribed (and constant) shard velocities |
The available deposition modes are
Name |
Description |
|---|---|
|
No deposition (default) |
|
Delta function source (averaged over the current time step and over the grid cells) |
|
Same as |
|
Gaussian deposition kernel in the radial coordinate, with 1/e-length scale equal to the radius of the neutral cloud. NOTE: This kernel is not averaged over the time step, so it should be used with caution if the shards travel a longer distance than the radius of the neutral cloud during a single time step! |
The available shift modes are
Name |
Description |
|---|---|
|
No shift (default) |
|
Calculate the shift using the analytical model derived by Vallhagen et al, JPP 2023 |
The available heat absorbtion modes are
Name |
Description |
|---|---|
|
No heat absorbtion, only the energy required to ionize the ablated material to the equilibrium distribution of ionisation states is subtracted from the background plasma |
|
All heat flowing through a disc of radius \(r_\mathrm{cld}\) is subtracted from the background plasma as a delta function source around each shard, where \(r_\mathrm{cld}\) is the radius of the neutral cloud (no additional sink for the ionization of the ablated material) |
|
Same as |
Note
If the ablated material is immediately deposited locally at the shard positions, they immediately carry the energy absorbed in the cloud back to the plasma, except for the energy needed for the ionization. In such a situation, HEAT_ABSORBTION_MODE_NEGLECT would be the most physically appropriate heat absorbtion mode.
The available cloud radius modes are
Name |
Description |
|---|---|
|
Cloud radius not used (default) |
|
Constant prescribed cloud radius |
|
Currently gives simply \(r_\mathrm{cld}=10r_\mathrm{p}\), which is a very rough approximation |
The most general way to add shards to the SPI is to directly provide a vector containing the shard sizes, initial positions and velocities to the setInitialData() method. The initial positions and velocities are given in cartesian coordinates, with the origin at the magnetic axis and the xy-plane coinciding with the poloidal cross section. The vectors specifying the initial positions and velocities should have the format \(\boldsymbol{x}_\mathrm{p}=(x_\mathrm{p,1},y_\mathrm{p,1},z_\mathrm{p,1},x_\mathrm{p2},y_\mathrm{p2},z_\mathrm{p2},...)\). The example below shows how to initialise one shard with radius 1 cm on the horisontal mid-plane 2.15 m from the magnetic axis, traveling at a speed of 200 m/s directly towards the magnetic axis.
ds = DREAMSettings()
...
ds.eqsys.spi.setInitialData(rp=0.01, xp=np.array([2.15,0,0]), vp=np.array([-200,0,0]))
There are, however, a number of helper-functions implemented to more easily set up injections with some standard distributions for the shard parameters. These functions are covered in the rest of this section.
The code block below illustrates how to set up staggered Deuterium-Neon injections similar to those investigated in O. Vallhagens MSc thesis, using the wrapper function setParamsVallhagenMSc() to set the initial positions, velocities and radii of the shards on the same line.
radius=[0,2] # Span of the radial grid
radius_wall=2.15 # Location of the wall
...
# Settings for the first deuterium SPI
nShardD=1742 # Number of shards
NinjD=2e24 # Number of atoms
alpha_maxD=0.17 # Divergence angle
abs_vp_meanD=800 # Mean shard speed
abs_vp_diffD=0.2*abs_vp_meanD # Width of the uniform shard speed distribution
ds.eqsys.spi.setParamsVallhagenMSc(nShard=nShardD, Ninj=NinjD, Zs=[1], isotopes=[2], molarFractions=[1], ionNames=['D_inj'], n_i=ds.eqsys.n_i, shatterPoint=np.array([0,0,radius_wall]), abs_vp_mean=abs_vp_meanD, abs_vp_diff=abs_vp_diffD, alpha_max=alpha_maxD)
# Settings for the second neon SPI
nShardNe=50 # Number of shards
NinjNe=1e23 # Number of atoms
alpha_maxNe=0.17 # Divergence angle
abs_vp_meanNe=200 # Mean shard speed
abs_vp_diffNe=0.2*abs_vp_meanNe # Width of the uniform shard speed distribution
# Initialise neon shards with zero velocity, and set the velocity before the restart when the neon injection should actually start
ds.eqsys.spi.setParamsVallhagenMSc(nShard=nShardNe, Ninj=NinjNe, Zs=[10], isotopes=[0], molarFractions=[1], ionNames=['Ne_inj'], n_i=ds.eqsys.n_i, shatterPoint=np.array([0,0,radius_wall]), abs_vp_mean=0, abs_vp_diff=0, alpha_max=alpha_maxNe)
...
runiface(ds, 'output_D_inj.h5')
...
ds2=DREAMSettings(ds)
ds2.fromOutput('output_D_inj.h5', ignore=['v_p','x_p'])
...
# Set the shards of the second injection into motion and advance them until
# the fastest shards reach the plasma edge
do=DREAMOutput('output_D_inj.h5')
ds2.eqsys.spi.vp=do.eqsys.v_p.data[-1,:].flatten()
ds2.eqsys.spi.xp=do.eqsys.x_p.data[-1,:].flatten()
ds2.eqsys.spi.setShardVelocitiesUniform(abs_vp_mean=abs_vp_meanNe,abs_vp_diff=abs_vp_diffNe,alpha_max=alpha_maxNe,shards=slice(-nShardNe,None))
t_edge=(radius_wall-radius[1])/np.max(-ds2.eqsys.spi.vp[-3*nShardNe::3])
ds2.eqsys.spi.xp[-3*nShardNe:]=ds2.eqsys.spi.xp[-3*nShardNe:]+ds2.eqsys.spi.vp[-3*nShardNe:]*t_edge
runiface(ds2, 'output_Ne_inj.h5')
The effect of plasmoid drifts can be accounted for using the analytical model given by equation (A4) in Vallhagen et al, JPP 2023. To use this model, the following model parameters have to be speified: representative temperature \(T\) during the drift duration; the initial temperature \(T_0\) close to the pellet (before the cloud has drifted away from the pellet); the characteristic half-thickness of the drifting cloud \(\Delta y\) (should be similar to the radius of the neutral cloud around the pellet); the major radius \(R_\mathrm{m}\) at the magnetic axis (only used if the major radius is otherwise infinite in the simulation); the average charge states \(Z_\mathrm{avg}^{(i)}\) inside the drifting cloud for all ion species include in the pellets. Note that the average charge states can not be calculated using the ADAS rates because the conditions in the drifting cloud, especially the density and optical thickness, are very different from the validity range and assumptions in ADAS, and we therefore take user-given estimates for them. These estimates should be given as a look-up table in the form of the lists ZavgArray, Zs and isotopes, where ZavgArray provides the average charge states to be used for ion species with atomic numbers Zs and isotopes isotopes.
Below is an example showing how to include the analytical drift model for a mixed D+Ne SPI with typical settings. The values of the model parameters are motivated by e.g. numerical studies by Matsuyama and experimental studies by Müller et al. In particular, these studies indicate that the representative temperature \(T\) is significantly different for purely hydrogenic pellets and impurity doped pellets, as the doped pellets will have much stronger radiation losses. Therefore, different temperatures can be set
for different shards as long as they are in the correct order. The following example includes nShardD
deuterium shards (atomic number 1, isotope 2) with \(T=30\,\rm eV\) and nShardNe number of neon doped shards (atomic number 10, isotope 0 i.e. naturally occuring mix) with \(T=5\,\rm eV\).
ds.eqsys.spi.setShiftParamsAnalytical(shift = SHIFT_MODE_ANALYTICAL, T = np.concatenate([30*np.ones(nShardD), 5*np.ones(nShardNe)]), T0 = 2, delta_y = 0.0125, Rm = R0 , ZavgArray =[1 , 2], Zs, [1,10], isotopes = [2,0]):