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 1866a37e..cc322550 100644 --- a/hub/exports/building_energy/insel/insel_monthly_energy_balance.py +++ b/hub/exports/building_energy/insel/insel_monthly_energy_balance.py @@ -255,9 +255,13 @@ class InselMonthlyEnergyBalance: parameters = [f'12 % Azimuth {np.rad2deg(surface.azimuth)}, ' f'inclination {np.rad2deg(surface.inclination)} (degrees)'] + print(surface.type) if surface.type != 'Ground': if cte.MONTH not in surface.global_irradiance: raise ValueError(f'surface: {surface.name} from building {building.name} has no global irradiance!') + print(surface.global_irradiance[cte.HOUR]) + print(surface.global_irradiance[cte.MONTH]) + print(surface.global_irradiance[cte.YEAR]) global_irradiance = surface.global_irradiance[cte.MONTH] for j in range(0, len(global_irradiance)): parameters.append(f'{j + 1} ' diff --git a/hub/helpers/monthly_values.py b/hub/helpers/monthly_values.py index 9544f4a5..2b5a5b61 100644 --- a/hub/helpers/monthly_values.py +++ b/hub/helpers/monthly_values.py @@ -20,12 +20,13 @@ class MonthlyValues: """ out = [] if values is not None: + hour = 0 for month in cte.DAYS_A_MONTH: total = 0 for j in range(0, cte.DAYS_A_MONTH[month]): for k in range(0, 24): - hour = k + 24 * j + cte.DAYS_A_MONTH[month] - 31 total += values[hour] / 24 / cte.DAYS_A_MONTH[month] + hour += 1 out.append(total) return out @@ -38,11 +39,12 @@ class MonthlyValues: """ out = [] if values is not None: + hour = 0 for month in cte.DAYS_A_MONTH: total = 0 for j in range(0, cte.DAYS_A_MONTH[month]): for k in range(0, 24): - hour = k + 24 * j + cte.DAYS_A_MONTH[month] - 31 total += values[hour] + hour += 1 out.append(total) return out diff --git a/hub/imports/results/simplified_radiosity_algorithm.py b/hub/imports/results/simplified_radiosity_algorithm.py index 3a9c4e3f..653a13ee 100644 --- a/hub/imports/results/simplified_radiosity_algorithm.py +++ b/hub/imports/results/simplified_radiosity_algorithm.py @@ -31,8 +31,8 @@ class SimplifiedRadiosityAlgorithm: specific building values :return: none """ - _irradiance = {} for key in self._results: + _irradiance = {} header_name = key.split(':') result = self._results[key] city_object_name = header_name[1]