mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Builds on S0380.66 (Appendix H pure helpers) + S0380.67 (W·h → kWh
unit fix) to assemble the spec-ordered H7 → H9 → … → H24 cascade
into a single entry point. Cert 000565's complete Appendix H input
set now flows through one call:
h24 = solar_water_heating_input_monthly_kwh(
collector_orientation=Orientation.W, collector_pitch_deg=30.0,
region=0, # UK average per rating
aperture_area_m2=3.0, # (H1)
zero_loss_efficiency=0.8, # (H2)
linear_heat_loss_a1=4.0, # (H3)
second_order_heat_loss_a2=0.01, # (H4)
loop_efficiency=0.9, # (H5)
incidence_angle_modifier=0.94, # (H6)
overshading_factor=0.8, # (H8) Table H2 "Modest"
overall_heat_loss_coefficient_from_test=6.5, # (H10) override
dedicated_solar_storage_volume_l=53.0, # (H12)
combined_cylinder_total_volume_l=160.0, # (H13)
hot_water_demand_monthly_kwh=..., # (62)m
wwhrs_monthly_kwh=(0,)*12, # (63a)m
cold_water_temperatures_monthly_c=TABLE_J1_TCOLD_FROM_MAINS_C,
external_temperatures_monthly_c=..., # (96)m
solar_hot_water_only=True,
)
New module surface:
- `monthly_collector_solar_flux_w_per_m2` — thin 12-month wrapper over
the existing `surface_solar_flux_w_per_m2` (Appendix U §U3.2
orientation + tilt polynomial). Cert 000565 collector: W, 30° pitch,
Thames Valley.
- `solar_water_heating_input_monthly_kwh` — chains all line-ref
helpers in spec order; returns (H24)m as a 12-tuple.
Tests:
- `test_monthly_collector_solar_flux_h7_returns_twelve_values_
matching_appendix_u` — smoke test pinning Jan < May < Jun shape
for the W-facing 30°-pitched collector.
- `test_solar_water_heating_input_monthly_kwh_returns_winter_zero_
summer_peak_shape` — orchestrator shape pin: 12-month tuple, all
non-negative, winter clamp to zero (Jan/Feb/Nov/Dec via Equation
H1's negative-X dominance), monotone Mar < May, Sep < Jun.
Magnitude pin against worksheet line 415 (Σ(H24)1..12 = 281.3478)
is DEFERRED to the next slice: current orchestrator output is
~510 kWh annual (1.8× the worksheet), traced to a spec ambiguity
between the top-level Equation H1 Y formula
(Y = Px · Aap · IAM · η0 · ηloop · Im · Hm / (1000 · Dm) — excludes
overshading H8) and the line-ref (H23) formulation
(Y = [(H18) · (H6) · (H5) · (H9) · ((41) · 24)] / [1000 · (H17)],
where (H9) = (H1) · (H2) · (H7) · (H8) includes H8). Both are
present in SAP 10.2 spec page 75-76 and differ by a factor of H8
(0.8 for cert 000565). Picking the spec-correct branch requires
either a worksheet trace of one cert's (H22)/(H23) intermediates or
a confirmed errata; the next slice runs that down and pins the
magnitude.
Test suite: 279 pass + 9 expected 000565 cascade-gap fails (unchanged
— orchestrator is not yet wired into `water_heating_from_cert`).
Pyright net-zero on both touched files.
Spec source: SAP 10.2 specification (14-03-2025) Appendix H pp.74-78
+ Appendix U §U3.2 page 127.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| addresses | ||
| sap10_calculator | ||
| sap10_ml | ||
| tasks | ||
| postcode.py | ||