scan_module Module

Module containing routines to perform a parameter scan author: P J Knight, CCFE, Culham Science Centre None This module contains routines to perform a parameter scan over a range of values of a particular scanning variable. !



Contents


Variables

TypeVisibility AttributesNameInitial
integer, public, parameter:: ipnscns =1000

Maximum number of scan points

integer, public, parameter:: ipnscnv =81

Number of available scan variables

integer, public, parameter:: noutvars =84
integer, public, parameter:: width =110
integer, public :: scan_dim

1-D or 2-D scan switch (1=1D, 2=2D)

integer, public :: isweep

Number of scan points to calculate

integer, public :: isweep_2

Number of 2D scan points to calculate

integer, public :: nsweep

Switch denoting quantity to scan:

  • 1 aspect
  • 2 hldivlim
  • 3 pnetelin
  • 4 hfact
  • 5 oacdcp
  • 6 walalw
  • 7 beamfus0
  • 8 fqval
  • 9 te
  • 10 boundu(15: fvs)
  • 11 dnbeta
  • 12 bootstrap_current_fraction_max
  • 13 boundu(10: hfact)
  • 14 fiooic
  • 15 fjprot
  • 16 rmajor
  • 17 bmxlim
  • 18 gammax
  • 19 boundl(16: ohcth)
  • 20 tbrnmn
  • 21 not used
  • 22 cfactr (N.B. requires iavail=0)
  • 23 boundu(72: fipir)
  • 24 powfmax
  • 25 kappa
  • 26 triang
  • 27 tbrmin (for blktmodel > 0 only)
  • 28 bt
  • 29 coreradius
  • 30 fimpvar # OBSOLETE
  • 31 taulimit
  • 32 epsvmc
  • 33 ttarget
  • 34 qtargettotal
  • 35 lambda_q_omp
  • 36 lambda_target
  • 37 lcon_factor
  • 38 Neon upper limit
  • 39 Argon upper limit
  • 40 Xenon upper limit
  • 41 blnkoth
  • 42 Argon fraction fimp(9)
  • 43 normalised minor radius at which electron cyclotron current drive is maximum
  • 44 Allowable maximum shear stress (Tresca) in tf coil structural material
  • 45 Minimum allowable temperature margin ; tf coils
  • 46 boundu(150) fgwsep
  • 47 impurity_enrichment(9) Argon impurity enrichment
  • 48 TF coil - n_pancake (integer turn winding pack)
  • 49 TF coil - n_layer (integer turn winding pack)
  • 50 Xenon fraction fimp(13)
  • 51 Power fraction to lower DN Divertor ftar
  • 52 SoL radiation fraction
  • 54 GL_nbti upper critical field at 0 Kelvin
  • 55 shldith : Inboard neutron shield thickness
  • 56 crypmw_max: Maximum cryogenic power (ixx=164, ixc=87)
  • 57 bt lower boundary
  • 58 scrapli : Inboard plasma-first wall gap
  • 59 scraplo : Outboard plasma-first wall gap
  • 60 sig_tf_wp_max: Allowable stress in TF Coil conduit (Tresca)
  • 61 copperaoh_m2_max : CS coil current / copper area
  • 62 coheof : CS coil current density at EOF
  • 63 ohcth : CS thickness (m)
  • 64 ohhghf : CS height (m)
  • 65 n_cycle_min : Minimum cycles for CS stress model constraint 90
  • 66 oh_steel_frac: Steel fraction in CS coil
  • 67 t_crack_vertical: Initial crack vertical dimension (m)
  • 68 inlet_temp_liq' : Inlet temperature of blanket liquid metal coolant/breeder (K) <LI> 69outlet_temp_liq' : Outlet temperature of blanket liquid metal coolant/breeder (K)
  • 70 blpressure_liq' : Blanket liquid metal breeder/coolant pressure (Pa) <LI> 71n_liq_recirc' : Selected number of liquid metal breeder recirculations per day
  • 72 bz_channel_conduct_liq' : Conductance of liquid metal breeder duct walls (A V-1 m-1) <LI> 73pnuc_fw_ratio_dcll' : Ratio of FW nuclear power as fraction of total (FW+BB)
  • 74 `f_nuc_pow_bz_struct' : Fraction of BZ power cooled by primary coolant for dual-coolant balnket
  • 75 pitch : pitch of first wall cooling channels (m)
  • 76 etath : Thermal conversion eff.
  • 77 startupratio : Gyrotron redundancy
  • 78 fkind : Multiplier for Nth of a kind costs
  • 79 etaech : ECH wall plug to injector efficiency

  • integer, public :: nsweep_2

    nsweep_2 /3/ : switch denoting quantity to scan for 2D scan:

    real(kind=dp), public, dimension(ipnscns):: sweep

    sweep(ipnscns) /../: actual values to use in scan

    real(kind=dp), public, dimension(ipnscns):: sweep_2

    sweep_2(ipnscns) /../: actual values to use in 2D scan

    logical, public :: first_call_1d
    logical, public :: first_call_2d

    Subroutines

    public subroutine init_scan_module()

    Initialise module variables

    Arguments

    None

    public subroutine scan_1d_write_point_header(iscan)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in) :: iscan

    Scan point number

    public subroutine scan_1d_store_output(iscan, ifail, noutvars_, ipnscns_, outvar)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in) :: iscan
    integer, intent(in) :: ifail
    integer, intent(in) :: noutvars_
    integer, intent(in) :: ipnscns_
    real(kind=dp), intent(out), dimension(noutvars_,ipnscns_):: outvar

    public subroutine scan_1d_write_plot(iscan, outvar)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(inout) :: iscan
    real(kind=dp), intent(in), dimension(:,:):: outvar

    public subroutine scan_2d_init()

    Routine to call 2-D scan author: J Morris, UKAEA, Culham Science Centre

    Arguments

    None

    public subroutine scan_2d_write_point_header(iscan, iscan_1, iscan_2, iscan_R)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in) :: iscan
    integer, intent(in) :: iscan_1
    integer, intent(in) :: iscan_2
    integer, intent(out) :: iscan_R

    public subroutine scan_2d_store_output(ifail, iscan_1, iscan_R, iscan, noutvars_, ipnscns_, outvar, sweep_1_vals, sweep_2_vals)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in) :: ifail
    integer, intent(in) :: iscan_1
    integer, intent(in) :: iscan_R
    integer, intent(in) :: iscan
    integer, intent(in) :: noutvars_
    integer, intent(in) :: ipnscns_
    real(kind=dp), intent(out), dimension(noutvars_,ipnscns_):: outvar
    real(kind=dp), intent(out), dimension(ipnscns_):: sweep_1_vals
    real(kind=dp), intent(out), dimension(ipnscns_):: sweep_2_vals

    public subroutine scan_2d_write_plot(iscan, outvar, sweep_1_vals, sweep_2_vals)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(inout) :: iscan
    real(kind=dp), intent(in), dimension(:,:):: outvar
    real(kind=dp), intent(in), dimension(:):: sweep_1_vals
    real(kind=dp), intent(in), dimension(:):: sweep_2_vals

    public subroutine scan_select(nwp, swp, iscn, vlab, xlab)

    Routine to select first scan case author: J Morris, UKAEA, Culham Science Centre

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in) :: nwp
    real(kind=dp), intent(in), dimension(:):: swp
    integer, intent(in) :: iscn
    character(len=25), intent(out) :: vlab
    character(len=25), intent(out) :: xlab

    public subroutine post_optimise(ifail)

    Called after calling the optimising equation solver from Python. author: P J Knight, CCFE, Culham Science Centre ifail : input integer : error flag

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in) :: ifail