2021-08-26 13:27:43 -04:00
|
|
|
"""
|
|
|
|
Constant module
|
|
|
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
2022-04-08 09:35:33 -04:00
|
|
|
Copyright © 2022 Concordia CERC group
|
|
|
|
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
2021-08-26 13:27:43 -04:00
|
|
|
"""
|
|
|
|
|
2021-06-10 10:48:30 -04:00
|
|
|
# universal constants
|
2022-05-19 12:02:13 -04:00
|
|
|
|
2021-05-25 13:34:57 -04:00
|
|
|
KELVIN = 273.15
|
2023-03-24 13:34:37 -04:00
|
|
|
WATER_DENSITY = 1000 # kg/m3
|
|
|
|
WATER_HEAT_CAPACITY = 4182 # J/kgK
|
|
|
|
|
|
|
|
AIR_DENSITY = 1.293 # kg/m3
|
|
|
|
AIR_HEAT_CAPACITY = 1005.2 # J/kgK
|
|
|
|
|
2021-06-10 10:48:30 -04:00
|
|
|
|
2021-11-05 10:16:35 -04:00
|
|
|
# converters
|
|
|
|
HOUR_TO_MINUTES = 60
|
2022-05-19 12:02:13 -04:00
|
|
|
MINUTES_TO_SECONDS = 60
|
2023-03-20 11:07:43 -04:00
|
|
|
HOUR_TO_SECONDS = 3600
|
2021-11-05 10:16:35 -04:00
|
|
|
METERS_TO_FEET = 3.28084
|
2021-11-11 17:25:53 -05:00
|
|
|
BTU_H_TO_WATTS = 0.29307107
|
2022-03-17 18:49:44 -04:00
|
|
|
KILO_WATTS_HOUR_TO_JULES = 3600000
|
2023-03-20 11:07:43 -04:00
|
|
|
GALLONS_TO_QUBIC_METERS = 0.0037854117954011185
|
2021-11-05 10:16:35 -04:00
|
|
|
|
2021-06-10 10:48:30 -04:00
|
|
|
# time
|
2021-09-01 12:14:48 -04:00
|
|
|
SECOND = 'second'
|
2021-05-25 13:34:57 -04:00
|
|
|
MINUTE = 'minute'
|
|
|
|
HOUR = 'hour'
|
|
|
|
DAY = 'day'
|
|
|
|
WEEK = 'week'
|
|
|
|
MONTH = 'month'
|
|
|
|
YEAR = 'year'
|
2021-06-10 10:48:30 -04:00
|
|
|
|
2021-09-01 12:14:48 -04:00
|
|
|
# day types
|
|
|
|
MONDAY = 'monday'
|
|
|
|
TUESDAY = 'tuesday'
|
|
|
|
WEDNESDAY = 'wednesday'
|
|
|
|
THURSDAY = 'thursday'
|
|
|
|
FRIDAY = 'friday'
|
|
|
|
SATURDAY = 'saturday'
|
|
|
|
SUNDAY = 'sunday'
|
|
|
|
HOLIDAY = 'holiday'
|
|
|
|
WINTER_DESIGN_DAY = 'winter_design_day'
|
|
|
|
SUMMER_DESIGN_DAY = 'summer_design_day'
|
2022-02-17 12:37:14 -05:00
|
|
|
WEEK_DAYS = 'Weekdays'
|
|
|
|
WEEK_ENDS = 'Weekends'
|
|
|
|
ALL_DAYS = 'Alldays'
|
2021-09-01 12:14:48 -04:00
|
|
|
|
2023-03-24 13:34:37 -04:00
|
|
|
DAYS_A_MONTH = {'monday': [5, 4, 4, 5, 4, 4, 5, 4, 4, 5, 4, 5],
|
|
|
|
'tuesday': [5, 4, 4, 4, 5, 4, 5, 4, 4, 5, 4, 4],
|
|
|
|
'wednesday': [5, 4, 4, 4, 5, 4, 4, 5, 4, 5, 4, 4],
|
|
|
|
'thursday': [4, 4, 5, 4, 5, 4, 4, 5, 4, 4, 5, 4],
|
|
|
|
'friday': [4, 4, 5, 4, 4, 5, 4, 5, 4, 4, 5, 4],
|
|
|
|
'saturday': [4, 4, 5, 4, 4, 5, 4, 4, 5, 4, 4, 5],
|
|
|
|
'sunday': [4, 4, 4, 5, 4, 4, 5, 4, 5, 4, 4, 5],
|
|
|
|
'holiday': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}
|
|
|
|
|
|
|
|
DAYS_A_YEAR = {'monday': 53,
|
|
|
|
'tuesday': 52,
|
|
|
|
'wednesday': 52,
|
|
|
|
'thursday': 52,
|
|
|
|
'friday': 52,
|
|
|
|
'saturday': 52,
|
|
|
|
'sunday': 52,
|
|
|
|
'holiday': 0}
|
|
|
|
|
2021-09-01 12:14:48 -04:00
|
|
|
# data types
|
|
|
|
ANY_NUMBER = 'any_number'
|
|
|
|
FRACTION = 'fraction'
|
|
|
|
ON_OFF = 'on_off'
|
|
|
|
TEMPERATURE = 'temperature'
|
|
|
|
HUMIDITY = 'humidity'
|
|
|
|
CONTROL_TYPE = 'control_type'
|
2022-04-26 18:39:42 -04:00
|
|
|
CONTINUOUS = 'continuous'
|
|
|
|
DISCRETE = 'discrete'
|
|
|
|
CONSTANT = 'constant'
|
2022-05-18 14:52:41 -04:00
|
|
|
INTERNAL_GAINS = 'internal_gains'
|
2021-09-01 12:14:48 -04:00
|
|
|
|
2021-06-10 10:48:30 -04:00
|
|
|
# surface types
|
|
|
|
WALL = 'Wall'
|
|
|
|
GROUND_WALL = 'Ground wall'
|
|
|
|
GROUND = 'Ground'
|
|
|
|
ATTIC_FLOOR = 'Attic floor'
|
|
|
|
ROOF = 'Roof'
|
|
|
|
INTERIOR_SLAB = 'Interior slab'
|
|
|
|
INTERIOR_WALL = 'Interior wall'
|
2021-06-23 09:53:33 -04:00
|
|
|
VIRTUAL_INTERNAL = 'Virtual internal'
|
2021-06-10 10:48:30 -04:00
|
|
|
WINDOW = 'Window'
|
|
|
|
DOOR = 'Door'
|
|
|
|
SKYLIGHT = 'Skylight'
|
|
|
|
|
2022-03-24 16:51:01 -04:00
|
|
|
# functions and usages
|
2022-12-16 07:21:33 -05:00
|
|
|
RESIDENTIAL = 'residential'
|
2022-03-24 16:51:01 -04:00
|
|
|
SINGLE_FAMILY_HOUSE = 'single family house'
|
|
|
|
MULTI_FAMILY_HOUSE = 'multifamily house'
|
2022-12-16 07:21:33 -05:00
|
|
|
ROW_HOUSE = 'row house'
|
2022-03-24 16:51:01 -04:00
|
|
|
MID_RISE_APARTMENT = 'mid rise apartment'
|
|
|
|
HIGH_RISE_APARTMENT = 'high rise apartment'
|
2022-12-16 07:21:33 -05:00
|
|
|
OFFICE_AND_ADMINISTRATION = 'office and administration'
|
2022-03-24 16:51:01 -04:00
|
|
|
SMALL_OFFICE = 'small office'
|
|
|
|
MEDIUM_OFFICE = 'medium office'
|
|
|
|
LARGE_OFFICE = 'large office'
|
2022-12-16 07:21:33 -05:00
|
|
|
COURTHOUSE = 'courthouse'
|
|
|
|
FIRE_STATION = 'fire station'
|
|
|
|
PENITENTIARY = 'penitentiary'
|
|
|
|
POLICE_STATION = 'police station'
|
|
|
|
POST_OFFICE = 'post office'
|
|
|
|
LIBRARY = 'library'
|
|
|
|
EDUCATION = 'education'
|
2022-03-24 16:51:01 -04:00
|
|
|
PRIMARY_SCHOOL = 'primary school'
|
2022-12-16 07:21:33 -05:00
|
|
|
PRIMARY_SCHOOL_WITH_SHOWER = 'school with shower'
|
2022-03-24 16:51:01 -04:00
|
|
|
SECONDARY_SCHOOL = 'secondary school'
|
2022-12-16 07:21:33 -05:00
|
|
|
UNIVERSITY = 'university'
|
|
|
|
LABORATORY_AND_RESEARCH_CENTER = 'laboratory and research centers'
|
2022-03-24 16:51:01 -04:00
|
|
|
STAND_ALONE_RETAIL = 'stand alone retail'
|
2021-06-10 10:48:30 -04:00
|
|
|
HOSPITAL = 'hospital'
|
2022-03-24 16:51:01 -04:00
|
|
|
OUT_PATIENT_HEALTH_CARE = 'out-patient health care'
|
2022-12-16 07:21:33 -05:00
|
|
|
HEALTH_CARE = 'health care'
|
|
|
|
RETIREMENT_HOME_OR_ORPHANAGE = 'retirement home or orphanage'
|
|
|
|
COMMERCIAL = 'commercial'
|
2021-06-10 10:48:30 -04:00
|
|
|
STRIP_MALL = 'strip mall'
|
2022-03-24 16:51:01 -04:00
|
|
|
SUPERMARKET = 'supermarket'
|
|
|
|
RETAIL_SHOP_WITHOUT_REFRIGERATED_FOOD = 'retail shop without refrigerated food'
|
|
|
|
RETAIL_SHOP_WITH_REFRIGERATED_FOOD = 'retail shop with refrigerated food'
|
2022-12-16 07:21:33 -05:00
|
|
|
RESTAURANT = 'restaurant'
|
|
|
|
QUICK_SERVICE_RESTAURANT = 'quick service restaurant'
|
|
|
|
FULL_SERVICE_RESTAURANT = 'full service restaurant'
|
2022-03-24 16:51:01 -04:00
|
|
|
HOTEL = 'hotel'
|
|
|
|
HOTEL_MEDIUM_CLASS = 'hotel medium class'
|
2022-12-16 07:21:33 -05:00
|
|
|
SMALL_HOTEL = 'small hotel'
|
|
|
|
LARGE_HOTEL = 'large hotel'
|
2022-03-24 16:51:01 -04:00
|
|
|
DORMITORY = 'dormitory'
|
|
|
|
EVENT_LOCATION = 'event location'
|
2022-12-16 07:21:33 -05:00
|
|
|
CONVENTION_CENTER = 'convention center'
|
2021-06-10 10:48:30 -04:00
|
|
|
HALL = 'hall'
|
2022-03-24 16:51:01 -04:00
|
|
|
GREEN_HOUSE = 'green house'
|
2022-12-16 07:21:33 -05:00
|
|
|
INDUSTRY = 'industry'
|
|
|
|
WORKSHOP = 'workshop'
|
|
|
|
WAREHOUSE = 'warehouse'
|
|
|
|
WAREHOUSE_REFRIGERATED = 'warehouse refrigerated'
|
|
|
|
SPORTS_LOCATION = 'sports location'
|
|
|
|
SPORTS_ARENA = 'sports arena'
|
|
|
|
GYMNASIUM = 'gymnasium'
|
|
|
|
MOTION_PICTURE_THEATRE = 'motion picture theatre'
|
|
|
|
MUSEUM = 'museum'
|
|
|
|
PERFORMING_ARTS_THEATRE = 'performing arts theatre'
|
|
|
|
TRANSPORTATION = 'transportation'
|
|
|
|
AUTOMOTIVE_FACILITY = 'automotive facility'
|
|
|
|
PARKING_GARAGE = 'parking garage'
|
|
|
|
RELIGIOUS = 'religious'
|
2022-03-24 16:51:01 -04:00
|
|
|
NON_HEATED = 'non-heated'
|
2023-02-24 06:31:28 -05:00
|
|
|
DATACENTER = 'datacenter'
|
2021-11-11 17:25:53 -05:00
|
|
|
|
|
|
|
LIGHTING = 'Lights'
|
|
|
|
OCCUPANCY = 'Occupancy'
|
2022-03-08 19:19:52 -05:00
|
|
|
APPLIANCES = 'Appliances'
|
2021-11-11 17:25:53 -05:00
|
|
|
HVAC_AVAILABILITY = 'HVAC Avail'
|
|
|
|
INFILTRATION = 'Infiltration'
|
2023-05-19 11:20:44 -04:00
|
|
|
VENTILATION = 'Ventilation'
|
2021-11-11 17:25:53 -05:00
|
|
|
COOLING_SET_POINT = 'ClgSetPt'
|
|
|
|
HEATING_SET_POINT = 'HtgSetPt'
|
2022-02-17 12:37:14 -05:00
|
|
|
EQUIPMENT = 'Equipment'
|
|
|
|
ACTIVITY = 'Activity'
|
2022-06-06 13:37:48 -04:00
|
|
|
PEOPLE_ACTIVITY_LEVEL = 'People Activity Level'
|
2023-03-13 14:40:07 -04:00
|
|
|
DOMESTIC_HOT_WATER = 'Domestic Hot Water'
|
2022-03-08 19:19:52 -05:00
|
|
|
|
|
|
|
# Geometry
|
|
|
|
EPSILON = 0.0000001
|
|
|
|
|
|
|
|
# HVAC types
|
|
|
|
ONLY_HEATING = 'Heating'
|
|
|
|
ONLY_COOLING = 'Colling'
|
|
|
|
ONLY_VENTILATION = 'Ventilation'
|
|
|
|
HEATING_AND_VENTILATION = 'Heating and ventilation'
|
|
|
|
COOLING_AND_VENTILATION = 'Cooling and ventilation'
|
|
|
|
HEATING_AND_COLLING = 'Heating and cooling'
|
|
|
|
FULL_HVAC = 'Heating and cooling and ventilation'
|
2022-05-19 12:02:13 -04:00
|
|
|
|
|
|
|
# Floats
|
|
|
|
MAX_FLOAT = float('inf')
|
|
|
|
MIN_FLOAT = float('-inf')
|
2023-02-08 13:40:06 -05:00
|
|
|
|
|
|
|
# Tools
|
|
|
|
SRA = 'sra'
|
|
|
|
INSEL_MEB = 'insel meb'
|
2023-04-18 12:21:00 -04:00
|
|
|
PEAK_LOAD = 'peak load'
|
2023-03-16 10:06:32 -04:00
|
|
|
|
|
|
|
# Costs units
|
|
|
|
CURRENCY_PER_SQM = 'currency/m2'
|
|
|
|
CURRENCY_PER_CBM = 'currency/m3'
|
|
|
|
CURRENCY_PER_KW = 'currency/kW'
|
|
|
|
CURRENCY_PER_KWH = 'currency/kWh'
|
|
|
|
CURRENCY_PER_MONTH = 'currency/month'
|
|
|
|
CURRENCY_PER_LITRE = 'currency/l'
|
|
|
|
CURRENCY_PER_KG = 'currency/kg'
|
|
|
|
CURRENCY_PER_CBM_PER_HOUR = 'currency/(m3/h)'
|
|
|
|
PERCENTAGE = '%'
|
|
|
|
|
|
|
|
# Costs chapters
|
2023-03-17 10:10:30 -04:00
|
|
|
SUPERSTRUCTURE = 'B_shell'
|
|
|
|
ENVELOPE = 'D_services'
|
|
|
|
ALLOWANCES_OVERHEAD_PROFIT = 'Z_allowances_overhead_profit'
|