honeybee-openstudio 2.13.0 → 2.14.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8417eb10e76c159ec8adbacab8126682eb77278cf095b04367e175c5a57ff292
4
- data.tar.gz: f09a65c2594eb732ed3bf5b865b6e041a5a3915e075ffe9345fcc06eb8fb7476
3
+ metadata.gz: 5d55946adb807546ddf9ab4f0301b2e1cffb35cd8c82410ebe5356917ae477a3
4
+ data.tar.gz: c514dc1640e95f715b5823850ac33473289646883fd33b1927eb956263a8243f
5
5
  SHA512:
6
- metadata.gz: 2c287c6581410d0b56c0d7dca54768dca173ffdd28a07a3b673b4a39e54d013129ccd73297009a9e4a87669b2a12a14b713a5d89a1950c2e555d985b3bb68341
7
- data.tar.gz: 97a86eaaadeb4554c99695686893819cd04035291e569ef5aa4113bde53174a8514b89d866c4e8da46aed9341ad7cc60dd30f9aa925aff9cecc7fcdd26f524eb
6
+ metadata.gz: 7504924fd9d88b8e6edc1f7294dffb0e8dad834d4131b269c443ffabf4c24158b4c6b64d8900acd58e4135cfb7e95b675754691d81e2ff7bf28e5e9148bbc8c9
7
+ data.tar.gz: cfd4957cdeadead04d873cc4c98a2d81b701f8ad7e45aa6fe7f368e1c0f6e352062119d4ee52492efee7c8294421d60a4e18981c68a31bd2d4577134a3eccde1
@@ -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.13.0'
7
+ spec.version = '2.14.0'
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
 
@@ -0,0 +1,78 @@
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/material/window_blind'
33
+ require 'to_openstudio/model_object'
34
+
35
+ module Honeybee
36
+ class EnergyWindowMaterialBlind
37
+
38
+ def self.from_material(material)
39
+ # create an empty hash
40
+ hash = {}
41
+ hash[:type] = 'EnergyWindowMaterialBlind'
42
+ # set hash values from OpenStudio Object
43
+ hash[:identifier] = material.nameString
44
+ hash[:slat_orientation] = material.slatOrientation
45
+ hash[:slat_width] = material.slatWidth
46
+ hash[:slat_separation] = material.slatSeparation
47
+ hash[:slat_thickness] = material.slatThickness
48
+ hash[:slat_width] = material.slatWidth
49
+ hash[:slat_angle] = material.slatAngle
50
+ hash[:slat_conductivity] = material.slatConductivity
51
+ hash[:beam_solar_transmittance] = material.slatBeamSolarTransmittance
52
+ hash[:beam_solar_reflectance] = material.frontSideSlatBeamSolarReflectance
53
+ hash[:beam_solar_reflectance_back] = material.backSideSlatBeamSolarReflectance
54
+ hash[:diffuse_solar_reflectance] = material.frontSideSlatDiffuseSolarReflectance
55
+ hash[:diffuse_solar_reflectance_back] = material.backSideSlatDiffuseSolarReflectance
56
+ hash[:diffuse_visible_transmittance] = material.slatDiffuseVisibleTransmittance
57
+ # check if boost optional object is empty
58
+ unless material.frontSideSlatDiffuseVisibleReflectance.nil?
59
+ hash[:diffuse_visible_reflectance] = material.frontSideSlatDiffuseVisibleReflectance.get
60
+ end
61
+ # check if boost optional object is empty
62
+ unless material.backSideSlatDiffuseVisibleReflectance.nil?
63
+ hash[:diffuse_visible_reflectance_back] = material.backSideSlatDiffuseVisibleReflectance.get
64
+ end
65
+ hash[:infrared_transmittance] = material.slatInfraredHemisphericalTransmittance
66
+ hash[:emissivity] = material.frontSideSlatInfraredHemisphericalEmissivity
67
+ hash[:emissivity_back] = material.backSideSlatInfraredHemisphericalEmissivity
68
+ hash[:distance_to_glass] = material.blindtoGlassDistance
69
+ hash[:top_opening_multiplier] = material.blindTopOpeningMultiplier
70
+ hash[:bottom_opening_multiplier] = material.blindBottomOpeningMultiplier
71
+ hash[:left_opening_multiplier] = material.blindLeftSideOpeningMultiplier
72
+ hash[:right_opening_multiplier] = material.blindRightSideOpeningMultiplier
73
+
74
+ hash
75
+ end
76
+
77
+ end # EnergyWindowMaterialBlind
78
+ end # Honeybee
@@ -0,0 +1,77 @@
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/material/window_glazing'
33
+ require 'to_openstudio/model_object'
34
+
35
+ module Honeybee
36
+ class EnergyWindowMaterialGlazing
37
+
38
+ def self.from_material(material)
39
+ # create an empty hash
40
+ hash = {}
41
+ hash[:type] = 'EnergyWindowMaterialGlazing'
42
+ # set hash values from OpenStudio Object
43
+ hash[:identifier] = material.nameString
44
+ hash[:thickness] = material.thickness
45
+ hash[:solar_transmittance] = material.solarTransmittance
46
+ # check if boost optional object is empty
47
+ unless material.frontSideSolarReflectanceatNormalIncidence.empty?
48
+ hash[:solar_reflectance] = material.frontSideSolarReflectanceatNormalIncidence.get
49
+ end
50
+ # check if boost optional object is empty
51
+ unless material.backSideSolarReflectanceatNormalIncidence.empty?
52
+ hash[:solar_reflectance_back] = material.backSideSolarReflectanceatNormalIncidence.get
53
+ end
54
+ # check if boost optional object is empty
55
+ unless material.visibleTransmittanceatNormalIncidence.empty?
56
+ hash[:visible_transmittance] = material.visibleTransmittanceatNormalIncidence.get
57
+ end
58
+ # check if boost optional object is empty
59
+ unless material.frontSideVisibleReflectanceatNormalIncidence.empty?
60
+ hash[:visible_reflectance] = material.frontSideVisibleReflectanceatNormalIncidence.get
61
+ end
62
+ # check if boost optional object is empty
63
+ unless material.backSideVisibleReflectanceatNormalIncidence.empty?
64
+ hash[:visible_reflectance_back] = material.backSideVisibleReflectanceatNormalIncidence
65
+ end
66
+ hash[:infrared_transmittance] = material.infraredTransmittance
67
+ hash[:emissivity] = material.frontSideInfraredHemisphericalEmissivity
68
+ hash[:emissivity_back] = material.backSideInfraredHemisphericalEmissivity
69
+ hash[:conductivity] = material.thermalConductivity
70
+ hash[:dirt_correction] = material.dirtCorrectionFactorforSolarandVisibleTransmittance
71
+ hash[:solar_diffusing] = material.solarDiffusing
72
+
73
+ hash
74
+ end
75
+
76
+ end # EnergyWindowMaterialGlazing
77
+ end # Honeybee
@@ -36,7 +36,8 @@ require 'from_openstudio/geometry/shade'
36
36
  require 'from_openstudio/material/opaque'
37
37
  require 'from_openstudio/material/opaque_no_mass'
38
38
  require 'from_openstudio/material/window_simpleglazsys'
39
-
39
+ require 'from_openstudio/material/window_glazing'
40
+ require 'from_openstudio/material/window_blind'
40
41
 
41
42
  require 'openstudio'
42
43
 
@@ -141,6 +142,14 @@ module Honeybee
141
142
  openstudio_model.getSimpleGlazings.each do |material|
142
143
  result << EnergyWindowMaterialSimpleGlazSys.from_material(material)
143
144
  end
145
+ # Create HB EnergyWindowMaterialGlazing from OpenStudio Material
146
+ openstudio_model.getStandardGlazings.each do |material|
147
+ result << EnergyWindowMaterialGlazing.from_material(material)
148
+ end
149
+ # Create HB EnergyWindowMaterialBlind from OpenStudio Material
150
+ openstudio_model.getBlinds.each do |material|
151
+ result << EnergyWindowMaterialBlind.from_material(material)
152
+ end
144
153
  result
145
154
  end
146
155
 
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.13.0
4
+ version: 2.14.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-04-01 00:00:00.000000000 Z
14
+ date: 2021-04-07 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: json_pure
@@ -91,6 +91,8 @@ files:
91
91
  - lib/from_openstudio/geometry/shade.rb
92
92
  - lib/from_openstudio/material/opaque.rb
93
93
  - lib/from_openstudio/material/opaque_no_mass.rb
94
+ - lib/from_openstudio/material/window_blind.rb
95
+ - lib/from_openstudio/material/window_glazing.rb
94
96
  - lib/from_openstudio/material/window_simpleglazsys.rb
95
97
  - lib/from_openstudio/model.rb
96
98
  - lib/from_openstudio/model_object.rb