Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page

When trying to use this script in the OpenStudio application as an "add measure now," I get the error that my spaces "has no exterior natural lighting. No sensor will be added." However, the spaces have a thermal zone, and have outdoor boundary conditions, so I'm not sure what qualifies as having exterior natural lighting. Here is a snippet of the code from the github site, but I can't interpret it, thanks for the help!

https://github.com/NREL/OpenStudio-an...

 #eliminate spaces that don't have exterior natural lighting
has_ext_nat_light = false
space.surfaces.each do |surface|
next if not surface.outsideBoundaryCondition == "Outdoors"
surface.subSurfaces.each do |sub_surface|
next if sub_surface.subSurfaceType == "Door"
has_ext_nat_light = true
end
end
if has_ext_nat_light == false
runner.registerWarning("Space '#{space.name}' has no exterior natural lighting. No sensor will be added.")
next
end

edit retag close merge delete

Sort by » oldest newest most voted

This measure doesn't add in any windows, it only adds dayligt sensors. It first loops throu surfaces looking for surfaces with an exterior boundary condition. Then it loops through any subsurfaces that the surface has and if it has a sub-surface that isn't a door or overhead door sets this flag to true. "has_ext_nat_light = true". If one or more surface in a space is true for this it will add a sensor.

It was a basic proof of concept measure. We have office and school AEDG measures that are more advanced. They add fenestration as well as shading surfaces, light shelves, skylights, and daylighting controls. It removes your existing objects, and adds objects based on the 50% AEDG guidelines. To use this you need to use our templates or manually flag the building type and space types so the measure knows about the function of each space. This applies a more advanced logic on placing the sensor than the other measure.

more

Thanks David for the prompt reply! I was indeed trying to run the measure before running the set window to wall area measure, so that totally makes sense. Even though this measure isn't as powerful as the AEDG ones, it is still very useful in automating the addition of daylight sensors in large models. Keep up the great work and thanks for your help!

( 2014-10-29 09:03:44 -0600 )edit

David -

One additional thing I noticed -- while the measure adds the control sensor, it does not connect the thermal zone and the daylight control together. The thermal zone in OS has a field for "Primary Daylighting Control Name," which gets autopopulated as long as you add the daylight control after you specify the thermal zone. With the measure, however, I noticed that it does not modify this field.

I know you mentioned that it was a "proof of concept" measure, so this might not have been in the scope of the script. However, adding this functionality would provide great value.

( 2014-11-03 09:59:14 -0600 )edit