Plasma Profiles
Overview
In PROCESS
the density, temperature and current profiles of the plasma for electrons and ions can take two forms depending on the switch value for ipedestal
. Either without a pedestal, ipedestal == 0
or with a pedestal ipedestal == 1
. ipedestal == 0
is better suited for modelling L-mode plasmas, while ipedestal == 1
is better suited for modelling H-mode plasmas.
The files responsible for calculating and storing the profiles are plasma_profiles.py
and profiles.py
. A central plasma profile object is created from the PlasmaProfile
class that contains attributes for the plasma density and temperature. The density and temperature profiles are in themselves objects of the Profile
abstract base class. Profile
, NProfile
and TProfile
are all defined in profiles.py
. PlasmaProfile
is exclusively in plasma_profiles.py
Parabolic Profile | L-mode
If ipedestal == 0
then no pedestal is present and the function describing the profiles is given by:
where \rho = r/a, and a is the plasma minor radius. This gives
volume-averaged values \langle n \rangle = n_0 / (1+\alpha_n), and
approximate line-averaged values of \bar{n} \approx n_0 / \sqrt{(1+\alpha_n)}, the full equation used can be seen here. These
volume- and line-averages are used throughout the code along with the profile
indices \alpha, in the various physics models, many of which are fits to
theory-based or empirical scalings. Thus, the plasma model in PROCESS may
be described as ½-D. The relevant profile index variables are
alphan
, alphat
and alphaj
, respectively. For full derivation and description of the core and line averaged values please see the parabolic_paramterisation() section which calculates these values for both temperature and density. A table of the the associated variables can be seen below
Profile parameter | Density | Temperature | Current |
---|---|---|---|
Plasma centre value | ne0 , n_0 |
te0 , T_0 |
N/A, J_0 |
Profile index/ peaking parameter | alphan , \alpha_n |
alphat , \alpha_T |
alphaj , \alpha_J |
Plasma current profile
While PROCESS assumes a standard parabolic profile to be the shape of the current profile as per the 1989 ITER physics guidelines2 , it does not calculate its values. The profile peaking factor alphaj
is calculated in the plasma current calculation relating to iprofile
found here. Only the temeprature and density profiles are calculated fully withing the PlasmaProfiles
class.
The graph below is for a standard parabolic profile. You can vary the core value (n0
) and the profile index (alphan
) to see how the function behaves
Pedestal Profile | H-mode
If ipedestal == 1
there is now a pedestal present in the profile and they follow the form shown below:
Subscripts 0, \text{ped} and \text{sep}, denote values at the centre (\rho = 0), the
pedestal (\rho = \rho_{\text{ped}}) and the separatrix (\rho=1),
respectively. The density and temperature peaking parameters \alpha_n and a
\alpha_T as well as the second exponent \beta_T (input parameter
tbeta
, not to be confused with the plasma beta) in the temperature
profile can be chosen by the user, as can the pedestal heights and the values
at the separatrix (neped, nesep
for the electron density, and
teped, tesep
for the electron temperature); the ion equivalents are
scaled from the electron values by the ratio of the volume-averaged values).
Pedestal setting
If ipedestal == 1
then the pedestal density neped
is set as a fraction fgwped
of the
Greenwald density (providing fgwped
>= 0). The default value of fgwped
is 0.82.
A table of the the associated variables can be seen below
Profile parameter | Density | Temperature |
---|---|---|
Pedestal radius (r/a) | rhopedn , \rho_{\text{ped},n} |
rhopedt , \rho_{\text{ped},T} |
Plasma centre value | ne0 , n_0 |
te0 , T_0 |
Pedestal value | neped , n_{\text{ped}} |
teped , T_{\text{ped}} |
Separatrix value | nesep , n_{\text{sep}} |
tesep , T_{\text{sep}} |
Profile index/ peaking parameter | alphan , \alpha_n |
alphat , \alpha_T |
Profile index \beta | tbeta , \beta_T |
The graph below is for a standard pedestal profile. You can vary its attributes given in the table above to see how the function behaves.
Un-realistic profiles
If setting ipedestal == 1
it is highly recommended to make sure constraint equation 81 (icc=81) is active. This enforces solutions in which n_0 has to be greater than n_{\text{ped}}.
Negative n_0 values can also arise during iteration, so it is important to be weary on how low the lower bound for n_{\text{e}} (\mathtt{dene}) is set. More info can be found here
Plasma Profile Class | PlasmaProfile
Initialization | __init__()
The parent plasma profile class is PlasmaProfile
. Initialization sets the profile class size and neprofile
and teprofile
to NProfile
& TProfile
objects from profiles.py
Note
Profile sizes are set to 501 point by default. this can be varied in the __init__
of PlasmaProfile
. Changing this will affect the values when doing Simpsons rule integration on the profiles.
Runner function | run()
This function is used to run the appropriate function relating to the calculation of the PlasmaProfile class. At the moment it only runs the pramterise_plasma()
function
Plasma Parameterization | parameterise_plasma()
The input variable tratio
can be used to define the ratio between the volume averaged ion and electron temperatures. By default it is set so that the volume averaged ion and electron temperatures are equal. The value of T_{\text{i}} is set such that:
Depending on the value of ipedestal
different functions will be ran, the different run cases are given below:
Parabolic Profile | ipedestal == 0
parabolic_paramterisation()
If pedestal profile values are set they are reset to have values that agree with the original form of the parabolic profiles. Such that \rho_{\text{ped}} = 1 and that pedestal and separatrix densities and temepratures are zero. This will then warn the user in the terminal.
The density and temperature profile runner function TProfile/NProfile.run()
is then called to re-calculate the profile and core values.
Ratio of density-weighted to volume-averaged temperature factor is calculated:
The line averaged density is then calculated for the profile paramaters
Line averaged density derivation
Line averaged electron density is calculated by integrating the profile across the normalised width of the profile and then dividing by the width of the integration bounds
This can be more easily represented in radial coordinates and returning \rho = \frac{r}{a}
\Gamma is the gamma function and is calculated in the code with scipy.special.gamma()
This is in agreement with the derivation from the ITER Physics Design 1989 2
\blacksquare
The density weighted temperatures are set:
The central values for temperature and density is then calculated for the profile paramaters
Core temperature & density derivation
We calculate the volume integrated profile and then divide by the volume of integration to get the volume average density \langle n \rangle. If we assume the plasma to be a torus of circular cross-section then we can use spherical coordinates. We can simplify the problem by representing the torus as a cylinder of height equal to the circumference of the torus equal to 2\pi R where R is the major radius of the torus.
The cylindrical volume element is given by:
Inserting our density function in the form where \rho is expanded as \rho = r/a we get:
Since our density function is only a function of r, and the torus is symmetric around its center, the integration simplifies to integrating over r and the d\theta ,\ dz integrals are solved to give values for the full poloidal angle and cylindrical height and torus length, leading to:
In the form of volume average density where the volume integrated density function has to be divided by the volume of the cylinder / torus we get:
Simplify:
Integrate:
This is in agreement with the derivation from the ITER Physics Design 1989. 2
Since all parabolic profiles are of the same form this proof holds for the density and temperature.
A similar derivation is found in normalised coordinates, \rho if the line averaged integral is swept around the poloidal circumference then divided by the poloidal area.
\blacksquare
The core values for the temperature and density are then calculated for the electrons and ions
calculate_profile_factors()
The central plasma pressure is calculated from the ideal gas law.
With the coefficients used to turn the temperature from \text{keV} back to Joules.
Since we multiply the density and temperature profiles together to get the pressure we can find the pressure profile factor by adding the profile factors for temperature and density. $$ \alpha_p = \alpha_n + \alpha_T $$
Pressure profile factor
The calculation of \alpha_p is only valid assuming a parabolic profile case. The calculatio of p_0 is still true as the core values are calculated independantly for each profile type.
p_0 is NOT equal to \langle p \rangle \times (1 + \alpha_p), but p(\rho) = n(\rho)T(\rho) and \langle p \rangle = \langle n \rangle T_n, where T_n is the density-weighted temperature.
calculate_parabolic_profile_factors()
This is used by the stellerator module to find temperature gradients. We first need to find the normalised position in the plasma where the change in the pressure gradient is at a minima or maxima. This is just when the second derivative of the profile is zero. Using the density profile as an example, though this is true for temperature also.
The positive root for the 2nd derivative above:
Substituting the root above into the first derivative as \rho to get the minima or maxima gradient value:
Simplify fully:
Find the temperature on the profile where the gradient change is largest by substituting into the original profile function:
This solution for the profile gradient only holds true if \alpha_T \ge 1.
In the region 0 \le \alpha_T \le 1 when substituting the roots of the second derivative into the first derivative the function diverges into the complex number solution space.
To overcome this we can assume the second derivative root to be a value. In this case we assume a default value of \mathtt{rho\_te\_max} = 0.9. Then we just substitute this value into the first derivative to
The value of \mathtt{rho\_te\_max} can be manually changed in the code depending on the derivative profile required. You can use the slider in the graph below to experiment with the value of \mathtt{rho\_te\_max} and how this changes the profile solutions.
We can now set the normalised gradient length:
Temperature & Density Case
Calculations are identical for the temperature and density case, just with the substitution of ne
and te
in the variable names
H-mode profile | ipedestal == 1
pedestal_parameterisation()
The density and temperature profile runner function TProfile/NProfile.run()
is firstly called to re-calculate the profile and core values.
Perform integrations to calculate ratio of density-weighted to volume-averaged temperature, etc. Density-weighted temperature = \frac{\int{nT \ dV}}{\int{n \ dV}}, which is approximately equal to the ratio \frac{\int{\rho \ n(\rho) T(\rho) \ d\rho}}{\int{\rho \ n(\rho) \ d\rho}}
Density weighted temperatures are thus set as such
The above is done numerically with scipy.integrate.simpson integration.
Set profile factor which is the ratio of density-weighted to volume-averaged temperature
Calculate the line averaged electron density by integrating the normalised profile using the class integrate_profile_y()
function
A divertor variable prn1
is set to be equal to the separatrix density over the mean density:
calculate_profile_factors()
The same function is run from the ipedestal == 0
profile case, found here
Key Constraints
Setting pedestal values as fractions of the Greenwald limit
By default, the values of n_{\text{ped}} and n_{\text{sep}} are set as fractions of the Greenwald limit such as:
To set the values of n_{\text{ped}} and n_{\text{sep}} directly, the user can input the value of \mathtt{fgwped} or \mathtt{fgwsep} to be less than 0.0 (i.e negative) to prevent the Greenwald fraction value being set.
\mathtt{fgwped} and \mathtt{fgwsep} can be set as iteration variables respectively by using ixc = 45
and ixc = 152
respectively
Pedestal Density Upper limit
This constraint can be activated by stating icc = 81
in the input file
To prevent unrealistic profiles when iterating the values of ne0, nesep, neped
etc, this constraint ensures that the value of ne0
is always higher that neped
to get a converged solution. This can be scaled with fne0
Eich Critical Separatrix Density Model
This constraint can be activated by stating icc = 76
in the input file
Eich et.al has given a usable formula for the critical separatrix density in terms of fundamental plasma parameters4. A function for the ballooning parameter at the separatrix (\alpha_{\text{sep}}^{\text{crit}}) is seen to increase about linearly with the separatrix density normalised to Greenwald density. This is seen in JET and ASDEX based on Thomson-scattering measurements, a clear correlation of the density limit of the tokamak H-mode high-confinement regime with the approach to the ideal ballooning instability threshold at the periphery of the plasma.
Where \kappa is the plasma elongation and \delta is the plasma triangularity.
Where A is the plasma aspect ratio, P_{\text{sep}} is the power crossing the separatrix and is the heating power minus the radiated power in this case, n_{\text{GW}} is the Greenwald density limit.
The value of nesep
is check to make sure that it does not go higher than n_{\text{sep}}^{\text{crit}}. This can be scaled with fnesep
-
M. Bernert et al. Plasma Phys. Control. Fus. 57 (2015) 014038 ↩
-
N.A. Uckan and ITER Physics Group, 'ITER Physics Design Guidelines: 1989', ↩↩↩↩
-
Johner Jean (2011) HELIOS: A Zero-Dimensional Tool for Next Step and Reactor Studies, Fusion Science and Technology, 59:2, 308-349, DOI: 10.13182/FST11-A11650 ↩
-
T. Eich et al 2018 Nucl. Fusion, 'Correlation of the tokamak H-mode density limit with ballooning stability at the separatrix' 58 034001 ↩