init_numerics Subroutine

public subroutine init_numerics()

Arguments

None

Contents

Source Code


Source Code

  subroutine init_numerics()
    ! Initialise module variables
    ioptimz = 1
    minmax = 7
    lablmm = (/ &
      'major radius          ', &
      'not used              ', &
      'neutron wall load     ', &
      'P_tf + P_pf           ', &
      'fusion gain           ', &
      'cost of electricity   ', &
      'capital cost          ', &
      'aspect ratio          ', &
      'divertor heat load    ', &
      'toroidal field        ', &
      'total injected power  ', &
      'H plant capital cost  ', &
      'H production rate     ', &
      'pulse length          ', &
      'plant availability    ', &
      'min R0, max tau_burn  ', &
      'net electrical output ', &
      'Null figure of merit  ', &
      'max Q, max t_burn     '  &
      /)

    ncalls = 0
    neqns = 0
    nfev1 = 0
    nfev2 = 0
    nineqns = 0
    nvar = 16
    nviter = 0
    icc = 0
    active_constraints = .false.

    lablcc = (/ &
      'Beta consistency                 ', &
      'Global power balance consistency ', &
      'Ion power balance                ', &
      'Electron power balance           ', &
      'Density upper limit              ', &
      '(Epsilon x beta-pol) upper limit ', &
      'Beam ion density consistency     ', &
      'Neutron wall load upper limit    ', &
      'Fusion power upper limit         ', &
      'Toroidal field 1/R consistency   ', &
      'Radial build consistency         ', &
      'Volt second lower limit          ', &
      'Burn time lower limit            ', &
      'NBI decay lengths consistency    ', &
      'L-H power threshold limit        ', &
      'Net electric power lower limit   ', &
      'Radiation fraction upper limit   ', &
      'Divertor heat load upper limit   ', &
      'MVA upper limit                  ', &
      'Beam tangency radius upper limit ', &
      'Plasma minor radius lower limit  ', &
      'Divertor collisionality upper lim', &
      'Conducting shell radius upper lim', &
      'Beta upper limit                 ', &
      'Peak toroidal field upper limit  ', &
      'CS coil EOF current density limit', &
      'CS coil BOP current density limit', &
      'Fusion gain Q lower limit        ', &
      'Inboard radial build consistency ', &
      'Injection power upper limit      ', &
      'TF coil case stress upper limit  ', &
      'TF coil conduit stress upper lim ', &
      'I_op / I_critical (TF coil)      ', &
      'Dump voltage upper limit         ', &
      'J_winding pack/J_protection limit', &
      'TF coil temp. margin lower limit ', &
      'Current drive gamma limit        ', &
      '1st wall coolant temp rise limit ', &
      'First wall peak temperature limit', &
      'Start-up inj. power lower limit  ', &
      'Plasma curr. ramp time lower lim ', &
      'Cycle time lower limit           ', &
      'Average centrepost temperature   ', &
      'Peak centrepost temp. upper limit', &
      'Edge safety factor lower limit   ', &
      'Ip/Irod upper limit              ', &
      'TF coil tor. thickness upper lim ', &
      'Poloidal beta upper limit        ', &
      'RFP reversal parameter < 0       ', &
      'IFE repetition rate upper limit  ', &
      'Startup volt-seconds consistency ', &
      'Tritium breeding ratio lower lim ', &
      'Neutron fluence on TF coil limit ', &
      'Peak TF coil nucl. heating limit ', &
      'Vessel helium concentration limit', &
      'Psep / R upper limit             ', &
      'TF coil leg rad width lower limit', &
      'TF coil leg rad width lower limit', &
      'NB shine-through frac upper limit', &
      'CS temperature margin lower limit', &
      'Minimum availability value       ', &
      'taup/taueff                      ', &
      'number of ITER-like vacuum pumps ', &
      'Zeff limit                       ', &
      'Dump time set by VV stress       ', &
      'Rate of change of energy in field', &
      'Upper Lim. on Radiation Wall load', &
      'Upper Lim. on Psep * Bt / q A R  ', &
      'pdivt < psep_kallenbach divertor ', &
      'Separatrix temp consistency      ', &
      'Separatrix density consistency   ', &
      'CS Tresca yield criterion        ', &
      'Psep >= Plh + Paux               ', &
      'TFC quench < tmax_croco          ', &
      'TFC current/copper area < Max    ', &
      'Eich critical separatrix density ', &
      'TFC current per turn upper limit ', &
      'Reinke criterion fZ lower limit  ', &
      'Peak CS field upper limit        ', &
      'pdivt lower limit                ', &
      'ne0 > neped                      ', &
      'toroidalgap >  tftort            ', &
      'available_space > required_space ', &
      'beta > betalim_lower             ', &
      'CP lifetime                      ', &
      'TFC turn dimension               ', &
      'Cryogenic plant power            ', &
      'TF coil strain absolute value    ', &
      'CS current/copper area < Max     ', &
      'CS stress load cycles            ', &
      'ECRH ignitability                '  &
      /)

    ! Please note: All strings between '...' above must be exactly 33 chars long
    ! Each line of code has a comma before the ampersand, except the last one.
    ! The last ad_varc line ends with the html tag "</UL>".

    ! Issue #495.  Remove default iteration variables
    ixc = 0

    ! WARNING These labels are used as variable names by write_new_in_dat.py, and possibly
    ! other python utilities, so they cannot easily be changed.
    lablxc = ''
    ! Issue 287 iteration variables are now defined in module define_iteration_variables in iteration variables.f90
    sqsumsq = 0.0D0
    objf_name = ""
    norm_objf = 0.0D0
    epsfcn = 1.0D-3
    epsvmc = 1.0D-6
    factor = 0.1D0
    ftol = 1.0D-4

    boundl = 9.d-99
    ! Issue #287 These bounds now defined in initial.f90
    boundu = 9.d99

    bondl = 0.0D0
    bondu = 0.0D0
    rcm = 0.0D0
    resdl = 0.0D0
    scafc = 0.0D0
    scale = 0.0D0
    xcm = 0.0D0
    xcs = 0.0D0
    vlam = 0.0D0
    if (allocated(name_xc)) deallocate(name_xc)
    allocate(name_xc(1))
    name_xc = ""
  end subroutine init_numerics