From 5c9b69f1ec27d0eba196ada0cd33db1135cda5ae Mon Sep 17 00:00:00 2001 From: Timothy Nunn Date: Thu, 2 Jul 2026 09:56:25 +0100 Subject: [PATCH 1/3] Remove handling of bytes in process output --- process/core/process_output.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/process/core/process_output.py b/process/core/process_output.py index 3faff8c0c2..b204facd6e 100644 --- a/process/core/process_output.py +++ b/process/core/process_output.py @@ -171,9 +171,6 @@ def ovarre(file, descr: str, varnam: str, value, output_flag: str = ""): if isinstance(value, np.ndarray): value = value.item() - if isinstance(value, bytes): - # TODO: remove when Fortran is gone - value = value.decode().strip() if isinstance(value, str): # try and convert the value to a float # if it fails, leave as a string From ecafe42a2943d7e8951e1794544ec52b472ac579 Mon Sep 17 00:00:00 2001 From: Timothy Nunn Date: Thu, 2 Jul 2026 10:10:42 +0100 Subject: [PATCH 2/3] Unify use of ovarre where appropriate --- process/core/init.py | 20 +-- process/core/process_output.py | 30 +++- process/core/scan.py | 36 ++-- process/models/availability.py | 8 +- process/models/blankets/blanket_library.py | 70 ++++---- process/models/blankets/dcll.py | 26 +-- process/models/blankets/hcpb.py | 22 +-- process/models/build.py | 164 +++++++++---------- process/models/costs/costs.py | 26 +-- process/models/costs/costs_2015.py | 12 +- process/models/cryostat.py | 12 +- process/models/fw.py | 26 +-- process/models/ife.py | 2 +- process/models/pfcoil.py | 8 +- process/models/physics/bootstrap_current.py | 40 ++--- process/models/physics/confinement_time.py | 22 +-- process/models/physics/current_drive.py | 36 ++-- process/models/physics/density_limit.py | 2 +- process/models/physics/l_h_transition.py | 2 +- process/models/physics/physics.py | 160 +++++++++--------- process/models/physics/plasma_current.py | 32 ++-- process/models/physics/plasma_fields.py | 12 +- process/models/physics/plasma_geometry.py | 28 ++-- process/models/power.py | 2 +- process/models/shield.py | 12 +- process/models/stellarator/denisty_limits.py | 4 +- process/models/stellarator/divertor.py | 4 +- process/models/stellarator/stellarator.py | 8 +- process/models/tfcoil/base.py | 12 +- process/models/tfcoil/superconducting.py | 22 +-- process/models/vacuum.py | 12 +- 31 files changed, 443 insertions(+), 429 deletions(-) diff --git a/process/core/init.py b/process/core/init.py index eb02239410..c94d08fac9 100644 --- a/process/core/init.py +++ b/process/core/init.py @@ -211,23 +211,23 @@ def run_summary(data: DataStructure): # MFile # mfile = constants.MFILE - process_output.ovarst(mfile, "PROCESS version", "(procver)", f'"{version}"') - process_output.ovarst(mfile, "Date of run", "(date)", f'"{date_string}"') - process_output.ovarst(mfile, "Time of run", "(time)", f'"{time_string}"') - process_output.ovarst(mfile, "User", "(username)", f'"{user}"') - process_output.ovarst(mfile, "PROCESS run title", "(runtitle)", f'"{runtitle}"') - process_output.ovarst(mfile, "PROCESS git tag", "(tagno)", f'"{git_tag}"') - process_output.ovarst( + process_output.ovarre(mfile, "PROCESS version", "(procver)", f'"{version}"') + process_output.ovarre(mfile, "Date of run", "(date)", f'"{date_string}"') + process_output.ovarre(mfile, "Time of run", "(time)", f'"{time_string}"') + process_output.ovarre(mfile, "User", "(username)", f'"{user}"') + process_output.ovarre(mfile, "PROCESS run title", "(runtitle)", f'"{runtitle}"') + process_output.ovarre(mfile, "PROCESS git tag", "(tagno)", f'"{git_tag}"') + process_output.ovarre( mfile, "PROCESS git branch", "(branch_name)", f'"{git_branch}"' ) - process_output.ovarst(mfile, "Input filename", "(fileprefix)", f'"{fileprefix}"') + process_output.ovarre(mfile, "Input filename", "(fileprefix)", f'"{fileprefix}"') - process_output.ovarin( + process_output.ovarre( mfile, "Optimisation switch", "(ioptimz)", data.numerics.ioptimz ) # If optimising, write figure of merit switch if data.numerics.ioptimz == PROCESSRunMode.OPTIMISATION: - process_output.ovarin( + process_output.ovarre( mfile, "Figure of merit switch", "(minmax)", data.numerics.minmax ) diff --git a/process/core/process_output.py b/process/core/process_output.py index b204facd6e..8aa9857e7b 100644 --- a/process/core/process_output.py +++ b/process/core/process_output.py @@ -1,14 +1,20 @@ +"""Handles writing output to PROCESS MFile/OUTFile.""" + from contextlib import suppress from pathlib import Path import numpy as np from process.core import constants +from process.core.exceptions import ProcessValueError class OutputFileManager: + """Manages the opening of regular/idempotence output files.""" + @classmethod def open_files(cls, output_prefix: str, *, mode="w"): + """Setup the handlers for MFile and OUTFile for writing.""" cls._outfile = open( # noqa: SIM115 Path(output_prefix + "OUT.DAT"), mode ) @@ -18,6 +24,7 @@ def open_files(cls, output_prefix: str, *, mode="w"): @classmethod def open_idempotence_files(cls, output_prefix: str): + """Setup the handlers for idempotence MFile and OUTFile for writing.""" cls._outfile.close() cls._mfile.close() @@ -30,6 +37,9 @@ def open_idempotence_files(cls, output_prefix: str): @classmethod def close_idempotence_files(cls, output_prefix: str): + """Removes idempotence output files, closes the handler, + and opens the main output files. + """ Path(cls._outfile.name).unlink() Path(cls._mfile.name).unlink() cls._outfile.close() @@ -38,17 +48,28 @@ def close_idempotence_files(cls, output_prefix: str): @classmethod def finish(cls): + """Closes the file handlers.""" cls._outfile.close() cls._mfile.close() def write(file, string: str): + """Writes a string to the given file identifier. + + Raises + ------ + ProcessValueError + The file is not recognised as an MFile, OUTFile, or terminal. + """ if file == constants.MFILE: OutputFileManager._mfile.write(f"{string}\n") elif file == constants.NOUT: OutputFileManager._outfile.write(f"{string}\n") elif file == constants.IOTTY: print(string) + else: + error_msg = f"Unknown file identifier {file}." + raise ProcessValueError(error_msg) def ocentr(file, string: str, width: int, *, character="*"): @@ -162,6 +183,7 @@ def ocmmnt(file, string: str): def ovarre(file, descr: str, varnam: str, value, output_flag: str = ""): + """Write out a variable to a file via its identifier.""" replacement_character = "_" if file != constants.MFILE: replacement_character = " " @@ -200,13 +222,5 @@ def ovarrf(file, descr: str, varnam: str, value, output_flag: str = ""): ovarre(file, descr, varnam, value, output_flag) -def ovarin(file, descr: str, varnam: str, value, output_flag: str = ""): - ovarre(file, descr, varnam, value, output_flag) - - -def ovarst(file, descr: str, varnam: str, value, output_flag: str = ""): - ovarre(file, descr, varnam, value, output_flag) - - def obuild(file, descr: str, thick: float, total: float, variable_name: str = ""): write(file, f"{descr:<50}{thick:.3e}{' ':<10}{total:.3e} {variable_name}") diff --git a/process/core/scan.py b/process/core/scan.py index 2b455fc819..dbbbca4e93 100644 --- a/process/core/scan.py +++ b/process/core/scan.py @@ -272,7 +272,7 @@ def post_optimise(self, ifail: int): constants.NOUT, "PROCESS has performed a VMCON (optimisation) run." ) if ifail != 1: - process_output.ovarin(constants.NOUT, "Error flag", "(ifail)", ifail) + process_output.ovarre(constants.NOUT, "Error flag", "(ifail)", ifail) process_output.oheadr( constants.IOTTY, "PROCESS COULD NOT FIND A FEASIBLE SOLUTION" ) @@ -302,7 +302,7 @@ def post_optimise(self, ifail: int): constants.IOTTY, "PROCESS found a consistent solution" ) process_output.oblnkl(constants.NOUT) - process_output.ovarin(constants.NOUT, "Error flag", "(ifail)", ifail) + process_output.ovarre(constants.NOUT, "Error flag", "(ifail)", ifail) if self.data.numerics.sqsumsq >= 1.0e-2: process_output.oblnkl(constants.NOUT) @@ -337,19 +337,19 @@ def post_optimise(self, ifail: int): f"High final constraint residues. {self.data.numerics.sqsumsq=}" ) - process_output.ovarin( + process_output.ovarre( constants.NOUT, "Number of iteration variables", "(nvar)", self.data.numerics.nvar, ) - process_output.ovarin( + process_output.ovarre( constants.NOUT, "Number of constraints (total)", "(neqns+nineqns)", self.data.numerics.neqns + self.data.numerics.nineqns, ) - process_output.ovarin( + process_output.ovarre( constants.NOUT, "Optimisation switch", "(ioptimz)", @@ -361,7 +361,7 @@ def post_optimise(self, ifail: int): ) # Objective function output: none for fsolve if self.solver != "fsolve": - process_output.ovarin( + process_output.ovarre( constants.NOUT, "Figure of merit switch", "(minmax)", @@ -372,7 +372,7 @@ def post_optimise(self, ifail: int): self.data.numerics.objf_name = objf_name - process_output.ovarst( + process_output.ovarre( constants.NOUT, "Objective function name", "(objf_name)", @@ -401,7 +401,7 @@ def post_optimise(self, ifail: int): self.data.globals.convergence_parameter, "OP ", ) - process_output.ovarin( + process_output.ovarre( constants.NOUT, "Number of optimising solver iterations", "(nviter)", @@ -981,37 +981,37 @@ def scan_2d(self): @staticmethod def scan_2d_init(scan_data: ScanData): - process_output.ovarin( + process_output.ovarre( constants.MFILE, "Number of first variable scan points", "(isweep)", scan_data.isweep, ) - process_output.ovarin( + process_output.ovarre( constants.MFILE, "Number of second variable scan points", "(isweep_2)", scan_data.isweep_2, ) - process_output.ovarin( + process_output.ovarre( constants.MFILE, "Scanning first variable number", "(nsweep)", scan_data.nsweep, ) - process_output.ovarin( + process_output.ovarre( constants.MFILE, "Scanning second variable number", "(nsweep_2)", scan_data.nsweep_2, ) - process_output.ovarin( + process_output.ovarre( constants.MFILE, "Scanning second variable number", "(nsweep_2)", scan_data.nsweep_2, ) - process_output.ovarin( + process_output.ovarre( constants.MFILE, "Scanning second variable number", "(nsweep_2)", @@ -1035,7 +1035,7 @@ def scan_1d_write_point_header(self, iscan: int): ) process_output.ostars(constants.NOUT, 110) process_output.oblnkl(constants.MFILE) - process_output.ovarin(constants.MFILE, "Scan point number", "(iscan)", iscan) + process_output.ovarre(constants.MFILE, "Scan point number", "(iscan)", iscan) print( f"Starting scan point {iscan} of {self.data.scan.isweep} : " @@ -1068,7 +1068,7 @@ def scan_2d_write_point_header(self, iscan, iscan_1, iscan_2): ) process_output.ostars(constants.NOUT, 110) process_output.oblnkl(constants.MFILE) - process_output.ovarin(constants.MFILE, "Scan point number", "(iscan)", iscan) + process_output.ovarre(constants.MFILE, "Scan point number", "(iscan)", iscan) print( f"Starting scan point {iscan}: {self.data.globals.xlabel}, " @@ -1082,13 +1082,13 @@ def scan_2d_write_point_header(self, iscan, iscan_1, iscan_2): @staticmethod def scan_1d_write_plot(scan_data: ScanData): if scan_data.first_call_1d: - process_output.ovarin( + process_output.ovarre( constants.MFILE, "Number of scan points", "(isweep)", scan_data.isweep, ) - process_output.ovarin( + process_output.ovarre( constants.MFILE, "Scanning variable number", "(nsweep)", diff --git a/process/models/availability.py b/process/models/availability.py index f5a01d20c6..6d604f452a 100644 --- a/process/models/availability.py +++ b/process/models/availability.py @@ -623,7 +623,7 @@ def calc_u_planned(self, output: bool) -> float: "(adivflnc)", self.data.costs.adivflnc, ) - po.ovarin( + po.ovarre( self.outfile, "Number of remote handling systems", "(num_rh_systems)", @@ -1006,7 +1006,7 @@ def calc_u_unplanned_bop(self, output: bool) -> float: po.ovarre( self.outfile, "Failure rate (1/h)", "(bop_fail_rate)", bop_fail_rate ) - po.ovarin( + po.ovarre( self.outfile, "Number of failures in lifetime", "(bop_num_failures)", @@ -1115,14 +1115,14 @@ def calc_u_unplanned_vacuum(self, output: bool) -> float: if output: po.ocmmnt(self.outfile, "Vacuum:") po.oblnkl(self.outfile) - po.ovarin( + po.ovarre( self.outfile, "Number of pumps (excluding redundant pumps)", "(n_vac_pumps_high)", self.data.vacuum.n_vac_pumps_high, "OP ", ) - po.ovarin( + po.ovarre( self.outfile, "Number of redundant pumps", "(redun_vac)", diff --git a/process/models/blankets/blanket_library.py b/process/models/blankets/blanket_library.py index e2b5b95115..8270ca14ee 100644 --- a/process/models/blankets/blanket_library.py +++ b/process/models/blankets/blanket_library.py @@ -581,76 +581,76 @@ def output_blkt_volumes_and_areas(self): """Outputs blanket volumes and areas to the output file""" po.oheadr(self.outfile, "Blanket Volumes and Surface Areas") - po.ovarst( + po.ovarre( self.outfile, "Inboard Blanket Volume with gaps and holes (m3)", "(vol_blkt_inboard)", self.data.fwbs.vol_blkt_inboard, ) - po.ovarst( + po.ovarre( self.outfile, "Outboard Blanket Volume with gaps and holes (m3)", "(vol_blkt_outboard)", self.data.fwbs.vol_blkt_outboard, ) - po.ovarst( + po.ovarre( self.outfile, "Total Blanket Volume with gaps and holes (m3)", "(vol_blkt_total)", self.data.fwbs.vol_blkt_total, ) - po.ovarst( + po.ovarre( self.outfile, "Inboard Blanket Volume if toridally continuous (m3)", "(vol_blkt_inboard_full_coverage)", self.data.fwbs.vol_blkt_inboard_full_coverage, ) - po.ovarst( + po.ovarre( self.outfile, "Outboard Blanket Volume if toridally continuous (m3)", "(vol_blkt_outboard_full_coverage)", self.data.fwbs.vol_blkt_outboard_full_coverage, ) - po.ovarst( + po.ovarre( self.outfile, "Total Blanket Volume if toridally continuous (m3)", "(vol_blkt_total_full_coverage)", self.data.fwbs.vol_blkt_total_full_coverage, ) - po.ovarst( + po.ovarre( self.outfile, "Inboard Blanket Surface Area with gaps and holes (m2)", "(a_blkt_inboard_surface)", self.data.build.a_blkt_inboard_surface, ) - po.ovarst( + po.ovarre( self.outfile, "Outboard Blanket Surface Area with gaps and holes (m2)", "(a_blkt_outboard_surface)", self.data.build.a_blkt_outboard_surface, ) - po.ovarst( + po.ovarre( self.outfile, "Total Blanket Surface Area with gaps and holes (m2)", "(a_blkt_total_surface)", self.data.build.a_blkt_total_surface, ) - po.ovarst( + po.ovarre( self.outfile, "Inboard blanket surface area if toridally continuous (m2)", "(a_blkt_inboard_surface_full_coverage)", self.data.build.a_blkt_inboard_surface_full_coverage, ) - po.ovarst( + po.ovarre( self.outfile, "Outboard blanket surface area if toridally continuous (m2)", "(a_blkt_outboard_surface_full_coverage)", self.data.build.a_blkt_outboard_surface_full_coverage, ) - po.ovarst( + po.ovarre( self.outfile, "Total blanket surface area if toridally continuous (m2)", "(a_blkt_total_surface_full_coverage)", @@ -792,20 +792,20 @@ def primary_coolant_properties(self, output: bool): ): po.osubhd(self.outfile, "First Wall :") - po.ovarst( + po.ovarre( self.outfile, "Coolant type", "(i_fw_coolant_type)", CoolantType(self.data.fwbs.i_fw_coolant_type).full_name, ) - po.ovarrf( + po.ovarre( self.outfile, "Density (kg m-3)", "(den_fw_coolant)", self.data.fwbs.den_fw_coolant, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Viscosity (Pa s)", "(visc_fw_coolant)", @@ -857,14 +857,14 @@ def primary_coolant_properties(self, output: bool): po.ocmmnt( self.outfile, "Coolant type (i_blkt_coolant_type=2), Water" ) - po.ovarrf( + po.ovarre( self.outfile, "Density (kg m-3)", "(den_blkt_coolant)", self.data.fwbs.den_blkt_coolant, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Viscosity (Pa s)", "(visc_blkt_coolant)", @@ -1933,7 +1933,7 @@ def liquid_breeder_properties(self, output: bool = False): self.outfile, "Outside temperature limit for one or more liquid metal breeder properties.", ) - po.ovarrf( + po.ovarre( self.outfile, "Liquid metal temperature (K)", "(mid_temp_liq)", @@ -1976,31 +1976,31 @@ def liquid_breeder_properties(self, output: bool = False): self.outfile, "Blanket breeder type (i_blkt_liquid_breeder_type=1), Li" ) - po.ovarrf( + po.ovarre( self.outfile, "Density (kg m-3)", "(den_liq)", self.data.fwbs.den_liq, "OP " ) - po.ovarrf( + po.ovarre( self.outfile, "Viscosity (Pa s)", "(dynamic_viscosity_liq)", self.data.fwbs.dynamic_viscosity_liq, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Electrical Conductivity (A V-1 m-1)", "(electrical_conductivity_liq)", self.data.fwbs.electrical_conductivity_liq, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Hartmann Number IB", "(hartmann_liq)", self.data.fwbs.hartmann_liq[0], "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Hartmann Number OB", "(hartmann_liq)", @@ -2593,7 +2593,7 @@ def thermo_hydraulic_model(self, output: bool): # FW po.osubhd(self.outfile, "First wall: ") - po.ovarst( + po.ovarre( self.outfile, "First wall coolant type", "(i_fw_coolant_type)", @@ -2623,13 +2623,13 @@ def thermo_hydraulic_model(self, output: bool): "(roughness_fw_channel)", self.data.fwbs.roughness_fw_channel, ) - po.ovarrf( + po.ovarre( self.outfile, "Inlet temperature of first wall coolant (K)", "(temp_fw_coolant_in)", self.data.fwbs.temp_fw_coolant_in, ) - po.ovarrf( + po.ovarre( self.outfile, "Outlet temperature of first wall coolant (K)", "(temp_fw_coolant_out)", @@ -2652,13 +2652,13 @@ def thermo_hydraulic_model(self, output: bool): self.data.blanket.mflow_fw_coolant_total, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Allowable temperature of first wall material, excluding armour (K)", "(temp_fw_max)", self.data.fwbs.temp_fw_max, ) - po.ovarrf( + po.ovarre( self.outfile, "Actual peak temperature of first wall material (K)", "(temp_fw_peak)", @@ -2674,19 +2674,19 @@ def thermo_hydraulic_model(self, output: bool): "(dz_blkt_half)", self.data.blanket.dz_blkt_half, ) - po.ovarin( + po.ovarre( self.outfile, "Blanket coolant type (1=He, 2=H20)", "(i_blkt_coolant_type)", self.data.fwbs.i_blkt_coolant_type, ) - po.ovarrf( + po.ovarre( self.outfile, "Inlet temperature of blanket coolant (K)", "(temp_blkt_coolant_in)", self.data.fwbs.temp_blkt_coolant_in, ) - po.ovarrf( + po.ovarre( self.outfile, "Outlet temperature of blanket coolant (K)", "(temp_blkt_coolant_out)", @@ -2727,7 +2727,7 @@ def thermo_hydraulic_model(self, output: bool): if self.data.fwbs.i_blkt_dual_coolant > 0: po.osubhd(self.outfile, "Breeding Blanket (breeder): ") - po.ovarin( + po.ovarre( self.outfile, "Blanket liquid breeder type (0=PbLi, 1=Li)", "(i_blkt_liquid_breeder_type)", @@ -2735,13 +2735,13 @@ def thermo_hydraulic_model(self, output: bool): ) if self.data.fwbs.i_blkt_dual_coolant == 2: po.ocmmnt(self.outfile, "Dual-coolant BB, i.e. self-cooled breeder.") - po.ovarrf( + po.ovarre( self.outfile, "Inlet temperature of blanket liquid breeder (K)", "(inlet_temp_liq)", self.data.fwbs.inlet_temp_liq, ) - po.ovarrf( + po.ovarre( self.outfile, "Outlet temperature of blanket liquid breeder (K)", "(outlet_temp_liq)", @@ -3068,7 +3068,7 @@ def liquid_breeder_mhd_pressure_drop( l_channel, "OP ", ) - po.ovarin( + po.ovarre( self.outfile, "Number of long poloidal secions of channel", "(num_pol)", diff --git a/process/models/blankets/dcll.py b/process/models/blankets/dcll.py index 25b49073eb..74b5a9d6df 100644 --- a/process/models/blankets/dcll.py +++ b/process/models/blankets/dcll.py @@ -304,14 +304,14 @@ def dcll_neutronics_and_power(self, output: bool): po.osubhd(self.outfile, "Radiation heating :") - po.ovarrf( + po.ovarre( self.outfile, "Radiation heating power into the divertor (MW)", "(p_div_rad_total_mw)", self.data.fwbs.p_div_rad_total_mw, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Radiation heating power into the first wall (MW)", "(p_fw_rad_total_mw)", @@ -424,13 +424,13 @@ def dcll_power_and_heating(self, output: bool): "OP ", ) - po.ovarin( + po.ovarre( self.outfile, "Switch for plant secondary cycle ", "(i_thermal_electric_conversion)", self.data.fwbs.i_thermal_electric_conversion, ) - po.ovarin( + po.ovarre( self.outfile, "Switch for plant secondary cycle (liquid metal breeder) ", "(secondary_cycle_liq)", @@ -928,25 +928,25 @@ def dcll_masses(self, output: bool): po.osubhd(self.outfile, "Radial Thickness: ") - po.ovarrf( + po.ovarre( self.outfile, "Inboard radial first wall thickness (m)", "(dr_fw_inboard)", self.data.build.dr_fw_inboard, ) - po.ovarrf( + po.ovarre( self.outfile, "Outboard radial first wall thickness (m)", "(dr_fw_outboard)", self.data.build.dr_fw_outboard, ) - po.ovarrf( + po.ovarre( self.outfile, "Inboard radial breeder zone thickness (m)", "(blbuith)", self.data.build.blbuith, ) - po.ovarrf( + po.ovarre( self.outfile, "Outboard radial breeder zone thickness (m)", "(blbuoth)", @@ -959,35 +959,35 @@ def write_output(self): self.output_blkt_volumes_and_areas() - po.ovarrf( + po.ovarre( self.outfile, "First Wall Armour Volume (m3)", "(fw_armour_vol)", self.data.fwbs.fw_armour_vol, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "First Wall Volume (m3)", "(vol_fw_total)", self.data.fwbs.vol_fw_total, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Blanket Volume (m3)", "(vol_blkt_total)", self.data.fwbs.vol_blkt_total, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Shield Volume (m3)", "(vol_shld_total)", self.data.fwbs.vol_shld_total, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Vacuum vessel volume (m3)", "(vol_vv)", diff --git a/process/models/blankets/hcpb.py b/process/models/blankets/hcpb.py index 4187fe05cb..6cd5d2e862 100644 --- a/process/models/blankets/hcpb.py +++ b/process/models/blankets/hcpb.py @@ -1275,63 +1275,63 @@ def write_output(self): po.osubhd(self.outfile, "Blanket Composition by volume :") - po.ovarrf( + po.ovarre( self.outfile, "Titanium beryllide fraction", "(f_vol_blkt_tibe12)", self.data.fwbs.f_vol_blkt_tibe12, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Lithium orthosilicate fraction", "(f_vol_blkt_li4sio4)", self.data.fwbs.f_vol_blkt_li4sio4, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Steel fraction", "(f_vol_blkt_steel)", self.data.fwbs.f_vol_blkt_steel, "OP ", ) - po.ovarrf(self.outfile, "Coolant fraction", "(vfcblkt)", self.data.fwbs.vfcblkt) - po.ovarrf( + po.ovarre(self.outfile, "Coolant fraction", "(vfcblkt)", self.data.fwbs.vfcblkt) + po.ovarre( self.outfile, "Purge gas fraction", "(vfpblkt)", self.data.fwbs.vfpblkt ) po.osubhd(self.outfile, "Component Volumes :") - po.ovarrf( + po.ovarre( self.outfile, "First Wall Armour Volume (m3)", "(fw_armour_vol)", self.data.fwbs.fw_armour_vol, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "First Wall Volume (m3)", "(vol_fw_total)", self.data.fwbs.vol_fw_total, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Blanket Volume (m3)", "(vol_blkt_total)", self.data.fwbs.vol_blkt_total, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Shield Volume (m3)", "(vol_shld_total)", self.data.fwbs.vol_shld_total, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Vacuum vessel volume (m3)", "(vol_vv)", @@ -1515,7 +1515,7 @@ def write_output(self): "(f_a_fw_outboard_hcd)", self.data.fwbs.f_a_fw_outboard_hcd, ) - po.ovarin( + po.ovarre( self.outfile, "Switch for plant secondary cycle ", "(i_thermal_electric_conversion)", diff --git a/process/models/build.py b/process/models/build.py index 9b20d2308a..038bff087f 100644 --- a/process/models/build.py +++ b/process/models/build.py @@ -164,7 +164,7 @@ def calculate_vertical_build(self, output: bool): if output: po.oheadr(self.outfile, "Vertical Build") - po.ovarin( + po.ovarre( self.mfile, "Divertor null switch", "(i_single_null)", @@ -937,206 +937,206 @@ def divgeom(self, output: bool): po.oblnkl(self.outfile) ptop_radial = self.data.physics.rmajor - triu * self.data.physics.rminor ptop_vertical = kap * self.data.physics.rminor - po.ovarrf( + po.ovarre( self.outfile, "Plasma top position, radial (m)", "(ptop_radial)", ptop_radial, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma top position, vertical (m)", "(ptop_vertical)", ptop_vertical, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma geometric centre, radial (m)", "(rmajor.)", self.data.physics.rmajor, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma geometric centre, vertical (m)", "(0.0)", 0.0e0, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma lower triangularity", "(tril)", tril, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma elongation", "(kappa.)", kap, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "TF coil vertical offset (m)", "(dz_tf_plasma_centre_offset)", self.data.build.dz_tf_plasma_centre_offset, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma outer arc radius of curvature (m)", "(rco)", rco, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma inner arc radius of curvature (m)", "(rci)", rci, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma lower X-pt, radial (m)", "(rxpt)", rxpt, "OP " ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma lower X-pt, vertical (m)", "(zxpt)", zxpt, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Poloidal plane angle between vertical and inner leg (rad)", "(thetai)", thetai, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Poloidal plane angle between vertical and outer leg (rad)", "(thetao)", thetao, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Poloidal plane angle between inner leg and plate (rad)", "(betai)", self.data.divertor.betai, ) - po.ovarrf( + po.ovarre( self.outfile, "Poloidal plane angle between outer leg and plate (rad)", "(betao)", self.data.divertor.betao, ) - po.ovarrf( + po.ovarre( self.outfile, "Inner divertor leg poloidal length (m)", "(plsepi)", self.data.build.plsepi, ) - po.ovarrf( + po.ovarre( self.outfile, "Outer divertor leg poloidal length (m)", "(plsepo)", self.data.build.plsepo, ) - po.ovarrf( + po.ovarre( self.outfile, "Inner divertor plate length (m)", "(plleni)", self.data.build.plleni, ) - po.ovarrf( + po.ovarre( self.outfile, "Outer divertor plate length (m)", "(plleno)", self.data.build.plleno, ) - po.ovarrf( + po.ovarre( self.outfile, "Inner strike point, radial (m)", "(rspi)", rspi, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Inner strike point, vertical (m)", "(zspi)", zspi, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Inner plate top, radial (m)", "(rplti)", rplti, "OP " ) - po.ovarrf( + po.ovarre( self.outfile, "Inner plate top, vertical (m)", "(zplti)", zplti, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Inner plate bottom, radial (m)", "(rplbi)", rplbi, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Inner plate bottom, vertical (m)", "(zplbi)", zplbi, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Outer strike point, radial (m)", "(rspo)", self.data.build.rspo, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Outer strike point, vertical (m)", "(zspo)", zspo, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Outer plate top, radial (m)", "(rplto)", rplto, "OP " ) - po.ovarrf( + po.ovarre( self.outfile, "Outer plate top, vertical (m)", "(zplto)", zplto, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Outer plate bottom, radial (m)", "(rplbo)", rplbo, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Outer plate bottom, vertical (m)", "(zplbo)", zplbo, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Calculated maximum divertor height (m)", "(divht)", @@ -1151,302 +1151,302 @@ def divgeom(self, output: bool): # Assume upper and lower divertors geometries are symmetric. ptop_radial = self.data.physics.rmajor - triu * self.data.physics.rminor ptop_vertical = kap * self.data.physics.rminor - po.ovarrf( + po.ovarre( self.outfile, "Plasma top position, radial (m)", "(ptop_radial)", ptop_radial, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma top position, vertical (m)", "(ptop_vertical)", ptop_vertical, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma geometric centre, radial (m)", "(rmajor.)", self.data.physics.rmajor, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma geometric centre, vertical (m)", "(0.0)", 0.0e0, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma data.physics.triangularity", "(tril)", tril, "OP ", ) - po.ovarrf(self.outfile, "Plasma elongation", "(kappa.)", kap, "OP ") - po.ovarrf( + po.ovarre(self.outfile, "Plasma elongation", "(kappa.)", kap, "OP ") + po.ovarre( self.outfile, "TF coil vertical offset (m)", "(dz_tf_plasma_centre_offset)", self.data.build.dz_tf_plasma_centre_offset, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma upper X-pt, radial (m)", "(rxpt)", rxpt, "OP " ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma upper X-pt, vertical (m)", "(-zxpt)", -zxpt, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma outer arc radius of curvature (m)", "(rco)", rco, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma inner arc radius of curvature (m)", "(rci)", rci, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma lower X-pt, radial (m)", "(rxpt)", rxpt, "OP " ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma lower X-pt, vertical (m)", "(zxpt)", zxpt, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Poloidal plane angle between vertical and inner leg (rad)", "(thetai)", thetai, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Poloidal plane angle between vertical and outer leg (rad)", "(thetao)", thetao, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Poloidal plane angle between inner leg and plate (rad)", "(betai)", self.data.divertor.betai, ) - po.ovarrf( + po.ovarre( self.outfile, "Poloidal plane angle between outer leg and plate (rad)", "(betao)", self.data.divertor.betao, ) - po.ovarrf( + po.ovarre( self.outfile, "Inner divertor leg poloidal length (m)", "(plsepi)", self.data.build.plsepi, ) - po.ovarrf( + po.ovarre( self.outfile, "Outer divertor leg poloidal length (m)", "(plsepo)", self.data.build.plsepo, ) - po.ovarrf( + po.ovarre( self.outfile, "Inner divertor plate length (m)", "(lleni)", self.data.build.plleni, ) - po.ovarrf( + po.ovarre( self.outfile, "Outer divertor plate length (m)", "(plleno)", self.data.build.plleno, ) - po.ovarrf( + po.ovarre( self.outfile, "Upper inner strike point, radial (m)", "(rspi)", rspi, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Upper inner strike point, vertical (m)", "(-zspi)", -zspi, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Upper inner plate top, radial (m)", "(rplti)", rplti, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Upper inner plate top, vertical (m)", "(-zplti)", -zplti, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Upper inner plate bottom, radial (m)", "(rplbi)", rplbi, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Upper inner plate bottom, vertical (m)", "(-zplbi)", -zplbi, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Upper outer strike point, radial (m)", "(rspo)", self.data.build.rspo, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Upper outer strike point, vertical (m)", "(-zspo)", -zspo, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Upper outer plate top, radial (m)", "(rplto)", rplto, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Upper outer plate top, vertical (m)", "(-zplto)", -zplto, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Upper outer plate bottom, radial (m)", "(rplbo)", rplbo, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Upper outer plate bottom, vertical (m)", "(-zplbo)", -zplbo, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Lower inner strike point, radial (m)", "(rspi)", rspi, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Lower inner strike point, vertical (m)", "(zspi)", zspi, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Lower inner plate top, radial (m)", "(rplti)", rplti, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Lower inner plate top, vertical (m)", "(zplti)", zplti, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Lower inner plate bottom, radial (m)", "(rplbi)", rplbi, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Lower inner plate bottom, vertical (m)", "(zplbi)", zplbi, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Lower outer strike point, radial (m)", "(rspo)", self.data.build.rspo, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Lower outer strike point, vertical (m)", "(zspo)", zspo, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Lower outer plate top, radial (m)", "(rplto)", rplto, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Lower outer plate top, vertical (m)", "(zplto)", zplto, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Lower outer plate bottom, radial (m)", "(rplbo)", rplbo, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Lower outer plate bottom, vertical (m)", "(zplbo)", zplbo, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Calculated maximum divertor height (m)", "(divht)", @@ -2006,7 +2006,7 @@ def calculate_radial_build(self, output: bool): diagnostic, ) - po.ovarin( + po.ovarre( self.outfile, "TF coil radial placement switch", "(i_tf_inside_cs)", @@ -2019,7 +2019,7 @@ def calculate_radial_build(self, output: bool): ), ) po.oblnkl(self.outfile) - po.ovarrf( + po.ovarre( self.outfile, "Inboard build thickness (m)", "(dr_inboard_build)", @@ -2328,7 +2328,7 @@ def calculate_radial_build(self, output: bool): thickness, ) - po.ovarst( + po.ovarre( self.mfile, f"Radial build component {index}", f"(radial_label({index}))", diff --git a/process/models/costs/costs.py b/process/models/costs/costs.py index 106a3d29b0..7d9702e8bc 100644 --- a/process/models/costs/costs.py +++ b/process/models/costs/costs.py @@ -84,7 +84,7 @@ def output(self): po.oheadr(self.outfile, "Power Reactor Costs (1990 US$)") - po.ovarrf( + po.ovarre( self.outfile, "First wall / blanket life (years)", "(life_blkt)", @@ -92,55 +92,55 @@ def output(self): ) if self.data.ife.ife != 1: - po.ovarrf( + po.ovarre( self.outfile, "Divertor life (years)", "(life_div)", self.data.costs.life_div, ) if self.data.physics.itart == 1: - po.ovarrf( + po.ovarre( self.outfile, "Centrepost life (years)", "(cplife_cal)", self.data.costs.cplife_cal, ) - po.ovarrf( + po.ovarre( self.outfile, "Cost of electricity (m$/kWh)", "(coe)", self.data.costs.coe ) po.osubhd(self.outfile, "Power Generation Costs :") if self.data.costs.ifueltyp == 1: po.oshead(self.outfile, "Replaceable Components Direct Capital Cost") - po.ovarrf( + po.ovarre( self.outfile, "First wall direct capital cost (M$)", "(fwallcst)", self.data.costs.fwallcst, ) - po.ovarrf( + po.ovarre( self.outfile, "Blanket direct capital cost (M$)", "(blkcst)", self.data.costs.blkcst, ) if self.data.ife.ife != 1: - po.ovarrf( + po.ovarre( self.outfile, "Divertor direct capital cost (M$)", "(divcst)", self.data.costs.divcst, ) if self.data.physics.itart == 1: - po.ovarrf( + po.ovarre( self.outfile, "Centrepost direct capital cost (M$)", "(cpstcst)", self.data.costs.cpstcst, ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma heating/CD system cap cost (M$)", "", @@ -148,14 +148,14 @@ def output(self): * self.data.costs.fcdfuel / (1.0e0 - self.data.costs.fcdfuel), ) - po.ovarrf( + po.ovarre( self.outfile, "Fraction of CD cost --> fuel cost", "(fcdfuel)", self.data.costs.fcdfuel, ) else: - po.ovarrf( + po.ovarre( self.outfile, "IFE driver system direct cap cost (M$)", "", @@ -163,7 +163,7 @@ def output(self): * self.data.costs.fcdfuel / (1.0e0 - self.data.costs.fcdfuel), ) - po.ovarrf( + po.ovarre( self.outfile, "Fraction of driver cost --> fuel cost", "(fcdfuel)", @@ -177,7 +177,7 @@ def output(self): "(fkind)", self.data.costs.fkind, ) - po.ovarin( + po.ovarre( self.outfile, "Level of Safety Assurance", "(lsa)", self.data.costs.lsa ) po.oblnkl(self.outfile) diff --git a/process/models/costs/costs_2015.py b/process/models/costs/costs_2015.py index d9256ca909..311903ae6e 100644 --- a/process/models/costs/costs_2015.py +++ b/process/models/costs/costs_2015.py @@ -365,24 +365,24 @@ def output(self): self.data.costs_2015.maintenance / 1.0e6, ) po.oblnkl(self.outfile) - po.ovarrf( + po.ovarre( self.outfile, "Net electric output (MW)", "(p_plant_electric_net_mw)", self.data.heat_transport.p_plant_electric_net_mw, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Capacity factor", "(cpfact)", self.data.costs.cpfact, "OP " ) - po.ovarrf( + po.ovarre( self.outfile, "Mean electric output (MW)", "(mean_electric_output)", self.data.costs_2015.mean_electric_output, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Capital cost / mean electric output ($/W)", "", @@ -391,7 +391,7 @@ def output(self): / 1.0e6, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Levelized cost of electricity ($/MWh)", "(coe)", @@ -1215,4 +1215,4 @@ def ocost(file, descr, vname, value): if descr == "not used": return - po.ovarrf(file, descr, str(vname), value) + po.ovarre(file, descr, str(vname), value) diff --git a/process/models/cryostat.py b/process/models/cryostat.py index e704e239f4..611517afb1 100644 --- a/process/models/cryostat.py +++ b/process/models/cryostat.py @@ -78,42 +78,42 @@ def output(self): """Outputs the cryostat geometry details to the output file.""" po.oheadr(self.outfile, "Cryostat build") - po.ovarrf( + po.ovarre( self.outfile, "Cryostat thickness (m)", "(dr_cryostat)", self.data.build.dr_cryostat, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Cryostat internal radius (m)", "(r_cryostat_inboard)", self.data.fwbs.r_cryostat_inboard, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Cryostat internal half height (m)", "(z_cryostat_half_inside)", self.data.fwbs.z_cryostat_half_inside, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Vertical clearance from highest PF coil to cryostat (m)", "(dz_pf_cryostat)", self.data.blanket.dz_pf_cryostat, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Cryostat structure volume (m³)", "(vol_cryostat)", self.data.fwbs.vol_cryostat, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Cryostat internal volume (m³)", "(vol_cryostat_internal)", diff --git a/process/models/fw.py b/process/models/fw.py index 9f847fcf5f..04a70c4c09 100644 --- a/process/models/fw.py +++ b/process/models/fw.py @@ -680,7 +680,7 @@ def output_fw_geometry(self): """Outputs the first wall geometry details to the output file.""" po.oheadr(self.outfile, "First wall build") - po.ovarrf( + po.ovarre( self.outfile, "Radius of first wall cooling channels (m)", "(radius_fw_channel)", @@ -699,49 +699,49 @@ def output_fw_geometry(self): "(radius_fw_channel_180_bend)", self.data.fwbs.radius_fw_channel_180_bend, ) - po.ovarrf( + po.ovarre( self.outfile, "Radial wall thickness surrounding first wall coolant channel (m)", "(dr_fw_wall)", self.data.fwbs.dr_fw_wall, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Toroidal width of each first wall module (m)", "(dx_fw_module)", self.data.fwbs.dx_fw_module, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Length of each first wall channel (m)", "(len_fw_channel)", self.data.fwbs.len_fw_channel, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Radial thickness off inboard first wall (m)", "(dr_fw_inboard)", self.data.build.dr_fw_inboard, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Radial thickness off outboard first wall (m)", "(dr_fw_outboard)", self.data.build.dr_fw_outboard, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Number of inboard first wall cooling channels", "(n_fw_inboard_channels)", self.data.blanket.n_fw_inboard_channels, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Number of outboard first wall cooling channels", "(n_fw_outboard_channels)", @@ -753,34 +753,34 @@ def output_fw_pumping(self): """Outputs the first wall pumping details to the output file.""" po.oheadr(self.outfile, "First wall pumping") - po.ovarst( + po.ovarre( self.outfile, "First wall coolant type", "(i_fw_coolant_type)", CoolantType(self.data.fwbs.i_fw_coolant_type).full_name, ) - po.ovarrf( + po.ovarre( self.outfile, "Outlet temperature of first wall coolant [K]", "(temp_fw_coolant_out)", self.data.fwbs.temp_fw_coolant_out, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Inlet temperature of first wall coolant [K]", "(temp_fw_coolant_in)", self.data.fwbs.temp_fw_coolant_in, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Pressure of first wall coolant [Pa]", "(pres_fw_coolant)", self.data.fwbs.pres_fw_coolant, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Peak temperature of first wall [K]", "(temp_fw_peak)", diff --git a/process/models/ife.py b/process/models/ife.py index 8e46671f5e..2839110470 100644 --- a/process/models/ife.py +++ b/process/models/ife.py @@ -2061,7 +2061,7 @@ def ifepw2(self, output: bool = False): "(fachtmw)", self.data.heat_transport.fachtmw, ) - process_output.ovarin( + process_output.ovarre( self.outfile, "Number of primary heat exchangers", "(n_primary_heat_exchangers)", diff --git a/process/models/pfcoil.py b/process/models/pfcoil.py index b6096bd83d..3affa3ab9c 100644 --- a/process/models/pfcoil.py +++ b/process/models/pfcoil.py @@ -2037,7 +2037,7 @@ def outpf(self): """ op.oheadr(self.outfile, "Central Solenoid and PF Coils") - op.ovarin( + op.ovarre( self.mfile, "Existence_of_central_solenoid", "(iohcl)", @@ -2049,7 +2049,7 @@ def outpf(self): elif self.data.pf_coil.i_pf_conductor == PFConductorModel.SUPERCONDUCTING: op.ocmmnt(self.outfile, "Superconducting central solenoid") - op.ovarin( + op.ovarre( self.outfile, "Central solenoid superconductor material", "(i_cs_superconductor)", @@ -2356,7 +2356,7 @@ def outpf(self): op.oblnkl(self.outfile) op.ocmmnt(self.outfile, "Superconducting PF coils") - op.ovarin( + op.ovarre( self.outfile, "PF coil superconductor material", "(i_pf_superconductor)", @@ -2812,7 +2812,7 @@ def outvolt(self): ) op.oshead(self.outfile, "PF Circuit Waveform Data") - op.ovarin( + op.ovarre( self.outfile, "Number of PF circuits including CS and plasma", "(n_pf_cs_plasma_circuits)", diff --git a/process/models/physics/bootstrap_current.py b/process/models/physics/bootstrap_current.py index 240ee0c139..acb7409f80 100644 --- a/process/models/physics/bootstrap_current.py +++ b/process/models/physics/bootstrap_current.py @@ -1269,7 +1269,7 @@ def bootstrap_fraction_sugiyama_h_mode( def output(self): """Output the calculated bootstrap current information to the output file.""" po.oheadr(self.outfile, "Plasma Bootstrap Current Fraction") - po.ovarin( + po.ovarre( self.outfile, "Plasma bootstrap current fraction scaling used", "(i_bootstrap_current)", @@ -1281,27 +1281,27 @@ def output(self): ) po.oblnkl(self.outfile) - po.ovarrf( + po.ovarre( self.outfile, "Bootstrap current fraction multiplier", "(cboot)", self.data.current_drive.cboot, ) - po.ovarrf( + po.ovarre( self.outfile, f"Bootstrap fraction ({BootstrapCurrentFractionModel.ITER_89.full_name})", "(f_c_plasma_bootstrap_iter89)", self.data.current_drive.f_c_plasma_bootstrap_iter89, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, f"Bootstrap fraction ({BootstrapCurrentFractionModel.NEVINS.full_name})", "(f_c_plasma_bootstrap_nevins)", self.data.current_drive.f_c_plasma_bootstrap_nevins, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, f"Bootstrap fraction ({BootstrapCurrentFractionModel.WILSON.full_name})", "(f_c_plasma_bootstrap_wilson)", @@ -1309,7 +1309,7 @@ def output(self): "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, f"Bootstrap fraction ({BootstrapCurrentFractionModel.SAUTER.full_name})", "(f_c_plasma_bootstrap_sauter)", @@ -1317,7 +1317,7 @@ def output(self): "OP ", ) for point in range(len(self.data.physics.j_plasma_bootstrap_sauter_profile)): - po.ovarrf( + po.ovarre( self.mfile, f"Sauter et al bootstrap current density profile at point {point}", f"(j_plasma_bootstrap_sauter_profile{point})", @@ -1325,56 +1325,56 @@ def output(self): "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, f"Bootstrap fraction ({BootstrapCurrentFractionModel.SAKAI.full_name})", "(f_c_plasma_bootstrap_sakai)", self.data.current_drive.f_c_plasma_bootstrap_sakai, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, f"Bootstrap fraction ({BootstrapCurrentFractionModel.ARIES.full_name})", "(f_c_plasma_bootstrap_aries)", self.data.current_drive.f_c_plasma_bootstrap_aries, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, f"Bootstrap fraction ({BootstrapCurrentFractionModel.ANDRADE.full_name})", "(f_c_plasma_bootstrap_andrade)", self.data.current_drive.f_c_plasma_bootstrap_andrade, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, f"Bootstrap fraction ({BootstrapCurrentFractionModel.HOANG.full_name})", "(f_c_plasma_bootstrap_hoang)", self.data.current_drive.f_c_plasma_bootstrap_hoang, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, f"Bootstrap fraction ({BootstrapCurrentFractionModel.WONG.full_name})", "(f_c_plasma_bootstrap_wong)", self.data.current_drive.f_c_plasma_bootstrap_wong, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, f"Bootstrap fraction ({BootstrapCurrentFractionModel.GI_1.full_name})", "(bscf_gi_i)", self.data.current_drive.bscf_gi_i, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, f"Bootstrap fraction ({BootstrapCurrentFractionModel.GI_2.full_name})", "(bscf_gi_ii)", self.data.current_drive.bscf_gi_ii, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, f"Bootstrap fraction" f" ({BootstrapCurrentFractionModel.SUGIYAMA_L_MODE.full_name})", @@ -1382,7 +1382,7 @@ def output(self): self.data.current_drive.f_c_plasma_bootstrap_sugiyama_l, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, f"Bootstrap fraction" f" ({BootstrapCurrentFractionModel.SUGIYAMA_H_MODE.full_name})", @@ -1392,7 +1392,7 @@ def output(self): ) po.oblnkl(self.outfile) - po.ovarrf( + po.ovarre( self.outfile, "Pfirsch-Schlueter fraction (SCENE)", "(f_c_plasma_pfirsch_schluter_scene)", @@ -1418,21 +1418,21 @@ def output(self): " (SCENE Pfirsch-Schluter current fraction scaling used)", ) - po.ovarrf( + po.ovarre( self.outfile, "Bootstrap fraction (enforced)", "(f_c_plasma_bootstrap.)", self.data.current_drive.f_c_plasma_bootstrap, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Diamagnetic fraction (enforced)", "(f_c_plasma_diamagnetic.)", self.data.current_drive.f_c_plasma_diamagnetic, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Pfirsch-Schlueter fraction (enforced)", "(f_c_plasma_pfirsch_schluter.)", diff --git a/process/models/physics/confinement_time.py b/process/models/physics/confinement_time.py index df56fad327..60a629f44b 100644 --- a/process/models/physics/confinement_time.py +++ b/process/models/physics/confinement_time.py @@ -1156,24 +1156,24 @@ def output_confinement_time_info(self): f"Confinement scaling law: {tauelaw}", ) - po.ovarst( + po.ovarre( self.outfile, "Confinement scaling law", "(tauelaw)", f'"{tauelaw.strip().split(" ")[0]}"', ) - po.ovarrf( + po.ovarre( self.outfile, "Confinement H factor", "(hfact)", self.data.physics.hfact ) - po.ovarrf( + po.ovarre( self.outfile, "Global thermal energy confinement time, from scaling (τₑ) (s)", "(t_energy_confinement)", self.data.physics.t_energy_confinement, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Directly calculated total energy confinement time (τₑᵦ) (s)", "(t_energy_confinement_beta)", @@ -1188,14 +1188,14 @@ def output_confinement_time_info(self): po.ocmmnt(self.outfile, "----------------------------") po.oblnkl(self.outfile) - po.ovarrf( + po.ovarre( self.outfile, "Ion energy confinement time, from scaling (s)", "(t_ion_energy_confinement)", self.data.physics.t_ion_energy_confinement, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Electron energy confinement time, from scaling (s)", "(t_electron_energy_confinement)", @@ -1229,7 +1229,7 @@ def output_confinement_time_info(self): self.data.physics.p_plasma_loss_mw, "OP ", ) - po.ovarin( + po.ovarre( self.outfile, "Switch for radiation loss term usage in power balance", "(i_rad_loss)", @@ -1262,7 +1262,7 @@ def output_confinement_time_info(self): ) po.ocmmnt(self.outfile, f" (Radiation correction: {model.description})") - po.ovarrf( + po.ovarre( self.outfile, "H* non-radiation corrected", "(hstar)", @@ -1274,7 +1274,7 @@ def output_confinement_time_info(self): po.oblnkl(self.outfile) po.ocmmnt(self.outfile, "----------------------------") po.oblnkl(self.outfile) - po.ovarrf( + po.ovarre( self.outfile, "Alpha particle confinement time (τ_α) (s)", # noqa: RUF001 "(t_alpha_confinement)", @@ -1283,14 +1283,14 @@ def output_confinement_time_info(self): ) # Note alpha confinement time is no longer equal to fuel particle # confinement time. - po.ovarrf( + po.ovarre( self.outfile, "Alpha particle to energy confinement time ratio (τ_α/τₑ)", # noqa: RUF001 "(f_t_alpha_energy_confinement)", self.data.physics.f_t_alpha_energy_confinement, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Lower limit on f_t_alpha_energy_confinement ((τ_α/τₑ)>)", # noqa: RUF001 "(f_t_alpha_energy_confinement_min)", diff --git a/process/models/physics/current_drive.py b/process/models/physics/current_drive.py index 811f6c38bd..e6133c51bb 100644 --- a/process/models/physics/current_drive.py +++ b/process/models/physics/current_drive.py @@ -2392,7 +2392,7 @@ def output(self): """ po.oheadr(self.outfile, "Heating & Current Drive System") - po.ovarin( + po.ovarre( self.outfile, "Ignited plasma switch (0=not ignited, 1=ignited)", "(i_plasma_ignited)", @@ -2428,7 +2428,7 @@ def output(self): po.oblnkl(self.outfile) return - po.ovarin( + po.ovarre( self.outfile, "Primary current drive efficiency model", "(i_hcd_primary)", @@ -2534,7 +2534,7 @@ def output(self): self.data.current_drive.xi_ebw, ) if self.data.current_drive.i_hcd_primary == 13: - po.ovarin( + po.ovarre( self.outfile, "Electron cyclotron cutoff wave mode switch", "(i_ecrh_wave_mode)", @@ -2594,28 +2594,28 @@ def output(self): CurrentDriveModel(self.data.current_drive.i_hcd_primary).method == CurrentDriveMethodType.NEUTRAL_BEAM ): - po.ovarrf( + po.ovarre( self.outfile, "Beam first orbit loss power (MW)", "(p_beam_orbit_loss_mw)", self.data.current_drive.p_beam_orbit_loss_mw, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Beam shine-through power [MW]", "(p_beam_shine_through_mw)", self.data.current_drive.p_beam_shine_through_mw, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Maximum allowable beam power (MW)", "(p_hcd_injected_max)", self.data.current_drive.p_hcd_injected_max, ) po.oblnkl(self.outfile) - po.ovarrf( + po.ovarre( self.outfile, "Beam power entering vacuum vessel (MW)", "(p_beam_injected_mw)", @@ -2658,7 +2658,7 @@ def output(self): po.ocmmnt(self.outfile, "----------------------------") po.oblnkl(self.outfile) - po.ovarin( + po.ovarre( self.outfile, "Secondary current drive efficiency model", "(i_hcd_secondary)", @@ -2796,28 +2796,28 @@ def output(self): CurrentDriveModel(self.data.current_drive.i_hcd_primary).method == CurrentDriveMethodType.NEUTRAL_BEAM ): - po.ovarrf( + po.ovarre( self.outfile, "Beam first orbit loss power (MW)", "(p_beam_orbit_loss_mw)", self.data.current_drive.p_beam_orbit_loss_mw, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Beam shine-through power [MW]", "(p_beam_shine_through_mw)", self.data.current_drive.p_beam_shine_through_mw, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Maximum allowable beam power (MW)", "(p_hcd_injected_max)", self.data.current_drive.p_hcd_injected_max, ) po.oblnkl(self.outfile) - po.ovarrf( + po.ovarre( self.outfile, "Beam power entering vacuum vessel (MW)", "(p_beam_injected_mw)", @@ -2937,35 +2937,35 @@ def output(self): ) po.osubhd(self.outfile, "Fractions of current drive :") - po.ovarrf( + po.ovarre( self.outfile, "Bootstrap fraction", "(f_c_plasma_bootstrap)", self.data.current_drive.f_c_plasma_bootstrap, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Diamagnetic fraction", "(f_c_plasma_diamagnetic)", self.data.current_drive.f_c_plasma_diamagnetic, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Pfirsch-Schlueter fraction", "(f_c_plasma_pfirsch_schluter)", self.data.current_drive.f_c_plasma_pfirsch_schluter, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Auxiliary current drive fraction", "(f_c_plasma_auxiliary)", self.data.physics.f_c_plasma_auxiliary, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Inductive fraction", "(f_c_plasma_inductive)", @@ -2975,7 +2975,7 @@ def output(self): # MDK Add self.data.physics.f_c_plasma_non_inductive as it can be an iteration # variable - po.ovarrf( + po.ovarre( self.outfile, "Fraction of the plasma current produced by non-inductive means", "(f_c_plasma_non_inductive)", diff --git a/process/models/physics/density_limit.py b/process/models/physics/density_limit.py index 942866a3b5..4fd738cfc1 100644 --- a/process/models/physics/density_limit.py +++ b/process/models/physics/density_limit.py @@ -618,7 +618,7 @@ def calculate_density_limit( def output(self): """Output density limit information to file.""" po.oheadr(self.outfile, "Plasma density limits") - po.ovarin( + po.ovarre( self.outfile, "Plasma density limit model used", "(i_density_limit)", diff --git a/process/models/physics/l_h_transition.py b/process/models/physics/l_h_transition.py index 8f4548e880..c0245279bb 100644 --- a/process/models/physics/l_h_transition.py +++ b/process/models/physics/l_h_transition.py @@ -297,7 +297,7 @@ def output(self) -> None: """Output L-H transition power thresholds to file.""" po.oheadr(self.outfile, "H-mode Power Threshold Scalings :") - po.ovarin( + po.ovarre( self.outfile, "L-H threshold scaling switch", "(i_l_h_threshold)", diff --git a/process/models/physics/physics.py b/process/models/physics/physics.py index 012dd0b307..49995a5ed7 100644 --- a/process/models/physics/physics.py +++ b/process/models/physics/physics.py @@ -1656,19 +1656,19 @@ def outtim(self) -> None: """Output timing information.""" po.oheadr(self.outfile, "Times") - po.ovarrf( + po.ovarre( self.outfile, "Initial charge time for CS from zero current (s)", "(t_plant_pulse_coil_precharge)", self.data.times.t_plant_pulse_coil_precharge, ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma current ramp-up time (s)", "(t_plant_pulse_plasma_current_ramp_up)", self.data.times.t_plant_pulse_plasma_current_ramp_up, ) - po.ovarrf( + po.ovarre( self.outfile, "Heating time (s)", "(t_plant_pulse_fusion_ramp)", @@ -1681,13 +1681,13 @@ def outtim(self) -> None: self.data.times.t_plant_pulse_burn, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Reset time to zero current for CS (s)", "(t_plant_pulse_plasma_current_ramp_down)", self.data.times.t_plant_pulse_plasma_current_ramp_down, ) - po.ovarrf( + po.ovarre( self.outfile, "Time between pulses (s)", "(t_plant_pulse_dwell)", @@ -1801,19 +1801,19 @@ def outplas(self): po.oheadr(self.outfile, "Plasma Reactions :") po.osubhd(self.outfile, "Fuel Constituents :") - po.ovarrf( + po.ovarre( self.outfile, "Deuterium fuel fraction", "(f_plasma_fuel_deuterium)", self.data.physics.f_plasma_fuel_deuterium, ) - po.ovarrf( + po.ovarre( self.outfile, "Tritium fuel fraction", "(f_plasma_fuel_tritium)", self.data.physics.f_plasma_fuel_tritium, ) - po.ovarrf( + po.ovarre( self.outfile, "3-Helium fuel fraction", "(f_plasma_fuel_helium3)", @@ -2088,7 +2088,7 @@ def outplas(self): self.data.physics.pden_plasma_sync_mw, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Synchrotron wall reflectivity factor", "(f_sync_reflect)", @@ -2156,7 +2156,7 @@ def outplas(self): self.data.physics.ptarmw, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Divertor poloidal angle subtended by plasma (degrees)", "(deg_div_poloidal_plasma)", @@ -2268,21 +2268,21 @@ def outplas(self): self.data.physics.p_plasma_ohmic_mw, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Fraction of alpha power deposited in plasma", "(f_p_alpha_plasma_deposited)", self.data.physics.f_p_alpha_plasma_deposited, "IP", ) - po.ovarrf( + po.ovarre( self.outfile, "Fraction of alpha power to electrons", "(f_alpha_electron)", self.data.physics.f_alpha_electron, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Fraction of alpha power to ions", "(f_alpha_ion)", @@ -2394,7 +2394,7 @@ def outplas(self): self.data.physics.rndfuel, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Burn-up fraction", "(burnup)", @@ -2404,7 +2404,7 @@ def outplas(self): if 78 in self.data.numerics.icc: po.osubhd(self.outfile, "Reinke Criterion :") - po.ovarin( + po.ovarre( self.outfile, "index of impurity to be iterated for divertor detachment", "(impvardiv)", @@ -2427,13 +2427,13 @@ def outplas(self): def output_temperature_density_profile_info(self) -> None: """Output information about plasma temperature and density profiles.""" po.oheadr(self.outfile, "Plasma Density and Temperature Profiles") - po.ovarrf( + po.ovarre( self.outfile, "Number of radial points in plasma profiles", "(n_plasma_profile_elements)", self.data.physics.n_plasma_profile_elements, ) - po.ovarin( + po.ovarre( self.outfile, "Plasma profile model selected", "(i_plasma_pedestal)", @@ -2456,13 +2456,13 @@ def output_temperature_density_profile_info(self) -> None: po.oblnkl(self.outfile) po.ocmmnt(self.outfile, "----------------------------") po.osubhd(self.outfile, "Temperature:") - po.ovarrf( + po.ovarre( self.outfile, "Temperature profile index (αₜ)", "(alphat)", self.data.physics.alphat, ) - po.ovarrf( + po.ovarre( self.outfile, "Temperature profile index beta (βₜ)", "(tbeta)", @@ -2474,21 +2474,21 @@ def output_temperature_density_profile_info(self) -> None: PlasmaProfileShapeType(self.data.physics.i_plasma_pedestal) == PlasmaProfileShapeType.PEDESTAL_PROFILE ): - po.ovarrf( + po.ovarre( self.outfile, "Temperature pedestal r/a location (ρₜ,pedestal)", "(radius_plasma_pedestal_temp_norm)", self.data.physics.radius_plasma_pedestal_temp_norm, ) - po.ovarrf( + po.ovarre( self.outfile, "Electron temperature pedestal height (Tₑ,pedestal) (keV)", "(temp_plasma_pedestal_kev)", self.data.physics.temp_plasma_pedestal_kev, ) if 78 in self.data.numerics.icc: - po.ovarrf( + po.ovarre( self.outfile, "Electron temperature at separatrix (Tₑ,ₛₑₚ) (keV)", "(temp_plasma_separatrix_kev)", @@ -2496,7 +2496,7 @@ def output_temperature_density_profile_info(self) -> None: "OP ", ) else: - po.ovarrf( + po.ovarre( self.outfile, "Electron temperature at separatrix (Tₑ,ₛₑₚ) (keV)", "(temp_plasma_separatrix_kev)", @@ -2504,33 +2504,33 @@ def output_temperature_density_profile_info(self) -> None: ) po.oblnkl(self.outfile) - po.ovarrf( + po.ovarre( self.outfile, "Volume averaged electron temperature (⟨Tₑ⟩) (keV)", "(temp_plasma_electron_vol_avg_kev)", self.data.physics.temp_plasma_electron_vol_avg_kev, ) - po.ovarrf( + po.ovarre( self.outfile, "Electron temperature on axis (Tₑ₀) (keV)", "(temp_plasma_electron_on_axis_kev)", self.data.physics.temp_plasma_electron_on_axis_kev, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Line averaged electron temperature (keV)", "(temp_plasma_electron_line_avg_kev)", self.data.physics.temp_plasma_electron_line_avg_kev, ) - po.ovarrf( + po.ovarre( self.outfile, "Volume averaged density weighted electron temperature (⟨Tₑ⟩ₙ) (keV)", "(temp_plasma_electron_density_weighted_kev)", self.data.physics.temp_plasma_electron_density_weighted_kev, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Ratio of electron density weighted to volume averaged temperature", "(f_temp_plasma_electron_density_vol_avg)", @@ -2538,7 +2538,7 @@ def output_temperature_density_profile_info(self) -> None: "OP ", ) po.oblnkl(self.outfile) - po.ovarrf( + po.ovarre( self.outfile, "Ratio of ion to electron volume-averaged temperature", "(f_temp_plasma_ion_electron)", @@ -2546,13 +2546,13 @@ def output_temperature_density_profile_info(self) -> None: "IP ", ) po.oblnkl(self.outfile) - po.ovarrf( + po.ovarre( self.outfile, "Volume averaged ion temperature (⟨Tᵢ⟩) (keV)", "(temp_plasma_ion_vol_avg_kev)", self.data.physics.temp_plasma_ion_vol_avg_kev, ) - po.ovarrf( + po.ovarre( self.outfile, "Ion temperature on axis (Tᵢ₀) (keV)", "(temp_plasma_ion_on_axis_kev)", @@ -2563,7 +2563,7 @@ def output_temperature_density_profile_info(self) -> None: po.ocmmnt(self.outfile, "----------------------------") po.osubhd(self.outfile, "Density:") - po.ovarrf( + po.ovarre( self.outfile, "Density profile factor (αₙ)", "(alphan)", @@ -2574,7 +2574,7 @@ def output_temperature_density_profile_info(self) -> None: self.data.physics.i_plasma_pedestal == PlasmaProfileShapeType.PEDESTAL_PROFILE ): - po.ovarin( + po.ovarre( self.outfile, "Pedestal and separatrix density model selected", "(i_nd_plasma_pedestal_separatrix)", @@ -2587,7 +2587,7 @@ def output_temperature_density_profile_info(self) -> None: ) po.oblnkl(self.outfile) - po.ovarrf( + po.ovarre( self.outfile, "Density pedestal r/a location (ρₙ,pedestal)", "(radius_plasma_pedestal_density_norm)", @@ -2597,13 +2597,13 @@ def output_temperature_density_profile_info(self) -> None: self.data.physics.i_nd_plasma_pedestal_separatrix == DensityProfilePedestalType.USER_INPUT ): - po.ovarin( + po.ovarre( self.outfile, "Electron density pedestal height (nₑ_pedestal) (/m³)", "(nd_plasma_pedestal_electron)", self.data.physics.nd_plasma_pedestal_electron, ) - po.ovarin( + po.ovarre( self.outfile, "Electron separatrix density (nₑ,ₛₑₚ) (/m³)", "(nd_plasma_separatrix_electron)", @@ -2642,13 +2642,13 @@ def output_temperature_density_profile_info(self) -> None: self.data.physics.nd_plasma_separatrix_electron, "OP ", ) - po.ovarin( + po.ovarre( self.outfile, "Pedestal Greenwald fraction", "(f_nd_plasma_pedestal_greenwald)", self.data.physics.f_nd_plasma_pedestal_greenwald, ) - po.ovarin( + po.ovarre( self.outfile, "Separatrix Greenwald fraction", "(f_nd_plasma_separatrix_greenwald)", @@ -2754,7 +2754,7 @@ def output_temperature_density_profile_info(self) -> None: po.osubhd(self.outfile, "Pressure:") - po.ovarrf( + po.ovarre( self.outfile, "Pressure profile index (αₚ)", "(alphap)", @@ -2908,7 +2908,7 @@ def output_temperature_density_profile_info(self) -> None: ) po.oblnkl(self.outfile) - po.ovarrf( + po.ovarre( self.outfile, "Volume averaged plasma effective charge (⟨Zₑ⟩)", "(n_charge_plasma_effective_vol_avg)", @@ -2934,7 +2934,7 @@ def output_temperature_density_profile_info(self) -> None: "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Volume averaged mass-weighted plasma effective charge (⟨Zₑ⟩ₘ)", "(n_charge_plasma_effective_mass_weighted_vol_avg)", @@ -3944,7 +3944,7 @@ def output_beta_information(self): """Output beta information to file.""" po.oheadr(self.outfile, "Plasma Beta:") - po.ovarin( + po.ovarre( self.outfile, "Beta component for limits", "(i_beta_component)", @@ -3958,7 +3958,7 @@ def output_beta_information(self): po.oblnkl(self.outfile) if self.data.physics.i_beta_component == BetaComponentLimits.TOTAL: - po.ovarrf( + po.ovarre( self.outfile, "Upper limit on volume averaged total beta (⟨β⟩<)", "(beta_vol_avg_max)", @@ -3966,7 +3966,7 @@ def output_beta_information(self): "OP ", ) elif self.data.physics.i_beta_component == BetaComponentLimits.THERMAL: - po.ovarrf( + po.ovarre( self.outfile, "Upper limit on volume averaged thermal beta (⟨βₜₕ⟩<)", "(beta_vol_avg_max)", @@ -3974,7 +3974,7 @@ def output_beta_information(self): "OP ", ) elif self.data.physics.i_beta_component == BetaComponentLimits.THERMAL_AND_BEAM: - po.ovarrf( + po.ovarre( self.outfile, "Upper limit on volume averaged thermal + NB beta (⟨βₜₕ+βₙᵦ⟩<)", "(beta_vol_avg_max)", @@ -3982,7 +3982,7 @@ def output_beta_information(self): "OP ", ) elif self.data.physics.i_beta_component == BetaComponentLimits.TOROIDAL: - po.ovarrf( + po.ovarre( self.outfile, "Upper limit on volume averaged toroidal beta (⟨βₜ⟩<)", "(beta_vol_avg_max)", @@ -3997,7 +3997,7 @@ def output_beta_information(self): self.data.physics.beta_total_vol_avg, ) if self.data.physics.i_beta_component == BetaComponentLimits.TOTAL: - po.ovarrf( + po.ovarre( self.outfile, "Lower limit on volume averaged total beta (⟨β⟩>)", "(beta_vol_avg_min)", @@ -4005,7 +4005,7 @@ def output_beta_information(self): "IP", ) elif self.data.physics.i_beta_component == BetaComponentLimits.THERMAL: - po.ovarrf( + po.ovarre( self.outfile, "Lower limit on volume averaged thermal beta (⟨βₜₕ⟩>)", "(beta_vol_avg_min)", @@ -4013,7 +4013,7 @@ def output_beta_information(self): "IP", ) else: - po.ovarrf( + po.ovarre( self.outfile, "Lower limit on volume averaged thermal + NB beta (⟨βₜₕ+βₙᵦ⟩>)", "(beta_vol_avg_min)", @@ -4093,14 +4093,14 @@ def output_beta_information(self): "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Poloidal beta and inverse aspect ratio (βₚε)", "(beta_poloidal_eps)", self.data.physics.beta_poloidal_eps, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Poloidal beta and inverse aspect ratio upper limit (βₚε_max)", "(beta_poloidal_eps_max)", @@ -4108,7 +4108,7 @@ def output_beta_information(self): ) po.osubhd(self.outfile, "Normalised Beta (βₙ) Information :") - po.ovarin( + po.ovarre( self.outfile, "Maximum normalised beta model", "(i_beta_norm_max)", @@ -4126,7 +4126,7 @@ def output_beta_information(self): BetaNormMaxModel(self.data.physics.i_beta_norm_max) != BetaNormMaxModel.USER_INPUT ): - po.ovarrf( + po.ovarre( self.outfile, "Beta g coefficient (βₙ<)", "(beta_norm_max)", @@ -4134,20 +4134,20 @@ def output_beta_information(self): "OP ", ) else: - po.ovarrf( + po.ovarre( self.outfile, "Beta g coefficient (βₙ<)", "(beta_norm_max)", self.data.physics.beta_norm_max, ) - po.ovarrf( + po.ovarre( self.outfile, "Normalised total beta (βₙ)", "(beta_norm_total)", self.data.physics.beta_norm_total, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Normalised thermal beta (βₙₜₕ)", "(beta_norm_thermal) ", @@ -4155,7 +4155,7 @@ def output_beta_information(self): "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Normalised toroidal beta (βₙₜ)", "(beta_norm_toroidal) ", @@ -4163,7 +4163,7 @@ def output_beta_information(self): "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Normalised poloidal beta (βₙₚ)", "(beta_norm_poloidal) ", @@ -4172,35 +4172,35 @@ def output_beta_information(self): ) po.osubhd(self.outfile, "Maximum normalised beta scalings :") - po.ovarrf( + po.ovarre( self.outfile, "J. Wesson normalised beta upper limit (βₙ<)", "(beta_norm_max_wesson) ", self.data.physics.beta_norm_max_wesson, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Original normalised beta upper limit (βₙ<)", "(beta_norm_max_original_scaling) ", self.data.physics.beta_norm_max_original_scaling, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "J. Menard normalised beta upper limit (βₙ<)", "(beta_norm_max_menard) ", self.data.physics.beta_norm_max_menard, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "E. tholerus normalised beta upper limit (βₙ<)", "(beta_norm_max_tholerus) ", self.data.physics.beta_norm_max_tholerus, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "R. Stambaugh normalised beta upper limit (βₙ<)", "(beta_norm_max_stambaugh) ", @@ -4585,7 +4585,7 @@ def output_volt_second_information(self): self.data.physics.vs_plasma_ramp_required, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Ejima coefficient (Cₑⱼᵢₘₐ)", "(ejima_coeff)", @@ -4614,7 +4614,7 @@ def output_volt_second_information(self): self.data.physics.v_plasma_loop_burn, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Coefficient for sawtooth effects on burn V-s requirement", "(csawth)", @@ -4652,7 +4652,7 @@ def output_volt_second_information(self): ) po.oblnkl(self.outfile) - po.ovarin( + po.ovarre( self.outfile, "Normalised internal inductance model used", "(i_ind_plasma_internal_norm)", @@ -4663,7 +4663,7 @@ def output_volt_second_information(self): f"Normalised internal inductance model selected: " f"{IndInternalNormModel(self.data.physics.i_ind_plasma_internal_norm).full_name} ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma normalised internal inductance (lᵢ)", "(ind_plasma_internal_norm)", @@ -4673,21 +4673,21 @@ def output_volt_second_information(self): po.oblnkl(self.outfile) po.ocmmnt(self.outfile, "Plasma normalised internal inductance scalings:") po.oblnkl(self.outfile) - po.ovarrf( + po.ovarre( self.outfile, "J. Wesson plasma normalised internal inductance", "(ind_plasma_internal_norm_wesson)", self.data.physics.ind_plasma_internal_norm_wesson, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "J. Menard plasma normalised internal inductance", "(ind_plasma_internal_norm_menard)", self.data.physics.ind_plasma_internal_norm_menard, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "ITER lᵢ(3) plasma normalised internal inductance", "(ind_plasma_internal_norm_iter_3)", @@ -5926,7 +5926,7 @@ def output_detailed_physics(self): po.osubhd(self.outfile, "Debye lengths:") - po.ovarrf( + po.ovarre( self.outfile, "Plasma volume averaged electron Debye length (⟨λ_D⟩) (m)", "(len_plasma_debye_electron_vol_avg)", @@ -6133,7 +6133,7 @@ def output_detailed_physics(self): po.osubhd(self.outfile, "Coulomb Logarithms:") - po.ovarrf( + po.ovarre( self.outfile, "Volume averaged electron-electron Coulomb log (Λₑₑ)", "(plasma_coulomb_log_electron_electron_vol_avg)", @@ -6151,7 +6151,7 @@ def output_detailed_physics(self): self.data.physics.plasma_coulomb_log_electron_electron_profile[i], ) - po.ovarrf( + po.ovarre( self.outfile, "Volume averaged electron-deuteron Coulomb log (ΛₑD)", "(plasma_coulomb_log_electron_deuteron_vol_avg)", @@ -6169,7 +6169,7 @@ def output_detailed_physics(self): self.data.physics.plasma_coulomb_log_electron_deuteron_profile[i], ) - po.ovarrf( + po.ovarre( self.outfile, "Volume averaged electron-triton Coulomb log (ΛₑT)", "(plasma_coulomb_log_electron_triton_vol_avg)", @@ -6187,7 +6187,7 @@ def output_detailed_physics(self): self.data.physics.plasma_coulomb_log_electron_triton_profile[i], ) - po.ovarrf( + po.ovarre( self.outfile, "Volume averaged deuteron-triton Coulomb log (Λ_DT)", "(plasma_coulomb_log_deuteron_triton_vol_avg)", @@ -6205,7 +6205,7 @@ def output_detailed_physics(self): self.data.physics.plasma_coulomb_log_deuteron_triton_profile[i], ) - po.ovarrf( + po.ovarre( self.outfile, "Volume averaged electron-alpha thermal Coulomb log (Λₑαₜₕ)", "(plasma_coulomb_log_electron_alpha_thermal_vol_avg)", @@ -6225,7 +6225,7 @@ def output_detailed_physics(self): po.osubhd(self.outfile, "Collision Times:") - po.ovarrf( + po.ovarre( self.outfile, "Volume averaged electron-electron collision time (τₑₑ) (s)", "(t_plasma_electron_electron_collision_vol_avg)", @@ -6243,7 +6243,7 @@ def output_detailed_physics(self): self.data.physics.t_plasma_electron_electron_collision_profile[i], ) - po.ovarrf( + po.ovarre( self.outfile, "Volume averaged electron-deuteron collision time (τₑD) (s)", "(t_plasma_electron_deuteron_collision_vol_avg)", @@ -6261,7 +6261,7 @@ def output_detailed_physics(self): self.data.physics.t_plasma_electron_deuteron_collision_profile[i], ) - po.ovarrf( + po.ovarre( self.outfile, "Volume averaged electron-triton collision time (τₑT) (s)", "(t_plasma_electron_triton_collision_vol_avg)", @@ -6279,7 +6279,7 @@ def output_detailed_physics(self): self.data.physics.t_plasma_electron_triton_collision_profile[i], ) - po.ovarrf( + po.ovarre( self.outfile, "Volume averaged electron-alpha thermal collision time (τₑαₜₕ) (s)", "(t_plasma_electron_alpha_thermal_collision_vol_avg)", diff --git a/process/models/physics/plasma_current.py b/process/models/physics/plasma_current.py index a111545157..6f840e0a2b 100644 --- a/process/models/physics/plasma_current.py +++ b/process/models/physics/plasma_current.py @@ -81,7 +81,7 @@ def output(self) -> None: if self.data.stellarator.istell == 0: po.oblnkl(self.outfile) - po.ovarin( + po.ovarre( self.outfile, "Plasma current scaling law used", "(i_plasma_current)", @@ -95,14 +95,14 @@ def output(self) -> None: f"Plasma current model selected: {full_model_name} ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma current (Iₚ) (MA)", "(plasma_current_MA)", self.data.physics.plasma_current / 1.0e6, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma current (Iₚ) (A)", "(plasma_current)", @@ -114,7 +114,7 @@ def output(self) -> None: po.oblnkl(self.outfile) if self.data.physics.i_alphaj == 1: - po.ovarrf( + po.ovarre( self.outfile, "Current density profile factor (αⱼ)", "(alphaj)", @@ -122,7 +122,7 @@ def output(self) -> None: "OP ", ) else: - po.ovarrf( + po.ovarre( self.outfile, "Current density profile factor (αⱼ)", "(alphaj)", @@ -131,7 +131,7 @@ def output(self) -> None: po.ocmmnt(self.outfile, "Current profile index scalings:") po.oblnkl(self.outfile) - po.ovarrf( + po.ovarre( self.outfile, "J. Wesson plasma current profile index", "(alphaj_wesson)", @@ -139,7 +139,7 @@ def output(self) -> None: "OP ", ) po.oblnkl(self.outfile) - po.ovarrf( + po.ovarre( self.outfile, "On-axis plasma current density (j₀) (A/m²)", "(j_plasma_on_axis)", @@ -148,26 +148,26 @@ def output(self) -> None: ) if self.data.stellarator.istell == 0: - po.ovarrf( + po.ovarre( self.outfile, "Safety factor on axis (q₀)", "(q0)", self.data.physics.q0 ) if self.data.physics.i_plasma_current == 2: - po.ovarrf( + po.ovarre( self.outfile, "Mean edge safety factor (q₉₅)", "(q95)", self.data.physics.q95, ) - po.ovarrf( + po.ovarre( self.outfile, "Safety factor at 95% flux surface (q₉₅)", "(q95)", self.data.physics.q95, ) - po.ovarrf( + po.ovarre( self.outfile, "Cylindrical safety factor (qcyl)", "(qstar)", @@ -179,7 +179,7 @@ def output(self) -> None: self.data.physics.i_plasma_geometry == PlasmaGeometryModelType.STAR_FIESTA ): - po.ovarrf( + po.ovarre( self.outfile, "Lower limit for edge safety factor q95", "(q95_min)", @@ -189,7 +189,7 @@ def output(self) -> None: po.oblnkl(self.outfile) else: - po.ovarrf( + po.ovarre( self.outfile, "Rotational transform", "(iotabar)", @@ -1096,7 +1096,7 @@ def run(self): def output(self): """Output the plasma diamagnetic current model results.""" po.oblnkl(self.outfile) - po.ovarin( + po.ovarre( self.outfile, "Plasma diamagnetic current fraction scaling law used", "(i_diamagnetic_current)", @@ -1110,14 +1110,14 @@ def output(self): f"Diamagnetic current fraction model selected: {full_model_name} ", ) po.oblnkl(self.outfile) - po.ovarrf( + po.ovarre( self.outfile, "Diamagnetic fraction (Hender)", "(f_c_plasma_diamagnetic_hender)", self.data.current_drive.f_c_plasma_diamagnetic_hender, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Diamagnetic fraction (SCENE)", "(f_c_plasma_diamagnetic_scene)", diff --git a/process/models/physics/plasma_fields.py b/process/models/physics/plasma_fields.py index c6afc4087f..02e8f0a6c2 100644 --- a/process/models/physics/plasma_fields.py +++ b/process/models/physics/plasma_fields.py @@ -201,7 +201,7 @@ def output(self): """Output plasma magnetic fields data.""" po.oheadr(self.outfile, "Plasma magnetic fields") - po.ovarrf( + po.ovarre( self.outfile, "Vertical field at plasma (Bᵥ) (T)", "(b_plasma_vertical_required)", @@ -209,19 +209,19 @@ def output(self): "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Vacuum toroidal field at R₀ (Bᴛ(R₀)) (T)", "(b_plasma_toroidal_on_axis)", self.data.physics.b_plasma_toroidal_on_axis, ) - po.ovarrf( + po.ovarre( self.outfile, "Toroidal field at plasma inboard (Bᴛ(R₀-a)) (T)", "(b_plasma_inboard_toroidal)", self.data.physics.b_plasma_inboard_toroidal, ) - po.ovarrf( + po.ovarre( self.outfile, "Toroidal field at plasma outboard (Bᴛ(R₀+a)) (T)", "(b_plasma_outboard_toroidal)", @@ -235,7 +235,7 @@ def output(self): f"b_plasma_toroidal_profile{i}", self.data.physics.b_plasma_toroidal_profile[i], ) - po.ovarrf( + po.ovarre( self.outfile, "Plasma surface averaged poloidal field (⟨Bₚₒₗ(a)⟩) (T)", "(b_plasma_surface_poloidal_average)", @@ -243,7 +243,7 @@ def output(self): "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Total field (Bₜₒₜ) (T)", "(b_plasma_total)", diff --git a/process/models/physics/plasma_geometry.py b/process/models/physics/plasma_geometry.py index b692cd7e75..d54deb78dd 100644 --- a/process/models/physics/plasma_geometry.py +++ b/process/models/physics/plasma_geometry.py @@ -538,7 +538,7 @@ def output(self): if self.data.stellarator.istell == 0: if self.data.physics.itart == 0: self.data.physics.itart_r = self.data.physics.itart - po.ovarin( + po.ovarre( self.outfile, "Tokamak aspect ratio = Conventional, itart = 0", "(itart)", @@ -546,14 +546,14 @@ def output(self): ) elif self.data.physics.itart == 1: self.data.physics.itart_r = self.data.physics.itart - po.ovarin( + po.ovarre( self.outfile, "Tokamak aspect ratio = Spherical, itart = 1", "(itart)", self.data.physics.itart_r, ) - po.ovarin( + po.ovarre( self.outfile, "Plasma shaping model", "(i_plasma_shape)", @@ -566,18 +566,18 @@ def output(self): "plasma shape model is used :", ) - po.ovarrf( + po.ovarre( self.outfile, "Major radius (R₀) (m)", "(rmajor)", self.data.physics.rmajor ) - po.ovarrf( + po.ovarre( self.outfile, "Minor radius (a) (m)", "(rminor)", self.data.physics.rminor, "OP ", ) - po.ovarrf(self.outfile, "Aspect ratio (A)", "(aspect)", self.data.physics.aspect) - po.ovarrf( + po.ovarre(self.outfile, "Aspect ratio (A)", "(aspect)", self.data.physics.aspect) + po.ovarre( self.outfile, "Plasma squareness (ζ)", "(plasma_square)", @@ -586,7 +586,7 @@ def output(self): ) po.oblnkl(self.outfile) - po.ovarin( + po.ovarre( self.outfile, "Plasma geometry model", "(i_plasma_geometry)", @@ -609,7 +609,7 @@ def output(self): f"X-Point Elongation set from: {geom_type.kappa_model.description}", ) - po.ovarrf( + po.ovarre( self.outfile, "Elongation, X-point (κₐ)", "(kappa)", @@ -619,7 +619,7 @@ def output(self): else "OP", ) if geom_type.kappa_model == PlasmaGeometryModels.ZOHM_ITER: - po.ovarrf( + po.ovarre( self.outfile, "Zohm scaling adjustment factor", "(fkzohm)", @@ -632,7 +632,7 @@ def output(self): self.outfile, f"95% Elongation set from: {geom_type.kappa95_model.description}", ) - po.ovarrf( + po.ovarre( self.outfile, "Elongation, 95% surface (κ₉₅)", "(kappa95)", @@ -649,7 +649,7 @@ def output(self): f"X-Point Triangularity set from: {geom_type.triang_model.description}", ) - po.ovarrf( + po.ovarre( self.outfile, "Triangularity, X-point (δ)", "(triang)", @@ -664,7 +664,7 @@ def output(self): f"95% Triangularity set from: {geom_type.triang95_model.description}", ) - po.ovarrf( + po.ovarre( self.outfile, "Triangularity, 95% surface (δ₉₅)", "(triang95)", @@ -676,7 +676,7 @@ def output(self): po.oblnkl(self.outfile) - po.ovarrf( + po.ovarre( self.outfile, "Plasma poloidal perimeter (m)", "(len_plasma_poloidal)", diff --git a/process/models/power.py b/process/models/power.py index f118788469..08c76bb1fd 100644 --- a/process/models/power.py +++ b/process/models/power.py @@ -1417,7 +1417,7 @@ def output_plant_electric_powers(self): self.data.heat_transport.p_plant_primary_heat_mw, ) - po.ovarrf( + po.ovarre( self.outfile, "Thermal to electric conversion efficiency of the turbine", "(eta_turbine)", diff --git a/process/models/shield.py b/process/models/shield.py index fa87e4cced..62b01d4235 100644 --- a/process/models/shield.py +++ b/process/models/shield.py @@ -438,42 +438,42 @@ def output_shld_areas_and_volumes(self): """Output shield areas and volumes to log.""" po.oheadr(self.outfile, "Shield Areas and Volumes") - po.ovarrf( + po.ovarre( self.outfile, "Area of inboard shield surface (m^2)", "(a_shld_inboard_surface)", self.data.build.a_shld_inboard_surface, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Area of outboard shield surface (m^2)", "(a_shld_outboard_surface)", self.data.build.a_shld_outboard_surface, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Total area of shield surface (m^2)", "(a_shld_total_surface)", self.data.build.a_shld_total_surface, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Volume of inboard shield (m^3)", "(vol_shld_inboard)", self.data.blanket.vol_shld_inboard, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Volume of outboard shield (m^3)", "(vol_shld_outboard)", self.data.blanket.vol_shld_outboard, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Total volume of shield (m^3)", "(vol_shld_total)", diff --git a/process/models/stellarator/denisty_limits.py b/process/models/stellarator/denisty_limits.py index 7305ad76ca..8ca3f5b7eb 100644 --- a/process/models/stellarator/denisty_limits.py +++ b/process/models/stellarator/denisty_limits.py @@ -271,10 +271,10 @@ def output(stellarator, bt_ecrh, ne0_max_ECRH, data): ) if powerht_local >= pscalingmw_local: - po.ovarin( + po.ovarre( stellarator.outfile, "Operation point ECRH ignitable?", "(ecrh_bool)", 1 ) else: - po.ovarin( + po.ovarre( stellarator.outfile, "Operation point ECRH ignitable?", "(ecrh_bool)", 0 ) diff --git a/process/models/stellarator/divertor.py b/process/models/stellarator/divertor.py index e8393c7e78..cb8f0988fb 100644 --- a/process/models/stellarator/divertor.py +++ b/process/models/stellarator/divertor.py @@ -168,13 +168,13 @@ def output(stellarator, a_eff, l_d, l_w, f_x, l_q, w_r, Delta, data: DataStructu "(f_asym)", data.stellarator.f_asym, ) - po.ovarin( + po.ovarre( stellarator.outfile, "Poloidal resonance number", "(m_res)", data.stellarator.m_res, ) - po.ovarin( + po.ovarre( stellarator.outfile, "Toroidal resonance number", "(n_res)", diff --git a/process/models/stellarator/stellarator.py b/process/models/stellarator/stellarator.py index 326d41aa3e..a56a1deb9f 100644 --- a/process/models/stellarator/stellarator.py +++ b/process/models/stellarator/stellarator.py @@ -1492,19 +1492,19 @@ def st_fwbs(self, output: bool): "(f_p_blkt_multiplication)", self.data.fwbs.f_p_blkt_multiplication, ) - po.ovarin( + po.ovarre( self.outfile, "Number of divertor ports assumed", "(npdiv)", self.data.fwbs.npdiv, ) - po.ovarin( + po.ovarre( self.outfile, "Number of inboard H/CD ports assumed", "(nphcdin)", self.data.fwbs.nphcdin, ) - po.ovarin( + po.ovarre( self.outfile, "Number of outboard H/CD ports assumed", "(nphcdout)", @@ -1571,7 +1571,7 @@ def st_fwbs(self, output: bool): self.data.fwbs.blktmodel == 0 ): po.oblnkl(self.outfile) - po.ovarin( + po.ovarre( self.outfile, "First wall / blanket thermodynamic model", "(i_thermal_electric_conversion)", diff --git a/process/models/tfcoil/base.py b/process/models/tfcoil/base.py index cba4e39506..3fd5ed6deb 100644 --- a/process/models/tfcoil/base.py +++ b/process/models/tfcoil/base.py @@ -634,7 +634,7 @@ def output_general_tf_info(self) -> None: """ # General coil parameters po.oheadr(self.outfile, "General TF Coil Parameters") - po.ovarin( + po.ovarre( self.outfile, "TF conductor technology", "(i_tf_sup)", @@ -649,7 +649,7 @@ def output_general_tf_info(self) -> None: po.oblnkl(self.outfile) # Coil shape - po.ovarin( + po.ovarre( self.outfile, "TF coil shape model used", "(i_tf_shape)", @@ -693,7 +693,7 @@ def output_general_tf_info(self) -> None: po.ocmmnt(self.outfile, "----------------------------") po.oblnkl(self.outfile) - po.ovarin( + po.ovarre( self.outfile, "TF plasma-facing case geometry type switch", "(i_tf_case_geom)", @@ -709,7 +709,7 @@ def output_general_tf_info(self) -> None: po.oblnkl(self.outfile) # Joints strategy - po.ovarin( + po.ovarre( self.outfile, "Presence of TF demountable joints", "(itart)", @@ -728,7 +728,7 @@ def output_general_tf_info(self) -> None: po.oblnkl(self.outfile) # Centring forces support strategy - po.ovarin( + po.ovarre( self.outfile, "TF inboard leg support strategy model switch", "(i_tf_bucking)", @@ -771,7 +771,7 @@ def output_general_tf_info(self) -> None: # TF coil geometry po.osubhd(self.outfile, "TF coil Geometry :") - po.ovarin( + po.ovarre( self.outfile, "Number of TF coils", "(n_tf_coils)", diff --git a/process/models/tfcoil/superconducting.py b/process/models/tfcoil/superconducting.py index e86eece96f..dcfededa21 100644 --- a/process/models/tfcoil/superconducting.py +++ b/process/models/tfcoil/superconducting.py @@ -278,7 +278,7 @@ def output_general_superconducting_tf_info(self) -> None: po.oheadr(self.outfile, "General Superconducting TF Coil Parameters ") # Turn/WP geometry - po.ovarin( + po.ovarre( self.outfile, "Superconducting TF coil turn type", "(i_tf_turn_type)", @@ -375,7 +375,7 @@ def output_general_superconducting_tf_info(self) -> None: # Winding pack structure po.osubhd(self.outfile, "TF winding pack (WP) geometry:") - po.ovarin( + po.ovarre( self.outfile, "Winding pack shape selection switch", "(i_tf_wp_geom)", @@ -509,7 +509,7 @@ def output_general_superconducting_tf_info(self) -> None: # Number of turns po.osubhd(self.outfile, "WP turn information:") - po.ovarin( + po.ovarre( self.outfile, "Turn parameterisation", "(i_tf_turns_integer)", @@ -528,13 +528,13 @@ def output_general_superconducting_tf_info(self) -> None: "OP ", ) if self.data.tfcoil.i_tf_turns_integer == 1: - po.ovarin( + po.ovarre( self.outfile, "Number of TF pancakes", "(n_tf_wp_pancakes)", self.data.tfcoil.n_tf_wp_pancakes, ) - po.ovarin( + po.ovarre( self.outfile, "Number of TF layers", "(n_tf_wp_layers)", @@ -841,7 +841,7 @@ def output_general_superconducting_tf_info(self) -> None: def output_tf_superconductor_info(self): """Output TF superconductor information""" po.oheadr(self.outfile, "TF Coils Superconductor Information") - po.ovarin( + po.ovarre( self.outfile, "TF superconductor switch", "(i_tf_sc_mat)", @@ -3747,7 +3747,7 @@ def output_cable_in_conduit_cable_info(self) -> None: + self.data.tfcoil.a_tf_wp_extra_void + self.data.tfcoil.a_tf_wp_coolant_channels ) - po.ovarrf( + po.ovarre( self.outfile, "Check total area fractions in winding pack = 1", "", @@ -3760,20 +3760,20 @@ def output_cable_in_conduit_cable_info(self) -> None: ) / ap, ) - po.ovarrf( + po.ovarre( self.outfile, "minimum TF conductor temperature margin (K)", "(temp_tf_superconductor_margin_min)", self.data.tfcoil.temp_tf_superconductor_margin_min, ) - po.ovarrf( + po.ovarre( self.outfile, "TF conductor temperature margin (K)", "(temp_tf_superconductor_margin)", self.data.tfcoil.temp_tf_superconductor_margin, ) - po.ovarin( + po.ovarre( self.outfile, "Elastic properties behavior", "(i_tf_cond_eyoung_axial)", @@ -4782,7 +4782,7 @@ def output_croco_info(self) -> None: po.oblnkl(self.outfile) po.ocmmnt(self.outfile, "Cable information") - po.ovarin( + po.ovarre( self.outfile, "Number of CroCo strands in the cable (fixed) ", "", diff --git a/process/models/vacuum.py b/process/models/vacuum.py index 569a2ee736..39f2be1786 100644 --- a/process/models/vacuum.py +++ b/process/models/vacuum.py @@ -147,7 +147,7 @@ def vacuum_simple(self, output) -> float: # Output section if output: process_output.oheadr(self.outfile, "Vacuum System") - process_output.ovarst( + process_output.ovarre( self.outfile, "Switch for vacuum pumping model", "(i_vacuum_pumping)", @@ -571,7 +571,7 @@ def vacuum( process_output.ovarre( self.outfile, "Chamber pressure before burn (Pa)", "(pstart)", pstart ) - process_output.ovarin( + process_output.ovarre( self.outfile, "Allowable pumping time switch", "(i_vac_pump_dwell)", @@ -684,7 +684,7 @@ def vacuum( ) process_output.oblnkl(self.outfile) - process_output.ovarin( + process_output.ovarre( self.outfile, "Number of large pump ducts", "(nduct)", nduct ) process_output.ovarre( @@ -955,21 +955,21 @@ def output(self): """Output shield areas and volumes to log.""" po.oheadr(self.outfile, "Vacuum Vessel Areas and Volumes") - po.ovarrf( + po.ovarre( self.outfile, "Volume of inboard vacuum vessel (m^3)", "(vol_vv_inboard)", self.data.blanket.vol_vv_inboard, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Volume of outboard vacuum vessel (m^3)", "(vol_vv_outboard)", self.data.blanket.vol_vv_outboard, "OP ", ) - po.ovarrf( + po.ovarre( self.outfile, "Total volume of vacuum vessel (m^3)", "(vol_vv)", From a9ab6c838126a810cb63f943b8b561b074cddb77 Mon Sep 17 00:00:00 2001 From: Timothy Nunn Date: Tue, 14 Jul 2026 15:02:43 +0100 Subject: [PATCH 3/3] Update error message --- process/core/process_output.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process/core/process_output.py b/process/core/process_output.py index 8aa9857e7b..0fa3dfb222 100644 --- a/process/core/process_output.py +++ b/process/core/process_output.py @@ -68,7 +68,7 @@ def write(file, string: str): elif file == constants.IOTTY: print(string) else: - error_msg = f"Unknown file identifier {file}." + error_msg = f"Unknown file identifier {file}, it is not recognised as either an MFile, OUTFile, or terminal." raise ProcessValueError(error_msg)