Skip to content

Commit 1f7e585

Browse files
committed
🔄 - rename dtiocool to dtemp_cp_coolant for clarity and consistency
1 parent e11ef09 commit 1f7e585

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

process/data_structure/tfcoil_variables.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@
10211021
"""centrepost coolant inlet temperature (K)"""
10221022

10231023

1024-
dtiocool: float = None
1024+
dtemp_cp_coolant: float = None
10251025
"""inlet / outlet TF coil coolant temperature rise (K)"""
10261026

10271027

@@ -1288,7 +1288,7 @@ def init_tfcoil_variables():
12881288
global temp_cp_max
12891289
global radius_cp_coolant_channel
12901290
global temp_cp_coolant_inlet
1291-
global dtiocool
1291+
global dtemp_cp_coolant
12921292
global temp_cp_average
12931293
global tcpav2
12941294
global temp_tf_legs_outboard
@@ -1523,7 +1523,7 @@ def init_tfcoil_variables():
15231523
temp_cp_max = 473.15 # 200 C
15241524
radius_cp_coolant_channel = 0.005
15251525
temp_cp_coolant_inlet = 313.15 # 40 C
1526-
dtiocool = 0.0
1526+
dtemp_cp_coolant = 0.0
15271527
temp_cp_average = 373.15 # 100 C
15281528
tcpav2 = 0.0
15291529
temp_tf_legs_outboard = -1.0

process/io/plot_proc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6625,7 +6625,7 @@ def plot_resistive_tf_wp(axis, mfile_data, scan: int, fig) -> None:
66256625
textstr_cooling = (
66266626
f"$\\mathbf{{Cooling \\ info:}}$\n \n"
66276627
f"Coolant inlet temperature: {mfile_data.data['temp_cp_coolant_inlet'].get_scan(scan):.2f} K\n"
6628-
f"Coolant temperature rise: {mfile_data.data['dtiocool'].get_scan(scan):.2f} K\n"
6628+
f"Coolant temperature rise: {mfile_data.data['dtemp_cp_coolant'].get_scan(scan):.2f} K\n"
66296629
f"Coolant velocity: {mfile_data.data['vel_cp_coolant_midplane'].get_scan(scan):.2f} $\\mathrm{{ms^{{-1}}}}$\n\n"
66306630
f"Average CP temperature: {mfile_data.data['temp_cp_average'].get_scan(scan):.2f} K\n"
66316631
f"CP resistivity: {mfile_data.data['rho_cp'].get_scan(scan):.2e} $\\Omega \\mathrm{{m}}$\n"

process/tf_coil.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2244,7 +2244,7 @@ def cntrpst(self):
22442244
)
22452245

22462246
# Water temperature rise
2247-
tfcoil_variables.dtiocool = ptot / (cool_mass_flow * coolant_cp)
2247+
tfcoil_variables.dtemp_cp_coolant = ptot / (cool_mass_flow * coolant_cp)
22482248

22492249
# Constant coolant velocity
22502250
vcool_max = tfcoil_variables.vel_cp_coolant_midplane
@@ -2279,14 +2279,14 @@ def cntrpst(self):
22792279
vcool_max = cool_mass_flow / (acool * coolant_density)
22802280

22812281
# Getting the global in-outlet temperature increase
2282-
tfcoil_variables.dtiocool = (
2282+
tfcoil_variables.dtemp_cp_coolant = (
22832283
tcool_calc - tfcoil_variables.temp_cp_coolant_inlet
22842284
)
22852285
# --------------
22862286

22872287
# Average coolant temperature
22882288
tcool_av = (
2289-
tfcoil_variables.temp_cp_coolant_inlet + 0.5e0 * tfcoil_variables.dtiocool
2289+
tfcoil_variables.temp_cp_coolant_inlet + 0.5e0 * tfcoil_variables.dtemp_cp_coolant
22902290
)
22912291
# **********************************************
22922292

@@ -2386,19 +2386,19 @@ def cntrpst(self):
23862386
tfcoil_variables.temp_cp_coolant_inlet
23872387
+ dtcncpav
23882388
+ dtfilmav
2389-
+ 0.5e0 * tfcoil_variables.dtiocool
2389+
+ 0.5e0 * tfcoil_variables.dtemp_cp_coolant
23902390
)
23912391

23922392
# Peak wall temperature
23932393
tfcoil_variables.temp_cp_peak = (
23942394
tfcoil_variables.temp_cp_coolant_inlet
2395-
+ tfcoil_variables.dtiocool
2395+
+ tfcoil_variables.dtemp_cp_coolant
23962396
+ dtfilmav
23972397
+ dtconcpmx
23982398
)
23992399
tcoolmx = (
24002400
tfcoil_variables.temp_cp_coolant_inlet
2401-
+ tfcoil_variables.dtiocool
2401+
+ tfcoil_variables.dtemp_cp_coolant
24022402
+ dtfilmav
24032403
)
24042404
# -------------------------
@@ -2534,8 +2534,8 @@ def cntrpst(self):
25342534
po.ovarre(
25352535
self.outfile,
25362536
"Input-output coolant temperature rise (K)",
2537-
"(dtiocool)",
2538-
tfcoil_variables.dtiocool,
2537+
"(dtemp_cp_coolant)",
2538+
tfcoil_variables.dtemp_cp_coolant,
25392539
)
25402540
po.ovarre(self.outfile, "Film temperature rise (K)", "(dtfilmav)", dtfilmav)
25412541
po.ovarre(

tests/unit/test_tfcoil.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class CntrpstTestAsset(NamedTuple):
162162
:temp_cp_coolant_inlet: value for tfcoil_variables.temp_cp_coolant_inlet to be mocked with (centrepost coolant inlet temperature)
163163
:type temp_cp_coolant_inlet: float
164164
165-
:expected_dtiocool: expected value of tfcoil_variables.dtiocool after tfcoil.cntrpst routine has run
165+
:expected_dtiocool: expected value of tfcoil_variables.dtemp_cp_coolant after tfcoil.cntrpst routine has run
166166
:type expected_dtiocool: float
167167
:expected_tcpav2: expected value of tfcoil_variables.tcpav2 after tfcoil.cntrpst routine has run
168168
:type expected_tcpav2: float
@@ -196,7 +196,7 @@ def test_cntrpst(cntrpst_asset, monkeypatch, reinitialise_error_module, tfcoil):
196196
"""Integration test for cntrpst
197197
198198
Testing tfcoil module variables being set:
199-
- dtiocool
199+
- dtemp_cp_coolant
200200
- tcpav2
201201
- temp_cp_peak
202202
- p_cp_coolant_pump_elec
@@ -233,7 +233,7 @@ def test_cntrpst(cntrpst_asset, monkeypatch, reinitialise_error_module, tfcoil):
233233
assert pytest.approx(tfcoil_variables.n_cp_coolant_channels_total) == 203718.3271576
234234

235235
assert (
236-
pytest.approx(tfcoil_variables.dtiocool, abs=1e-8)
236+
pytest.approx(tfcoil_variables.dtemp_cp_coolant, abs=1e-8)
237237
== cntrpst_asset.expected_dtiocool
238238
)
239239
assert pytest.approx(tfcoil_variables.tcpav2) == cntrpst_asset.expected_tcpav2

0 commit comments

Comments
 (0)