From 9b8fbd7e51e18038ccc2a69d96fe1a5aa23de94c Mon Sep 17 00:00:00 2001 From: Timothy Nunn Date: Wed, 15 Jul 2026 14:35:37 +0100 Subject: [PATCH 1/5] Ensure i_fw_coolant_type is output as a string --- process/models/blankets/blanket_library.py | 2 +- process/models/fw.py | 2 +- tests/integration/data/large_tokamak_MFILE.DAT | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/process/models/blankets/blanket_library.py b/process/models/blankets/blanket_library.py index 8270ca14ee..b231fc85b2 100644 --- a/process/models/blankets/blanket_library.py +++ b/process/models/blankets/blanket_library.py @@ -796,7 +796,7 @@ def primary_coolant_properties(self, output: bool): self.outfile, "Coolant type", "(i_fw_coolant_type)", - CoolantType(self.data.fwbs.i_fw_coolant_type).full_name, + f"'{CoolantType(self.data.fwbs.i_fw_coolant_type).full_name}'", ) po.ovarre( self.outfile, diff --git a/process/models/fw.py b/process/models/fw.py index 04a70c4c09..4eb36a8a1d 100644 --- a/process/models/fw.py +++ b/process/models/fw.py @@ -757,7 +757,7 @@ def output_fw_pumping(self): self.outfile, "First wall coolant type", "(i_fw_coolant_type)", - CoolantType(self.data.fwbs.i_fw_coolant_type).full_name, + f"'{CoolantType(self.data.fwbs.i_fw_coolant_type).full_name}'", ) po.ovarre( self.outfile, diff --git a/tests/integration/data/large_tokamak_MFILE.DAT b/tests/integration/data/large_tokamak_MFILE.DAT index d45693aa63..c43cd416e7 100644 --- a/tests/integration/data/large_tokamak_MFILE.DAT +++ b/tests/integration/data/large_tokamak_MFILE.DAT @@ -35555,7 +35555,7 @@ Peak_radiation_wall_load_(MW/m^2)________________________________________ (pflux Fast_alpha_particle_power_incident_on_the_first-wall_(MW)________________ (p_fw_alpha_mw)________________ 1.63384428835724727e+01 OP Nominal_mean_neutron_load_on_vessel_first-wall_(MW/m^2)__________________ (pflux_fw_neutron_mw)__________ 1.01656659994562149e+00 OP # First wall pumping # -First_wall_coolant_type__________________________________________________ (i_fw_coolant_type)____________ Helium +First_wall_coolant_type__________________________________________________ (i_fw_coolant_type)____________ 'helium' Outlet_temperature_of_first_wall_coolant_[K]_____________________________ (temp_fw_coolant_out)__________ 8.23000000000000000e+02 OP Inlet_temperature_of_first_wall_coolant_[K]______________________________ (temp_fw_coolant_in)___________ 5.73000000000000000e+02 OP Pressure_of_first_wall_coolant_[Pa]______________________________________ (pres_fw_coolant)______________ 1.55000000000000000e+07 OP From 93bde1b363f19c3510e5e20a0d0778fb1481d040 Mon Sep 17 00:00:00 2001 From: Timothy Nunn Date: Thu, 16 Jul 2026 09:09:52 +0100 Subject: [PATCH 2/5] Remove quotes from helium in plot summary --- process/core/io/plot/summary.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/process/core/io/plot/summary.py b/process/core/io/plot/summary.py index 6825d0a2bc..74153415df 100644 --- a/process/core/io/plot/summary.py +++ b/process/core/io/plot/summary.py @@ -5386,7 +5386,7 @@ def plot_first_wall_poloidal_cross_section(axis: plt.Axes, mfile: MFile, scan: i len_fw_channel = mfile.get("len_fw_channel", scan=scan) temp_fw_coolant_in = mfile.get("temp_fw_coolant_in", scan=scan) temp_fw_coolant_out = mfile.get("temp_fw_coolant_out", scan=scan) - i_fw_coolant_type = mfile.get("i_fw_coolant_type", scan=scan) + i_fw_coolant_type = mfile.get("i_fw_coolant_type", scan=scan).strip("'\"") temp_fw_peak = mfile.get("temp_fw_peak", scan=scan) pres_fw_coolant = mfile.get("pres_fw_coolant", scan=scan) n_fw_outboard_channels = mfile.get("n_fw_outboard_channels", scan=scan) @@ -5473,7 +5473,7 @@ def plot_first_wall_poloidal_cross_section(axis: plt.Axes, mfile: MFile, scan: i ) textstr_fw = "\n".join(( - rf"Coolant type: {i_fw_coolant_type}", + rf"Coolant type: {i_fw_coolant_type.strip()}", rf"$T_{{FW,peak}}$: {temp_fw_peak:,.3f} K", rf"$P_{{FW}}$: {pres_fw_coolant / 1e3:,.3f} kPa", rf"$P_{{FW}}$: {pres_fw_coolant / 1e5:,.3f} bar", From 20e359ad1f5ddc404aca1afe4937585f6514ab6c Mon Sep 17 00:00:00 2001 From: Timothy <75321887+timothy-nunn@users.noreply.github.com> Date: Thu, 16 Jul 2026 13:33:58 +0100 Subject: [PATCH 3/5] Remove unnecessary strip --- process/core/io/plot/summary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process/core/io/plot/summary.py b/process/core/io/plot/summary.py index 74153415df..536c671b65 100644 --- a/process/core/io/plot/summary.py +++ b/process/core/io/plot/summary.py @@ -5473,7 +5473,7 @@ def plot_first_wall_poloidal_cross_section(axis: plt.Axes, mfile: MFile, scan: i ) textstr_fw = "\n".join(( - rf"Coolant type: {i_fw_coolant_type.strip()}", + rf"Coolant type: {i_fw_coolant_type}", rf"$T_{{FW,peak}}$: {temp_fw_peak:,.3f} K", rf"$P_{{FW}}$: {pres_fw_coolant / 1e3:,.3f} kPa", rf"$P_{{FW}}$: {pres_fw_coolant / 1e5:,.3f} bar", From ba2f95bfb189617bd9017497fa9195f0177484c1 Mon Sep 17 00:00:00 2001 From: Timothy Nunn Date: Thu, 16 Jul 2026 15:46:01 +0100 Subject: [PATCH 4/5] Capitalise helium --- tests/integration/data/large_tokamak_MFILE.DAT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/data/large_tokamak_MFILE.DAT b/tests/integration/data/large_tokamak_MFILE.DAT index c43cd416e7..f9b027e6e9 100644 --- a/tests/integration/data/large_tokamak_MFILE.DAT +++ b/tests/integration/data/large_tokamak_MFILE.DAT @@ -35555,7 +35555,7 @@ Peak_radiation_wall_load_(MW/m^2)________________________________________ (pflux Fast_alpha_particle_power_incident_on_the_first-wall_(MW)________________ (p_fw_alpha_mw)________________ 1.63384428835724727e+01 OP Nominal_mean_neutron_load_on_vessel_first-wall_(MW/m^2)__________________ (pflux_fw_neutron_mw)__________ 1.01656659994562149e+00 OP # First wall pumping # -First_wall_coolant_type__________________________________________________ (i_fw_coolant_type)____________ 'helium' +First_wall_coolant_type__________________________________________________ (i_fw_coolant_type)____________ 'Helium' Outlet_temperature_of_first_wall_coolant_[K]_____________________________ (temp_fw_coolant_out)__________ 8.23000000000000000e+02 OP Inlet_temperature_of_first_wall_coolant_[K]______________________________ (temp_fw_coolant_in)___________ 5.73000000000000000e+02 OP Pressure_of_first_wall_coolant_[Pa]______________________________________ (pres_fw_coolant)______________ 1.55000000000000000e+07 OP From a59ecad1763c2847daeb39ca5a3c7ce17d95cfe4 Mon Sep 17 00:00:00 2001 From: Timothy Nunn Date: Thu, 16 Jul 2026 16:36:44 +0100 Subject: [PATCH 5/5] Capitlaise --- tests/unit/data/large_tokamak_MFILE.DAT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/data/large_tokamak_MFILE.DAT b/tests/unit/data/large_tokamak_MFILE.DAT index fddfa655b5..18e6e93d4f 100644 --- a/tests/unit/data/large_tokamak_MFILE.DAT +++ b/tests/unit/data/large_tokamak_MFILE.DAT @@ -7356,7 +7356,7 @@ Radial_thickness_off_outboard_first_wall_(m)_____________________________ (dr_fw Number_of_inboard_first_wall_cooling_channels____________________________ (n_fw_inboard_channels)________ 7550 OP Number_of_outboard_first_wall_cooling_channels___________________________ (n_fw_outboard_channels)_______ 12505 OP # First wall pumping # -First_wall_coolant_type__________________________________________________ (i_fw_coolant_type)____________ 'helium' +First_wall_coolant_type__________________________________________________ (i_fw_coolant_type)____________ 'Helium' Outlet_temperature_of_first_wall_coolant_[K]_____________________________ (temp_fw_coolant_out)__________ 8.23000000000000000e+02 OP Inlet_temperature_of_first_wall_coolant_[K]______________________________ (temp_fw_coolant_in)___________ 5.73000000000000000e+02 OP Pressure_of_first_wall_coolant_[Pa]______________________________________ (pres_fw_coolant)______________ 1.55000000000000000e+07 OP