tested with old versions and got same results

This commit is contained in:
Pilar Monsalvete 2023-08-07 14:46:19 -04:00
parent 67cd435fd5
commit 589f3e7f11
3 changed files with 9 additions and 3 deletions

View File

@ -255,9 +255,13 @@ class InselMonthlyEnergyBalance:
parameters = [f'12 % Azimuth {np.rad2deg(surface.azimuth)}, ' parameters = [f'12 % Azimuth {np.rad2deg(surface.azimuth)}, '
f'inclination {np.rad2deg(surface.inclination)} (degrees)'] f'inclination {np.rad2deg(surface.inclination)} (degrees)']
print(surface.type)
if surface.type != 'Ground': if surface.type != 'Ground':
if cte.MONTH not in surface.global_irradiance: if cte.MONTH not in surface.global_irradiance:
raise ValueError(f'surface: {surface.name} from building {building.name} has no 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] global_irradiance = surface.global_irradiance[cte.MONTH]
for j in range(0, len(global_irradiance)): for j in range(0, len(global_irradiance)):
parameters.append(f'{j + 1} ' parameters.append(f'{j + 1} '

View File

@ -20,12 +20,13 @@ class MonthlyValues:
""" """
out = [] out = []
if values is not None: if values is not None:
hour = 0
for month in cte.DAYS_A_MONTH: for month in cte.DAYS_A_MONTH:
total = 0 total = 0
for j in range(0, cte.DAYS_A_MONTH[month]): for j in range(0, cte.DAYS_A_MONTH[month]):
for k in range(0, 24): 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] total += values[hour] / 24 / cte.DAYS_A_MONTH[month]
hour += 1
out.append(total) out.append(total)
return out return out
@ -38,11 +39,12 @@ class MonthlyValues:
""" """
out = [] out = []
if values is not None: if values is not None:
hour = 0
for month in cte.DAYS_A_MONTH: for month in cte.DAYS_A_MONTH:
total = 0 total = 0
for j in range(0, cte.DAYS_A_MONTH[month]): for j in range(0, cte.DAYS_A_MONTH[month]):
for k in range(0, 24): for k in range(0, 24):
hour = k + 24 * j + cte.DAYS_A_MONTH[month] - 31
total += values[hour] total += values[hour]
hour += 1
out.append(total) out.append(total)
return out return out

View File

@ -31,8 +31,8 @@ class SimplifiedRadiosityAlgorithm:
specific building values specific building values
:return: none :return: none
""" """
_irradiance = {}
for key in self._results: for key in self._results:
_irradiance = {}
header_name = key.split(':') header_name = key.split(':')
result = self._results[key] result = self._results[key]
city_object_name = header_name[1] city_object_name = header_name[1]