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

Adjacent test and fix #145

Merged
merged 4 commits into from
Nov 1, 2021
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
25 changes: 17 additions & 8 deletions lib/openstudio/extension/core/os_lib_model_generation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1146,13 +1146,13 @@ def create_bar(runner, model, bar_hash, story_multiplier_method = 'Basements Gro
spaces_temp = OpenStudio::Model::SpaceVector.new
spaces_temp << space_a
spaces_temp << space_b
# disable until enhanced intersectio nand matching, will make walls adiabatic and exterior within create_bar workflow
# attempt to intersect and match walls on a story, but later secondary match will look for missted matches and turn them to adiabaitc
# intersect and sort
# OpenStudio::Model.intersectSurfaces(spaces_temp)
# OpenStudio::Model.matchSurfaces(spaces_temp)
OpenStudio::Model.intersectSurfaces(spaces_temp)
OpenStudio::Model.matchSurfaces(spaces_temp)
end
end
runner.registerInfo("Intersecting and matching surfaces in story #{story.name}, this will create additional geometry.")
runner.registerInfo("Intersecting and matching surfaces in story #{story.name}, this will create additional geometry. Diagnstoic intersection and matching done a in paris of spaces.")
end
end

Expand All @@ -1173,11 +1173,11 @@ def create_bar(runner, model, bar_hash, story_multiplier_method = 'Basements Gro
story.spaces.sort.each do |space|
story_spaces << space
end
# disable until enhanced intersectio nand matching, will make walls adiabatic and exterior within create_bar workflow
# attempt to intersect and match walls on a story, but later secondary match will look for missted matches and turn them to adiabaitc
# intersect and sort
# OpenStudio::Model.intersectSurfaces(story_spaces)
# OpenStudio::Model.matchSurfaces(story_spaces)
#runner.registerInfo("Intersecting and matching surfaces in story #{story.name}, this will create additional geometry.")
OpenStudio::Model.intersectSurfaces(story_spaces)
OpenStudio::Model.matchSurfaces(story_spaces)
runner.registerInfo("Intersecting and matching surfaces in story #{story.name}, this will create additional geometry.")
end
end

Expand Down Expand Up @@ -1205,7 +1205,9 @@ def create_bar(runner, model, bar_hash, story_multiplier_method = 'Basements Gro
runner.registerInfo("Finding non-exterior walls and setting boundary condition to adiabatic")

# need to organize by story incase top story is partial story
# should also be only for a single bar
story_bounding = {}
missed_match_count = 0

# gather new spaces by story
new_spaces.each do |space|
Expand Down Expand Up @@ -1238,6 +1240,7 @@ def create_bar(runner, model, bar_hash, story_multiplier_method = 'Basements Gro
v[:spaces].each do |space|
space.surfaces.each do |space_surface|
next if not space_surface.surfaceType == "Wall"
next if space_surface.outsideBoundaryCondition == "Surface" # if if found a match leave it alone, don't change to adiabiatc
surface_bounding_box = OpenStudio::BoundingBox.new
surface_bounding_box.addPoints(space.transformation * space_surface.vertices)
surface_on_outside = false
Expand All @@ -1253,10 +1256,16 @@ def create_bar(runner, model, bar_hash, story_multiplier_method = 'Basements Gro
# change if not exterior
if !surface_on_outside
space_surface.setOutsideBoundaryCondition("Adiabatic")
missed_match_count += 1
end
end
end
end

if missed_match_count > 0
runner.registerInfo("#{missed_match_count} surfaces that were exterior appear to be interior walls and had boundary condition chagned to adiabiatic.")
end

end

# sort stories (by name for now but need better way)
Expand Down
2 changes: 1 addition & 1 deletion spec/openstudio/core/os_lib_model_generation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def arguments(model)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('custom_height_bar', true); arg.setValue(true); args << arg
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('bottom_story_ground_exposed_floor', true); arg.setValue(true); args << arg
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('top_story_exterior_exposed_roof', true); arg.setValue(true); args << arg
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('make_mid_story_surfaces_adiabatic', true); arg.setValue(false); args << arg
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('make_mid_story_surfaces_adiabatic', true); arg.setValue(true); args << arg
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('use_upstream_args', true); arg.setValue(false); args << arg
arg = OpenStudio::Measure::OSArgument.makeStringArgument('story_multiplier', true); arg.setValue('Basements Ground Mid Top'); args << arg
arg = OpenStudio::Measure::OSArgument.makeStringArgument('bar_division_method', true); arg.setValue('Multiple Space Types - Individual Stories Sliced'); args << arg
Expand Down