Model/packages/domain
Khalim Conn-Kowlessar 4df056859e Cohort residual slice 11: Simplified Type 1 RR geometry — _part_geometry + heat_transmission
Implements RdSAP10 §3.9.1 Simplified Type 1 (True Room-in-Roof, no
common walls):

  A_RR = 12.5 × √(A_RR_floor / 1.5)

When the cert lodges only a `SapRoomInRoof(floor_area, construction_
age_band)` (no gable / party / sheltered / connected wall lengths),
ΣA_RR_gable/other = 0 → A_RR_final = A_RR, treated as timber-framed
roof structure with U from Table 18 col (4) "Room-in-roof, all elements".
The storey-below roof area (§3.8) is deducted by A_RR_floor per §3.9.

Changes:
  - `_part_geometry`: returns new keys `rr_floor_area_m2` and
    `rr_simplified_a_rr_m2`; existing `top_floor_area_m2` now subtracts
    `rr_floor_area_m2` (the §3.9 deduction).
  - Main loop: `roof += U_RR × A_RR` where U_RR is from
    `u_rr_default_all_elements(country, rir.construction_age_band)`.
    A_RR also joins the (31) external-area total for thermal-bridging.

Test: synthetic 2-storey + RR (15 m² floor) at age B → roof_w_per_k
math closes at abs=0.001 vs hand-computed 100.92 W/K.

Cohort impact (post-slice-11 vs post-slice-8):
  - 000474, 000490 unchanged at Δ=0 ✓
  - 000480: Δ=+12 → +4   (RR Simplified resolved most of the gap)
  - 000487: Δ=+11 → +3   (same)
  - 000516: Δ=+12 → +4   (same)
  - 000477: Δ=+2  → −6   (overshoot — the U985 PDF uses detailed §3.10
    per-surface RR lodgement; Simplified Type 1 at U=2.30 is too high
    for an RR with measured retrofit insulation. Closes once Detailed
    lands + 000477 fixture upgrades to detailed lodgement, slice 14.)

Reference: RdSAP 10 (10-06-2025) §3.9.1 page 21-22; Table 18 page 45.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:24:48 +00:00
..
src/domain Cohort residual slice 11: Simplified Type 1 RR geometry — _part_geometry + heat_transmission 2026-05-22 19:24:48 +00:00
pyproject.toml slice 13: to_rows(properties) returns pd.DataFrame 2026-05-16 16:43:28 +00:00
README.md added potential file scaffolding: 2026-05-15 10:56:53 +00:00

domna-domain

Shared domain types — Property, Properties, BaselinePerformance, Plan, PlanPhase, Scenario, ScenarioPhase, ScenarioSnapshot, Recommendation, OptimisedPackage, EpcPropertyData, etc.

Boundary: types only. No persistence, no IO, no business logic. Other packages and services depend on domna-domain; this package depends on nothing internal.

Domain definitions live in ../../CONTEXT.md. New types added here must match the glossary terms.

Layout

src/domain/
├── __init__.py
├── property.py             # Property, Properties, PropertyIdentity
├── site_notes.py
├── landlord_overrides.py
├── baseline_performance.py # lodged + effective pair (ADR-0004)
├── plan.py                 # Plan, PlanPhase, OptimisedPackage
├── scenario.py             # Scenario, ScenarioPhase, ScenarioSnapshot (ADR-0005)
├── recommendation.py
├── geospatial.py
├── solar.py
├── anomaly_flags.py
└── ml/
    ├── __init__.py
    ├── transform.py        # EpcMlTransform (versioned per §8.3)
    └── schema.py

When datatypes/epc/domain/ folds in, the EPC schema types move under src/domain/epc/.