usage = retail in nrcan bug solved
added default value to swr in sra exporter for those buildings without construction known
This commit is contained in:
parent
26bac29b51
commit
df7038df80
|
@ -18,3 +18,4 @@ convective_heat_transfer_coefficient_exterior = 20
|
|||
soil_conductivity = 3
|
||||
#m
|
||||
soil_thickness = 0.5
|
||||
short_wave_reflectance = 0.3
|
||||
|
|
|
@ -8,6 +8,7 @@ import xmltodict
|
|||
|
||||
from hub.imports.weather_factory import WeatherFactory
|
||||
import hub.helpers.constants as cte
|
||||
from hub.helpers.configuration_helper import ConfigurationHelper
|
||||
|
||||
|
||||
class SimplifiedRadiosityAlgorithm:
|
||||
|
@ -88,10 +89,15 @@ class SimplifiedRadiosityAlgorithm:
|
|||
'@Simulate': f'{simulate}'
|
||||
}
|
||||
walls, roofs, floors = [], [], []
|
||||
default_short_wave_reflectance = ConfigurationHelper().short_wave_reflectance
|
||||
for surface in building.surfaces:
|
||||
if surface.short_wave_reflectance is None:
|
||||
short_wave_reflectance = default_short_wave_reflectance
|
||||
else:
|
||||
short_wave_reflectance = surface.short_wave_reflectance
|
||||
surface_dict = {
|
||||
'@id': f'{surface.id}',
|
||||
'@ShortWaveReflectance': f'{surface.short_wave_reflectance}'
|
||||
'@ShortWaveReflectance': f'{short_wave_reflectance}'
|
||||
}
|
||||
for point_index, point in enumerate(surface.perimeter_polygon.coordinates):
|
||||
point = self._correct_point(point)
|
||||
|
|
|
@ -138,3 +138,11 @@ class ConfigurationHelper:
|
|||
:return: 0.5
|
||||
"""
|
||||
return self._config.getfloat('buildings', 'soil_thickness').real
|
||||
|
||||
@property
|
||||
def short_wave_reflectance(self) -> float:
|
||||
"""
|
||||
Get configured short wave reflectance for surfaces that don't have construction assigned
|
||||
:return: 0.3
|
||||
"""
|
||||
return self._config.getfloat('buildings', 'short_wave_reflectance').real
|
||||
|
|
|
@ -8,6 +8,7 @@ Project Coder Guille Gutierrez Guillermo.GutierrezMorote@concordia.ca
|
|||
|
||||
import hub.helpers.constants as cte
|
||||
|
||||
|
||||
class AlkisFunctionToHubFunction:
|
||||
|
||||
def __init__(self):
|
||||
|
|
|
@ -34,16 +34,16 @@ class HubUsageToNrcanUsage:
|
|||
cte.SECONDARY_SCHOOL: 'School/university',
|
||||
cte.UNIVERSITY: 'School/university',
|
||||
cte.LABORATORY_AND_RESEARCH_CENTER: 'School/university',
|
||||
cte.STAND_ALONE_RETAIL: 'Retail',
|
||||
cte.STAND_ALONE_RETAIL: 'Retail area',
|
||||
cte.HOSPITAL: 'Hospital',
|
||||
cte.OUT_PATIENT_HEALTH_CARE: 'Health-care clinic',
|
||||
cte.HEALTH_CARE: 'Health-care clinic',
|
||||
cte.RETIREMENT_HOME_OR_ORPHANAGE: 'Health-care clinic',
|
||||
cte.COMMERCIAL: 'Retail',
|
||||
cte.STRIP_MALL: 'Retail',
|
||||
cte.SUPERMARKET: 'Retail',
|
||||
cte.RETAIL_SHOP_WITHOUT_REFRIGERATED_FOOD: 'Retail',
|
||||
cte.RETAIL_SHOP_WITH_REFRIGERATED_FOOD: 'Retail',
|
||||
cte.COMMERCIAL: 'Retail area',
|
||||
cte.STRIP_MALL: 'Retail area',
|
||||
cte.SUPERMARKET: 'Retail area',
|
||||
cte.RETAIL_SHOP_WITHOUT_REFRIGERATED_FOOD: 'Retail area',
|
||||
cte.RETAIL_SHOP_WITH_REFRIGERATED_FOOD: 'Retail area',
|
||||
cte.RESTAURANT: 'Dining - bar/lounge',
|
||||
cte.QUICK_SERVICE_RESTAURANT: 'Dining - cafeteria',
|
||||
cte.FULL_SERVICE_RESTAURANT: 'Dining - bar/lounge',
|
||||
|
|
Loading…
Reference in New Issue
Block a user