Model/packages
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
..
domain Cohort residual slice 11: Simplified Type 1 RR geometry — _part_geometry + heat_transmission 2026-05-22 19:24:48 +00:00
fetchers added potential file scaffolding: 2026-05-15 10:56:53 +00:00
repos added potential file scaffolding: 2026-05-15 10:56:53 +00:00
utils added potential file scaffolding: 2026-05-15 10:56:53 +00:00
README.md added potential file scaffolding: 2026-05-15 10:56:53 +00:00

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/.