Subsystem - ptidejteam/tools4cities-metamenth GitHub Wiki
MetamEnTh Subsystem has two main classes: BuildingControlSystem and Appliance, with BuildingControlSystem having one control system class, HVACSystem, in a composition (a whole-part relationship where BuildingControlSystem is the whole and HVACSystem, the part relationship. This design allows the extension and inclusion of other control systems in MetamEnTh in the future.
Figure 1.0: MetamEnTh Subsystem, showing the various classes and their relationships, including the HVAC building control system
Figure 2.0: MetamEnTh Subsystem, showing classes and the methods they possess
Figure 3.0: MetamEnTh Appliance Subsystem class and its relationship with other classes
Classes and Their Relationships
All classes (entities) have auto-generated IDs (UID) to uniquely identify objects created from them.
AbstractSubsystem
This class serves as the parent class for all subsystems. All subsystems inherit the attributes of this class.
Parent Class
None
Relationships
None
Attributes
name:string, the name of the subsystem, e.g., HVAC system
Behaviours (Methods)
None
AirVolumeBox
The AirVolumeBox class models air volume boxes in a building.
Parent Classes
AbstractDuctConnectedComponent
Relationships
AirVolumeBoxhas one-to-many relationship withDamper
Attributes
air_volume_type:AirVolumeType, the type of air volume box, e.g., VARIABLE_AIR_VOLUMEinlet_dampers:List[Damper], inlet dampers that may be installed in an air volume boxhas_heating_capability:bool (default is False), indicates if the air volume box has heating capabilityhas_cooling_capability:bool (default is False), indicates if the air volume box has cooling capability
Behaviours (Methods)
Inherits methods from parent classes.
Boiler
The Boiler class models boilers that are parts of an HVAC system in a building.
Parent Classes
AbstractDuctConnectedComponent
Relationships
Inherits relationships from parent classes
Attributes
category:BoilerCategory, the category of boiler, e.g., LPGpower_state:PowerState, the power state of the boiler, e.g., OFF
Behaviours (Methods)
Inherits methods from parent classes.
BuildingControlSystem
This class models various control systems in a building.
Parent Class
Relationships
BuildingControlSystemhas a one-to-one relationship withHVACSystem.
Attributes
hvac_system:HVACSystem, the HVAC control system
Behaviours (Methods)
None
Appliance
The Appliance class of subsystem models appliances in a building.
Parent Classes
AbstractSubsystem AbstractDynamicEntity
Relationships
AbstractFloorSpacehas a one-to-many relationship withAppliance, e.g., a room can have multiple appliancesAppliancehas one one-to-many relationship withTransducer, e.g., an appliance can have multiple sensors
Attributes
hvac_system:HVACSystem, the HVAC control systemappliance_category:ApplianceCategory, the appliance category, e.g., home appliance.appliance_type:List[ApplianceType], the appliance type, e.g., photocopiermanufacturer:string, the manufacturer of the applianceconsumption_capacity:AbstractMeasure, the power consumption capacity of the appliancerated_device_measure:RatedDeviceMeasure, the rated device measure of the applianceoperating_conditions:List[ContinuousMeasure], the operating conditions of the appliance
Behaviours (Methods)
Inherits methods from parent classes.
AbstractVentilationComponent
This class serves as the parent class for all ventilation-related entities.
Parent Classes
Relationships
None
Attributes
name:string, the name of the ventilation componentoperating_conditions:List[ContinuousMeasure], the operating conditions of the appliance
Behaviours (Methods)
None
BaseboardHeater
This class models baseboard heaters in buildings.
Parent Classes
Relationships
Inherits relationships from parent classes, e.g., AbstractFloorSpace (e.g., room) has one-to-many relationship with AbstractVentilationComponent (e.g., baseboard heater)
Attributes
heating_type:HeatingType, the heating type of the baseboard heater, e.g., HYDRONICpower_state:PowerState, the power state of the baseboard heater, e.g., ON
Behaviours (Methods)
None
Controller
The Controoler class models controllers that actuate specific HVAC components in a building.
Parent Classes
Relationships
Controllerhas one-to-many relationship with otherAbstractHVACComponentControllerhas one-to-many relationship with anAppliance
Attributes
controller_entities:List[Union[AbstractHVACComponent, Appliance]], the HVAC entities or appliance the controller actuates, e.g., fanset_point:Dict[str, AbstractMeasure], a dictionary that stores all the set points for the controller. For each setpoint that is added, there must be a sensor and an actuator. The key for each set point entry is the name of the sensor, a colon, and the name of the actuator. For example, set_point['sensor_name:actuator_name'] = set point value
Behaviours (Methods)
get_controller_entities(self, search_terms: Dict = None) -> [Union[AbstractHVACComponent, Appliance]]: searches for entities actuated by the controller using attributes and their valuesadd_set_point(self, set_point: AbstractMeasure, transducer_pair: tuple):: adds a set point for a sensor-actuator pair to the controllerget_set_point(self, sensor_name: str, actuator_name: str) -> AbstractMeasure: gets a set point for a sensor-actuator pairremove_set_point(self, sensor_name: str, actuator_name: str): removes a set point for a sensor-actuator pairadd_controller_entity(self, entity: Union[AbstractHVACComponent, Appliance]): adds an entity actuated by this controllerremove_controller_entity(self, entity: Union[AbstractHVACComponent, Appliance]): removes an entity actuated by this controller
HVACSystem
The HVACSystem class models Heating, Ventilation, and Air-Conditioning (HVAC) systems in buildings.
Parent Classes
None
Relationships
HVACSystemhas one-to-many relationship withVentilationSystemBuildingControlSystemhas one-to-one relationship withHVACSystem
Attributes
ventilation_systems:List[VentilationSystem], the ventilation systems of an HVAC system
Behaviours (Methods)
None
RadiantSlab
This class models radiant slabs used in some buildings to provide additional heating.
Parent Classes
Relationships
- Inherits relationships from parent classes, e.g.,
AbstractFloorSpace(e.g., room) has one-to-many relationship withAbstractVentilationComponent(e.g., radiant slabs)
Attributes
radiant_slab_type:RadiantSlabType, the type of radiant slab, e.g., ELECTRIC
Behaviours (Methods)
None
ThermalStorage
The ThermalStorage class models systems to store thermal energy in buildings.
Parent Classes
Relationships
- Inherits relationships from parent classes, e.g.,
AbstractFloorSpace(e.g., room) has one-to-many relationship withAbstractVentilationComponent(e.g., thermal storage)
Attributes
- Inherit attributes from parent classes
Behaviours (Methods)
None
VentilationSystem
The VentilationSystem class models ventilation systems with air handling units (AHU).
Parent Classes
None
Relationships
VentilationSystemhas one-to-one relationship withDuctVentilationSystemhas one-to-many relationship withAbstractVentilationComponentVentilationSystemhas one-to-many relationship withEngine
Attributes
ventilation_type:VentilationType, the type of ventilation system, e.g., AHUprincipal_duct:Duct, the principal air duct of the ventilation systemcomponents:List[Union[AbstractVentilationComponent, Engine]], a list of entities, e.g., baseboard heaters, possessed by the ventilation system
Behaviours (Methods)
get_components(search_terms: Dict) -> [Union[AbstractVentilationComponent, Engine]]: searches for ventilation components in a ventilation systemadd_component(component: Union[AbstractVentilationComponent, Engine]): adds a ventilation component to a ventilation systemremove_component(component: Union[AbstractVentilationComponent, Engine]): removes a ventilation component from a ventilation system
AbstractDuctConnectedComponent
The AbstractDuctConnectedComponent is the parent class for all entities connected to a ventilation duct.
Parent Classes
Relationships
Inherits relationships from the parent class
Attributes
ducts:List[Duct], ventilation ducts that are connected to ventilation componentsvfd:VariableFrequencyDrive, variable frequency drives that are installed on ventilation components
Behaviours (Methods)
add_duct(duct: Dict): adds ventilation duct to a ventilation component. This captures all the ventilation ducts a ventilation component is connected to
AbstractHVACComponent
The AbstractHVACComponent is the parent class for all HVAC-related entities.
Parent Classes
Relationships
AbstractHVACComponenthas one-to-one relationship withSchedulableEntity
Attributes
name:string, the name of the HVAC componentmeter:AbstractReader (optional), a meter that may be installed on the HVAC componentrated_device_meassure:RatedDeviceMeasure (optional), the rated device measure of the HVAC componentschedulable_entity:SchedulableEntitymodels the various operational schedules of the HVAC componentoperating_conditions:List[ContinuousMeasure], the operating conditions of the HVAC componentspaces:List[AbstractFloorSpace], the spaces, e.g., room, that contain or are serviced by the HVAC componentstatus_measure:List[StatusMeasure], the power status of the HVAC component recorded over time
Behaviours (Methods)
add_spaces(space: [AbstractFloorSpace]): adds spaces serviced by an HVAC component or the space that contains the HVAC componentremove_spaces(space: AbstractFloorSpace): remove spaces from an HVAC componentget_spaces(search_terms: Dict) -> [AbstractFloorSpace]: searches for various spaces serviced by (or that contain) an HVAC componentadd_status_measure(status: StatusMeasure): records the power status of an HVAC component at a particular timeremove_status_measure(status: StatusMeasure): removes the power status at a particular time from an HVAC componentget_status_measure(search_terms: Dict) -> [StatusMeasure]: searches for power status data of an HVAC component based on attributes and their valuesget_status_measure_by_date(from_timestamp: str, to_timestamp: str) -> [StatusMeasure]: searches for power status data of an HVAC component between (inclusive) from_timestamp to to_timestamp. If to_timestamp is not provided, it searches data from from_timestamp to the last data point available.
Chiller
The Chiller class models chillers that are parts of an HVAC system in a building.
Parent Classes
AbstractDuctConnectedComponent
Relationships
Inherits relationships from parent classes
Attributes
chiller_type:ChillerType, the type of chiller, e.g., WATER_COOLEDpower_state:PowerState, the power state of the boiler, e.g., OFF
Behaviours (Methods)
Inherits methods from parent classes.
CirculationPump
The CirculationPump class models chillers that are parts of an HVAC system in a building.
Parent Classes
AbstractDuctConnectedComponent
Relationships
Inherits relationships from parent classes
Attributes
pump_type:CirculationPumpType, the type of circulation pump, e.g., CENTRIFUGALpower_state:PowerState, the power state of the boiler, e.g., OFF
Behaviours (Methods)
Inherits methods from parent classes.
Compressor
The Compressor class models chillers that are parts of an HVAC system in a building.
Parent Classes
AbstractDuctConnectedComponent
Relationships
Inherits relationships from parent classes
Attributes
compressor_type:CompressorType, the type of compressor, e.g., RECIPROCATING_HERMETIC
Behaviours (Methods)
Inherits methods from parent classes.
Condenser
The Compressor class models chillers that are parts of an HVAC system in a building.
Parent Classes
Relationships
Inherits relationships from parent classes
Attributes
refrigerant_type:RefrigerantType, the type of refrigerant used in the condenser, e.g., R134Acoil_mater:CoilMaterial, the material used for the condenser coil, e.g., COPPERheat_transfer_area:AbstractMeasure, the area of the heat transfer material of the condenserheat_transfer_coefficient:float (default is 0.0), the heat transfer coefficient of the condenser
Behaviours (Methods)
Inherits methods from parent classes.
CoolingTower
The CoolingTower class models cooling towers that are parts of an HVAC system in a building.
Parent Classes
AbstractDuctConnectedComponent
Relationships
Inherits relationships from parent classes
Attributes
Inherits attributes from parent classes
Behaviours (Methods)
Inherits methods from parent classes
Damper
The Damper class models dampers installed in ventilation ducts in buildings.
Parent Classes
Relationships
Inherits relationships from parent classes
Attributes
damper_type:DamperType, the type of damper, e.g., BASIC_MANUAL_VOLUMEpercentage_opened:List[DamperPosition], saves data on the damper position over time
Behaviours (Methods)
add_damper_position(damper_position: DamperPosition): adds damper position (how wide the damper is opened) for a damperremove_damper_position(damper_position: DamperPosition): remove damper positions data from an HVAC componentget_damper_positions(search_terms: Dict) -> [DamperPosition]: searches for damper positions dataget_damper_positions_by_date(from_timestamp: str, to_timestamp: str) -> [DamperPosition]: searches for damper positions data between (inclusive) from_timestamp to to_timestamp. If to_timestamp is not provided, it searches data from from_timestamp to the last data point available.
Duct
The Duct class models various ductwork in buildings' HVAC systems.
Parent Classes
AbstractDynamicEntity AbstractZonalEntity
Relationships
Ducthas a one-to-many relationship withHeatExchangerDucthas a one-to-many relationship withFanDucthas a one-to-many relationship withDamperDucthas a one-to-many relationship withAirVolumeBox
Attributes
name:string, the name of the ventilation ductduct_type:DuctTypecaptures what substance flows through the duct, e.g., WATER_WITH_ANTI_FREEZEduct_sub_type:DuctSubType (optional)captures the type of substance indicated with theduct_typeattribute, e.g., GLYCOLconnections:DuctConnection, an object that models other ducts and HVAC components connected to a ductheat_exchangers:List[HeatExchanger], a list of heat exchangers installed in a ventilation ductfans: `List[Fan], a list of fans installed in a ventilation ductdampers: `List[Damper], a list of dampers installed in a ventilation ductconnected_air_volume_box: `List[AirVolumeBox], a list of air volume boxes connected to a ventilation duct
Behaviours (Methods)
add_heat_exchanger(heat_exchanger: HeatExchanger): adds a heat exchanger to a ventilation ductadd_fan(fan: Fan): adds a fan to a ventilation ductadd_connected_air_volume_box(air_volume_box: AirVolumeBox): adds air volume box connected to a ventilation ductadd_damper(damper: Damper): adds a damper installed in a ventilation ductadd_filter(hvac_filter: Filter): adds a filter installed in a ventilation ductremove_heat_exchanger(heat_exchanger: HeatExchanger): adds a heat exchanger to a ventilation ductremove_fan(fan: Fan): remove a fan from a ventilation ductremove_connected_air_volume_box(air_volume_box: AirVolumeBox): removes an air volume box from a ventilation ductremove_damper(damper: Damper): removes a damper from a ventilation ductremove_filter(hvac_filter: Filter): removes a filter from a ventilation ductget_heat_exchangers(search_terms: Dict) -> [HeatExchanger]: searches for heat exchangers installed in a ventilation duct based on attributes and their valuesget_dampers(search_terms: Dict) -> [Damper]: searches for dampers installed in a ventilation duct based on attributes and their valuesget_fans(search_terms: Dict) -> [Fan]: searches for fans installed in a ventilation duct based on attributes and their valuesget_connected_air_volume_boxes(search_terms: Dict) -> [AirVolumeBox]: searches for air volume boxes connected to a ventilation duct based on attributes and their valuesget_filters(search_terms: Dict) -> [Filter]: searches for air filters installed in a ventilation duct based on attributes and their values
DuctConnection
The DuctConnection class models various source and destination entities connected to ducts in buildings' HVAC systems.
Parent Classes
None
Relationships
DuctConnectionhas a one-to-many relationship withAbstractHVACComponent, e.g., HVAC components can be connected to ducts through theDuctConnectionobjectDuctConnectionhas a one-to-many relationship withAbstractSpace, e.g., various spaces, like rooms, can be connected to ducts through theDuctConnectionobjectDuctConnectionhas a one-to-many relationship withDuct, e.g., ducts can be connected to other ducts through theDuctConnectionobject
Attributes
source_entities:List[AbstractHVACComponent], source entities connected to a duct, e.g., ductdestination_entities:List[AbstractHVACComponent], destination entities connected to a duct, e.g., roominside_entities:Union[List[Fan], List[HeatExchanger], List[Damper]], HVAC entities found within a ventilation duct. This is currently limited to fans, dampers, and heat exchangersis_loop:bool (default is False)indicates if the source entities of a duct can become the destination entity and vice versa
Behaviours (Methods)
add_entity(entity_type: DuctConnectionEntityType, duct_entity: AbstractHVACComponent): adds a source, destination or inside entities to aDuctConnectionadd_entity(entity_type: DuctConnectionEntityType, duct_entity: AbstractHVACComponent): removes a source, destination or inside entities from aDuctConnectionget_source_entities(search_terms: Dict) -> [AbstractHVACComponent]: searches for HVAC components installed as source entities based on attributes and their valuesget_destination_entities(search_terms: Dict) -> [AbstractHVACComponent]: searches for HVAC components installed as destination entities based on attributes and their valuesget_inside_entities(search_terms: Dict) -> [AbstractHVACComponent]: searches for HVAC components installed within a duct based on attributes and their values
Fan
The Fan class models fans that are parts of an HVAC system in a building.
Parent Classes
Relationships
Ducthas a one-to-many relationship withFan
Attributes
power_state:PowerState, the power state of the fanvfd:VariableFrequencyDrive, variable frequency drives that may be installed to control fans in an HVAC system
Behaviours (Methods)
Inherits methods from parent classes
Filter
The Fan class models filters that are installed in ventilation ducts.
Parent Classes
Relationships
Ducthas a one-to-many relationship withFilter
Attributes
filter_type:FilterType, the type of filterair_flow_rate:BinaryMeasure, the rate of air flow usually measure in cubic feet per meterlife_span:intthe lifespan of the filter measured in daysefficiency:intthe efficiency of the filter measure with a number ranging from 1 to 16
Behaviours (Methods)
Inherits methods from parent classes
FanCoilUnit
The FanCoilUnit class models fan coil units that are parts of an HVAC system in a building.
Parent Classes
AbstractDuctConnectedComponent
Relationships
FanCoilUnithas a one-to-one relationship withHeatExchangerFanCoilUnithas a one-to-one relationship withFan
Attributes
heat_exchanger:HeatExchanger, the heat exchanger that forms part of the fan coil unitfan:Fan, the fan that forms part of the fan coil unit (FCU)fcu_type:FCUType, the type of fan coil unitfcu_pipe_system:FCUPipeSystem, the fan coil unit pipe system, e.g., FCUPipeSystem.TWO_PIPEis_ducted:bool (default is True)indicates if the FCU is connected to ventilation ducts
Behaviours (Methods)
Inherits methods from parent classes
HeatExchanger
The HeatExchanger class models heat exchangers that are parts of an HVAC system in a building.
Parent Classes
AbstractDuctConnectedComponent
Relationships
Inherits relationships from parent classes
Attributes
heat_exchanger_type:HeatExchangerType, the type of heat exchanger, e.g., SHELL_AND_TUBEheat_exchanger_flow_type:HeatExchangerFlowType, the flow type of the heat exchanger, e.g., COUNTER
Behaviours (Methods)
Inherits methods from parent classes
HeatPump
The HeatPump class models heat pumps that are parts of an HVAC system in a building.
Parent Classes
AbstractDuctConnectedComponent
Relationships
HeatPumphas a one-to-many relationship withHeatExchangerHeatPumphas a one-to-one relationship withCondenserHeatPumphas a one-to-one relationship withCompressor
Attributes
heat_exchangers:List[HeatExchanger], heat exchangers that form part of the heat pumpheat_source:HeatSource, the source of heat for the heat pump, e.g., AMBIENT_AIRmanufacturer:string (optional), the manufacturer of the heat pumpcondenser:Condenser (optional), a condenser that may be part of the heat pumpcompressor:Compressor (optional), a compressor that may be part of the heat pump
Behaviours (Methods)
add_heat_exchanger(heat_exchanger: HeatExchanger): adds a heat exchanger to a heat pump
VariableFrequencyDrive
The VariableFrequencyDrive class models variable frequency drives that are parts of an HVAC system in a building.
Parent Classes
Relationships
Inherits relationships from parent classes
Attributes
motor_speed:float (default is 0.0), the motor speed of the variable frequency drivemax_motor_speed:float (default is 1000.0), the maximum motor speed of the variable frequency drivespeed_measure:MeasurementUnit (default is RELOLUTIONS_PER_MINUTE), the unit for measuring the motor speed of the variable frequency drive
Behaviours (Methods)
Inherits methods from parent classes
Pump
The Pump class models pumps that are parts of an HVAC system in a building.
Parent Classes
AbstractDuctConnectedComponent
Relationships
Inherits relationships from parent classes
Attributes
pump_type:PumpType, the type of heat exchanger, e.g., BOOSTERflow_rate:BinaryMeasure (optional), the flow rate of the pump mostly measured in liters per second (L/s)efficiency:float (optional), the efficiency of the pump (as a percentage, between 0 and 100)power_consumption:BinaryMeasure (optional), the power consumption of the pump in kilowatts (kW)
Behaviours (Methods)
Inherits methods from parent classes