mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Third slice of the SAP10 Calculator Session A (ADR-0009). Ports the SAP 10.2 / RdSAP10 §4.1 air-change-rate worksheet for the no-pressure-test path. Returns an InfiltrationBreakdown carrying each named worksheet line so callers can audit per SAP convention: (8) openings_ach — Table 2.1 rate × count / volume (10) additional_ach — (storey_count − 1) × 0.1 (11) structural_ach — 0.25 steel/timber-frame, 0.35 masonry (12) floor_ach — 0.2 unsealed timber / 0.1 sealed / 0 (13) draught_lobby_ach — 0.05 absent, 0.0 present (15) window_ach — 0.25 − 0.2 × (pct_dp / 100) (16) total_ach — sum of all of the above Table 2.1 rates: open chimney 80, open flue 20, closed-fire chimney 10, solid-fuel-boiler chimney 20, other-heater chimney 35, blocked chimney 20, intermittent fan 10, passive vent 10, flueless gas fire 40 (all m³/hour per opening). 9 AAA cycles cover the baseline calculation, each Table 2.1 opening contribution, frame-vs-masonry structural baseline, suspended-timber floor sealed/unsealed split, draught-lobby presence, window draught- proofing scale, multi-opening aggregation, and volume_m3 ≤ 0 validation. Pressure-test override (worksheet lines 17-21) and mechanical-ventilation adjustments (Table 4g, n_eff formula §2.6.6) are out of scope for this slice — separate later slices per ADR-0009. |
||
|---|---|---|
| .. | ||
| domain | ||
| fetchers | ||
| repos | ||
| utils | ||
| README.md | ||
Shared packages
Workspace packages consumed by services/*. Each package is its own Python distribution with its own pyproject.toml; services import via the workspace dependency mechanism ({ workspace = true }).
| Package | Purpose |
|---|---|
domain/ |
Shared domain types — Property, BaselinePerformance, Plan, Scenario, EpcPropertyData, etc. No persistence, no IO, no business logic. |
repos/ |
Persistence layer — one repo per aggregate. Owns the SQL. Depends on domain. |
fetchers/ |
External API clients (gov EPC, Ofgem, Google Solar, etc.). Depend on domain for response shapes. |
utils/ |
Cross-cutting infra — logging, S3, CloudWatch URL builders, SQS task helpers. |
Adding a new shared package
Only when a real second consumer materialises. Don't pre-shatter (repos-epc, repos-property, ...) — split when a deployment needs to drop a dep, not before.
See ../ara_backend_design.md §11 for the broader monorepo layout and ../CONTEXT.md for the domain glossary that names the types living in domain/.