Equation for fusion gain (big Q) lower limit 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 fusion gain (big Q) lower limit #=# physics #=#=# fqval, bigqmin and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fqval : input real : pf-value for Q bigq : input real : Fusion gain; P_fusion / (P_injection + P_ohmic) bigqmin : input real : minimum fusion gain Q 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_028(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units)
!! Equation for fusion gain (big Q) lower limit
!! 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 fusion gain (big Q) lower limit
!! #=# physics
!! #=#=# fqval, bigqmin
!! and hence also optional here.
!! Logic change during pre-factoring: err, symbol, units will be assigned only if present.
!! fqval : input real : pf-value for Q
!! bigq : input real : Fusion gain; P_fusion / (P_injection + P_ohmic)
!! bigqmin : input real : minimum fusion gain Q
!! 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.
use constraint_variables, only: fqval, bigqmin
use current_drive_variables, only: bigq
use physics_variables, only: ignite
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 plasma is not ignited ...
if (ignite == 0) then
tmp_cc = 1.0D0 - fqval * bigq/bigqmin
tmp_con = bigqmin * (1.0D0 - tmp_cc)
tmp_err = bigqmin * tmp_cc
tmp_symbol = '>'
tmp_units = ''
! if plasma is ignited report error
else
tmp_cc = 0
tmp_con = 0
tmp_err = 0
tmp_symbol = ''
tmp_units = ''
call report_error(4)
end if
end subroutine constraint_eqn_028