Relationship between beta, temperature (keV) and density
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(out) | :: | tmp_cc | |||
real(kind=dp), | intent(out) | :: | tmp_con | |||
real(kind=dp), | intent(out) | :: | tmp_err | |||
character(len=1), | intent(out) | :: | tmp_symbol | |||
character(len=10), | intent(out) | :: | tmp_units | constraint derived type |
subroutine constraint_eqn_001(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units)
!! author: J Morris
!! category: equality constraint
!!
!! Relationship between beta, temperature (keV) and density
!!
!! \begin{equation}
!! c_i = 1 - \frac{1}{\beta}\left( \beta_{ft} + \beta_{NBI} + 2 \times 10^3 \mu_0 e
!! \left( \frac{n_e T_e + n_i T_i}{B_{tot}^2} \right) \right)
!! \end{equation}
!!
!! - \( \beta \) -- total plasma beta
!! - \( \beta_{ft} \) -- fast alpha beta component
!! - \( \beta_{NBI} \) -- neutral beam beta component
!! - \( n_e \) -- electron density [m\(^3\)]
!! - \( n_i \) -- total ion density [m\(^3\)]
!! - \( T_e \) -- density weighted average electron temperature [keV]
!! - \( T_i \) -- density weighted average ion temperature [keV]
!! - \( B_{tot} \) -- total toroidal + poloidal field [T]
use physics_variables, only: betaft, beta_beam, dene, ten, dnitot, tin, btot, beta
use constants, only: electron_charge,rmu0
implicit none
! type(constraint_args_type), intent(out) :: args
real(dp), intent(out) :: tmp_cc
real(dp), intent(out) :: tmp_con
real(dp), intent(out) :: tmp_err
character(len=1), intent(out) :: tmp_symbol
character(len=10), intent(out) :: tmp_units
!! constraint derived type
tmp_cc = 1.0D0 - (betaft + beta_beam + &
2.0D3*rmu0*electron_charge * (dene*ten + dnitot*tin)/btot**2 )/beta
tmp_con = beta * (1.0D0 - tmp_cc)
tmp_err = beta * tmp_cc
tmp_symbol = '='
tmp_units = ''
end subroutine constraint_eqn_001