mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
RdSAP 10 §3.7 (PDF p.19) verbatim:
"for each building part, software will deduct window/door areas
contained in the relevant wall areas"
The same per-BP deduction applies to roof windows / rooflights
piercing each BP's roof. Pre-slice the cascade lumped every
rooflight's area onto BP[0] Main's `rw_area_part` (S0380.106-era
convention), leaving the actual host BP's gross roof un-deducted.
Cert 000565 §11 Openings lodges:
Roof Windows 1(Ext2) External roof Ext2, 1.20 m²
Roof Windows 2(Ext4) External roof Ext4, 0.50 m²
Worksheet (30) ground truth — each rooflight deducts from its
host BP's gross roof:
Ext2: 25.00 − 1.20 = 23.80 net × 0.30 = 7.1400 W/K
Ext4: 3.00 − 0.50 = 2.50 net × 0.00 = 0.0000 W/K
Pre-slice cascade:
Ext2: 25.00 (un-deducted) × 0.30 = 7.5000 (+0.36 W/K over)
Plus 1.70 m² of RW area lumped onto Main's external aggregate
→ +1.20 m² double-count (Ext2 gross + Main rw_area_part)
3-layer fix:
1. `datatypes/epc/domain/epc_property_data.py`: add `window_location:
Union[int, str] = 0` to SapRoofWindow (mirror of
`SapWindow.window_location` shape).
2. `datatypes/epc/domain/mapper.py` `_map_elmhurst_roof_window`:
thread `w.building_part` through (mirror of
`_map_elmhurst_window`'s pass-through).
3. `domain/sap10_calculator/worksheet/heat_transmission.py`: pre-loop
compute `rw_area_by_bp[i]` from each `SapRoofWindow.window_location`
via the existing `_window_bp_index` resolver; per-BP loop reads
`rw_area_by_bp[i]` instead of allocating everything to BP[0].
Cohort safety: cert 000516's lone rooflight is on the Main BP
(Summary §11 row "Main, External wall"), so the per-BP allocation
returns Main = 0 = same as the prior lump-on-Main convention. The
000516 hand-built fixture's SapRoofWindow now sets
`window_location="Main"` to mirror the Elmhurst mapper string-form.
Cert 000565 cascade snapshot (HEAD
|
||
|---|---|---|
| .. | ||
| epc | ||
| magicplan | ||
| __init__.py | ||
| datatypes.py | ||
| enums.py | ||