Equation for maximum CS field author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for maximum CS field #=# pfcoil #=#=# fbmaxcs, bmaxoh, bmaxoh0, bmaxcs_lim and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fbmaxcs : input : F-value for CS mmax field (cons. 79, itvar 149) bmaxcs_lim : input : Central solenoid max field limit [T] bmaxoh0 : input : maximum field in central solenoid at beginning of pulse (T) bmaxoh : input real : maximum field in central solenoid at end of flat-top (EoF) (T) (Note: original code has "bmaxoh/bmaxoh0 | peak CS field [T]".)
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 |
subroutine constraint_eqn_079(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units)
!! Equation for maximum CS field
!! author: P B Lloyd, CCFE, Culham Science Centre
!! args : output structure : residual error; constraint value; residual error in physical units; output string; units string
!! Equation for maximum CS field
!! #=# pfcoil
!! #=#=# fbmaxcs, bmaxoh, bmaxoh0, bmaxcs_lim
!! and hence also optional here.
!! Logic change during pre-factoring: err, symbol, units will be assigned only if present.
!! fbmaxcs : input : F-value for CS mmax field (cons. 79, itvar 149)
!! bmaxcs_lim : input : Central solenoid max field limit [T]
!! bmaxoh0 : input : maximum field in central solenoid at beginning of pulse (T)
!! bmaxoh : input real : maximum field in central solenoid at end of flat-top (EoF) (T)
!! (Note: original code has "bmaxoh/bmaxoh0 | peak CS field [T]".)
use pfcoil_variables, only: fbmaxcs, bmaxcs_lim, bmaxoh0, bmaxoh
implicit none
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
tmp_cc = 1.0D0 - fbmaxcs * bmaxcs_lim/max(bmaxoh, bmaxoh0)
tmp_con = bmaxcs_lim
tmp_err = max(bmaxoh, bmaxoh0) * tmp_cc
tmp_symbol = '<'
tmp_units = 'A/turn'
end subroutine constraint_eqn_079