honeybee-openstudio 2.28.1 → 2.28.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f46d6897c585ff7082971de6ff24b62e1d4213697bb9e3fb08a9b4eefd069a6d
4
- data.tar.gz: 4c231dc4b6622e5d9871eddb54e6b6e32ebb5302183372845ea690552f0407f3
3
+ metadata.gz: ad5296dcafd3fc2be5c3dd7262a6486cc032cc343e8f9096928ba1a8a2d44e31
4
+ data.tar.gz: c59e93091733132e6e6a3e285318a216f0908a78666ec9ae0d93e89eab0e301f
5
5
  SHA512:
6
- metadata.gz: 8a9192fca6bf36375576eb5fd7efb3f104e4ed34b2607e8d80c36ce60f272cdd7c62b1badb4a43f1c0daa0e813b63e5dffc407e25032172c045d7523b5f05e7d
7
- data.tar.gz: e2533183332b489d8ba275feddf184c56f7cdca3a5bb561ce9ae7ad6af3177b9983b57872a1623c316a1d4b3ddea060dec1ab2714429edbe1a450928c5a5bb01
6
+ metadata.gz: 1244240f77dc03a0806835535e7fd9f5f0c2e75753b52cdafcdd8ca73e8affec5c78d3bb281d33ace2c0cada3ebab33e56772b28b0209aaddc2ca9321dafd145
7
+ data.tar.gz: 846365ff7d278a183d8c91b401d65ab2a81112b55c5b1bd01f4799b37cca2e1985f633635a05894df015fc6364a99f57c3137a7182928da7ace34ce27ed8e1e8
@@ -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.28.1'
7
+ spec.version = '2.28.5'
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
 
@@ -9,7 +9,7 @@ if allow_local && File.exist?('../openstudio-common-measures-gem')
9
9
  elsif allow_local
10
10
  gem 'openstudio-common-measures', github: 'NREL/openstudio-common-measures-gem', branch: 'develop'
11
11
  else
12
- gem 'openstudio-common-measures', '~> 0.4.0'
12
+ gem 'openstudio-common-measures', '~> 0.5.0'
13
13
  end
14
14
 
15
15
  if allow_local && File.exist?('../openstudio-model-articulation-gem')
@@ -17,7 +17,7 @@ if allow_local && File.exist?('../openstudio-model-articulation-gem')
17
17
  elsif allow_local
18
18
  gem 'openstudio-model-articulation', github: 'NREL/openstudio-model-articulation-gem', branch: 'develop'
19
19
  else
20
- gem 'openstudio-model-articulation', '0.4.0'
20
+ gem 'openstudio-model-articulation', '0.5.0'
21
21
  end
22
22
 
23
23
  if allow_local && File.exist?('../urbanopt-geojson-gem')
@@ -25,7 +25,7 @@ if allow_local && File.exist?('../urbanopt-geojson-gem')
25
25
  elsif allow_local
26
26
  gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
27
27
  else
28
- gem 'urbanopt-geojson', '~> 0.6.1'
28
+ gem 'urbanopt-geojson', '~> 0.7.0'
29
29
  end
30
30
 
31
31
  if allow_local && File.exist?('../urbanopt-reporting-gem')
@@ -33,8 +33,8 @@ if allow_local && File.exist?('../urbanopt-reporting-gem')
33
33
  elsif allow_local
34
34
  gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop'
35
35
  else
36
- gem 'urbanopt-reporting', '~> 0.4.0'
36
+ gem 'urbanopt-reporting', '~> 0.5.0'
37
37
  end
38
38
 
39
39
  # include the honeybee-openstudio-gem
40
- gem 'honeybee-openstudio', '2.27.0'
40
+ gem 'honeybee-openstudio', '2.28.4'
@@ -205,8 +205,12 @@ module Honeybee
205
205
 
206
206
  # assign any air boundary constructions to construction set
207
207
  if @hash[:air_boundary_construction]
208
- air_ref = openstudio_model.getConstructionAirBoundaryByName(
209
- @hash[:air_boundary_construction])
208
+ air_ref = openstudio_model.getConstructionAirBoundaryByName(@hash[:air_boundary_construction])
209
+ unless air_ref.empty?
210
+ air_construction = air_ref.get
211
+ os_constr_set.setInteriorPartitionConstruction(air_construction)
212
+ end
213
+ air_ref = openstudio_model.getConstructionByName(@hash[:air_boundary_construction])
210
214
  unless air_ref.empty?
211
215
  air_construction = air_ref.get
212
216
  os_constr_set.setInteriorPartitionConstruction(air_construction)
@@ -48,14 +48,13 @@ module Honeybee
48
48
  @hash[:geometry][:boundary].each do |vertex|
49
49
  os_vertices << OpenStudio::Point3d.new(vertex[0], vertex[1], vertex[2])
50
50
  end
51
- reordered_vertices = OpenStudio.reorderULC(os_vertices)
52
51
 
53
52
  # triangulate subsurface if neccesary
54
53
  triangulated = false
55
54
  final_vertices_list = []
56
55
  matching_os_subsurfaces = []
57
56
  matching_os_subsurface_indices = []
58
- if reordered_vertices.size > 4
57
+ if os_vertices.size > 4
59
58
 
60
59
  # if this apeture has a matched apeture, see if the other one has already been created
61
60
  # the matched apeture should have been converted to multiple subsurfaces
@@ -75,9 +74,9 @@ module Honeybee
75
74
  if final_vertices_list.empty?
76
75
 
77
76
  # transform to face coordinates
78
- t = OpenStudio::Transformation::alignFace(reordered_vertices)
77
+ t = OpenStudio::Transformation::alignFace(os_vertices)
79
78
  tInv = t.inverse
80
- face_vertices = OpenStudio::reverse(tInv*reordered_vertices)
79
+ face_vertices = OpenStudio::reverse(tInv*os_vertices)
81
80
 
82
81
  # no holes in the subsurface
83
82
  holes = OpenStudio::Point3dVectorVector.new
@@ -85,7 +84,7 @@ module Honeybee
85
84
  # triangulate surface
86
85
  triangles = OpenStudio::computeTriangulation(face_vertices, holes)
87
86
  if triangles.empty?
88
- raise "Failed to triangulate aperture #{@hash[:identifier]} with #{reordered_vertices.size} vertices"
87
+ raise "Failed to triangulate aperture #{@hash[:identifier]} with #{os_vertices.size} vertices"
89
88
  end
90
89
 
91
90
  # create new list of surfaces
@@ -98,13 +97,13 @@ module Honeybee
98
97
  end
99
98
 
100
99
  else
101
- # reordered_vertices are good as is
102
- final_vertices_list << reordered_vertices
100
+ # os_vertices are good as is
101
+ final_vertices_list << os_vertices
103
102
  end
104
103
 
105
104
  result = []
106
- final_vertices_list.each_with_index do |reordered_vertices, index|
107
- os_subsurface = OpenStudio::Model::SubSurface.new(reordered_vertices, openstudio_model)
105
+ final_vertices_list.each_with_index do |os_vertices, index|
106
+ os_subsurface = OpenStudio::Model::SubSurface.new(os_vertices, openstudio_model)
108
107
 
109
108
  if !matching_os_subsurfaces.empty?
110
109
  os_subsurface.setName(@hash[:identifier] + "..#{matching_os_subsurface_indices[index]}")
@@ -174,9 +173,8 @@ module Honeybee
174
173
  hb_verts.each do |vertex|
175
174
  os_vertices << OpenStudio::Point3d.new(vertex[0], vertex[1], vertex[2])
176
175
  end
177
- reordered_vertices = OpenStudio.reorderULC(os_vertices)
178
176
 
179
- os_shading_surface = OpenStudio::Model::ShadingSurface.new(reordered_vertices, openstudio_model)
177
+ os_shading_surface = OpenStudio::Model::ShadingSurface.new(os_vertices, openstudio_model)
180
178
  os_shading_surface.setName(@hash[:identifier])
181
179
  unless @hash[:display_name].nil?
182
180
  os_shading_surface.setDisplayName(@hash[:display_name])
@@ -48,14 +48,13 @@ module Honeybee
48
48
  @hash[:geometry][:boundary].each do |vertex|
49
49
  os_vertices << OpenStudio::Point3d.new(vertex[0], vertex[1], vertex[2])
50
50
  end
51
- reordered_vertices = OpenStudio.reorderULC(os_vertices)
52
51
 
53
52
  # triangulate subsurface if neccesary
54
53
  triangulated = false
55
54
  final_vertices_list = []
56
55
  matching_os_subsurfaces = []
57
56
  matching_os_subsurface_indices = []
58
- if reordered_vertices.size > 4
57
+ if os_vertices.size > 4
59
58
 
60
59
  # if this door has a matched door, see if the other one has already been created
61
60
  # the matched door should have been converted to multiple subsurfaces
@@ -75,9 +74,9 @@ module Honeybee
75
74
  if final_vertices_list.empty?
76
75
 
77
76
  # transform to face coordinates
78
- t = OpenStudio::Transformation::alignFace(reordered_vertices)
77
+ t = OpenStudio::Transformation::alignFace(os_vertices)
79
78
  tInv = t.inverse
80
- face_vertices = OpenStudio::reverse(tInv*reordered_vertices)
79
+ face_vertices = OpenStudio::reverse(tInv*os_vertices)
81
80
 
82
81
  # no holes in the subsurface
83
82
  holes = OpenStudio::Point3dVectorVector.new
@@ -85,7 +84,7 @@ module Honeybee
85
84
  # triangulate surface
86
85
  triangles = OpenStudio::computeTriangulation(face_vertices, holes)
87
86
  if triangles.empty?
88
- raise "Failed to triangulate door #{@hash[:identifier]} with #{reordered_vertices.size} vertices"
87
+ raise "Failed to triangulate door #{@hash[:identifier]} with #{os_vertices.size} vertices"
89
88
  end
90
89
 
91
90
  # create new list of surfaces
@@ -98,13 +97,13 @@ module Honeybee
98
97
  end
99
98
 
100
99
  else
101
- # reordered_vertices are good as is
102
- final_vertices_list << reordered_vertices
100
+ # os_vertices are good as is
101
+ final_vertices_list << os_vertices
103
102
  end
104
103
 
105
104
  result = []
106
- final_vertices_list.each_with_index do |reordered_vertices, index|
107
- os_subsurface = OpenStudio::Model::SubSurface.new(reordered_vertices, openstudio_model)
105
+ final_vertices_list.each_with_index do |os_vertices, index|
106
+ os_subsurface = OpenStudio::Model::SubSurface.new(os_vertices, openstudio_model)
108
107
 
109
108
  if !matching_os_subsurfaces.empty?
110
109
  os_subsurface.setName(@hash[:identifier] + "..#{matching_os_subsurface_indices[index]}")
@@ -168,9 +167,8 @@ module Honeybee
168
167
  hb_verts.each do |vertex|
169
168
  os_vertices << OpenStudio::Point3d.new(vertex[0], vertex[1], vertex[2])
170
169
  end
171
- reordered_vertices = OpenStudio.reorderULC(os_vertices)
172
170
 
173
- os_shading_surface = OpenStudio::Model::ShadingSurface.new(reordered_vertices, openstudio_model)
171
+ os_shading_surface = OpenStudio::Model::ShadingSurface.new(os_vertices, openstudio_model)
174
172
  os_shading_surface.setName(@hash[:identifier])
175
173
  unless @hash[:display_name].nil?
176
174
  os_shading_surface.setDisplayName(@hash[:display_name])
@@ -55,10 +55,9 @@ module Honeybee
55
55
  hb_verts.each do |vertex|
56
56
  os_vertices << OpenStudio::Point3d.new(vertex[0], vertex[1], vertex[2])
57
57
  end
58
- reordered_vertices = OpenStudio.reorderULC(os_vertices)
59
58
 
60
59
  # create the openstudio surface and assign the type
61
- os_surface = OpenStudio::Model::Surface.new(reordered_vertices, openstudio_model)
60
+ os_surface = OpenStudio::Model::Surface.new(os_vertices, openstudio_model)
62
61
  os_surface.setName(@hash[:identifier])
63
62
  unless @hash[:display_name].nil?
64
63
  os_surface.setDisplayName(@hash[:display_name])
@@ -198,9 +197,8 @@ module Honeybee
198
197
  hb_verts.each do |vertex|
199
198
  os_vertices << OpenStudio::Point3d.new(vertex[0], vertex[1], vertex[2])
200
199
  end
201
- reordered_vertices = OpenStudio.reorderULC(os_vertices)
202
200
 
203
- os_shading_surface = OpenStudio::Model::ShadingSurface.new(reordered_vertices, openstudio_model)
201
+ os_shading_surface = OpenStudio::Model::ShadingSurface.new(os_vertices, openstudio_model)
204
202
  os_shading_surface.setName(@hash[:identifier])
205
203
  unless @hash[:display_name].nil?
206
204
  os_shading_surface.setDisplayName(@hash[:display_name])
@@ -189,6 +189,7 @@ module Honeybee
189
189
  end
190
190
  end
191
191
 
192
+ # assign interior constructions for adiabatic Faces
192
193
  if !face[:properties][:energy][:construction]
193
194
  if face[:boundary_condition][:type] == 'Adiabatic'
194
195
  # assign default interior construction for Adiabatic Faces
@@ -198,28 +199,38 @@ module Honeybee
198
199
  os_surface.setConstruction(interior_construction)
199
200
  end
200
201
  end
201
- elsif face[:face_type] == 'AirBoundary'
202
- # assign default air boundary construction for AirBoundary face types
203
- air_construction = closest_air_construction(openstudio_model, os_space)
202
+ end
203
+ end
204
+
205
+ # assign air boundaries
206
+ if face[:face_type] == 'AirBoundary'
207
+ # assign default air boundary construction for AirBoundary face types
208
+ air_construction = closest_air_construction(openstudio_model, os_space)
209
+ if !face[:properties][:energy][:construction]
204
210
  unless air_construction.nil?
205
211
  os_surface.setConstruction(air_construction)
206
212
  end
207
- # add air mixing properties to the global list that tracks them
208
- if $use_simple_vent # only use air mixing objects when simple ventilation is requested
209
- air_hash = $air_boundary_hash[air_construction.name.to_s]
210
- if air_hash[:air_mixing_per_area]
211
- air_mix_area = air_hash[:air_mixing_per_area]
212
- else
213
- air_default = @@schema[:components][:schemas][:AirBoundaryConstructionAbridged]
214
- air_mix_area = air_default[:properties][:air_mixing_per_area][:default]
215
- end
216
- flow_rate = os_surface.netArea * air_mix_area
213
+ end
214
+ # add air mixing properties to the global list that tracks them
215
+ if $use_simple_vent # only use air mixing objects when simple ventilation is requested
216
+ air_hash = $air_boundary_hash[air_construction.name.to_s]
217
+ if air_hash && air_hash[:air_mixing_per_area]
218
+ air_mix_area = air_hash[:air_mixing_per_area]
219
+ else
220
+ air_default = @@schema[:components][:schemas][:AirBoundaryConstructionAbridged]
221
+ air_mix_area = air_default[:properties][:air_mixing_per_area][:default]
222
+ end
223
+ flow_rate = os_surface.netArea * air_mix_area
224
+ if air_hash
217
225
  flow_sch_id = air_hash[:air_mixing_schedule]
218
- adj_zone_id = face[:boundary_condition][:boundary_condition_objects][-1]
219
- $air_mxing_array << [os_thermal_zone, flow_rate, flow_sch_id, adj_zone_id]
226
+ else
227
+ flow_sch_id = 'Always On'
220
228
  end
229
+ adj_zone_id = face[:boundary_condition][:boundary_condition_objects][-1]
230
+ $air_mxing_array << [os_thermal_zone, flow_rate, flow_sch_id, adj_zone_id]
221
231
  end
222
232
  end
233
+
223
234
  end
224
235
 
225
236
  # assign any room-level outdoor shades if they exist
@@ -55,9 +55,8 @@ module Honeybee
55
55
  hb_verts.each do |vertex|
56
56
  os_vertices << OpenStudio::Point3d.new(vertex[0], vertex[1], vertex[2])
57
57
  end
58
- reordered_vertices = OpenStudio.reorderULC(os_vertices)
59
58
 
60
- os_shading_surface = OpenStudio::Model::ShadingSurface.new(reordered_vertices, openstudio_model)
59
+ os_shading_surface = OpenStudio::Model::ShadingSurface.new(os_vertices, openstudio_model)
61
60
  os_shading_surface.setName(@hash[:identifier])
62
61
  unless @hash[:display_name].nil?
63
62
  os_shading_surface.setDisplayName(@hash[:display_name])
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.28.1
4
+ version: 2.28.5
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: 2021-12-06 00:00:00.000000000 Z
14
+ date: 2022-01-02 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler