system_assignation/helpers/configuration.py

47 lines
1.3 KiB
Python

import configparser
from pathlib import Path
class Configuration:
def __init__(self):
base_path = Path().resolve().parent
config_file = Path(base_path / 'config/configuration.ini').resolve()
self._config = configparser.ConfigParser()
self._config.read(config_file)
@property
def h_i(self):
return self._config.getfloat('convective_fluxes', 'h_i')
@property
def h_e(self):
return self._config.getfloat('convective_fluxes', 'h_e')
@property
def frame_ratio(self):
return self._config.getfloat('windows', 'frame_ratio')
@property
def heated(self):
return self._config.getboolean('thermal_zones', 'heated')
@property
def cooled(self):
return self._config.getboolean('thermal_zones', 'cooled')
@property
def additional_thermal_bridge_u_value(self):
return self._config.getfloat('thermal_zones', 'additional_thermal_bridge_u_value')
@property
def indirectly_heated_area_ratio(self):
return self._config.getfloat('thermal_zones', 'indirectly_heated_area_ratio')
@property
def infiltration_rate_system_on(self):
return self._config.getfloat('thermal_zones', 'infiltration_rate_system_on')
@property
def outside_solar_absorptance(self):
return self._config.getfloat('thermal_zones', 'outside_solar_absorptance')