New Psep scaling (PsepB/qAR) author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string New Psep scaling (PsepB/qAR) Issue #464 #=# physics #=#=# fpsepbqar, psepbqarmax and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fpsepbqar : input real : f-value for upper limit on psepbqar, maximum PsepBt/qAR limit psepbqarmax : input real : maximum permitted value of ratio of PsepBt/qAR (MWT/m) pdivt : input real : Power to conducted to the divertor region (MW) bt : input real : toroidal field on axis (T) (iteration variable 2) q95 : input real : safety factor q at 95% flux surface aspect : input real : aspect ratio (iteration variable 1) rmajor : input real : plasma major radius (m) (iteration variable 3)
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_068(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units)
!! New Psep scaling (PsepB/qAR)
!! author: P B Lloyd, CCFE, Culham Science Centre
!! args : output structure : residual error; constraint value;
!! residual error in physical units; output string; units string
!! New Psep scaling (PsepB/qAR)
!! Issue #464
!! #=# physics
!! #=#=# fpsepbqar, psepbqarmax
!! and hence also optional here.
!! Logic change during pre-factoring: err, symbol, units will be assigned only if present.
!! fpsepbqar : input real : f-value for upper limit on psepbqar, maximum Psep*Bt/qAR limit
!! psepbqarmax : input real : maximum permitted value of ratio of Psep*Bt/qAR (MWT/m)
!! pdivt : input real : Power to conducted to the divertor region (MW)
!! bt : input real : toroidal field on axis (T) (iteration variable 2)
!! q95 : input real : safety factor q at 95% flux surface
!! aspect : input real : aspect ratio (iteration variable 1)
!! rmajor : input real : plasma major radius (m) (iteration variable 3)
use constraint_variables, only: fpsepbqar, psepbqarmax
use physics_variables, only: pdivt, bt, q95, aspect, rmajor
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 - fpsepbqar * psepbqarmax / ((pdivt*bt)/(q95*aspect*rmajor))
tmp_con = psepbqarmax
tmp_err = (pdivt*bt)/(q95*aspect*rmajor) - psepbqarmax
tmp_symbol = '<'
tmp_units = 'MWT/m'
end subroutine constraint_eqn_068