diff --git a/docs/sap-spec/PCDF_Spec_Rev-06b_12_May_2021.pdf b/docs/sap-spec/PCDF_Spec_Rev-06b_12_May_2021.pdf new file mode 100644 index 00000000..22c40945 Binary files /dev/null and b/docs/sap-spec/PCDF_Spec_Rev-06b_12_May_2021.pdf differ diff --git a/docs/sap-spec/rdsap-10-specification-2025-06-10.pdf b/docs/sap-spec/RdSAP 10 Specification 10-06-2025.pdf similarity index 100% rename from docs/sap-spec/rdsap-10-specification-2025-06-10.pdf rename to docs/sap-spec/RdSAP 10 Specification 10-06-2025.pdf diff --git a/packages/domain/src/domain/sap/rdsap/tests/fixtures/golden/0535-9020-6509-0821-6222.json b/packages/domain/src/domain/sap/rdsap/tests/fixtures/golden/0535-9020-6509-0821-6222.json new file mode 100644 index 00000000..a9221ca8 --- /dev/null +++ b/packages/domain/src/domain/sap/rdsap/tests/fixtures/golden/0535-9020-6509-0821-6222.json @@ -0,0 +1,513 @@ +{ + "address_line_1": "67 Howick Park Drive", + "address_line_2": "Penwortham", + "air_tightness": { + "description": "(not tested)", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "assessment_type": "RdSAP", + "built_form": 2, + "calculation_software_version": "5.02r0316", + "cfl_fixed_lighting_bulbs_count": 6, + "co2_emissions_current": 2.5, + "co2_emissions_current_per_floor_area": 37, + "co2_emissions_potential": 2.2, + "completion_date": "2025-10-31", + "conservatory_type": 1, + "country_code": "ENG", + "created_at": "2025-10-31 17:58:26", + "current_energy_efficiency_band": "C", + "door_count": 1, + "draughtproofed_door_count": 0, + "dwelling_type": "Semi-detached house", + "energy_consumption_current": 201, + "energy_consumption_potential": 171, + "energy_rating_average": 60, + "energy_rating_current": 69, + "energy_rating_potential": 76, + "environmental_impact_current": 68, + "environmental_impact_potential": 72, + "extensions_count": 2, + "extract_fans_count": 2, + "floors": [ + { + "description": "Suspended, no insulation (assumed)", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + { + "description": "Suspended, insulated (assumed)", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + } + ], + "habitable_room_count": 4, + "has_fixed_air_conditioning": "false", + "has_heated_separate_conservatory": "false", + "has_hot_water_cylinder": "false", + "heated_room_count": 4, + "heating_cost_current": { + "currency": "GBP", + "value": 763 + }, + "heating_cost_potential": { + "currency": "GBP", + "value": 705 + }, + "hot_water": { + "description": "From main system", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "hot_water_cost_current": { + "currency": "GBP", + "value": 155 + }, + "hot_water_cost_potential": { + "currency": "GBP", + "value": 155 + }, + "incandescent_fixed_lighting_bulbs_count": 0, + "inspection_date": "2025-10-29", + "insulated_door_count": 0, + "language_code": 1, + "led_fixed_lighting_bulbs_count": 17, + "lighting": { + "description": "Good lighting efficiency", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "lighting_cost_current": { + "currency": "GBP", + "value": 46 + }, + "lighting_cost_potential": { + "currency": "GBP", + "value": 46 + }, + "main_heating": [ + { + "description": "Boiler and radiators, mains gas", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "main_heating_controls": [ + { + "description": "Programmer, room thermostat and TRVs", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "measurement_type": 1, + "mechanical_ventilation": 0, + "multiple_glazed_proportion": 100, + "percent_draughtproofed": 90, + "post_town": "PRESTON", + "postcode": "PR1 0LX", + "potential_energy_efficiency_band": "C", + "pressure_test": 4, + "property_type": 0, + "region_code": 19, + "registration_date": "2025-10-31", + "renewable_heat_incentive": { + "space_heating_existing_dwelling": 7428.0, + "water_heating": 2074.92 + }, + "report_type": 2, + "roofs": [ + { + "description": "Pitched, 300 mm loft insulation", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + { + "description": "Pitched, insulated", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "sap_building_parts": [ + { + "building_part_number": 1, + "construction_age_band": "C", + "floor_heat_loss": 7, + "floor_insulation_thickness": "NI", + "identifier": "Main Dwelling", + "party_wall_construction": 2, + "roof_construction": 4, + "roof_insulation_location": 2, + "roof_insulation_thickness": "300mm", + "sap_floor_dimensions": [ + { + "floor": 0, + "floor_construction": 2, + "floor_insulation": 1, + "heat_loss_perimeter": { + "quantity": "metres", + "value": 11.99 + }, + "party_wall_length": { + "quantity": "metres", + "value": 6.94 + }, + "room_height": { + "quantity": "metres", + "value": 2.39 + }, + "total_floor_area": { + "quantity": "square metres", + "value": 30.45 + } + }, + { + "floor": 1, + "heat_loss_perimeter": { + "quantity": "metres", + "value": 13.55 + }, + "party_wall_length": { + "quantity": "metres", + "value": 6.94 + }, + "room_height": { + "quantity": "metres", + "value": 2.28 + }, + "total_floor_area": { + "quantity": "square metres", + "value": 30.77 + } + } + ], + "wall_construction": 4, + "wall_dry_lined": "N", + "wall_insulation_thickness": "NI", + "wall_insulation_type": 2, + "wall_thickness": 280, + "wall_thickness_measured": "Y" + }, + { + "building_part_number": 2, + "construction_age_band": "M", + "floor_heat_loss": 7, + "floor_insulation_thickness": "NI", + "identifier": "Extension 1", + "party_wall_construction": "NA", + "roof_construction": 8, + "roof_insulation_location": 7, + "sap_floor_dimensions": [ + { + "floor": 0, + "floor_construction": 2, + "floor_insulation": 1, + "heat_loss_perimeter": { + "quantity": "metres", + "value": 6.67 + }, + "party_wall_length": { + "quantity": "metres", + "value": 0 + }, + "room_height": { + "quantity": "metres", + "value": 2.48 + }, + "total_floor_area": { + "quantity": "square metres", + "value": 5.37 + } + } + ], + "sloping_ceiling_insulation_thickness": "AB", + "wall_construction": 4, + "wall_dry_lined": "N", + "wall_insulation_thickness": "NI", + "wall_insulation_type": 4, + "wall_thickness": 280, + "wall_thickness_measured": "Y" + }, + { + "building_part_number": 3, + "construction_age_band": "C", + "floor_heat_loss": 1, + "floor_insulation_thickness": "NI", + "identifier": "Extension 2", + "party_wall_construction": "NA", + "roof_construction": 8, + "roof_insulation_location": 7, + "sap_floor_dimensions": [ + { + "floor": 0, + "floor_construction": 2, + "floor_insulation": 1, + "heat_loss_perimeter": { + "quantity": "metres", + "value": 2.81 + }, + "party_wall_length": { + "quantity": "metres", + "value": 0 + }, + "room_height": { + "quantity": "metres", + "value": 2.1 + }, + "total_floor_area": { + "quantity": "square metres", + "value": 1.92 + } + } + ], + "sloping_ceiling_insulation_thickness": "AB", + "wall_construction": 4, + "wall_dry_lined": "N", + "wall_insulation_thickness": "NI", + "wall_insulation_type": 2, + "wall_thickness": 280, + "wall_thickness_measured": "Y" + } + ], + "sap_energy_source": { + "electricity_smart_meter_present": "true", + "gas_smart_meter_present": "true", + "is_dwelling_export_capable": "false", + "mains_gas": "Y", + "meter_type": 2, + "photovoltaic_supply": { + "none_or_no_details": { + "percent_roof_area": 0 + } + }, + "pv_connection": 0, + "wind_turbines_count": 0, + "wind_turbines_terrain_type": 2 + }, + "sap_heating": { + "cylinder_size": 1, + "has_fixed_air_conditioning": "false", + "immersion_heating_type": "NA", + "main_heating_details": [ + { + "boiler_flue_type": 2, + "central_heating_pump_age": 0, + "emitter_temperature": 0, + "fan_flue_present": "Y", + "has_fghrs": "N", + "heat_emitter_type": 1, + "main_fuel_type": 26, + "main_heating_category": 2, + "main_heating_control": 2106, + "main_heating_data_source": 1, + "main_heating_fraction": 1, + "main_heating_index_number": 17507, + "main_heating_number": 1 + } + ], + "number_baths": 0, + "number_baths_wwhrs": 0, + "secondary_fuel_type": 26, + "secondary_heating_type": 605, + "shower_outlets": [ + { + "shower_outlet": { + "shower_outlet_type": 1, + "shower_wwhrs": 1 + } + } + ], + "water_heating_code": 901, + "water_heating_fuel": 26 + }, + "sap_version": 10.2, + "sap_windows": [ + { + "draught_proofed": "true", + "glazing_gap": 12, + "glazing_type": 3, + "orientation": 8, + "permanent_shutters_insulated": "N", + "permanent_shutters_present": "N", + "pvc_frame": "true", + "window_height": 1.32, + "window_location": 0, + "window_type": 1, + "window_wall_type": 1, + "window_width": 2.53 + }, + { + "draught_proofed": "true", + "glazing_gap": 12, + "glazing_type": 3, + "orientation": 2, + "permanent_shutters_insulated": "N", + "permanent_shutters_present": "N", + "pvc_frame": "true", + "window_height": 1.3, + "window_location": 0, + "window_type": 1, + "window_wall_type": 1, + "window_width": 0.56 + }, + { + "draught_proofed": "true", + "glazing_type": 13, + "orientation": 4, + "permanent_shutters_insulated": "N", + "permanent_shutters_present": "N", + "window_height": 2.11, + "window_location": 1, + "window_type": 1, + "window_wall_type": 1, + "window_width": 3.02 + }, + { + "draught_proofed": "true", + "glazing_gap": 12, + "glazing_type": 3, + "orientation": 8, + "permanent_shutters_insulated": "N", + "permanent_shutters_present": "N", + "pvc_frame": "true", + "window_height": 1.53, + "window_location": 0, + "window_type": 1, + "window_wall_type": 1, + "window_width": 1.99 + }, + { + "draught_proofed": "true", + "glazing_gap": 12, + "glazing_type": 3, + "orientation": 2, + "permanent_shutters_insulated": "N", + "permanent_shutters_present": "N", + "pvc_frame": "true", + "window_height": 1.28, + "window_location": 0, + "window_type": 1, + "window_wall_type": 1, + "window_width": 1.04 + }, + { + "draught_proofed": "true", + "glazing_gap": 12, + "glazing_type": 3, + "orientation": 2, + "permanent_shutters_insulated": "N", + "permanent_shutters_present": "N", + "pvc_frame": "true", + "window_height": 1.28, + "window_location": 0, + "window_type": 1, + "window_wall_type": 1, + "window_width": 0.55 + }, + { + "draught_proofed": "true", + "glazing_gap": 12, + "glazing_type": 3, + "orientation": 2, + "permanent_shutters_insulated": "N", + "permanent_shutters_present": "N", + "pvc_frame": "true", + "window_height": 1.16, + "window_location": 0, + "window_type": 1, + "window_wall_type": 1, + "window_width": 0.85 + }, + { + "draught_proofed": "true", + "glazing_gap": 12, + "glazing_type": 3, + "orientation": 4, + "permanent_shutters_insulated": "N", + "permanent_shutters_present": "N", + "pvc_frame": "true", + "window_height": 1.29, + "window_location": 0, + "window_type": 1, + "window_wall_type": 1, + "window_width": 1.65 + }, + { + "draught_proofed": "true", + "glazing_gap": 12, + "glazing_type": 3, + "orientation": 1, + "permanent_shutters_insulated": "N", + "permanent_shutters_present": "N", + "pvc_frame": "true", + "window_height": 1.32, + "window_location": 0, + "window_type": 1, + "window_wall_type": 1, + "window_width": 1.29 + } + ], + "schema_type": "RdSAP-Schema-21.0.1", + "schema_version_original": "21.0.1", + "secondary_heating": { + "description": "Room heaters, mains gas", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "solar_water_heating": "N", + "status": "entered", + "suggested_improvements": [ + { + "energy_performance_rating": 71, + "environmental_impact_rating": 71, + "improvement_category": 5, + "improvement_details": { + "improvement_number": 57 + }, + "improvement_type": "W1", + "indicative_cost": "\u00a35,000 - \u00a310,000", + "sequence": 1, + "typical_saving": { + "currency": "GBP", + "value": 58 + } + }, + { + "energy_performance_rating": 76, + "environmental_impact_rating": 72, + "improvement_category": 5, + "improvement_details": { + "improvement_number": 34 + }, + "improvement_type": "U", + "indicative_cost": "\u00a38,000 - \u00a310,000", + "sequence": 2, + "typical_saving": { + "currency": "GBP", + "value": 196 + } + } + ], + "tenure": 3, + "total_floor_area": 69, + "transaction_type": 15, + "uprn": 100010634425, + "uprn_source": "Energy Assessor", + "walls": [ + { + "description": "Cavity wall, filled cavity", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + { + "description": "Cavity wall, as built, insulated (assumed)", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "window": { + "description": "Fully double glazed", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + } +} \ No newline at end of file diff --git a/packages/domain/src/domain/sap/worksheet/tests/test_dimensions.py b/packages/domain/src/domain/sap/worksheet/tests/test_dimensions.py index 88811585..afd01852 100644 --- a/packages/domain/src/domain/sap/worksheet/tests/test_dimensions.py +++ b/packages/domain/src/domain/sap/worksheet/tests/test_dimensions.py @@ -468,7 +468,7 @@ def test_all_rir_shapes_apply_section_1_2_45m_convention_uniformly( ) -> None: """RdSAP §3.9.2 wall-area formulas and §3.10 detailed measurements are for §3 heat-loss U-value calculation, **not** §1 dimensions — - confirmed at docs/sap-spec/rdsap-10-specification-2025-06-10.pdf + confirmed at `docs/sap-spec/RdSAP 10 Specification 10-06-2025.pdf` pages 22-24. The §1 storey-height convention of 2.45 m from §3.9.1 extends uniformly to every RR shape: each contributes exactly `floor_area` to TFA, `floor_area × 2.45` to volume, and +1 storey.