honeybee-openstudio 2.31.2 → 2.31.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ddf8c7c7b9acf4094ea3a7702932246a6423fab131d5a2586b02421a81d24c16
4
- data.tar.gz: a92d03dc75bd2c562ef5bf63cf6c4f69ecf515cbe36ca3df8f4ac36abf31b92a
3
+ metadata.gz: 5b0a5a024724a6609081dcf05e2895f984636ed874dc2d0561fc99118ee5e776
4
+ data.tar.gz: fab2f18b5ab801debe5c5e673f68943897e938f6a9010c7bec5661b16c622f22
5
5
  SHA512:
6
- metadata.gz: d0fe77822120f793df5d5ed31c6d91a8ba601a9af26f6a84f21e1a618a4ef97b78b2477fc26ae99bc46894e3df708725c1c2d76497df3601f9e7c01e1920f6c1
7
- data.tar.gz: a1853e96f594d0329126e5529f87fc3694b1d8a044bb995e38831ddbd72d89af94e81a065f0dc7909be5b5b764e998dcdebfd3bcf3db4ae7da394bdd3a8ee5c6
6
+ metadata.gz: 52dd3f3163f2e2099fb58b1318b962b14224be9151929b7ad7dd5059982c8c8564fb4bbc885a556253b60b420d94bfb4bd1723385e3c48ff1079c75fa8c9532c
7
+ data.tar.gz: 18a8f4fb2f6f68f637f6969af5478ef22a96fe7c3328429833bec6b24739f57022e90920f5f17358ea2b84042c91d931b26eb7d43b653f81d2b28322a1052789
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'honeybee-openstudio'
7
- spec.version = '2.31.2'
7
+ spec.version = '2.31.6'
8
8
  spec.authors = ['Tanushree Charan', 'Dan Macumber', 'Chris Mackey', 'Mostapha Sadeghipour Roudsari']
9
9
  spec.email = ['tanushree.charan@nrel.gov', 'chris@ladybug.tools']
10
10
 
@@ -79,13 +79,17 @@ module Honeybee
79
79
  # set room energy properties
80
80
  unless space.defaultConstructionSet.empty?
81
81
  const_set = space.defaultConstructionSet.get
82
- hash[:construction_set] = const_set.nameString
82
+ c_set_name = const_set.nameString
83
+ unless c_set_name == 'Default Generic Construction Set'
84
+ hash[:construction_set] = const_set.nameString
85
+ end
83
86
  end
84
87
  unless space.spaceType.empty?
85
88
  space_type = space.spaceType.get
86
89
  hash[:program_type] = space_type.nameString
87
90
  end
88
- # TODO: These are loads assigned to the space directly. How should duplicates created in programtype, if any, be handled?
91
+ # TODO: These are only loads assigned to the space directly.
92
+ # Duplicates and other definitions created in programtype should be summed
89
93
  unless space.people.empty?
90
94
  space.people.each do |people|
91
95
  people_def = people.peopleDefinition
@@ -100,6 +104,7 @@ module Honeybee
100
104
  end
101
105
  end
102
106
  end
107
+
103
108
  unless space.lights.empty?
104
109
  space.lights.each do |light|
105
110
  light_def = light.lightsDefinition
@@ -114,6 +119,7 @@ module Honeybee
114
119
  end
115
120
  end
116
121
  end
122
+
117
123
  unless space.electricEquipment.empty?
118
124
  space.electricEquipment.each do |electric_eq|
119
125
  electric_eq_def = electric_eq.electricEquipmentDefinition
@@ -128,6 +134,7 @@ module Honeybee
128
134
  end
129
135
  end
130
136
  end
137
+
131
138
  unless space.gasEquipment.empty?
132
139
  space.gasEquipment.each do |gas_eq|
133
140
  gas_eq_def = gas_eq.gasEquipmentDefinition
@@ -142,18 +149,7 @@ module Honeybee
142
149
  end
143
150
  end
144
151
  end
145
- unless space.otherEquipment.empty?
146
- hash[:process_loads] = []
147
- space.otherEquipment.each do |other_eq|
148
- other_eq_def = other_eq.otherEquipmentDefinition
149
- if !other_eq_def.designLevel.empty? && !other_eq.schedule.empty?
150
- sch = other_eq.schedule.get
151
- if sch.to_ScheduleRuleset.is_initialized or sch.to_ScheduleFixedInterval.is_initialized
152
- hash[:process_loads] << Honeybee::ProcessAbridged.from_load(other_eq)
153
- end
154
- end
155
- end
156
- end
152
+
157
153
  unless space.spaceInfiltrationDesignFlowRates.empty?
158
154
  space.spaceInfiltrationDesignFlowRates.each do |infiltration|
159
155
  # Only translate if flow per exterior area is specified
@@ -167,17 +163,41 @@ module Honeybee
167
163
  end
168
164
  end
169
165
  end
166
+
167
+ unless space.waterUseEquipment.empty?
168
+ space.waterUseEquipment.each do |shw_equipment|
169
+ # Check if schedule exists and is of the correct type
170
+ unless shw_equipment.flowRateFractionSchedule.empty?
171
+ sch = shw_equipment.flowRateFractionSchedule.get
172
+ if sch.to_ScheduleRuleset.is_initialized or sch.to_ScheduleFixedInterval.is_initialized
173
+ floor_area = space.floorArea # Get floor area
174
+ hash[:service_hot_water] = Honeybee::ServiceHotWaterAbridged.from_load(shw_equipment, floor_area)
175
+ end
176
+ end
177
+ end
178
+ end
179
+
170
180
  unless space.designSpecificationOutdoorAir.empty?
171
181
  hash[:ventilation] = Honeybee::VentilationAbridged.from_load(space.designSpecificationOutdoorAir.get)
172
182
  end
183
+
184
+ unless space.otherEquipment.empty?
185
+ hash[:process_loads] = []
186
+ space.otherEquipment.each do |other_eq|
187
+ other_eq_def = other_eq.otherEquipmentDefinition
188
+ if !other_eq_def.designLevel.empty? && !other_eq.schedule.empty?
189
+ sch = other_eq.schedule.get
190
+ if sch.to_ScheduleRuleset.is_initialized or sch.to_ScheduleFixedInterval.is_initialized
191
+ hash[:process_loads] << Honeybee::ProcessAbridged.from_load(other_eq)
192
+ end
193
+ end
194
+ end
195
+ end
196
+
173
197
  unless space.daylightingControls.empty?
174
198
  hash[:daylighting_control] = Honeybee::DaylightingControl.from_load(space.daylightingControls[0])
175
199
  end
176
- unless space.waterUseEquipment.empty?
177
- # Get floor area
178
- floor_area = space.floorArea
179
- hash[:service_hot_water] = Honeybee::ServiceHotWaterAbridged.from_load(space.waterUseEquipment[0], floor_area)
180
- end
200
+
181
201
  thermal_zone = space.thermalZone
182
202
  unless thermal_zone.empty?
183
203
  thermal_zone = space.thermalZone.get
@@ -41,17 +41,14 @@ module Honeybee
41
41
  hash[:type] = 'ServiceHotWaterAbridged'
42
42
  # set hash values from OpenStudio Object
43
43
  hash[:identifier] = clean_name(load.nameString)
44
- load_def = load.WaterUseEquipmentDefinition
44
+ load_def = load.waterUseEquipmentDefinition
45
45
  # units of peak flow rate are m3/s
46
46
  peak_flow = load_def.peakFlowRate
47
47
  # unit for flow per area is L/h-m2 (m3/s = 3600000 L/h)
48
- hash[:flow_per_area] = (peak_flow * 3600000)/floor_area
49
- unless load_def.flowRateFractionSchedule.empty?
50
- sch = load_def.flowRateFractionSchedule
51
- # Translate only Scheudle Ruleset and Schedule Fixed Interval
52
- if sch.to_ScheduleRuleset.is_initialized or sch.to_ScheduleFixedInterval.is_initialized
53
- hash[:schedule] = load_def.flowRateFractionSchedule.get.nameString
54
- end
48
+ hash[:flow_per_area] = (peak_flow * 3600000) / floor_area
49
+ unless load.flowRateFractionSchedule.empty?
50
+ schedule = load.flowRateFractionSchedule.get
51
+ hash[:schedule] = schedule.nameString
55
52
  end
56
53
 
57
54
  hash
@@ -52,6 +52,7 @@ module Honeybee
52
52
  @@extension ||= Extension.new
53
53
  @@schema ||= @@extension.schema
54
54
  @@standards ||= @@extension.standards
55
+ $triangulate_sub_faces = false
55
56
  $simple_window_cons = false
56
57
 
57
58
  @hash = hash
@@ -54,7 +54,7 @@ module Honeybee
54
54
  final_vertices_list = []
55
55
  matching_os_subsurfaces = []
56
56
  matching_os_subsurface_indices = []
57
- if os_vertices.size > 4
57
+ if $triangulate_sub_faces && os_vertices.size > 4
58
58
 
59
59
  # if this apeture has a matched apeture, see if the other one has already been created
60
60
  # the matched apeture should have been converted to multiple subsurfaces
@@ -197,6 +197,16 @@ module Honeybee
197
197
  end
198
198
  end
199
199
 
200
+ # add a transmittance schedule if a value is found
201
+ if @hash[:transmit]
202
+ schedule_identifier = 'Constant ' + @hash[:transmit] + ' Transmittance'
203
+ schedule = openstudio_model.getScheduleByName(schedule_identifier)
204
+ unless schedule.empty?
205
+ os_schedule = schedule.get
206
+ os_shading_surface.setTransmittanceSchedule(os_schedule)
207
+ end
208
+ end
209
+
200
210
  # add the shade to the group
201
211
  os_shading_surface.setShadingSurfaceGroup(shading_surface_group)
202
212
 
@@ -54,7 +54,7 @@ module Honeybee
54
54
  final_vertices_list = []
55
55
  matching_os_subsurfaces = []
56
56
  matching_os_subsurface_indices = []
57
- if os_vertices.size > 4
57
+ if $triangulate_sub_faces && os_vertices.size > 4
58
58
 
59
59
  # if this door has a matched door, see if the other one has already been created
60
60
  # the matched door should have been converted to multiple subsurfaces
@@ -193,6 +193,16 @@ module Honeybee
193
193
  end
194
194
  end
195
195
 
196
+ # add a transmittance schedule if a value is found
197
+ if @hash[:transmit]
198
+ schedule_identifier = 'Constant ' + @hash[:transmit] + ' Transmittance'
199
+ schedule = openstudio_model.getScheduleByName(schedule_identifier)
200
+ unless schedule.empty?
201
+ os_schedule = schedule.get
202
+ os_shading_surface.setTransmittanceSchedule(os_schedule)
203
+ end
204
+ end
205
+
196
206
  # add the shade to the group
197
207
  os_shading_surface.setShadingSurfaceGroup(shading_surface_group)
198
208
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honeybee-openstudio
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.31.2
4
+ version: 2.31.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanushree Charan
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2022-04-05 00:00:00.000000000 Z
14
+ date: 2022-04-29 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler