From a3e4a47f5f7fe936b009ba3493feb13968807674 Mon Sep 17 00:00:00 2001 From: s_ranjbar Date: Tue, 25 Jun 2024 18:31:59 -0400 Subject: [PATCH] fix: small bugs in the simulation model resolved --- main.py | 2 +- scripts/system_simulation_models/archetype13.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index bd8539a6..16fbc7b8 100644 --- a/main.py +++ b/main.py @@ -12,7 +12,7 @@ from scripts.energy_system_sizing_and_simulation_factory import EnergySystemsSim from scripts.costs.cost import Cost from scripts.costs.constants import SYSTEM_RETROFIT_AND_PV # Specify the GeoJSON file path -file_path = (Path(__file__).parent / 'input_files' / 'processed_output -single_building.geojson') +file_path = (Path(__file__).parent / 'input_files' / 'processed_output.geojson') output_path = (Path(__file__).parent / 'out_files').resolve() city = GeometryFactory('geojson', path=file_path, diff --git a/scripts/system_simulation_models/archetype13.py b/scripts/system_simulation_models/archetype13.py index bb08df35..fa052948 100644 --- a/scripts/system_simulation_models/archetype13.py +++ b/scripts/system_simulation_models/archetype13.py @@ -19,7 +19,8 @@ class Archetype13: self._domestic_hot_water_peak_load = building.domestic_hot_water_peak_load[cte.YEAR][0] self._hourly_heating_demand = [demand / cte.HOUR_TO_SECONDS for demand in building.heating_demand[cte.HOUR]] self._hourly_cooling_demand = [demand / cte.HOUR_TO_SECONDS for demand in building.cooling_demand[cte.HOUR]] - self._hourly_dhw_demand = building.domestic_hot_water_heat_demand[cte.HOUR] + self._hourly_dhw_demand = [demand / cte.WATTS_HOUR_TO_JULES for demand in + building.domestic_hot_water_heat_demand[cte.HOUR]] self._output_path = output_path self._t_out = building.external_temperature[cte.HOUR] self.results = {} @@ -34,7 +35,8 @@ class Archetype13: heat_pump.nominal_cooling_output = round(self._cooling_peak_load) boiler.nominal_heat_output = round(0.5 * self._heating_peak_load) thermal_storage.volume = round( - (self._heating_peak_load * storage_factor * cte.WATTS_HOUR_TO_JULES) / (cte.WATER_HEAT_CAPACITY * cte.WATER_DENSITY * 25)) + (self._heating_peak_load * storage_factor * cte.WATTS_HOUR_TO_JULES) / + (cte.WATER_HEAT_CAPACITY * cte.WATER_DENSITY * 25)) return heat_pump, boiler, thermal_storage def dhw_sizing(self): @@ -45,7 +47,7 @@ class Archetype13: dhw_tes = dhw_hp.energy_storage_systems[0] dhw_tes.volume = round( (self._domestic_hot_water_peak_load * storage_factor * 3600) / (cte.WATER_HEAT_CAPACITY * cte.WATER_DENSITY * 10)) - if float(dhw_tes.volume) == 0: + if dhw_tes.volume == 0: dhw_tes.volume = 1 return dhw_hp, dhw_tes