API Reference collection

collection

PHX mechanical system collection classes.

Source: PHX/collection.py


NoDeviceFoundError

No description available.

Inherits from: Exception

Attributes

AttributeTypeDescription
msg

NoSupportiveDeviceUnitFoundError

No description available.

Inherits from: Exception

Attributes

AttributeTypeDescription
msg

NoRenewableDeviceUnitFoundError

No description available.

Inherits from: Exception

Attributes

AttributeTypeDescription
msg

PhxZoneCoverage

Percentage of each building load type covered by a mechanical subsystem for a given zone.


PhxRenewableDeviceCollection

A keyed collection of PHX renewable energy devices (PV systems).

Properties

PropertyTypeDescription
devicesAll renewable energy devices in the collection.
pv_devicesReturn a List of all the Photovoltaic devices

Methods

clear_all_devices()

Reset the collection to an empty dictionary.

device_in_collection(_device_key)

Return True if a PHX Renewable Device with the matching key is in the collection.

ArgTypeDescription
_device_key

get_device_by_key(_key)

Returns the PHX Renewable Device with the matching key, or None if not found.

ArgTypeDescription
_keyThe key to search the collection for.

get_device_by_id(_id_num)

Returns a PHX Renewable Device from the collection which has a matching id-num.

ArgTypeDescription
_id_numThe Renewable Device id-number to search for.

add_new_device(_key, _d)

Adds a new PHX Supportive Device to the collection.

ArgTypeDescription
_keyThe key to use when storing the new device
_d

group_devices_by_identifier(_devices)

ArgTypeDescription
_devices

merge_group_of_devices(_groups)

Merge a group of Dict of device-groups together into a single device.

ArgTypeDescription
_groups

merge_all_devices()

Merge all the devices in the collection together by identifier.


PhxSupportiveDeviceCollection

A keyed collection of PHX supportive (auxiliary energy) devices.

Properties

PropertyTypeDescription
devicesAll supportive devices in the collection.
heat_circulating_pumpsReturn all heat-distribution circulating pump devices.
dhw_circulating_pumpsReturn all DHW recirculation pump devices.
dhw_storage_pumpsReturn all DHW storage load pump devices.
other_devicesReturn all supportive devices not classified as pumps.

Methods

clear_all_devices()

Reset the collection to an empty dictionary.

device_in_collection(_device_key)

Return True if a PHX Supportive Device with the matching key is in the collection.

ArgTypeDescription
_device_key

get_device_by_key(_key)

Returns the PHX Supportive Device with the matching key, or None if not found.

ArgTypeDescription
_keyThe key to search the collection for.

get_device_by_id(_id_num)

Returns a PHX Supportive Device from the collection which has a matching id-num.

ArgTypeDescription
_id_numThe Supportive Device id-number to search for.

add_new_device(_key, _d)

Adds a new PHX Supportive Device to the collection.

ArgTypeDescription
_keyThe key to use when storing the new device
_d

group_devices_by_identifier(_devices)

ArgTypeDescription
_devices

merge_group_of_devices(_groups)

Merge a group of Dict of device-groups together into a single device.

ArgTypeDescription
_groups

merge_all_devices()

Merge all the devices in the collection together by identifier.


PhxExhaustVentilatorCollection

A keyed collection of PHX point-exhaust ventilation devices.

Properties

PropertyTypeDescription
devicesAll exhaust ventilation devices in the collection.
kitchen_hood_devicesReturn a List of all the Kitchen Hood devices
dryer_devicesReturn a List of all the Dryer devices
user_determined_devicesReturn a List of all the User-Determined devices

Methods

clear_all_devices()

Reset the collection to an empty dictionary.

device_in_collection(_device_key)

Return True if a PHX Exhaust Ventilator with the matching key is in the collection.

ArgTypeDescription
_device_key

get_ventilator_by_key(_key)

Returns the PHX Exhaust Ventilator with the matching key, or None if not found.

ArgTypeDescription
_keyThe key to search the collection for.

get_ventilator_by_id(_id_num)

Returns a PHX Exhaust Ventilator from the collection which has a matching id-num.

ArgTypeDescription
_id_numThe Exhaust Ventilator id-number to search for.

add_new_ventilator(_key, _d)

Adds a new PHX Exhaust Ventilator to the collection.

ArgTypeDescription
_keyThe key to use when storing the new mechanical device
_d

merge_all_devices()

Merge all the devices in the collection together by type.


PhxMechanicalSystemCollection

The top-level collection of all mechanical devices and distribution for a project variant.

Properties

PropertyTypeDescription
devicesReturns a list of the ‘devices’ in the collection.
ventilation_devicesReturns a list of the ‘Ventilation’ devices in the collection.
space_heating_devicesReturns a list of the ‘Space Heating’ devices in the collection.
heat_pump_devicesReturns a list of all the Heat-Pump devices in the collection.
cooling_devicesReturns a list of all the Cooling devices (heat pumps) in the collection.
dhw_heating_devicesReturns a list of only the ‘DHW Heating’ devices (no tanks) in the collection.
dhw_tank_devicesReturns a list of only the ‘DHW Storage Tank’ devices (no heaters) in the collection.
dhw_distribution_trunksAll DHW trunk pipes, sorted by display name.
dhw_distribution_pipingReturns a list of ALL the DHW Piping from ALL Trunks, Branches, Twigs in the collection.
dhw_distribution_piping_segmentsReturns a list of ALL the DHW Piping Segments from ALL Trunks, Branches, Twigs in the collection.
dhw_distribution_piping_segments_by_diamReturns a list of the DHW branch-piping segments, grouped by diameter.
dhw_recirc_pipingReturns a list of all the DHW recirculation-piping in the collection.
dhw_recirc_piping_segments_by_diamReturns a list of the DHW recirculation-piping segments, grouped by diameter.
dhw_recirc_total_length_mTotal length of all DHW recirculation piping (m).
dhw_recirc_weighted_heat_loss_coeffReturn a length-weighted average pipe heat-loss coefficient.
dhw_distribution_total_length_mTotal length of all DHW distribution piping segments (m).
dhw_distribution_weighted_diameter_mmReturn a length-weighted average diameter for the trunk/branch/twig piping.
vent_ductingReturns a list of all the Vent. Ducting in the collection.

Methods

device_in_collection(_device_key)

Return True if the a Mech device with the matching key is already in the collection.

ArgTypeDescription
_device_key

get_mech_device_by_key(_key)

Returns the mechanical device with the matching key, or None if not found.

ArgTypeDescription
_keyThe key to search the collection for.

get_mech_device_by_id(_id_num)

Returns a Mechanical Device from the collection which has a matching id-num.

ArgTypeDescription
_id_numThe Mechanical Device id-number to search for.

add_new_mech_device(_key, _d)

Adds a new PHX Mechanical device to the collection.

ArgTypeDescription
_keyThe key to use when storing the new mechanical device
_d

add_distribution_piping(_p)

Add a DHW trunk pipe to the system. All piping must follow Trunk > Branch > Fixture hierarchy.

ArgTypeDescription
_p

add_recirc_piping(_p)

Add a new DHW Recirc-Pipe to the System.

ArgTypeDescription
_p

add_vent_ducting(_d)

Add a ventilation duct element to the system.

ArgTypeDescription
_d