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

Initializes nrcan_446 branch: skylights & wells #1854

Open
wants to merge 10 commits into
base: nrcan
Choose a base branch
from
2 changes: 1 addition & 1 deletion openstudio-standards.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'rubyXL', '~> 3.4'
spec.add_development_dependency 'simplecov', '0.22.0'
spec.add_development_dependency 'yard', '~> 0.9'
spec.add_runtime_dependency 'tbd', '~> 3.4.4'
spec.add_development_dependency 'tbd', '~> 3.4.4'
spec.add_development_dependency 'aws-sdk-s3'
spec.add_development_dependency 'git-revision'
spec.add_development_dependency 'bundler-audit'
Expand Down
23 changes: 19 additions & 4 deletions test/necb/unit_tests/tests/test_necb_skylights.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,17 @@ def test_necb_skylights()
# to toplight occupied spaces below.
@buildings = [
'FullServiceRestaurant',
# 'LargeOffice',
# 'MediumOffice',
'LargeOffice',
'MediumOffice',
# 'NorthernEducation',
# 'QuickServiceRestaurant',
'QuickServiceRestaurant',
# 'SmallOffice'
Copy link
Collaborator Author

@brgix brgix Dec 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently having an issue with reported skylight area when dealing with the SmallOffice (attic roof overhangs). This works when tested in isolation (i.e. outside of OpenStudio-Standards/BTAP), so likely an unintended bug somewhere - my bad.


EDIT: Yup - error fixed.

]

# NOTE: Skipping NorthernEducation for now:
# - Standards.Model.rb:5432: warning: instance variable @space_type_map not initialized
# - model works in isolation (e.g. SDK 3.6.1, 3.7.0, 3.8.0)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The NorthernEducation model works with addSkylights just fine in isolation. This is likely more of a BTAP prototype family thing. Setting aside for now.


# Range of test options. NECB2011 for now. Skipping later NECBs - they're
# systematically easier to deploy, given their lower reference building SRR
# targets (e.g. 2% vs 5%). BTAPPRE1980 cases are likely worth testing at
Expand All @@ -56,6 +60,7 @@ def test_necb_skylights()
@buildings.sort.each do |building|
@templates.sort.each do |template|
cas = "CASE #{option} | #{building} (#{template})"
puts; puts; puts cas; puts "--- --- --- --- --- -- ---"
srr = case template
when 'NECB2020' then 0.02
when 'NECB2017' then 0.02
Expand Down Expand Up @@ -94,7 +99,14 @@ def test_necb_skylights()
assert(st.osut[:logs].is_a?(Array), err_msg)

# Tally skylight areas. Compare with GRAs.
skm2 = model.getSubSurfaces.sum(&:grossArea)
skm2 = 0

model.getSubSurfaces.each do |sub|
next unless sub.subSurfaceType.downcase == "skylight"

skm2 += sub.grossArea
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's more reasonable - slaps forehead.

end

assert(skm2 > 0, "BTAP/OSut: Negative skylight area (#{cas})?")
gra0 = st.osut[:gra0] # gross roof area (GRA) in m2, as per SDK
graX = st.osut[:graX] # GRA minus overhang areas (see SmallOffice)
Expand Down Expand Up @@ -129,6 +141,9 @@ def test_necb_skylights()
# SRR% of 4.5%. The effective 'ratio' would vary based on geometry,
# e.g. larger building footprint, wider overhangs.
ratio = gra0.round > graX.round ? skm2 / graX : skm2 / gra0

puts; puts "#{gra0.round} vs #{graX.round} #{skm2.round}"; puts

assert(ratio.round(2) == srr, "BTAP/OSut: Incorrect SRR (#{cas})?")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although the requested SRR-based target area is reduced when dealing with (unconditioned) attic roof overhangs (e.g. 4.5% instead of the requested 5%), it's always possible to validate whether a requested SRR of 5% is met by dividing skylight area by the effective gross roof area.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo : ratio = gra0.round > graX.round ? skm2 / graX : skm2 / gra0 should of course boil down to ratio = skm2 / graX.


# Higher level feedback.
Expand Down