From 039df7ae8767b88c8d8b167838b1116026895d8c Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 3 Jul 2026 10:17:42 +0000 Subject: [PATCH] =?UTF-8?q?The=20calculator=20exposes=20the=20dwelling=20d?= =?UTF-8?q?esign=20heat=20loss=20for=20heat-pump=20sizing=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit design_heat_loss_kw = annual-average HLC x 24.2 K (SAP design temperature difference) / 1000, the quantity Appendix N's PSR divides a heat pump's rated output by โ€” surfaced so the ASHP recommendation can size the pump. Co-Authored-By: Claude Opus 4.8 --- domain/sap10_calculator/calculator.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/domain/sap10_calculator/calculator.py b/domain/sap10_calculator/calculator.py index f3a10165b..34f0f1ce7 100644 --- a/domain/sap10_calculator/calculator.py +++ b/domain/sap10_calculator/calculator.py @@ -65,6 +65,11 @@ from domain.sap10_calculator.worksheet.rating import ( _AIR_HEAT_CAPACITY_WH_PER_M3_K: Final[float] = 0.33 _TIME_CONSTANT_DIVISOR_KJ_TO_WH: Final[float] = 3.6 +# SAP design temperature difference (21 C internal - -3.2 C external): the delta +# the design heat loss and Appendix N's PSR are evaluated at (matches +# `_SAP_DESIGN_HEAT_LOSS_DELTA_T_K` in rdsap.cert_to_inputs). +_DESIGN_HEAT_LOSS_DELTA_T_K: Final[float] = 24.2 +_WATTS_PER_KW: Final[float] = 1000.0 # ยง9a default โ€” used as `CalculatorInputs.energy_requirements` default for # synthetic constructions that bypass cert_to_inputs. All-zero fuel; the @@ -877,7 +882,9 @@ def calculate_sap_from_inputs(inputs: CalculatorInputs) -> SapResult: space_heating_kwh_per_yr=space_heating_kwh, space_cooling_kwh_per_yr=space_cooling_kwh, fabric_energy_efficiency_kwh_per_m2_yr=inputs.fabric_energy_efficiency_kwh_per_m2_yr, - design_heat_loss_kw=0.0, # stub โ€” computed in GREEN + design_heat_loss_kw=(sum(monthly_hlc) / 12.0) + * _DESIGN_HEAT_LOSS_DELTA_T_K + / _WATTS_PER_KW, main_heating_fuel_kwh_per_yr=main_fuel_kwh, main_2_heating_fuel_kwh_per_yr=inputs.energy_requirements.main_2_fuel_kwh_per_yr, secondary_heating_fuel_kwh_per_yr=secondary_fuel_kwh,