Equation for hot beam ion density args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for hot beam ion density This is a consistency equation (NBI) #=# physics #=#=# consistency and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. ignite : input integer : switch for ignition assumption:
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_007(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units)
!! Equation for hot beam ion density
!! args : output structure : residual error; constraint value;
!! residual error in physical units; output string; units string
!! Equation for hot beam ion density
!! This is a consistency equation (NBI)
!! #=# physics
!! #=#=# consistency
!! and hence also optional here.
!! Logic change during pre-factoring: err, symbol, units will be assigned only if present.
!! ignite : input integer : switch for ignition assumption:<UL>
!! <LI> = 0 do not assume plasma ignition;
!! <LI> = 1 assume ignited (but include auxiliary power in costs)</UL>
!! Obviously, ignite must be zero if current drive is required.
!! If ignite=1, any auxiliary power is assumed to be used only
!! during plasma start-up, and is excluded from all steady-state
!! power balance calculations.
!! dnbeam2 : input real : hot beam ion density from calculation (/m3)
!! dnbeam : input real : hot beam ion density, variable (/m3)
use physics_variables, only: ignite, dnbeam2, dnbeam
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
! Do not assume plasma ignition:
if (ignite == 0) then
tmp_cc = 1.0D0 - dnbeam2/dnbeam
tmp_con = dnbeam * (1.0D0 - tmp_cc)
tmp_err = dnbeam * tmp_cc
tmp_symbol = '='
tmp_units = '/m3'
else
tmp_cc = 0
tmp_con = 0
tmp_err = 0
tmp_symbol = ''
tmp_units = ''
call report_error(1)
end if
end subroutine constraint_eqn_007