Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
2

Script to assign airwalls to selected space

asked 8 years ago

gokul's avatar

updated 7 years ago

Hey, I am trying to assign the "Surface" type Walls of a selected space to airwalls, through a script. I am able to get the surfaces of the selected space, check if they are Walls, and if their OutsideBoundaryCondition is "Surface", change the surface ConstructionName to "Air Wall". However, as I understand, for this script to work, adjacent surfaces to the surfaces assigned as airwalls (which would be part of the neighbouring space), need to be assigned to the same construction as well.

In SketchUp, the 'Outside Boundary Condition Object' SketchUp Imageprovides this information, but I do not know how to access this information through code. The surface class reference in the documentation (http://mea-developer-nrel-legacy-down...) does not specify anything about the Outside Boundary Condition Object (different from the Outside Boundary Condition ) Is there a method to tell me what the adjacent surface is to a specific surface, or a method to access the information above via code? Any other suggestions to implement this idea better are also welcome! Thanks.

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
2

answered 8 years ago

updated 8 years ago

@gokulram to get the outsideBoundaryConditionObject, use surface.adjacentSurface. That returns a bool. After checking if it exists (which it should if boundary condition is "Surface") add a .get to get the surface.

But, OpenStudio has a tie breaker for constructions on matched surfaces that should fix the matched surface for you. Notice in the OS app that when I hard assign the air wall directly to a surface in the core zone, that the surface in the affected perimeter zone inherits that construction (shows as green). If the construction was non symmetrical then OpenStudio would use a mirrored version of it.

image description

You can use inheritance diagram to see different places constructions can be applied. The deeper application is used when there is a conflict, with a hard assigned construction to a surface being the deepest, and a building level construction set being the shallowest.

Some example use cases for this are space types with construction sets for some surface types; such as an attic floor with insulation, or plenum floor, and also custom wall types like an medical imaging space type.

Preview: (hide)
link

Comments

Found a minor bug. If you use a non-symmetrical construction the GUI looks like it uses the same construction, but on forward translation to IDF it does indeed create a mirrored construction. "My Construction" has new sibling object named "My Construction Reversed".

David Goldwasser's avatar David Goldwasser  ( 8 years ago )

@DavidGoldwasser thanks, this is very helpful!

gokul's avatar gokul  ( 8 years ago )
2

answered 8 years ago

updated 8 years ago

The method Surface::adjacentSurface(see here) should be what you're looking for.

Preview: (hide)
link

Comments

Thanks @EricRingold!

gokul's avatar gokul  ( 8 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 8 years ago

Seen: 342 times

Last updated: Nov 28 '16