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

fix(adiabatic): Ensure ground BCs can also be set to adiabatic #97

Merged
merged 1 commit into from Jul 18, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions honeybee_grasshopper_energy/src/HB Adiabatic by Type.py
Expand Up @@ -34,14 +34,14 @@

ghenv.Component.Name = "HB Adiabatic by Type"
ghenv.Component.NickName = 'AdiabaticByType'
ghenv.Component.Message = '0.1.0'
ghenv.Component.Message = '0.1.1'
ghenv.Component.Category = 'HB-Energy'
ghenv.Component.SubCategory = '0 :: Basic Properties'
ghenv.Component.AdditionalHelpFromDocStrings = "5"


try: # import the core honeybee dependencies
from honeybee.boundarycondition import Outdoors, Surface, boundary_conditions
from honeybee.boundarycondition import Outdoors, Ground, Surface, boundary_conditions
from honeybee.facetype import Wall, RoofCeiling, Floor
from honeybee.room import Room
from honeybee.face import Face
Expand All @@ -65,11 +65,11 @@ def check_and_assign_adiabatic_to_face(face):
"""Check if a face if of a relevant type and assign Adiabatic if so."""

# assign the adiabatic property to roofs
if roofs_ and check_type(face, Outdoors, RoofCeiling):
if roofs_ and check_type(face, (Outdoors, Ground), RoofCeiling):
face.boundary_condition = boundary_conditions.adiabatic

# assign the adiabatic property to exposed floors
if exposed_floors_ and check_type(face, Outdoors, Floor):
if exposed_floors_ and check_type(face, (Outdoors, Ground), Floor):
face.boundary_condition = boundary_conditions.adiabatic

# assign the adiabatic property to exposed floors
Expand All @@ -91,12 +91,12 @@ def check_and_assign_adiabatic_to_face(face):
for obj in hb_objs:
if isinstance(obj, Room):
for face in obj.faces:
if check_type(face, Outdoors, Wall):
if check_type(face, (Outdoors, Ground), Wall):
orient_i = face_orient_index(face, angles)
if orient_i is not None and exterior_walls_[orient_i]:
face.boundary_condition = boundary_conditions.adiabatic
else: # assume it is a Face
if check_type(obj, Outdoors, Wall):
if check_type(obj, (Outdoors, Ground), Wall):
orient_i = face_orient_index(obj, angles)
if orient_i is not None and exterior_walls_[orient_i]:
obj.boundary_condition = boundary_conditions.adiabatic
Expand Down
Binary file not shown.