Global power balance equation for ions args : output structure : residual error; constraint value; residual error in physical units; output string; units string Global power balance equation for ions 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_003(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units)
!! Global power balance equation for ions
!! args : output structure : residual error; constraint value;
!! residual error in physical units; output string; units string
!! Global power balance equation for ions
!! 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>
!! ptripv : input real : ion transport power per volume (MW/m3)
!! piepv : input real : ion/electron equilibration power per volume (MW/m3)
!! f_alpha_plasma : input real : fraction of alpha power deposited in plasma
!! alpha_power_ions_density : input real : alpha power per volume to ions (MW/m3)
!! pinjimw : input real : auxiliary injected power to ions (MW)
!! plasma_volume : input real : plasma volume (m3)
use physics_variables, only: ignite, ptripv, piepv, f_alpha_plasma, alpha_power_ions_density, plasma_volume
use current_drive_variables, only: pinjimw
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
! No assume plasma ignition:
if (ignite == 0) then
tmp_cc = 1.0D0 - (ptripv + piepv) / (f_alpha_plasma*alpha_power_ions_density + pinjimw/plasma_volume)
tmp_con = (f_alpha_plasma*alpha_power_ions_density + pinjimw/plasma_volume) * (1.0D0 - tmp_cc)
tmp_err = (f_alpha_plasma*alpha_power_ions_density + pinjimw/plasma_volume) * tmp_cc
tmp_symbol = '='
tmp_units = 'MW/m3'
! Plasma ignited:
else
tmp_cc = 1.0D0 - (ptripv+piepv) / (f_alpha_plasma*alpha_power_ions_density)
tmp_con = (f_alpha_plasma*alpha_power_ions_density) * (1.0D0 - tmp_cc)
tmp_err = (f_alpha_plasma*alpha_power_ions_density) * tmp_cc
tmp_symbol = '='
tmp_units = 'MW/m3'
end if
end subroutine constraint_eqn_003