-
Notifications
You must be signed in to change notification settings - Fork 5
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
RS/CH/get_zcc #269
RS/CH/get_zcc #269
Changes from all commits
837cbe4
d080500
936ff7f
8c73a55
2728391
90e09d5
9141900
7eb7644
71b1f54
7370c36
25756a8
7f3b554
e9603f8
53b6824
73f6c28
84a109a
518e98e
9c2798c
18a8acc
155a75e
4cea4ef
245763c
ba0eca7
6990d5d
f91fbee
b0e9696
fa40325
ae0ce01
12b78bc
c9b2bba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,21 +19,23 @@ Constants: | |
|
||
Logic: | ||
|
||
- Get building climate zone: `climate_zone = RMR.weather.climate_zone` | ||
- Get dictionary for the list of zones and their total floor area served by each HVAC system in RMR: `hvac_zone_list_w_area_dict = get_hvac_zone_list_w_area(RMR)` | ||
|
||
- Get heated space criteria: `system_min_heating_output = data_lookup(table_3_2,climate_zone)` | ||
- For each HVAC system id in dictionary: `for hvac_sys_id in hvac_zone_list_w_area_dict.keys():` (Note XC, this only gets HVAC systems serving zones. Orphan HVAC systems are not looped) | ||
|
||
- Get dictionary for the list of zones and their total floor area served by each HVAC system in RMR: `hvac_zone_list_w_area_dict = get_hvac_zone_list_w_area(RMR)` | ||
- Get total central sensible cooling capacity for HVAC system: | ||
**[CH: The hvac system has at most one cooling_system, one heating_system, and one preheat_system. Also, I think we need to handle any of these systems missing.]** | ||
`total_central_sensible_cool_capacity = SUM(cooling_system.sensible_cool_capacity for cooling_system in GET_COMPONENT_BY_ID(hvac_sys_id).cooling_system)` | ||
|
||
- For each HVAC system id in dictionary: `for hvac_sys_id in hvac_zone_list_w_area_dict.keys():` (Note XC, this only gets HVAC systems serving zones. Orphan HVAC systems are not looped) | ||
- Get total central heating capacity for HVAC system: `total_central_heat_capacity = SUM(heating_system.heat_capacity for heating_system in GET_COMPONENT_BY_ID(hvac_sys_id).heating_system) + SUM(preheat_system.heat_capacity for preheat_system in GET_COMPONENT_BY_ID(hvac_sys_id).preheat_system)` | ||
|
||
- Get total central sensible cooling capacity for HVAC system: `total_central_sensible_cool_capacity = SUM(cooling_system.sensible_cool_capacity for cooling_system in GET_COMPONENT_BY_ID(hvac_sys_id).cooling_system)` | ||
- Calculate and save total central sensible cooling output per floor area for HVAC system to dictionary: `hvac_cool_capacity_dict[hvac_sys_id] = total_central_sensible_cool_capacity / hvac_zone_list_w_area_dict[hvac_sys_id]["TOTAL_AREA"]` | ||
|
||
- Get total central heating capacity for HVAC system: `total_central_heat_capacity = SUM(heating_system.heat_capacity for heating_system in GET_COMPONENT_BY_ID(hvac_sys_id).heating_system) + SUM(preheat_system.heat_capacity for preheat_system in GET_COMPONENT_BY_ID(hvac_sys_id).preheat_system)` | ||
- Calculate and save total central heating output per floor area for HVAC system to dictionary: `hvac_heat_capacity_dict[hvac_sys_id] = total_central_heat_capacity / hvac_zone_list_w_area_dict[hvac_sys_id]["TOTAL_AREA"]` | ||
|
||
- Calculate and save total central sensible cooling output per floor area for HVAC system to dictionary: `hvac_cool_capacity_dict[hvac_sys_id] = total_central_sensible_cool_capacity / hvac_zone_list_w_area_dict[hvac_sys_id]["TOTAL_AREA"]` | ||
- Get building climate zone: `climate_zone = RMR.weather.climate_zone` | ||
|
||
- Calculate and save total central heating output per floor area for HVAC system to dictionary: `hvac_heat_capacity_dict[hvac_sys_id] = total_central_heat_capacity / hvac_zone_list_w_area_dict[hvac_sys_id]["TOTAL_AREA"]` | ||
- Get heated space criteria: `system_min_heating_output = data_lookup(table_3_2,climate_zone)` | ||
|
||
- For each zone in RMR: `for zone in RMR...zones:` | ||
|
||
|
@@ -47,7 +49,9 @@ Logic: | |
|
||
- Add central heating capacity per floor area to zone capacity dictionary: `zone_capacity_dict[zone.id]["HEATING"] += hvac_heat_capacity_dict[hvac_sys.id]` | ||
|
||
- Check if terminal has heating capacity, add to zone capacity dictionary: `if terminal.heat_capacity: zone_capacity_dict[zone.id]["HEATING"] += terminal.heat_capacity / zone_area` (Note XC, it seems terminal does not have cooling capacity. Might need cooling capacity at the terminal level for equipment like active beams.) | ||
- Check if terminal has heating capacity, add to zone capacity dictionary: `if terminal.heating_capacity: zone_capacity_dict[zone.id]["HEATING"] += terminal.heat_capacity / zone_area` | ||
|
||
- Check if terminal has cooling capacity, add to zone capacity dictionary: `if terminal.cooling_capacity: zone_capacity_dict[zone.id]["SENSIBLE_COOLING"] += terminal.cooling_capacity / zone_area` | ||
|
||
- Check if zone meets the criteria for directly conditioned (heated or cooled) zone, save zone as directly conditioned: `if ( zone_capacity_dict[zone.id]["SENSIBLE_COOLING"] >= CAPACITY_THRESHOLD ) OR ( zone_capacity_dict[zone.id]["HEATING"] >= system_min_heating_output ): directly_conditioned_zones.append(zone.id)` | ||
|
||
|
@@ -64,12 +68,12 @@ Logic: | |
- For each surface in zone: `for surface in zone.surfaces:` | ||
|
||
- Check if surface is interior, get adjacent zone: `if surface.adjacent_to == "INTERIOR": adjacent_zone = match_data_element(RMR, zones, surface.adjacent_zone_id)` | ||
**[CH: There is no `surface.fenestration_subsurfaces` field. There is a `surface.subsurfaces` field instead. Subsurface has `opaque_area` and `glazed_area`.]** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Surface.fenestration_subsurfaces is no longer in the schema. I'll correct the calculation below. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is corrected. |
||
- If adjacent zone is directly conditioned (heated or cooled), add the product of the U-factor and surface area to the directly conditioned type: `if adjacent_zone in directly_conditioned_zone: directly_conditioned_product_sum += sum( ( subsurface.glazed_area + subsurface.opaque_area ) * subsurface.u_factor for subsurface in surface.subsurfaces ) + ( surface.area - sum( ( subsurface.glazed_area + subsurface.opaque_area ) for subsurface in surface.subsurfaces ) * surface.construction.u_factor` | ||
|
||
- If adjacent zone is directly conditioned (heated or cooled), add the product of the U-factor and surface area to the directly conditioned type: `if adjacent_zone in directly_conditioned_zone: directly_conditioned_product_sum += sum( ( fenestration.glazed_area + fenestration.opaque_area ) * fenestration.u_factor for fenestration in surface.fenestration_subsurfaces ) + ( surface.area - sum( ( fenestration.glazed_area + fenestration.opaque_area ) for fenestration in surface.fenestration_subsurfaces ) * surface.construction.u_factor` | ||
- Else, add the product of the U-factor and surface area to the other type: `else: other_product_sum += sum( ( subsurface.glazed_area + subsurface.opaque_area ) * subsurface.u_factor for subsurface in surface.subsurfaces ) + ( surface.area - sum( ( subsurface.glazed_area + subsurface.opaque_area ) for subsurface in surface.subsurfaces ) * surface.construction.u_factor` | ||
|
||
- Else, add the product of the U-factor and surface area to the other type: `else: other_product_sum += sum( ( fenestration.glazed_area + fenestration.opaque_area ) * fenestration.u_factor for fenestration in surface.fenestration_subsurfaces ) + ( surface.area - sum( ( fenestration.glazed_area + fenestration.opaque_area ) for fenestration in surface.fenestration_subsurfaces ) * surface.construction.u_factor` | ||
|
||
- Else check if surface is exterior, add the product of the U-factor and surface area to the other type: `else if surface.adjacent_to == "EXTERIOR": other_product_sum += sum( ( fenestration.glazed_area + fenestration.opaque_area ) * fenestration.u_factor for fenestration in surface.fenestration_subsurfaces ) + ( surface.area - sum( ( fenestration.glazed_area + fenestration.opaque_area ) for fenestration in surface.fenestration_subsurfaces ) * surface.construction.u_factor` | ||
- Else check if surface is exterior, add the product of the U-factor and surface area to the other type: `else if surface.adjacent_to == "EXTERIOR": other_product_sum += sum( ( subsurface.glazed_area + subsurface.opaque_area ) * subsurface.u_factor for subsurface in surface.subsurfaces ) + ( surface.area - sum( ( subsurface.glazed_area + subsurface.opaque_area ) for subsurface in surface.subsurfaces ) * surface.construction.u_factor` | ||
|
||
- Determine if zone is indirectly conditioned: `if directly_conditioned_product_sum > other_product_sum: indirectly_conditioned_zones.append(zone)` | ||
|
||
|
@@ -88,29 +92,28 @@ Logic: | |
- For each space in zone: `for space in zone.spaces:` | ||
|
||
- Check if lighting space type is residential, space is classified as residential: `if space.lighting_space_type in ["DORMITORY_LIVING_QUARTERS" , "FIRE_STATION_SLEEPING_QUARTERS", "GUEST_ROOM", "DWELLING_UNIT", "HEALTHCARE_FACILITY_NURSERY", "HEALTHCARE_FACILITY_PATIENT_ROOM"]: space_residential_flag = TRUE` | ||
**[CH: I suggest replacing `space_residential_flag` with `zone_has_residential_spaces` and replacing `space_nonresidential_flag` with `zone_has_residential_spaces`.]** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll update these. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is updated. |
||
- Else if lighting space type is specified, space is classified as non-residential: `else if space.lighting_space_type: zone_has_nonresidential_spaces = TRUE` | ||
|
||
- Else if lighting space type is specified, space is classified as non-residential: `else if space.lighting_space_type: space_nonresidential_flag = TRUE` | ||
|
||
- Else if lighting space type is not specified, and lighting building area type is residential, space is classified as residential: `else if segment_residential_flag: space_residential_flag = TRUE` | ||
- Else if lighting space type is not specified, and lighting building area type is residential, space is classified as residential: `else if segment_residential_flag: zone_has_residential_spaces = TRUE` | ||
|
||
- Else if lighting space type is not specified, and lighting building area type is non-residential, space is classified as non-residential: `else if segment_nonresidential_flag: space_nonresidential_flag = TRUE` | ||
- Else if lighting space type is not specified, and lighting building area type is non-residential, space is classified as non-residential: `else if segment_nonresidential_flag: zone_has_nonresidential_spaces = TRUE` | ||
|
||
- Else, neither lighting space type or lighting building area type is specified, space is classified as non-residential (i.e. where the space classification is unknown, the space shall be classified as an office space as per G3.1-1(c)): `else: space_nonresidential_flag = TRUE` | ||
- Else, neither lighting space type or lighting building area type is specified, space is classified as non-residential (i.e. where the space classification is unknown, the space shall be classified as an office space as per G3.1-1(c)): `else: zone_has_nonresidential_spaces = TRUE` | ||
|
||
- If zone has both residential and non-residential spaces, classify zone as conditioned mixed: `if residential_flag AND nonresidential_flag: zone_conditioning_category_dict[zone.id] = "CONDITIONED MIXED"` | ||
- If zone has both residential and non-residential spaces, classify zone as conditioned mixed: `if zone_has_residential_spaces AND zone_has_nonresidential_spaces: zone_conditioning_category_dict[zone.id] = "CONDITIONED MIXED"` | ||
|
||
- Else if zone has only residential spaces, classify zone as conditioned residential: `else if residential_flag: zone_conditioning_category_dict[zone.id] = "CONDITIONED RESIDENTIAL"` | ||
|
||
- Else if zone has only non-residential spaces, classify zone as conditioned non-residential: `else: zone_conditioning_category_dict[zone.id] = "CONDITIONED NON-RESIDENTIAL"` | ||
- Else if zone has only residential spaces, classify zone as conditioned residential: `else if zone_has_residential_spaces: zone_conditioning_category_dict[zone.id] = "CONDITIONED RESIDENTIAL"` | ||
|
||
- Else, zone has only non-residential spaces, classify zone as conditioned non-residential: `else: zone_conditioning_category_dict[zone.id] = "CONDITIONED NON-RESIDENTIAL"` | ||
- Else if zone is semi-heated, classify zone as semi-heated: `else if zone in semiheated_zones: zone_conditioning_category_dict[zone.id] = "SEMI-HEATED"` | ||
|
||
- Else if zone has interior parking spaces, classify zone as unenclosed: `if( space.lighting_space_type == "PARKING_AREA_INTERIOR" for space in zone.spaces ): zone_conditioning_category_dict[zone.id] = "UNENCLOSED"` | ||
|
||
- Else if zone is crawlspace, classify zone as unenclosed: `else if ( ( zone.volume / sum( space.floor_area for space in zone.spaces ) ) < CRAWLSPACE_HEIGHT_THRESHOLD ) AND ( ( get_opaque_surface_type(surface) in ["HEATED SLAB-ON-GRADE", "UNHEATED SLAB-ON-GRADE"] ) AND ( surface.adjacent_to == "GROUND" ) for surface in zone.surfaces ): zone_conditioning_category_dict[zone.id] = "UNENCLOSED"` (Note XC, need to check surface != Floor, RDS online not updated) | ||
- Else if zone is crawlspace, classify zone as unenclosed: `else if ( ( zone.volume / sum( space.floor_area for space in zone.spaces ) ) < CRAWLSPACE_HEIGHT_THRESHOLD ) AND ( get_opaque_surface_type(surface) in ["HEATED SLAB-ON-GRADE", "UNHEATED SLAB-ON-GRADE"] for `**[CH: insert `any`]**` ANY surface in zone.surfaces ): zone_conditioning_category_dict[zone.id] = "UNENCLOSED"` | ||
|
||
- Else if zone is attic, classify zone as unenclosed: `else if ( ( get_opaque_surface_type(surface) == "CEILING" ) AND ( surface.adjacent_to == "EXTERIOR" ) for surface in zone.surfaces ): zone_conditioning_category_dict[zone.id] = "UNENCLOSED"` | ||
- Else if zone is attic, classify zone as unenclosed: `else if ( ( get_opaque_surface_type(surface) == "ROOF"`**[CH: ROOF?]**` ) AND ( surface.adjacent_to == "EXTERIOR" ) for `**[CH: insert `any`]**` ANY surface in zone.surfaces ): zone_conditioning_category_dict[zone.id] = "UNENCLOSED"` | ||
|
||
- Else, classify zone as unconditioned: `else: zone_conditioning_category_dict[zone.id] = "UNCONDITIONED"` | ||
|
||
**Returns** `return zone_conditioning_category_dict` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will need to include zonal cooling output in the calculation below. The schema has been updated to reflect that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is updated.