Class: DEER2014

Inherits:
DEER show all
Defined in:
lib/openstudio-standards/standards/deer/deer_2014/deer_2014.rb,
lib/openstudio-standards/standards/deer/deer_2014/deer_2014.Space.rb

Overview

This class holds methods that apply DEER 2014 to a given model.

Technical References:

Direct Known Subclasses

ComStockDEER2014

Instance Attribute Summary collapse

Space collapse

Instance Method Summary collapse

Constructor Details

#initializeDEER2014

Returns a new instance of DEER2014.


8
9
10
11
# File 'lib/openstudio-standards/standards/deer/deer_2014/deer_2014.rb', line 8

def initialize
  @template = 'DEER 2014'
  load_standards_database
end

Instance Attribute Details

#templateObject (readonly)

Returns the value of attribute template


6
7
8
# File 'lib/openstudio-standards/standards/deer/deer_2014/deer_2014.rb', line 6

def template
  @template
end

Instance Method Details

#load_standards_database(data_directories = []) ⇒ Object


13
14
15
# File 'lib/openstudio-standards/standards/deer/deer_2014/deer_2014.rb', line 13

def load_standards_database(data_directories = [])
  super([__dir__] + data_directories)
end

#space_daylighted_area_window_width(space) ⇒ String

Determines the method used to extend the daylighted area horizontally next to a window. If the method is 'fixed', 2 ft is added to the width of each window. If the method is 'proportional', a distance equal to half of the head height of the window is added. If the method is 'none', no additional width is added.

Returns:

  • (String)

    returns 'fixed' or 'proportional'


11
12
13
14
# File 'lib/openstudio-standards/standards/deer/deer_2014/deer_2014.Space.rb', line 11

def space_daylighted_area_window_width(space)
  method = 'proportional'
  return method
end

#space_daylighting_control_required?(space, areas) ⇒ Array<Bool>

Determine if the space requires daylighting controls for toplighting, primary sidelighting, and secondary sidelighting. Defaults to false for all types.

Parameters:

  • space (OpenStudio::Model::Space)

    the space in question

  • areas (Hash)

    a hash of daylighted areas

Returns:

  • (Array<Bool>)

    req_top_ctrl, req_pri_ctrl, req_sec_ctrl


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/openstudio-standards/standards/deer/deer_2014/deer_2014.Space.rb', line 23

def space_daylighting_control_required?(space, areas)
  req_top_ctrl = true
  req_pri_ctrl = true
  req_sec_ctrl = true

  # Get the LPD of the space
  space_lpd_w_per_m2 = space.lightingPowerPerFloorArea

  # Primary Sidelighting
  # Check if the primary sidelit area contains less than 120W of lighting
  if areas['primary_sidelighted_area'] == 0.0
    OpenStudio.logFree(OpenStudio::Debug, 'openstudio.model.Space', "For #{space.name}, primary sidelighting control not required because primary sidelighted area = 0ft2.")
    req_pri_ctrl = false
  elsif areas['primary_sidelighted_area'] * space_lpd_w_per_m2 < 120.0
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Space', "For #{space.name}, primary sidelighting control not required because less than 120W of lighting are present in the primary daylighted area per 130.1(d) exception 3 T24-2013.")
    req_pri_ctrl = false
  else
    # Check the size of the windows
    if areas['total_window_area'] < OpenStudio.convert(24.0, 'ft^2', 'm^2').get
      OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Space', "For #{space.name}, primary sidelighting control not required because there are less than 24ft2 of window per 130.1(d) exception 4 T24-2013.")
      req_pri_ctrl = false
    end
  end

  # Secondary Sidelighting
  # Check if the primary and secondary sidelit areas contains less than 120W of lighting
  if areas['secondary_sidelighted_area'] == 0.0
    OpenStudio.logFree(OpenStudio::Debug, 'openstudio.model.Space', "For #{space.name}, secondary sidelighting control not required because secondary sidelighted area = 0ft2.")
    req_sec_ctrl = false
  elsif (areas['primary_sidelighted_area'] + areas['secondary_sidelighted_area']) * space_lpd_w_per_m2 < 120
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Space', "For #{space.name}, secondary sidelighting control not required because less than 120W of lighting are present in the combined primary and secondary daylighted areas per 5.5.3 prescriptive exception 1 T24-2013 NonRes ACM.")
    req_sec_ctrl = false
  else
    # Check the size of the windows
    if areas['total_window_area'] < OpenStudio.convert(24.0, 'ft^2', 'm^2').get
      OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Space', "For #{space.name}, secondary sidelighting control not required because there are less than 24ft2 of window per 130.1(d) exception 4 T24-2013.")
      req_sec_ctrl = false
    end
  end

  # Toplighting
  # Check if the toplit area contains less than 120W of lighting
  if areas['toplighted_area'] == 0.0
    OpenStudio.logFree(OpenStudio::Debug, 'openstudio.model.Space', "For #{space.name}, toplighting control not required because toplighted area = 0ft2.")
    req_top_ctrl = false
  elsif areas['toplighted_area'] * space_lpd_w_per_m2 < 120
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Space', "For #{space.name}, toplighting control not required because less than 120W of lighting are present in the toplighted area per 130.1(d) exception 3 T24-2013.")
    req_top_ctrl = false
  end

  return [req_top_ctrl, req_pri_ctrl, req_sec_ctrl]
end

#space_daylighting_fractions_and_windows(space, areas, sorted_windows, sorted_skylights, req_top_ctrl, req_pri_ctrl, req_sec_ctrl) ⇒ Object

Determine the fraction controlled by each sensor and which window each sensor should go near.

Parameters:

  • space (OpenStudio::Model::Space)

    the space with the daylighting

  • sorted_windows (Hash)

    a hash of windows, sorted by priority

  • sorted_skylights (Hash)

    a hash of skylights, sorted by priority

  • req_top_ctrl (Bool)

    if toplighting controls are required

  • req_pri_ctrl (Bool)

    if primary sidelighting controls are required

  • req_sec_ctrl (Bool)

    if secondary sidelighting controls are required


85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/openstudio-standards/standards/deer/deer_2014/deer_2014.Space.rb', line 85

def space_daylighting_fractions_and_windows(space,
                                            areas,
                                            sorted_windows,
                                            sorted_skylights,
                                            req_top_ctrl,
                                            req_pri_ctrl,
                                            req_sec_ctrl)
  sensor_1_frac = 0.0
  sensor_2_frac = 0.0
  sensor_1_window = nil
  sensor_2_window = nil

  # Get the area of the space
  space_area_m2 = space.floorArea

  if req_top_ctrl && req_pri_ctrl && req_sec_ctrl
    # Sensor 1 controls toplighted area
    sensor_1_frac = areas['toplighted_area'] / space_area_m2
    sensor_1_window = sorted_skylights[0]
    # Sensor 2 controls primary + secondary area
    sensor_2_frac = (areas['primary_sidelighted_area'] + areas['secondary_sidelighted_area']) / space_area_m2
    sensor_2_window = sorted_windows[0]
  elsif !req_top_ctrl && req_pri_ctrl && req_sec_ctrl
    # Sensor 1 controls primary area
    sensor_1_frac = areas['primary_sidelighted_area'] / space_area_m2
    sensor_1_window = sorted_windows[0]
    # Sensor 2 controls secondary area
    sensor_2_frac = (areas['secondary_sidelighted_area'] / space_area_m2)
    sensor_2_window = sorted_windows[0]
  elsif req_top_ctrl && !req_pri_ctrl && req_sec_ctrl
    # Sensor 1 controls toplighted area
    sensor_1_frac = areas['toplighted_area'] / space_area_m2
    sensor_1_window = sorted_skylights[0]
    # Sensor 2 controls secondary area
    sensor_2_frac = (areas['secondary_sidelighted_area'] / space_area_m2)
    sensor_2_window = sorted_windows[0]
  elsif req_top_ctrl && !req_pri_ctrl && !req_sec_ctrl
    # Sensor 1 controls toplighted area
    sensor_1_frac = areas['toplighted_area'] / space_area_m2
    sensor_1_window = sorted_skylights[0]
  elsif !req_top_ctrl && req_pri_ctrl && !req_sec_ctrl
    # Sensor 1 controls primary area
    sensor_1_frac = areas['primary_sidelighted_area'] / space_area_m2
    sensor_1_window = sorted_windows[0]
  elsif !req_top_ctrl && !req_pri_ctrl && req_sec_ctrl
    # Sensor 1 controls secondary area
    sensor_1_frac = areas['secondary_sidelighted_area'] / space_area_m2
    sensor_1_window = sorted_windows[0]
  end

  return [sensor_1_frac, sensor_2_frac, sensor_1_window, sensor_2_window]
end