Compare commits

..

4 Commits

4 changed files with 26 additions and 27 deletions

View File

@ -446,31 +446,24 @@ class Idf:
) )
def _add_infiltration(self, thermal_zone, zone_name): def _add_infiltration(self, thermal_zone, zone_name):
schedule = f'Infiltration schedules {thermal_zone.usage_name}'
for zone in self._idf.idfobjects["ZONE"]: self._idf.newidfobject(self._INFILTRATION,
if zone.Name == f'{zone_name}_infiltration': Name=f'{zone_name}_infiltration',
return Zone_or_ZoneList_Name=zone_name,
schedule = f'Infiltration schedules {thermal_zone.usage_name}' Schedule_Name=schedule,
self._idf.newidfobject(self._INFILTRATION, Design_Flow_Rate_Calculation_Method='AirChanges/Hour',
Name=f'{zone_name}_infiltration', Air_Changes_per_Hour=thermal_zone.infiltration_rate_system_off
Zone_or_ZoneList_Name=zone_name, )
Schedule_Name=schedule,
Design_Flow_Rate_Calculation_Method='AirChanges/Hour',
Air_Changes_per_Hour=thermal_zone.infiltration_rate_system_off
)
def _add_ventilation(self, thermal_zone, zone_name): def _add_ventilation(self, thermal_zone, zone_name):
for zone in self._idf.idfobjects["ZONE"]: schedule = f'Ventilation schedules {thermal_zone.usage_name}'
if zone.Name == f'{zone_name}_ventilation': self._idf.newidfobject(self._VENTILATION,
return Name=f'{zone_name}_ventilation',
schedule = f'Ventilation schedules {thermal_zone.usage_name}' Zone_or_ZoneList_Name=zone_name,
self._idf.newidfobject(self._VENTILATION, Schedule_Name=schedule,
Name=f'{zone_name}_ventilation', Design_Flow_Rate_Calculation_Method='AirChanges/Hour',
Zone_or_ZoneList_Name=zone_name, Air_Changes_per_Hour=thermal_zone.mechanical_air_change
Schedule_Name=schedule, )
Design_Flow_Rate_Calculation_Method='AirChanges/Hour',
Air_Changes_per_Hour=thermal_zone.mechanical_air_change
)
def _add_dhw(self, thermal_zone, zone_name): def _add_dhw(self, thermal_zone, zone_name):
peak_flow_rate = thermal_zone.domestic_hot_water.peak_flow * thermal_zone.total_floor_area peak_flow_rate = thermal_zone.domestic_hot_water.peak_flow * thermal_zone.total_floor_area
@ -514,6 +507,7 @@ class Idf:
self._rename_building(self._city.name) self._rename_building(self._city.name)
self._lod = self._city.level_of_detail.geometry self._lod = self._city.level_of_detail.geometry
for building in self._city.buildings: for building in self._city.buildings:
print('building name', building.name)
for internal_zone in building.internal_zones: for internal_zone in building.internal_zones:
if internal_zone.thermal_zones is None: if internal_zone.thermal_zones is None:
continue continue

View File

@ -123,9 +123,12 @@ class MontrealCustomEnergySystemParameters:
energy_systems_connection = city.energy_systems_connection_table energy_systems_connection = city.energy_systems_connection_table
for building in city.buildings: for building in city.buildings:
_building_energy_systems = [] _building_energy_systems = []
energy_systems = energy_systems_connection['Energy System Type'] \ energy_systems = energy_systems_connection['Energy System Type'].where(
.where(energy_systems_connection['Building'] == building.name) energy_systems_connection['Building'] == building.name
)
for energy_system in energy_systems: for energy_system in energy_systems:
if str(energy_system) == 'nan':
break
_generic_building_energy_systems = city.generic_energy_systems[energy_system] _generic_building_energy_systems = city.generic_energy_systems[energy_system]
for _generic_building_energy_system in _generic_building_energy_systems: for _generic_building_energy_system in _generic_building_energy_systems:
_building_energy_equipment = EnergySystem() _building_energy_equipment = EnergySystem()

View File

@ -5,6 +5,7 @@ Copyright © 2022 Concordia CERC group
Project Coder Guillermo Gutierrez Guillermo.GutierrezMorote@concordia.ca Project Coder Guillermo Gutierrez Guillermo.GutierrezMorote@concordia.ca
""" """
import uuid
import json import json
import numpy as np import numpy as np
@ -126,10 +127,11 @@ class Geojson:
if function in self._function_to_hub: if function in self._function_to_hub:
function = self._function_to_hub[function] function = self._function_to_hub[function]
geometry = feature['geometry'] geometry = feature['geometry']
building_name = ''
building_aliases = [] building_aliases = []
if 'id' in feature: if 'id' in feature:
building_name = feature['id'] building_name = feature['id']
else:
building_name = uuid.uuid4()
if self._aliases_field is not None: if self._aliases_field is not None:
for alias_field in self._aliases_field: for alias_field in self._aliases_field:

View File

@ -1,4 +1,4 @@
""" """
Hub version number Hub version number
""" """
__version__ = '0.1.7.16' __version__ = '0.1.7.17'