diff --git a/documentation/proc-pages/eng-models/fw-blanket.md b/documentation/proc-pages/eng-models/fw-blanket.md index 98b76fa405..d92ee7c4b0 100644 --- a/documentation/proc-pages/eng-models/fw-blanket.md +++ b/documentation/proc-pages/eng-models/fw-blanket.md @@ -44,21 +44,6 @@ electricity have been revised extensively. using parametric fits to an MCNP neutron and photon transport model of a sector of a tokamak. The blanket contains lithium orthosilicate Li$_4$SiO$_4$, titanium beryllide TiBe$_{12}$, helium and Eurofer steel. -- `== 3` -- CCFE HCPB model with tritium breeding ratio. It has the features of - the CCFE HCPB model above, with a set of fitting functions for calculating - tritium breeding ratio (TBR). It requires a choice of `iblanket_thickness`, - specifiying a `THIN`, `MEDIUM` or `THICK` blanket. This fixes the values - of inboard and outboard blanket thickness, and the initial values of first - wall thickness (3 cm) and first wall armour (3 mm). Note that these last - two can be modified by the first wall thermohydraulic module, in which case - the output will not be fully self-consistent. The lithium-6 enrichment and - the breeder fraction (Li4SiO4/(Be12Ti+Li4SiO4) by volume) are available as - iteration variables, and the minimum TBR can be set as a constraint. The - maximum values of TBR achievable are as follows: - - - `THIN` -- 1.247 - - `MEDIUM` -- 1.261 - - `THICK` -- 1.264. `i_thermal_electric_conversion` -- This switch controls how the coolant pumping power in the first wall and blanket is determined, and also how the calculation of the plant's diff --git a/process/caller.py b/process/caller.py index 041a6279a4..0a60b12a3e 100644 --- a/process/caller.py +++ b/process/caller.py @@ -286,15 +286,7 @@ def _call_models_once(self, xc: np.ndarray) -> None: # CCFE HCPB model self.models.ccfe_hcpb.run(output=False) # i_blanket_type = 2, KIT HCPB removed - elif ft.fwbs_variables.i_blanket_type == 3: - # CCFE HCPB model with Tritium Breeding Ratio calculation - self.models.ccfe_hcpb.run(output=False) - ft.fwbs_variables.tbr = self.models.ccfe_hcpb.tbr_shimwell( - ft.fwbs_variables.breeder_f, - ft.fwbs_variables.f_blkt_li6_enrichment, - ft.fwbs_variables.iblanket_thickness, - output=False, - ) + # i_blanket_type = 3, CCFE HCPB with TBR calculation removed # i_blanket_type = 4, KIT HCLL removed elif ft.fwbs_variables.i_blanket_type == 5: # DCLL model diff --git a/process/costs.py b/process/costs.py index a07850952e..732f1cefcf 100644 --- a/process/costs.py +++ b/process/costs.py @@ -1199,7 +1199,7 @@ def acc2212(self): if ife_variables.ife != 1: # i_blanket_type=4 is used for KIT HCLL model. i_blanket_type<4 are all - # HCPB (CCFE, KIT and CCFE + Shimwell TBR calculation). + # HCPB (CCFE). if fwbs_variables.i_blanket_type == 4: # Liquid blanket (LiPb + Li) diff --git a/process/hcpb.py b/process/hcpb.py index b41e565aa1..271b12245c 100644 --- a/process/hcpb.py +++ b/process/hcpb.py @@ -8,7 +8,6 @@ build_variables, ccfe_hcpb_module, constants, - constraint_variables, cost_variables, current_drive_variables, divertor_variables, @@ -221,7 +220,7 @@ def component_masses(self): """ # CCFE HCPB modal calculates the coolant mass, # have added an if staement using the i_blanket_type switch for this. - # N.B. i_blanket_type=1 for CCFE HCPB and i_blanket_type=3 for the same with TBR using Shimwell. + # N.B. i_blanket_type=1 for CCFE HCPB # Start adding components of the coolant mass: # Divertor coolant volume (m3) @@ -269,7 +268,7 @@ def component_masses(self): # shield, FW and FW armour. # KIT HCPB calculates the mass of the blanket (including seprate masses for each material) # and the void fraction for the blanket. - # N.B. i_blanket_type=1 for CCFE HCPB and i_blanket_type=3 for the same with TBR using Shimwell. + # N.B. i_blanket_type=1 for CCFE HCPB # Component masses @@ -1129,137 +1128,6 @@ def st_centrepost_nuclear_heating(self, pneut, sh_width): return pnuc_cp_tf, pnuc_cp_sh, pnuc_cp - def tbr_shimwell( - self, breeder_f, f_blkt_li6_enrichment, iblanket_thickness, output: bool - ): - """Calculates TBR - author: Michael Kovari - breeder_f : input real : Volume of Li4SiO4 / (Volume of Be12Ti + Li4SiO4) - f_blkt_li6_enrichment : input real : lithium-6 enrichment (%) - iblanket_thickness : input integer : blanket thickness switch - tbr : output real : 5-year time-averaged tritium breeding ratio - """ - # for the v array of expansion terms: - # the first element is for a thin blanket, - # the second element is for a medium blanket - # the third element is for a thick blanket - v1 = [1.93920586301, 1.96122608615, 1.95893103797] - v2 = [-0.948494854004, -0.860855681012, -0.809792727863] - v3 = [-0.0186700302911, 0.0193393390622, 0.016958778333] - v4 = [0.483417432982, 0.279977226537, -0.120230857418] - v5 = [0.785901227724, 0.659918133027, 0.461211316443] - v6 = [-0.0120169189644, 0.013070435947, -0.0478789050674] - v7 = [-3.45723121388, -3.48450356973, -2.1978304461] - v8 = [-2.05212472576, -2.3360647329, -1.38785787744] - v9 = [6.45375263346, 7.38314099334, 4.93883798388] - v10 = [-0.436421277881, -0.365511595682, -0.223668963335] - v11 = [0.0129809166177, -0.0181287662329, 0.0178181886132] - v12 = [2.26116309299, 2.30397890094, 1.42583418972] - v13 = [-3.87538808736, -4.37481611533, -2.80720698559] - v14 = [1.05778783291, 1.30804004777, 0.814691647096] - v15 = [-3.12644013943, -3.71450110227, -2.48568193656] - v16 = [1.86242247177, 2.1588023402, 1.37932384899] - v17 = [0.253324925437, 0.253324925437, 0.253355839249] - v18 = [0.18795823903, 0.198976219881, 0.190845918447] - v19 = [-0.0256707269253, -0.0192924115968, -0.0257699008284] - - y = f_blkt_li6_enrichment / 100 - tbr = ( - v1[iblanket_thickness - 1] - + v2[iblanket_thickness - 1] * breeder_f - + v3[iblanket_thickness - 1] * y - + v4[iblanket_thickness - 1] * y * breeder_f - + v5[iblanket_thickness - 1] * breeder_f**2 - + v6[iblanket_thickness - 1] * y**2 - + v7[iblanket_thickness - 1] * breeder_f**2 * y - + v8[iblanket_thickness - 1] * breeder_f * y**2 - + v9[iblanket_thickness - 1] * breeder_f**2 * y**2 - + v10[iblanket_thickness - 1] * breeder_f**3 - + v11[iblanket_thickness - 1] * y**3 - + v12[iblanket_thickness - 1] * y * breeder_f**3 - + v13[iblanket_thickness - 1] * y**2 * breeder_f**3 - + v14[iblanket_thickness - 1] * y**3 * breeder_f - + v15[iblanket_thickness - 1] * y**3 * breeder_f**2 - + v16[iblanket_thickness - 1] * y**3 * breeder_f**3 - + v17[iblanket_thickness - 1] * np.log(breeder_f) - + v18[iblanket_thickness - 1] * np.log(y) - + v19[iblanket_thickness - 1] * np.log(breeder_f) * np.log(y) - ) - - if output: - po.ovarrf( - self.outfile, - "Lithium-6 enrichment (%)", - "(f_blkt_li6_enrichment)", - f_blkt_li6_enrichment, - ) - po.ovarrf( - self.outfile, - "Breeder fraction by volume: Li4SiO4/(Be12Ti+Li4SiO4)", - "(breeder_f)", - breeder_f, - ) - if iblanket_thickness == 1: - po.ovarin( - self.outfile, - "Blanket thickness choice: THIN (0.53 m inboard, 0.91 m outboard)", - "[iblanket_thickness-1]", - iblanket_thickness, - ) - elif iblanket_thickness == 2: - po.ovarin( - self.outfile, - "Blanket thickness choice: MEDIUM (0.64 m inboard, 1.11 m outboard)", - "[iblanket_thickness-1]", - iblanket_thickness, - ) - elif iblanket_thickness == 3: - po.ovarin( - self.outfile, - "Blanket thickness choice: THICK (0.75 m inboard, 1.30 m outboard)", - "[iblanket_thickness-1]", - iblanket_thickness, - ) - po.ovarrf( - self.outfile, - "Tritium breeding ratio (5-year time-averaged)", - "(tbr)", - tbr, - "OP ", - ) - po.ovarrf( - self.outfile, - "Minimum Tritium breeding ratio", - "(tbrmin)", - constraint_variables.tbrmin, - ) - - po.ocmmnt( - self.outfile, - '(See "A parameter study of time-varying tritium production in solid-type breeder blankets,', - ) - po.ocmmnt(self.outfile, "J. Shimwell et al, Fusion Engineering and Design") - po.ovarre( - self.outfile, - "For consistency, inboard first wall thicknesses should be 0.03 (m)", - "(dr_fw_inboard)", - build_variables.dr_fw_inboard, - ) - po.ovarre( - self.outfile, - "For consistency, outboard first wall thicknesses should be 0.03 (m)", - "(dr_fw_outboard)", - build_variables.dr_fw_outboard, - ) - po.ovarre( - self.outfile, - "For consistency, first wall armour thickness should be 0.003 (m)", - "(fw_armour_thickness)", - fwbs_variables.fw_armour_thickness, - ) - - return tbr - def write_output(self): po.oheadr(self.outfile, "First wall and blanket : CCFE HCPB model") po.osubhd(self.outfile, "Blanket Composition by volume :") diff --git a/process/init.py b/process/init.py index 25785ecee6..a9acd9dc3a 100644 --- a/process/init.py +++ b/process/init.py @@ -419,7 +419,7 @@ def initialise_iterative_variables(): fortran.define_iteration_variables.init_itv_175() -def check_process(inputs): +def check_process(inputs): # noqa: ARG001 """Routine to reset specific variables if certain options are being used author: P J Knight, CCFE, Culham Science Centre @@ -427,38 +427,6 @@ def check_process(inputs): This routine performs a sanity check of the input variables and ensures other dependent variables are given suitable values. """ - # Inboard blanket does not exist if the thickness is below a certain limit. - if "dr_blkt_inboard" in inputs and fortran.fwbs_variables.i_blanket_type == 3: - warn( - "dr_blkt_inboard input is not required for CCFE HCPB model with Tritium Breeding Ratio calculation", - stacklevel=1, - ) - - if "dr_blkt_outboard" in inputs and fortran.fwbs_variables.i_blanket_type == 3: - warn( - "dr_blkt_outboard input is not required for CCFE HCPB model with Tritium Breeding Ratio calculation", - stacklevel=1, - ) - - if "iblanket_thickness" in inputs: - if fortran.fwbs_variables.i_blanket_type == 3: - fortran.build_variables.dr_fw_inboard = 0.03 - fortran.build_variables.dr_fw_outboard = 0.03 - fortran.fwbs_variables.fw_armour_thickness = 0.003 - - if 0 <= fortran.build_variables.dr_blkt_inboard <= 1e-3: - fortran.build_variables.dr_blkt_inboard = 0.0 - fortran.fwbs_variables.i_blkt_inboard = 0 - - if fortran.fwbs_variables.iblanket_thickness == 1: - fortran.build_variables.dr_blkt_inboard = 0.53 - fortran.build_variables.dr_blkt_outboard = 0.91 - elif fortran.fwbs_variables.iblanket_thickness == 2: - fortran.build_variables.dr_blkt_inboard = 0.64 - fortran.build_variables.dr_blkt_outboard = 1.11 - elif fortran.fwbs_variables.iblanket_thickness == 3: - fortran.build_variables.dr_blkt_inboard = 0.75 - fortran.build_variables.dr_blkt_outboard = 1.30 # Check that there are sufficient iteration variables if fortran.numerics.nvar < fortran.numerics.neqns: @@ -1203,7 +1171,6 @@ def check_process(inputs): if fortran.stellarator_variables.istell == 0 and ( fortran.fwbs_variables.i_blanket_type == 1 - or fortran.fwbs_variables.i_blanket_type == 3 ): fsum = ( fortran.fwbs_variables.breeder_multiplier diff --git a/process/input.py b/process/input.py index 1b617fec05..ee1af00dea 100644 --- a/process/input.py +++ b/process/input.py @@ -1498,7 +1498,6 @@ def __post_init__(self): "i_tf_wp_geom": InputVariable(fortran.tfcoil_variables, int, choices=[0, 1, 2]), "iavail": InputVariable(fortran.cost_variables, int, range=(0, 3)), "ibkt_life": InputVariable(fortran.cost_variables, int, choices=[0, 1, 2]), - "iblanket_thickness": InputVariable(fortran.fwbs_variables, int, choices=[1, 2, 3]), "i_blkt_dual_coolant": InputVariable( fortran.fwbs_variables, int, choices=[0, 1, 2] ), diff --git a/process/io/obsolete_vars.py b/process/io/obsolete_vars.py index fad8eae216..4fb5d0fbe6 100644 --- a/process/io/obsolete_vars.py +++ b/process/io/obsolete_vars.py @@ -272,6 +272,7 @@ "ifci": "i_blkt_liquid_breeder_channel_type", "ipump": "i_fw_blkt_shared_coolant", "coolwh": "i_blkt_coolant_type", + "iblanket_thickness": None, } OBS_VARS_HELP = { diff --git a/process/output.py b/process/output.py index 6dabdbf423..76a3f3da41 100644 --- a/process/output.py +++ b/process/output.py @@ -96,15 +96,7 @@ def write(models, _outfile): # CCFE HCPB model models.ccfe_hcpb.run(output=True) # i_blanket_type = 2, KIT HCPB removed - elif ft.fwbs_variables.i_blanket_type == 3: - # CCFE HCPB model with Tritium Breeding Ratio calculation - models.ccfe_hcpb.run(output=True) - ft.fwbs_variables.tbr = models.ccfe_hcpb.tbr_shimwell( - ft.fwbs_variables.breeder_f, - ft.fwbs_variables.f_blkt_li6_enrichment, - ft.fwbs_variables.iblanket_thickness, - output=True, - ) + # i_blanket_type = 3, CCFE HCPB with TBR calculation removed # i_blanket_type = 4, KIT HCLL removed elif ft.fwbs_variables.i_blanket_type == 5: # DCLL model diff --git a/process/power.py b/process/power.py index 6cf6b24b04..06ecab832f 100644 --- a/process/power.py +++ b/process/power.py @@ -2400,10 +2400,8 @@ def plant_thermal_efficiency(self, etath): if fwbs_variables.i_thermal_electric_conversion == 0: # CCFE HCPB Model (with or without TBR) if ( - (fwbs_variables.i_blanket_type == 1) - or (fwbs_variables.i_blanket_type == 3) - or fwbs_variables.i_blanket_type == 2 - ): + fwbs_variables.i_blanket_type == 1 + ) or fwbs_variables.i_blanket_type == 2: # HCPB, efficiency taken from M. Kovari 2016 # "PROCESS": A systems code for fusion power plants - Part 2: Engineering # https://www.sciencedirect.com/science/article/pii/S0920379616300072 @@ -2415,9 +2413,7 @@ def plant_thermal_efficiency(self, etath): # Etath from reference. Div power to primary elif fwbs_variables.i_thermal_electric_conversion == 1: # CCFE HCPB Model (with or without TBR) - if (fwbs_variables.i_blanket_type == 1) or ( - fwbs_variables.i_blanket_type == 3 - ): + if fwbs_variables.i_blanket_type == 1: # HCPB, efficiency taken from M. Kovari 2016 # "PROCESS": A systems code for fusion power plants - Part 2: Engineering # https://www.sciencedirect.com/science/article/pii/S0920379616300072 @@ -2438,9 +2434,7 @@ def plant_thermal_efficiency(self, etath): # Steam Rankine cycle to be used elif fwbs_variables.i_thermal_electric_conversion == 3: # CCFE HCPB Model (with or without TBR) - if (fwbs_variables.i_blanket_type == 1) or ( - fwbs_variables.i_blanket_type == 3 - ): + if fwbs_variables.i_blanket_type == 1: # If coolant is helium, the steam cycle is assumed to be superheated # and a different correlation is used. The turbine inlet temperature # is assumed to be 20 degrees below the primary coolant outlet diff --git a/process/stellarator.py b/process/stellarator.py index 5d4a5e7199..fd80034a56 100644 --- a/process/stellarator.py +++ b/process/stellarator.py @@ -1064,14 +1064,6 @@ def blanket_neutronics(self): # Energy multiplication factor fwbs_variables.emult = 1.269 - # Tritium breeding ratio - fwbs_variables.tbr = self.hcpb.tbr_shimwell( - fwbs_variables.vol_blkt_total, - fwbs_variables.f_blkt_li6_enrichment, - 1, - output=False, - ) - # Use older model to calculate neutron fluence since it # is not calculated in the CCFE blanket model ( diff --git a/source/fortran/fwbs_variables.f90 b/source/fortran/fwbs_variables.f90 index d2782d886b..bf97b8779c 100644 --- a/source/fortran/fwbs_variables.f90 +++ b/source/fortran/fwbs_variables.f90 @@ -253,16 +253,6 @@ module fwbs_variables real(dp) :: m_blkt_beryllium !! mass of blanket - beryllium part [kg] - ! CCFE HCPB model with Tritium Breeding Ratio calculation (i_blanket_type=3) - ! --------------- - - integer :: iblanket_thickness - !! Blanket thickness switch (Do not set dr_blkt_inboard, dr_blkt_outboard, dr_fw_inboard or dr_fw_outboard when `i_blanket_type=3`): - !! - !! - =1 thin 0.53 m inboard, 0.91 m outboard - !! - =2 medium 0.64 m inboard, 1.11 m outboard - !! - =3 thick 0.75 m inboard, 1.30 m outboard - integer :: i_coolant_pumping !! Switch for pumping power for primary coolant (mechanical power only and peak first wall !! temperature is only calculated if `i_coolant_pumping=2`): @@ -722,7 +712,6 @@ subroutine init_fwbs_variables wallpf = 1.21D0 whtblbreed = 0.0D0 m_blkt_beryllium = 0.0D0 - iblanket_thickness = 2 i_coolant_pumping = 2 i_shield_mat = 0 i_thermal_electric_conversion = 0 diff --git a/tests/integration/ref_dicts.json b/tests/integration/ref_dicts.json index 7b8d0d3342..b4e902fdd7 100644 --- a/tests/integration/ref_dicts.json +++ b/tests/integration/ref_dicts.json @@ -2335,7 +2335,6 @@ "iavail": 2.0, "ibkt_life": 0.0, "i_blanket_type": 1.0, - "iblanket_thickness": 2.0, "i_blkt_inboard": 1.0, "i_bootstrap_current": 3.0, "icase": "'Steady-state tokamak model'", @@ -9807,7 +9806,6 @@ "iavail": "Switch for plant availability model:\n", "ibkt_life": "Switch for fw/blanket lifetime calculation in availability module:\n", "i_blanket_type": "switch for blanket model:\n", - "iblanket_thickness": "Blanket thickness switch (Do not set dr_blkt_inboard, dr_blkt_outboard, dr_fw_inboard or dr_fw_outboard when `i_blanket_type=3`):\n", "i_blkt_inboard": "switch for inboard blanket:\n", "i_bootstrap_current": "switch for bootstrap current scaling\n", "icase": "power plant type", @@ -13301,10 +13299,6 @@ "lb": 1, "ub": 4 }, - "iblanket_thickness": { - "lb": 1, - "ub": 3 - }, "i_blkt_inboard": { "lb": 0, "ub": 1 @@ -18063,7 +18057,6 @@ "wallpf", "whtblbreed", "m_blkt_beryllium", - "iblanket_thickness", "i_coolant_pumping", "i_shield_mat", "i_thermal_electric_conversion", @@ -20422,7 +20415,6 @@ "iavail": "int_variable", "ibkt_life": "int_variable", "i_blanket_type": "int_variable", - "iblanket_thickness": "int_variable", "i_blkt_inboard": "int_variable", "i_bootstrap_current": "int_variable", "icc": "int_array", diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index 4baff924f7..6862e1ceca 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -2377,13 +2377,6 @@ i_blanket_type = 1 * please use i_coolant_pumping = 0 or 1. * JUSTIFICATION: Assuming DCLL blanket -*iblanket_thickness = -* DESCRIPTION: Blanket thickness switch (Do not set dr_blkt_inboard, dr_blkt_outboard, dr_fw_inboard or dr_fw_outboard when `i_blanket_type=3`): -*=1 thin 0.53 m inboard, 0.91 m outboard -*=2 medium 0.64 m inboard, 1.11 m outboard -*=3 thick 0.75 m inboard, 1.30 m outboard -* JUSTIFICATION: Not used, setting blanket thickness directly - i_blkt_inboard = 0 * DESCRIPTION: switch for inboard blanket: * =0 No inboard blanket (dr_blkt_inboard=0.0) diff --git a/tests/unit/test_ccfe_hcpb.py b/tests/unit/test_ccfe_hcpb.py index 84a64eea0e..1728ff0f68 100644 --- a/tests/unit/test_ccfe_hcpb.py +++ b/tests/unit/test_ccfe_hcpb.py @@ -6,7 +6,6 @@ from process.fortran import ( build_variables, ccfe_hcpb_module, - constraint_variables, current_drive_variables, divertor_variables, fwbs_variables, @@ -1376,87 +1375,6 @@ def test_st_centrepost_nuclear_heating( assert pnuc_cp == pytest.approx(stcentrepostnuclearheatingparam.expected_pnuc_cp) -class TbrShimwellParam(NamedTuple): - dr_fw_inboard: Any = None - - dr_fw_outboard: Any = None - - tbrmin: Any = None - - fw_armour_thickness: Any = None - - ip: Any = None - - iprint: Any = None - - outfile: Any = None - - iblanket_thickness: Any = None - - breeder_f: Any = None - - f_blkt_li6_enrichment: Any = None - - expected_tbr: Any = None - - -@pytest.mark.parametrize( - "tbrshimwellparam", - ( - TbrShimwellParam( - dr_fw_inboard=0.018000000000000002, - dr_fw_outboard=0.018000000000000002, - tbrmin=1.1499999999999999, - fw_armour_thickness=0.0030000000000000001, - ip=0, - iprint=0, - outfile=11, - iblanket_thickness=1, - breeder_f=0.56366688384345121, - f_blkt_li6_enrichment=82.131743925121199, - expected_tbr=1.1284864235692258, - ), - ), -) -def test_tbr_shimwell(tbrshimwellparam, monkeypatch, ccfe_hcpb): - """ - Automatically generated Regression Unit Test for tbr_shimwell. - - This test was generated using data from tests/regression/scenarios/vacuum_model/IN.DAT. - - :param tbrshimwellparam: the data used to mock and assert in this test. - :type tbrshimwellparam: tbrshimwellparam - - :param monkeypatch: pytest fixture used to mock module/class variables - :type monkeypatch: _pytest.monkeypatch.monkeypatch - """ - - monkeypatch.setattr( - build_variables, "dr_fw_inboard", tbrshimwellparam.dr_fw_inboard - ) - - monkeypatch.setattr( - build_variables, "dr_fw_outboard", tbrshimwellparam.dr_fw_outboard - ) - - monkeypatch.setattr(constraint_variables, "tbrmin", tbrshimwellparam.tbrmin) - - monkeypatch.setattr( - fwbs_variables, "fw_armour_thickness", tbrshimwellparam.fw_armour_thickness - ) - - monkeypatch.setattr(ccfe_hcpb_module, "ip", tbrshimwellparam.ip) - - tbr = ccfe_hcpb.tbr_shimwell( - iblanket_thickness=tbrshimwellparam.iblanket_thickness, - breeder_f=tbrshimwellparam.breeder_f, - f_blkt_li6_enrichment=tbrshimwellparam.f_blkt_li6_enrichment, - output=False, - ) - - assert tbr == pytest.approx(tbrshimwellparam.expected_tbr) - - class ComponentMassesParam(NamedTuple): divsur: Any = None divclfr: Any = None