diff --git a/documentation/source/unique-models/buildings_sizes.md b/documentation/source/unique-models/buildings_sizes.md index 9b4570b15d..5dfaa8423d 100644 --- a/documentation/source/unique-models/buildings_sizes.md +++ b/documentation/source/unique-models/buildings_sizes.md @@ -141,4 +141,4 @@ Amalgamating multiple individual buildings (and using an average height), this e ## Summary variables - Effective floor area for AC power module, `a_plant_floor_effective`: total floor area (m2) across all buildings. This estimate attempts to account for multiple floors within buildings by assuming an average storey height of 6m across the site; the volume of all buildings is therefore summed and divided by 6. -- Total volume of nuclear buildings, `volnucb`: sum of all nuclear building (external) volumes. +- Total volume of nuclear buildings, `vol_plant_nuclear_buildings`: sum of all nuclear building (external) volumes. diff --git a/process/core/init.py b/process/core/init.py index 5aba77d345..eaa124649f 100644 --- a/process/core/init.py +++ b/process/core/init.py @@ -329,7 +329,7 @@ def check_process(inputs, data): # noqa: ARG001 ) if data.physics.f_plasma_fuel_tritium < 1.0e-3: # tritium fraction is negligible - data.buildings.triv = 0.0 + data.buildings.vol_plant_tritium_fuel_building = 0.0 data.heat_transport.p_tritium_plant_electric_mw = 0.0 if data.impurity_radiation.f_nd_impurity_electrons[1] != 0.1: # noqa: RUF069 diff --git a/process/core/input.py b/process/core/input.py index f9466abda4..9528ae996b 100644 --- a/process/core/input.py +++ b/process/core/input.py @@ -192,7 +192,7 @@ def bounds(self) -> tuple[NumberType | None, NumberType | None]: "fkzohm": InputVariable("physics", float, range=(0.5, 2.0)), "abktflnc": InputVariable("costs", float, range=(0.1, 100.0)), "adivflnc": InputVariable("costs", float, range=(0.1, 100.0)), - "admv": InputVariable("buildings", float, range=(1.0e4, 1.0e6)), + "vol_plant_administration_building": InputVariable("buildings", float, range=(1.0e4, 1.0e6)), "airtemp": InputVariable("water_use", float, range=(-15.0, 40.0)), "alfapf": InputVariable("pf_coil", float, range=(1e-12, 1.0)), "stress_cs_steel_max": InputVariable( @@ -271,7 +271,7 @@ def bounds(self) -> tuple[NumberType | None, NumberType | None]: "control_buildings_h": InputVariable("buildings", float, range=(1.0, 100.0)), "control_buildings_l": InputVariable("buildings", float, range=(10.0, 1000.0)), "control_buildings_w": InputVariable("buildings", float, range=(10.0, 1000.0)), - "conv": InputVariable("buildings", float, range=(10000.0, 1000000.0)), + "vol_plant_control_building": InputVariable("buildings", float, range=(10000.0, 1000000.0)), "coolp": InputVariable("fwbs", float, range=(100000.0, 100000000.0)), "copper_rrr": InputVariable("rebco", float, range=(1.0, 10000.0)), "dx_tf_hts_tape_copper": InputVariable( @@ -478,7 +478,9 @@ def bounds(self) -> tuple[NumberType | None, NumberType | None]: "flpitch": InputVariable("stellarator", float, range=(0.0001, 0.01)), "f_div_flux_expansion": InputVariable("divertor", float, range=(0.0, 10.0)), "fmgdmw": InputVariable("heat_transport", float, range=(0.0, 100.0)), - "fndt": InputVariable("buildings", float, range=(0.0, 10.0)), + "dz_plant_reactor_building_foundation": InputVariable( + "buildings", float, range=(0.0, 10.0) + ), "f_p_beam_orbit_loss": InputVariable("current_drive", float, range=(0.0, 0.999)), "f_p_blkt_coolant_pump_total_heat": InputVariable( "heat_transport", float, range=(0.0, 0.2) @@ -693,9 +695,13 @@ def bounds(self) -> tuple[NumberType | None, NumberType | None]: "rad_fraction_sol": InputVariable("physics", float, range=(0.0, 1.0)), "radius_fw_channel": InputVariable("fwbs", float, range=(0.001, 0.5)), "outgrat_fw": InputVariable("vacuum", float, range=(1e-10, 1e-06)), - "rbrt": InputVariable("buildings", float, range=(0.0, 10.0)), + "dz_plant_reactor_building_roof": InputVariable( + "buildings", float, range=(0.0, 10.0) + ), "rbvfac": InputVariable("buildings", float, range=(0.9, 3.0)), - "rbwt": InputVariable("buildings", float, range=(0.0, 10.0)), + "dx_plant_reactor_building_wall": InputVariable( + "buildings", float, range=(0.0, 10.0) + ), "radius_cp_coolant_channel": InputVariable("tfcoil", float, range=(1e-06, 1.0)), "reactor_clrnc": InputVariable("buildings", float, range=(0.0, 10.0)), "reactor_fndtn_thk": InputVariable("buildings", float, range=(0.25, 25.0)), @@ -748,7 +754,9 @@ def bounds(self) -> tuple[NumberType | None, NumberType | None]: "rrin": InputVariable("ife", float, range=(0.1, 50.0)), "rrmax": InputVariable("ife", float, range=(1.0, 50.0)), "rrr_tf_cu": InputVariable("tfcoil", float, range=(1.0, 1000.0)), - "rxcl": InputVariable("buildings", float, range=(0.0, 10.0)), + "dr_plant_reactor_extra_clearance": InputVariable( + "buildings", float, range=(0.0, 10.0) + ), "sec_buildings_h": InputVariable("buildings", float, range=(1.0, 100.0)), "sec_buildings_l": InputVariable("buildings", float, range=(10.0, 1000.0)), "sec_buildings_w": InputVariable("buildings", float, range=(10.0, 1000.0)), @@ -762,7 +770,7 @@ def bounds(self) -> tuple[NumberType | None, NumberType | None]: "dz_shld_lower": InputVariable("build", float, range=(0.0, 10.0)), "dz_shld_upper": InputVariable("build", float, range=(0.0, 10.0)), "shmf": InputVariable("buildings", float, range=(0.0, 1.0)), - "shov": InputVariable("buildings", float, range=(1000.0, 1000000.0)), + "vol_plant_shops_warehouse_buildings": InputVariable("buildings", float, range=(1000.0, 1000000.0)), "sig_tf_case_max": InputVariable("tfcoil", float, range=(1000000.0, 100000000000.0)), "sig_tf_wp_max": InputVariable("tfcoil", float, range=(1000000.0, 100000000000.0)), "sigallpc": InputVariable("build", float, range=(0.0, 1000000000.0)), @@ -775,7 +783,9 @@ def bounds(self) -> tuple[NumberType | None, NumberType | None]: ), "staff_buildings_h": InputVariable("buildings", float, range=(1.0, 100.0)), "startupratio": InputVariable("costs", float, range=(0.0, 10.0)), - "stcl": InputVariable("buildings", float, range=(0.0, 10.0)), + "dz_plant_reactor_building_crane_roof_clearance": InputVariable( + "buildings", float, range=(0.0, 10.0) + ), "str_cs_con_res": InputVariable("tfcoil", float, range=(-0.02, 0.02)), "str_pf_con_res": InputVariable("tfcoil", float, range=(-0.02, 0.02)), "str_tf_con_res": InputVariable("tfcoil", float, range=(-0.02, 0.02)), @@ -834,7 +844,7 @@ def bounds(self) -> tuple[NumberType | None, NumberType | None]: "temp_fw_max": InputVariable("fwbs", float, range=(500.0, 2000.0)), "temp_plasma_pedestal_kev": InputVariable("physics", float, range=(0.0, 20.0)), "temp_plasma_separatrix_kev": InputVariable("physics", float, range=(0.0, 20.0)), - "tfcbv": InputVariable("buildings", float, range=(10000.0, 1000000.0)), + "vol_plant_tf_power_supplies_building": InputVariable("buildings", float, range=(10000.0, 1000000.0)), "dx_tf_wp_insertion_gap": InputVariable("tfcoil", float, range=(1e-10, 0.1)), "f_dr_tf_outboard_inboard": InputVariable("build", float, range=(0.2, 5.0)), "tftmp": InputVariable("tfcoil", float, range=(0.01, 293.0)), @@ -867,13 +877,15 @@ def bounds(self) -> tuple[NumberType | None, NumberType | None]: "i_t_current_ramp_up": InputVariable("times", int, choices=[0, 1]), "transp_clrnc": InputVariable("buildings", float, range=(0.0, 10.0)), "f_temp_plasma_ion_electron": InputVariable("physics", float, range=(0.0, 2.0)), - "trcl": InputVariable("buildings", float, range=(0.0, 10.0)), + "dr_plant_reactor_building_transport_clearance": InputVariable( + "buildings", float, range=(0.0, 10.0) + ), "triang": InputVariable("physics", float, range=(-1.0, 1.0)), "triang95": InputVariable("physics", float, range=(0.0, 1.0)), "p_tritium_plant_electric_mw": InputVariable( "heat_transport", float, range=(0.0, 100.0) ), - "triv": InputVariable("buildings", float, range=(10000.0, 1000000.0)), + "vol_plant_tritium_fuel_building": InputVariable("buildings", float, range=(10000.0, 1000000.0)), "turbine_hall_h": InputVariable("buildings", float, range=(1.0, 100.0)), "turbine_hall_l": InputVariable("buildings", float, range=(10.0, 1000.0)), "turbine_hall_w": InputVariable("buildings", float, range=(10.0, 1000.0)), @@ -968,7 +980,7 @@ def bounds(self) -> tuple[NumberType | None, NumberType | None]: "water_buildings_l": InputVariable("buildings", float, range=(10.0, 1000.0)), "water_buildings_w": InputVariable("buildings", float, range=(10.0, 1000.0)), "watertemp": InputVariable("water_use", float, range=(0.0, 25.0)), - "wgt": InputVariable("buildings", float, range=(10000.0, 1000000.0)), + "m_plant_reactor_building_crane_capacity": InputVariable("buildings", float, range=(10000.0, 1000000.0)), "wgt2": InputVariable("buildings", float, range=(10000.0, 1000000.0)), "windspeed": InputVariable("water_use", float, range=(0.0, 10.0)), "workshop_h": InputVariable("buildings", float, range=(1.0, 100.0)), diff --git a/process/core/io/plot/summary.py b/process/core/io/plot/summary.py index e8b2fea071..000c4f8e40 100644 --- a/process/core/io/plot/summary.py +++ b/process/core/io/plot/summary.py @@ -30,6 +30,7 @@ calculate_von_mises_stress, poisson_steel, ) +from process.models.buildings import BuildingsITER1992 from process.models.geometry.blanket import ( blanket_geometry_double_null, blanket_geometry_single_null, diff --git a/process/data_structure/buildings_variables.py b/process/data_structure/buildings_variables.py index a37336e778..ac0d4d4d9c 100644 --- a/process/data_structure/buildings_variables.py +++ b/process/data_structure/buildings_variables.py @@ -3,7 +3,7 @@ @dataclass(slots=True) class BuildingsData: - admv: float = 1.0e5 + vol_plant_administration_building: float = 1.0e5 """administration building volume (m3)""" admvol: float = 0.0 @@ -54,7 +54,7 @@ class BuildingsData: control_buildings_h: float = 6.0 """control building height (m)""" - conv: float = 6.0e4 + vol_plant_control_building: float = 6.0e4 """control building volume (m3)""" convol: float = 0.0 @@ -90,12 +90,15 @@ class BuildingsData: cryostat_clrnc: float = 2.5 """vertical clearance from TF coil to cryostat (m)""" - cryvol: float = 0.0 + vol_plant_cryoplant_building: float = 0.0 """volume of cryoplant building (m3)""" a_plant_floor_effective: float = 0.0 """effective total floor space (m2)""" + +dz_plant_reactor_building_internal: float = None +"""Internal height of the reactor building (m)""" elecdist_l: float = 380.0 """Transformers and electrical distribution facilities length (m)""" @@ -123,7 +126,7 @@ class BuildingsData: elecstore_h: float = 12.0 """Energy Storage facilities height (m)""" - elevol: float = 0.0 + vol_plant_electrical_building: float = 0.0 """volume of electrical equipment building (m3)""" esbldgm3: float = 1.0e3 @@ -135,7 +138,7 @@ class BuildingsData: fc_building_w: float = 60.0 """Fuel Cycle facilities width (m)""" - fndt: float = 2.0 + dz_plant_reactor_building_foundation: float = 2.0 """foundation thickness (m)""" gas_buildings_l: float = 25.0 @@ -270,13 +273,13 @@ class BuildingsData: rbvfac: float = 1.6 """reactor building volume multiplication factor""" - rbrt: float = 1.0 + dz_plant_reactor_building_roof: float = 1.0 """reactor building roof thickness (m)""" - rbvol: float = 0.0 + vol_plant_reactor_building: float = 0.0 """reactor building volume (m3)""" - rbwt: float = 2.0 + dx_plant_reactor_building_wall: float = 2.0 """reactor building wall thickness (m)""" reactor_clrnc: float = 4.0 @@ -300,7 +303,7 @@ class BuildingsData: reactor_wall_thk: float = 2.0 """reactor building wall thickness (m)""" - rmbvol: float = 0.0 + vol_plant_maintenance_assembly_building: float = 0.0 """volume of maintenance and assembly building (m3)""" robotics_l: float = 50.0 @@ -312,10 +315,12 @@ class BuildingsData: robotics_h: float = 30.0 """robotics buildings height (m)""" - row: float = 4.0 + dr_plant_reactor_crane_clearance: float = 4.0 """clearance to building wall for crane operation (m)""" - rxcl: float = 4.0 +dz_plant_reactor_building_crane: float = None +"""Height of crane operation in the reactor building (m)""" + dr_plant_reactor_extra_clearance: float = 4.0 """clearance around reactor (m)""" sec_buildings_l: float = 30.0 @@ -330,7 +335,7 @@ class BuildingsData: shmf: float = 0.5 """fraction of shield mass per TF coil to be moved in the maximum shield lift""" - shov: float = 1.0e5 + vol_plant_shops_warehouse_buildings: float = 1.0e5 """shops and warehouse volume (m3)""" shovol: float = 0.0 @@ -342,19 +347,19 @@ class BuildingsData: staff_buildings_h: float = 5.0 """staff buildings height (m)""" - stcl: float = 3.0 + dz_plant_reactor_building_crane_roof_clearance: float = 3.0 """clearance above crane to roof (m)""" - tfcbv: float = 2.0e4 + vol_plant_tf_power_supplies_building: float = 2.0e4 """volume of TF coil power supply building (m3) (calculated if TF coils are superconducting)""" transp_clrnc: float = 1.0 """transportation clearance between components (m)""" - trcl: float = 1.0 + dr_plant_reactor_building_transport_clearance: float = 1.0 """transportation clearance between components (m)""" - triv: float = 4.0e4 + vol_plant_tritium_fuel_building: float = 4.0e4 """volume of tritium, fuel handling and health physics buildings (m3)""" turbine_hall_l: float = 109.0 @@ -375,10 +380,10 @@ class BuildingsData: tw_storage_h: float = 5.0 """tritiated waste storage building height (m)""" - volrci: float = 0.0 + vol_plant_reactor_building_internal: float = 0.0 """internal volume of reactor building (m3)""" - volnucb: float = 0.0 + vol_plant_nuclear_buildings: float = 0.0 """sum of nuclear buildings volumes (m3)""" warm_shop_l: float = 100.0 @@ -399,7 +404,7 @@ class BuildingsData: water_buildings_h: float = 5.0 """water, laundry & drainage buildings height (m)""" - wgt: float = 5.0e5 + m_plant_reactor_building_crane_capacity: float = 5.0e5 """reactor building crane capacity (kg) (calculated if 0 is input)""" wgt2: float = 1.0e5 @@ -414,10 +419,10 @@ class BuildingsData: workshop_h: float = 10.0 """[cold] workshop buildings height (m)""" - wrbi: float = 0.0 + dr_plant_reactor_building_internal_half: float = 0.0 """distance from centre of machine to building wall (m)""" - wsvol: float = 0.0 + vol_plant_warm_shop_building: float = 0.0 """volume of warm shop building (m3)""" wsvfac: float = 1.9 diff --git a/process/models/buildings.py b/process/models/buildings.py index 0e8a920ab8..2fba10d55f 100644 --- a/process/models/buildings.py +++ b/process/models/buildings.py @@ -1,7 +1,11 @@ import logging +from enum import IntEnum +from typing import TYPE_CHECKING, Literal +import matplotlib.pyplot as plt import numpy as np +import process.core.io.mfile as mf from process.core import constants from process.core import process_output as po from process.core.model import Model @@ -10,9 +14,19 @@ CurrentDriveModel, ) +if TYPE_CHECKING: + pass + logger = logging.getLogger(__name__) +class BuildingsModel(IntEnum): + """Enum for building size estimation models""" + + ITER_1992 = 0 + CHAPMAN_2024 = 1 + + class Buildings(Model): """ @@ -25,6 +39,8 @@ def __init__(self): This routine calls the buildings calculations. """ self.outfile = constants.NOUT # output file unit + self.iter_1992 = BuildingsITER1992() + self.chapman_2024 = BuildingsChapman2024() def output(self): self.run(output=True) @@ -33,14 +49,16 @@ def run(self, output: bool = False): # Find TF coil radial positions # outboard edge: outboard mid-leg radial position + half-thickness # of outboard leg - tfro = self.data.build.r_tf_outboard_mid + ( + r_tf_outboard_out = self.data.build.r_tf_outboard_mid + ( self.data.build.dr_tf_outboard * 0.5e0 ) # inboard edge: inboard mid-leg radial position - half-thickness of inboard leg - tfri = self.data.build.r_tf_inboard_mid - (self.data.build.dr_tf_inboard * 0.5e0) + r_tf_inboard_in = self.data.build.r_tf_inboard_mid - (self.data. + build.dr_tf_inboard * 0.5e0 + ) # Find width, in radial dimension, of TF coil (m) - tf_radial_dim = tfro - tfri + tf_radial_dim = r_tf_outboard_out - r_tf_inboard_in # Find full height of TF coil (m) # = 2 * (mid-plane to TF coil inside edge + thickness of coil) @@ -53,54 +71,65 @@ def run(self, output: bool = False): # Calculate building areas and volumes - if self.data.buildings.i_bldgs_size == 1: + if ( + BuildingsModel(self.data.buildings.i_bldgs_size) + == BuildingsModel.CHAPMAN_2024 + ): # Updated building estimates - self.bldgs_sizes(output, tf_radial_dim, tf_vertical_dim) + self.chapman_2024.calculate_building_sizes_chapman( + output, tf_radial_dim, tf_vertical_dim + ) else: # Previous estimation work ( - self.data.buildings.cryvol, - self.data.buildings.volrci, - self.data.buildings.rbvol, - self.data.buildings.rmbvol, - self.data.buildings.wsvol, - self.data.buildings.elevol, - ) = self.bldgs( - output, - self.data.pf_coil.r_pf_coil_outer_max, - self.data.pf_coil.m_pf_coil_max, - tfro, - tfri, - tf_vertical_dim, - tfmtn, - self.data.tfcoil.n_tf_coils, - self.data.build.r_shld_outboard_outer, - self.data.build.r_shld_inboard_inner, - 2.0e0 + self.data.buildings.vol_plant_cryoplant_building, + self.data.buildings.vol_plant_reactor_building_internal, + self.data.buildings.vol_plant_reactor_building, + self.data.buildings.vol_plant_maintenance_assembly_building, + self.data.buildings.vol_plant_warm_shop_building, + self.data.buildings.vol_plant_electrical_building, + ) = self.iter_1992.calculate_building_sizes_1992( + r_pf_coil_outer_max=self.data.pf_coil.r_pf_coil_outer_max, + m_pf_coil_max=self.data.pf_coil.m_pf_coil_max, + r_tf_outboard_out=r_tf_outboard_out, + r_tf_inboard_in=r_tf_inboard_in, + dz_tf_full=tf_vertical_dim, + m_tf_coil_tonne=tfmtn, + self.data.n_tf_coils=tfcoil.n_tf_coils, + self.data.r_shld_outboard_outer=build.r_shld_outboard_outer, + self.data.r_shld_inboard_inner=build.r_shld_inboard_inner, + dz_shld=2.0e0 * (self.data.build.z_tf_inside_half - self.data.build.dz_shld_vv_gap) - self.data.build.dz_vv_upper - self.data.build.dz_vv_lower, - self.data.fwbs.whtshld, - self.data.fwbs.r_cryostat_inboard, - self.data.heat_transport.helpow, + m_shld_total=self.data.fwbs.whtshld, + r_cryostat_outboard=self.data.fwbs.r_cryostat_inboard, + self.data.helpow=heat_transport.helpow, ) - def bldgs( + if output: + self.iter_1992.output_buildings() + + +class BuildingsITER1992: + def __init__(self): + self.outfile = constants.NOUT + + def calculate_building_sizes_1992( self, - output: bool, - pfr, - pfm, - tfro, - tfri, - tfh, - tfm, + r_pf_coil_outer_max, + m_pf_coil_max, + r_tf_outboard_out, + r_tf_inboard_in, + dz_tf_full, + m_tf_coil_tonne, n_tf_coils, - shro, - shri, - shh, - shm, - crr, + r_shld_outboard_outer, + r_shld_inboard_inner, + dz_shld, + m_shld_total, + r_cryostat_outboard, helpow, ): """Determines the sizes of the plant buildings @@ -119,86 +148,99 @@ def bldgs( ---------- output: - pfr : + r_pf_coil_outer_max : largest PF coil outer radius, m - pfm : + m_pf_coil_max : largest PF coil mass, tonne - tfro : + r_tf_outboard_out : outer radius of TF coil, m - tfri : + r_tf_inboard_in : inner radius of TF coil, m - tfh : + dz_tf_full : full height of TF coil, m - tfm : + m_tf_coil_tonne : mass of one TF coil, tonne n_tf_coils : number of tf coils - shro : + r_shld_outboard_outer : outer radius of attached shield, m - shri : + r_shld_inboard_inner : inner radius of attached shield, m - shh : + dz_shld : height of attached shield, m - shm : + m_shld_total : total mass of attached shield, kg - crr : + r_cryostat_outboard : outer radius of common cryostat, m helpow : total cryogenic load, W Returns ------- - cryv: + vol_plant_cryoplant_building: volume of cryogenic building, m3 - vrci: + vol_plant_reactor_building_internal: inner volume of reactor building, m3 - rbv: + vol_plant_reactor_building: outer volume of reactor building, m3 - rmbv: + vol_plant_maintenance_assembly_building: volume of reactor maintenance building, m3 - wsv: + vol_plant_warm_shop_building: volume of warm shop, m3 - elev: + vol_plant_electrical_building: volume of electrical buildings, m3 """ # Reactor building # Determine basic machine radius (m) - # crr : cryostat radius (m) - # pfr : radius of largest PF coil (m) - # tfro : outer radius of TF coil (m) - bmr = max(crr, pfr, tfro) + # r_cryostat_outboard : cryostat radius (m) + # r_pf_coil_outer_max : radius of largest PF coil (m) + # r_tf_outboard_out : outer radius of TF coil (m) + r_machine = max(r_cryostat_outboard, r_pf_coil_outer_max, r_tf_outboard_out) # Determine largest transported piece - sectl = shro - shri # Shield thickness (m) - coill = tfro - tfri # TF coil thickness (m) - sectl = max(coill, sectl) + dz_shld_full = ( + r_shld_outboard_outer - r_shld_inboard_inner + ) # Shield thickness (m) + dz_tf_full_midplane = ( + r_tf_outboard_out - r_tf_inboard_in + ) # TF coil thickness (m) + dz_shld_full = max(dz_tf_full_midplane, dz_shld_full) # Calculate half width of building (m) - # rxcl : clearance around reactor, m - # trcl : transportation clearance between components, m + # dr_plant_reactor_extra_clearance : clearance around reactor, m + # dr_plant_reactor_building_transport_clearance : transportation clearance between components, m # row : clearance to building wall for crane operation, m # 19.48258241468535 + 4 + max(13.764874193548387 - 4.7423258064516141, # 17.123405859443331 - 2.9939411851091102) + 1 + 4 # = 42.61204708901957 - self.data.buildings.wrbi = ( - bmr - + self.data.buildings.rxcl - + sectl - + self.data.buildings.trcl - + self.data.buildings.row + self.data.buildings.dr_plant_reactor_building_internal_half = ( + r_machine + + self.data.buildings.dr_plant_reactor_extra_clearance + + dz_shld_full + + self.data.buildings.dr_plant_reactor_building_transport_clearance + + self.data.buildings.dr_plant_reactor_crane_clearance ) # Calculate length to allow PF or cryostat laydown (m) # Laydown length (m) - layl = max(crr, pfr) + len_reactor_laydown = max(r_cryostat_outboard, r_pf_coil_outer_max) # Diagonal length (m) - hy = bmr + self.data.buildings.rxcl + sectl + self.data.buildings.trcl + layl + hy = ( + r_machine + + self.data.buildings.dr_plant_reactor_extra_clearance + + dz_shld_full + + self.data.buildings.dr_plant_reactor_building_transport_clearance + + len_reactor_laydown + ) # Angle between diagonal length and floor (m) - ang = (self.data.buildings.wrbi - self.data.buildings.trcl - layl) / hy + ang = (self.data.buildings.dr_plant_reactor_building_internal_half + - self.data.buildings.dr_plant_reactor_building_transport_clearance + - len_reactor_laydown + ) / hy # Cap angle at 1 if abs(ang) > 1.0e0: @@ -206,56 +248,85 @@ def bldgs( # Length to allow laydown (m) drbi = ( - self.data.buildings.trcl - + layl + self.data.buildings.dr_plant_reactor_building_transport_clearance + + len_reactor_laydown + hy * np.sin(np.arccos(ang)) - + self.data.buildings.wrbi + + self.data.buildings.dr_plant_reactor_building_internal_half ) # Crane height based on maximum lift (m) - # wgt : reactor building crane capacity (kg) + # m_plant_reactor_building_crane_capacity : reactor building crane capacity (kg) # Calculated if 0 is input # shmf : fraction of shield mass per TF coil to be moved in # the maximum shield lift - if self.data.buildings.wgt > 1.0e0: - wt = self.data.buildings.wgt + if self.data.buildings.m_plant_reactor_building_crane_capacity > 1.0e0: + m_plant_reactor_building_crane_capacity = self.data.( + buildings.m_plant_reactor_building_crane_capacity + ) else: - wt = self.data.buildings.shmf * shm / n_tf_coils - wt = max(wt, 1.0e3 * pfm, 1.0e3 * tfm) + m_plant_reactor_building_crane_capacity = self.data.( + buildings.shmf * m_shld_total / n_tf_coils + ) + m_plant_reactor_building_crane_capacity = max( + m_plant_reactor_building_crane_capacity, + 1.0e3 * m_pf_coil_max, + 1.0e3 * m_tf_coil_tonne, + ) # Crane height (m) - crcl = 9.41e-6 * wt + 5.1e0 + buildings_variables.dz_plant_reactor_building_crane = ( + 9.41e-6 * m_plant_reactor_building_crane_capacity + 5.1e0 + ) # Building height (m) # dz_tf_cryostat : clearance from TF coil to cryostat top, m # clh2 : clearance beneath TF coil to foundation, including basement, m - # stcl : clearance above crane to roof, m - # Additional tfh allows TF coil to be lifted right out - hrbi = ( + # dz_plant_reactor_building_crane_roof_clearance : clearance above crane to roof, m + # Additional dz_tf_full allows TF coil to be lifted right out + dz_plant_reactor_building_internal = ( + buildings_variables.dz_plant_reactor_building_internal + ) = ( self.data.buildings.clh2 - + 2.0e0 * tfh + + 2.0e0 * dz_tf_full + self.data.buildings.dz_tf_cryostat - + self.data.buildings.trcl - + crcl - + self.data.buildings.stcl + + self.data.buildings.dr_plant_reactor_building_transport_clearance + + buildings_variables.dz_plant_reactor_building_crane + + self.data.buildings.dz_plant_reactor_building_crane_roof_clearance ) # Internal volume (m3) - vrci = ( - self.data.buildings.rbvfac * 2.0e0 * self.data.buildings.wrbi * drbi * hrbi + buildings_variables.vol_plant_reactor_building_internal = ( + self.data.buildings.rbvfac + * 2.0e0 + * self.data.buildings.dr_plant_reactor_building_internal_half + * drbi + * dz_plant_reactor_building_internal ) - if np.isinf(vrci): - logger.error("vrci is inf. Kludging to 1e10.") - vrci = 1e10 + try: + assert buildings_variables.vol_plant_reactor_building_internal < np.inf + except AssertionError: + logger.exception( + "vol_plant_reactor_building_internal is inf. Kludging to 1e10." + ) + buildings_variables.vol_plant_reactor_building_internal = 1e10 # External dimensions of reactor building (m) - # rbwt : reactor building wall thickness, m - # rbrt : reactor building roof thickness, m - # fndt : foundation thickness, m - rbw = 2.0e0 * self.data.buildings.wrbi + 2.0e0 * self.data.buildings.rbwt - rbl = drbi + 2.0e0 * self.data.buildings.rbwt - rbh = hrbi + self.data.buildings.rbrt + self.data.buildings.fndt - rbv = self.data.buildings.rbvfac * rbw * rbl * rbh + # dx_plant_reactor_building_wall : reactor building wall thickness, m + # dz_plant_reactor_building_roof : reactor building roof thickness, m + # dz_plant_reactor_building_foundation : foundation thickness, m + rbw = ( + 2.0e0 * self.data.buildings.dr_plant_reactor_building_internal_half + + 2.0e0 * self.data.buildings.dx_plant_reactor_building_wall + ) + rbl = drbi + 2.0e0 * self.data.buildings.dx_plant_reactor_building_wall + rbh = ( + dz_plant_reactor_building_internal + + self.data.buildings.dz_plant_reactor_building_roof + + self.data.buildings.dz_plant_reactor_building_foundation + ) + buildings_variables.vol_plant_reactor_building = self.data.( + buildings.rbvfac * rbw * rbl * rbh + ) # Maintenance building # The reactor maintenance building includes the hot cells, the @@ -265,16 +336,29 @@ def bldgs( # Transport corridor size # hcwt : hot cell wall thickness, m - tcw = shro - shri + 4.0e0 * self.data.buildings.trcl - tcl = 5.0e0 * tcw + 2.0e0 * self.data.buildings.hcwt + dr_plant_transport_corridor = ( + r_shld_outboard_outer + - r_shld_inboard_inner + + 4.0e0 * self.data.buildings.dr_plant_reactor_building_transport_clearance + ) + tcl = 5.0e0 * dr_plant_transport_corridor + 2.0e0 * self.data.buildings.hcwt # Decontamination cell size - dcw = 2.0e0 * tcw + 1.0e0 + dcw = 2.0e0 * dr_plant_transport_corridor + 1.0e0 # Hot cell size # hccl : clearance around components in hot cell, m - hcw = shro - shri + 3.0e0 * self.data.buildings.hccl + 2.0e0 - hcl = 3.0e0 * (shro - shri) + 4.0e0 * self.data.buildings.hccl + tcw + hcw = ( + r_shld_outboard_outer + - r_shld_inboard_inner + + 3.0e0 * self.data.buildings.hccl + + 2.0e0 + ) + hcl = ( + 3.0e0 * (r_shld_outboard_outer - r_shld_inboard_inner) + + 4.0e0 * self.data.buildings.hccl + + dr_plant_transport_corridor + ) # Maintenance building dimensions rmbw = hcw + dcw + 3.0e0 * self.data.buildings.hcwt @@ -286,34 +370,43 @@ def bldgs( if self.data.buildings.wgt2 > 1.0e0: wgts = self.data.buildings.wgt2 else: - wgts = self.data.buildings.shmf * shm / n_tf_coils + wgts = self.data.buildings.shmf * m_shld_total / n_tf_coils cran = 9.41e-6 * wgts + 5.1e0 rmbh = ( 10.0e0 - + shh - + self.data.buildings.trcl + + dz_shld + + self.data.buildings.dr_plant_reactor_building_transport_clearance + cran - + self.data.buildings.stcl - + self.data.buildings.fndt + + self.data.buildings.dz_plant_reactor_building_crane_roof_clearance + + self.data.buildings.dz_plant_reactor_building_foundation + ) + tch = ( + dz_shld + + self.data.buildings.dz_plant_reactor_building_crane_roof_clearance + + self.data.buildings.dz_plant_reactor_building_foundation ) - tch = shh + self.data.buildings.stcl + self.data.buildings.fndt # Volume - rmbv = self.data.buildings.mbvfac * rmbw * rmbl * rmbh + tcw * tcl * tch + buildings_variables.vol_plant_maintenance_assembly_building = self.data.( + buildings.mbvfac * rmbw * rmbl * rmbh + + dr_plant_transport_corridor * tcl * tch + ) # Warm shop and hot cell gallery wsa = (rmbw + 7.0e0) * 20.0e0 + rmbl * 7.0e0 - wsv = self.data.buildings.wsvfac * wsa * rmbh + buildings_variables.vol_plant_warm_shop_building = self.data.( + buildings.wsvfac * wsa * rmbh + ) # Cryogenic building volume - cryv = 55.0e0 * helpow**0.5 + buildings_variables.vol_plant_cryoplant_building = 55.0e0 * helpow**0.5 # Other building volumes # pibv : power injection building volume, m3 # esbldgm3 is forced to be zero if no energy storage is required # (i_pulsed_plant=0) - elev = ( - self.data.buildings.tfcbv + buildings_variables.vol_plant_electrical_building = ( + self.data.buildings.vol_plant_tf_power_supplies_building + self.data.buildings.pfbldgm3 + self.data.buildings.esbldgm3 + self.data.buildings.pibv @@ -321,81 +414,161 @@ def bldgs( # Calculate effective floor area for ac power module self.data.buildings.a_plant_floor_effective = ( - rbv - + rmbv - + wsv - + self.data.buildings.triv - + elev - + self.data.buildings.conv - + cryv - + self.data.buildings.admv - + self.data.buildings.shov + buildings_variables.vol_plant_reactor_building + + buildings_variables.vol_plant_maintenance_assembly_building + + buildings_variables.vol_plant_warm_shop_building + + self.data.buildings.vol_plant_tritium_fuel_building + + buildings_variables.vol_plant_electrical_building + + self.data.buildings.vol_plant_control_building + + buildings_variables.vol_plant_cryoplant_building + + self.data.buildings.vol_plant_administration_building + + self.data.buildings.vol_plant_shops_warehouse_buildings ) / 6.0e0 - self.data.buildings.admvol = self.data.buildings.admv - self.data.buildings.shovol = self.data.buildings.shov - self.data.buildings.convol = self.data.buildings.conv + self.data.buildings.admvol = self.data.( + buildings.vol_plant_administration_building + ) + self.data.buildings.shovol = self.data.( + buildings.vol_plant_shops_warehouse_buildings + ) + self.data.buildings.convol = self.data.buildings.vol_plant_control_building # Total volume of nuclear buildings - self.data.buildings.volnucb = vrci + rmbv + wsv + self.data.buildings.triv + cryv + buildings_variables.vol_plant_nuclear_buildings = ( + buildings_variables.vol_plant_reactor_building_internal + + buildings_variables.vol_plant_maintenance_assembly_building + + buildings_variables.vol_plant_warm_shop_building + + buildings_variables.vol_plant_tritium_fuel_building + + buildings_variables.vol_plant_cryoplant_building + ) - # Output ! - # !!!!!!!!! + return ( + buildings_variables.vol_plant_cryoplant_building, + buildings_variables.vol_plant_reactor_building_internal, + buildings_variables.vol_plant_reactor_building, + buildings_variables.vol_plant_maintenance_assembly_building, + buildings_variables.vol_plant_warm_shop_building, + buildings_variables.vol_plant_electrical_building, + ) - if output: - po.oheadr(self.outfile, "Plant Buildings System") - po.ovarre( - self.outfile, "Internal volume of reactor building (m3)", "(vrci)", vrci - ) - po.ovarre( - self.outfile, - "Dist from centre of torus to bldg wall (m)", - "(wrbi)", - self.data.buildings.wrbi, - ) - po.ovarre( - self.outfile, - "Effective floor area (m2)", - "(a_plant_floor_effective)", - self.data.buildings.a_plant_floor_effective, - ) - po.ovarre(self.outfile, "Reactor building volume (m3)", "(rbv)", rbv) - po.ovarre( - self.outfile, "Reactor maintenance building volume (m3)", "(rmbv)", rmbv - ) - po.ovarre(self.outfile, "Warmshop volume (m3)", "(wsv)", wsv) - po.ovarre( - self.outfile, - "Tritium building volume (m3)", - "(triv)", - self.data.buildings.triv, - ) - po.ovarre(self.outfile, "Electrical building volume (m3)", "(elev)", elev) - po.ovarre( - self.outfile, - "Control building volume (m3)", - "(conv)", - self.data.buildings.conv, - ) - po.ovarre(self.outfile, "Cryogenics building volume (m3)", "(cryv)", cryv) - po.ovarre( - self.outfile, - "Administration building volume (m3)", - "(admv)", - self.data.buildings.admv, - ) - po.ovarre( - self.outfile, "Shops volume (m3)", "(shov)", self.data.buildings.shov - ) - po.ovarre( - self.outfile, - "Total volume of nuclear buildings (m3)", - "(volnucb)", - self.data.buildings.volnucb, - ) + def output_buildings(self): + po.oheadr(self.outfile, "Plant Buildings System") + po.ovarre( + self.outfile, + "Internal volume of reactor building (m3)", + "(vol_plant_reactor_building_internal)", + buildings_variables.vol_plant_reactor_building_internal, + ) + po.ovarre( + self.outfile, + "Dist from centre of torus to bldg wall (m)", + "(dr_plant_reactor_building_internal_half)", + buildings_variables.dr_plant_reactor_building_internal_half, + ) + po.ovarre( + self.outfile, + "Internal reactor building height (m)", + "(dz_plant_reactor_building_internal)", + buildings_variables.dz_plant_reactor_building_internal, + ) + po.ovarre( + self.outfile, + "Effective floor area (m2)", + "(a_plant_floor_effective)", + buildings_variables.a_plant_floor_effective, + ) + po.ovarre( + self.outfile, + "Reactor building volume (m3)", + "(vol_plant_reactor_building)", + buildings_variables.vol_plant_reactor_building, + ) + po.ovarre( + self.outfile, + "Reactor maintenance building volume (m3)", + "(vol_plant_maintenance_assembly_building)", + buildings_variables.vol_plant_maintenance_assembly_building, + ) + po.ovarre( + self.outfile, + "Warmshop volume (m3)", + "(vol_plant_warm_shop_building)", + buildings_variables.vol_plant_warm_shop_building, + ) + po.ovarre( + self.outfile, + "Tritium building volume (m3)", + "(vol_plant_tritium_fuel_building)", + buildings_variables.vol_plant_tritium_fuel_building, + ) + po.ovarre( + self.outfile, + "Electrical building volume (m3)", + "(vol_plant_electrical_building)", + buildings_variables.vol_plant_electrical_building, + ) + po.ovarre( + self.outfile, + "Control building volume (m3)", + "(vol_plant_control_building)", + buildings_variables.vol_plant_control_building, + ) + po.ovarre( + self.outfile, + "Cryogenics building volume (m3)", + "(vol_plant_cryoplant_building)", + buildings_variables.vol_plant_cryoplant_building, + ) + po.ovarre( + self.outfile, + "Administration building volume (m3)", + "(vol_plant_administration_building)", + buildings_variables.vol_plant_administration_building, + ) + po.ovarre( + self.outfile, + "Shops volume (m3)", + "(vol_plant_shops_warehouse_buildings)", + buildings_variables.vol_plant_shops_warehouse_buildings, + ) + po.ovarre( + self.outfile, + "Total volume of nuclear buildings (m3)", + "(vol_plant_nuclear_buildings)", + buildings_variables.vol_plant_nuclear_buildings, + ) + + @staticmethod + def plot_reactor_hall( + axis: plt.Axes, + mfile: mf.MFile, + scan: int, + radial_build, + colour_scheme: Literal[1, 2], + ): + """Plots the reactor hall dimensions as a rectangle on the provided axis.""" + + dr_half = mfile.get("dr_plant_reactor_building_internal_half", scan=scan) + height = mfile.get("dz_plant_reactor_building_internal", scan=scan) + dx_plant_reactor_building_wall = mfile.get( + "dx_plant_reactor_building_wall", scan=scan + ) + + rect = plt.Rectangle( + (-dr_half, -height / 2), + 2 * dr_half, + height, + fill=False, + edgecolor="grey", + linewidth=2, + ) + axis.add_patch(rect) - return cryv, vrci, rbv, rmbv, wsv, elev - def bldgs_sizes(self, output, tf_radial_dim, tf_vertical_dim): +class BuildingsChapman2024: + def __init__(self): + self.outfile = constants.NOUT + + def calculate_building_sizes_chapman(self, output, tf_radial_dim, tf_vertical_dim): """Subroutine that estimates the sizes (footprints and volumes) of buildings within a fusion power plant. Some estimates are scaled with parameters of the fusion plant, @@ -997,7 +1170,9 @@ def bldgs_sizes(self, output, tf_radial_dim, tf_vertical_dim): self.data.buildings.a_plant_floor_effective = buildings_total_vol / 6.0e0 # Total volume of nuclear buildings - self.data.buildings.volnucb = reactor_build_totvol + hotcell_vol_ext + self.data.buildings.vol_plant_nuclear_buildings = ( + reactor_build_totvol + hotcell_vol_ext + ) # Output if output: @@ -1202,8 +1377,8 @@ def bldgs_sizes(self, output, tf_radial_dim, tf_vertical_dim): po.ovarre( self.outfile, "Total volume of nuclear buildings (m3)", - "(volnucb)", - self.data.buildings.volnucb, + "(vol_plant_nuclear_buildings)", + self.data.buildings.vol_plant_nuclear_buildings, ) if self.data.buildings.i_bldgs_v == 1: diff --git a/process/models/costs/costs.py b/process/models/costs/costs.py index cee4ff9c35..75f1a5d986 100644 --- a/process/models/costs/costs.py +++ b/process/models/costs/costs.py @@ -1042,7 +1042,7 @@ def acc21(self): self.data.costs.c212 = ( 1.0e-6 * self.data.costs.ucrb - * self.data.buildings.rbvol**exprb + * self.data.buildings.vol_plant_reactor_building**exprb * cmlsa[self.data.costs.lsa - 1] ) @@ -1060,13 +1060,13 @@ def acc21(self): self.data.costs.c2141 = ( 1.0e-6 * self.data.costs.UCMB - * self.data.buildings.rmbvol**exprb + * self.data.buildings.vol_plant_maintenance_assembly_building**exprb * cmlsa[self.data.costs.lsa - 1] ) self.data.costs.c2142 = ( 1.0e-6 * self.data.costs.UCWS - * self.data.buildings.wsvol**exprb + * self.data.buildings.vol_plant_warm_shop_building**exprb * cmlsa[self.data.costs.lsa - 1] ) self.data.costs.c214 = self.data.costs.c2141 + self.data.costs.c2142 @@ -1076,7 +1076,7 @@ def acc21(self): self.data.costs.c215 = ( 1.0e-6 * self.data.costs.UCTR - * self.data.buildings.triv**exprb + * self.data.buildings.vol_plant_tritium_fuel_building**exprb * cmlsa[self.data.costs.lsa - 1] ) @@ -1085,7 +1085,7 @@ def acc21(self): self.data.costs.c216 = ( 1.0e-6 * self.data.costs.UCEL - * self.data.buildings.elevol**exprb + * self.data.buildings.vol_plant_electrical_building**exprb * cmlsa[self.data.costs.lsa - 1] ) @@ -1114,7 +1114,7 @@ def acc21(self): self.data.costs.c2174 = ( 1.0e-6 * self.data.costs.UCCR - * self.data.buildings.cryvol**exprb + * self.data.buildings.vol_plant_cryoplant_building**exprb * cmlsa[self.data.costs.lsa - 1] ) self.data.costs.c217 = ( @@ -2384,7 +2384,9 @@ def acc2273(self): * self.data.costs.UCDTC * ( (cfrht / 1.0e4) ** 0.6e0 - * (self.data.buildings.volrci + self.data.buildings.wsvol) + * (self.data.buildings.vol_plant_reactor_building_internal + + self.data.buildings.vol_plant_warm_shop_building + ) ) ) else: @@ -2399,7 +2401,10 @@ def acc2274(self): self.data.costs.c2274 = ( 1.0e-6 * self.data.costs.UCNBV - * (self.data.buildings.volrci + self.data.buildings.wsvol) ** 0.8e0 + * (self.data.buildings.vol_plant_reactor_building_internal + + self.data.buildings.vol_plant_warm_shop_building + ) + ** 0.8e0 ) # Apply Nth kind factor diff --git a/process/models/ife.py b/process/models/ife.py index aa4f23ac85..99a7bc2b66 100644 --- a/process/models/ife.py +++ b/process/models/ife.py @@ -920,8 +920,8 @@ def bld2019(self): self.data.ife.v3dzu = ( (self.data.ife.zu6 + self.data.ife.zl6) - + self.data.buildings.trcl - + self.data.buildings.stcl + + self.data.buildings.dr_plant_reactor_building_transport_clearance + + self.data.buildings.dz_plant_reactor_building_crane_roof_clearance + 5.1 + 9.41e-6 * 1.0e5 ) @@ -2243,18 +2243,25 @@ def ifebdg(self, output: bool = False): hrbi = self.data.ife.zl7 + self.data.ife.zu7 # Distance from centre of device to wall - self.data.buildings.wrbi = self.data.ife.r7 + self.data.buildings.dr_plant_reactor_building_internal_half = self.data.ife.r7 # Internal volume (square floor) - vrci = (2.0 * self.data.buildings.wrbi) ** 2 * hrbi + vrci = ( + 2.0 * self.data.buildings.dr_plant_reactor_building_internal_half + ) ** 2 * hrbi # External dimensions # RBWT = wall thickness # RBRT = roof thickness # FNDT = foundation thickness - rbw = 2.0 * (self.data.ife.r7 + self.data.buildings.rbwt) + rbw = 2.0 * (self.data.ife.r7 + self.data.buildings.dx_plant_reactor_building_wall + ) rbl = rbw - rbh = hrbi + self.data.buildings.rbrt + self.data.buildings.fndt + rbh = ( + hrbi + + self.data.buildings.dz_plant_reactor_building_roof + + self.data.buildings.dz_plant_reactor_building_foundation + ) # External volume rbv = rbw * rbl * rbh @@ -2273,7 +2280,7 @@ def ifebdg(self, output: bool = False): # Transport corridor size - tcw = self.data.ife.r6 + 4.0 * self.data.buildings.trcl + tcw = self.data.ife.r6 + 4.0 * self.data.buildings.dr_plant_reactor_building_transport_clearance tcl = 5.0 * tcw + 2.0 * self.data.buildings.hcwt # Decontamination cell size @@ -2305,13 +2312,17 @@ def ifebdg(self, output: bool = False): rmbh = ( 10.0 + (self.data.ife.zl6 + self.data.ife.zu6) - + self.data.buildings.trcl + + self.data.buildings.dr_plant_reactor_building_transport_clearance + cran + 5.1 - + self.data.buildings.stcl - + self.data.buildings.fndt + + self.data.buildings.dz_plant_reactor_building_crane_roof_clearance + + self.data.buildings.dz_plant_reactor_building_foundation + ) + tch = ( + shh + + self.data.buildings.dz_plant_reactor_building_crane_roof_clearance + + self.data.buildings.dz_plant_reactor_building_foundation ) - tch = shh + self.data.buildings.stcl + self.data.buildings.fndt # Volume @@ -2339,28 +2350,38 @@ def ifebdg(self, output: bool = False): rbv + rmbv + wsv - + self.data.buildings.triv + + self.data.buildings.vol_plant_tritium_fuel_building + elev - + self.data.buildings.conv + + self.data.buildings.vol_plant_control_building + cryv - + self.data.buildings.admv - + self.data.buildings.shov + + self.data.buildings.vol_plant_administration_building + + self.data.buildings.vol_plant_shops_warehouse_buildings ) / 6.0 # Convert local into global variables - self.data.buildings.admvol = self.data.buildings.admv - self.data.buildings.convol = self.data.buildings.conv - self.data.buildings.elevol = elev - self.data.buildings.rbvol = rbv - self.data.buildings.rmbvol = rmbv - self.data.buildings.shovol = self.data.buildings.shov - self.data.buildings.volrci = vrci - self.data.buildings.wsvol = wsv + self.data.buildings.admvol = self.data.( + buildings.vol_plant_administration_building + ) + self.data.buildings.convol = self.data.buildings.vol_plant_control_building + self.data.buildings.vol_plant_electrical_building = elev + self.data.buildings.vol_plant_reactor_building = rbv + self.data.buildings.vol_plant_maintenance_assembly_building = rmbv + self.data.buildings.shovol = self.data.( + buildings.vol_plant_shops_warehouse_buildings + ) + self.data.buildings.vol_plant_reactor_building_internal = vrci + self.data.buildings.vol_plant_warm_shop_building = wsv # Total volume of nuclear buildings - self.data.buildings.volnucb = vrci + rmbv + wsv + self.data.buildings.triv + cryv + self.data.buildings.vol_plant_nuclear_buildings = ( + vrci + + rmbv + + wsv + + self.data.buildings.vol_plant_tritium_fuel_building + + cryv + ) if not output: return @@ -2372,8 +2393,8 @@ def ifebdg(self, output: bool = False): process_output.ovarre( self.outfile, "Dist from device centre to bldg wall (m)", - "(wrbi)", - self.data.buildings.wrbi, + "(dr_plant_reactor_building_internal_half)", + self.data.buildings.dr_plant_reactor_building_internal_half, ) process_output.ovarre( self.outfile, @@ -2389,8 +2410,8 @@ def ifebdg(self, output: bool = False): process_output.ovarre( self.outfile, "Tritium building volume (m3)", - "(triv)", - self.data.buildings.triv, + "(vol_plant_tritium_fuel_building)", + self.data.buildings.vol_plant_tritium_fuel_building, ) process_output.ovarre( self.outfile, "Electrical building volume (m3)", "(elev)", elev @@ -2398,8 +2419,8 @@ def ifebdg(self, output: bool = False): process_output.ovarre( self.outfile, "Control building volume (m3)", - "(conv)", - self.data.buildings.conv, + "(vol_plant_control_building)", + self.data.buildings.vol_plant_control_building, ) process_output.ovarre( self.outfile, "Cryogenics building volume (m3)", "(cryv)", cryv @@ -2407,17 +2428,20 @@ def ifebdg(self, output: bool = False): process_output.ovarre( self.outfile, "Administration building volume (m3)", - "(admv)", - self.data.buildings.admv, + "(vol_plant_administration_building)", + self.data.buildings.vol_plant_administration_building, ) process_output.ovarre( - self.outfile, "Shops volume (m3)", "(shov)", self.data.buildings.shov + self.outfile, + "Shops volume (m3)", + "(vol_plant_shops_warehouse_buildings)", + self.data.buildings.vol_plant_shops_warehouse_buildings, ) process_output.ovarre( self.outfile, "Total volume of nuclear buildings (m3)", - "(volnucb)", - self.data.buildings.volnucb, + "(vol_plant_nuclear_buildings)", + self.data.buildings.vol_plant_nuclear_buildings, ) def ifevac(self): diff --git a/process/models/power.py b/process/models/power.py index f55bc0f784..ebdd14a8df 100644 --- a/process/models/power.py +++ b/process/models/power.py @@ -2291,7 +2291,7 @@ def tfpwcall(self, output: bool): self.data.tfcoil.tfckw, self.data.tfcoil.len_tf_bus, self.data.tfcoil.drarea, - self.data.buildings.tfcbv, + self.data.buildings.vol_plant_tf_power_supplies_building, self.data.heat_transport.p_tf_electric_supplies_mw, ) = self.tfcpwr( output, @@ -2451,7 +2451,7 @@ def tfcpwr( drarea = 0.5e0 * ndumpr * (1.0e0 + r1emj) ** 0.667e0 # Total TF coil power conversion building volume, m3 - tfcbv = 6.0e0 * tfcfsp + vol_plant_tf_power_supplies_building = 6.0e0 * tfcfsp # TF coil AC inductive power demand, MW xpwrmw = xpower / 0.9e0 @@ -2463,7 +2463,7 @@ def tfcpwr( # tftsp = tfcfsp # Total TF coil power conversion building volume, m3 - # tftbv = tfcbv + # tftbv = vol_plant_tf_power_supplies_building # Output section if output: @@ -2580,9 +2580,9 @@ def tfcpwr( ) po.ovarre( self.outfile, - "TF coil power conv. building volume (m3)", - "(tfcbv)", - tfcbv, + "TF coil power vol_plant_control_building. building volume (m3)", + "(vol_plant_tf_power_supplies_building)", + vol_plant_tf_power_supplies_building, "OP ", ) po.ovarre( @@ -2600,7 +2600,13 @@ def tfcpwr( "OP ", ) - return (tfckw, len_tf_bus, drarea, tfcbv, p_tf_electric_supplies_mw) + return ( + tfckw, + len_tf_bus, + drarea, + vol_plant_tf_power_supplies_building, + p_tf_electric_supplies_mw, + ) @staticmethod def power_profiles_over_time( diff --git a/process/models/tfcoil/base.py b/process/models/tfcoil/base.py index 549d2d1a3b..4c96fa0410 100644 --- a/process/models/tfcoil/base.py +++ b/process/models/tfcoil/base.py @@ -872,40 +872,7 @@ def output_general_tf_info(self) -> None: ) po.ovarre( self.outfile, - "Inboard leg nose case radial thickness (m)", - "(dr_tf_nose_case)", - self.data.tfcoil.dr_tf_nose_case, - ) - po.ovarre( - self.outfile, - "Inboard leg plasma side case thickness (m)", - "(dr_tf_plasma_case)", - self.data.tfcoil.dr_tf_plasma_case, - ) - po.ovarre( - self.outfile, - "Full external coil radial width at mid-plane (m)", - "(dr_tf_full_midplane)", - self.data.tfcoil.dr_tf_full_midplane, - "OP ", - ) - po.ovarre( - self.outfile, - "Full internal coil radial width at mid-plane (m)", - "(dr_tf_internal_midplane)", - self.data.tfcoil.dr_tf_internal_midplane, - "OP ", - ) - po.oblnkl(self.outfile) - po.ovarre( - self.outfile, - "Inboard leg case sidewall thickness at its narrowest point (m)", - "(dx_tf_side_case_min)", - self.data.tfcoil.dx_tf_side_case_min, - ) - po.ovarre( - self.outfile, - "Inboard leg toroidal thickness at outer edge (m)", + "Outboard leg toroidal thickness (m)", "(dx_tf_inboard_out_toroidal)", self.data.tfcoil.dx_tf_inboard_out_toroidal, "OP ", @@ -913,17 +880,16 @@ def output_general_tf_info(self) -> None: po.oblnkl(self.outfile) po.ovarre( self.outfile, - "Maximum inboard edge height (m)", - "(z_tf_inside_half)", - self.data.build.z_tf_inside_half, + "Full internal coil width at mid-plane (m)", + "(dr_tf_internal_midplane)", + self.data.tfcoil.dr_tf_internal_midplane, "OP ", ) po.ovarre( self.outfile, - "Height to top of TF coil (m)", - "(z_tf_top)", - self.data.build.z_tf_top, - "OP ", + "Inboard leg nose case radial thickness (m)", + "(dr_tf_nose_case)", + self.data.tfcoil.dr_tf_nose_case, ) po.oblnkl(self.outfile) po.ovarre( @@ -971,6 +937,276 @@ def output_general_tf_info(self) -> None: self.data.tfcoil.a_tf_leg_outboard, ) + # CP tapering geometry + if ( + self.data.physics.itart == 1 + and self.data.tfcoil.i_tf_sup != TFConductorModel.SUPERCONDUCTING + ): + po.osubhd(self.outfile, "Tapered Centrepost TF coil Dimensions:") + po.ovarre( + self.outfile, + "TF coil centrepost outer radius at midplane (m)", + "(r_tf_inboard_out)", + self.data.build.r_tf_inboard_out, + ) + po.ovarre( + self.outfile, + "TF coil centrepost outer radius at its top (m)", + "(r_cp_top)", + self.data.build.r_cp_top, + ) + po.ovarre( + self.outfile, + "Top/miplane TF CP radius ratio (-)", + "(f_r_cp)", + self.data.build.f_r_cp, + ) + po.ovarre( + self.outfile, + "Distance from the midplane to the top of the tapered section (m)", + "(z_cp_top)", + self.data.superconducting_tfcoil.z_cp_top, + ) + po.ovarre( + self.outfile, + "Distance from the midplane to the top of the centrepost (m)", + "(z_tf_inside_half + dr_tf_outboard)", + self.data.build.z_tf_inside_half + self.data.build.dr_tf_outboard, + ) + + # Turn/WP gemoetry + if self.data.tfcoil.i_tf_sup == TFConductorModel.SUPERCONDUCTING: + # Total material fraction + po.osubhd(self.outfile, "Global material area/fractions:") + po.ovarre( + self.outfile, + "TF cross-section (total) (m2)", + "(a_tf_inboard_total)", + tfcoil_variables.a_tf_inboard_total, + ) + po.ovarre( + self.outfile, + "Total steel cross-section (m2)", + "(a_tf_coil_inboard_steel*n_tf_coils)", + superconducting_tf_coil_variables.a_tf_coil_inboard_steel + * tfcoil_variables.n_tf_coils, + ) + po.ovarre( + self.outfile, + "Total steel TF fraction", + "(f_a_tf_coil_inboard_steel)", + superconducting_tf_coil_variables.f_a_tf_coil_inboard_steel, + ) + po.ovarre( + self.outfile, + "Total Insulation cross-section (total) (m2)", + "(a_tf_coil_inboard_insulation*n_tf_coils)", + superconducting_tf_coil_variables.a_tf_coil_inboard_insulation + * tfcoil_variables.n_tf_coils, + ) + po.ovarre( + self.outfile, + "Total Insulation fraction", + "(f_a_tf_coil_inboard_insulation)", + superconducting_tf_coil_variables.f_a_tf_coil_inboard_insulation, + ) + + # External casing + po.osubhd(self.outfile, "External steel Case Information :") + po.ovarre( + self.outfile, + "Casing cross section area (per leg) (m2)", + "(a_tf_coil_inboard_case)", + tfcoil_variables.a_tf_coil_inboard_case, + ) + po.ovarre( + self.outfile, + "Inboard leg case plasma side wall thickness (m)", + "(dr_tf_plasma_case)", + tfcoil_variables.dr_tf_plasma_case, + ) + po.ovarre( + self.outfile, + "Inboard leg plasma case area (m^2)", + "(a_tf_plasma_case)", + superconducting_tf_coil_variables.a_tf_plasma_case, + ) + po.ovarre( + self.outfile, + 'Inboard leg case inboard "nose" thickness (m)', + "(dr_tf_nose_case)", + tfcoil_variables.dr_tf_nose_case, + ) + po.ovarre( + self.outfile, + 'Inboard leg case inboard "nose" area (m^2)', + "(a_tf_coil_nose_case)", + superconducting_tf_coil_variables.a_tf_coil_nose_case, + ) + po.ovarre( + self.outfile, + "Inboard leg case sidewall thickness at its narrowest point (m)", + "(dx_tf_side_case_min)", + tfcoil_variables.dx_tf_side_case_min, + ) + po.ovarre( + self.outfile, + "Inboard leg case sidewall average thickness (m)", + "(dx_tf_side_case_average)", + superconducting_tf_coil_variables.dx_tf_side_case_average, + ) + po.ovarre( + self.outfile, + "Inboard leg case sidewall peak thickness (m)", + "(dx_tf_side_case_peak)", + superconducting_tf_coil_variables.dx_tf_side_case_peak, + ) + po.ovarre( + self.outfile, + "External case mass per coil (kg)", + "(m_tf_coil_case)", + tfcoil_variables.m_tf_coil_case, + "OP ", + ) + + # Winding pack structure + po.osubhd(self.outfile, "TF winding pack (WP) geometry:") + po.ovarre( + self.outfile, + "WP cross section area with insulation and insertion (per coil) (m2)", + "(a_tf_wp_with_insulation)", + superconducting_tf_coil_variables.a_tf_wp_with_insulation, + ) + po.ovarre( + self.outfile, + "WP cross section area with no insulation and insertion (per coil) (m2)", + "(a_tf_wp_no_insulation)", + superconducting_tf_coil_variables.a_tf_wp_no_insulation, + ) + po.ovarre( + self.outfile, + "Total steel area in WP (per coil) (m2)", + "(a_tf_wp_steel)", + tfcoil_variables.a_tf_wp_steel, + ) + po.ovarre( + self.outfile, + "Winding pack radial thickness (m)", + "(dr_tf_wp_with_insulation)", + tfcoil_variables.dr_tf_wp_with_insulation, + "OP ", + ) + if tfcoil_variables.i_tf_turns_integer == 1: + po.ovarre( + self.outfile, + "Winding pack toroidal width (m)", + "(dx_tf_wp_primary_toroidal)", + tfcoil_variables.dx_tf_wp_primary_toroidal, + "OP ", + ) + else: + po.ovarre( + self.outfile, + "Winding pack toroidal width 1 (m)", + "(dx_tf_wp_primary_toroidal)", + tfcoil_variables.dx_tf_wp_primary_toroidal, + "OP ", + ) + po.ovarre( + self.outfile, + "Winding pack toroidal width 2 (m)", + "(dx_tf_wp_secondary_toroidal)", + tfcoil_variables.dx_tf_wp_secondary_toroidal, + "OP ", + ) + + po.ovarre( + self.outfile, + "Ground wall insulation thickness (m)", + "(dx_tf_wp_insulation)", + tfcoil_variables.dx_tf_wp_insulation, + ) + po.ovarre( + self.outfile, + "Ground wall insulation area (m^2)", + "(a_tf_wp_ground_insulation)", + superconducting_tf_coil_variables.a_tf_wp_ground_insulation, + ) + po.ovarre( + self.outfile, + "Winding pack insertion gap (m)", + "(dx_tf_wp_insertion_gap)", + tfcoil_variables.dx_tf_wp_insertion_gap, + ) + + # WP material fraction + po.osubhd(self.outfile, "TF winding pack (WP) material area/fractions:") + po.ovarre( + self.outfile, + "Steel WP cross-section (total) (m2)", + "(a_tf_wp_steel*n_tf_coils)", + tfcoil_variables.a_tf_wp_steel * tfcoil_variables.n_tf_coils, + ) + po.ovarre( + self.outfile, + "Steel WP fraction", + "(a_tf_wp_steel/a_tf_wp_with_insulation)", + tfcoil_variables.a_tf_wp_steel + / superconducting_tf_coil_variables.a_tf_wp_with_insulation, + ) + po.ovarre( + self.outfile, + "Insulation WP fraction", + "(a_tf_coil_wp_turn_insulation/a_tf_wp_with_insulation)", + tfcoil_variables.a_tf_coil_wp_turn_insulation + / superconducting_tf_coil_variables.a_tf_wp_with_insulation, + ) + po.ovarre( + self.outfile, + "Cable WP fraction", + "((a_tf_wp_with_insulation-a_tf_wp_steel-a_tf_coil_wp_turn_insulation)/a_tf_wp_with_insulation)", + ( + superconducting_tf_coil_variables.a_tf_wp_with_insulation + - tfcoil_variables.a_tf_wp_steel + - tfcoil_variables.a_tf_coil_wp_turn_insulation + ) + / superconducting_tf_coil_variables.a_tf_wp_with_insulation, + ) + + # Number of turns + po.osubhd(self.outfile, "WP turn information:") + po.ovarin( + self.outfile, + "Turn parameterisation", + "(i_tf_turns_integer)", + tfcoil_variables.i_tf_turns_integer, + ) + if tfcoil_variables.i_tf_turns_integer == 0: + po.ocmmnt(self.outfile, " Non-integer number of turns") + else: + po.ocmmnt(self.outfile, " Integer number of turns") + + po.ovarre( + self.outfile, + "Mean coil circumference (including inboard leg length) (m)", + "(len_tf_coil)", + self.data.tfcoil.len_tf_coil, + "OP ", + ) + po.oblnkl(self.outfile) + po.ovarre( + self.outfile, + "Total inboard area of all TF coils (m²)", + "(a_tf_inboard_total)", + self.data.tfcoil.a_tf_inboard_total, + ) + po.ovarre( + self.outfile, + "Outboard leg area of single TF coil (m²)", + "(a_tf_leg_outboard)", + self.data.tfcoil.a_tf_leg_outboard, + ) + # CP tapering geometry if ( self.data.physics.itart == 1 diff --git a/tests/regression/input_files/IFE.IN.DAT b/tests/regression/input_files/IFE.IN.DAT index 06493b2de5..ddd58823e3 100644 --- a/tests/regression/input_files/IFE.IN.DAT +++ b/tests/regression/input_files/IFE.IN.DAT @@ -251,8 +251,8 @@ ucme = 3.0D8 *Cost of maintenance equipment ($) *---------------Buildings Variables----------------* pibv = 4.0D4 *Power injection building volume (m3) -rbrt = 3.2 *Reactor building roof thickness (m) -rbwt = 3.2 *Reactor building wall thickness (m) +dz_plant_reactor_building_roof = 3.2 *Reactor building roof thickness (m) +dx_plant_reactor_building_wall = 3.2 *Reactor building wall thickness (m) *---------------Heat Transport Variables-----------* eta_turbine = 0.45 *Thermal-to-electric conversion efficiency diff --git a/tests/unit/models/test_costs_1990.py b/tests/unit/models/test_costs_1990.py index 831b08a72c..4ee4865c4b 100644 --- a/tests/unit/models/test_costs_1990.py +++ b/tests/unit/models/test_costs_1990.py @@ -168,8 +168,8 @@ def acc2273_param(**kwargs): # Default parameters defaults = { "f_plasma_fuel_tritium": 0.0001, - "volrci": 0.0, - "wsvol": 0.0, + "vol_plant_reactor_building_internal": data_structure.buildings_variables.vol_plant_reactor_building_internal, + "vol_plant_warm_shop_building": data_structure.buildings_variables.vol_plant_warm_shop_building, "expected": pytest.approx(0.0, abs=0.00001), } @@ -190,8 +190,8 @@ def acc2273_params(): acc2273_param(), acc2273_param( f_plasma_fuel_tritium=0.5, - volrci=1299783.4, - wsvol=132304.1, + vol_plant_reactor_building_internal=1299783.4, + vol_plant_warm_shop_building=132304.1, expected=pytest.approx(74.12, abs=0.01), ), ] @@ -212,8 +212,16 @@ def acc2273_fix(request, monkeypatch, costs): # Mock variables used by acc2273() # Some may be parameterised - monkeypatch.setattr(costs.data.buildings, "wsvol", param["wsvol"]) - monkeypatch.setattr(costs.data.buildings, "volrci", param["volrci"]) + monkeypatch.setattr(costs. + data.buildings, + "vol_plant_warm_shop_building", + param["vol_plant_warm_shop_building"], + ) + monkeypatch.setattr(costs. + data.buildings, + "vol_plant_reactor_building_internal", + param["vol_plant_reactor_building_internal"], + ) monkeypatch.setattr( costs.data.physics, "f_plasma_fuel_tritium", param["f_plasma_fuel_tritium"] ) @@ -244,8 +252,14 @@ def test_acc2274(monkeypatch, costs): :param monkeypatch: Mock fixture :type monkeypatch: object """ - monkeypatch.setattr(costs.data.buildings, "wsvol", 132304.1) - monkeypatch.setattr(costs.data.buildings, "volrci", 1299783.4) + monkeypatch.setattr(costs. + data.buildings, "vol_plant_warm_shop_building", 132304.1 + ) + monkeypatch.setattr(costs. + data.buildings, + "vol_plant_reactor_building_internal", + 1299783.4, + ) monkeypatch.setattr(costs.data.costs, "fkind", 1) costs.acc2274() @@ -684,21 +698,21 @@ def test_acc9(monkeypatch, costs): class Acc21Param(NamedTuple): shovol: Any = None - triv: Any = None + vol_plant_tritium_fuel_building: Any = None - elevol: Any = None + vol_plant_electrical_building: Any = None - rbvol: Any = None + vol_plant_reactor_building: Any = None - cryvol: Any = None + vol_plant_cryoplant_building: Any = None - rmbvol: Any = None + vol_plant_maintenance_assembly_building: Any = None admvol: Any = None convol: Any = None - wsvol: Any = None + vol_plant_warm_shop_building: Any = None ucrb: Any = None @@ -746,14 +760,14 @@ class Acc21Param(NamedTuple): [ Acc21Param( shovol=100000, - triv=40000, - elevol=51601.097615432001, - rbvol=1356973.2891062023, - cryvol=15247.180612719381, - rmbvol=421473.52130148414, + vol_plant_tritium_fuel_building=40000, + vol_plant_electrical_building=51601.097615432001, + vol_plant_reactor_building=1356973.2891062023, + vol_plant_cryoplant_building=15247.180612719381, + vol_plant_maintenance_assembly_building=421473.52130148414, admvol=100000, convol=60000, - wsvol=130018.25667917728, + vol_plant_warm_shop_building=130018.25667917728, ucrb=400, ireactor=1, cturbb=38, @@ -777,14 +791,14 @@ class Acc21Param(NamedTuple): ), Acc21Param( shovol=100000, - triv=40000, - elevol=51609.268177478581, - rbvol=1358540.6868905292, - cryvol=25826.919937316459, - rmbvol=423252.94369581528, + vol_plant_tritium_fuel_building=40000, + vol_plant_electrical_building=51609.268177478581, + vol_plant_reactor_building=1358540.6868905292, + vol_plant_cryoplant_building=25826.919937316459, + vol_plant_maintenance_assembly_building=423252.94369581528, admvol=100000, convol=60000, - wsvol=130255.93791329287, + vol_plant_warm_shop_building=130255.93791329287, ucrb=400, ireactor=1, cturbb=38, @@ -824,21 +838,45 @@ def test_acc21(acc21param, monkeypatch, costs): monkeypatch.setattr(costs.data.buildings, "shovol", acc21param.shovol) - monkeypatch.setattr(costs.data.buildings, "triv", acc21param.triv) + monkeypatch.setattr(costs.data. + buildings, + "vol_plant_tritium_fuel_building", + acc21param.vol_plant_tritium_fuel_building, + ) - monkeypatch.setattr(costs.data.buildings, "elevol", acc21param.elevol) + monkeypatch.setattr(costs.data. + buildings, + "vol_plant_electrical_building", + acc21param.vol_plant_electrical_building, + ) - monkeypatch.setattr(costs.data.buildings, "rbvol", acc21param.rbvol) + monkeypatch.setattr(costs.data. + buildings, + "vol_plant_reactor_building", + acc21param.vol_plant_reactor_building, + ) - monkeypatch.setattr(costs.data.buildings, "cryvol", acc21param.cryvol) + monkeypatch.setattr(costs.data. + buildings, + "vol_plant_cryoplant_building", + acc21param.vol_plant_cryoplant_building, + ) - monkeypatch.setattr(costs.data.buildings, "rmbvol", acc21param.rmbvol) + monkeypatch.setattr(costs.data. + buildings, + "vol_plant_maintenance_assembly_building", + acc21param.vol_plant_maintenance_assembly_building, + ) monkeypatch.setattr(costs.data.buildings, "admvol", acc21param.admvol) monkeypatch.setattr(costs.data.buildings, "convol", acc21param.convol) - monkeypatch.setattr(costs.data.buildings, "wsvol", acc21param.wsvol) + monkeypatch.setattr(costs.data. + buildings, + "vol_plant_warm_shop_building", + acc21param.vol_plant_warm_shop_building, + ) monkeypatch.setattr(costs.data.costs, "ucrb", acc21param.ucrb) @@ -4118,9 +4156,9 @@ def test_acc2272_rut(acc2272param, monkeypatch, costs): class Acc2273Param(NamedTuple): - wsvol: Any = None + vol_plant_warm_shop_building: Any = None - volrci: Any = None + vol_plant_reactor_building_internal: Any = None fkind: Any = None @@ -4137,8 +4175,8 @@ class Acc2273Param(NamedTuple): "acc2273param", [ Acc2273Param( - wsvol=130018.25667917728, - volrci=1205439.8543893537, + vol_plant_warm_shop_building=130018.25667917728, + vol_plant_reactor_building_internal=1205439.8543893537, fkind=1, f_plasma_fuel_tritium=0.5, c227=0, @@ -4146,8 +4184,8 @@ class Acc2273Param(NamedTuple): expected_c2273=69.115208498727412, ), Acc2273Param( - wsvol=130255.93791329287, - volrci=1206887.4047542624, + vol_plant_warm_shop_building=130255.93791329287, + vol_plant_reactor_building_internal=1206887.4047542624, fkind=1, f_plasma_fuel_tritium=0.5, c227=284.96904049038437, @@ -4170,9 +4208,17 @@ def test_acc2273_rut(acc2273param, monkeypatch, costs): :type monkeypatch: _pytest.monkeypatch.monkeypatch """ - monkeypatch.setattr(costs.data.buildings, "wsvol", acc2273param.wsvol) + monkeypatch.setattr(costs.data. + buildings, + "vol_plant_warm_shop_building", + acc2273param.vol_plant_warm_shop_building, + ) - monkeypatch.setattr(costs.data.buildings, "volrci", acc2273param.volrci) + monkeypatch.setattr(costs.data. + buildings, + "vol_plant_reactor_building_internal", + acc2273param.vol_plant_reactor_building_internal, + ) monkeypatch.setattr(costs.data.costs, "fkind", acc2273param.fkind) @@ -4190,9 +4236,9 @@ def test_acc2273_rut(acc2273param, monkeypatch, costs): class Acc2274Param(NamedTuple): - wsvol: Any = None + vol_plant_warm_shop_building: Any = None - volrci: Any = None + vol_plant_reactor_building_internal: Any = None fkind: Any = None @@ -4207,16 +4253,16 @@ class Acc2274Param(NamedTuple): "acc2274param", [ Acc2274Param( - wsvol=130018.25667917728, - volrci=1205439.8543893537, + vol_plant_warm_shop_building=130018.25667917728, + vol_plant_reactor_building_internal=1205439.8543893537, fkind=1, c227=0, c22=0, expected_c2274=79.525098581749191, ), Acc2274Param( - wsvol=130255.93791329287, - volrci=1206887.4047542624, + vol_plant_warm_shop_building=130255.93791329287, + vol_plant_reactor_building_internal=1206887.4047542624, fkind=1, c227=284.96904049038437, c22=3474.7391916096453, @@ -4238,9 +4284,17 @@ def test_acc2274_rut(acc2274param, monkeypatch, costs): :type monkeypatch: _pytest.monkeypatch.monkeypatch """ - monkeypatch.setattr(costs.data.buildings, "wsvol", acc2274param.wsvol) + monkeypatch.setattr(costs.data. + buildings, + "vol_plant_warm_shop_building", + acc2274param.vol_plant_warm_shop_building, + ) - monkeypatch.setattr(costs.data.buildings, "volrci", acc2274param.volrci) + monkeypatch.setattr(costs.data. + buildings, + "vol_plant_reactor_building_internal", + acc2274param.vol_plant_reactor_building_internal, + ) monkeypatch.setattr(costs.data.costs, "fkind", acc2274param.fkind) diff --git a/tests/unit/models/test_ife.py b/tests/unit/models/test_ife.py index 8ed7a55fa2..549ec46bdf 100644 --- a/tests/unit/models/test_ife.py +++ b/tests/unit/models/test_ife.py @@ -2267,8 +2267,8 @@ def test_ifepw1(ifepw1param, monkeypatch, ife): class Bld2019Param(NamedTuple): a_fw_total: Any = None - trcl: Any = None - stcl: Any = None + dr_plant_reactor_building_transport_clearance: Any = None + dz_plant_reactor_building_crane_roof_clearance: Any = None tbr: Any = None f_p_blkt_multiplication: Any = None ifetyp: Any = None @@ -2359,8 +2359,8 @@ class Bld2019Param(NamedTuple): [ Bld2019Param( a_fw_total=0.0, - trcl=1.0, - stcl=3.0, + dr_plant_reactor_building_transport_clearance=1.0, + dz_plant_reactor_building_crane_roof_clearance=3.0, tbr=0.0, f_p_blkt_multiplication=1.26, ifetyp=4, @@ -2640,8 +2640,16 @@ def test_bld2019(bld2019param, monkeypatch, ife): :type monkeypatch: _pytest.monkeypatch.monkeypatch """ monkeypatch.setattr(ife.data.first_wall, "a_fw_total", bld2019param.a_fw_total) - monkeypatch.setattr(ife.data.buildings, "trcl", bld2019param.trcl) - monkeypatch.setattr(ife.data.buildings, "stcl", bld2019param.stcl) + monkeypatch.setattr(ife.data. + buildings, + "dr_plant_reactor_building_transport_clearance", + bld2019param.dr_plant_reactor_building_transport_clearance, + ) + monkeypatch.setattr(ife.data. + buildings, + "dz_plant_reactor_building_crane_roof_clearance", + bld2019param.dz_plant_reactor_building_crane_roof_clearance, + ) monkeypatch.setattr(ife.data.fwbs, "tbr", bld2019param.tbr) monkeypatch.setattr( ife.data.fwbs, "f_p_blkt_multiplication", bld2019param.f_p_blkt_multiplication @@ -2854,30 +2862,30 @@ def test_ifeacp(ifeacpparam, monkeypatch, ife): class IfebdgParam(NamedTuple): - wrbi: Any = None - rbwt: Any = None - rbrt: Any = None - fndt: Any = None - trcl: Any = None + dr_plant_reactor_building_internal_half: Any = None + dx_plant_reactor_building_wall: Any = None + dz_plant_reactor_building_roof: Any = None + dz_plant_reactor_building_foundation: Any = None + dr_plant_reactor_building_transport_clearance: Any = None hcwt: Any = None hccl: Any = None wgt2: Any = None - stcl: Any = None + dz_plant_reactor_building_crane_roof_clearance: Any = None pibv: Any = None a_plant_floor_effective: Any = None - triv: Any = None - conv: Any = None - admv: Any = None - shov: Any = None + vol_plant_tritium_fuel_building: Any = None + vol_plant_control_building: Any = None + vol_plant_administration_building: Any = None + vol_plant_shops_warehouse_buildings: Any = None admvol: Any = None convol: Any = None - elevol: Any = None - rbvol: Any = None - rmbvol: Any = None + vol_plant_electrical_building: Any = None + vol_plant_reactor_building: Any = None + vol_plant_maintenance_assembly_building: Any = None shovol: Any = None - volrci: Any = None - wsvol: Any = None - volnucb: Any = None + vol_plant_reactor_building_internal: Any = None + vol_plant_warm_shop_building: Any = None + vol_plant_nuclear_buildings: Any = None whtshld: Any = None helpow: Any = None zl7: Any = None @@ -2903,30 +2911,30 @@ class IfebdgParam(NamedTuple): "ifebdgparam", [ IfebdgParam( - wrbi=0.0, - rbwt=3.2000000000000002, - rbrt=3.2000000000000002, - fndt=2.0, - trcl=1.0, + dr_plant_reactor_building_internal_half=0.0, + dx_plant_reactor_building_wall=3.2000000000000002, + dz_plant_reactor_building_roof=3.2000000000000002, + dz_plant_reactor_building_foundation=2.0, + dr_plant_reactor_building_transport_clearance=1.0, hcwt=1.5, hccl=5.0, wgt2=100000.0, - stcl=3.0, + dz_plant_reactor_building_crane_roof_clearance=3.0, pibv=40000.0, a_plant_floor_effective=0.0, - triv=40000.0, - conv=60000.0, - admv=100000.0, - shov=100000.0, + vol_plant_tritium_fuel_building=40000.0, + vol_plant_control_building=60000.0, + vol_plant_administration_building=100000.0, + vol_plant_shops_warehouse_buildings=100000.0, admvol=0.0, convol=0.0, - elevol=0.0, - rbvol=0.0, - rmbvol=0.0, + vol_plant_electrical_building=0.0, + vol_plant_reactor_building=0.0, + vol_plant_maintenance_assembly_building=0.0, shovol=0.0, - volrci=0.0, - wsvol=0.0, - volnucb=0.0, + vol_plant_reactor_building_internal=0.0, + vol_plant_warm_shop_building=0.0, + vol_plant_nuclear_buildings=0.0, whtshld=1067310.9593707009, helpow=20277.29636048527, zl7=5.8499999999999996, @@ -2961,34 +2969,98 @@ def test_ifebdg(ifebdgparam, monkeypatch, ife): :param monkeypatch: pytest fixture used to mock module/class variables :type monkeypatch: _pytest.monkeypatch.monkeypatch """ - monkeypatch.setattr(ife.data.buildings, "wrbi", ifebdgparam.wrbi) - monkeypatch.setattr(ife.data.buildings, "rbwt", ifebdgparam.rbwt) - monkeypatch.setattr(ife.data.buildings, "rbrt", ifebdgparam.rbrt) - monkeypatch.setattr(ife.data.buildings, "fndt", ifebdgparam.fndt) - monkeypatch.setattr(ife.data.buildings, "trcl", ifebdgparam.trcl) + monkeypatch.setattr(ife.data. + buildings, + "dr_plant_reactor_building_internal_half", + ifebdgparam.dr_plant_reactor_building_internal_half, + ) + monkeypatch.setattr(ife.data. + buildings, + "dx_plant_reactor_building_wall", + ifebdgparam.dx_plant_reactor_building_wall, + ) + monkeypatch.setattr(ife.data. + buildings, + "dz_plant_reactor_building_roof", + ifebdgparam.dz_plant_reactor_building_roof, + ) + monkeypatch.setattr(ife.data. + buildings, + "dz_plant_reactor_building_foundation", + ifebdgparam.dz_plant_reactor_building_foundation, + ) + monkeypatch.setattr(ife.data. + buildings, + "dr_plant_reactor_building_transport_clearance", + ifebdgparam.dr_plant_reactor_building_transport_clearance, + ) monkeypatch.setattr(ife.data.buildings, "hcwt", ifebdgparam.hcwt) monkeypatch.setattr(ife.data.buildings, "hccl", ifebdgparam.hccl) monkeypatch.setattr(ife.data.buildings, "wgt2", ifebdgparam.wgt2) - monkeypatch.setattr(ife.data.buildings, "stcl", ifebdgparam.stcl) + monkeypatch.setattr(ife.data. + buildings, + "dz_plant_reactor_building_crane_roof_clearance", + ifebdgparam.dz_plant_reactor_building_crane_roof_clearance, + ) monkeypatch.setattr(ife.data.buildings, "pibv", ifebdgparam.pibv) monkeypatch.setattr( ife.data.buildings, "a_plant_floor_effective", ifebdgparam.a_plant_floor_effective, ) - monkeypatch.setattr(ife.data.buildings, "triv", ifebdgparam.triv) - monkeypatch.setattr(ife.data.buildings, "conv", ifebdgparam.conv) - monkeypatch.setattr(ife.data.buildings, "admv", ifebdgparam.admv) - monkeypatch.setattr(ife.data.buildings, "shov", ifebdgparam.shov) + monkeypatch.setattr(ife.data. + buildings, + "vol_plant_tritium_fuel_building", + ifebdgparam.vol_plant_tritium_fuel_building, + ) + monkeypatch.setattr(ife.data. + buildings, + "vol_plant_control_building", + ifebdgparam.vol_plant_control_building, + ) + monkeypatch.setattr(ife.data. + buildings, + "vol_plant_administration_building", + ifebdgparam.vol_plant_administration_building, + ) + monkeypatch.setattr(ife.data. + buildings, + "vol_plant_shops_warehouse_buildings", + ifebdgparam.vol_plant_shops_warehouse_buildings, + ) monkeypatch.setattr(ife.data.buildings, "admvol", ifebdgparam.admvol) monkeypatch.setattr(ife.data.buildings, "convol", ifebdgparam.convol) - monkeypatch.setattr(ife.data.buildings, "elevol", ifebdgparam.elevol) - monkeypatch.setattr(ife.data.buildings, "rbvol", ifebdgparam.rbvol) - monkeypatch.setattr(ife.data.buildings, "rmbvol", ifebdgparam.rmbvol) + monkeypatch.setattr(ife.data. + buildings, + "vol_plant_electrical_building", + ifebdgparam.vol_plant_electrical_building, + ) + monkeypatch.setattr(ife.data. + buildings, + "vol_plant_reactor_building", + ifebdgparam.vol_plant_reactor_building, + ) + monkeypatch.setattr(ife.data. + buildings, + "vol_plant_maintenance_assembly_building", + ifebdgparam.vol_plant_maintenance_assembly_building, + ) monkeypatch.setattr(ife.data.buildings, "shovol", ifebdgparam.shovol) - monkeypatch.setattr(ife.data.buildings, "volrci", ifebdgparam.volrci) - monkeypatch.setattr(ife.data.buildings, "wsvol", ifebdgparam.wsvol) - monkeypatch.setattr(ife.data.buildings, "volnucb", ifebdgparam.volnucb) + monkeypatch.setattr(ife.data. + buildings, + "vol_plant_reactor_building_internal", + ifebdgparam.vol_plant_reactor_building_internal, + ) + monkeypatch.setattr(ife.data. + buildings, + "vol_plant_warm_shop_building", + ifebdgparam.vol_plant_warm_shop_building, + ) + monkeypatch.setattr(ife.data. + buildings, + "vol_plant_nuclear_buildings", + ifebdgparam.vol_plant_nuclear_buildings, + ) monkeypatch.setattr(ife.data.fwbs, "whtshld", ifebdgparam.whtshld) monkeypatch.setattr(ife.data.heat_transport, "helpow", ifebdgparam.helpow) monkeypatch.setattr(ife.data.ife, "zl7", ifebdgparam.zl7) @@ -3000,19 +3072,33 @@ def test_ifebdg(ifebdgparam, monkeypatch, ife): ife.ifebdg() - assert ife.data.buildings.wrbi == pytest.approx(ifebdgparam.expected_wrbi) + assert ife.data.buildings.dr_plant_reactor_building_internal_half == pytest.approx( + ifebdgparam.expected_wrbi + ) assert ife.data.buildings.a_plant_floor_effective == pytest.approx( ifebdgparam.expected_a_plant_floor_effective ) assert ife.data.buildings.admvol == pytest.approx(ifebdgparam.expected_admvol) assert ife.data.buildings.convol == pytest.approx(ifebdgparam.expected_convol) - assert ife.data.buildings.elevol == pytest.approx(ifebdgparam.expected_elevol) - assert ife.data.buildings.rbvol == pytest.approx(ifebdgparam.expected_rbvol) - assert ife.data.buildings.rmbvol == pytest.approx(ifebdgparam.expected_rmbvol) + assert ife.data.buildings.vol_plant_electrical_building == pytest.approx( + ifebdgparam.expected_elevol + ) + assert ife.data.buildings.vol_plant_reactor_building == pytest.approx( + ifebdgparam.expected_rbvol + ) + assert ife.data.buildings.vol_plant_maintenance_assembly_building == pytest.approx( + ifebdgparam.expected_rmbvol + ) assert ife.data.buildings.shovol == pytest.approx(ifebdgparam.expected_shovol) - assert ife.data.buildings.volrci == pytest.approx(ifebdgparam.expected_volrci) - assert ife.data.buildings.wsvol == pytest.approx(ifebdgparam.expected_wsvol) - assert ife.data.buildings.volnucb == pytest.approx(ifebdgparam.expected_volnucb) + assert ife.data.buildings.vol_plant_reactor_building_internal == pytest.approx( + ifebdgparam.expected_volrci + ) + assert ife.data.buildings.vol_plant_warm_shop_building == pytest.approx( + ifebdgparam.expected_wsvol + ) + assert ife.data.buildings.vol_plant_nuclear_buildings == pytest.approx( + ifebdgparam.expected_volnucb + ) class Ifepw2Param(NamedTuple):