diff --git a/process/blanket_library.py b/process/blanket_library.py index 8349c81633..9c6803a455 100644 --- a/process/blanket_library.py +++ b/process/blanket_library.py @@ -2917,3 +2917,71 @@ def dshellvol(rmajor, rminor, zminor, drin, drout, dz): vout = v2 - v1 return vin, vout, vin + vout + + +def init_blanket_library(): + blanket_library.hblnkt = 0.0 + blanket_library.hshld = 0.0 + blanket_library.dz_pf_cryostat = 0.0 + blanket_library.hvv = 0.0 + blanket_library.volshldi = 0.0 + blanket_library.volshldo = 0.0 + blanket_library.vol_vv_inboard = 0.0 + blanket_library.vol_vv_outboard = 0.0 + blanket_library.bldepti = 0.0 + blanket_library.bldepto = 0.0 + blanket_library.blwidti = 0.0 + blanket_library.blwidto = 0.0 + blanket_library.bllengi = 0.0 + blanket_library.bllengo = 0.0 + blanket_library.len_blkt_inboard_channel_total = 0.0 + blanket_library.bzfllengi_liq = 0.0 + blanket_library.bzfllengo_liq = 0.0 + blanket_library.len_blkt_outboard_channel_total = 0.0 + blanket_library.p_fw_inboard_nuclear_heat_mw = 0.0 + blanket_library.p_fw_outboard_nuclear_heat_mw = 0.0 + blanket_library.temp_fw_inboard_peak = 0.0 + blanket_library.temp_fw_outboard_peak = 0.0 + blanket_library.mflow_fw_inboard_coolant_total = 0.0 + blanket_library.mflow_fw_outboard_coolant_total = 0.0 + blanket_library.mflow_fw_coolant_total = 0.0 + blanket_library.n_fw_inboard_channels = 0.0 + blanket_library.n_fw_outboard_channels = 0.0 + blanket_library.mflow_fw_inboard_coolant_channel = 0.0 + blanket_library.mflow_fw_outboard_coolant_channel = 0.0 + blanket_library.p_blkt_nuclear_heat_inboard_mw = 0.0 + blanket_library.p_blkt_nuclear_heat_outboard_mw = 0.0 + blanket_library.mflow_blkt_inboard_coolant = 0.0 + blanket_library.mflow_blkt_outboard_coolant = 0.0 + blanket_library.mfblkti_liq = 0.0 + blanket_library.mfblkto_liq = 0.0 + blanket_library.mfblkt_liq = 0.0 + blanket_library.mflow_blkt_coolant_total = 0.0 + blanket_library.mftotal = 0.0 + blanket_library.n_blkt_inboard_channels = 0.0 + blanket_library.n_blkt_outboard_channels = 0.0 + blanket_library.mfblktpi = 0.0 + blanket_library.mfblktpo = 0.0 + blanket_library.vel_blkt_inboard_coolant = 0.0 + blanket_library.vel_blkt_outboard_coolant = 0.0 + blanket_library.htpmw_fwi = 0.0 + blanket_library.htpmw_fwo = 0.0 + blanket_library.htpmw_blkti = 0.0 + blanket_library.htpmw_blkto = 0.0 + blanket_library.vfblkti = 0.0 + blanket_library.vfblkto = 0.0 + + +def init_primary_pumping_variables(): + """Initialise primary pumping variables""" + primary_pumping_variables.gamma_he = 1.667 # Ratio of specific heats Helium + primary_pumping_variables.t_in_bb = 573.13 # K + primary_pumping_variables.t_out_bb = 773.13 # K + primary_pumping_variables.p_he = 8.0e6 # Pa + primary_pumping_variables.dp_he = 5.5e5 # Pa + primary_pumping_variables.dp_fw_blkt = 1.5e5 # Pa + primary_pumping_variables.dp_fw = 1.5e5 # Pa + primary_pumping_variables.dp_blkt = 3.5e3 # Pa + primary_pumping_variables.dp_liq = 1.0e7 # Pa + primary_pumping_variables.htpmw_fw_blkt = 0.0 + primary_pumping_variables.f_p_fw_blkt_pump = 1.0 diff --git a/process/build.py b/process/build.py index 85f6471ce7..898e57a67c 100644 --- a/process/build.py +++ b/process/build.py @@ -2423,3 +2423,95 @@ def calculate_radial_build(self, output: bool) -> None: "(beamwd)", current_drive_variables.beamwd, ) + + +def init_build_variables(): + build_variables.aplasmin = 0.25 + build_variables.available_radial_space = 0.0 + build_variables.blarea = 0.0 + build_variables.blareaib = 0.0 + build_variables.blareaob = 0.0 + build_variables.blbmith = 0.17 + build_variables.blbmoth = 0.27 + build_variables.blbpith = 0.30 + build_variables.blbpoth = 0.35 + build_variables.blbuith = 0.365 + build_variables.blbuoth = 0.465 + build_variables.dr_blkt_inboard = 0.115 + build_variables.dr_blkt_outboard = 0.235 + build_variables.dz_blkt_upper = 0.0 + build_variables.dr_bore = 1.42 + build_variables.f_z_cryostat = 4.268 + build_variables.dr_cryostat = 0.07 + build_variables.dr_vv_inboard = 0.07 + build_variables.dr_vv_outboard = 0.07 + build_variables.dz_vv_upper = 0.07 + build_variables.dz_vv_lower = 0.07 + build_variables.dr_vv_shells = 0.12 + build_variables.f_avspace = 1.0 + build_variables.fcspc = 0.6 + build_variables.fseppc = 3.5e8 + build_variables.a_fw_total = 0.0 + build_variables.a_fw_inboard = 0.0 + build_variables.a_fw_outboard = 0.0 + build_variables.dr_fw_inboard = 0.0 + build_variables.dr_fw_outboard = 0.0 + build_variables.dr_shld_vv_gap_inboard = 0.155 + build_variables.dr_cs_tf_gap = 0.08 + build_variables.gapomin = 0.234 + build_variables.dr_shld_vv_gap_outboard = 0.0 + build_variables.hmax = 0.0 + build_variables.hpfdif = 0.0 + build_variables.hpfu = 0.0 + build_variables.hr1 = 0.0 + build_variables.iohcl = 1 + build_variables.i_cs_precomp = 1 + build_variables.i_tf_inside_cs = 0 + build_variables.dr_cs = 0.811 + build_variables.dr_cs_precomp = 0.0 + build_variables.rbld = 0.0 + build_variables.required_radial_space = 0.0 + build_variables.rinboard = 0.651 + build_variables.rsldi = 0.0 + build_variables.rsldo = 0.0 + build_variables.r_vv_inboard_out = 0.0 + build_variables.r_sh_inboard_out = 0.0 + build_variables.r_tf_inboard_in = 0.0 + build_variables.r_tf_inboard_mid = 0.0 + build_variables.r_tf_inboard_out = 0.0 + build_variables.r_tf_outboard_mid = 0.0 + build_variables.i_r_cp_top = 0 + build_variables.r_cp_top = 0.0 + build_variables.f_r_cp = 1.4 + build_variables.dr_tf_inner_bore = 0.0 + build_variables.dh_tf_inner_bore = 0.0 + build_variables.dr_fw_plasma_gap_inboard = 0.14 + build_variables.dr_fw_plasma_gap_outboard = 0.15 + build_variables.sharea = 0.0 + build_variables.shareaib = 0.0 + build_variables.shareaob = 0.0 + build_variables.dr_shld_inboard = 0.69 + build_variables.dz_shld_lower = 0.7 + build_variables.dr_shld_outboard = 1.05 + build_variables.dz_shld_upper = 0.6 + build_variables.sigallpc = 3.0e8 + build_variables.dr_tf_inboard = 0.0 + build_variables.tfoffset = 0.0 + build_variables.tfootfi = 1.19 + build_variables.dr_tf_outboard = 0.0 + build_variables.dr_tf_shld_gap = 0.05 + build_variables.dr_shld_thermal_inboard = 0.05 + build_variables.dr_shld_thermal_outboard = 0.05 + build_variables.dz_shld_thermal = 0.05 + build_variables.dz_shld_vv_gap = 0.163 + build_variables.dz_xpoint_divertor = 0.0 + build_variables.dz_fw_plasma_gap = 0.60 + build_variables.dr_shld_blkt_gap = 0.05 + build_variables.plleni = 1.0 + build_variables.plleno = 1.0 + build_variables.plsepi = 1.0 + build_variables.plsepo = 1.5 + build_variables.rspo = 0.0 + build_variables.r_sh_inboard_in = 0.0 + build_variables.z_plasma_xpoint_upper = 0.0 + build_variables.z_plasma_xpoint_lower = 0.0 diff --git a/process/buildings.py b/process/buildings.py index 3dafebe309..bab47fc980 100644 --- a/process/buildings.py +++ b/process/buildings.py @@ -1493,3 +1493,159 @@ def bldgs_sizes(self, output, tf_radial_dim, tf_vertical_dim): "(staff_buildings_vol)", staff_buildings_vol, ) + + +def init_buildings_variables(): + buildings_variables.admv = 1.0e5 + buildings_variables.admvol = 0.0 + buildings_variables.aux_build_l = 60.0 + buildings_variables.aux_build_w = 30.0 + buildings_variables.aux_build_h = 5.0 + buildings_variables.auxcool_l = 20.0 + buildings_variables.auxcool_w = 20.0 + buildings_variables.auxcool_h = 5.0 + buildings_variables.bioshld_thk = 2.50 + buildings_variables.chemlab_l = 50.0 + buildings_variables.chemlab_w = 30.0 + buildings_variables.chemlab_h = 6.0 + buildings_variables.dz_tf_cryostat = 2.5 + buildings_variables.clh2 = 15.0 + buildings_variables.control_buildings_l = 80.0 + buildings_variables.control_buildings_w = 60.0 + buildings_variables.control_buildings_h = 6.0 + buildings_variables.conv = 6.0e4 + buildings_variables.convol = 0.0 + buildings_variables.crane_arm_h = 10.0 + buildings_variables.crane_clrnc_h = 4.0 + buildings_variables.crane_clrnc_v = 3.0 + buildings_variables.cryomag_l = 120.0 + buildings_variables.cryomag_w = 90.0 + buildings_variables.cryomag_h = 5.0 + buildings_variables.cryostore_l = 160.0 + buildings_variables.cryostore_w = 30.0 + buildings_variables.cryostore_h = 20.0 + buildings_variables.cryostat_clrnc = 2.5 + buildings_variables.cryvol = 0.0 + buildings_variables.efloor = 0.0 + buildings_variables.elecdist_l = 380.0 + buildings_variables.elecdist_w = 350.0 + buildings_variables.elecdist_h = 5.0 + buildings_variables.elecload_l = 100.0 + buildings_variables.elecload_w = 90.0 + buildings_variables.elecload_h = 3.0 + buildings_variables.elecstore_l = 100.0 + buildings_variables.elecstore_w = 60.0 + buildings_variables.elecstore_h = 12.0 + buildings_variables.elevol = 0.0 + buildings_variables.esbldgm3 = 1.0e3 + buildings_variables.fc_building_l = 60.0 + buildings_variables.fc_building_w = 60.0 + buildings_variables.fndt = 2.0 + buildings_variables.gas_buildings_l = 25.0 + buildings_variables.gas_buildings_w = 15.0 + buildings_variables.gas_buildings_h = 5.0 + buildings_variables.ground_clrnc = 5.0 + buildings_variables.hcd_building_l = 70.0 + buildings_variables.hcd_building_w = 40.0 + buildings_variables.hcd_building_h = 25.0 + buildings_variables.hw_storage_l = 20.0 + buildings_variables.hw_storage_w = 10.0 + buildings_variables.hw_storage_h = 5.0 + buildings_variables.heat_sink_l = 160.0 + buildings_variables.heat_sink_w = 80.0 + buildings_variables.heat_sink_h = 12.0 + buildings_variables.hccl = 5.0 + buildings_variables.hcwt = 1.5 + buildings_variables.hot_sepdist = 2.0 + buildings_variables.hotcell_h = 12.0 + buildings_variables.i_bldgs_size = 0 + buildings_variables.i_bldgs_v = 0 + buildings_variables.ilw_smelter_l = 50.0 + buildings_variables.ilw_smelter_w = 30.0 + buildings_variables.ilw_smelter_h = 30.0 + buildings_variables.ilw_storage_l = 120.0 + buildings_variables.ilw_storage_w = 100.0 + buildings_variables.ilw_storage_h = 8.0 + buildings_variables.llw_storage_l = 45.0 + buildings_variables.llw_storage_w = 20.0 + buildings_variables.llw_storage_h = 5.0 + buildings_variables.magnet_pulse_l = 105.0 + buildings_variables.magnet_pulse_w = 40.0 + buildings_variables.magnet_pulse_h = 5.0 + buildings_variables.magnet_trains_l = 120.0 + buildings_variables.magnet_trains_w = 90.0 + buildings_variables.magnet_trains_h = 5.0 + buildings_variables.maint_cont_l = 125.0 + buildings_variables.maint_cont_w = 100.0 + buildings_variables.maint_cont_h = 6.0 + buildings_variables.mbvfac = 2.8 + buildings_variables.nbi_sys_l = 225.0 + buildings_variables.nbi_sys_w = 185.0 + buildings_variables.pfbldgm3 = 2.0e4 + buildings_variables.pibv = 2.0e4 + buildings_variables.qnty_sfty_fac = 2.0 + buildings_variables.rbvfac = 1.6 + buildings_variables.rbrt = 1.0 + buildings_variables.rbvol = 0.0 + buildings_variables.rbwt = 2.0 + buildings_variables.reactor_clrnc = 4.0 + buildings_variables.reactor_fndtn_thk = 2.0 + buildings_variables.reactor_hall_l = 0.0 + buildings_variables.reactor_hall_w = 0.0 + buildings_variables.reactor_hall_h = 0.0 + buildings_variables.reactor_roof_thk = 1.0 + buildings_variables.reactor_wall_thk = 2.0 + buildings_variables.rmbvol = 0.0 + buildings_variables.robotics_l = 50.0 + buildings_variables.robotics_w = 30.0 + buildings_variables.robotics_h = 30.0 + buildings_variables.row = 4.0 + buildings_variables.rxcl = 4.0 + buildings_variables.sec_buildings_l = 30.0 + buildings_variables.sec_buildings_w = 25.0 + buildings_variables.sec_buildings_h = 6.0 + buildings_variables.shmf = 0.5 + buildings_variables.shov = 1.0e5 + buildings_variables.shovol = 0.0 + buildings_variables.staff_buildings_h = 5.0 + buildings_variables.staff_buildings_area = 4.8e5 + buildings_variables.stcl = 3.0 + buildings_variables.tfcbv = 2.0e4 + buildings_variables.transp_clrnc = 1.0 + buildings_variables.trcl = 1.0 + buildings_variables.triv = 4.0e4 + buildings_variables.turbine_hall_l = 109.0 + buildings_variables.turbine_hall_w = 62.0 + buildings_variables.turbine_hall_h = 15.0 + buildings_variables.tw_storage_l = 90.0 + buildings_variables.tw_storage_w = 30.0 + buildings_variables.tw_storage_h = 5.0 + buildings_variables.volnucb = 0.0 + buildings_variables.volrci = 0.0 + buildings_variables.warm_shop_l = 100.0 + buildings_variables.warm_shop_w = 50.0 + buildings_variables.warm_shop_h = 10.0 + buildings_variables.water_buildings_l = 110.0 + buildings_variables.water_buildings_w = 10.0 + buildings_variables.water_buildings_h = 5.0 + buildings_variables.workshop_l = 150.0 + buildings_variables.workshop_w = 125.0 + buildings_variables.workshop_h = 10.0 + buildings_variables.wgt = 5.0e5 + buildings_variables.wgt2 = 1.0e5 + buildings_variables.wrbi = 0.0 + buildings_variables.wsvfac = 1.9 + buildings_variables.wsvol = 0.0 + buildings_variables.a_reactor_bldg = 8.32e3 + buildings_variables.a_ee_ps_bldg = 2.133e4 + buildings_variables.a_aux_services_bldg = 1.0e3 + buildings_variables.a_hot_cell_bldg = 8.43e3 + buildings_variables.a_reactor_service_bldg = 2.44e3 + buildings_variables.a_service_water_bldg = 1.567e3 + buildings_variables.a_fuel_handling_bldg = 1.67e3 + buildings_variables.a_control_room_bldg = 2.88e3 + buildings_variables.a_ac_ps_bldg = 6.423e3 + buildings_variables.a_admin_bldg = 2.5674e4 + buildings_variables.a_site_service_bldg = 8.3e3 + buildings_variables.a_cryo_inert_gas_bldg = 1.838e4 + buildings_variables.a_security_bldg = 4.552e3 diff --git a/process/costs.py b/process/costs.py index 732f1cefcf..27f1df25a6 100644 --- a/process/costs.py +++ b/process/costs.py @@ -2952,3 +2952,167 @@ def convert_fpy_to_calendar() -> None: ) else: cost_variables.cplife_cal = cost_variables.cplife + + +def init_cost_variables(): + cost_variables.abktflnc = 5.0 + cost_variables.adivflnc = 7.0 + cost_variables.blkcst = 0.0 + cost_variables.c221 = 0.0 + cost_variables.c222 = 0.0 + cost_variables.capcost = 0.0 + cost_variables.cconfix = 80.0 + cost_variables.cconshpf = 70.0 + cost_variables.cconshtf = 75.0 + cost_variables.cdcost = 0.0 + cost_variables.cdirt = 0.0 + cost_variables.cdrlife = 0.0 + cost_variables.cdrlife_cal = 0.0 + cost_variables.cfactr = 0.75 + cost_variables.cpfact = 0.0 + cost_variables.cfind = [0.244, 0.244, 0.244, 0.29] + cost_variables.cland = 19.2 + cost_variables.coe = 0.0 + cost_variables.coecap = 0.0 + cost_variables.coefuelt = 0.0 + cost_variables.coeoam = 0.0 + cost_variables.concost = 0.0 + cost_variables.costexp = 0.8 + cost_variables.costexp_pebbles = 0.6 + cost_variables.cost_factor_buildings = 1.0 + cost_variables.cost_factor_land = 1.0 + cost_variables.cost_factor_tf_coils = 1.0 + cost_variables.cost_factor_fwbs = 1.0 + cost_variables.cost_factor_rh = 1.0 + cost_variables.cost_factor_vv = 1.0 + cost_variables.cost_factor_bop = 1.0 + cost_variables.cost_factor_misc = 1.0 + cost_variables.maintenance_fwbs = 0.2 + cost_variables.maintenance_gen = 0.05 + cost_variables.amortization = 13.6 + cost_variables.cost_model = 1 + cost_variables.cowner = 0.15 + cost_variables.cplife = 0.0 + cost_variables.cplife_cal = 0.0 + cost_variables.cpstcst = 0.0 + cost_variables.cpstflnc = 10.0 + cost_variables.crctcore = 0.0 + cost_variables.csi = 16.0 + cost_variables.cturbb = 38.0 + cost_variables.decomf = 0.1 + cost_variables.dintrt = 0.0 + cost_variables.divcst = 0.0 + cost_variables.divlife = 0.0 + cost_variables.divlife_cal = 0.0 + cost_variables.dtlife = 0.0 + cost_variables.fcap0 = 1.165 + cost_variables.fcap0cp = 1.08 + cost_variables.fcdfuel = 0.1 + cost_variables.fcontng = 0.195 + cost_variables.fcr0 = 0.0966 + cost_variables.fkind = 1.0 + cost_variables.fwallcst = 0.0 + cost_variables.iavail = 2 + cost_variables.ibkt_life = 0 + cost_variables.life_dpa = 50 + cost_variables.bktcycles = 1.0e3 + cost_variables.avail_min = 0.75 + cost_variables.tok_build_cost_per_vol = 1283.0 + cost_variables.light_build_cost_per_vol = 270.0 + cost_variables.favail = 1.0 + cost_variables.num_rh_systems = 4 + cost_variables.conf_mag = 0.99 + cost_variables.div_prob_fail = 0.0002 + cost_variables.div_umain_time = 0.25 + cost_variables.div_nref = 7000.0 + cost_variables.div_nu = 14000.0 + cost_variables.fwbs_nref = 20000.0 + cost_variables.fwbs_nu = 40000.0 + cost_variables.fwbs_prob_fail = 0.0002 + cost_variables.fwbs_umain_time = 0.25 + cost_variables.redun_vacp = 25.0 + cost_variables.redun_vac = 0 + cost_variables.t_operation = 0.0 + cost_variables.tbktrepl = 0.5 + cost_variables.tcomrepl = 0.5 + cost_variables.tdivrepl = 0.25 + cost_variables.uubop = 0.02 + cost_variables.uucd = 0.02 + cost_variables.uudiv = 0.04 + cost_variables.uufuel = 0.02 + cost_variables.uufw = 0.04 + cost_variables.uumag = 0.02 + cost_variables.uuves = 0.04 + cost_variables.ifueltyp = 0 + cost_variables.ipnet = 0 + cost_variables.ireactor = 1 + cost_variables.lsa = 4 + cost_variables.moneyint = 0.0 + cost_variables.output_costs = 1 + cost_variables.discount_rate = 0.0435 + cost_variables.startupratio = 1.0 + cost_variables.startuppwr = 0.0 + cost_variables.tlife = 30.0 + cost_variables.ucblbe = 260.0 + cost_variables.ucblbreed = 875.0 + cost_variables.ucblli = 875.0 + cost_variables.ucblli2o = 600.0 + cost_variables.ucbllipb = 10.3 + cost_variables.ucblss = 90.0 + cost_variables.ucblvd = 200.0 + cost_variables.ucbus = 0.123 + cost_variables.uccase = 50.0 + cost_variables.uccpcl1 = 250.0 + cost_variables.uccpclb = 150.0 + cost_variables.uccry = 9.3e4 + cost_variables.uccryo = 32.0 + cost_variables.uccu = 75.0 + cost_variables.ucdiv = 2.8e5 + cost_variables.ucech = 3.0 + cost_variables.ucf1 = 2.23e7 + cost_variables.ucfnc = 35.0 + cost_variables.ucfuel = 3.45 + cost_variables.uche3 = 1.0e6 + cost_variables.uchrs = 87.9e6 + cost_variables.uchts = [15.3, 19.1] + cost_variables.uciac = 1.5e8 + cost_variables.ucich = 3.0 + cost_variables.uclh = 3.3 + cost_variables.ucme = 1.25e8 + cost_variables.ucmisc = 2.5e7 + cost_variables.ucnbi = 3.3 + cost_variables.ucoam = [68.8, 68.8, 68.8, 74.4] + cost_variables.ucpens = 32.0 + cost_variables.ucpfb = 210.0 + cost_variables.ucpfbk = 1.66e4 + cost_variables.ucpfbs = 4.9e3 + cost_variables.ucpfcb = 7.5e4 + cost_variables.ucpfdr1 = 150.0 + cost_variables.ucpfic = 1.0e4 + cost_variables.ucpfps = 3.5e4 + cost_variables.ucrb = 400.0 + cost_variables.ucsc = [ + 600.0, + 600.0, + 300.0, + 600.0, + 600.0, + 600.0, + 300.0, + 1200.0, + 1200.0, + ] + cost_variables.sc_mat_cost_0 = [4.8, 2.0, 1.0, 4.8, 4.8, 47.4, 1.0, 47.4, 47.4] + cost_variables.supercond_cost_model = 0 + cost_variables.ucshld = 32.0 + cost_variables.uctfbr = 1.22 + cost_variables.uctfbus = 100.0 + cost_variables.uctfps = 24.0 + cost_variables.uctfsw = 1.0 + cost_variables.ucturb = [230.0e6, 245.0e6] + cost_variables.ucwindpf = 465.0 + cost_variables.ucwindtf = 480.0 + cost_variables.ucwst = [0.0, 3.94, 5.91, 7.88] + cost_variables.u_unplanned_cp = 0.0 + cost_variables.i_cp_lifetime = 0 + cost_variables.cplife_input = 2.0 diff --git a/process/cs_fatigue.py b/process/cs_fatigue.py index 4ee00939c7..377f6e881f 100644 --- a/process/cs_fatigue.py +++ b/process/cs_fatigue.py @@ -1,8 +1,7 @@ import numpy as np from numba import njit -from process.fortran import constants -from process.fortran import cs_fatigue_variables as csfv +from process.fortran import constants, cs_fatigue_variables class CsFatigue: @@ -22,7 +21,9 @@ def ncycle( # X. Sarasola et al, IEEE Transactions on Applied Superconductivity, # vol. 30, no. 4, pp. 1-5, June 2020, Art no. 4200705 - n = -csfv.paris_power_law * (csfv.walker_coefficient - 1.0e0) + n = -cs_fatigue_variables.paris_power_law * ( + cs_fatigue_variables.walker_coefficient - 1.0e0 + ) # Set units to MPa max_hoop_stress_MPa = max_hoop_stress / 1.0e6 @@ -43,7 +44,7 @@ def ncycle( # Calculated constant for a given stress ratio using Walker equation # https://en.wikipedia.org/wiki/Crack_growth_equation#Walker_equation - cr = csfv.paris_coefficient / (1.0e0 - r) ** n + cr = cs_fatigue_variables.paris_coefficient / (1.0e0 - r) ** n # select given increase in crack area delta = 1.0e-4 @@ -56,9 +57,13 @@ def ncycle( # Default CS steel undergoes fast fracture when SIF > 200 MPa, under a saftey factor 1.5 we use 133MPa pi_2_arr = np.array([np.pi / 2.0e0, 0]) while ( - (a <= t_structural_vertical / csfv.sf_vertical_crack) - and (c <= t_structural_radial / csfv.sf_radial_crack) - and (k_max <= csfv.fracture_toughness / csfv.sf_fast_fracture) + (a <= t_structural_vertical / cs_fatigue_variables.sf_vertical_crack) + and (c <= t_structural_radial / cs_fatigue_variables.sf_radial_crack) + and ( + k_max + <= cs_fatigue_variables.fracture_toughness + / cs_fatigue_variables.sf_fast_fracture + ) ): # find SIF max from SIF_a and SIF_c k_a, k_c = self.surface_stress_intensity_factor( @@ -72,11 +77,11 @@ def ncycle( k_max = max(k_a, k_c) # run euler_method and find number of cycles needed to give crack increase - delta_n = delta / (cr * (k_max**csfv.paris_power_law)) + delta_n = delta / (cr * (k_max**cs_fatigue_variables.paris_power_law)) # update a and c, N (+= doesnt work for fortran (?) reasons) - a = a + delta * (k_a / k_max) ** csfv.paris_power_law - c = c + delta * (k_c / k_max) ** csfv.paris_power_law + a = a + delta * (k_a / k_max) ** cs_fatigue_variables.paris_power_law + c = c + delta * (k_c / k_max) ** cs_fatigue_variables.paris_power_law n_pulse = n_pulse + delta_n # two pulses - ramp to Vsmax and ramp down per cycle @@ -225,3 +230,21 @@ def surface_stress_intensity_factor(hoop_stress, t, w, a, c, phi): ) * np.sqrt(np.pi * a / q) ) + + +def init_cs_fatigue_variables(): + cs_fatigue_variables.residual_sig_hoop = 2.4e8 + cs_fatigue_variables.t_crack_radial = 6.0e-3 + cs_fatigue_variables.t_crack_vertical = 0.89e-3 + cs_fatigue_variables.n_cycle = 0.0 + cs_fatigue_variables.n_cycle_min = 2.0e4 + cs_fatigue_variables.t_structural_vertical = 0.022 + cs_fatigue_variables.t_structural_radial = 0.07 + cs_fatigue_variables.bkt_life_csf = 0 + cs_fatigue_variables.sf_vertical_crack = 2.0 + cs_fatigue_variables.sf_radial_crack = 2.0 + cs_fatigue_variables.sf_fast_fracture = 1.5 + cs_fatigue_variables.paris_coefficient = 65.0e-14 + cs_fatigue_variables.paris_power_law = 3.5 + cs_fatigue_variables.walker_coefficient = 0.436 + cs_fatigue_variables.fracture_toughness = 2.0e2 diff --git a/process/current_drive.py b/process/current_drive.py index ac97f186b2..9ce159e0db 100644 --- a/process/current_drive.py +++ b/process/current_drive.py @@ -2149,3 +2149,72 @@ def sigbeam(self, eb, te, ne, rnhe, rnc, rno, rnfe): ) return max(1e-20 * (np.exp(s1) / eb * (1.0 + sz)), 1e-23) + + +def init_current_drive_variables(): + """Initialise current drive variables""" + current_drive_variables.beamwd = 0.58 + current_drive_variables.bigq = 0.0 + current_drive_variables.bootstrap_current_fraction = 0.0 + current_drive_variables.bootstrap_current_fraction_max = 0.9 + current_drive_variables.bscf_iter89 = 0.0 + current_drive_variables.bscf_nevins = 0.0 + current_drive_variables.bscf_sauter = 0.0 + current_drive_variables.bscf_wilson = 0.0 + current_drive_variables.bscf_sakai = 0.0 + current_drive_variables.bscf_aries = 0.0 + current_drive_variables.bscf_andrade = 0.0 + current_drive_variables.bscf_hoang = 0.0 + current_drive_variables.bscf_wong = 0.0 + current_drive_variables.bscf_gi_i = 0.0 + current_drive_variables.bscf_gi_ii = 0.0 + current_drive_variables.cboot = 1.0 + current_drive_variables.beam_current = 0.0 + current_drive_variables.diacf_hender = 0.0 + current_drive_variables.diacf_scene = 0.0 + current_drive_variables.diamagnetic_current_fraction = 0.0 + current_drive_variables.echpwr = 0.0 + current_drive_variables.echwpow = 0.0 + current_drive_variables.effcd = 0.0 + current_drive_variables.harnum = 2.0 + current_drive_variables.wave_mode = 0 + current_drive_variables.beam_energy = 1.0e3 + current_drive_variables.etacd = 0.0 + current_drive_variables.etacdfix = 0.0 + current_drive_variables.etaech = 0.3 + current_drive_variables.etalh = 0.3 + current_drive_variables.etanbi = 0.3 + current_drive_variables.fpion = 0.5 + current_drive_variables.pnbitot = 0.0 + current_drive_variables.pscf_scene = 0.0 + current_drive_variables.nbshinemw = 0.0 + current_drive_variables.feffcd = 1.0 + current_drive_variables.forbitloss = 0.0 + current_drive_variables.frbeam = 1.05 + current_drive_variables.f_tritium_beam = 1e-6 + current_drive_variables.gamcd = 0.0 + current_drive_variables.gamma_ecrh = 0.35 + current_drive_variables.xi_ebw = 0.8 + current_drive_variables.iefrf = 5 + current_drive_variables.iefrffix = 0 + current_drive_variables.irfcd = 1 + current_drive_variables.nbshinef = 0.0 + current_drive_variables.nbshield = 0.5 + current_drive_variables.pheat = 0.0 + current_drive_variables.pheatfix = 0.0 + current_drive_variables.pinjalw = 150.0 + current_drive_variables.pinjemw = 0.0 + current_drive_variables.pinjimw = 0.0 + current_drive_variables.pinjmw = 0.0 + current_drive_variables.pinjfixmw = 0.0 + current_drive_variables.plasma_current_internal_fraction = 0.0 + current_drive_variables.plhybd = 0.0 + current_drive_variables.pnbeam = 0.0 + current_drive_variables.porbitlossmw = 0.0 + current_drive_variables.ps_current_fraction = 0.0 + current_drive_variables.pwplh = 0.0 + current_drive_variables.pwpnb = 0.0 + current_drive_variables.rtanbeam = 0.0 + current_drive_variables.rtanmax = 0.0 + current_drive_variables.taubeam = 0.0 + current_drive_variables.tbeamin = 3.0 diff --git a/process/dcll.py b/process/dcll.py index 5e78b87e5f..e02fc67ebe 100644 --- a/process/dcll.py +++ b/process/dcll.py @@ -936,3 +936,39 @@ def write_output(self): fwbs_variables.vol_vv, "OP ", ) + + +def init_dcll_module(): + dcll_module.r_fci = 0.0 + dcll_module.r_backwall = 0.0 + dcll_module.bz_r_ib = 0.0 + dcll_module.bz_r_ob = 0.0 + dcll_module.f_vol_stff_plates = 0.0 + dcll_module.f_vol_stl_bz_struct = 0.0 + dcll_module.f_vol_stl_back_wall = 0.0 + dcll_module.f_vol_stl_fw = 0.0 + dcll_module.f_vol_mfbss_stl = 0.0 + dcll_module.f_vol_mfbss_he = 0.0 + dcll_module.f_vol_mfbss_pbli = 0.0 + dcll_module.vol_fci = 0.0 + dcll_module.vol_bz_struct = 0.0 + dcll_module.vol_bz_liq = 0.0 + dcll_module.vol_bz_liq_ib = 0.0 + dcll_module.vol_bz_liq_ob = 0.0 + dcll_module.vol_bw = 0.0 + dcll_module.vol_bss = 0.0 + dcll_module.wht_cer = 0.0 + dcll_module.wht_stl_struct = 0.0 + dcll_module.wht_cool_struct = 0.0 + dcll_module.wht_bw_stl = 0.0 + dcll_module.wht_bw_cool = 0.0 + dcll_module.wht_mfbss_stl = 0.0 + dcll_module.wht_mfbss_cool = 0.0 + dcll_module.wht_mfbss_pbli = 0.0 + dcll_module.fwmass_stl = 0.0 + dcll_module.fwmass_cool = 0.0 + dcll_module.mass_cool_blanket = 0.0 + dcll_module.mass_liq_blanket = 0.0 + dcll_module.mass_stl_blanket = 0.0 + dcll_module.mass_segm_ib = 0.0 + dcll_module.mass_segm_ob = 0.0 diff --git a/process/divertor.py b/process/divertor.py index be68baf728..22da0ef0ba 100644 --- a/process/divertor.py +++ b/process/divertor.py @@ -312,3 +312,27 @@ def divwade( ) po.ovarre(self.outfile, "Divertor heat load (MW/m2)", "(hldiv)", dv.hldiv) return dv.hldiv + + +def init_divertor_variables(): + dv.anginc = 0.262 + dv.beta_div = 1.0 + dv.betai = 1.0 + dv.betao = 1.0 + dv.divclfr = 0.3 + dv.divdens = 1.0e4 + dv.dz_divertor = 0.2 + dv.divmas = 0.0 + dv.divplt = 0.035 + dv.divsur = 0.0 + dv.fdiva = 1.11 + dv.flux_exp = 2.0 + dv.hldiv = 0.0 + dv.i_hldiv = 2 + dv.hldivlim = 5.0 + dv.prn1 = 0.285 + dv.rconl = 0.0 + dv.rsrd = 0.0 + dv.tconl = 0.0 + dv.tdiv = 2.0 + dv.xpertin = 2.0 diff --git a/process/fw.py b/process/fw.py index 4228f81dd0..81112008db 100644 --- a/process/fw.py +++ b/process/fw.py @@ -561,3 +561,197 @@ def output_fw_pumping(self): fwbs_variables.temp_fw_peak, "OP ", ) + + +def init_fwbs_variables(): + """Initialise FWBS variables""" + fwbs_variables.life_blkt_fpy = 0.0 + fwbs_variables.life_blkt = 0.0 + fwbs_variables.m_fw_blkt_div_coolant_total = 0.0 + fwbs_variables.m_vv = 0.0 + fwbs_variables.denstl = 7800.0 + fwbs_variables.denwc = 15630.0 + fwbs_variables.dewmkg = 0.0 + fwbs_variables.emult = 1.269 + fwbs_variables.emultmw = 0.0 + fwbs_variables.fblss = 0.09705 + fwbs_variables.f_ster_div_single = 0.115 + fwbs_variables.f_a_fw_hcd = 0.0 + fwbs_variables.fhole = 0.0 + fwbs_variables.i_fw_blkt_vv_shape = 2 + fwbs_variables.life_fw_fpy = 0.0 + fwbs_variables.m_fw_total = 0.0 + fwbs_variables.fw_armour_mass = 0.0 + fwbs_variables.fw_armour_thickness = 0.005 + fwbs_variables.fw_armour_vol = 0.0 + fwbs_variables.i_blanket_type = 1 + fwbs_variables.i_blkt_inboard = 1 + fwbs_variables.inuclear = 0 + fwbs_variables.qnuc = 0.0 + fwbs_variables.f_blkt_li6_enrichment = 30.0 + fwbs_variables.p_blkt_nuclear_heat_total_mw = 0.0 + fwbs_variables.p_div_nuclear_heat_total_mw = 0.0 + fwbs_variables.p_fw_nuclear_heat_total_mw = 0.0 + fwbs_variables.p_fw_hcd_nuclear_heat_mw = 0.0 + fwbs_variables.pnucloss = 0.0 + fwbs_variables.pnucvvplus = 0.0 + fwbs_variables.pnucshld = 0.0 + fwbs_variables.m_blkt_total = 0.0 + fwbs_variables.m_blkt_steel_total = 0.0 + fwbs_variables.armour_fw_bl_mass = 0.0 + fwbs_variables.breeder_f = 0.5 + fwbs_variables.breeder_multiplier = 0.75 + fwbs_variables.vfcblkt = 0.05295 + fwbs_variables.vfpblkt = 0.1 + fwbs_variables.m_blkt_li4sio4 = 0.0 + fwbs_variables.m_blkt_tibe12 = 0.0 + fwbs_variables.f_neut_shield = -1.0 + fwbs_variables.f_a_fw_coolant_inboard = 0.0 + fwbs_variables.f_a_fw_coolant_outboard = 0.0 + fwbs_variables.psurffwi = 0.0 + fwbs_variables.psurffwo = 0.0 + fwbs_variables.vol_fw_total = 0.0 + fwbs_variables.f_vol_blkt_steel = 0.0 + fwbs_variables.f_vol_blkt_li4sio4 = 0.0 + fwbs_variables.f_vol_blkt_tibe12 = 0.0 + fwbs_variables.breedmat = 1 + fwbs_variables.densbreed = 0.0 + fwbs_variables.fblbe = 0.6 + fwbs_variables.fblbreed = 0.154 + fwbs_variables.fblhebmi = 0.4 + fwbs_variables.fblhebmo = 0.4 + fwbs_variables.fblhebpi = 0.6595 + fwbs_variables.fblhebpo = 0.6713 + fwbs_variables.hcdportsize = 1 + fwbs_variables.nflutf = 0.0 + fwbs_variables.npdiv = 2 + fwbs_variables.nphcdin = 2 + fwbs_variables.nphcdout = 2 + fwbs_variables.tbr = 0.0 + fwbs_variables.tritprate = 0.0 + fwbs_variables.wallpf = 1.21 + fwbs_variables.whtblbreed = 0.0 + fwbs_variables.m_blkt_beryllium = 0.0 + fwbs_variables.i_coolant_pumping = 2 + fwbs_variables.i_shield_mat = 0 + fwbs_variables.i_thermal_electric_conversion = 0 + fwbs_variables.secondary_cycle_liq = 4 + fwbs_variables.i_blkt_coolant_type = 1 + fwbs_variables.i_fw_coolant_type = "helium" + fwbs_variables.dr_fw_wall = 0.003 + fwbs_variables.radius_fw_channel = 0.006 + fwbs_variables.dx_fw_module = 0.02 + fwbs_variables.temp_fw_coolant_in = 573.0 + fwbs_variables.temp_fw_coolant_out = 823.0 + fwbs_variables.pres_fw_coolant = 15.5e6 + fwbs_variables.temp_fw_peak = 873.0 + fwbs_variables.roughness = 1.0e-6 + fwbs_variables.len_fw_channel = 4.0 + fwbs_variables.f_fw_peak = 1.0 + fwbs_variables.pres_blkt_coolant = 15.50e6 + fwbs_variables.temp_blkt_coolant_in = 573.0 + fwbs_variables.temp_blkt_coolant_out = 823.0 + fwbs_variables.coolp = 15.5e6 + fwbs_variables.n_blkt_outboard_modules_poloidal = 8 + fwbs_variables.n_blkt_inboard_modules_poloidal = 7 + fwbs_variables.n_blkt_outboard_modules_toroidal = 48 + fwbs_variables.n_blkt_inboard_modules_toroidal = 32 + fwbs_variables.temp_fw_max = 823.0 + fwbs_variables.fw_th_conductivity = 28.34 + fwbs_variables.fvoldw = 1.74 + fwbs_variables.fvolsi = 1.0 + fwbs_variables.fvolso = 0.64 + fwbs_variables.fwclfr = 0.15 + fwbs_variables.p_div_rad_total_mw = 0.0 + fwbs_variables.p_fw_rad_total_mw = 0.0 + fwbs_variables.p_fw_hcd_rad_total_mw = 0.0 + fwbs_variables.pradloss = 0.0 + fwbs_variables.ptfnuc = 0.0 + fwbs_variables.ptfnucpm3 = 0.0 + fwbs_variables.r_cryostat_inboard = 0.0 + fwbs_variables.z_cryostat_half_inside = 0.0 + fwbs_variables.dr_pf_cryostat = 0.5 + fwbs_variables.vol_cryostat = 0.0 + fwbs_variables.vol_cryostat_internal = 0.0 + fwbs_variables.vol_vv = 0.0 + fwbs_variables.vfshld = 0.25 + fwbs_variables.vol_blkt_total = 0.0 + fwbs_variables.vol_blkt_inboard = 0.0 + fwbs_variables.vol_blkt_outboard = 0.0 + fwbs_variables.volshld = 0.0 + fwbs_variables.whtshld = 0.0 + fwbs_variables.wpenshld = 0.0 + fwbs_variables.wtshldi = 0.0 + fwbs_variables.wtshldo = 0.0 + fwbs_variables.irefprop = 1 + fwbs_variables.fblli = 0.0 + fwbs_variables.fblli2o = 0.08 + fwbs_variables.fbllipb = 0.68 + fwbs_variables.fblvd = 0.0 + fwbs_variables.m_blkt_li2o = 0.0 + fwbs_variables.wtbllipb = 0.0 + fwbs_variables.m_blkt_vanadium = 0.0 + fwbs_variables.m_blkt_lithium = 0.0 + fwbs_variables.vfblkt = 0.25 + fwbs_variables.blktmodel = 0 + fwbs_variables.declblkt = 0.075 + fwbs_variables.declfw = 0.075 + fwbs_variables.declshld = 0.075 + fwbs_variables.blkttype = 3 + fwbs_variables.etaiso = 0.85 + fwbs_variables.etahtp = 0.95 + fwbs_variables.pnuc_cp = 0.0 + fwbs_variables.pnuc_cp_sh = 0.0 + fwbs_variables.pnuc_cp_tf = 0.0 + fwbs_variables.neut_flux_cp = 0.0 + fwbs_variables.i_fw_blkt_shared_coolant = 0 + fwbs_variables.i_blkt_liquid_breeder_type = 0 + fwbs_variables.i_blkt_dual_coolant = 0 + fwbs_variables.i_blkt_liquid_breeder_channel_type = 0 + fwbs_variables.ims = 0 + fwbs_variables.n_liq_recirc = 10 + fwbs_variables.r_f_liq_ib = 0.5 + fwbs_variables.r_f_liq_ob = 0.5 + fwbs_variables.w_f_liq_ib = 0.5 + fwbs_variables.w_f_liq_ob = 0.5 + fwbs_variables.den_ceramic = 3.21e3 + fwbs_variables.th_wall_secondary = 1.25e-2 + fwbs_variables.bz_channel_conduct_liq = 8.33e5 + fwbs_variables.a_bz_liq = 0.2 + fwbs_variables.b_bz_liq = 0.2 + fwbs_variables.nopol = 2 + fwbs_variables.nopipes = 4 + fwbs_variables.den_liq = 9.5e3 + fwbs_variables.specific_heat_liq = 1.9e2 + fwbs_variables.thermal_conductivity_liq = 30.0 + fwbs_variables.wht_liq = 0.0 + fwbs_variables.wht_liq_ib = 0.0 + fwbs_variables.wht_liq_ob = 0.0 + fwbs_variables.dynamic_viscosity_liq = 0.0 + fwbs_variables.electrical_conductivity_liq = 0.0 + fwbs_variables.hartmann_liq = (0.0, 0.0) + fwbs_variables.b_mag_blkt = (5.0, 5.0) + fwbs_variables.etaiso_liq = 0.85 + fwbs_variables.blpressure_liq = 1.7e6 + fwbs_variables.inlet_temp_liq = 570.0 + fwbs_variables.outlet_temp_liq = 720.0 + fwbs_variables.den_fw_coolant = 0.0 + fwbs_variables.visc_fw_coolant = 0.0 + fwbs_variables.den_blkt_coolant = 0.0 + fwbs_variables.visc_blkt_coolant = 0.0 + fwbs_variables.cp_fw = 0.0 + fwbs_variables.cv_fw = 0.0 + fwbs_variables.cp_bl = 0.0 + fwbs_variables.cv_bl = 0.0 + fwbs_variables.f_nuc_pow_bz_struct = 0.34 + fwbs_variables.f_nuc_pow_bz_liq = 0.66 + fwbs_variables.pnuc_fw_ratio_dcll = 0.14 + fwbs_variables.pnuc_blkt_ratio_dcll = 0.86 + fwbs_variables.bzfllengi_n_rad = 4 + fwbs_variables.bzfllengi_n_pol = 2 + fwbs_variables.bzfllengo_n_rad = 4 + fwbs_variables.bzfllengo_n_pol = 2 + fwbs_variables.bzfllengi_n_rad_liq = 2 + fwbs_variables.bzfllengi_n_pol_liq = 2 + fwbs_variables.bzfllengo_n_rad_liq = 2 + fwbs_variables.bzfllengo_n_pol_liq = 2 diff --git a/process/hcpb.py b/process/hcpb.py index 271b12245c..6c24187791 100644 --- a/process/hcpb.py +++ b/process/hcpb.py @@ -39,9 +39,6 @@ def __init__(self, blanket_library) -> None: self.blanket_library = blanket_library def run(self, output: bool): - ccfe_hcpb_module.ip = int(output) - ccfe_hcpb_module.ofile = self.outfile - # MDK (27/11/2015) build_variables.dr_fw_inboard = ( 2 * fwbs_variables.radius_fw_channel + 2 * fwbs_variables.dr_fw_wall @@ -1474,3 +1471,19 @@ def write_output(self): "(divmas)", divertor_variables.divmas, ) + + +def init_ccfe_hcpb_module(): + ccfe_hcpb_module.armour_density = 0.0 + ccfe_hcpb_module.fw_density = 0.0 + ccfe_hcpb_module.blanket_density = 0.0 + ccfe_hcpb_module.shield_density = 0.0 + ccfe_hcpb_module.vv_density = 0.0 + ccfe_hcpb_module.x_blanket = 0.0 + ccfe_hcpb_module.x_shield = 0.0 + ccfe_hcpb_module.tfc_nuc_heating = 0.0 + ccfe_hcpb_module.fw_armour_u_nuc_heating = 0.0 + ccfe_hcpb_module.shld_u_nuc_heating = 0.0 + ccfe_hcpb_module.exp_blanket = 0.0 + ccfe_hcpb_module.exp_shield1 = 0.0 + ccfe_hcpb_module.exp_shield2 = 0.0 diff --git a/process/ife.py b/process/ife.py index 6775beb4f5..bc3ec4763d 100644 --- a/process/ife.py +++ b/process/ife.py @@ -2518,3 +2518,329 @@ def _material_string(material_index: int): ) return _material_string + + +def init_ife_variables(): + """Initialise IFE variables""" + ife_variables.bldr = 1.0 + ife_variables.bldrc = 1.0 + ife_variables.bldzl = 4.0 + ife_variables.bldzu = 4.0 + ife_variables.blmatf = np.reshape( + [ + 0.05, + 0.05, + 0.05, + 0.0, + 0.0, + 0.0, + 0.45, + 0.45, + 0.45, + 0.0, + 0.0, + 0.0, + 0.20, + 0.20, + 0.20, + 0.0, + 0.0, + 0.0, + 0.30, + 0.30, + 0.30, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + ife_variables.blmatf.shape, + ) + ife_variables.blmatm[:] = 0.0 + ife_variables.blmatv[:] = 0.0 + ife_variables.blvol[:] = 0.0 + ife_variables.cdriv0 = 154.3 + ife_variables.cdriv1 = 163.2 + ife_variables.cdriv2 = 244.9 + ife_variables.cdriv3 = 1.463 + ife_variables.chdzl = 9.0 + ife_variables.chdzu = 9.0 + ife_variables.chmatf = [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] + ife_variables.chmatm[:] = 0.0 + ife_variables.chmatv[:] = 0.0 + ife_variables.chrad = 6.5 + ife_variables.chvol = 0.0 + ife_variables.dcdrv0 = 111.4 + ife_variables.dcdrv1 = 78.0 + ife_variables.dcdrv2 = 59.9 + ife_variables.drveff = 0.28 + ife_variables.edrive = 5.0e6 + ife_variables.etadrv = 0.0 + ife_variables.etali = 0.4 + ife_variables.etave = [ + 0.082, + 0.079, + 0.076, + 0.073, + 0.069, + 0.066, + 0.062, + 0.059, + 0.055, + 0.051, + ] + ife_variables.fauxbop = 0.06 + ife_variables.fbreed = 0.51 + ife_variables.fburn = 0.3333 + ife_variables.flirad = 0.78 + ife_variables.frrmax = 1.0 + ife_variables.fwdr = 0.01 + ife_variables.fwdzl = 0.01 + ife_variables.fwdzu = 0.01 + ife_variables.fwmatf = np.reshape( + [ + 0.05, + 0.05, + 0.05, + 0.0, + 0.0, + 0.0, + 0.95, + 0.95, + 0.95, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + ife_variables.fwmatf.shape, + ) + ife_variables.fwmatm[:] = 0.0 + ife_variables.fwmatv[:] = 0.0 + ife_variables.fwvol[:] = 0.0 + ife_variables.gain = 0.0 + ife_variables.gainve = [ + 60.0, + 95.0, + 115.0, + 125.0, + 133.0, + 141.0, + 152.0, + 160.0, + 165.0, + 170.0, + ] + ife_variables.htpmw_ife = 0.0 + ife_variables.ife = 0 + ife_variables.ifedrv = 2 + ife_variables.ifetyp = 0 + ife_variables.lipmw = 0.0 + ife_variables.mcdriv = 1.0 + ife_variables.mflibe = 0.0 + ife_variables.pdrive = 23.0e6 + ife_variables.pfusife = 1000.0 + ife_variables.pifecr = 10.0 + ife_variables.ptargf = 2.0 + ife_variables.r1 = 0.0 + ife_variables.r2 = 0.0 + ife_variables.r3 = 0.0 + ife_variables.r4 = 0.0 + ife_variables.r5 = 0.0 + ife_variables.r6 = 0.0 + ife_variables.r7 = 0.0 + ife_variables.reprat = 0.0 + ife_variables.rrin = 6.0 + ife_variables.rrmax = 20.0 + ife_variables.shdr = 1.7 + ife_variables.shdzl = 5.0 + ife_variables.shdzu = 5.0 + ife_variables.shmatf = np.reshape( + [ + 0.05, + 0.05, + 0.05, + 0.19, + 0.19, + 0.19, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.665, + 0.665, + 0.665, + 0.095, + 0.095, + 0.095, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + ife_variables.shmatf.shape, + ) + ife_variables.shmatm[:] = 0.0 + ife_variables.shmatv[:] = 0.0 + ife_variables.shvol[:] = 0.0 + ife_variables.sombdr = 2.7 + ife_variables.somtdr = 2.7 + ife_variables.taufall = 0.0 + ife_variables.tdspmw = 0.01 + ife_variables.tfacmw = 0.0 + ife_variables.tgain = 85.0 + ife_variables.uccarb = 50.0 + ife_variables.ucconc = 0.1 + ife_variables.ucflib = 84.0 + ife_variables.uctarg = 0.3 + ife_variables.v1dr = 0.0 + ife_variables.v1dzl = 0.0 + ife_variables.v1dzu = 0.0 + ife_variables.v1matf = np.reshape( + [ + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + ife_variables.v1matf.shape, + ) + ife_variables.v1matm[:] = 0.0 + ife_variables.v1matv[:] = 0.0 + ife_variables.v1vol[:] = 0.0 + ife_variables.v2dr = 2.0 + ife_variables.v2dzl = 7.0 + ife_variables.v2dzu = 7.0 + ife_variables.v2matf = np.reshape( + [ + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + ife_variables.v2matf.shape, + ) + ife_variables.v2matm[:] = 0.0 + ife_variables.v2matv[:] = 0.0 + ife_variables.v2vol[:] = 0.0 + ife_variables.v3dr = 43.3 + ife_variables.v3dzl = 30.0 + ife_variables.v3dzu = 20.0 + ife_variables.v3matf = np.reshape( + [ + 1.0, + 1.0, + 1.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ], + ife_variables.v3matf.shape, + ) + ife_variables.v3matm[:] = 0.0 + ife_variables.v3matv[:] = 0.0 + ife_variables.v3vol[:] = 0.0 + ife_variables.zl1 = 0.0 + ife_variables.zl2 = 0.0 + ife_variables.zl3 = 0.0 + ife_variables.zl4 = 0.0 + ife_variables.zl5 = 0.0 + ife_variables.zl6 = 0.0 + ife_variables.zl7 = 0.0 + ife_variables.zu1 = 0.0 + ife_variables.zu2 = 0.0 + ife_variables.zu3 = 0.0 + ife_variables.zu4 = 0.0 + ife_variables.zu5 = 0.0 + ife_variables.zu6 = 0.0 + ife_variables.zu7 = 0.0 diff --git a/process/impurity_radiation.py b/process/impurity_radiation.py index 9cc75ad31d..b6dd34859f 100644 --- a/process/impurity_radiation.py +++ b/process/impurity_radiation.py @@ -441,10 +441,6 @@ def pimpden(imp_element_index, neprofile, teprofile): pimpden[less_than_imp_temp_mask] = impurity_radiation_module.impurity_arr_lz_wm3[ imp_element_index, 0 ] - # if not impurity_radiation_module.toolow: # Only print warning once during a run - # impurity_radiation_module.toolow = True - # error_handling.fdiags[0] = teprofile - # error_handling.report_error(35) greater_than_imp_temp_mask = ( teprofile @@ -567,3 +563,47 @@ def calculate_imprad(self): self.map_imprad_profile() self.calculate_radiation_loss_profiles() self.integrate_radiation_loss_profiles() + + +def init_impurity_radiation_module(): + impurity_radiation_module.radius_plasma_core_norm = 0.6 + impurity_radiation_module.coreradiationfraction = 1.0 + impurity_radiation_module.fimp = [ + 1.0, + 0.1, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + ] + impurity_radiation_module.imp_label = [ + "H_", + "He", + "Be", + "C_", + "N_", + "O_", + "Ne", + "Si", + "Ar", + "Fe", + "Ni", + "Kr", + "Xe", + "W_", + ] + impurity_radiation_module.impurity_arr_label[:] = " " + impurity_radiation_module.impurity_arr_z[:] = 0 + impurity_radiation_module.impurity_arr_amass[:] = 0.0 + impurity_radiation_module.impurity_arr_len_tab[:] = 0.0 + impurity_radiation_module.impurity_arr_temp_kev[:] = 0.0 + impurity_radiation_module.impurity_arr_lz_wm3[:] = 0.0 + impurity_radiation_module.impurity_arr_zav[:] = 0.0 diff --git a/process/init.py b/process/init.py index c444238b44..d6cd8ce946 100644 --- a/process/init.py +++ b/process/init.py @@ -8,9 +8,37 @@ import process import process.fortran as fortran import process.process_output as process_output +from process.blanket_library import init_blanket_library, init_primary_pumping_variables +from process.build import init_build_variables +from process.buildings import init_buildings_variables +from process.costs import init_cost_variables +from process.cs_fatigue import init_cs_fatigue_variables +from process.current_drive import init_current_drive_variables +from process.dcll import init_dcll_module +from process.divertor import init_divertor_variables from process.exceptions import ProcessValidationError +from process.fw import init_fwbs_variables +from process.hcpb import init_ccfe_hcpb_module +from process.ife import init_ife_variables +from process.impurity_radiation import init_impurity_radiation_module from process.input import parse_input_file +from process.pfcoil import init_pfcoil_module, init_pfcoil_variables +from process.physics import ( + init_physics_module, + init_physics_variables, + init_reinke_variables, + init_times_variables, +) +from process.power import init_heat_transport_variables, init_pf_power_variables +from process.pulse import init_pulse_variables +from process.scan import init_scan_module +from process.stellarator import init_stellarator_module, init_stellarator_variables +from process.structure import init_structure_variables +from process.superconducting_tf_coil import init_rebco_variables, init_sctfcoil_module +from process.tf_coil import init_tfcoil_variables from process.utilities.f2py_string_patch import f2py_compatible_to_string +from process.vacuum import init_vacuum_variables +from process.water_use import init_watuse_variables def init_process(): @@ -208,42 +236,42 @@ def init_all_module_vars(): than a 'run-once' executable. """ fortran.numerics.init_numerics() - fortran.buildings_variables.init_buildings_variables() - fortran.cost_variables.init_cost_variables() - fortran.divertor_variables.init_divertor_variables() + init_buildings_variables() + init_cost_variables() + init_divertor_variables() fortran.error_handling.init_error_handling() - fortran.fwbs_variables.init_fwbs_variables() + init_fwbs_variables() fortran.global_variables.init_global_variables() - fortran.ccfe_hcpb_module.init_ccfe_hcpb_module() - fortran.heat_transport_variables.init_heat_transport_variables() - fortran.ife_variables.init_ife_variables() - fortran.impurity_radiation_module.init_impurity_radiation_module() - fortran.pfcoil_module.init_pfcoil_module() - fortran.physics_module.init_physics_module() - fortran.physics_variables.init_physics_variables() - fortran.scan_module.init_scan_module() - fortran.sctfcoil_module.init_sctfcoil_module() - fortran.stellarator_module.init_stellarator_module() - fortran.stellarator_variables.init_stellarator_variables() - fortran.tfcoil_variables.init_tfcoil_variables() - fortran.times_variables.init_times_variables() + init_ccfe_hcpb_module() + init_heat_transport_variables() + init_ife_variables() + init_impurity_radiation_module() + init_pfcoil_module() + init_physics_module() + init_physics_variables() + init_scan_module() + init_sctfcoil_module() + init_stellarator_module() + init_stellarator_variables() + init_tfcoil_variables() + init_times_variables() fortran.constants.init_constants() - fortran.current_drive_variables.init_current_drive_variables() - fortran.primary_pumping_variables.init_primary_pumping_variables() - fortran.pfcoil_variables.init_pfcoil_variables() - fortran.structure_variables.init_structure_variables() - fortran.vacuum_variables.init_vacuum_variables() - fortran.pf_power_variables.init_pf_power_variables() - fortran.build_variables.init_build_variables() + init_current_drive_variables() + init_primary_pumping_variables() + init_pfcoil_variables() + init_structure_variables() + init_vacuum_variables() + init_pf_power_variables() + init_build_variables() fortran.constraint_variables.init_constraint_variables() - fortran.pulse_variables.init_pulse_variables() - fortran.rebco_variables.init_rebco_variables() - fortran.reinke_variables.init_reinke_variables() + init_pulse_variables() + init_rebco_variables() + init_reinke_variables() fortran.define_iteration_variables.init_define_iteration_variables() - fortran.water_usage_variables.init_watuse_variables() - fortran.cs_fatigue_variables.init_cs_fatigue_variables() - fortran.blanket_library.init_blanket_library() - fortran.dcll_module.init_dcll_module() + init_watuse_variables() + init_cs_fatigue_variables() + init_blanket_library() + init_dcll_module() fortran.init_module.init_fortran_modules() diff --git a/process/pfcoil.py b/process/pfcoil.py index 8e650e978f..b94ed4b8cc 100644 --- a/process/pfcoil.py +++ b/process/pfcoil.py @@ -36,7 +36,7 @@ def __init__(self, cs_fatigue) -> None: """Initialise Fortran module variables.""" self.outfile = ft.constants.nout # output file unit self.mfile = ft.constants.mfile # mfile file unit - pf.init_pfcoil_module() + init_pfcoil_module() self.cs_fatigue = cs_fatigue def run(self): @@ -3486,3 +3486,128 @@ def mtrx( gmat = np.asfortranarray(gmat) return nrws, gmat, bvec + + +def init_pfcoil_module(): + pf.first_call = True + pf.cslimit = False + pf.nef = 0.0 + pf.nfxf = 0.0 + pf.ricpf = 0.0 + pf.ssq0 = 0.0 + pf.sig_axial = 0.0 + pf.sig_hoop = 0.0 + pf.axial_force = 0 + pf.rfxf[:] = 0.0 + pf.zfxf[:] = 0.0 + pf.cfxf[:] = 0.0 + pf.xind[:] = 0.0 + pf.rcls[:] = 0.0 + pf.zcls[:] = 0.0 + pf.ccls[:] = 0.0 + pf.ccl0[:] = 0.0 + pf.bpf2[:] = 0.0 + pf.vsdum[:] = 0.0 + + +def init_pfcoil_variables(): + """Initialise the PF coil variables""" + pfv.alfapf = 5e-10 + pfv.alstroh = 4.0e8 + pfv.i_cs_stress = 0 + pfv.a_cs_poloidal = 0.0 + pfv.a_cs_turn = 0.0 + pfv.awpoh = 0.0 + pfv.b_cs_peak_flat_top_end = 0.0 + pfv.b_cs_peak_pulse_start = 0.0 + pfv.b_pf_coil_peak[:] = 0.0 + pfv.ccl0_ma[:] = 0.0 + pfv.ccls_ma[:] = 0.0 + pfv.j_cs_pulse_start = 0.0 + pfv.j_cs_flat_top_end = 1.85e7 + pfv.c_pf_coil_turn[:] = 0.0 + pfv.c_pf_coil_turn_peak_input[:] = 4.0e4 + pfv.c_pf_cs_coil_pulse_start_ma[:] = 0.0 + pfv.c_pf_cs_coil_flat_top_ma[:] = 0.0 + pfv.c_pf_cs_coil_pulse_end_ma[:] = 0.0 + pfv.etapsu = 0.9 + pfv.f_j_cs_start_end_flat_top = 0.0 + pfv.f_j_cs_start_pulse_end_flat_top = 0.9 + pfv.fcuohsu = 0.7 + pfv.fcupfsu = 0.69 + pfv.fvs_cs_pf_total_ramp = 1.0 + pfv.i_pf_location = [2, 2, 3, 0, 0, 0, 0, 0, 0, 0] + pfv.i_pf_conductor = 0 + pfv.itr_sum = 0.0 + pfv.i_cs_superconductor = 1 + pfv.i_pf_superconductor = 1 + pfv.j_crit_str_cs = 0.0 + pfv.j_crit_str_pf = 0.0 + pfv.i_pf_current = 1 + pfv.i_sup_pf_shape = 0 + pfv.j_cs_conductor_critical_pulse_start = 0.0 + pfv.j_cs_conductor_critical_flat_top_end = 0.0 + pfv.jcableoh_bop = 0.0 + pfv.jcableoh_eof = 0.0 + pfv.n_pf_cs_plasma_circuits = 0 + pfv.n_pf_coils_in_group = [1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0] + pfv.nfxfh = 7 + pfv.n_pf_coil_groups = 3 + pfv.n_cs_pf_coils = 0 + pfv.f_z_cs_tf_internal = 0.71 + pfv.f_a_cs_steel = 0.5 + pfv.pf_current_safety_factor = 1.0 + pfv.pfcaseth[:] = 0.0 + pfv.rho_pf_coil = 2.5e-8 + pfv.rhopfbus = 3.93e-8 + pfv.m_pf_coil_max = 0.0 + pfv.r_pf_coil_outer_max = 0.0 + pfv.pfwpmw = 0.0 + pfv.p_cs_resistive_flat_top = 0.0 + pfv.p_pf_coil_resistive_total_flat_top = 0.0 + pfv.r_pf_coil_inner[:] = 0.0 + pfv.r_pf_coil_outer[:] = 0.0 + pfv.c_pf_cs_coils_peak_ma[:] = 0.0 + pfv.j_pf_coil_wp_peak[:] = 3.0e7 + pfv.j_cs_critical_flat_top_end = 0.0 + pfv.j_cs_critical_pulse_start = 0.0 + pfv.j_pf_wp_critical[:] = 0.0 + pfv.r_cs_middle = 0.0 + pfv.routr = 1.5 + pfv.r_pf_coil_middle[:] = 0.0 + pfv.rpf1 = 0.0 + pfv.rpf2 = -1.63 + pfv.rref[:] = 7.0 + pfv.s_shear_cs_peak = 0.0 + pfv.sigpfcalw = 500.0 + pfv.sigpfcf = 1.0 + pfv.ind_pf_cs_plasma_mutual[:] = 0.0 + pfv.temp_cs_margin = 0.0 + pfv.n_pf_coil_turns[:] = 0.0 + pfv.f_a_pf_coil_void[:] = 0.3 + pfv.f_a_cs_void = 0.3 + pfv.vs_cs_pf_total_burn = 0.0 + pfv.vs_pf_coils_total_burn = 0.0 + pfv.vs_pf_coils_total_ramp = 0.0 + pfv.vs_pf_coils_total_pulse = 0.0 + pfv.vs_cs_total_pulse = 0.0 + pfv.vs_cs_burn = 0.0 + pfv.vs_cs_ramp = 0.0 + pfv.vs_cs_pf_total_ramp = 0.0 + pfv.vs_cs_pf_total_pulse = 0.0 + pfv.waves[:] = 0.0 + pfv.m_pf_coil_conductor_total = 0.0 + pfv.m_pf_coil_structure_total = 0.0 + pfv.m_pf_coil_conductor[:] = 0.0 + pfv.m_pf_coil_structure[:] = 0.0 + pfv.z_pf_coil_upper[:] = 0.0 + pfv.z_pf_coil_lower[:] = 0.0 + pfv.z_pf_coil_middle[:] = 0.0 + pfv.zref = [3.6, 1.2, 2.5, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] + pfv.b_cs_limit_max = 13.0 + pfv.fb_cs_limit_max = 1.0 + pfv.ld_ratio_cst = 70.0 / 22.0 + pfv.l_cond_cst = 0.0 + pfv.d_cond_cst = 0.0 + pfv.r_in_cst = 0.0 + pfv.r_out_cst = 3.0e-3 diff --git a/process/physics.py b/process/physics.py index a02dea779b..fefdf566f0 100644 --- a/process/physics.py +++ b/process/physics.py @@ -7970,3 +7970,298 @@ def reinke_tsep(bt, flh, qstar, rmajor, eps, fgw, kappa, lhat): * (eps**0.15 * (1.0 + kappa**2.0) ** 0.34) * (lhat**0.29 * kappa_0 ** (-0.29) * 0.285) ) + + +def init_physics_variables(): + physics_variables.m_beam_amu = 0.0 + physics_variables.m_fuel_amu = 0.0 + physics_variables.m_ions_total_amu = 0.0 + physics_variables.m_plasma_fuel_ions = 0.0 + physics_variables.m_plasma_ions_total = 0.0 + physics_variables.m_plasma_alpha = 0.0 + physics_variables.m_plasma_electron = 0.0 + physics_variables.m_plasma = 0.0 + physics_variables.alphaj = 1.0 + physics_variables.alphan = 0.25 + physics_variables.alphap = 0.0 + physics_variables.alpha_rate_density_total = 0.0 + physics_variables.alpha_rate_density_plasma = 0.0 + physics_variables.alphat = 0.5 + physics_variables.aspect = 2.907 + physics_variables.beamfus0 = 1.0 + physics_variables.beta = 0.042 + physics_variables.beta_fast_alpha = 0.0 + physics_variables.beta_max = 0.0 + physics_variables.beta_min = 0.0 + physics_variables.beta_beam = 0.0 + physics_variables.beta_poloidal = 0.0 + physics_variables.beta_poloidal_eps = 0.0 + physics_variables.beta_toroidal = 0.0 + physics_variables.beta_thermal = 0.0 + physics_variables.beta_thermal_poloidal = 0.0 + physics_variables.beta_thermal_toroidal = 0.0 + physics_variables.beta_norm_total = 0.0 + physics_variables.beta_norm_thermal = 0.0 + physics_variables.beta_norm_poloidal = 0.0 + physics_variables.e_plasma_beta_thermal = 0.0 + physics_variables.beta_norm_toroidal = 0.0 + physics_variables.betbm0 = 1.5 + physics_variables.bp = 0.0 + physics_variables.bt = 5.68 + physics_variables.btot = 0.0 + physics_variables.burnup = 0.0 + physics_variables.burnup_in = 0.0 + physics_variables.bvert = 0.0 + physics_variables.c_beta = 0.5 + physics_variables.csawth = 1.0 + physics_variables.f_vol_plasma = 1.0 + physics_variables.f_r_conducting_wall = 1.35 + physics_variables.dene = 9.8e19 + physics_variables.nd_fuel_ions = 0.0 + physics_variables.dlamee = 0.0 + physics_variables.dlamie = 0.0 + physics_variables.dlimit[:] = 0.0 + physics_variables.nd_alphas = 0.0 + physics_variables.nd_beam_ions = 0.0 + physics_variables.beam_density_out = 0.0 + physics_variables.beta_norm_max = 3.5 + physics_variables.dnelimt = 0.0 + physics_variables.nd_ions_total = 0.0 + physics_variables.dnla = 0.0 + physics_variables.nd_protons = 0.0 + physics_variables.ntau = 0.0 + physics_variables.nTtau = 0.0 + physics_variables.nd_impurities = 0.0 + physics_variables.beta_poloidal_eps_max = 1.38 + physics_variables.eps = 0.34399724802 + physics_variables.aux_current_fraction = 0.0 + physics_variables.inductive_current_fraction = 0.0 + physics_variables.f_alpha_electron = 0.0 + physics_variables.f_alpha_plasma = 0.95 + physics_variables.f_alpha_ion = 0.0 + physics_variables.f_deuterium = 0.5 + physics_variables.ftar = 1.0 + physics_variables.ffwal = 0.92 + physics_variables.fgwped = 0.85 + physics_variables.fgwsep = 0.50 + physics_variables.f_helium3 = 0.0 + physics_variables.figmer = 0.0 + physics_variables.fkzohm = 1.0 + physics_variables.fplhsep = 1.0 + physics_variables.fpdivlim = 1.0 + physics_variables.fne0 = 1.0 + physics_variables.f_tritium = 0.5 + physics_variables.fusion_rate_density_total = 0.0 + physics_variables.fusion_rate_density_plasma = 0.0 + physics_variables.fvsbrnni = 1.0 + physics_variables.ejima_coeff = 0.4 + physics_variables.f_beta_alpha_beam_thermal = 0.0 + physics_variables.hfac[:] = 0.0 + physics_variables.hfact = 1.0 + physics_variables.taumax = 10.0 + physics_variables.i_bootstrap_current = 3 + physics_variables.i_beta_component = 0 + physics_variables.i_plasma_current = 4 + physics_variables.i_diamagnetic_current = 0 + physics_variables.i_density_limit = 8 + physics_variables.idivrt = 2 + physics_variables.i_beta_fast_alpha = 1 + physics_variables.ignite = 0 + physics_variables.ipedestal = 1 + physics_variables.i_pfirsch_schluter_current = 0 + physics_variables.neped = 4.0e19 + physics_variables.nesep = 3.0e19 + physics_variables.alpha_crit = 0.0 + physics_variables.nesep_crit = 0.0 + physics_variables.plasma_res_factor = 1.0 + physics_variables.rhopedn = 1.0 + physics_variables.rhopedt = 1.0 + physics_variables.tbeta = 2.0 + physics_variables.teped = 1.0 + physics_variables.tesep = 0.1 + physics_variables.iprofile = 1 + physics_variables.i_rad_loss = 1 + physics_variables.i_confinement_time = 34 + physics_variables.i_plasma_wall_gap = 1 + physics_variables.i_plasma_geometry = 0 + physics_variables.i_plasma_shape = 0 + physics_variables.itart = 0 + physics_variables.itartpf = 0 + physics_variables.iwalld = 1 + physics_variables.plasma_square = 0.0 + physics_variables.kappa = 1.792 + physics_variables.kappa95 = 1.6 + physics_variables.kappa_ipb = 0.0 + physics_variables.ne0 = 0.0 + physics_variables.ni0 = 0.0 + physics_variables.m_s_limit = 0.3 + physics_variables.p0 = 0.0 + physics_variables.j_plasma_0 = 0.0 + physics_variables.f_dd_branching_trit = 0.0 + physics_variables.alpha_power_density_plasma = 0.0 + physics_variables.alpha_power_density_total = 0.0 + physics_variables.alpha_power_electron_density = 0.0 + physics_variables.p_fw_alpha_mw = 0.0 + physics_variables.alpha_power_ions_density = 0.0 + physics_variables.alpha_power_total = 0.0 + physics_variables.alpha_power_plasma = 0.0 + physics_variables.alpha_power_beams = 0.0 + physics_variables.non_alpha_charged_power = 0.0 + physics_variables.charged_power_density = 0.0 + physics_variables.pcoef = 0.0 + physics_variables.p_plasma_inner_rad_mw = 0.0 + physics_variables.pden_plasma_core_rad_mw = 0.0 + physics_variables.dd_power = 0.0 + physics_variables.dhe3_power = 0.0 + physics_variables.pdivt = 0.0 + physics_variables.pdivl = 0.0 + physics_variables.pdivu = 0.0 + physics_variables.pdivmax = 0.0 + physics_variables.dt_power_total = 0.0 + physics_variables.dt_power_plasma = 0.0 + physics_variables.p_plasma_outer_rad_mw = 0.0 + physics_variables.pden_plasma_outer_rad_mw = 0.0 + physics_variables.charged_particle_power = 0.0 + physics_variables.vs_plasma_internal = 0.0 + physics_variables.pflux_fw_rad_mw = 0.0 + physics_variables.piepv = 0.0 + physics_variables.plasma_current = 0.0 + physics_variables.neutron_power_plasma = 0.0 + physics_variables.neutron_power_total = 0.0 + physics_variables.neutron_power_density_total = 0.0 + physics_variables.neutron_power_density_plasma = 0.0 + physics_variables.p_plasma_ohmic_mw = 0.0 + physics_variables.pden_plasma_ohmic_mw = 0.0 + physics_variables.p_plasma_loss_mw = 0.0 + physics_variables.fusion_power = 0.0 + physics_variables.len_plasma_poloidal = 0.0 + physics_variables.p_plasma_rad_mw = 0.0 + physics_variables.pden_plasma_rad_mw = 0.0 + physics_variables.pradsolmw = 0.0 + physics_variables.proton_rate_density = 0.0 + physics_variables.psolradmw = 0.0 + physics_variables.pden_plasma_sync_mw = 0.0 + physics_variables.p_plasma_sync_mw = 0.0 + physics_variables.i_l_h_threshold = 19 + physics_variables.p_l_h_threshold_mw = 0.0 + physics_variables.l_h_threshold_powers[:] = 0.0 + physics_variables.p_electron_transport_loss_mw = 0.0 + physics_variables.pden_electron_transport_loss_mw = 0.0 + physics_variables.p_ion_transport_loss_mw = 0.0 + physics_variables.pscalingmw = 0.0 + physics_variables.pden_ion_transport_loss_mw = 0.0 + physics_variables.q0 = 1.0 + physics_variables.q95 = 0.0 + physics_variables.qfuel = 0.0 + physics_variables.tauratio = 1.0 + physics_variables.q95_min = 0.0 + physics_variables.qstar = 0.0 + physics_variables.rad_fraction_sol = 0.8 + physics_variables.rad_fraction_total = 0.0 + physics_variables.f_nd_alpha_electron = 0.1 + physics_variables.f_nd_protium_electrons = 0.0 + physics_variables.ind_plasma_internal_norm = 0.9 + physics_variables.ind_plasma = 0.0 + physics_variables.rmajor = 8.14 + physics_variables.rminor = 0.0 + physics_variables.f_nd_beam_electron = 0.005 + physics_variables.rncne = 0.0 + physics_variables.rndfuel = 0.0 + physics_variables.rnfene = 0.0 + physics_variables.rnone = 0.0 + physics_variables.f_res_plasma_neo = 0.0 + physics_variables.res_plasma = 0.0 + physics_variables.t_plasma_res_diffusion = 0.0 + physics_variables.a_plasma_surface = 0.0 + physics_variables.a_plasma_surface_outboard = 0.0 + physics_variables.i_single_null = 1 + physics_variables.f_sync_reflect = 0.6 + physics_variables.t_electron_energy_confinement = 0.0 + physics_variables.tauee_in = 0.0 + physics_variables.t_energy_confinement = 0.0 + physics_variables.t_ion_energy_confinement = 0.0 + physics_variables.t_alpha_confinement = 0.0 + physics_variables.f_alpha_energy_confinement = 0.0 + physics_variables.te = 12.9 + physics_variables.te0 = 0.0 + physics_variables.ten = 0.0 + physics_variables.ti = 12.9 + physics_variables.ti0 = 0.0 + physics_variables.tin = 0.0 + physics_variables.tratio = 1.0 + physics_variables.triang = 0.36 + physics_variables.triang95 = 0.24 + physics_variables.vol_plasma = 0.0 + physics_variables.vs_plasma_burn_required = 0.0 + physics_variables.v_plasma_loop_burn = 0.0 + physics_variables.vshift = 0.0 + physics_variables.vs_plasma_ind_ramp = 0.0 + physics_variables.vs_plasma_res_ramp = 0.0 + physics_variables.vs_plasma_total_required = 0.0 + physics_variables.pflux_fw_neutron_mw = 0.0 + physics_variables.wtgpd = 0.0 + physics_variables.a_plasma_poloidal = 0.0 + physics_variables.zeff = 0.0 + physics_variables.zeffai = 0.0 + + +def init_physics_module(): + """Initialise the physics module""" + physics_module.first_call = 1 + physics_module.iscz = 0 + physics_module.err242 = 0 + physics_module.err243 = 0 + physics_module.rad_fraction_lcfs = 0.0 + physics_module.e_plasma_beta = 0.0 + physics_module.total_loss_power = 0.0 + physics_module.t_energy_confinement_beta = 0.0 + physics_module.ptarmw = 0.0 + physics_module.lambdaio = 0.0 + physics_module.drsep = 0.0 + physics_module.fio = 0.0 + physics_module.fli = 0.0 + physics_module.flo = 0.0 + physics_module.fui = 0.0 + physics_module.fuo = 0.0 + physics_module.plimw = 0.0 + physics_module.plomw = 0.0 + physics_module.puimw = 0.0 + physics_module.puomw = 0.0 + physics_module.rho_star = 0.0 + physics_module.nu_star = 0.0 + physics_module.beta_mcdonald = 0.0 + physics_module.itart_r = 0.0 + + +def init_times_variables(): + """Initialise plasma pulse timing variables""" + times_variables.pulsetimings = 1.0 + times_variables.t_burn = 1000.0 + times_variables.t_burn_0 = 0.0 + times_variables.t_cycle = 0.0 + times_variables.tdown = 0.0 + times_variables.t_between_pulse = 1800.0 + times_variables.t_fusion_ramp = 10.0 + times_variables.tim[:] = 0.0 + times_variables.timelabel = ["Start", "BOP ", "EOR ", "BOF ", "EOF ", "EOP "] + times_variables.intervallabel = [ + "t_precharge ", + "t_current_ramp_up ", + "t_fusion_ramp ", + "t_burn ", + "t_ramp_down ", + ] + times_variables.t_current_ramp_up = 30.0 + times_variables.i_t_current_ramp_up = 0 + times_variables.t_pulse_repetition = 0.0 + times_variables.t_ramp_down = 15.0 + times_variables.t_precharge = 15.0 + + +def init_reinke_variables(): + """Initialise Reinke criterion variables""" + reinke_variables.impvardiv = 9 + reinke_variables.lhat = 4.33 + reinke_variables.fzmin = 0.0 + reinke_variables.fzactual = 0.001 + reinke_variables.reinke_mode = 0 diff --git a/process/power.py b/process/power.py index 06ecab832f..4e443bc130 100644 --- a/process/power.py +++ b/process/power.py @@ -3028,3 +3028,74 @@ def tfcpwr(self, output: bool, itfka, rmajor, ntfc, vtfskv, ettfmj, rptfc): ) return (tfckw, len_tf_bus, drarea, tfcbv, tfacpd) + + +def init_pf_power_variables(): + """Initialise PF coil power variables""" + pf_power_variables.acptmax = 0.0 + pf_power_variables.ensxpfm = 0.0 + pf_power_variables.iscenr = 2 + pf_power_variables.pfckts = 0.0 + pf_power_variables.spfbusl = 0.0 + pf_power_variables.spsmva = 0.0 + pf_power_variables.srcktpm = 0.0 + pf_power_variables.vpfskv = 0.0 + pf_power_variables.peakpoloidalpower = 0.0 + pf_power_variables.maxpoloidalpower = 1000.0 + pf_power_variables.poloidalpower[:] = 0.0 + + +def init_heat_transport_variables(): + """Initialise heat transport variables""" + heat_transport_variables.baseel = 5.0e6 + heat_transport_variables.crypmw = 0.0 + heat_transport_variables.crypmw_max = 50.0 + heat_transport_variables.f_crypmw = 1.0 + heat_transport_variables.etatf = 0.9 + heat_transport_variables.etath = 0.35 + heat_transport_variables.etath_liq = 0.35 + heat_transport_variables.fachtmw = 0.0 + heat_transport_variables.fcsht = 0.0 + heat_transport_variables.fgrosbop = 0.0 + heat_transport_variables.fmgdmw = 0.0 + heat_transport_variables.fpumpblkt = 0.005 + heat_transport_variables.fpumpdiv = 0.005 + heat_transport_variables.fpumpfw = 0.005 + heat_transport_variables.fpumpshld = 0.005 + heat_transport_variables.htpmw_min = 0.0 + heat_transport_variables.helpow = 0.0 + heat_transport_variables.helpow_cryal = 0.0 + heat_transport_variables.htpmw = 0.0 + heat_transport_variables.htpmw_blkt = 0.0 + heat_transport_variables.htpmw_blkt_liq = 0.0 + heat_transport_variables.htpmw_blkt_tot = 0.0 + heat_transport_variables.htpmw_div = 0.0 + heat_transport_variables.htpmw_fw = 0.0 + heat_transport_variables.htpmw_shld = 0.0 + heat_transport_variables.htpsecmw = 0.0 + heat_transport_variables.ipowerflow = 1 + heat_transport_variables.iprimshld = 1 + heat_transport_variables.nphx = 0 + heat_transport_variables.pacpmw = 0.0 + heat_transport_variables.peakmva = 0.0 + heat_transport_variables.pfwdiv = 0.0 + heat_transport_variables.pgrossmw = 0.0 + heat_transport_variables.pinjht = 0.0 + heat_transport_variables.pinjmax = 120.0 + heat_transport_variables.pinjwp = 0.0 + heat_transport_variables.pinjwpfix = 0.0 + heat_transport_variables.pnetelmw = 0.0 + heat_transport_variables.precircmw = 0.0 + heat_transport_variables.priheat = 0.0 + heat_transport_variables.psecdiv = 0.0 + heat_transport_variables.psechcd = 0.0 + heat_transport_variables.psechtmw = 0.0 + heat_transport_variables.pseclossmw = 0.0 + heat_transport_variables.psecshld = 0.0 + heat_transport_variables.pthermmw = 0.0 + heat_transport_variables.pwpm2 = 150.0 + heat_transport_variables.tfacpd = 0.0 + heat_transport_variables.tlvpmw = 0.0 + heat_transport_variables.trithtmw = 15.0 + heat_transport_variables.tturb = 0.0 + heat_transport_variables.vachtmw = 0.5 diff --git a/process/pulse.py b/process/pulse.py index 687fd75561..a5dee23026 100644 --- a/process/pulse.py +++ b/process/pulse.py @@ -222,3 +222,12 @@ def burn(self, output: bool): self.outfile, " Error... burn time is zero; insufficient volt-seconds#", ) + + +def init_pulse_variables(): + """Initialise the pulse variables""" + pulse_variables.bctmp = 320.0 + pulse_variables.dtstor = 300.0 + pulse_variables.istore = 1 + pulse_variables.itcycl = 1 + pulse_variables.i_pulsed_plant = 0 diff --git a/process/scan.py b/process/scan.py index 9a2776343e..bb54d65b3d 100644 --- a/process/scan.py +++ b/process/scan.py @@ -1031,3 +1031,16 @@ def scan_select(self, nwp, swp, iscn): raise ProcessValueError("Illegal scan variable number", nwp=nwp) return SCAN_VARIABLES[int(nwp)] + + +def init_scan_module(): + """Initialise the scan module""" + scan_module.scan_dim = 1 + scan_module.isweep = 0 + scan_module.isweep_2 = 0 + scan_module.nsweep = 1 + scan_module.nsweep_2 = 3 + scan_module.sweep[:] = 0.0 + scan_module.sweep_2[:] = 0.0 + scan_module.first_call_1d = True + scan_module.first_call_2d = True diff --git a/process/stellarator.py b/process/stellarator.py index ec25b2c796..c0bbc2af93 100644 --- a/process/stellarator.py +++ b/process/stellarator.py @@ -5637,3 +5637,36 @@ def neoclassics_calc_q_flux(self): / neoclassics_module.temperatures ) ) + + +def init_stellarator_variables(): + stellarator_variables.istell = 0 + stellarator_variables.bmn = 1e-3 + stellarator_variables.f_asym = 1.0 + stellarator_variables.f_rad = 0.85 + stellarator_variables.f_w = 0.5 + stellarator_variables.fdivwet = 0.333333333333333 + stellarator_variables.flpitch = 1e-3 + stellarator_variables.hportamax = 0.0 + stellarator_variables.hportpmax = 0.0 + stellarator_variables.hporttmax = 0.0 + stellarator_variables.iotabar = 1.0 + stellarator_variables.isthtr = 3 + stellarator_variables.m_res = 5 + stellarator_variables.n_res = 5 + stellarator_variables.shear = 0.5 + stellarator_variables.vportamax = 0.0 + stellarator_variables.vportpmax = 0.0 + stellarator_variables.vporttmax = 0.0 + stellarator_variables.max_gyrotron_frequency = 1.0e9 + stellarator_variables.te0_ecrh_achievable = 1.0e2 + + +def init_stellarator_module(): + st.first_call = True + st.first_call_stfwbs = True + st.f_n = 0.0 + st.f_r = 0.0 + st.f_a = 0.0 + st.f_b = 0.0 + st.f_i = 0.0 diff --git a/process/structure.py b/process/structure.py index 1b41e8e2df..751f7fb56b 100644 --- a/process/structure.py +++ b/process/structure.py @@ -242,3 +242,12 @@ def structure( po.ovarre(self.outfile, "Ring legs mass (kg)", "(gsm3)", gsm3, "OP ") return fncmass, aintmass, clgsmass, coldmass, gsm + + +def init_structure_variables(): + """Initialise structure variables""" + stv.aintmass = 0.0 + stv.clgsmass = 0.0 + stv.coldmass = 0.0 + stv.fncmass = 0.0 + stv.gsmass = 0.0 diff --git a/process/superconducting_tf_coil.py b/process/superconducting_tf_coil.py index 58ec92fbca..240b40b311 100644 --- a/process/superconducting_tf_coil.py +++ b/process/superconducting_tf_coil.py @@ -3829,3 +3829,76 @@ def _inductance_factor( + 0.7629 * aspect_ratio**2 - 0.06298 * (theta1 / 90) ) + + +def init_sctfcoil_module(): + sctfcoil_module.is_leg_cp_temp_same = 0 + sctfcoil_module.tf_fit_t = 0.0 + sctfcoil_module.tf_fit_z = 0.0 + sctfcoil_module.tf_fit_y = 0.0 + sctfcoil_module.tfc_current = 0.0 + sctfcoil_module.awpc = 0.0 + sctfcoil_module.awptf = 0.0 + sctfcoil_module.a_tf_steel = 0.0 + sctfcoil_module.a_tf_ins = 0.0 + sctfcoil_module.f_tf_steel = 0.0 + sctfcoil_module.f_tf_ins = 0.0 + sctfcoil_module.h_cp_top = 0.0 + sctfcoil_module.r_tf_outboard_in = 0.0 + sctfcoil_module.r_tf_outboard_out = 0.0 + sctfcoil_module.r_wp_inner = 0.0 + sctfcoil_module.r_wp_outer = 0.0 + sctfcoil_module.r_wp_centre = 0.0 + sctfcoil_module.dr_tf_wp_top = 0.0 + sctfcoil_module.vol_ins_cp = 0.0 + sctfcoil_module.vol_gr_ins_cp = 0.0 + sctfcoil_module.vol_case_cp = 0.0 + sctfcoil_module.t_wp_toroidal = 0.0 + sctfcoil_module.t_wp_toroidal_av = 0.0 + sctfcoil_module.t_lat_case_av = 0.0 + sctfcoil_module.a_case_front = 0.0 + sctfcoil_module.a_case_nose = 0.0 + sctfcoil_module.a_ground_ins = 0.0 + sctfcoil_module.a_leg_ins = 0.0 + sctfcoil_module.a_leg_gr_ins = 0.0 + sctfcoil_module.a_leg_cond = 0.0 + sctfcoil_module.theta_coil = 0.0 + sctfcoil_module.tan_theta_coil = 0.0 + sctfcoil_module.t_conductor_radial = 0.0 + sctfcoil_module.t_conductor_toroidal = 0.0 + sctfcoil_module.t_cable_radial = 0.0 + sctfcoil_module.t_cable_toroidal = 0.0 + sctfcoil_module.t_turn_radial = 0.0 + sctfcoil_module.t_turn_toroidal = 0.0 + sctfcoil_module.t_cable = 0.0 + sctfcoil_module.vforce_inboard_tot = 0.0 + sctfcoil_module.t1 = 0.0 + sctfcoil_module.time2 = 0.0 + sctfcoil_module.tau2 = 0.0 + sctfcoil_module.estotft = 0.0 + + +def init_rebco_variables(): + """Initialise the REBCO variables""" + rebco_variables.rebco_thickness = 1.0e-6 + rebco_variables.copper_thick = 100.0e-6 + rebco_variables.hastelloy_thickness = 50.0e-6 + rebco_variables.tape_width = 4.0e-3 + rebco_variables.croco_od = 0.0 + rebco_variables.croco_id = 0.0 + rebco_variables.croco_thick = 2.5e-3 + rebco_variables.copper_rrr = 100.0 + rebco_variables.coppera_m2_max = 1.0e8 + rebco_variables.f_coppera_m2 = 1.0 + rebco_variables.tape_thickness = 6.5e-5 + rebco_variables.stack_thickness = 0.0 + rebco_variables.tapes = 0.0 + rebco_variables.rebco_area = 0.0 + rebco_variables.copper_area = 0.0 + rebco_variables.hastelloy_area = 0.0 + rebco_variables.solder_area = 0.0 + rebco_variables.croco_area = 0.0 + rebco_variables.copperA_m2 = 0.0 + rebco_variables.copperaoh_m2_max = 1.0e8 + rebco_variables.f_copperaoh_m2 = 1.0 + rebco_variables.copperaoh_m2 = 0.0 diff --git a/process/tf_coil.py b/process/tf_coil.py index 206773a01e..df3f6a0be7 100644 --- a/process/tf_coil.py +++ b/process/tf_coil.py @@ -22,7 +22,10 @@ from process.fortran import error_handling as eh from process.fortran import fwbs_variables as fwbsv from process.fortran import tfcoil_variables as tfv -from process.utilities.f2py_string_patch import f2py_compatible_to_string +from process.utilities.f2py_string_patch import ( + f2py_compatible_to_string, + string_to_f2py_compatible, +) RMU0 = constants.rmu0 @@ -3707,3 +3710,227 @@ def eyoung_series(eyoung_j_1, l_1, poisson_j_perp_1, eyoung_j_2, l_2, poisson_j_ poisson_j_perp_3 = np.array(poisson_j_perp_3) return eyoung_j_3, l_3, poisson_j_perp_3 + + +def init_tfcoil_variables(): + tfv.acasetf = 0.0 + tfv.acasetfo = 0.0 + tfv.acndttf = 0.0 + tfv.acond = 0.0 + tfv.acstf = 0.0 + tfv.insulation_area = 0.0 + tfv.aiwp = 0.0 + tfv.sig_tf_case_max = 6.0e8 + tfv.sig_tf_wp_max = 6.0e8 + tfv.a_tf_leg_outboard = 0.0 + tfv.aswp = 0.0 + tfv.avwp = 0.0 + tfv.awphec = 0.0 + tfv.bcritsc = 24.0 + tfv.bmaxtf = 0.0 + tfv.bmaxtfrp = 0.0 + tfv.casestr = 0.0 + tfv.casthi = 0.0 + tfv.casthi_fraction = 0.05 + tfv.casthi_is_fraction = False + tfv.casths = 0.0 + tfv.casths_fraction = 0.06 + tfv.t_conductor = 0.0 + tfv.t_cable_tf = 0.0 + tfv.t_cable_tf_is_input = False + tfv.t_turn_tf = 0.0 + tfv.t_turn_tf_is_input = False + tfv.f_t_turn_tf = 1.0 + tfv.t_turn_tf_max = 0.05 + tfv.acs = 0.0 + tfv.cdtfleg = 0.0 + tfv.cforce = 0.0 + tfv.cplen = 0.0 + tfv.cpttf = 7.0e4 + tfv.cpttf_max = 9.0e4 + tfv.dcase = 8000.0 + tfv.dcond = [6080.0, 6080.0, 6070.0, 6080.0, 6080.0, 8500.0, 6070.0, 8500.0, 8500.0] + tfv.dcondins = 1800.0 + tfv.dhecoil = 0.005 + tfv.estotftgj = 0.0 + tfv.b_crit_upper_nbti = 14.86 + tfv.t_crit_nbti = 9.04 + tfv.max_force_density = 0.0 + tfv.fcutfsu = 0.69 + tfv.fhts = 0.5 + tfv.insstrain = 0.0 + tfv.i_tf_stress_model = 1 + tfv.i_tf_tresca = 0 + tfv.i_tf_wp_geom = -1 + tfv.i_tf_case_geom = 0 + tfv.i_tf_turns_integer = 0 + tfv.i_tf_sc_mat = 1 + tfv.i_tf_sup = 1 + tfv.i_tf_shape = 0 + tfv.i_tf_cond_eyoung_axial = 0 + tfv.i_tf_cond_eyoung_trans = 1 + tfv.n_pancake = 10 + tfv.n_layer = 20 + tfv.n_rad_per_layer = 100 + tfv.i_tf_bucking = -1 + tfv.n_tf_graded_layers = 1 + tfv.n_tf_stress_layers = 0 + tfv.n_tf_wp_layers = 5 + tfv.j_tf_bus = 1.25e6 + tfv.j_crit_str_tf = 0.0 + tfv.j_crit_str_0 = [ + 596905475.80390120, + 1925501534.8512938, + 724544682.96063495, + 549858624.45072436, + 669284509.85818779, + 0.0, + 898964415.36996782, + 1158752995.2559297, + 865652122.9071957, + ] + tfv.jwdgcrt = 0.0 + tfv.jwdgpro = 0.0 + tfv.jwptf = 0.0 + tfv.oacdcp = 0.0 + tfv.eyoung_ins = 1.0e8 + tfv.eyoung_steel = 2.05e11 + tfv.eyoung_cond_axial = 6.6e8 + tfv.eyoung_cond_trans = 0.0 + tfv.eyoung_res_tf_buck = 150.0e9 + tfv.eyoung_copper = 117.0e9 + tfv.eyoung_al = 69.0e9 + tfv.poisson_steel = 0.3 + tfv.poisson_copper = 0.35 + tfv.poisson_al = 0.35 + tfv.poisson_ins = 0.34 + tfv.poisson_cond_axial = 0.3 + tfv.poisson_cond_trans = 0.3 + tfv.rbmax = 0.0 + tfv.res_tf_leg = 0.0 + tfv.toroidalgap = 1.0 # [m] + tfv.ftoroidalgap = 1.0 + tfv.ripmax = 1.0 + tfv.ripple = 0.0 + tfv.c_tf_total = 0.0 + tfv.radial_array[:] = 0.0 + tfv.sig_tf_r[:] = 0.0 + tfv.sig_tf_t[:] = 0.0 + tfv.deflect[:] = 0.0 + tfv.sig_tf_z = 0.0 + tfv.sig_tf_vmises[:] = 0.0 + tfv.s_shear_tf[:] = 0.0 + tfv.sig_tf_cs_bucked = 0.0 + tfv.sig_tf_case = 0.0 + tfv.sig_tf_wp = 0.0 + tfv.str_cs_con_res = -0.005 + tfv.str_pf_con_res = -0.005 + tfv.str_tf_con_res = -0.005 + tfv.str_wp = 0.0 + tfv.str_wp_max = 0.7e-2 + tfv.i_str_wp = 1 + tfv.quench_model = string_to_f2py_compatible(tfv.quench_model, "exponential") + tfv.time1 = 0 + tfv.tcritsc = 16.0 + tfv.tdmptf = 10.0 + tfv.tfareain = 0.0 + tfv.len_tf_bus = 300.0 + tfv.m_tf_bus = 0.0 + tfv.tfckw = 0.0 + tfv.tfcmw = 0.0 + tfv.tfcpmw = 0.0 + tfv.tfjtsmw = 0.0 + tfv.tfcryoarea = 0.0 + tfv.tficrn = 0.0 + tfv.tfind = 0.0 + tfv.tfinsgap = 0.01 + tfv.tflegmw = 0.0 + tfv.rho_cp = 0.0 + tfv.rho_tf_leg = 0.0 + tfv.rho_tf_bus = 1.86e-8 + tfv.frhocp = 1.0 + tfv.frholeg = 1.0 + tfv.rho_tf_joints = 2.5e-10 + tfv.n_tf_joints_contact = 6 + tfv.n_tf_joints = 4 + tfv.th_joint_contact = 0.03 + tfv.pres_joints = 0.0 + tfv.len_tf_coil = 0.0 + tfv.eff_tf_cryo = -1.0 + tfv.n_tf_coils = 16.0 + tfv.tfocrn = 0.0 + tfv.tfsai = 0.0 + tfv.tfsao = 0.0 + tfv.tftmp = 4.5 + tfv.tftort = 1.0 + tfv.thicndut = 8e-4 + tfv.layer_ins = 0.0 + tfv.thkcas = 0.3 + tfv.dr_tf_wp = 0.0 + tfv.thwcndut = 8e-3 + tfv.tinstf = 0.018 + tfv.tmargmin_tf = 0.0 + tfv.tmargmin_cs = 0.0 + tfv.tmargmin = 0.0 + tfv.temp_margin = 0.0 + tfv.tmargtf = 0.0 + tfv.tmaxpro = 150.0 + tfv.tmax_croco = 200.0 + tfv.croco_quench_temperature = 0.0 + tfv.tmpcry = 4.5 + tfv.n_tf_turn = 0.0 + tfv.vdalw = 20.0 + tfv.vforce = 0.0 + tfv.f_vforce_inboard = 0.5 + tfv.vforce_outboard = 0.0 + tfv.vftf = 0.4 + tfv.voltfleg = 0.0 + tfv.vtfkv = 0.0 + tfv.vtfskv = 0.0 + tfv.whtcas = 0.0 + tfv.whtcon = 0.0 + tfv.whtconcu = 0.0 + tfv.whtconal = 0.0 + tfv.whtconin = 0.0 + tfv.whtconsc = 0.0 + tfv.whtconsh = 0.0 + tfv.whtgw = 0.0 + tfv.whttf = 0.0 + tfv.wwp1 = 0.0 + tfv.wwp2 = 0.0 + tfv.dthet[:] = 0.0 + tfv.radctf[:] = 0.0 + tfv.xarc[:] = 0.0 + tfv.xctfc[:] = 0.0 + tfv.yarc[:] = 0.0 + tfv.yctfc[:] = 0.0 + tfv.tfa[:] = 0.0 + tfv.tfb[:] = 0.0 + tfv.drtop = 0.0 + tfv.dztop = 0.0 + tfv.etapump = 0.8 + tfv.fcoolcp = 0.3 + tfv.f_a_tf_cool_outboard = 0.2 + tfv.a_cp_cool = 0.0 + tfv.ncool = 0.0 + tfv.ppump = 0.0 + tfv.p_cp_resistive = 0.0 + tfv.p_tf_leg_resistive = 0.0 + tfv.ptempalw = 473.15 # 200 C + tfv.rcool = 0.005 + tfv.tcoolin = 313.15 # 40 C + tfv.dtiocool = 0.0 + tfv.temp_cp_average = 373.15 # 100 C + tfv.tcpav2 = 0.0 + tfv.temp_tf_legs_outboard = -1.0 + tfv.tcpmax = 0.0 + tfv.vcool = 20.0 + tfv.vol_cond_cp = 0.0 + tfv.whtcp = 0.0 + tfv.whttflgs = 0.0 + tfv.tfc_sidewall_is_fraction = False + tfv.i_cp_joints = -1 + tfv.cryo_cool_req = 0.0 + tfv.theta1_coil = 45.0 + tfv.theta1_vv = 1.0 # 1 Deg + tfv.max_vv_stress = 143.0e6 diff --git a/process/vacuum.py b/process/vacuum.py index 8b5ce426c5..da4fbc2799 100644 --- a/process/vacuum.py +++ b/process/vacuum.py @@ -11,7 +11,10 @@ from process.fortran import tfcoil_variables as tfv from process.fortran import times_variables as tv from process.fortran import vacuum_variables as vacv -from process.utilities.f2py_string_patch import f2py_compatible_to_string +from process.utilities.f2py_string_patch import ( + f2py_compatible_to_string, + string_to_f2py_compatible, +) logger = logging.getLogger(__name__) @@ -665,3 +668,27 @@ def vacuum( ) return pumpn, nduct, dlscalc, mvdsh, dimax + + +def init_vacuum_variables(): + """Initialise Vacuum variables""" + vacv.vacuum_model = string_to_f2py_compatible(vacv.vacuum_model, "old") + vacv.niterpump = 0.0 + vacv.ntype = 1 + vacv.nvduct = 0 + vacv.dlscal = 0.0 + vacv.pbase = 5.0e-4 + vacv.prdiv = 0.36 + vacv.pumptp = 1.2155e22 + vacv.rat = 1.3e-8 + vacv.tn = 300.0 + vacv.vacdshm = 0.0 + vacv.vcdimax = 0.0 + vacv.vpumpn = 0 + vacv.dwell_pump = 0 + vacv.pumpareafraction = 0.0203 + vacv.pumpspeedmax = 27.3 + vacv.pumpspeedfactor = 0.167 + vacv.initialpressure = 1.0 + vacv.outgasindex = 1.0 + vacv.outgasfactor = 0.0235 diff --git a/process/water_use.py b/process/water_use.py index d37be8b76f..91601ca77a 100644 --- a/process/water_use.py +++ b/process/water_use.py @@ -284,3 +284,20 @@ def cooling_water_body(self, wastetherm: float, output: bool): water_usage_variables.wateruseonethru, "OP ", ) + + +def init_watuse_variables(): + """Initialise water variables""" + water_usage_variables.airtemp = 15.0 + water_usage_variables.watertemp = 5.0 + water_usage_variables.windspeed = 4.0 + water_usage_variables.waterdens = 998.02 + water_usage_variables.latentheat = 2257000.0 + water_usage_variables.volheat = 0.0 + water_usage_variables.evapratio = 0.0 + water_usage_variables.evapvol = 0.0 + water_usage_variables.energypervol = 0.0 + water_usage_variables.volperenergy = 0.0 + water_usage_variables.waterusetower = 0.0 + water_usage_variables.wateruserecirc = 0.0 + water_usage_variables.wateruseonethru = 0.0 diff --git a/source/fortran/CS_fatigue_variables.f90 b/source/fortran/CS_fatigue_variables.f90 index d1b66d05d3..05350ffbae 100644 --- a/source/fortran/CS_fatigue_variables.f90 +++ b/source/fortran/CS_fatigue_variables.f90 @@ -52,29 +52,4 @@ module CS_fatigue_variables real(dp) :: fracture_toughness !! fracture toughness (MPa m^1/2) - - contains - - subroutine init_CS_fatigue_variables - !! Initialise module variables - implicit none - - residual_sig_hoop = 2.4D8 - t_crack_radial = 6.0D-3 - t_crack_vertical = 0.89D-3 - n_cycle = 0.0D0 - n_cycle_min = 2.0D4 - t_structural_vertical = 0.022D0 - t_structural_radial = 0.07D0 - bkt_life_csf = 0 - sf_vertical_crack = 2.0D0 - sf_radial_crack = 2.0D0 - sf_fast_fracture = 1.5D0 - paris_coefficient = 65.0D-14 - paris_power_law = 3.5D0 - walker_coefficient = 0.436D0 - fracture_toughness = 2.0e2 - - end subroutine init_CS_fatigue_variables - end module CS_fatigue_variables diff --git a/source/fortran/blanket_library.f90 b/source/fortran/blanket_library.f90 index 7b1cd4bb33..18f113e872 100644 --- a/source/fortran/blanket_library.f90 +++ b/source/fortran/blanket_library.f90 @@ -120,64 +120,4 @@ module blanket_library integer :: icomponent !! Switch used to specify selected component: blanket=0, shield=1, vacuum vessel=2 -contains - - subroutine init_blanket_library - !! Initialise module variables - - implicit none - - hblnkt = 0.0D0 - hshld = 0.0D0 - dz_pf_cryostat = 0.0D0 - hvv = 0.0D0 - volshldi = 0.0D0 - volshldo = 0.0D0 - vol_vv_inboard = 0.0D0 - vol_vv_outboard = 0.0D0 - bldepti = 0.0D0 - bldepto = 0.0D0 - blwidti = 0.0D0 - blwidto = 0.0D0 - bllengi = 0.0D0 - bllengo = 0.0D0 - len_blkt_inboard_channel_total = 0.0D0 - bzfllengi_liq = 0.0D0 - bzfllengo_liq = 0.0D0 - len_blkt_outboard_channel_total = 0.0D0 - p_fw_inboard_nuclear_heat_mw = 0.0D0 - p_fw_outboard_nuclear_heat_mw = 0.0D0 - temp_fw_inboard_peak = 0.0D0 - temp_fw_outboard_peak = 0.0D0 - mflow_fw_inboard_coolant_total = 0.0D0 - mflow_fw_outboard_coolant_total = 0.0D0 - mflow_fw_coolant_total = 0.0D0 - n_fw_inboard_channels = 0.0D0 - n_fw_outboard_channels = 0.0D0 - mflow_fw_inboard_coolant_channel = 0.0D0 - mflow_fw_outboard_coolant_channel = 0.0D0 - p_blkt_nuclear_heat_inboard_mw = 0.0D0 - p_blkt_nuclear_heat_outboard_mw = 0.0D0 - mflow_blkt_inboard_coolant = 0.0D0 - mflow_blkt_outboard_coolant = 0.0D0 - mfblkti_liq = 0.0D0 - mfblkto_liq = 0.0D0 - mfblkt_liq = 0.0D0 - mflow_blkt_coolant_total = 0.0D0 - mftotal = 0.0D0 - n_blkt_inboard_channels = 0.0D0 - n_blkt_outboard_channels = 0.0D0 - mfblktpi = 0.0D0 - mfblktpo = 0.0D0 - vel_blkt_inboard_coolant = 0.0D0 - vel_blkt_outboard_coolant = 0.0D0 - htpmw_fwi = 0.0D0 - htpmw_fwo = 0.0D0 - htpmw_blkti = 0.0D0 - htpmw_blkto = 0.0D0 - vfblkti = 0.0D0 - vfblkto = 0.0D0 - - end subroutine init_blanket_library - end module blanket_library diff --git a/source/fortran/build_variables.f90 b/source/fortran/build_variables.f90 index 3c8bc900ba..d5e490fbd4 100644 --- a/source/fortran/build_variables.f90 +++ b/source/fortran/build_variables.f90 @@ -302,101 +302,4 @@ module build_variables real(dp) :: z_plasma_xpoint_lower !! Vertical height of the lower plasma x-point (m) - - contains - - subroutine init_build_variables - !! Initialise module variables - implicit none - - aplasmin = 0.25D0 - available_radial_space = 0.0D0 - blarea = 0.0D0 - blareaib = 0.0D0 - blareaob = 0.0D0 - blbmith = 0.17D0 - blbmoth = 0.27D0 - blbpith = 0.30D0 - blbpoth = 0.35D0 - blbuith = 0.365D0 - blbuoth = 0.465D0 - dr_blkt_inboard = 0.115D0 - dr_blkt_outboard = 0.235D0 - dz_blkt_upper = 0.0D0 - dr_bore = 1.42D0 - f_z_cryostat = 4.268D0 - dr_cryostat = 0.07D0 - dr_vv_inboard = 0.07D0 - dr_vv_outboard = 0.07D0 - dz_vv_upper = 0.07D0 - dz_vv_lower = 0.07D0 - dr_vv_shells = 0.12D0 - f_avspace = 1.0D0 - fcspc = 0.6D0 - fseppc = 3.5D8 - a_fw_total = 0.0D0 - a_fw_inboard = 0.0D0 - a_fw_outboard = 0.0D0 - dr_fw_inboard = 0.0D0 - dr_fw_outboard = 0.0D0 - dr_shld_vv_gap_inboard = 0.155D0 - dr_cs_tf_gap = 0.08D0 - gapomin = 0.234D0 - dr_shld_vv_gap_outboard = 0.0D0 - hmax = 0.0D0 - hpfdif = 0.0D0 - hpfu = 0.0D0 - hr1 = 0.0D0 - iohcl = 1 - i_cs_precomp = 1 - i_tf_inside_cs = 0 - dr_cs = 0.811D0 - dr_cs_precomp = 0.0D0 - rbld = 0.0D0 - required_radial_space = 0.0D0 - rinboard = 0.651D0 - rsldi = 0.0D0 - rsldo = 0.0D0 - r_vv_inboard_out = 0.0D0 - r_sh_inboard_out = 0.0D0 - r_tf_inboard_in = 0.0D0 - r_tf_inboard_mid = 0.0D0 - r_tf_inboard_out = 0.0D0 - r_tf_outboard_mid = 0.0D0 - i_r_cp_top = 0 - r_cp_top = 0.0D0 - f_r_cp = 1.4D0 - dr_tf_inner_bore = 0.0D0 - dh_tf_inner_bore = 0.0D0 - dr_fw_plasma_gap_inboard = 0.14D0 - dr_fw_plasma_gap_outboard = 0.15D0 - sharea = 0.0D0 - shareaib = 0.0D0 - shareaob = 0.0D0 - dr_shld_inboard = 0.69D0 - dz_shld_lower = 0.7D0 - dr_shld_outboard = 1.05D0 - dz_shld_upper = 0.6D0 - sigallpc = 3.0D8 - dr_tf_inboard = 0.0D0 - tfoffset = 0.0D0 - tfootfi = 1.19D0 - dr_tf_outboard = 0.0D0 - dr_tf_shld_gap = 0.05D0 - dr_shld_thermal_inboard = 0.05D0 - dr_shld_thermal_outboard = 0.05D0 - dz_shld_thermal = 0.05D0 - dz_shld_vv_gap = 0.163D0 - dz_xpoint_divertor= 0.0D0 - dz_fw_plasma_gap = 0.60D0 - dr_shld_blkt_gap = 0.05D0 - plleni = 1.0D0 - plleno = 1.0D0 - plsepi = 1.0D0 - plsepo = 1.5D0 - rspo = 0.0D0 - r_sh_inboard_in = 0.0D0 - z_plasma_xpoint_upper = 0.0D0 - z_plasma_xpoint_lower = 0.0D0 - end subroutine init_build_variables end module build_variables diff --git a/source/fortran/buildings_variables.f90 b/source/fortran/buildings_variables.f90 index 07340fea96..9405bc5f3f 100644 --- a/source/fortran/buildings_variables.f90 +++ b/source/fortran/buildings_variables.f90 @@ -308,169 +308,4 @@ module buildings_variables real(dp) :: a_security_bldg !! Floor area of security building in m^2 - - - contains - - subroutine init_buildings_variables - !! Initialise buildings variables - implicit none - - admv = 1.0D5 - admvol = 0.0D0 - aux_build_l = 60.0D0 - aux_build_w = 30.0D0 - aux_build_h = 5.0D0 - auxcool_l = 20.0D0 - auxcool_w = 20.0D0 - auxcool_h = 5.0D0 - bioshld_thk = 2.50D0 - chemlab_l = 50.0D0 - chemlab_w = 30.0D0 - chemlab_h = 6.0D0 - dz_tf_cryostat = 2.5D0 - clh2 = 15.0D0 - control_buildings_l = 80.0D0 - control_buildings_w = 60.0D0 - control_buildings_h = 6.0D0 - conv = 6.0D4 - convol = 0.0D0 - crane_arm_h = 10.0D0 - crane_clrnc_h = 4.0D0 - crane_clrnc_v = 3.0D0 - cryomag_l = 120.0D0 - cryomag_w = 90.0D0 - cryomag_h = 5.0D0 - cryostore_l = 160.0D0 - cryostore_w = 30.0D0 - cryostore_h = 20.0D0 - cryostat_clrnc = 2.5D0 - cryvol = 0.0D0 - efloor = 0.0D0 - elecdist_l = 380.0D0 - elecdist_w = 350.0D0 - elecdist_h = 5.0D0 - elecload_l = 100.0D0 - elecload_w = 90.0D0 - elecload_h = 3.0D0 - elecstore_l = 100.0D0 - elecstore_w = 60.0D0 - elecstore_h = 12.0D0 - elevol = 0.0D0 - esbldgm3 = 1.0D3 - fc_building_l = 60.0D0 - fc_building_w = 60.0D0 - fndt = 2.0D0 - gas_buildings_l = 25.0D0 - gas_buildings_w = 15.0D0 - gas_buildings_h = 5.0D0 - ground_clrnc = 5.0D0 - hcd_building_l = 70.0D0 - hcd_building_w = 40.0D0 - hcd_building_h = 25.0D0 - hw_storage_l = 20.0D0 - hw_storage_w = 10.0D0 - hw_storage_h = 5.0D0 - heat_sink_l = 160.0D0 - heat_sink_w = 80.0D0 - heat_sink_h = 12.0D0 - hccl = 5.0D0 - hcwt = 1.5D0 - hot_sepdist = 2.0D0 - hotcell_h = 12.0D0 - i_bldgs_size = 0 - i_bldgs_v = 0 - ilw_smelter_l = 50.0D0 - ilw_smelter_w = 30.0D0 - ilw_smelter_h = 30.0D0 - ilw_storage_l = 120.0D0 - ilw_storage_w = 100.0D0 - ilw_storage_h = 8.0D0 - llw_storage_l = 45.0D0 - llw_storage_w = 20.0D0 - llw_storage_h = 5.0D0 - magnet_pulse_l = 105.0D0 - magnet_pulse_w = 40.0D0 - magnet_pulse_h = 5.0D0 - magnet_trains_l = 120.0D0 - magnet_trains_w = 90.0D0 - magnet_trains_h = 5.0D0 - maint_cont_l = 125.0D0 - maint_cont_w = 100.0D0 - maint_cont_h = 6.0D0 - mbvfac = 2.8D0 - nbi_sys_l = 225.0D0 - nbi_sys_w = 185.0D0 - pfbldgm3 = 2.0D4 - pibv = 2.0D4 - qnty_sfty_fac = 2.0D0 - rbvfac = 1.6D0 - rbrt = 1.0D0 - rbvol = 0.0D0 - rbwt = 2.0D0 - reactor_clrnc = 4.0D0 - reactor_fndtn_thk = 2.0D0 - reactor_hall_l = 0.0D0 - reactor_hall_w = 0.0D0 - reactor_hall_h = 0.0D0 - reactor_roof_thk = 1.0D0 - reactor_wall_thk = 2.0D0 - rmbvol = 0.0D0 - robotics_l = 50.0D0 - robotics_w = 30.0D0 - robotics_h = 30.0D0 - row = 4.0D0 - rxcl = 4.0D0 - sec_buildings_l = 30.0D0 - sec_buildings_w = 25.0D0 - sec_buildings_h = 6.0D0 - shmf = 0.5D0 - shov = 1.0D5 - shovol = 0.0D0 - staff_buildings_h = 5.0D0 - staff_buildings_area = 4.8D5 - stcl = 3.0D0 - tfcbv = 2.0D4 - transp_clrnc = 1.0D0 - trcl = 1.0D0 - triv = 4.0D4 - turbine_hall_l = 109.0D0 - turbine_hall_w = 62.0D0 - turbine_hall_h = 15.0D0 - tw_storage_l = 90.0D0 - tw_storage_w = 30.0D0 - tw_storage_h = 5.0D0 - volnucb = 0.0D0 - volrci = 0.0D0 - warm_shop_l = 100.0D0 - warm_shop_w = 50.0D0 - warm_shop_h = 10.0D0 - water_buildings_l = 110.0D0 - water_buildings_w = 10.0D0 - water_buildings_h = 5.0D0 - workshop_l = 150.0D0 - workshop_w = 125.0D0 - workshop_h = 10.0D0 - wgt = 5.0D5 - wgt2 = 1.0D5 - wrbi = 0.0D0 - wsvfac = 1.9D0 - wsvol = 0.0D0 - - a_reactor_bldg = 8.32D3 - a_ee_ps_bldg = 2.133D4 - a_aux_services_bldg = 1.0D3 - a_hot_cell_bldg = 8.43D3 - a_reactor_service_bldg = 2.44D3 - a_service_water_bldg = 1.567D3 - a_fuel_handling_bldg = 1.67D3 - a_control_room_bldg = 2.88D3 - a_ac_ps_bldg = 6.423D3 - a_admin_bldg = 2.5674D4 - a_site_service_bldg = 8.3D3 - a_cryo_inert_gas_bldg = 1.838D4 - a_security_bldg = 4.552D3 - - end subroutine init_buildings_variables - end module buildings_variables diff --git a/source/fortran/cost_variables.f90 b/source/fortran/cost_variables.f90 index 653991eaee..12109e5181 100644 --- a/source/fortran/cost_variables.f90 +++ b/source/fortran/cost_variables.f90 @@ -617,167 +617,4 @@ module cost_variables real(dp), dimension(4) :: ucwst !! cost of waste disposal (M$/y/1200MW) - - contains - - subroutine init_cost_variables - !! Initialise cost variables - implicit none - - abktflnc = 5.0D0 - adivflnc = 7.0D0 - blkcst = 0.0D0 - c221 = 0.0D0 - c222 = 0.0D0 - capcost = 0.0D0 - cconfix = 80.0D0 - cconshpf = 70.0D0 - cconshtf = 75.0D0 - cdcost = 0.0D0 - cdirt = 0.0D0 - cdrlife = 0.0D0 - cdrlife_cal = 0.0D0 - cfactr = 0.75D0 - cpfact = 0.0D0 - cfind = (/0.244D0, 0.244D0, 0.244D0, 0.29D0/) - cland = 19.2D0 - coe = 0.0D0 - coecap = 0.0D0 - coefuelt = 0.0D0 - coeoam = 0.0D0 - concost = 0.0D0 - costexp = 0.8D0 - costexp_pebbles = 0.6D0 - cost_factor_buildings = 1.0D0 - cost_factor_land = 1.0D0 - cost_factor_tf_coils = 1.0D0 - cost_factor_fwbs = 1.0D0 - cost_factor_rh = 1.0D0 - cost_factor_vv = 1.0D0 - cost_factor_bop = 1.0D0 - cost_factor_misc = 1.0D0 - maintenance_fwbs = 0.2D0 - maintenance_gen = 0.05D0 - amortization = 13.6D0 - cost_model = 1 - cowner = 0.15D0 - cplife = 0.0D0 - cplife_cal = 0.0D0 - cpstcst = 0.0D0 - cpstflnc = 10.0D0 - crctcore = 0.0D0 - csi = 16.0D0 - cturbb = 38.0D0 - decomf = 0.1D0 - dintrt = 0.0D0 - divcst = 0.0D0 - divlife = 0.0D0 - divlife_cal = 0.0D0 - dtlife = 0.0D0 - fcap0 = 1.165D0 - fcap0cp = 1.08D0 - fcdfuel = 0.1D0 - fcontng = 0.195D0 - fcr0 = 0.0966D0 - fkind = 1.0D0 - fwallcst = 0.0D0 - iavail= 2 - ibkt_life = 0 - life_dpa = 50 - bktcycles = 1.0D3 - avail_min = 0.75D0 - tok_build_cost_per_vol = 1283.0D0 - light_build_cost_per_vol = 270.0D0 - favail = 1.0D0 - num_rh_systems = 4 - conf_mag = 0.99D0 - div_prob_fail = 0.0002D0 - div_umain_time = 0.25D0 - div_nref = 7000.0D0 - div_nu = 14000.0D0 - fwbs_nref = 20000.0D0 - fwbs_nu = 40000.0D0 - fwbs_prob_fail = 0.0002D0 - fwbs_umain_time = 0.25D0 - redun_vacp = 25.0D0 - redun_vac = 0 - t_operation = 0.0D0 - tbktrepl = 0.5D0 - tcomrepl = 0.5D0 - tdivrepl = 0.25D0 - uubop = 0.02D0 - uucd = 0.02D0 - uudiv = 0.04D0 - uufuel = 0.02D0 - uufw = 0.04D0 - uumag = 0.02D0 - uuves = 0.04D0 - ifueltyp = 0 - ipnet = 0 - ireactor = 1 - lsa = 4 - moneyint = 0.0D0 - output_costs = 1 - discount_rate = 0.0435D0 - startupratio = 1.0 - startuppwr = 0.0 - tlife = 30.0D0 - ucblbe = 260.0D0 - ucblbreed = 875.0D0 - ucblli = 875.0D0 - ucblli2o = 600.0D0 - ucbllipb = 10.3D0 - ucblss = 90.0D0 - ucblvd = 200.0D0 - ucbus = 0.123D0 - uccase = 50.0D0 - uccpcl1 = 250.0D0 - uccpclb = 150.0D0 - uccry = 9.3D4 - uccryo = 32.0D0 - uccu = 75.0D0 - ucdiv = 2.8D5 - ucech = 3.0D0 - ucf1 = 2.23D7 - ucfnc = 35.0D0 - ucfuel = 3.45D0 - uche3 = 1.0D6 - uchrs = 87.9D6 - uchts = (/15.3D0, 19.1D0/) - uciac = 1.5D8 - ucich = 3.0D0 - uclh = 3.3D0 - ucme = 1.25D8 - ucmisc = 2.5D7 - ucnbi = 3.3D0 - ucoam = (/68.8D0, 68.8D0, 68.8D0, 74.4D0/) - ucpens = 32.0D0 - ucpfb = 210.0D0 - ucpfbk = 1.66D4 - ucpfbs = 4.9D3 - ucpfcb = 7.5D4 - ucpfdr1 = 150.0D0 - ucpfic = 1.0D4 - ucpfps = 3.5D4 - ucrb = 400.0D0 - ucsc = & - (/600.0D0, 600.0D0, 300.0D0, 600.0D0, 600.0D0, 600.0D0, 300.0D0, 1200.0D0, & - 1200.0D0/) - sc_mat_cost_0 = & - (/4.8D0, 2.0D0, 1.0D0, 4.8D0, 4.8D0, 47.4D0, 1.0D0, 47.4D0, 47.4D0/) - supercond_cost_model = 0 - ucshld = 32.0D0 - uctfbr = 1.22D0 - uctfbus = 100.0D0 - uctfps = 24.0D0 - uctfsw = 1.0D0 - ucturb = (/230.0D6, 245.0D6/) - ucwindpf = 465.0D0 - ucwindtf = 480.0D0 - ucwst = (/0.0D0, 3.94D0, 5.91D0, 7.88D0/) - u_unplanned_cp = 0.0 - i_cp_lifetime = 0 - cplife_input = 2.0D0 - - end subroutine init_cost_variables end module cost_variables diff --git a/source/fortran/current_drive_variables.f90 b/source/fortran/current_drive_variables.f90 index 5818527958..e48a142d1d 100644 --- a/source/fortran/current_drive_variables.f90 +++ b/source/fortran/current_drive_variables.f90 @@ -246,77 +246,4 @@ module current_drive_variables real(dp) :: tbeamin !! permitted neutral beam e-decay lengths to plasma centre - - contains - - subroutine init_current_drive_variables - !! Initialise module variables - implicit none - - beamwd = 0.58D0 - bigq = 0.0D0 - bootstrap_current_fraction = 0.0D0 - bootstrap_current_fraction_max = 0.9D0 - bscf_iter89 = 0.0D0 - bscf_nevins = 0.0D0 - bscf_sauter = 0.0D0 - bscf_wilson = 0.0D0 - bscf_sakai = 0.0D0 - bscf_aries = 0.0D0 - bscf_andrade = 0.0D0 - bscf_hoang = 0.0D0 - bscf_wong = 0.0D0 - bscf_gi_I = 0.0D0 - bscf_gi_II = 0.0D0 - cboot = 1.0D0 - beam_current = 0.0D0 - diacf_hender = 0.0D0 - diacf_scene = 0.0D0 - diamagnetic_current_fraction = 0.0D0 - echpwr = 0.0D0 - echwpow = 0.0D0 - effcd = 0.0D0 - harnum = 2.0 - wave_mode = 0 - beam_energy = 1.0D3 - etacd = 0.0D0 - etacdfix = 0.0D0 - etaech = 0.3D0 - etalh = 0.3D0 - etanbi = 0.3D0 - fpion = 0.5D0 - pnbitot = 0.0D0 - pscf_scene = 0.0D0 - nbshinemw = 0.0D0 - feffcd = 1.0D0 - forbitloss = 0.0D0 - frbeam = 1.05D0 - f_tritium_beam = 1.0D-6 - gamcd = 0.0D0 - gamma_ecrh = 0.35D0 - xi_ebw = 0.8D0 - iefrf = 5 - iefrffix = 0 - irfcd = 1 - nbshinef = 0.0D0 - nbshield = 0.5D0 - pheat = 0.0D0 - pheatfix = 0.0D0 - pinjalw = 150.0D0 - pinjemw = 0.0D0 - pinjimw = 0.0D0 - pinjmw = 0.0D0 - pinjfixmw = 0.0D0 - plasma_current_internal_fraction = 0.0D0 - plhybd = 0.0D0 - pnbeam = 0.0D0 - porbitlossmw = 0.0D0 - ps_current_fraction = 0.0D0 - pwplh = 0.0D0 - pwpnb = 0.0D0 - rtanbeam = 0.0D0 - rtanmax = 0.0D0 - taubeam = 0.0D0 - tbeamin = 3.0D0 - end subroutine init_current_drive_variables end module current_drive_variables diff --git a/source/fortran/dcll.f90 b/source/fortran/dcll.f90 index 3ae15a928e..2fdcf4a531 100644 --- a/source/fortran/dcll.f90 +++ b/source/fortran/dcll.f90 @@ -116,52 +116,4 @@ module dcll_module !! Total mass for an inboard/outboard reactor segment [kg] real(dp) :: mass_segm_ib, mass_segm_ob -contains - - !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - subroutine init_dcll_module - - !! Initialise module variables !!! - - implicit none - - r_fci = 0.0 - r_backwall = 0.0 - bz_r_ib = 0.0 - bz_r_ob = 0.0 - f_vol_stff_plates = 0.0 - f_vol_stl_bz_struct = 0.0 - f_vol_stl_back_wall = 0.0 - f_vol_stl_fw = 0.0 - f_vol_mfbss_stl = 0.0 - f_vol_mfbss_he = 0.0 - f_vol_mfbss_pbli = 0.0 - vol_fci = 0.0 - vol_bz_struct = 0.0 - vol_bz_liq = 0.0 - vol_bz_liq_ib = 0.0 - vol_bz_liq_ob = 0.0 - vol_bw = 0.0 - vol_bss = 0.0 - wht_cer = 0.0 - wht_stl_struct = 0.0 - wht_cool_struct = 0.0 - wht_bw_stl = 0.0 - wht_bw_cool = 0.0 - wht_mfbss_stl = 0.0 - wht_mfbss_cool = 0.0 - wht_mfbss_pbli = 0.0 - fwmass_stl = 0.0 - fwmass_cool = 0.0 - mass_cool_blanket = 0.0 - mass_liq_blanket = 0.0 - mass_stl_blanket = 0.0 - mass_segm_ib = 0.0 - mass_segm_ob = 0.0 - - end subroutine init_dcll_module - - !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - end module dcll_module diff --git a/source/fortran/divertor_variables.f90 b/source/fortran/divertor_variables.f90 index 654b5fd1c5..9a35dc875e 100644 --- a/source/fortran/divertor_variables.f90 +++ b/source/fortran/divertor_variables.f90 @@ -82,32 +82,7 @@ module divertor_variables real(dp) :: xpertin !! perpendicular heat transport coefficient (m2/s) - contains - - subroutine init_divertor_variables - !! Initialise divertor_variables - implicit none - - anginc = 0.262D0 - beta_div = 1.0D0 - betai = 1.0D0 - betao = 1.0D0 - divclfr = 0.3D0 - divdens = 1.0D4 - dz_divertor = 0.2D0 - divmas = 0.0D0 - divplt = 0.035D0 - divsur = 0.0D0 - fdiva = 1.11D0 - flux_exp = 2.0D0 - hldiv = 0.0D0 - i_hldiv = 2 - hldivlim = 5.0D0 - prn1 = 0.285D0 - rconl = 0.0D0 - rsrd = 0.0D0 - tconl = 0.0D0 - tdiv = 2.0D0 - xpertin = 2.0D0 - end subroutine init_divertor_variables + real(dp) :: zeffdiv + !! Zeff in the divertor region (if `divdum/=0`) + end module divertor_variables diff --git a/source/fortran/fwbs_variables.f90 b/source/fortran/fwbs_variables.f90 index bf97b8779c..158c22bb50 100644 --- a/source/fortran/fwbs_variables.f90 +++ b/source/fortran/fwbs_variables.f90 @@ -638,203 +638,4 @@ module fwbs_variables integer :: bzfllengi_n_rad_liq, bzfllengi_n_pol_liq, bzfllengo_n_rad_liq, bzfllengo_n_pol_liq !! Number of radial and poloidal sections that make up the total secondary coolant/breeder !! flow length in a blanket module (IB and OB) - - contains - - subroutine init_fwbs_variables - !! Initialise fwbs variables - implicit none - - life_blkt_fpy = 0.0D0 - life_blkt = 0.0D0 - m_fw_blkt_div_coolant_total = 0.0D0 - m_vv = 0.0D0 - denstl = 7800.0D0 - denwc = 15630.0D0 - dewmkg = 0.0D0 - emult = 1.269D0 - emultmw = 0.0D0 - fblss = 0.09705D0 - f_ster_div_single = 0.115D0 - f_a_fw_hcd = 0.0D0 - fhole = 0.0D0 - i_fw_blkt_vv_shape = 2 - life_fw_fpy = 0.0D0 - m_fw_total = 0.0D0 - fw_armour_mass = 0.0D0 - fw_armour_thickness = 0.005D0 - fw_armour_vol = 0.0D0 - i_blanket_type = 1 - i_blkt_inboard = 1 - inuclear = 0 - qnuc = 0.0D0 - f_blkt_li6_enrichment = 30.0D0 - p_blkt_nuclear_heat_total_mw = 0.0D0 - p_div_nuclear_heat_total_mw = 0.0D0 - p_fw_nuclear_heat_total_mw = 0.0D0 - p_fw_hcd_nuclear_heat_mw = 0.0D0 - pnucloss = 0.0D0 - pnucvvplus = 0.0D0 - pnucshld = 0.0D0 - m_blkt_total = 0.0D0 - m_blkt_steel_total = 0.0D0 - armour_fw_bl_mass = 0.0D0 - breeder_f = 0.5D0 - breeder_multiplier = 0.75D0 - vfcblkt = 0.05295D0 - vfpblkt = 0.1D0 - m_blkt_li4sio4 = 0.0D0 - m_blkt_tibe12 = 0.0D0 - f_neut_shield = -1.0D0 - f_a_fw_coolant_inboard = 0.0D0 - f_a_fw_coolant_outboard = 0.0D0 - psurffwi = 0.0D0 - psurffwo = 0.0D0 - vol_fw_total = 0.0D0 - f_vol_blkt_steel = 0.0D0 - f_vol_blkt_li4sio4 = 0.0D0 - f_vol_blkt_tibe12 = 0.0D0 - breedmat = 1 - densbreed = 0.0D0 - fblbe = 0.6D0 - fblbreed = 0.154D0 - fblhebmi = 0.4D0 - fblhebmo = 0.4D0 - fblhebpi = 0.6595D0 - fblhebpo = 0.6713D0 - hcdportsize = 1 - nflutf = 0.0D0 - npdiv = 2 - nphcdin = 2 - nphcdout = 2 - tbr = 0.0D0 - tritprate = 0.0D0 - wallpf = 1.21D0 - whtblbreed = 0.0D0 - m_blkt_beryllium = 0.0D0 - i_coolant_pumping = 2 - i_shield_mat = 0 - i_thermal_electric_conversion = 0 - secondary_cycle_liq = 4 - i_blkt_coolant_type = 1 - i_fw_coolant_type = 'helium' - dr_fw_wall = 0.003D0 - radius_fw_channel = 0.006D0 - dx_fw_module = 0.02D0 - temp_fw_coolant_in = 573.0D0 - temp_fw_coolant_out = 823.0D0 - pres_fw_coolant = 15.5D6 - temp_fw_peak = 873.0D0 - roughness = 1.0D-6 - len_fw_channel = 4.0D0 - f_fw_peak = 1.0D0 - pres_blkt_coolant = 15.50D6 - temp_blkt_coolant_in = 573.0D0 - temp_blkt_coolant_out = 823.0D0 - coolp = 15.5D6 - n_blkt_outboard_modules_poloidal = 8 - n_blkt_inboard_modules_poloidal = 7 - n_blkt_outboard_modules_toroidal = 48 - n_blkt_inboard_modules_toroidal = 32 - temp_fw_max = 823.0D0 - fw_th_conductivity = 28.34D0 - fvoldw = 1.74D0 - fvolsi = 1.0D0 - fvolso = 0.64D0 - fwclfr = 0.15D0 - p_div_rad_total_mw = 0.0D0 - p_fw_rad_total_mw = 0.0D0 - p_fw_hcd_rad_total_mw = 0.0D0 - pradloss = 0.0D0 - ptfnuc = 0.0D0 - ptfnucpm3 = 0.0D0 - r_cryostat_inboard = 0.0D0 - z_cryostat_half_inside = 0.0D0 - dr_pf_cryostat = 0.5D0 - vol_cryostat = 0.0D0 - vol_cryostat_internal = 0.0D0 - vol_vv = 0.0D0 - vfshld = 0.25D0 - vol_blkt_total = 0.0D0 - vol_blkt_inboard = 0.0D0 - vol_blkt_outboard = 0.0D0 - volshld = 0.0D0 - whtshld = 0.0D0 - wpenshld = 0.0D0 - wtshldi = 0.0D0 - wtshldo = 0.0D0 - irefprop = 1 - fblli = 0.0D0 - fblli2o = 0.08D0 - fbllipb = 0.68D0 - fblvd = 0.0D0 - m_blkt_li2o = 0.0D0 - wtbllipb = 0.0D0 - m_blkt_vanadium = 0.0D0 - m_blkt_lithium = 0.0D0 - vfblkt = 0.25D0 - blktmodel = 0 - declblkt = 0.075D0 - declfw = 0.075D0 - declshld = 0.075D0 - blkttype = 3 - etaiso = 0.85D0 - etahtp = 0.95D0 - pnuc_cp = 0.0D0 - pnuc_cp_sh = 0.0D0 - pnuc_cp_tf = 0.0D0 - neut_flux_cp = 0.0D0 - i_fw_blkt_shared_coolant = 0 - i_blkt_liquid_breeder_type = 0 - i_blkt_dual_coolant = 0 - i_blkt_liquid_breeder_channel_type = 0 - ims = 0 - n_liq_recirc = 10 - r_f_liq_ib=0.5 - r_f_liq_ob=0.5 - w_f_liq_ib=0.5 - w_f_liq_ob=0.5 - den_ceramic = 3.21D3 - th_wall_secondary = 1.25D-2 - bz_channel_conduct_liq = 8.33D5 - a_bz_liq = 0.2D0 - b_bz_liq = 0.2D0 - nopol = 2 - nopipes = 4 - den_liq = 9.5D3 - specific_heat_liq = 1.9D2 - thermal_conductivity_liq = 30.0 - wht_liq = 0.0D0 - wht_liq_ib = 0.0D0 - wht_liq_ob = 0.0D0 - dynamic_viscosity_liq = 0.0D0 - electrical_conductivity_liq = 0.0D0 - hartmann_liq = (0.0D0, 0.0D0) - b_mag_blkt = (5.0D0, 5.0D0) - etaiso_liq = 0.85D0 - blpressure_liq = 1.7D6 - inlet_temp_liq = 570.0D0 - outlet_temp_liq = 720.0D0 - den_fw_coolant = 0.0D0 - visc_fw_coolant = 0.0D0 - den_blkt_coolant = 0.0D0 - visc_blkt_coolant = 0.0D0 - cp_fw = 0.0D0 - cv_fw = 0.0D0 - cp_bl = 0.0D0 - cv_bl = 0.0D0 - f_nuc_pow_bz_struct = 0.34D0 - f_nuc_pow_bz_liq = 0.66D0 - pnuc_fw_ratio_dcll = 0.14D0 - pnuc_blkt_ratio_dcll = 0.86D0 - bzfllengi_n_rad = 4 - bzfllengi_n_pol = 2 - bzfllengo_n_rad = 4 - bzfllengo_n_pol = 2 - bzfllengi_n_rad_liq = 2 - bzfllengi_n_pol_liq = 2 - bzfllengo_n_rad_liq = 2 - bzfllengo_n_pol_liq = 2 - - end subroutine init_fwbs_variables end module fwbs_variables diff --git a/source/fortran/hcpb.f90 b/source/fortran/hcpb.f90 index 59cd64257a..5c40939267 100644 --- a/source/fortran/hcpb.f90 +++ b/source/fortran/hcpb.f90 @@ -16,9 +16,6 @@ module ccfe_hcpb_module implicit none - ! Variables for output to file - integer :: ip, ofile - ! Smeared densities of build sections real(dp) :: armour_density !! FW armour density [kg/m3] @@ -55,28 +52,4 @@ module ccfe_hcpb_module real(dp) :: exp_blanket, exp_shield1, exp_shield2 !! Exponential factors in nuclear heating calcs - -contains - - subroutine init_ccfe_hcpb_module - !! Initialise module variables - implicit none - - ip = 0 - ofile = 0 - armour_density = 0.0D0 - fw_density = 0.0D0 - blanket_density = 0.0D0 - shield_density = 0.0D0 - vv_density = 0.0D0 - x_blanket = 0.0D0 - x_shield = 0.0D0 - tfc_nuc_heating = 0.0D0 - fw_armour_u_nuc_heating = 0.0D0 - shld_u_nuc_heating = 0.0D0 - exp_blanket = 0.0D0 - exp_shield1 = 0.0D0 - exp_shield2 = 0.0D0 - end subroutine init_ccfe_hcpb_module - end module ccfe_hcpb_module diff --git a/source/fortran/heat_transport_variables.f90 b/source/fortran/heat_transport_variables.f90 index d054a5bb56..04781a0d27 100644 --- a/source/fortran/heat_transport_variables.f90 +++ b/source/fortran/heat_transport_variables.f90 @@ -183,64 +183,4 @@ module heat_transport_variables real(dp) :: vachtmw !! vacuum pump power (MW) - - contains - - subroutine init_heat_transport_variables - !! Initialise module variables - implicit none - - baseel = 5.0D6 - crypmw = 0.0D0 - crypmw_max = 50.0D0 - f_crypmw = 1.0D0 - etatf = 0.9D0 - etath = 0.35D0 - etath_liq = 0.35D0 - fachtmw = 0.0D0 - fcsht = 0.0D0 - fgrosbop = 0.0D0 - fmgdmw = 0.0D0 - fpumpblkt = 0.005D0 - fpumpdiv = 0.005D0 - fpumpfw = 0.005D0 - fpumpshld = 0.005D0 - htpmw_min = 0.0D0 - helpow = 0.0D0 - helpow_cryal = 0.0D0 - htpmw = 0.0D0 - htpmw_blkt = 0.0D0 - htpmw_blkt_liq = 0.0D0 - htpmw_blkt_tot = 0.0D0 - htpmw_div = 0.0D0 - htpmw_fw = 0.0D0 - htpmw_shld = 0.0D0 - htpsecmw = 0.0D0 - ipowerflow = 1 - iprimshld = 1 - nphx = 0 - pacpmw = 0.0D0 - peakmva = 0.0D0 - pfwdiv = 0.0D0 - pgrossmw = 0.0D0 - pinjht = 0.0D0 - pinjmax = 120.0D0 - pinjwp = 0.0D0 - pinjwpfix = 0.0D0 - pnetelmw = 0.0D0 - precircmw = 0.0D0 - priheat = 0.0D0 - psecdiv = 0.0D0 - psechcd = 0.0D0 - psechtmw = 0.0D0 - pseclossmw = 0.0D0 - psecshld = 0.0D0 - pthermmw = 0.0D0 - pwpm2 = 150.0D0 - tfacpd = 0.0D0 - tlvpmw = 0.0D0 - trithtmw = 15.0D0 - tturb = 0.0D0 - vachtmw = 0.5D0 - end subroutine init_heat_transport_variables end module heat_transport_variables diff --git a/source/fortran/ife_variables.f90 b/source/fortran/ife_variables.f90 index fe15297bf6..be6c1c81a2 100644 --- a/source/fortran/ife_variables.f90 +++ b/source/fortran/ife_variables.f90 @@ -392,185 +392,4 @@ module ife_variables real(dp) :: zu7 !! IFE vertical build above centre (m) - - contains - - subroutine init_ife_variables - !! Initialise module variables - implicit none - - bldr = 1.0D0 - bldrc = 1.0D0 - bldzl = 4.0D0 - bldzu = 4.0D0 - blmatf = reshape( (/ & - 0.05D0,0.05D0,0.05D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.45D0,0.45D0,0.45D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.20D0,0.20D0,0.20D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.30D0,0.30D0,0.30D0, & - 0.0D0,0.0D0,0.0D0, & - 0.0D0, 0.0D0, 0.0D0 /), shape(blmatf)) - blmatm = 0.0D0 - blmatv = 0.0D0 - blvol = 0.0D0 - cdriv0 = 154.3D0 - cdriv1 = 163.2D0 - cdriv2 = 244.9D0 - cdriv3 = 1.463D0 - chdzl = 9.0D0 - chdzu = 9.0D0 - chmatf = & - (/1.0D0,0.0D0,0.0D0,0.0D0,0.0D0,0.0D0,0.0D0,0.0D0,0.0D0/) - chmatm = 0.0D0 - chmatv = 0.0D0 - chrad = 6.5D0 - chvol = 0.0D0 - dcdrv0 = 111.4D0 - dcdrv1 = 78.0D0 - dcdrv2 = 59.9D0 - drveff = 0.28D0 - edrive = 5.0D6 - etadrv = 0.0D0 - etali = 0.4D0 - etave = (/ & - 0.082D0,0.079D0,0.076D0,0.073D0,0.069D0, & - 0.066D0,0.062D0,0.059D0,0.055D0,0.051D0 /) - fauxbop = 0.06D0 - fbreed = 0.51D0 - fburn = 0.3333D0 - flirad = 0.78D0 - frrmax = 1.0D0 - fwdr = 0.01D0 - fwdzl = 0.01D0 - fwdzu = 0.01D0 - fwmatf = reshape( (/ & - 0.05D0,0.05D0,0.05D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.95D0,0.95D0,0.95D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0 /), shape(fwmatf)) - fwmatm = 0.0D0 - fwmatv = 0.0D0 - fwvol = 0.0D0 - gain = 0.0D0 - gainve = (/ & - 60.0D0, 95.0D0,115.0D0,125.0D0,133.0D0, & - 141.0D0,152.0D0,160.0D0,165.0D0,170.0D0 /) - htpmw_ife = 0.0D0 - ife = 0 - ifedrv = 2 - ifetyp = 0 - lipmw = 0.0D0 - mcdriv = 1.0D0 - mflibe = 0.0D0 - pdrive = 23.0D6 - pfusife = 1000.0D0 - pifecr = 10.0D0 - ptargf = 2.0D0 - r1 = 0.0D0 - r2 = 0.0D0 - r3 = 0.0D0 - r4 = 0.0D0 - r5 = 0.0D0 - r6 = 0.0D0 - r7 = 0.0D0 - reprat = 0.0D0 - rrin = 6.0D0 - rrmax = 20.0D0 - shdr = 1.7D0 - shdzl = 5.0D0 - shdzu = 5.0D0 - shmatf = reshape( (/ & - 0.05D0,0.05D0,0.05D0, & - 0.19D0,0.19D0,0.19D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.665D0,0.665D0,0.665D0, & - 0.095D0,0.095D0,0.095D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0 /), shape(shmatf)) - shmatm = 0.0D0 - shmatv = 0.0D0 - shvol = 0.0D0 - sombdr = 2.7D0 - somtdr = 2.7D0 - taufall = 0.0D0 - tdspmw = 0.01D0 - tfacmw = 0.0D0 - tgain = 85.0D0 - uccarb = 50.0D0 - ucconc = 0.1D0 - ucflib = 84.0D0 - uctarg = 0.3D0 - v1dr = 0.0D0 - v1dzl = 0.0D0 - v1dzu = 0.0D0 - v1matf = reshape( (/ & - 1.0D0, 1.0D0, 1.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0 /), shape(v1matf)) - v1matm = 0.0D0 - v1matv = 0.0D0 - v1vol = 0.0D0 - v2dr = 2.0D0 - v2dzl = 7.0D0 - v2dzu = 7.0D0 - v2matf = reshape( (/ & - 1.0D0, 1.0D0, 1.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0 /), shape(v2matf)) - v2matm = 0.0D0 - v2matv = 0.0D0 - v2vol = 0.0D0 - v3dr = 43.3D0 - v3dzl = 30.0D0 - v3dzu = 20.0D0 - v3matf = reshape( (/ & - 1.0D0, 1.0D0, 1.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0, & - 0.0D0, 0.0D0, 0.0D0 /), shape(v3matf)) - v3matm = 0.0D0 - v3matv = 0.0D0 - v3vol = 0.0D0 - zl1 = 0.0D0 - zl2 = 0.0D0 - zl3 = 0.0D0 - zl4 = 0.0D0 - zl5 = 0.0D0 - zl6 = 0.0D0 - zl7 = 0.0D0 - zu1 = 0.0D0 - zu2 = 0.0D0 - zu3 = 0.0D0 - zu4 = 0.0D0 - zu5 = 0.0D0 - zu6 = 0.0D0 - zu7 = 0.0D0 - end subroutine init_ife_variables end module ife_variables diff --git a/source/fortran/impurity_radiation.f90 b/source/fortran/impurity_radiation.f90 index 3b1309b9ed..dc541d8e45 100644 --- a/source/fortran/impurity_radiation.f90 +++ b/source/fortran/impurity_radiation.f90 @@ -21,30 +21,24 @@ module impurity_radiation_module #endif implicit none - private - public :: init_impurity_radiation_module, impurity_arr_amass, impurity_arr_frac, & - impurity_arr_Label,impurity_arr_len_tab, impurity_arr_Lz_Wm3, & - impurity_arr_Temp_keV, impurity_arr_Z, impurity_arr_Zav - - !! (It is recommended to turn on !! constraint eqn.17 with iteration variable 28: fradpwr.) - integer, public, parameter :: n_impurities = 14 + integer, parameter :: n_impurities = 14 !! n_impurities /14/ FIX : number of ion species in impurity radiation model - real(dp), public :: radius_plasma_core_norm + real(dp) :: radius_plasma_core_norm !! radius_plasma_core_norm /0.6/ : normalised radius defining the 'core' region - real(dp), public :: coreradiationfraction + real(dp) :: coreradiationfraction !! coreradiationfraction /1.0/ : fraction of radiation from 'core' region that is subtracted from the loss power !! fimp(n_impurities) /1.0,0.1,0.02,0.0,0.0,0.0,0.0,0.0,0.0016,0.0,0.0,0.0,0.0,0.0/ : !! impurity number density fractions relative to electron density !! - real(dp), public, dimension(n_impurities) :: fimp + real(dp), dimension(n_impurities) :: fimp - character*2, public, dimension(n_impurities) :: imp_label + character*2, dimension(n_impurities) :: imp_label !! imp_label(n_impurities) : impurity ion species names: