overall quality improvement
This commit is contained in:
parent
7fb39171f4
commit
cf3f85c7f4
|
@ -122,8 +122,12 @@ class NrcanCatalog(Catalog):
|
||||||
average_storey_height = archetype['average_storey_height']
|
average_storey_height = archetype['average_storey_height']
|
||||||
thermal_capacity = float(archetype['thermal_capacity']) * 1000
|
thermal_capacity = float(archetype['thermal_capacity']) * 1000
|
||||||
extra_loses_due_to_thermal_bridges = archetype['extra_loses_due_thermal_bridges']
|
extra_loses_due_to_thermal_bridges = archetype['extra_loses_due_thermal_bridges']
|
||||||
infiltration_rate_for_ventilation_system_off = archetype['infiltration_rate_for_ventilation_system_off'] / cte.HOUR_TO_SECONDS
|
infiltration_rate_for_ventilation_system_off = (
|
||||||
infiltration_rate_for_ventilation_system_on = archetype['infiltration_rate_for_ventilation_system_on'] / cte.HOUR_TO_SECONDS
|
archetype['infiltration_rate_for_ventilation_system_off'] / cte.HOUR_TO_SECONDS
|
||||||
|
)
|
||||||
|
infiltration_rate_for_ventilation_system_on = (
|
||||||
|
archetype['infiltration_rate_for_ventilation_system_on'] / cte.HOUR_TO_SECONDS
|
||||||
|
)
|
||||||
|
|
||||||
archetype_constructions = []
|
archetype_constructions = []
|
||||||
for archetype_construction in archetype['constructions']:
|
for archetype_construction in archetype['constructions']:
|
||||||
|
|
|
@ -48,7 +48,6 @@ class Fuel:
|
||||||
"""
|
"""
|
||||||
if self._fixed_power is not None:
|
if self._fixed_power is not None:
|
||||||
return self._fixed_power/1000
|
return self._fixed_power/1000
|
||||||
else:
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
|
@ -10,9 +10,9 @@ class DistributionSystem:
|
||||||
"""
|
"""
|
||||||
Distribution system class
|
Distribution system class
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, system_id, name, system_type, supply_temperature, distribution_consumption_fix_flow,
|
def __init__(self, system_id, name, system_type, supply_temperature, distribution_consumption_fix_flow,
|
||||||
distribution_consumption_variable_flow, heat_losses):
|
distribution_consumption_variable_flow, heat_losses):
|
||||||
|
|
||||||
self._system_id = system_id
|
self._system_id = system_id
|
||||||
self._name = name
|
self._name = name
|
||||||
self._type = system_type
|
self._type = system_type
|
||||||
|
@ -80,7 +80,9 @@ class DistributionSystem:
|
||||||
|
|
||||||
def to_dictionary(self):
|
def to_dictionary(self):
|
||||||
"""Class content to dictionary"""
|
"""Class content to dictionary"""
|
||||||
content = {'Layer': {'id': self.id,
|
content = {
|
||||||
|
'Layer': {
|
||||||
|
'id': self.id,
|
||||||
'name': self.name,
|
'name': self.name,
|
||||||
'type': self.type,
|
'type': self.type,
|
||||||
'supply temperature [Celsius]': self.supply_temperature,
|
'supply temperature [Celsius]': self.supply_temperature,
|
||||||
|
|
|
@ -395,7 +395,9 @@ class Idf:
|
||||||
def _add_occupancy(self, thermal_zone, zone_name):
|
def _add_occupancy(self, thermal_zone, zone_name):
|
||||||
number_of_people = thermal_zone.occupancy.occupancy_density * thermal_zone.total_floor_area
|
number_of_people = thermal_zone.occupancy.occupancy_density * thermal_zone.total_floor_area
|
||||||
fraction_radiant = 0
|
fraction_radiant = 0
|
||||||
total_sensible = thermal_zone.occupancy.sensible_radiative_internal_gain + thermal_zone.occupancy.sensible_convective_internal_gain
|
total_sensible = (
|
||||||
|
thermal_zone.occupancy.sensible_radiative_internal_gain + thermal_zone.occupancy.sensible_convective_internal_gain
|
||||||
|
)
|
||||||
if total_sensible != 0:
|
if total_sensible != 0:
|
||||||
fraction_radiant = thermal_zone.occupancy.sensible_radiative_internal_gain / total_sensible
|
fraction_radiant = thermal_zone.occupancy.sensible_radiative_internal_gain / total_sensible
|
||||||
|
|
||||||
|
|
|
@ -33,15 +33,15 @@ class EilatPhysicsParameters:
|
||||||
eilat_catalog = ConstructionCatalogFactory('eilat').catalog
|
eilat_catalog = ConstructionCatalogFactory('eilat').catalog
|
||||||
for building in city.buildings:
|
for building in city.buildings:
|
||||||
if building.function not in Dictionaries().hub_function_to_eilat_construction_function.keys():
|
if building.function not in Dictionaries().hub_function_to_eilat_construction_function.keys():
|
||||||
logging.error(f'Building %s has an unknown building function %s', building.name, building.function)
|
logging.error('Building %s has an unknown building function %s', building.name, building.function)
|
||||||
continue
|
continue
|
||||||
function = Dictionaries().hub_function_to_eilat_construction_function[building.function]
|
function = Dictionaries().hub_function_to_eilat_construction_function[building.function]
|
||||||
try:
|
try:
|
||||||
archetype = self._search_archetype(eilat_catalog, function, building.year_of_construction, self._climate_zone)
|
archetype = self._search_archetype(eilat_catalog, function, building.year_of_construction, self._climate_zone)
|
||||||
|
|
||||||
except KeyError:
|
except KeyError:
|
||||||
logging.error(f'Building %s has unknown construction archetype for building function: %s '
|
logging.error('Building %s has unknown construction archetype for building function: %s '
|
||||||
f'[%s], building year of construction: %s and climate zone %s', building.name, function,
|
'[%s], building year of construction: %s and climate zone %s', building.name, function,
|
||||||
building.function, building.year_of_construction, self._climate_zone)
|
building.function, building.year_of_construction, self._climate_zone)
|
||||||
continue
|
continue
|
||||||
thermal_archetype = ThermalArchetype()
|
thermal_archetype = ThermalArchetype()
|
||||||
|
|
|
@ -42,12 +42,7 @@ class ConstructionHelper:
|
||||||
'Varennes': '6',
|
'Varennes': '6',
|
||||||
'Laval': '6',
|
'Laval': '6',
|
||||||
'Longueuil': '6',
|
'Longueuil': '6',
|
||||||
'Saint-Leonard': '6',
|
'Saint-Leonard': '6'
|
||||||
'': '6',
|
|
||||||
'': '6',
|
|
||||||
'': '6',
|
|
||||||
'': '6',
|
|
||||||
'': '6',
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_reference_city_to_israel_climate_zone = {
|
_reference_city_to_israel_climate_zone = {
|
||||||
|
|
|
@ -40,8 +40,8 @@ class NrcanPhysicsParameters:
|
||||||
archetype = self._search_archetype(nrcan_catalog, function, building.year_of_construction, self._climate_zone)
|
archetype = self._search_archetype(nrcan_catalog, function, building.year_of_construction, self._climate_zone)
|
||||||
|
|
||||||
except KeyError:
|
except KeyError:
|
||||||
logging.error(f'Building %s has unknown construction archetype for building function: %s '
|
logging.error('Building %s has unknown construction archetype for building function: %s '
|
||||||
f'[%s], building year of construction: %s and climate zone %s', building.name, function,
|
'[%s], building year of construction: %s and climate zone %s', building.name, function,
|
||||||
building.function, building.year_of_construction, self._climate_zone)
|
building.function, building.year_of_construction, self._climate_zone)
|
||||||
continue
|
continue
|
||||||
thermal_archetype = ThermalArchetype()
|
thermal_archetype = ThermalArchetype()
|
||||||
|
|
|
@ -33,15 +33,15 @@ class NrelPhysicsParameters:
|
||||||
nrel_catalog = ConstructionCatalogFactory('nrel').catalog
|
nrel_catalog = ConstructionCatalogFactory('nrel').catalog
|
||||||
for building in city.buildings:
|
for building in city.buildings:
|
||||||
if building.function not in Dictionaries().hub_function_to_nrel_construction_function:
|
if building.function not in Dictionaries().hub_function_to_nrel_construction_function:
|
||||||
logging.error(f'Building %s has unknown function %s', building.name, building.function)
|
logging.error('Building %s has unknown function %s', building.name, building.function)
|
||||||
continue
|
continue
|
||||||
function = Dictionaries().hub_function_to_nrel_construction_function[building.function]
|
function = Dictionaries().hub_function_to_nrel_construction_function[building.function]
|
||||||
try:
|
try:
|
||||||
archetype = self._search_archetype(nrel_catalog, function, building.year_of_construction, self._climate_zone)
|
archetype = self._search_archetype(nrel_catalog, function, building.year_of_construction, self._climate_zone)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
logging.error(f'Building {building.name} has unknown construction archetype for building function: {function} '
|
logging.error('Building %s has unknown construction archetype for building function: %s '
|
||||||
f'[{building.function}], building year of construction: {building.year_of_construction}'
|
'[%s], building year of construction: %s and climate zone %s\n', building.name, function,
|
||||||
f' and climate zone {self._climate_zone}\n')
|
building.function, building.year_of_construction, self._climate_zone)
|
||||||
|
|
||||||
continue
|
continue
|
||||||
thermal_archetype = ThermalArchetype()
|
thermal_archetype = ThermalArchetype()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user