Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create get_spaces_served_by_SWH_use.md #1407

Merged
merged 8 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/_toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ These conventions are used in all RDS below, and the logic of evaluating rules f
* [get_SWH_components_associated_with_each_swh_distribution_system](ruleset_functions/get_swh_components_associated_with_each_swh_distribution_system.md): This function gets all the SWH equipment connected to a SWH distribution system. The information is stored in a dictionary where the keys are the SWH Distribution System Ids and values are a dictionary giving the ServiceWaterHeatingEquipment, and Pumps connected to the particular SWH distribution system.
* [get_swh_equipment_type](ruleset_functions/get_swh_equipment_type.md): This function determines whether the swh equipment type is one of: (ELECTRIC_RESISTANCE_INSTANTANEOUS, ELECTRIC_RESISTANCE_STORAGE, GAS_STORAGE, OTHER)
* [get_energy_required_to_heat_swh_use](ruleset_functions/get_energy_required_to_heat_swh_use.md): This function calculates the total energy required to heat the SWH use over the course of a year in btu. Note - this function does not work for service water heating uses with use_units == "OTHER". In this case, it will return 0.
* [get_spaces_served_by_SWH_use](ruleset_functions/get_spaces_served_by_SWH_use.md): This function determines the spaces served by a given SWH use. The convention is that if any spaces reference the swh_use, then the service water heating use applies to only those spaces. If no spaces reference the service water heating use, it applies to all spaces in the building segment.

### G3.1.1 Exception Check Functions
* [does_zone_meet_G3_1_1c](ruleset_functions/G311_exceptions/does_zone_meet_G3_1_1d.md): Determines whether a given zone meets the G3_1_1c exception "If the baseline HVAC system type is 5, 6, 7, 8 use separate single-zone systems conforming with the requirements of system 3 or system 4 (depending on building heating source) for any spaces that have occupancy or process loads or schedules that differ significantly from the rest of the building. Peak thermal loads that differ by 10 Btu/h·ft2 (2.930710 W/sf) or more from the average of other spaces served by the system, or schedules that differ by more than 40 equivalent full-load hours per week from other spaces served by the system, are considered to differ significantly. Examples where this exception may be applicable include but are not limited to natatoriums and continually occupied security areas. This exception does not apply to computer rooms."
Expand Down
34 changes: 34 additions & 0 deletions docs/ruleset_functions/get_spaces_served_by_SWH_use.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## get_spaces_served_by_SWH_use

Description: This function determines the spaces served by a given SWH use. The convention is that if any spaces reference the swh_use, then the service water heating use applies to only those spaces. If no spaces reference the service water heating use, it applies to all spaces in the building segment.


Inputs:
- **RMD**
- **swh_use**

Returns:
- **spaces_served**: a list of spaces

Function Call:


Data Lookup: None

Logic:

- find the building_segment that contains this swh_use by looking through each building segment: `for building_segment in RMD.building_segments:`
- check if the swh_use is in this building segment: `if swh_use in building_segment.service_water_heating_uses:`
- create a list of spaces: `spaces_served = []`
- look at each space in the building segment to see which of them reference the swh_use: `for space in building_segment...spaces:`
- if the swh_use ID is in the list of space ServiceWaterHeatingUses, then the space is one of the spaces and we add it to the list: `if swh_use.id in space.service_water_heating_uses: spaces_served.append(space)`
- return space_ids: `return spaces_served`



**Returns** space_ids

**[Back](../_toc.md)**

**Notes:**
1. relies on re-structuring of SWH as in: https://github.com/open229/ruleset-model-description-schema/issues/264
Loading