From e813cc0ef26404ef17d4eadd8bec05b2194ec4aa Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Thu, 2 Jul 2026 16:06:33 +0000 Subject: [PATCH] =?UTF-8?q?Uninsulated=20cylinder=20(type=200)=20takes=20t?= =?UTF-8?q?he=20SAP=20Table=202=20jacket=20t=3D0=20storage=20loss=20?= =?UTF-8?q?=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- domain/sap10_calculator/rdsap/cert_to_inputs.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/domain/sap10_calculator/rdsap/cert_to_inputs.py b/domain/sap10_calculator/rdsap/cert_to_inputs.py index b725555a8..3260dd181 100644 --- a/domain/sap10_calculator/rdsap/cert_to_inputs.py +++ b/domain/sap10_calculator/rdsap/cert_to_inputs.py @@ -5879,6 +5879,10 @@ _CYLINDER_INSULATION_TYPE_FACTORY: Final[int] = 1 # which SAP 10.2 Table 2 Note 1 gives a SEPARATE (higher) loss factor # L = 0.005 + 1.76 / (t + 12.8) vs the factory L = 0.005 + 0.55 / (t+4). _CYLINDER_INSULATION_TYPE_LOOSE_JACKET: Final[int] = 2 +# RdSAP 10 field 7-11 code 0 = NO insulation. SAP 10.2 Table 2 has no +# separate uninsulated row — the loose-jacket formula at t = 0 IS the +# uninsulated factor (L = 0.005 + 1.76 / 12.8 = 0.1425 kWh/L/day). +_CYLINDER_INSULATION_TYPE_NONE: Final[int] = 0 def _cylinder_storage_loss_insulation_label( @@ -7106,9 +7110,18 @@ def _cylinder_storage_loss_override( insulation_label = _cylinder_storage_loss_insulation_label( sh.cylinder_insulation_type ) + thickness_mm: Optional[float] = ( + float(sh.cylinder_insulation_thickness_mm) + if sh.cylinder_insulation_thickness_mm is not None + else None + ) + # SAP 10.2 Table 2: an uninsulated cylinder (lodged insulation type 0) + # takes the loose-jacket formula at t = 0 — the WORST loss SAP knows, + # never the zero-loss combi default (which over-rates the dwelling). + if _int_or_none(sh.cylinder_insulation_type) == _CYLINDER_INSULATION_TYPE_NONE: + insulation_label, thickness_mm = "loose_jacket", 0.0 if insulation_label is None: return None - thickness_mm = sh.cylinder_insulation_thickness_mm if thickness_mm is None: return None storage_56m = cylinder_storage_loss_monthly_kwh(