constraint_eqn_007 Subroutine

public 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:

  • = 0 do not assume plasma ignition;
  • = 1 assume ignited (but include auxiliary power in costs)
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. beam_density_out : input real : hot beam ion density from calculation (/m3) dnbeam : input real : hot beam ion density, variable (/m3)

Arguments

Type IntentOptional AttributesName
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

Contents

Source Code


Source Code

   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.
      !! beam_density_out : input real :  hot beam ion density from calculation (/m3)
      !! dnbeam : input real : hot beam ion density, variable (/m3)
      use physics_variables, only: ignite, beam_density_out, 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 - beam_density_out/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