diff --git a/hub/exports/building_energy/insel/insel_monthly_energy_balance.py b/hub/exports/building_energy/insel/insel_monthly_energy_balance.py index ff166a6a..f517abba 100644 --- a/hub/exports/building_energy/insel/insel_monthly_energy_balance.py +++ b/hub/exports/building_energy/insel/insel_monthly_energy_balance.py @@ -126,17 +126,18 @@ class InselMonthlyEnergyBalance(Insel): for thermal_boundary in thermal_zone.thermal_boundaries: type_code = _CONSTRUCTION_CODE[thermal_boundary.type] - window_area = 0 - if thermal_boundary.window_ratio < 1: - window_area = thermal_boundary.opaque_area * thermal_boundary.window_ratio / (1 - thermal_boundary.window_ratio) + wall_area = thermal_boundary.opaque_area * (1 + thermal_boundary.window_ratio) + if thermal_boundary.type == cte.WALL: + wall_area = wall_area * (1 - thermal_boundary.parent_surface.percentage_shared) + window_area = wall_area * thermal_boundary.window_ratio parameters.append(type_code) if thermal_boundary.type != cte.GROUND: - parameters.append(thermal_boundary.opaque_area + window_area) + parameters.append(wall_area) parameters.append('0.0') else: parameters.append('0.0') - parameters.append(thermal_boundary.opaque_area + window_area) + parameters.append(wall_area) parameters.append(thermal_boundary.u_value) parameters.append(window_area) diff --git a/hub/imports/usage/comnet_usage_parameters.py b/hub/imports/usage/comnet_usage_parameters.py index 334e1d92..584c5b6b 100644 --- a/hub/imports/usage/comnet_usage_parameters.py +++ b/hub/imports/usage/comnet_usage_parameters.py @@ -106,11 +106,13 @@ class ComnetUsageParameters: _domestic_hot_water = DomesticHotWater() _domestic_hot_water.density = archetype.domestic_hot_water.density _domestic_hot_water.service_temperature = archetype.domestic_hot_water.service_temperature - cold_temperature = cold_water_temperature[cte.YEAR]['epw'] - peak_flow = 0 - if (archetype.domestic_hot_water.service_temperature - cold_temperature) > 0: - peak_flow = archetype.domestic_hot_water.density / cte.WATER_DENSITY / cte.WATER_HEAT_CAPACITY \ - / (archetype.domestic_hot_water.service_temperature - cold_temperature) + peak_flow = None + if len(cold_water_temperature) > 0: + cold_temperature = cold_water_temperature[cte.YEAR]['epw'] + peak_flow = 0 + if (archetype.domestic_hot_water.service_temperature - cold_temperature) > 0: + peak_flow = archetype.domestic_hot_water.density / cte.WATER_DENSITY / cte.WATER_HEAT_CAPACITY \ + / (archetype.domestic_hot_water.service_temperature - cold_temperature) _domestic_hot_water.peak_flow = peak_flow _domestic_hot_water.schedules = archetype.domestic_hot_water.schedules usage.domestic_hot_water = _domestic_hot_water diff --git a/hub/imports/usage/nrcan_usage_parameters.py b/hub/imports/usage/nrcan_usage_parameters.py index 6917fcb9..2577a781 100644 --- a/hub/imports/usage/nrcan_usage_parameters.py +++ b/hub/imports/usage/nrcan_usage_parameters.py @@ -116,9 +116,12 @@ class NrcanUsageParameters: _domestic_hot_water = DomesticHotWater() _domestic_hot_water.peak_flow = archetype.domestic_hot_water.peak_flow _domestic_hot_water.service_temperature = archetype.domestic_hot_water.service_temperature - cold_temperature = cold_water_temperature[cte.YEAR]['epw'] - _domestic_hot_water.density = archetype.domestic_hot_water.peak_flow * cte.WATER_DENSITY * cte.WATER_HEAT_CAPACITY \ - * (archetype.domestic_hot_water.service_temperature - cold_temperature) + density = None + if len(cold_water_temperature) > 0: + cold_temperature = cold_water_temperature[cte.YEAR]['epw'] + density = archetype.domestic_hot_water.peak_flow * cte.WATER_DENSITY * cte.WATER_HEAT_CAPACITY \ + * (archetype.domestic_hot_water.service_temperature - cold_temperature) + _domestic_hot_water.density = density _domestic_hot_water.schedules = archetype.domestic_hot_water.schedules usage.domestic_hot_water = _domestic_hot_water