2

OpenStudio DaylightControl: redundancy between Space and Thermal Zone

Relationship between objects

I'm writing a measure to add a daylighting control to a zone/space. I'm not sure I understand the relationship between DaylightControl, Space and ThermalZone.

OS:Daylighting:Control,
  {Handle_of_Daylight_Control}, !- Handle
  {Handle_of_Space}, !- Space Name

OS:Space,
  {Handle_of_Space}, !- Handle
  [...]
  {Handle_of_ThermalZone}, !- Thermal Zone Name

OS:ThermalZone,
  {Handle_of_ThermalZone}, !- Handle
  [...]
  {Handle_of_Daylight_Control}, !- Primary Daylighting Control Name
  [...]

Using my awesome MSPaint skills, I can see it looks redundant, doesn't it?

Relationship between objects

Even more confusing, I can see the OS:ThermalZone object has a method

openstudio::model::ThermalZone::setPrimaryDaylightingControl    (   const DaylightingControl &      daylightingControl  )

But if you use it by itself (not caring about space), it doesn't assign anything to the ThermalZone.

Looking at DaylightingControl Class Reference, it seems it does belong to a Space, not a thermal zone. So why do we need the the daylightControl handle in the OS:ThermalZone object?

So, what am I missing there?

Further problem

Looking at a measure called "Add Daylight Sensor at the Center of Spaces with a Specified Space Type Assigned", what's used is:

sensor = OpenStudio::Model::DaylightingControl.new(model)
...
sensor.setSpace(space)

First, I didn't find anywhere in the documentation the setSpace method. Where can I find it?

Second, I'm having a problem. I initially wrote the measure asking the user to select the ThermalZone for which he wants a daylight control, considering that I knew in E+ it was linked to a zone (spaces don't exists anyways...). Is that a bad idea?

If not a truly awful idea right from the start, is it bad to just use

#Get first space linked to the ThermalZone we selected
zone_space = zone.spaces[0]
#Assign sensor to space
sensor.setSpace(zone_space)

Do I also need to do this in addition?

# Assign the sensor as a Primary Daylightlighting Control to the Thermal Zone
zone.setPrimaryDaylightingControl(sensor)
Julien Marrec's avatar
29.7k
Julien Marrec
asked 2015-04-07 12:04:05 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2017-08-05 13:28:30 -0500
edit flag offensive 0 remove flag close merge delete

Comments

Note: my measure works the way I want to, using both sensor.setSpace and zone.setPrimary... etc. (code here).

I'm mostly asking because I'm trying to understand more about measures and how to write them... I keep bumping into stuff like this, I'm wondering if I'm really bad at using the reference guide or if it's confusing for everyone, and I get the feeling my code isn't exactly 'DRY' (do not repeat yourself) nor clean.

Julien Marrec's avatar Julien Marrec (2015-04-07 12:37:02 -0500) edit
add a comment see more comments

1 Answer

4

OpenStudio allows you to place multiple daylighting control objects in a space for use with Radiance. You can also combine multiple spaces into a thermal zone. Therefore, OpenStudio makes you specify the daylighting control at the thermal zone level for simulation in EnergyPlus. For EnergyPlus simulations, only the primary and secondary controls are exported to EnergyPlus. EnergyPlus recently dropped the restriction of 1 illuminance map per zone so OpenStudio will likely deprecate the method that points from thermal zone to illuminance map and will export all illuminance maps to EnergyPlus as they are to Radiance.

@rpg777 can weigh in with more detail

macumber's avatar
12k
macumber
answered 2015-04-07 16:35:21 -0500
edit flag offensive 0 remove flag delete link

Comments

I hadn't thought of Radiance because I've never used it. Do I still need to do the following if not using radiance?

#Assign sensor to space
sensor.setSpace(zone_space)
Julien Marrec's avatar Julien Marrec (2015-04-08 08:23:21 -0500) edit
1

Yes, that assigns the sensor to a physical space. Think of spaces as groups of physical geometry and thermal zones as groups of spaces that are lumped together for HVAC.

macumber's avatar macumber (2015-04-08 08:27:35 -0500) edit

Ok, thanks @macumber

Julien Marrec's avatar Julien Marrec (2015-04-08 08:29:06 -0500) edit

I think you covered it, @macumber! Only thing I'd add is the unfortunate news that the Radiance support does not work with multiple spaces in a thermal zone, yet.

rpg777's avatar rpg777 (2015-04-08 09:56:07 -0500) edit
add a comment see more comments