Skip to content

scan_variables

Module containing routines to perform a parameter scan

None This module contains routines to perform a parameter scan over a range of values of a particular scanning variable.

IPNSCNS = 1000 module-attribute

Maximum number of scan points

IPNSCNV = 81 module-attribute

Number of available scan variables

NOUTVARS = 84 module-attribute

CREATE_DICTS_FROM_DATACLASS = ScanData module-attribute

ScanData dataclass

Source code in process/data_structure/scan_variables.py
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
@dataclass(slots=True)
class ScanData:
    scan_dim: int = 1
    """1-D or 2-D scan switch (1=1D, 2=2D)"""

    isweep: int = 0
    """Number of scan points to calculate"""

    isweep_2: int = 0
    """Number of 2D scan points to calculate"""

    nsweep: int = 1
    """Switch denoting quantity to scan:<UL>
    <LI> 1  aspect
    <LI> 2  pflux_div_heat_load_max_mw
    <LI> 3  p_plant_electric_net_required_mw
    <LI> 4  hfact
    <LI> 5  j_tf_coil_full_area
    <LI> 6  pflux_fw_neutron_max_mw
    <LI> 7  beamfus0
    <LI> 8  NOT USED
    <LI> 9  temp_plasma_electron_vol_avg_kev
    <LI> 10 NOT USED
    <LI> 11 beta_norm_max
    <LI> 12 f_c_plasma_bootstrap_max
    <LI> 13 boundu(10: hfact)
    <LI> 14 f_j_tf_wp_critical_max
    <LI> 16 rmajor
    <LI> 15 NOT USED
    <LI> 17 b_tf_inboard_max
    <LI> 18 eta_cd_norm_hcd_primary_max
    <LI> 19 boundl(16: dr_cs)
    <LI> 20 t_burn_min
    <LI> 21 NOT USED
    <LI> 22 f_t_plant_available (N.B. requires i_plant_availability=0)
    <LI> 23 NOT USED
    <LI> 24 p_fusion_total_max_mw
    <LI> 25 kappa
    <LI> 26 triang
    <LI> 27 tbrmin (for blktmodel > 0 only)
    <LI> 28 b_plasma_toroidal_on_axis
    <LI> 29 radius_plasma_core_norm
    <LI> 30 fimpvar # OBSOLETE
    <LI> 31 f_t_alpha_energy_confinement_min
    <LI> 32 epsvmc
    <LI> 33 ttarget
    <LI> 34 qtargettotal
    <LI> 35 lambda_q_omp
    <LI> 36 lambda_target
    <LI> 37 lcon_factor
    <LI> 38 Neon upper limit
    <LI> 39 Argon upper limit
    <LI> 40 Xenon upper limit
    <LI> 41 dr_blkt_outboard
    <LI> 42 Argon fraction f_nd_impurity_electrons(9)
    <LI> 43 normalised minor radius at which electron cyclotron current drive is maximum
    <LI> 44 Allowable maximum shear stress (Tresca) in tf coil structural material
    <LI> 45 Minimum allowable temperature margin ; tf coils
    <LI> 46 boundu(150) f_nd_plasma_separatrix_greenwald
    <LI> 47 impurity_enrichment(9) Argon impurity enrichment
    <LI> 48 TF coil - n_tf_wp_pancakes (integer turn winding pack)
    <LI> 49 TF coil - n_tf_wp_layers (integer turn winding pack)
    <LI> 50 Xenon fraction f_nd_impurity_electrons(13)
    <LI> 51 Power fraction to lower DN Divertor f_p_div_lower
    <LI> 52 SoL radiation fraction
    <LI> 54 GL_nbti upper critical field at 0 Kelvin
    <LI> 55 `dr_shld_inboard` : Inboard neutron shield thickness
    <LI> 56 p_cryo_plant_electric_max_mw: Maximum cryogenic power (ixx=164, ixc=87)
    <LI> 57 `b_plasma_toroidal_on_axis` lower boundary
    <LI> 58 `dr_fw_plasma_gap_inboard` : Inboard plasma-first wall gap
    <LI> 59 `dr_fw_plasma_gap_outboard` : Outboard plasma-first wall gap
    <LI> 60 sig_tf_wp_max: Allowable stress in TF Coil conduit (Tresca)
    <LI> 61 copperaoh_m2_max : CS coil current / copper area
    <LI> 62 j_cs_flat_top_end : CS coil current density at EOF
    <LI> 63 dr_cs : CS thickness (m)
    <LI> 64 f_z_cs_tf_internal : CS height (m)
    <LI> 65 n_cycle_min : Minimum cycles for CS stress model constraint 90
    <LI> 66 f_a_cs_turn_steel: Steel fraction in CS coil
    <LI> 67 t_crack_vertical: Initial crack vertical dimension (m) </UL>
    <LI> 68 `inlet_temp_liq' : Inlet temperature of blanket liquid metal coolant/breeder (K)
    <LI> 69 `outlet_temp_liq' : Outlet temperature of blanket liquid metal coolant/breeder (K)
    <LI> 70 `blpressure_liq' : Blanket liquid metal breeder/coolant pressure (Pa)
    <LI> 71 `n_liq_recirc' : Selected number of liquid metal breeder recirculations per day
    <LI> 72 `bz_channel_conduct_liq' : Conductance of liquid metal breeder duct walls (A V-1 m-1)
    <LI> 73 `pnuc_fw_ratio_dcll' : Ratio of FW nuclear power as fraction of total (FW+BB)
    <LI> 74 `f_nuc_pow_bz_struct' : Fraction of BZ power cooled by primary coolant for dual-coolant balnket
    <LI> 75 dx_fw_module : pitch of first wall cooling channels (m)
    <LI> 76 eta_turbine : Thermal conversion eff.
    <LI> 77 startupratio : Gyrotron redundancy
    <LI> 78 fkind : Multiplier for Nth of a kind costs
    <LI> 79 eta_ecrh_injector_wall_plug : ECH wall plug to injector efficiency
    """

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

    sweep: list[float] = field(
        default_factory=lambda: np.zeros(IPNSCNS, dtype=np.float64)
    )
    """sweep(IPNSCNS) /../: actual values to use in scan"""

    sweep_2: list[float] = field(
        default_factory=lambda: np.zeros(IPNSCNS, dtype=np.float64)
    )
    """sweep_2(IPNSCNS) /../: actual values to use in 2D scan"""

    # Vars in subroutines scan_1d and scan_2d requiring re-initialising before
    # each new run

    first_call_1d: bool = True

    first_call_2d: bool = True

scan_dim = 1 class-attribute instance-attribute

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

isweep = 0 class-attribute instance-attribute

Number of scan points to calculate

isweep_2 = 0 class-attribute instance-attribute

Number of 2D scan points to calculate

nsweep = 1 class-attribute instance-attribute

Switch denoting quantity to scan:

  • 1 aspect
  • 2 pflux_div_heat_load_max_mw
  • 3 p_plant_electric_net_required_mw
  • 4 hfact
  • 5 j_tf_coil_full_area
  • 6 pflux_fw_neutron_max_mw
  • 7 beamfus0
  • 8 NOT USED
  • 9 temp_plasma_electron_vol_avg_kev
  • 10 NOT USED
  • 11 beta_norm_max
  • 12 f_c_plasma_bootstrap_max
  • 13 boundu(10: hfact)
  • 14 f_j_tf_wp_critical_max
  • 16 rmajor
  • 15 NOT USED
  • 17 b_tf_inboard_max
  • 18 eta_cd_norm_hcd_primary_max
  • 19 boundl(16: dr_cs)
  • 20 t_burn_min
  • 21 NOT USED
  • 22 f_t_plant_available (N.B. requires i_plant_availability=0)
  • 23 NOT USED
  • 24 p_fusion_total_max_mw
  • 25 kappa
  • 26 triang
  • 27 tbrmin (for blktmodel > 0 only)
  • 28 b_plasma_toroidal_on_axis
  • 29 radius_plasma_core_norm
  • 30 fimpvar # OBSOLETE
  • 31 f_t_alpha_energy_confinement_min
  • 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 dr_blkt_outboard
  • 42 Argon fraction f_nd_impurity_electrons(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) f_nd_plasma_separatrix_greenwald
  • 47 impurity_enrichment(9) Argon impurity enrichment
  • 48 TF coil - n_tf_wp_pancakes (integer turn winding pack)
  • 49 TF coil - n_tf_wp_layers (integer turn winding pack)
  • 50 Xenon fraction f_nd_impurity_electrons(13)
  • 51 Power fraction to lower DN Divertor f_p_div_lower
  • 52 SoL radiation fraction
  • 54 GL_nbti upper critical field at 0 Kelvin
  • 55 `dr_shld_inboard` : Inboard neutron shield thickness
  • 56 p_cryo_plant_electric_max_mw: Maximum cryogenic power (ixx=164, ixc=87)
  • 57 `b_plasma_toroidal_on_axis` lower boundary
  • 58 `dr_fw_plasma_gap_inboard` : Inboard plasma-first wall gap
  • 59 `dr_fw_plasma_gap_outboard` : 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 j_cs_flat_top_end : CS coil current density at EOF
  • 63 dr_cs : CS thickness (m)
  • 64 f_z_cs_tf_internal : CS height (m)
  • 65 n_cycle_min : Minimum cycles for CS stress model constraint 90
  • 66 f_a_cs_turn_steel: 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)
  • 69 `outlet_temp_liq' : Outlet temperature of blanket liquid metal coolant/breeder (K)
  • 70 `blpressure_liq' : Blanket liquid metal breeder/coolant pressure (Pa)
  • 71 `n_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)
  • 73 `pnuc_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 dx_fw_module : pitch of first wall cooling channels (m)
  • 76 eta_turbine : Thermal conversion eff.
  • 77 startupratio : Gyrotron redundancy
  • 78 fkind : Multiplier for Nth of a kind costs
  • 79 eta_ecrh_injector_wall_plug : ECH wall plug to injector efficiency
  • nsweep_2 = 3 class-attribute instance-attribute

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

    sweep = field(default_factory=(lambda: np.zeros(IPNSCNS, dtype=(np.float64)))) class-attribute instance-attribute

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

    sweep_2 = field(default_factory=(lambda: np.zeros(IPNSCNS, dtype=(np.float64)))) class-attribute instance-attribute

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

    first_call_1d = True class-attribute instance-attribute

    first_call_2d = True class-attribute instance-attribute