From 841a6136bbf4c38be37352a696976cb5401e9ebd Mon Sep 17 00:00:00 2001 From: guille Date: Tue, 15 Oct 2024 06:12:11 +0200 Subject: [PATCH] Validation in progress --- hub/exports/building_energy/cerc_idf.py | 2 +- hub/exports/building_energy/idf_helper/idf_appliance.py | 2 +- hub/exports/building_energy/idf_helper/idf_base.py | 3 ++- hub/exports/building_energy/idf_helper/idf_window.py | 2 +- tests/test_exports.py | 2 -- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/hub/exports/building_energy/cerc_idf.py b/hub/exports/building_energy/cerc_idf.py index 7892cbc4..b41d96d6 100644 --- a/hub/exports/building_energy/cerc_idf.py +++ b/hub/exports/building_energy/cerc_idf.py @@ -80,7 +80,7 @@ class CercIdf(IdfBase): self._export() def _create_geometry_rules(self): - file = self._files['zones'] + file = self._files['constructions'] self._write_to_idf_format(file, idf_cte.GLOBAL_GEOMETRY_RULES) self._write_to_idf_format(file, 'UpperLeftCorner', 'Starting Vertex Position') self._write_to_idf_format(file, 'CounterClockWise', 'Vertex Entry Direction') diff --git a/hub/exports/building_energy/idf_helper/idf_appliance.py b/hub/exports/building_energy/idf_helper/idf_appliance.py index dec3921c..9e435abb 100644 --- a/hub/exports/building_energy/idf_helper/idf_appliance.py +++ b/hub/exports/building_energy/idf_helper/idf_appliance.py @@ -23,4 +23,4 @@ class IdfAppliance(IdfBase): self._write_to_idf_format(file, thermal_zone.appliances.radiative_fraction, 'Fraction Radiant') self._write_to_idf_format(file, 0, 'Fraction Lost') self._write_to_idf_format(file, 0, 'Carbon Dioxide Generation Rate') - self._write_to_idf_format(file, subcategory, 'EndUse Subcategory', ';') \ No newline at end of file + self._write_to_idf_format(file, subcategory, 'EndUse Subcategory', ';') diff --git a/hub/exports/building_energy/idf_helper/idf_base.py b/hub/exports/building_energy/idf_helper/idf_base.py index ea6fe237..ae761422 100644 --- a/hub/exports/building_energy/idf_helper/idf_base.py +++ b/hub/exports/building_energy/idf_helper/idf_base.py @@ -18,10 +18,11 @@ class IdfBase: 'window_materials': str((output_path / 'window_materials.idf').resolve()), 'constructions': str((output_path / 'constructions.idf').resolve()), 'zones': str((output_path / 'zones.idf').resolve()), + 'surfaces': str((output_path / 'surfaces.idf').resolve()), + 'fenestration': str((output_path / 'fenestration.idf').resolve()), 'occupancy': str((output_path / 'occupancy.idf').resolve()), 'lighting': str((output_path / 'lights.idf').resolve()), 'appliances': str((output_path / 'appliances.idf').resolve()), - 'surfaces': str((output_path / 'surfaces.idf').resolve()), 'shading': str((output_path / 'shading.idf').resolve()), 'infiltration': str((output_path / 'infiltration.idf').resolve()), 'ventilation': str((output_path / 'ventilation.idf').resolve()), diff --git a/hub/exports/building_energy/idf_helper/idf_window.py b/hub/exports/building_energy/idf_helper/idf_window.py index 4e2b2645..26876336 100644 --- a/hub/exports/building_energy/idf_helper/idf_window.py +++ b/hub/exports/building_energy/idf_helper/idf_window.py @@ -31,7 +31,7 @@ class IdfWindow(IdfBase): @staticmethod def add(self, building): - file = self._files['surfaces'] + file = self._files['fenestration'] for thermal_zone in building.thermal_zones_from_internal_zones: for index, boundary in enumerate(thermal_zone.thermal_boundaries): building_surface_name = f'Building_{building.name}_surface_{index}' diff --git a/tests/test_exports.py b/tests/test_exports.py index 0d672556..aa4d8a9e 100644 --- a/tests/test_exports.py +++ b/tests/test_exports.py @@ -159,8 +159,6 @@ class TestExports(TestCase): UsageFactory('nrcan', city).enrich() WeatherFactory('epw', city).enrich() try: - idf = EnergyBuildingsExportsFactory('idf', city, self._output_path).export() - # idf.run() idf = EnergyBuildingsExportsFactory('cerc_idf', city, self._output_path).export() idf.run()