Equation for centrepost temperature upper limit (TART) 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 centrepost temperature upper limit (TART) #=# tfcoil #=#=# fptemp, ptempalw and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fptemp : input real : f-value for peak centrepost temperature ptempalw : input real : maximum peak centrepost temperature (K) tcpmax : input real : peak centrepost temperature (K) itart : input integer : switch for spherical tokamak (ST) models:
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_044(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units)
!! Equation for centrepost temperature upper limit (TART)
!! 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 centrepost temperature upper limit (TART)
!! #=# tfcoil
!! #=#=# fptemp, ptempalw
!! and hence also optional here.
!! Logic change during pre-factoring: err, symbol, units will be assigned only if present.
!! fptemp : input real : f-value for peak centrepost temperature
!! ptempalw : input real : maximum peak centrepost temperature (K)
!! tcpmax : input real : peak centrepost temperature (K)
!! itart : input integer : switch for spherical tokamak (ST) models:<UL>
!! <LI> = 0 use conventional aspect ratio models;
!! <LI> = 1 use spherical tokamak models</UL>
use constraint_variables, only: fptemp
use tfcoil_variables, only: ptempalw, tcpmax
use physics_variables, only: itart
use tfcoil_variables, only: i_tf_sup
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
! if the machine isn't a ST then report error
if (itart == 0) call report_error(8)
! For some reasons these lines are needed to make VMCON CONVERGE ....
if ( i_tf_sup == 0 ) then ! Copper case
ptempalw = ptempalw - 273.15D0
tcpmax = tcpmax - 273.15D0
end if
tmp_cc = 1.0D0 - fptemp * ptempalw / tcpmax
tmp_con = ptempalw * (1.0D0 - tmp_cc)
tmp_err = tcpmax * tmp_cc
tmp_symbol = '<'
tmp_units = 'deg C'
! For some reasons these lines are needed to make VMCON CONVERGE ....
if ( i_tf_sup == 0 ) then ! Copper case
ptempalw = ptempalw + 273.15D0
tcpmax = tcpmax + 273.15D0
end if
end subroutine constraint_eqn_044