Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# Culham Electron Cyclotron Model | `culecd()`


- `iefrf/iefrffix` = 7
- `iefrf/iefrffix` = 7

This routine calculates the current drive parameters for a electron cyclotron system, based on the AEA FUS 172 model[^1]


1. Local electron temperature $(\mathtt{tlocal})$ is calculated using the `tprofile` method
2. Local electron density $(\mathtt{dlocal})$ is calculated using the `nprofile` method
1. Local electron temperature $(\mathtt{tlocal})$ is calculated using the `teprofile` method
2. Local electron density $(\mathtt{dlocal})$ is calculated using the `neprofile` method

3. Calculate the inverse aspect ratio `epsloc`.

Expand Down Expand Up @@ -47,7 +45,7 @@ Uses the `eccdef` model found [here](ec_overview.md)

$$
\mathtt{ecgam} = 0.25(\mathtt{ecgam1} + \mathtt{ecgam2} +\mathtt{ecgam3} + \mathtt{ecgam4})
$$
$$

7. Calculate the current drive efficiency by dividing `ecgam` by `(dlocal * physics_variables.rmajor)`.

Expand All @@ -57,8 +55,6 @@ $$

Note: The `eccdef` method is called to calculate the current drive efficiency at each poloidal angle.



[^1]: Hender, T.C., Bevir, M.K., Cox, M., Hastie, R.J., Knight, P.J., Lashmore-Davies, C.N., Lloyd, B., Maddison, G.P., Morris, A.W., O’Brien, M.R. and Turner, M.F., 1992. *"Physics assessment for the European reactor study."* AEA FUS, 172.

[^2]: Wesson, J. and Campbell, D.J., 2011. *"Tokamaks"* (Vol. 149). Oxford university press.
[^2]: Wesson, J. and Campbell, D.J., 2011. *"Tokamaks"* (Vol. 149). Oxford university press.
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@

- `iefrf/iefrffix` = 6



This routine calculates the current drive parameters for a
lower hybrid system, based on the AEA FUS 172 model.
AEA FUS 251: A User's Guide to the PROCESS Systems Code
AEA FUS 172: Physics Assessment for the European Reactor Study[^1]


1. Call the [`lhrad()`](#lower-hybrid-wave-absorption-radius--lhrad) method to calculate the lower hybrid wave absorption radius, `rratio`.
2. Calculate the penetration radius, `rpenet`, by multiplying `rratio` with the minor radius of the plasma.
3. Calculate the local density, `dlocal`, using the `nprofile()` function from the `profiles_module` module. This function takes into account various plasma parameters such as the density profile, electron density at the edge, pedestal density, separatrix density, and the value of the parameter `alphan`.
4. Similarly, calculate the local temperature, `tlocal`, using the `tprofile()` function from the `profiles_module` module. This function considers parameters such as the temperature profile, electron temperature at the edge, pedestal temperature, separatrix temperature, `alphat`, and `tbeta`.
3. Calculate the local density, `dlocal`, using the `neprofile()` function from the `profiles_module` module. This function takes into account various plasma parameters such as the density profile, electron density at the edge, pedestal density, separatrix density, and the value of the parameter `alphan`.
4. Similarly, calculate the local temperature, `tlocal`, using the `teprofile()` function from the `profiles_module` module. This function considers parameters such as the temperature profile, electron temperature at the edge, pedestal temperature, separatrix temperature, `alphat`, and `tbeta`.
5. Calculate the local toroidal magnetic field, `blocal`, using the formula `bt * rmajor / (rmajor - rpenet)`. Here, `bt` is the toroidal magnetic field at the magnetic axis, and `rmajor` is the major radius of the plasma.
6. Calculate the parallel refractive index, `nplacc`, which is needed for plasma access. It uses the local density `dlocal` and the local magnetic field `blocal` to calculate a fraction `frac`. `nplacc` is then obtained by adding `frac` to the square root of `1.0 + frac * frac`.
7. Calculate the local inverse aspect ratio, `epslh`, by dividing `rpenet` by `rmajor`.
Expand Down Expand Up @@ -46,5 +43,3 @@ Iterate over the following steps to find the minor radius ratio:
- Update $\mathtt{rat0}$ with the new approximation, $\mathtt{rat1}$.
3. If the loop completes all 100 iterations without finding a satisfactory solution, report an error and set $\mathtt{rat0}$ to 0.8.
4. Return the final value of $\mathtt{rat0}$.

[^1]: T. C. Hender, M. K. Bevir, M. Cox, R. J. Hastie, P. J. Knight, C. N. Lashmore-Davies, B. Lloyd, G. P. Maddison, A. W. Morris, M. R. O'Brien, M.F. Turner abd H. R. Wilson, *"Physics Assessment for the European Reactor Study"*, AEA Fusion Report AEA FUS 172 (1992)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Density Profile | `NProfile(Profile)`
# Density Profile | `NeProfile(Profile)`

The desnity profile class is organised around a central runner function that is called each time the plasma is parameterised by the parent [`PlasmaProfile()`](./plasma_profiles.md) class. It is called by [`pedestal_parameterisation()`](plasma_profiles.md#pedestal_parameterisation) and [`parabolic parameterisation()`](./plasma_profiles.md#parabolic_paramterisation). The sequence of the runner function can be seen below along with explanation of the following calculations.

Expand All @@ -8,21 +8,20 @@ The desnity profile class is organised around a central runner function that is

2. The steps between the normalized points is then done by [`calculate_profile_dx()`](./plasma_profiles_abstract_class.md#calculate-the-profile-steps-in-x--calculate_profile_dx) which divides the max x-dimension by the number of points.

3. The core electron and ion temperatures are claculated via [`set_physics_variables()`]()
3. The core electron and ion temperatures are claculated via [`set_physics_variables()`]()


### Calculate core values | `set_physics_variables()`
### Calculate core values | `set_physics_variables()`

The core electron density is calculated using the [`ncore`](plasma_density_profile.md#electron-core-density-of-a-pedestalised-profile--ncore) method.
The core ion density is then set from $n_{\text{i}}$ (`nd_ions_total`) which is the total ion density such as:

$$
n_{\text{i0}} = \left(\frac{n_\text{i}}{n_\text{e}}\right)n_{\text{e0}}
$$

#### Electron core density of a pedestalised profile | `ncore()`

This function calculates the core electron density for a pedestalsied profile (`ipedestal == 1`). It takes in values of
#### Electron core density of a pedestalised profile | `ncore()`

This function calculates the core electron density for a pedestalsied profile (`ipedestal == 1`). It takes in values of

| Profile parameter / Input | Density |
|----------------------------------|-----------|
Expand All @@ -32,7 +31,6 @@ The desnity profile class is organised around a central runner function that is
| Average density | `dene`, $\langle n \rangle$ |
| Profile index/ peaking parameter | `alphan`, $\alpha_n$ |


$$
n_0 = \frac{1}{3\rho_{\text{ped,n}}^2}\left[3\langle n_{\text{e}} \rangle (1+\alpha_n)
+ n_{\text{sep}} (1+\alpha_n) \left(-2 + \rho_{\text{ped,n}} + \rho_{\text{ped,n}}^2\right) \\
Expand All @@ -42,7 +40,7 @@ The desnity profile class is organised around a central runner function that is

If `ncore` is returned as being less than 0, it is forced into a state of `ncore = 1E-6` in order to help convergence. This will also give a warning to the user to raise the lower bound of the average electron density `dene`.

##### Derivation
##### Derivation

We calculate the volume integrated profile and then divide by the volume of integration to get the volume average density $\langle n_{\text{e}} \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, and $a$ is the plasma minor radius in the poloidal plane.

Expand Down Expand Up @@ -71,26 +69,26 @@ The desnity profile class is organised around a central runner function that is
\frac{\rho^2}{\rho_{\text{ped},n}^2}\right)^{\alpha_n}\right) \ d\rho \\
+\int^1_{\rho_{\text{ped,n}}} \rho\left(n_{\text{sep}} + (n_{\text{ped}} - n_{\text{sep}})\left( \frac{1- \rho}{1-\rho_{\text{ped},n}}\right)\right)\right] \ d\rho
$$

Integrating each part within its bounds:

$$
4\pi^2R\left[ \frac{\left(n_{\text{ped}} {\alpha}_{n} + n_{0}\right) {\rho}_{\text{ped,n}}^{2}}{2{\alpha}_{n} + 2} \\
+\frac{\left(1-{\rho}_{\text{ped,n}}\right) \left(\left(n_{\text{sep}} + 2n_{\text{ped}}\right) {\rho}_{\text{ped,n}} + 2n_{\text{sep}} + n_{\text{ped}}\right)}{6}\right]
+\frac{\left(1-{\rho}_{\text{ped,n}}\right) \left(\left(n_{\text{sep}} + 2n_{\text{ped}}\right) {\rho}_{\text{ped,n}} + 2n_{\text{sep}} + n_{\text{ped}}\right)}{6}\right]
$$

In the form of volume average density where the volume integrated density function has to be divided by the volume of the cylinder / torus, within the volume bounded by that pedestal position we get:

$$
\langle n_{\text{e}} \rangle = 4\pi^2R\left[ \frac{\frac{\left(n_{\text{ped}} {\alpha}_{n} + n_{0}\right) {\rho}_{\text{ped,n}}^{2}}{2{\alpha}_{n} + 2}
+\frac{\left(1-{\rho}_{\text{ped,n}}\right) \left(\left(n_{\text{sep}} + 2n_{\text{ped}}\right) {\rho}_{\text{ped,n}} + 2n_{\text{sep}} + n_{\text{ped}}\right)}{6}}{2\pi^2 R \rho^2}\right]
+\frac{\left(1-{\rho}_{\text{ped,n}}\right) \left(\left(n_{\text{sep}} + 2n_{\text{ped}}\right) {\rho}_{\text{ped,n}} + 2n_{\text{sep}} + n_{\text{ped}}\right)}{6}}{2\pi^2 R \rho^2}\right]
$$

In this case, the value of $\rho$ is equal to 1 as we integrated over the full profile.

$$
\langle n_{\text{e}} \rangle = 2\left[\frac{\left(n_{\text{ped}} {\alpha}_{n} + n_{0}\right) {\rho}_{\text{ped,n}}^{2}}{2{\alpha}_{n} + 2} \\
+\frac{\left(1-{\rho}_{\text{ped,n}}\right) \left(\left(n_{\text{sep}} + 2n_{\text{ped}}\right) {\rho}_{\text{ped,n}} + 2n_{\text{sep}} + n_{\text{ped}}\right)}{6}\right]
+\frac{\left(1-{\rho}_{\text{ped,n}}\right) \left(\left(n_{\text{sep}} + 2n_{\text{ped}}\right) {\rho}_{\text{ped,n}} + 2n_{\text{sep}} + n_{\text{ped}}\right)}{6}\right]
$$

$$
Expand All @@ -105,16 +103,16 @@ The desnity profile class is organised around a central runner function that is
- n_{\text{ped}}\left( (1 + \alpha_n)(1+ \rho_{\text{ped,n}}) + (\alpha_n -2)
\rho_{\text{ped,n}}^2\right)\right]
$$

$\blacksquare$

------

4. The y profile is then calculated using [`calculate_profile_y()`](plasma_density_profile.md#calculate-desnity-at-each-radius-position-calculate_profile_y). This routine calculates the density at each normalised minor radius position $\rho$ for a HELIOS-type density pedestal profile[^1]

### Calculate desnity at each radius position | `calculate_profile_y()`
### Calculate desnity at each radius position | `calculate_profile_y()`

A table of the input variables can be found below
A table of the input variables can be found below

| Profile parameter / Input | Density |
|----------------------------------|-----------|
Expand All @@ -128,18 +126,16 @@ The desnity profile class is organised around a central runner function that is
If `ipedestal == 0` then the original parabolic profile form is used

$$
n(\rho) = n_0(1 - \rho^2)^{\alpha_n}
n(\rho) = n_0(1 - \rho^2)^{\alpha_n}
$$

The central density ($n_0$) is then checked to make sure it is not less than the pedestal density, $n_{\text{ped}}$.
If it is less than a logger warning is pushed to the terminal at runtime.

Values of the profile density are then assigned based on the density function below across bounds from 0 to `rhopedn` and `rhopedn` to 1.



$$\begin{aligned}
\mbox{Density:} \ n(\rho) = \left\{
\mbox{Density:} \ n(\rho) = \left\{
\begin{aligned}
& n_{\text{ped}} + (n_0 - n_{\text{ped}}) \left( 1 -
\frac{\rho^2}{\rho_{\text{ped,n}}^2}\right)^{\alpha_n}
Expand All @@ -149,8 +145,7 @@ The desnity profile class is organised around a central runner function that is
\end{aligned}
\right.
\end{aligned}$$


5. Profile is then integrated with `integrate_profile_y()` using Simpsons integration from the profile abstract base class

[^1]: Jean, J. (2011). *HELIOS: A Zero-Dimensional Tool for Next Step and Reactor Studies*. Fusion Science and Technology, 59(2), 308–349. https://doi.org/10.13182/FST11-A11650
[^1]: Jean, J. (2011). *HELIOS: A Zero-Dimensional Tool for Next Step and Reactor Studies*. Fusion Science and Technology, 59(2), 308–349. <https://doi.org/10.13182/FST11-A11650>
Loading