diff --git a/hub/city_model_structure/building_demand/thermal_zone.py b/hub/city_model_structure/building_demand/thermal_zone.py index 8c8cb13c..01e52b72 100644 --- a/hub/city_model_structure/building_demand/thermal_zone.py +++ b/hub/city_model_structure/building_demand/thermal_zone.py @@ -603,10 +603,11 @@ class ThermalZone: _mean_peak_flow = 0 _mean_service_temperature = 0 for usage in self.usages: - # todo: change hardcoded density DHW - _mean_peak_density_load += usage.percentage * 1 #usage.domestic_hot_water.density + #todo: change hardcoded density DHW + #_mean_peak_density_load += usage.percentage * 1 #usage.domestic_hot_water.density _mean_peak_flow += usage.percentage * usage.domestic_hot_water.peak_flow - _mean_service_temperature += usage.percentage * usage.domestic_hot_water.service_temperature + # todo: change hardcoded service temperature + _mean_service_temperature += usage.percentage * 45 self._domestic_hot_water.density = _mean_peak_density_load self._domestic_hot_water.peak_flow = _mean_peak_flow self._domestic_hot_water.service_temperature = _mean_service_temperature diff --git a/hub/exports/building_energy/idf.py b/hub/exports/building_energy/idf.py index 51e8286d..644c0f7e 100644 --- a/hub/exports/building_energy/idf.py +++ b/hub/exports/building_energy/idf.py @@ -428,15 +428,18 @@ class Idf: fuel_type = 'Electricity' method = 'Watts/Area' factor_size = thermal_zone.total_floor_area / thermal_zone.footprint_area - peak_flow_rate = thermal_zone.domestic_hot_water.peak_flow*factor_size - #_object = self._idf.newidfobject(self._DHW) + #todo: revision of values of peak flow (too low). Added a factor, but to check original units + peak_flow_rate = thermal_zone.domestic_hot_water.peak_flow*factor_size*thermal_zone.total_floor_area + # = self._idf.newidfobject(self._DHW) #print(vars(_object)) self._idf.newidfobject(self._DHW, - Name=f'{zone_name}_DHW', + Name=f'DHW {zone_name}', Peak_Flow_Rate=peak_flow_rate, Flow_Rate_Fraction_Schedule_Name=f'DHW_prof schedules {thermal_zone.usage_name}', Target_Temperature_Schedule_Name=f'DHW_temp schedules {thermal_zone.usage_name}', - EndUse_Subcategory=f'DHW {thermal_zone.usage_name}' + Hot_Water_Supply_Temperature_Schedule_Name=f'DHW_temp schedules {thermal_zone.usage_name}', + EndUse_Subcategory=f'DHW {zone_name}', + Zone_Name=zone_name ) def _rename_building(self, city_name): name = str(str(city_name.encode("utf-8"))) @@ -516,7 +519,7 @@ class Idf: self._idf.newidfobject( "OUTPUT:VARIABLE", Variable_Name="Zone Ideal Loads Supply Air Total Heating Energy", - Reporting_Frequency="Hourly", + Reporting_Frequency="Monthly", ) #_object = self._idf.newidfobject("OUTPUT:VARIABLE") #print(vars(_object)) @@ -524,7 +527,13 @@ class Idf: self._idf.newidfobject( "OUTPUT:VARIABLE", Variable_Name="Zone Ideal Loads Supply Air Total Cooling Energy", - Reporting_Frequency="Hourly", + Reporting_Frequency="Monthly", + ) + + self._idf.newidfobject( + "OUTPUT:VARIABLE", + Variable_Name="Water Use Equipment Heating Rate", + Reporting_Frequency="Monthly", ) #self._idf.newidfobject(