honeybee-openstudio 2.17.5 → 2.20.0

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.
@@ -34,7 +34,7 @@ require 'honeybee/model_object'
34
34
  module Honeybee
35
35
  class ConstructionSetAbridged < ModelObject
36
36
 
37
- def defaults
37
+ def self.defaults
38
38
  @@schema[:components][:schemas][:ConstructionSetAbridged][:properties]
39
39
  end
40
40
 
@@ -0,0 +1,42 @@
1
+ # *******************************************************************************
2
+ # Honeybee OpenStudio Gem, Copyright (c) 2020, Alliance for Sustainable
3
+ # Energy, LLC, Ladybug Tools LLC and other contributors. All rights reserved.
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without
6
+ # modification, are permitted provided that the following conditions are met:
7
+ #
8
+ # (1) Redistributions of source code must retain the above copyright notice,
9
+ # this list of conditions and the following disclaimer.
10
+ #
11
+ # (2) Redistributions in binary form must reproduce the above copyright notice,
12
+ # this list of conditions and the following disclaimer in the documentation
13
+ # and/or other materials provided with the distribution.
14
+ #
15
+ # (3) Neither the name of the copyright holder nor the names of any contributors
16
+ # may be used to endorse or promote products derived from this software without
17
+ # specific prior written permission from the respective party.
18
+ #
19
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS
20
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21
+ # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE
23
+ # UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF
24
+ # THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25
+ # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
26
+ # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28
+ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29
+ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+ # *******************************************************************************
31
+
32
+ require 'honeybee/model_object'
33
+
34
+ module Honeybee
35
+ class InternalMassAbridged < ModelObject
36
+
37
+ def defaults
38
+ @@schema[:components][:schemas][:InternalMassAbridged][:properties]
39
+ end
40
+
41
+ end #InternalMassAbridged
42
+ end #Honeybee
@@ -34,7 +34,7 @@ require 'honeybee/model_object'
34
34
  module Honeybee
35
35
  class EnergyMaterialNoMass < ModelObject
36
36
 
37
- def defaults
37
+ def self.defaults
38
38
  @@schema[:components][:schemas][:EnergyMaterialNoMass][:properties]
39
39
  end
40
40
 
data/lib/to_openstudio.rb CHANGED
@@ -84,10 +84,11 @@ require 'to_openstudio/schedule/type_limit'
84
84
  require 'to_openstudio/schedule/fixed_interval'
85
85
  require 'to_openstudio/schedule/ruleset'
86
86
 
87
- # import the ventilation objects
87
+ # import the ventilation and internal mass objects
88
88
  require 'to_openstudio/ventcool/control'
89
89
  require 'to_openstudio/ventcool/opening'
90
90
  require 'to_openstudio/ventcool/simulation'
91
+ require 'to_openstudio/internalmass'
91
92
 
92
93
  # extend the simulation objects
93
94
  require 'to_openstudio/simulation/design_day'
@@ -45,7 +45,7 @@ module Honeybee
45
45
  end
46
46
 
47
47
  def to_openstudio(openstudio_model)
48
- # write the shaded and unsaded versions of the construciton into the model
48
+ # write the shaded and unsaded versions of the construction into the model
49
49
  # reverse the shaded and unshaded identifiers so unshaded one is assigned to apertures
50
50
  unshd_id = @hash[:identifier]
51
51
  shd_id = @hash[:window_construction][:identifier]
@@ -140,6 +140,8 @@ module Honeybee
140
140
  @hash[:aperture_set][:window_construction])
141
141
  unless window_ref.empty?
142
142
  window_aperture = window_ref.get
143
+ #TODO: This looks wrong, it should be set to interior subsurface construction since
144
+ #window_construction apertures have a surface boundary condition.
143
145
  ext_subsurf_const.setFixedWindowConstruction(window_aperture)
144
146
  end
145
147
  end
@@ -180,7 +180,7 @@ module Honeybee
180
180
 
181
181
  if !face[:properties][:energy][:construction]
182
182
  if face[:boundary_condition][:type] == 'Adiabatic'
183
- # assign default interior construciton for Adiabatic Faces
183
+ # assign default interior construction for Adiabatic Faces
184
184
  if face[:face_type] != 'Wall'
185
185
  interior_construction = closest_interior_construction(openstudio_model, os_space, face[:face_type])
186
186
  unless interior_construction.nil?
@@ -188,7 +188,7 @@ module Honeybee
188
188
  end
189
189
  end
190
190
  elsif face[:face_type] == 'AirBoundary'
191
- # assign default air boundary construciton for AirBoundary face types
191
+ # assign default air boundary construction for AirBoundary face types
192
192
  air_construction = closest_air_construction(openstudio_model, os_space)
193
193
  unless air_construction.nil?
194
194
  os_surface.setConstruction(air_construction)
@@ -362,6 +362,15 @@ module Honeybee
362
362
  end
363
363
  end
364
364
 
365
+ # assign any internal masses if specified
366
+ if @hash[:properties][:energy][:internal_masses]
367
+ @hash[:properties][:energy][:internal_masses].each do |int_mass|
368
+ hb_int_mass = InternalMassAbridged.new(int_mass)
369
+ os_int_mass = hb_int_mass.to_openstudio(openstudio_model, os_space)
370
+ os_int_mass.setSpace(os_space)
371
+ end
372
+ end
373
+
365
374
  os_space
366
375
  end
367
376
 
@@ -0,0 +1,56 @@
1
+ # *******************************************************************************
2
+ # Honeybee OpenStudio Gem, Copyright (c) 2020, Alliance for Sustainable
3
+ # Energy, LLC, Ladybug Tools LLC and other contributors. All rights reserved.
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without
6
+ # modification, are permitted provided that the following conditions are met:
7
+ #
8
+ # (1) Redistributions of source code must retain the above copyright notice,
9
+ # this list of conditions and the following disclaimer.
10
+ #
11
+ # (2) Redistributions in binary form must reproduce the above copyright notice,
12
+ # this list of conditions and the following disclaimer in the documentation
13
+ # and/or other materials provided with the distribution.
14
+ #
15
+ # (3) Neither the name of the copyright holder nor the names of any contributors
16
+ # may be used to endorse or promote products derived from this software without
17
+ # specific prior written permission from the respective party.
18
+ #
19
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS
20
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21
+ # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE
23
+ # UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF
24
+ # THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25
+ # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
26
+ # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28
+ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29
+ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+ # *******************************************************************************
31
+
32
+ require 'to_openstudio/model_object'
33
+
34
+ module Honeybee
35
+ class InternalMassAbridged
36
+
37
+ def to_openstudio(openstudio_model, parent)
38
+ # create the internal mass definition and set properties
39
+ os_mass_def = OpenStudio::Model::InternalMassDefinition.new(openstudio_model)
40
+ os_mass_def.setName(@hash[:identifier] + '::' + parent.name.get)
41
+ os_mass_def.setSurfaceArea(@hash[:area])
42
+ construction = openstudio_model.getConstructionByName(@hash[:construction])
43
+ unless construction.empty?
44
+ os_construction = construction.get
45
+ os_mass_def.setConstruction(os_construction)
46
+ end
47
+
48
+ # assign the internal mass definition to an internal mass object
49
+ os_mass = OpenStudio::Model::InternalMass.new(os_mass_def)
50
+ os_mass.setName(@hash[:identifier] + '::' + parent.name.get)
51
+
52
+ os_mass
53
+ end
54
+
55
+ end #InternalMassAbridged
56
+ end #Honeybee
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.17.5
4
+ version: 2.20.0
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-05-26 00:00:00.000000000 Z
14
+ date: 2021-07-02 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -168,6 +168,11 @@ files:
168
168
  - lib/files/reopt_assumptions.json
169
169
  - lib/files/urbanopt_Gemfile
170
170
  - lib/from_openstudio.rb
171
+ - lib/from_openstudio/construction/air.rb
172
+ - lib/from_openstudio/construction/opaque.rb
173
+ - lib/from_openstudio/construction/shade.rb
174
+ - lib/from_openstudio/construction/window.rb
175
+ - lib/from_openstudio/construction_set.rb
171
176
  - lib/from_openstudio/geometry/aperture.rb
172
177
  - lib/from_openstudio/geometry/door.rb
173
178
  - lib/from_openstudio/geometry/face.rb
@@ -204,6 +209,7 @@ files:
204
209
  - lib/honeybee/geometry/shade.rb
205
210
  - lib/honeybee/hvac/ideal_air.rb
206
211
  - lib/honeybee/hvac/template.rb
212
+ - lib/honeybee/internalmass.rb
207
213
  - lib/honeybee/load/daylight.rb
208
214
  - lib/honeybee/load/electric_equipment.rb
209
215
  - lib/honeybee/load/gas_equipment.rb
@@ -281,6 +287,7 @@ files:
281
287
  - lib/to_openstudio/hvac/Model.hvac.rb
282
288
  - lib/to_openstudio/hvac/ideal_air.rb
283
289
  - lib/to_openstudio/hvac/template.rb
290
+ - lib/to_openstudio/internalmass.rb
284
291
  - lib/to_openstudio/load/daylight.rb
285
292
  - lib/to_openstudio/load/electric_equipment.rb
286
293
  - lib/to_openstudio/load/gas_equipment.rb