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
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,7 @@ def apply_max_srr_nrcan(model:, srr_lim:, srr_opt: '')
sub_surface_create_scaled_subsurfaces_from_surface(surface: roof, area_fraction: srr_lim, construction: skylight_construct_set)
end
else # OPTION B
TBD.clean!
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OSut piggy-backs on top of TBD. It shares the same internal logger. Clean reset.

spaces = model.getSpaces
types = model.getSpaceTypes
roofs = TBD.facets(spaces, "Outdoors", "RoofCeiling")
Expand Down Expand Up @@ -810,7 +811,7 @@ def apply_max_srr_nrcan(model:, srr_lim:, srr_opt: '')
# the requested skylight area, often by 10% to 15%. This makes it unfair
# for NECBs, and more challenging when dealing with skylight wells. This
# issue only applies with attics - not plenums. Trim down SRR if required.
target = (srr_lim * graX / gra0) * graX
target = (srr_lim * graX / gra0) * gra0
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Silly mistake.

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: target = (srr_lim * graX / gra0) * gra0 should of course be simply target = srr_lim * graX.


# Filtering out tiny roof surfaces, twisty corridors, etc.
types = types.reject { |tp| tp.nameString.downcase.include?("undefined") }
Expand All @@ -827,6 +828,7 @@ def apply_max_srr_nrcan(model:, srr_lim:, srr_opt: '')
spaces = spaces.select { |sp| types.include?(sp.spaceType.get) }

TBD.addSkyLights(spaces, {area: target})
self.osut[:logs] = TBD.logs
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hold on to OSut logged messages, in case.


skys = TBD.facets(model.getSpaces, "Outdoors", "Skylight")
skm2 = skys.sum(&:grossArea)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def model_create_prototype_model(template:,
space.additionalProperties.setFeature(tag, "nonresconditioned")
else
if space.nameString.downcase.include?("attic")
space.additionalProperties.setFeature(tag, "unconditioned")
space.additionalProperties.setFeature(tag, "unconditioned")
else # treat all other cases as indirectly-conditioned e.g. plenums
space.additionalProperties.setFeature(tag, "nonresconditioned")
end
Expand Down
9 changes: 3 additions & 6 deletions test/necb/unit_tests/tests/test_necb_skylights.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ def test_necb_skylights()
'MediumOffice',
# 'NorthernEducation',
'QuickServiceRestaurant',
# 'SmallOffice'
'SmallOffice'
]

# 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)
# Minitest::UnexpectedError: RuntimeError: validation of model failed.
# ... /openstudio-standards/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb:714:in `apply_loads'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Keep (invalid?) NorthernEducation model aside.


# Range of test options. NECB2011 for now. Skipping later NECBs - they're
# systematically easier to deploy, given their lower reference building SRR
Expand All @@ -60,7 +60,6 @@ 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 @@ -142,8 +141,6 @@ def test_necb_skylights()
# 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