Model/datatypes
Khalim Conn-Kowlessar a0413155ae Slice S0380.102: Wire MEV decentralised cascade into pumps_fans (SAP 10.2 §2.6.4 + Table 4f line 230a)
SAP 10.2 Table 4f line (230a) annual electricity for mechanical
ventilation fans, decentralised MEV branch:

    E_fans_kwh = SFPav × 1.22 × V

where SFPav is the §2.6.4 equation (1) flow-weighted average SFP
across every fan in the installation, with PCDB Table 322 supplying
per-configuration (flow, SFP) and PCDB Table 329 supplying the
ducting-type IUF.

This slice composes the foundation slices S0380.98 (Table 322),
S0380.99 (Table 329), S0380.100 (SFPav helper) into a cert-driven
cascade — `_mev_decentralised_kwh_per_yr_from_cert(epc)` reads:

    MV PCDF Reference Number  → PCDB Table 322 record (per-config SFP)
    Duct Type (Flexible/Rigid) → PCDB Table 329 in-use factor
    Wet Rooms count           → per-fan-type count distribution

Three coupled changes:

1. Elmhurst extractor + schema — `_extract_ventilation` parses §12.1
   "MV PCDF Reference Number", "Wet Rooms", "Duct Type", "Approved
   Installation". New fields on `VentilationAndCooling`.
2. Mapper — plumbs the lodgements through to
   `EpcPropertyData.mechanical_ventilation_index_number`,
   `.wet_rooms_count`, `.mechanical_vent_duct_type`. New
   `_elmhurst_mv_duct_type_int` helper (Flexible→1, Rigid→2 per PCDF
   Spec §A.20 field 12 convention) with strict-raise on unknown
   labels per [[unmapped-elmhurst-label]].
3. Cascade — `_table_4f_additive_components` calls the new
   `_mev_decentralised_kwh_per_yr_from_cert(epc)` to add the (230a)
   contribution alongside the existing flue-fan + solar-HW pump
   additions.

Per-fan count convention (reverse-engineered from cert 000565):
- Each PCDB-defined configuration (1..6) contributes 1 baseline fan.
- Through-wall configurations scale with wet-rooms count:
    through-wall kitchen (5):   wet_rooms_count fans
    through-wall other wet (6): wet_rooms_count + 1 fans
- Configurations with blank SFP (e.g. record 500755 in-duct codes 3,
  4) contribute 0 to the numerator but their flow rate to the
  denominator per SAP §2.6.4 "summation is over all the fans".

For cert 000565 (wet_rooms=2) this yields the worksheet's observed
fan distribution (1, 1, 1, 1, 2, 3) → SFPav = 11.7205 / 92.0 =
0.12740 W/(l/s), and (230a) = 0.12740 × 1.22 × 820.4385 = 127.5159
kWh/year ✓ matches worksheet line (230a) at 1e-4.

TODO: validate the count convention against a second MEV
decentralised fixture; the rule above fits cert 000565 alone.

Cert 000565 closure state at HEAD:
- pumps_fans_kwh_per_yr: 125.0 → 252.5159 ✓ EXACT (was 255.0 pre-arc;
  the MEV +127.5 contribution closes the residual)
- sap_score (int): 29 ✓ EXACT preserved
- sap_score_continuous: 28.69 (S0380.101 transient) → 28.5043 vs
  ws 28.5087 (Δ -0.0044). Was -0.0001 pre-arc — the MEV fix revealed
  a pre-existing residual elsewhere in the cost cascade (likely
  Table 12a HP-on-E7 high-rate split per the original TODO at
  mapper.py:4039-4040; deferred to a separate slice).

Test count: 603 pass + 7 expected 000565 fails (was 8 —
pumps_fans_kwh_per_yr flipped FAIL→PASS, removed from work queue).

Cohort safety: only cert 000565 lodges a non-None MV PCDF Reference
Number across the Summary fixture set; cohort certs return 0 from
`_mev_decentralised_kwh_per_yr_from_cert` (no MEV system).

Pyright net-zero per touched file.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 15:45:55 +00:00
..
epc Slice S0380.102: Wire MEV decentralised cascade into pumps_fans (SAP 10.2 §2.6.4 + Table 4f line 230a) 2026-05-30 15:45:55 +00:00
magicplan typing and renaming 🟪 2026-05-07 13:26:49 +00:00
__init__.py further breaking up code 2023-07-20 12:24:34 +01:00
datatypes.py further breaking up code 2023-07-20 12:24:34 +01:00
enums.py completed build of new demo portfolio - some fixed required still 2023-11-20 14:42:16 +00:00