Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions documentation/development/standards.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/data/large_tokamak_1_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/data/large_tokamak_2_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/data/large_tokamak_3_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/data/large_tokamak_4_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/data/large_tokamak_nof_2_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/data/large_tokamak_nof_MFILE.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion process/data_structure/heat_transport_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions process/data_structure/numerics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
31 changes: 16 additions & 15 deletions process/data_structure/tfcoil_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""


Expand All @@ -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)"""


Expand All @@ -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`)"""


Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
14 changes: 7 additions & 7 deletions process/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 5 additions & 3 deletions process/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
),
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
3 changes: 3 additions & 0 deletions process/io/obsolete_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
36 changes: 33 additions & 3 deletions process/io/plot_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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={
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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,
Expand Down
10 changes: 7 additions & 3 deletions process/iteration_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down
Loading
Loading