diff --git a/documentation/development/standards.md b/documentation/development/standards.md index 3767925f44..203046e27a 100644 --- a/documentation/development/standards.md +++ b/documentation/development/standards.md @@ -362,6 +362,12 @@ This should be used for units of $\text{kg} \cdot \text{m}^{-2}\text{s}^{-1}$ --------------------- +##### Temperature Changes + +- Relative rises or falls in temperatures should start with the `dtemp_` prefix + +--------------------- + ##### Times - Times should start with the `t_` prefix diff --git a/examples/data/large_tokamak_1_MFILE.DAT b/examples/data/large_tokamak_1_MFILE.DAT index 800c14027d..a9059c29c7 100644 --- a/examples/data/large_tokamak_1_MFILE.DAT +++ b/examples/data/large_tokamak_1_MFILE.DAT @@ -7531,7 +7531,7 @@ Resistive_losses_in_current_leads_(MW)___________________________________ (qcl/1 45%_allowance_for_heat_loads_in_transfer_lines,_storage_tanks_etc_(MW)___ (qmisc/1.0d6)__________________ 2.72832586344118472e-02 OP Sum_=_Total_heat_removal_at_cryogenic_temperatures_(temp_tf_cryo_&_tcoolin)_(MW)_ (helpow_+_helpow_cryal/1.0d6)__ 8.79127222664381619e-02 OP Temperature_of_cryogenic_superconducting_components_(K)__________________ (temp_tf_cryo)_________________ 4.50000000000000000e+00 -Temperature_of_cryogenic_aluminium_components_(K)________________________ (tcoolin)______________________ 3.13149999999999977e+02 +Temperature_of_cryogenic_aluminium_components_(K)________________________ (temp_cp_coolant_inlet)______________________ 3.13149999999999977e+02 Electric_power_for_cryogenic_plant_(MW)__________________________________ (p_cryo_plant_electric_mw)_____ 4.33777902259955042e+01 OP # Plant Heat Transport Balance # Neutronic_nuclear_heat_deposited_in_FW_[MW]______________________________ (p_fw_nuclear_heat_total_mw)___ 1.64705228778508570e+02 diff --git a/examples/data/large_tokamak_2_MFILE.DAT b/examples/data/large_tokamak_2_MFILE.DAT index 070ffcd7d2..ac334c29a7 100644 --- a/examples/data/large_tokamak_2_MFILE.DAT +++ b/examples/data/large_tokamak_2_MFILE.DAT @@ -7531,7 +7531,7 @@ Resistive_losses_in_current_leads_(MW)___________________________________ (qcl/1 45%_allowance_for_heat_loads_in_transfer_lines,_storage_tanks_etc_(MW)___ (qmisc/1.0d6)__________________ 2.80915192906149337e-02 OP Sum_=_Total_heat_removal_at_cryogenic_temperatures_(temp_tf_cryo_&_tcoolin)_(MW)_ (helpow_+_helpow_cryal/1.0d6)__ 9.05171177142036903e-02 OP Temperature_of_cryogenic_superconducting_components_(K)__________________ (temp_tf_cryo)_________________ 4.50000000000000000e+00 -Temperature_of_cryogenic_aluminium_components_(K)________________________ (tcoolin)______________________ 3.13149999999999977e+02 +Temperature_of_cryogenic_aluminium_components_(K)________________________ (temp_cp_coolant_inlet)______________________ 3.13149999999999977e+02 Electric_power_for_cryogenic_plant_(MW)__________________________________ (p_cryo_plant_electric_mw)_____ 4.46628479114613484e+01 OP # Plant Heat Transport Balance # Neutronic_nuclear_heat_deposited_in_FW_[MW]______________________________ (p_fw_nuclear_heat_total_mw)___ 1.69539637888681625e+02 diff --git a/examples/data/large_tokamak_3_MFILE.DAT b/examples/data/large_tokamak_3_MFILE.DAT index 7a1893da1c..52c140f02f 100644 --- a/examples/data/large_tokamak_3_MFILE.DAT +++ b/examples/data/large_tokamak_3_MFILE.DAT @@ -7531,7 +7531,7 @@ Resistive_losses_in_current_leads_(MW)___________________________________ (qcl/1 45%_allowance_for_heat_loads_in_transfer_lines,_storage_tanks_etc_(MW)___ (qmisc/1.0d6)__________________ 2.89423603823851655e-02 OP Sum_=_Total_heat_removal_at_cryogenic_temperatures_(temp_tf_cryo_&_tcoolin)_(MW)_ (helpow_+_helpow_cryal/1.0d6)__ 9.32587167876855194e-02 OP Temperature_of_cryogenic_superconducting_components_(K)__________________ (temp_tf_cryo)_________________ 4.50000000000000000e+00 -Temperature_of_cryogenic_aluminium_components_(K)________________________ (tcoolin)______________________ 3.13149999999999977e+02 +Temperature_of_cryogenic_aluminium_components_(K)________________________ (temp_cp_coolant_inlet)______________________ 3.13149999999999977e+02 Electric_power_for_cryogenic_plant_(MW)__________________________________ (p_cryo_plant_electric_mw)_____ 4.60156044457528566e+01 OP # Plant Heat Transport Balance # Neutronic_nuclear_heat_deposited_in_FW_[MW]______________________________ (p_fw_nuclear_heat_total_mw)___ 1.76218051876661121e+02 diff --git a/examples/data/large_tokamak_4_MFILE.DAT b/examples/data/large_tokamak_4_MFILE.DAT index 893fbbc606..9ebc1f2c32 100644 --- a/examples/data/large_tokamak_4_MFILE.DAT +++ b/examples/data/large_tokamak_4_MFILE.DAT @@ -7531,7 +7531,7 @@ Resistive_losses_in_current_leads_(MW)___________________________________ (qcl/1 45%_allowance_for_heat_loads_in_transfer_lines,_storage_tanks_etc_(MW)___ (qmisc/1.0d6)__________________ 2.96747670762382149e-02 OP Sum_=_Total_heat_removal_at_cryogenic_temperatures_(temp_tf_cryo_&_tcoolin)_(MW)_ (helpow_+_helpow_cryal/1.0d6)__ 9.56186939123231522e-02 OP Temperature_of_cryogenic_superconducting_components_(K)__________________ (temp_tf_cryo)_________________ 4.50000000000000000e+00 -Temperature_of_cryogenic_aluminium_components_(K)________________________ (tcoolin)______________________ 3.13149999999999977e+02 +Temperature_of_cryogenic_aluminium_components_(K)________________________ (temp_cp_coolant_inlet)______________________ 3.13149999999999977e+02 Electric_power_for_cryogenic_plant_(MW)__________________________________ (p_cryo_plant_electric_mw)_____ 4.71800615346873045e+01 OP # Plant Heat Transport Balance # Neutronic_nuclear_heat_deposited_in_FW_[MW]______________________________ (p_fw_nuclear_heat_total_mw)___ 1.87203899318251160e+02 diff --git a/examples/data/large_tokamak_nof_2_MFILE.DAT b/examples/data/large_tokamak_nof_2_MFILE.DAT index 5dda240920..da9fff8f32 100644 --- a/examples/data/large_tokamak_nof_2_MFILE.DAT +++ b/examples/data/large_tokamak_nof_2_MFILE.DAT @@ -7416,7 +7416,7 @@ Resistive_losses_in_current_leads_(MW)___________________________________ (qcl/1 45%_allowance_for_heat_loads_in_transfer_lines,_storage_tanks_etc_(MW)___ (qmisc/1.0d6)__________________ 2.76301692454299294e-02 OP Sum_=_Total_heat_removal_at_cryogenic_temperatures_(temp_tf_cryo_&_tcoolin)_(MW)_ (helpow_+_helpow_cryal/1.0d6)__ 8.90305453463853258e-02 OP Temperature_of_cryogenic_superconducting_components_(K)__________________ (temp_tf_cryo)_________________ 4.50000000000000000e+00 -Temperature_of_cryogenic_aluminium_components_(K)________________________ (tcoolin)______________________ 3.13149999999999977e+02 +Temperature_of_cryogenic_aluminium_components_(K)________________________ (temp_cp_coolant_inlet)______________________ 3.13149999999999977e+02 Electric_power_for_cryogenic_plant_(MW)__________________________________ (p_cryo_plant_electric_mw)_____ 4.39293451525369605e+01 OP # Plant Heat Transport Balance # Neutronic_nuclear_heat_deposited_in_FW_[MW]______________________________ (p_fw_nuclear_heat_total_mw)___ 1.74794853452737073e+02 diff --git a/examples/data/large_tokamak_nof_MFILE.DAT b/examples/data/large_tokamak_nof_MFILE.DAT index 1521096d4a..2cb8660cbd 100644 --- a/examples/data/large_tokamak_nof_MFILE.DAT +++ b/examples/data/large_tokamak_nof_MFILE.DAT @@ -7416,7 +7416,7 @@ Resistive_losses_in_current_leads_(MW)___________________________________ (qcl/1 45%_allowance_for_heat_loads_in_transfer_lines,_storage_tanks_etc_(MW)___ (qmisc/1.0d6)__________________ 2.69532623647092545e-02 OP Sum_=_Total_heat_removal_at_cryogenic_temperatures_(temp_tf_cryo_&_tcoolin)_(MW)_ (helpow_+_helpow_cryal/1.0d6)__ 8.68494009529520300e-02 OP Temperature_of_cryogenic_superconducting_components_(K)__________________ (temp_tf_cryo)_________________ 4.50000000000000000e+00 -Temperature_of_cryogenic_aluminium_components_(K)________________________ (tcoolin)______________________ 3.13149999999999977e+02 +Temperature_of_cryogenic_aluminium_components_(K)________________________ (temp_cp_coolant_inlet)______________________ 3.13149999999999977e+02 Electric_power_for_cryogenic_plant_(MW)__________________________________ (p_cryo_plant_electric_mw)_____ 4.28531274958454702e+01 OP # Plant Heat Transport Balance # Neutronic_nuclear_heat_deposited_in_FW_[MW]______________________________ (p_fw_nuclear_heat_total_mw)___ 1.67952135824856697e+02 diff --git a/process/data_structure/heat_transport_variables.py b/process/data_structure/heat_transport_variables.py index b8820eadef..e7c6cc44c7 100644 --- a/process/data_structure/heat_transport_variables.py +++ b/process/data_structure/heat_transport_variables.py @@ -83,7 +83,7 @@ helpow_cryal: float = None -"""Heat removal at cryogenic temperature tcoolin (W)""" +"""Heat removal at cryogenic temperature temp_cp_coolant_inlet (W)""" p_coolant_pump_elec_total_mw: float = None diff --git a/process/data_structure/numerics.py b/process/data_structure/numerics.py index 4bf548f81c..8d8d040b73 100644 --- a/process/data_structure/numerics.py +++ b/process/data_structure/numerics.py @@ -265,8 +265,8 @@ * (66) ft_current_ramp_up (f-value for equation 41) * (67) ft_cycle_min (f-value for equation 42) * (68) fptemp (f-value for equation 44) -* (69) rcool -* (70) vcool +* (69) radius_cp_coolant_channel +* (70) vel_cp_coolant_midplane * (71) fq95_min (f-value for equation 45) * (72) fipir (f-value for equation 46) * (73) dr_fw_plasma_gap_inboard diff --git a/process/data_structure/tfcoil_variables.py b/process/data_structure/tfcoil_variables.py index d1d56ed36f..b78ba4c29d 100644 --- a/process/data_structure/tfcoil_variables.py +++ b/process/data_structure/tfcoil_variables.py @@ -991,7 +991,7 @@ """Centrepost cooling area toroidal cross-section (constant over the whole CP)""" -ncool: float = None +n_cp_coolant_channels_total: float = None """number of centrepost coolant tubes""" @@ -1013,15 +1013,15 @@ """maximum peak centrepost temperature (K) (`constraint equation 44`)""" -rcool: float = None +radius_cp_coolant_channel: float = None """average radius of coolant channel (m) (`iteration variable 69`)""" -tcoolin: float = None +temp_cp_coolant_inlet: float = None """centrepost coolant inlet temperature (K)""" -dtiocool: float = None +dtemp_cp_coolant: float = None """inlet / outlet TF coil coolant temperature rise (K)""" @@ -1046,7 +1046,7 @@ """peak centrepost temperature (K)""" -vcool: float = None +vel_cp_coolant_midplane: float = None """inlet centrepost coolant flow speed at midplane (m/s) (`iteration variable 70`)""" @@ -1281,19 +1281,19 @@ def init_tfcoil_variables(): global fcoolcp global f_a_tf_cool_outboard global a_cp_cool - global ncool + global n_cp_coolant_channels_total global p_cp_coolant_pump_elec global p_cp_resistive global p_tf_leg_resistive global temp_cp_max - global rcool - global tcoolin - global dtiocool + global radius_cp_coolant_channel + global temp_cp_coolant_inlet + global dtemp_cp_coolant global temp_cp_average global tcpav2 global temp_tf_legs_outboard global temp_cp_peak - global vcool + global vel_cp_coolant_midplane global vol_cond_cp global whtcp global whttflgs @@ -1497,6 +1497,7 @@ def init_tfcoil_variables(): whtconal = 0.0 m_tf_coil_wp_turn_insulation = 0.0 m_tf_coil_superconductor = 0.0 + m_tf_wp_steel_conduit = 0.0 m_tf_coil_wp_insulation = 0.0 m_tf_coils_total = 0.0 dx_tf_wp_primary_toroidal = 0.0 @@ -1515,19 +1516,19 @@ def init_tfcoil_variables(): fcoolcp = 0.3 f_a_tf_cool_outboard = 0.2 a_cp_cool = 0.0 - ncool = 0.0 + n_cp_coolant_channels_total = 0.0 p_cp_coolant_pump_elec = 0.0 p_cp_resistive = 0.0 p_tf_leg_resistive = 0.0 temp_cp_max = 473.15 # 200 C - rcool = 0.005 - tcoolin = 313.15 # 40 C - dtiocool = 0.0 + radius_cp_coolant_channel = 0.005 + temp_cp_coolant_inlet = 313.15 # 40 C + dtemp_cp_coolant = 0.0 temp_cp_average = 373.15 # 100 C tcpav2 = 0.0 temp_tf_legs_outboard = -1.0 temp_cp_peak = 0.0 - vcool = 20.0 + vel_cp_coolant_midplane = 20.0 vol_cond_cp = 0.0 whtcp = 0.0 whttflgs = 0.0 diff --git a/process/init.py b/process/init.py index 15b7598cc0..e5b69dc6d5 100644 --- a/process/init.py +++ b/process/init.py @@ -645,10 +645,10 @@ def check_process(inputs): # noqa: ARG001 # Water cooled copper magnets initalisation / checks if data_structure.tfcoil_variables.i_tf_sup == 0: # Check if the initial centrepost coolant loop adapted to the magnet technology - # Ice cannot flow so tcoolin > 273.15 K - if data_structure.tfcoil_variables.tcoolin < 273.15: + # Ice cannot flow so temp_cp_coolant_inlet > 273.15 K + if data_structure.tfcoil_variables.temp_cp_coolant_inlet < 273.15: raise ProcessValidationError( - "Coolant temperature (tcoolin) cannot be < 0 C (273.15 K) for water cooled copper magents" + "Coolant temperature (temp_cp_coolant_inlet) cannot be < 0 C (273.15 K) for water cooled copper magents" ) # Temperature of the TF legs cannot be cooled down @@ -680,9 +680,9 @@ def check_process(inputs): # noqa: ARG001 elif data_structure.tfcoil_variables.i_tf_sup == 2: # Call a lvl 3 error if the inlet coolant temperature is too large # Motivation : ill-defined aluminium resistivity fit for T > 40-50 K - if data_structure.tfcoil_variables.tcoolin > 40.0: + if data_structure.tfcoil_variables.temp_cp_coolant_inlet > 40.0: raise ProcessValidationError( - "Coolant temperature (tcoolin) should be < 40 K for the cryo-al resistivity to be defined" + "Coolant temperature (temp_cp_coolant_inlet) should be < 40 K for the cryo-al resistivity to be defined" ) # Check if the leg average temperature is low enough for the resisitivity fit @@ -701,7 +701,7 @@ def check_process(inputs): # noqa: ARG001 # Otherwise intitialise the average conductor temperature at data_structure.tfcoil_variables.temp_cp_average = ( - data_structure.tfcoil_variables.tcoolin + data_structure.tfcoil_variables.temp_cp_coolant_inlet ) # Check if the boostrap current selection is addapted to ST @@ -1042,7 +1042,7 @@ def check_process(inputs): # noqa: ARG001 data_structure.tfcoil_variables.dx_tf_turn_insulation + data_structure.tfcoil_variables.dx_tf_wp_insulation ) - + 4.0 * data_structure.tfcoil_variables.rcool + + 4.0 * data_structure.tfcoil_variables.radius_cp_coolant_channel ) if data_structure.numerics.boundl[139] < dr_tf_wp_min: diff --git a/process/input.py b/process/input.py index 022b7715ef..5ff0c9c7e3 100644 --- a/process/input.py +++ b/process/input.py @@ -1439,7 +1439,9 @@ def __post_init__(self): data_structure.buildings_variables, float, range=(0.9, 3.0) ), "rbwt": InputVariable(data_structure.buildings_variables, float, range=(0.0, 10.0)), - "rcool": InputVariable(data_structure.tfcoil_variables, float, range=(1e-06, 1.0)), + "radius_cp_coolant_channel": InputVariable( + data_structure.tfcoil_variables, float, range=(1e-06, 1.0) + ), "reactor_clrnc": InputVariable( data_structure.buildings_variables, float, range=(0.0, 10.0) ), @@ -1678,7 +1680,7 @@ def __post_init__(self): data_structure.constraint_variables, float, range=(0.001, 2.0) ), "tcomrepl": InputVariable(data_structure.cost_variables, float, range=(0.01, 2.0)), - "tcoolin": InputVariable( + "temp_cp_coolant_inlet": InputVariable( data_structure.tfcoil_variables, float, range=(4.0, 373.15) ), "tcritsc": InputVariable( @@ -1928,7 +1930,7 @@ def __post_init__(self): "vachtmw": InputVariable( data_structure.heat_transport_variables, float, range=(0.0, 100.0) ), - "vcool": InputVariable( + "vel_cp_coolant_midplane": InputVariable( data_structure.tfcoil_variables, float, range=(0.001, 100.0) ), "v_tf_coil_dump_quench_max_kv": InputVariable( diff --git a/process/io/obsolete_vars.py b/process/io/obsolete_vars.py index 9bf809f51c..32b9e2c010 100644 --- a/process/io/obsolete_vars.py +++ b/process/io/obsolete_vars.py @@ -475,6 +475,9 @@ "tdivrepl": "t_div_replace_yrs", "tlife": "life_plant", "iavail": "i_plant_availability", + "tcoolin": "temp_cp_coolant_inlet", + "vcool": "vel_cp_coolant_midplane", + "rcool": "radius_cp_coolant_channel", } OBS_VARS_HELP = { diff --git a/process/io/plot_proc.py b/process/io/plot_proc.py index 9b951603a2..b7fe8f5cf1 100644 --- a/process/io/plot_proc.py +++ b/process/io/plot_proc.py @@ -2171,7 +2171,7 @@ def plot_main_power_flow( # TF coil power box axis.text( 0.325, - 0.05, + 0.075, f"TF coils:\n{mfile_data.data['p_tf_electric_supplies_mw'].get_scan(scan):.3f} MWe", fontsize=9, verticalalignment="bottom", @@ -2235,7 +2235,7 @@ def plot_main_power_flow( # Recirculated power to TF axis.annotate( "", - xy=(0.35, 0.075), + xy=(0.35, 0.1), xytext=(0.35, 0.1625), xycoords=fig.transFigure, arrowprops={ @@ -6621,6 +6621,36 @@ def plot_resistive_tf_wp(axis, mfile_data, scan: int, fig) -> None: }, ) + # Add info about the Winding Pack + textstr_cooling = ( + f"$\\mathbf{{Cooling \\ info:}}$\n \n" + f"Coolant inlet temperature: {mfile_data.data['temp_cp_coolant_inlet'].get_scan(scan):.2f} K\n" + f"Coolant temperature rise: {mfile_data.data['dtemp_cp_coolant'].get_scan(scan):.2f} K\n" + f"Coolant velocity: {mfile_data.data['vel_cp_coolant_midplane'].get_scan(scan):.2f} $\\mathrm{{ms^{{-1}}}}$\n\n" + f"Average CP temperature: {mfile_data.data['temp_cp_average'].get_scan(scan):.2f} K\n" + f"CP resistivity: {mfile_data.data['rho_cp'].get_scan(scan):.2e} $\\Omega \\mathrm{{m}}$\n" + f"Leg resistivity: {mfile_data.data['rho_tf_leg'].get_scan(scan):.2e} $\\Omega \\mathrm{{m}}$\n" + f"Leg resistance: {mfile_data.data['res_tf_leg'].get_scan(scan):.2e} $\\Omega$\n" + f"CP resistive losses: {mfile_data.data['p_cp_resistive'].get_scan(scan):,.2f} $\\mathrm{{W}}$\n" + f"Leg resistive losses: {mfile_data.data['p_tf_leg_resistive'].get_scan(scan):,.2f} $\\mathrm{{W}}$\n" + f"Joints resistive losses: {mfile_data.data['p_tf_joints_resistive'].get_scan(scan):,.2f} $\\mathrm{{W}}$\n" + ) + axis.text( + 0.55, + 0.35, + textstr_cooling, + fontsize=9, + verticalalignment="top", + horizontalalignment="left", + transform=fig.transFigure, + bbox={ + "boxstyle": "round", + "facecolor": "wheat", + "alpha": 1.0, + "linewidth": 2, + }, + ) + axis.minorticks_on() axis.set_xlim(0.0, r_tf_inboard_out * 1.1) axis.set_ylim((y14[-1] * 1.65), (-y14[-1] * 1.65)) @@ -7851,7 +7881,7 @@ def plot_magnetics_info(axis, mfile_data, scan): (sig_cond, "TF conductor max TRESCA stress", "MPa"), (sig_case, "TF bucking max TRESCA stress", "MPa"), (fcoolcp, "CP cooling fraction", "%"), - ("vcool", "Maximum coolant flow speed", "ms$^{-1}$"), + ("vel_cp_coolant_midplane", "Maximum coolant flow speed", "ms$^{-1}$"), (p_cp_resistive, "CP Resisitive heating", "MW"), ( p_tf_leg_resistive, diff --git a/process/iteration_variables.py b/process/iteration_variables.py index 3214f3ffec..0733f31b1c 100644 --- a/process/iteration_variables.py +++ b/process/iteration_variables.py @@ -77,7 +77,7 @@ class IterationVariable: "e_beam_kev", data_structure.current_drive_variables, 1.0, 1.0e6 ), 20: IterationVariable( - "temp_cp_average", data_structure.tfcoil_variables, 40.00, 3.0e2 + "temp_cp_average", data_structure.tfcoil_variables, 40.00, 573.0 ), 21: IterationVariable( "ft_burn_min", data_structure.constraint_variables, 0.001, 1.0 @@ -171,8 +171,12 @@ class IterationVariable: "ft_cycle_min", data_structure.constraint_variables, 0.001, 1.0 ), 68: IterationVariable("fptemp", data_structure.constraint_variables, 0.001, 1.0), - 69: IterationVariable("rcool", data_structure.tfcoil_variables, 0.001, 0.010), - 70: IterationVariable("vcool", data_structure.tfcoil_variables, 1.0, 1.0e2), + 69: IterationVariable( + "radius_cp_coolant_channel", data_structure.tfcoil_variables, 0.001, 0.010 + ), + 70: IterationVariable( + "vel_cp_coolant_midplane", data_structure.tfcoil_variables, 1.0, 1.0e2 + ), 71: IterationVariable("fq95_min", data_structure.constraint_variables, 0.001, 1.0), 72: IterationVariable("fipir", data_structure.constraint_variables, 0.001, 1.0), 73: IterationVariable( diff --git a/process/power.py b/process/power.py index 936d1de535..d701ab4158 100644 --- a/process/power.py +++ b/process/power.py @@ -780,7 +780,7 @@ def calculate_cryo_loads(self) -> None: # Rem : Nuclear heating on the outer legs assumed to be negligible # Rem : To be updated with 2 cooling loops for TART designs if tfcoil_variables.i_tf_sup == 2: - # Heat removal power at cryogenic temperature tfcoil_variables.tcoolin (W) + # Heat removal power at cryogenic temperature tfcoil_variables.temp_cp_coolant_inlet (W) heat_transport_variables.helpow_cryal = ( tfcoil_variables.p_cp_resistive + tfcoil_variables.p_tf_leg_resistive @@ -788,11 +788,14 @@ def calculate_cryo_loads(self) -> None: + fwbs_variables.pnuc_cp_tf * 1.0e6 ) - # Calculate electric power requirement for cryogenic plant at tfcoil_variables.tcoolin (MW) + # Calculate electric power requirement for cryogenic plant at tfcoil_variables.temp_cp_coolant_inlet (MW) p_tf_cryoal_cryo = ( 1.0e-6 - * (constants.TEMP_ROOM - tfcoil_variables.tcoolin) - / (tfcoil_variables.eff_tf_cryo * tfcoil_variables.tcoolin) + * (constants.TEMP_ROOM - tfcoil_variables.temp_cp_coolant_inlet) + / ( + tfcoil_variables.eff_tf_cryo + * tfcoil_variables.temp_cp_coolant_inlet + ) * heat_transport_variables.helpow_cryal ) @@ -807,7 +810,7 @@ def calculate_cryo_loads(self) -> None: * ((293 / tfcoil_variables.temp_tf_cryo) - 1) / ((293 / 4.5) - 1) + heat_transport_variables.helpow_cryal - * ((293 / tfcoil_variables.tcoolin) - 1) + * ((293 / tfcoil_variables.temp_cp_coolant_inlet) - 1) / ((293 / 4.5) - 1) ) / 1.0e3 @@ -1576,7 +1579,7 @@ def output_cryogenics(self) -> None: po.ovarre( self.outfile, - "Sum = Total heat removal at cryogenic temperatures (temp_tf_cryo & tcoolin) (MW)", + "Sum = Total heat removal at cryogenic temperatures (temp_tf_cryo & temp_cp_coolant_inlet) (MW)", "(helpow + helpow_cryal/1.0d6)", (heat_transport_variables.helpow + heat_transport_variables.helpow_cryal) * 1.0e-6, @@ -1591,8 +1594,8 @@ def output_cryogenics(self) -> None: po.ovarre( self.outfile, "Temperature of cryogenic aluminium components (K)", - "(tcoolin)", - tfcoil_variables.tcoolin, + "(temp_cp_coolant_inlet)", + tfcoil_variables.temp_cp_coolant_inlet, ) po.ovarre( self.outfile, diff --git a/process/resistive_tf_coil.py b/process/resistive_tf_coil.py index cf51f19949..5b6b1866ac 100644 --- a/process/resistive_tf_coil.py +++ b/process/resistive_tf_coil.py @@ -261,7 +261,7 @@ def run(self, output: bool): tfcoil_variables.sig_tf_case = 0.0e0 tfcoil_variables.sig_tf_wp = 0.0e0 if output: - self.outtf(0) + self.outtf() def res_tf_internal_geom(self): """ diff --git a/process/tf_coil.py b/process/tf_coil.py index 84abe4ace7..755bff67e2 100644 --- a/process/tf_coil.py +++ b/process/tf_coil.py @@ -2207,9 +2207,11 @@ def cntrpst(self): acool = ( tfcoil_variables.a_cp_cool * tfcoil_variables.n_tf_coils ) # Cooling cross-sectional area - dcool = 2.0e0 * tfcoil_variables.rcool # Diameter + dcool = 2.0e0 * tfcoil_variables.radius_cp_coolant_channel # Diameter lcool = 2.0e0 * (bv.z_tf_inside_half + bv.dr_tf_outboard) # Length - tfcoil_variables.ncool = acool / (np.pi * tfcoil_variables.rcool**2) # Number + tfcoil_variables.n_cp_coolant_channels_total = acool / ( + np.pi * tfcoil_variables.radius_cp_coolant_channel**2 + ) # Number # Average conductor cross-sectional area to cool (with cooling area) acpav = ( @@ -2218,7 +2220,7 @@ def cntrpst(self): / (bv.z_tf_inside_half + bv.dr_tf_outboard) + acool ) - ro = (acpav / (np.pi * tfcoil_variables.ncool)) ** 0.5 + ro = (acpav / (np.pi * tfcoil_variables.n_cp_coolant_channels_total)) ** 0.5 # Inner legs total heating power (to be removed by coolant) ptot = tfcoil_variables.p_cp_resistive + fwbs_variables.pnuc_cp_tf * 1.0e6 @@ -2237,28 +2239,32 @@ def cntrpst(self): coolant_th_cond = constants.KH2O # Mass flow rate [kg/s] - cool_mass_flow = acool * coolant_density * tfcoil_variables.vcool + cool_mass_flow = ( + acool * coolant_density * tfcoil_variables.vel_cp_coolant_midplane + ) # Water temperature rise - tfcoil_variables.dtiocool = ptot / (cool_mass_flow * coolant_cp) + tfcoil_variables.dtemp_cp_coolant = ptot / (cool_mass_flow * coolant_cp) # Constant coolant velocity - vcool_max = tfcoil_variables.vcool + vcool_max = tfcoil_variables.vel_cp_coolant_midplane # -------------- # Helium coolant # -------------- elif tfcoil_variables.i_tf_sup == 2: # Inlet coolant density [kg/m3] - coolant_density = self.he_density(tfcoil_variables.tcoolin) + coolant_density = self.he_density(tfcoil_variables.temp_cp_coolant_inlet) # Mass flow rate [kg/s] - cool_mass_flow = acool * coolant_density * tfcoil_variables.vcool + cool_mass_flow = ( + acool * coolant_density * tfcoil_variables.vel_cp_coolant_midplane + ) # Infinitesimal power deposition used in the integral dptot = ptot / n_tcool_it - tcool_calc = copy.copy(tfcoil_variables.tcoolin) # K + tcool_calc = copy.copy(tfcoil_variables.temp_cp_coolant_inlet) # K for _i in range(n_tcool_it): # Thermal capacity Cp coolant_cp = self.he_cp(tcool_calc) @@ -2273,11 +2279,16 @@ def cntrpst(self): vcool_max = cool_mass_flow / (acool * coolant_density) # Getting the global in-outlet temperature increase - tfcoil_variables.dtiocool = tcool_calc - tfcoil_variables.tcoolin + tfcoil_variables.dtemp_cp_coolant = ( + tcool_calc - tfcoil_variables.temp_cp_coolant_inlet + ) # -------------- # Average coolant temperature - tcool_av = tfcoil_variables.tcoolin + 0.5e0 * tfcoil_variables.dtiocool + tcool_av = ( + tfcoil_variables.temp_cp_coolant_inlet + + 0.5e0 * tfcoil_variables.dtemp_cp_coolant + ) # ********************************************** # Film temperature rise @@ -2290,7 +2301,12 @@ def cntrpst(self): coolant_visco = self.he_visco(tcool_av) # Reynolds number - reyn = coolant_density * tfcoil_variables.vcool * dcool / coolant_visco + reyn = ( + coolant_density + * tfcoil_variables.vel_cp_coolant_midplane + * dcool + / coolant_visco + ) # Helium thermal conductivity [W/(m.K)] if tfcoil_variables.i_tf_sup == 2: @@ -2305,7 +2321,12 @@ def cntrpst(self): nuselt = 0.023e0 * reyn**0.8e0 * prndtl**0.4e0 h = nuselt * coolant_th_cond / dcool dtfilmav = ptot / ( - h * 2.0e0 * np.pi * tfcoil_variables.rcool * tfcoil_variables.ncool * lcool + h + * 2.0e0 + * np.pi + * tfcoil_variables.radius_cp_coolant_channel + * tfcoil_variables.n_cp_coolant_channels_total + * lcool ) # Average film temperature (in contact with te conductor) @@ -2328,12 +2349,16 @@ def cntrpst(self): # Average temperature rise : To be changed with Garry Voss' better documented formula ? dtcncpav = ( (ptot / tfcoil_variables.vol_cond_cp) - / (2.0e0 * conductor_th_cond * (ro**2 - tfcoil_variables.rcool**2)) + / ( + 2.0e0 + * conductor_th_cond + * (ro**2 - tfcoil_variables.radius_cp_coolant_channel**2) + ) * ( - ro**2 * tfcoil_variables.rcool**2 - - 0.25e0 * tfcoil_variables.rcool**4 + ro**2 * tfcoil_variables.radius_cp_coolant_channel**2 + - 0.25e0 * tfcoil_variables.radius_cp_coolant_channel**4 - 0.75e0 * ro**4 - + ro**4 * np.log(ro / tfcoil_variables.rcool) + + ro**4 * np.log(ro / tfcoil_variables.radius_cp_coolant_channel) ) ) @@ -2342,8 +2367,8 @@ def cntrpst(self): (ptot / tfcoil_variables.vol_cond_cp) / (2.0e0 * conductor_th_cond) * ( - (tfcoil_variables.rcool**2 - ro**2) / 2.0e0 - + ro**2 * np.log(ro / tfcoil_variables.rcool) + (tfcoil_variables.radius_cp_coolant_channel**2 - ro**2) / 2.0e0 + + ro**2 * np.log(ro / tfcoil_variables.radius_cp_coolant_channel) ) ) @@ -2359,17 +2384,24 @@ def cntrpst(self): # Average conductor temperature tfcoil_variables.tcpav2 = ( - tfcoil_variables.tcoolin + tfcoil_variables.temp_cp_coolant_inlet + dtcncpav + dtfilmav - + 0.5e0 * tfcoil_variables.dtiocool + + 0.5e0 * tfcoil_variables.dtemp_cp_coolant ) # Peak wall temperature tfcoil_variables.temp_cp_peak = ( - tfcoil_variables.tcoolin + tfcoil_variables.dtiocool + dtfilmav + dtconcpmx + tfcoil_variables.temp_cp_coolant_inlet + + tfcoil_variables.dtemp_cp_coolant + + dtfilmav + + dtconcpmx + ) + tcoolmx = ( + tfcoil_variables.temp_cp_coolant_inlet + + tfcoil_variables.dtemp_cp_coolant + + dtfilmav ) - tcoolmx = tfcoil_variables.tcoolin + tfcoil_variables.dtiocool + dtfilmav # ------------------------- # Thermal hydraulics: friction factor from Z. Olujic, Chemical @@ -2399,10 +2431,13 @@ def cntrpst(self): * (lcool / dcool) * coolant_density * 0.5e0 - * tfcoil_variables.vcool**2 + * tfcoil_variables.vel_cp_coolant_midplane**2 ) tfcoil_variables.p_cp_coolant_pump_elec = ( - dpres * acool * tfcoil_variables.vcool / tfcoil_variables.etapump + dpres + * acool + * tfcoil_variables.vel_cp_coolant_midplane + / tfcoil_variables.etapump ) # Critical pressure in saturation pressure calculations (Pa) @@ -2444,8 +2479,8 @@ def cntrpst(self): po.ovarre( self.outfile, "Inlet coolant flow speed (m/s)", - "(vcool)", - tfcoil_variables.vcool, + "(vel_cp_coolant_midplane)", + tfcoil_variables.vel_cp_coolant_midplane, ) po.ovarre( self.outfile, @@ -2462,8 +2497,8 @@ def cntrpst(self): po.ovarre( self.outfile, "Number of coolant tubes", - "(ncool)", - tfcoil_variables.ncool, + "(n_cp_coolant_channels_total)", + tfcoil_variables.n_cp_coolant_channels_total, ) po.ovarre(self.outfile, "Reynolds number", "(reyn)", reyn) po.ovarre(self.outfile, "Prandtl number", "(prndtl)", prndtl) @@ -2494,14 +2529,14 @@ def cntrpst(self): po.ovarre( self.outfile, "Input coolant temperature (K)", - "(tfcoil_variables.tcoolin)", - tfcoil_variables.tcoolin, + "(tfcoil_variables.temp_cp_coolant_inlet)", + tfcoil_variables.temp_cp_coolant_inlet, ) po.ovarre( self.outfile, "Input-output coolant temperature rise (K)", - "(dtiocool)", - tfcoil_variables.dtiocool, + "(dtemp_cp_coolant)", + tfcoil_variables.dtemp_cp_coolant, ) po.ovarre(self.outfile, "Film temperature rise (K)", "(dtfilmav)", dtfilmav) po.ovarre( diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index d44be1cbb6..b50abeeaa4 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -1425,7 +1425,7 @@ tftmp = 20.0 * JUSTIFICATION: Not set, using default *ixc = 70 -*vcool = 10.0 +*vel_cp_coolant_midplane = 10.0 *boundl(70) = 9.0 *boundu(70) = 10.0 * DESCRIPTION: Max Centrepost Coolant Flow Speed (m/s) @@ -1515,11 +1515,11 @@ tftmp = 20.0 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* rcool = 3.0E-3 +* radius_cp_coolant_channel = 3.0E-3 * DESCRIPTION: Average Radius of Coolant Channel for CP (m) * JUSTIFICATION: Assumed -* tcoolin = 20.0 +* temp_cp_coolant_inlet = 20.0 * DESCRIPTION: Centrepost Coolant Inlet Temperature (K) * JUSTIFICATION: Choosen to be optimal after a scan ranging from 15 to 30 K (G. Voss and S. Kahn) diff --git a/tests/unit/test_power.py b/tests/unit/test_power.py index 506c6105e4..099d8f6ead 100644 --- a/tests/unit/test_power.py +++ b/tests/unit/test_power.py @@ -2230,7 +2230,7 @@ class Power2Param(NamedTuple): temp_tf_cryo: Any = None - tcoolin: Any = None + temp_cp_coolant_inlet: Any = None eff_tf_cryo: Any = None @@ -2361,7 +2361,7 @@ class Power2Param(NamedTuple): i_tf_sup=1, tfcmw=0, temp_tf_cryo=4.5, - tcoolin=313.14999999999998, + temp_cp_coolant_inlet=313.14999999999998, eff_tf_cryo=0.13, p_fw_blkt_coolant_pump_mw=202.02739897087824, p_shld_coolant_pump_elec_mw=0.0078214713655548, @@ -2463,7 +2463,7 @@ class Power2Param(NamedTuple): i_tf_sup=1, tfcmw=0, temp_tf_cryo=4.5, - tcoolin=313.14999999999998, + temp_cp_coolant_inlet=313.14999999999998, eff_tf_cryo=0.13, p_fw_blkt_coolant_pump_mw=201.96778859673452, p_shld_coolant_pump_elec_mw=0.0080667886808651647, @@ -2841,7 +2841,9 @@ def test_power2(power2param, monkeypatch, power): monkeypatch.setattr(tfcoil_variables, "temp_tf_cryo", power2param.temp_tf_cryo) - monkeypatch.setattr(tfcoil_variables, "tcoolin", power2param.tcoolin) + monkeypatch.setattr( + tfcoil_variables, "temp_cp_coolant_inlet", power2param.temp_cp_coolant_inlet + ) monkeypatch.setattr(tfcoil_variables, "eff_tf_cryo", power2param.eff_tf_cryo) diff --git a/tests/unit/test_tfcoil.py b/tests/unit/test_tfcoil.py index 007b6060df..ea3eaae526 100644 --- a/tests/unit/test_tfcoil.py +++ b/tests/unit/test_tfcoil.py @@ -159,10 +159,10 @@ class CntrpstTestAsset(NamedTuple): :i_tf_sup: value for tfcoil_variables.i_tf_sup to be mocked with (0=Copper, 2=Cryogenic aluminium) :type i_tf_sup: integer - :tcoolin: value for tfcoil_variables.tcoolin to be mocked with (centrepost coolant inlet temperature) - :type tcoolin: float + :temp_cp_coolant_inlet: value for tfcoil_variables.temp_cp_coolant_inlet to be mocked with (centrepost coolant inlet temperature) + :type temp_cp_coolant_inlet: float - :expected_dtiocool: expected value of tfcoil_variables.dtiocool after tfcoil.cntrpst routine has run + :expected_dtiocool: expected value of tfcoil_variables.dtemp_cp_coolant after tfcoil.cntrpst routine has run :type expected_dtiocool: float :expected_tcpav2: expected value of tfcoil_variables.tcpav2 after tfcoil.cntrpst routine has run :type expected_tcpav2: float @@ -173,7 +173,7 @@ class CntrpstTestAsset(NamedTuple): """ i_tf_sup: int - tcoolin: float + temp_cp_coolant_inlet: float expected_dtiocool: float expected_tcpav2: float expected_temp_cp_peak: float @@ -196,7 +196,7 @@ def test_cntrpst(cntrpst_asset, monkeypatch, reinitialise_error_module, tfcoil): """Integration test for cntrpst Testing tfcoil module variables being set: - - dtiocool + - dtemp_cp_coolant - tcpav2 - temp_cp_peak - p_cp_coolant_pump_elec @@ -215,12 +215,14 @@ def test_cntrpst(cntrpst_asset, monkeypatch, reinitialise_error_module, tfcoil): """ monkeypatch.setattr(tfcoil_variables, "a_cp_cool", 1) monkeypatch.setattr(tfcoil_variables, "n_tf_coils", 16) - monkeypatch.setattr(tfcoil_variables, "rcool", 0.005) - monkeypatch.setattr(tfcoil_variables, "vcool", 20.0) + monkeypatch.setattr(tfcoil_variables, "radius_cp_coolant_channel", 0.005) + monkeypatch.setattr(tfcoil_variables, "vel_cp_coolant_midplane", 20.0) monkeypatch.setattr(tfcoil_variables, "vol_cond_cp", 2) monkeypatch.setattr(tfcoil_variables, "p_cp_resistive", 1) monkeypatch.setattr(tfcoil_variables, "i_tf_sup", cntrpst_asset.i_tf_sup) - monkeypatch.setattr(tfcoil_variables, "tcoolin", cntrpst_asset.tcoolin) + monkeypatch.setattr( + tfcoil_variables, "temp_cp_coolant_inlet", cntrpst_asset.temp_cp_coolant_inlet + ) monkeypatch.setattr(fwbs_variables, "pnuc_cp_tf", 1) monkeypatch.setattr(build_variables, "z_tf_inside_half", 1) monkeypatch.setattr(build_variables, "dr_tf_outboard", 0.5) @@ -228,10 +230,10 @@ def test_cntrpst(cntrpst_asset, monkeypatch, reinitialise_error_module, tfcoil): tfcoil.cntrpst() # appears to be the same for all cases? - assert pytest.approx(tfcoil_variables.ncool) == 203718.3271576 + assert pytest.approx(tfcoil_variables.n_cp_coolant_channels_total) == 203718.3271576 assert ( - pytest.approx(tfcoil_variables.dtiocool, abs=1e-8) + pytest.approx(tfcoil_variables.dtemp_cp_coolant, abs=1e-8) == cntrpst_asset.expected_dtiocool ) assert pytest.approx(tfcoil_variables.tcpav2) == cntrpst_asset.expected_tcpav2