mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Root cause: SAP 10.2 has an internal unit-convention ambiguity for (H7)m between page 75 (Equation H1 implies W/m² 24-hour-average flux) and page 76 (verbatim "Monthly solar radiation per m² from U3.3 in Appendix U", i.e. kWh/m²/month monthly integrated). Page 77 (H23) formula's `× hours / 1000` term double-converts when (H7) is W/m². The cascade's `surface_solar_flux_w_per_m2` returns the §U3.2 24h-avg flux in W/m² (verified bit-exact vs Elmhurst worksheet line 295: SE 90° Jan region 0 = 36.7938 W/m²). The (H9) helper was using this directly without applying the U3.3 conversion that page 76's "from U3.3" cross-reference calls for. Elmhurst-certified software follows the U3.3 reading. SAP 10.2 spec p.76 line (H7): "Monthly solar radiation per m² from U3.3 in Appendix U". Appendix U §U3.3 (p.130) defines the conversion S_monthly = 0.024 × n_m × S(orient,p,m), where S(orient,p,m) is the §U3.2 24-hour-average flux in W/m². Therefore: (H7)m_U3.3 [kWh/m²/month] = flux_U3.2 [W/m²] × hours / 1000 Option A fix (per ChatGPT-mediated research): apply the U3.3 conversion inside the (H9) helper, so (H9) is in kWh/month rather than W. Spec p.77 (H23) formula then carries the conversion's dimensional residue correctly without double-counting. Diagnostic that closed the trap: back-solving poly(X_cas, Y_eff) = ws_H24/H17 at fixed X across 24 worksheet-positive observations from 4 cert fixtures (000565 + new A/B/C at sap worksheets/Solar PV tests/) revealed Y_eff/Y_cascade took ONLY two distinct values: - 0.7200 (exact) for every 30-day month observation - 0.7440 (exact) for every 31-day month observation i.e. exactly days × 24 / 1000. No utilizability function, no missing constant — a per-month unit-conversion factor that the polynomial non-linearity had been masking. Closure metrics (HEAD post-fix): - 000565 (W-30, modest): annual Δ −0.0000 kWh (every month exact) - A-baseline (S-30, modest): annual Δ +0.0001 kWh - B-highY (S-30, none): annual Δ −0.0000 kWh (incl Oct 10.5905) - C-lowY (N-60, signif): annual Δ −4.36 kWh (polynomial zero-clamp boundary; worksheet poly = 0.0024 → 0.41 kWh, cascade poly = −0.04 → 0) 47/48 month-observations pin at <1e-4 kWh. Test baseline: 547 pass + 9 expected `test_sap_result_pin[000565-*]` cascade-gap fails (unchanged — orchestrator still NOT integrated into water_heating.py:943; that's the follow-on slice that closes cert 000565's HW pin +272 → ~0). Pyright net-zero on both touched files. Files: - domain/sap10_calculator/worksheet/appendix_h_solar.py: rename `monthly_solar_energy_available_h9_w` → `_h9_kwh_per_month`, add `hours_in_month` param, apply U3.3 conversion. Y23 param renamed accordingly. Orchestrator updated. - domain/sap10_calculator/worksheet/tests/test_appendix_h_solar.py: add cert 000565 (H24)m monthly magnitude pin at abs < 1e-3 kWh; update H9 + Y23 unit tests for new kWh/month units. - BRIEF_APPENDIX_H_EN_15316_RESEARCH.md: new "Closure" section with the days-in-month diagnostic, root cause, and lessons. - HANDOVER_POST_4_CERT_EMPIRICAL.md: NEW — closure handover. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| addresses | ||
| sap10_calculator | ||
| sap10_ml | ||
| tasks | ||
| postcode.py | ||