mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
docs: SPEC_COVERAGE §8f row + slice progress table
Adds §8f as a first-class row in the Sections §§1–13 table (consistent with §8c precedent for §-letter sub-sections). The §11 row updates from "Not implemented" to Partial: the (109) formula function now exists in `worksheet/fabric_energy_efficiency.py`, but the §11 compliance-conditions worksheet rerun (different ventilation / HW / lighting / gains column per spec lines 2152-2164) is deferred. Per-§8f slice progress table mirrors §8c's: line ref (109), commit shorthand, and a Remaining work list naming the two follow-ups (§11 compliance conditions + Σ(98a) ≠ Σ(98c) regression coverage when Appendix H solar space heating lands). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
43cc16bc65
commit
05d9dc73f8
1 changed files with 23 additions and 2 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Tracks which sections of the SAP 10.2 specification are implemented in `packages/domain/src/domain/sap/`. Per ADR-0009 the calculator is built from the spec, not reverse-engineered from cert data. This doc is the worksheet-driven roadmap for what remains.
|
||||
|
||||
Updated 2026-05-21 after §8c rebuild (slices `cf28eec4`…`f3797066`).
|
||||
Updated 2026-05-21 after §8c rebuild (slices `cf28eec4`…`f3797066`) and §8f atomic slice (`43cc16bc`).
|
||||
|
||||
The canonical SAP10.2 algorithm lives in [`2026-05-19-17-18 RdSap10Worksheet.xlsx`](../../2026-05-19-17-18%20RdSap10Worksheet.xlsx) at the repo root — each line ref `(1)..(486)` maps to a cell. The worksheet sub-modules under `packages/domain/src/domain/sap/worksheet/` implement those line refs directly; Elmhurst worksheets validate end-to-end via `tests/_elmhurst_worksheet_*.py`.
|
||||
|
||||
|
|
@ -20,9 +20,10 @@ The canonical SAP10.2 algorithm lives in [`2026-05-19-17-18 RdSap10Worksheet.xls
|
|||
| 8 | Off-period temperature reduction | inline in `mean_internal_temperature.py` | Full | Table 9b implemented |
|
||||
| 8 | Space heating requirement | `worksheet/space_heating.py` | **Full** | Worksheet-driven (95)..(99) via `space_heating_monthly_kwh`. Includes the Table 9c step 10 spec inclusion rule (Jun..Sep zeroed) on top of the < 1 kWh value clamp. (98b) Appendix H solar space heating defaulted to 0 (no Elmhurst fixture lodges a solar space heating system). Wired into `calculator.py` + `cert_to_inputs` via `CalculatorInputs.space_heating_monthly_kwh`. Six Elmhurst fixtures conform end-to-end on (95)/(97)/(98a)/(98c)/(99)/annual @ 5e-2..1e-1 kWh (looser than §6/§7's 5e-3 because LINE_84/93/94 fixture pins are 4-d.p. display-rounded and §8's 0.024·n_m·(L−ηG) amplifies that rounding). |
|
||||
| 8c | Space cooling requirement | `worksheet/space_cooling.py` | **Full (no-AC zero-branch)** | Worksheet-driven (100)..(108) via `space_cooling_monthly_kwh`. Table 10a η_loss with 8-dp γ rounding + L=0 sentinel; Table 10b Q_cool with Jun-Aug inclusion mask + post-f_C × f_intermittent 1-kWh clamp per spec line 10321. Internal temp hardcoded 24 °C. Wired into `calculator.py` (`MonthlyEntry.space_cool_requirement_kwh` + `SapResult.space_cooling_kwh_per_yr`) + `cert_to_inputs` via `CalculatorInputs.space_cooling_monthly_kwh`. Six Elmhurst fixtures all `has_fixed_air_conditioning=False` → (107), (108) ≡ 0 — ALL_FIXTURES asserts (101)/(103)/(106)/(107)/(108) per fixture; synthetic positive test (γ=1 closed-form) covers the algebra. **Deferred**: RdSAP cooled-area defaulting rule + `cooling_gains_from_cert` (drops Table 5a items per spec 10280) + Table 10c SEER → cooling fuel kWh + fuel cost cascade (first non-zero-cooling cert triggers this slice). |
|
||||
| 8f | Fabric Energy Efficiency (line ref (109)) | `worksheet/fabric_energy_efficiency.py` | **Full (rating-conditions transparency)** | Spec line 7898: (109) = (98a) ÷ (4) + (108). `fabric_energy_efficiency_kwh_per_m2_yr(...)` is a single-scalar free function — no dataclass. Σ(98a) (pre Appendix H solar) added as `SpaceHeatingResult.space_heating_requirement_kwh_per_yr` so spec literal is honoured; for our corpus (98b)=0 so Σ(98a) = Σ(98c). `cert_to_inputs` precomputes FEE from local SpaceHeatingResult + SpaceCoolingResult; calculator passes through to `SapResult.fabric_energy_efficiency_kwh_per_m2_yr`. Six Elmhurst fixtures all (108)=0 → LINE_109 = LINE_99 exactly. **§11 compliance conditions** (different ventilation / HW / lighting / gains column) are deferred — current FEE is a rating-conditions transparency output, not a §11 compliance figure. Future §11 slice invokes the same function with §11-conditions upstream values. |
|
||||
| 9 | Energy requirements per heating system | `worksheet/space_heating.py` | Partial | Single main system only — **no Table 11 secondary heating allocation** (10% fraction on most boilers — likely big MAE) |
|
||||
| 10 | Cooling (spec heading — same content as §8c worksheet block) | `worksheet/space_cooling.py` | **Full (no-AC zero-branch)** | See §8c row above. |
|
||||
| 11 | FEE | — | Not implemented | Only for new-build; not required for ratings |
|
||||
| 11 | FEE compliance conditions | `worksheet/fabric_energy_efficiency.py` (the function exists; §11 conditions don't run yet) | Partial | (109) formula exposed via `fabric_energy_efficiency_kwh_per_m2_yr`. Spec §11 conditions (lines 2152-2164: 2-4 extract fans, instantaneous-electric shower, 125 l/day water, 185 lm/m² lighting at 66.9 lm/W, column (B) heating gains, column (A) cooling gains, etc.) not implemented — only relevant for new-build compliance. |
|
||||
| 12 | Total energy + fuel costs | `calculator.py` | Partial | Per-end-use cost split ✓; meter_type tariff routing ✓ (S-B15); PV cost credit ✓ (S-B19); **standing charges not included** (Table 12 note (a) says rating omits standing charge for std electricity tariff) |
|
||||
| 13 | SAP rating | `worksheet/rating.py` | Full | Equations 7-9 verified against SAP 10.2 §13 |
|
||||
| 14 | CO2 + primary energy | `calculator.py` SapResult.co2_kg_per_yr | Partial | Single CO2 factor on main fuel; no per-end-use CO2 mixing; **no primary energy calculation** |
|
||||
|
|
@ -232,3 +233,23 @@ Status now: 100-cert MAE 4.49, 300-cert MAE 5.45, bias near zero (±0.2). Worksh
|
|||
2. **RdSAP cooled-area defaulting (105)** — `cert_to_inputs` currently passes `cooled_area_fraction = 0.0` always. For `has_fixed_air_conditioning=True` certs the RdSAP 10 spec gives a defaulting rule (cooled area not lodged; cert side derives from dwelling type or assumes whole-dwelling). Needs PDF lookup. Triggered by the first cooling-enabled cert.
|
||||
3. **Table 10c SEER + cooling fuel kWh + fuel cost cascade** — Q_cool (107) needs to drive an electricity-fuel-kWh path (Q_cool ÷ SEER) and through Table 12 onto `SapResult.total_fuel_cost_gbp`. Currently the cooling kWh sits on `MonthlyEntry.space_cool_requirement_kwh` but doesn't propagate into fuel costs or CO2. Triggered by the first cooling-enabled cert.
|
||||
4. **§8f Fabric Energy Efficiency (109) = (98a)/TFA + (108)** — only relevant for new-build compliance (FEE replaces SAP rating in some contexts). Picked up by §8f slice.
|
||||
|
||||
## §8f — slice progress (xlsx rows 466–470)
|
||||
|
||||
| Line ref | Description | Status | Commit |
|
||||
|---|---|---|---|
|
||||
| — | `fabric_energy_efficiency_kwh_per_m2_yr` free function (no dataclass) | ✅ | `43cc16bc` |
|
||||
| — | `SpaceHeatingResult.space_heating_requirement_kwh_per_yr` (Σ(98a) — pre Appendix H) | ✅ | `43cc16bc` |
|
||||
| (109) | FEE = (98a)/(4) + (108), kWh/m²/yr | ✅ | `43cc16bc` |
|
||||
| — | 6-fixture ALL_FIXTURES conformance (LINE_109 = LINE_99 since (98b)=0 + (108)=0) | ✅ | `43cc16bc` |
|
||||
| — | `CalculatorInputs.fabric_energy_efficiency_kwh_per_m2_yr` + `SapResult.fabric_energy_efficiency_kwh_per_m2_yr` + cert_to_inputs wiring | ✅ | `43cc16bc` |
|
||||
| — | §11 compliance conditions (separate worksheet re-run with §11 ventilation / HW / lighting / gains-column assumptions) | ⏸ deferred | — |
|
||||
|
||||
**Six Elmhurst fixtures conform end-to-end on §8f to ≤5e-3 kWh/m²** on LINE_109. The tolerance inherits from the 4-d.p. display-rounding floor of the LINE_98C_ANNUAL_KWH fixture pins (§8 conformance is at 1e-1 kWh on annual, which divides by TFA to ~5e-3 kWh/m²).
|
||||
|
||||
**E2e SAP-score impact:** none. (109) is a transparency output for rating runs — it doesn't feed ECF, fuel costs, or CO2. The wiring lets §11 compliance code consume FEE later via `SapResult.fabric_energy_efficiency_kwh_per_m2_yr` once §11 conditions are implemented.
|
||||
|
||||
### Remaining §8f work
|
||||
|
||||
1. **§11 FEE compliance conditions** — spec lines 2152-2164 require a separate worksheet run with: natural ventilation + 2-4 extract fans by TFA, instantaneous-electric shower + bath, 125 l/day water-use target, lighting capacity 185 lm/m² at 66.9 lm/W, column (B) of Table 5 for heating gains, column (A) for cooling gains, etc. This is a new-build compliance path; existing-dwelling ratings don't trigger it. Lands as `fabric_energy_efficiency_under_section_11_conditions(...)` when the first compliance use case emerges.
|
||||
2. **Σ(98a) ≠ Σ(98c) regression coverage** — when Appendix H solar space heating lands (currently (98b) ≡ 0), Σ(98a) will diverge from Σ(98c). The FEE function consumes Σ(98a) per spec; a new fixture with non-zero (98b) would assert that distinction holds.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue