honeybee-openstudio 2.14.0 → 2.15.0

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: 5d55946adb807546ddf9ab4f0301b2e1cffb35cd8c82410ebe5356917ae477a3
4
- data.tar.gz: c514dc1640e95f715b5823850ac33473289646883fd33b1927eb956263a8243f
3
+ metadata.gz: f5a072c352d6cb78565cd3a69843d7e703121859a4684e56e193d8cc9a966e73
4
+ data.tar.gz: f8d1f957f880db62bb76c2e04fb725473353db6a09702484741a1074c5b5ed46
5
5
  SHA512:
6
- metadata.gz: 7504924fd9d88b8e6edc1f7294dffb0e8dad834d4131b269c443ffabf4c24158b4c6b64d8900acd58e4135cfb7e95b675754691d81e2ff7bf28e5e9148bbc8c9
7
- data.tar.gz: cfd4957cdeadead04d873cc4c98a2d81b701f8ad7e45aa6fe7f368e1c0f6e352062119d4ee52492efee7c8294421d60a4e18981c68a31bd2d4577134a3eccde1
6
+ metadata.gz: 38a3302f5963735d28902658dd6d55ea282a23f5b3477c3674b780724f5c4a28227cd2726e65aaab8ecb04acbeb70e8604976a1ac0df8790c7cc3986deea626b
7
+ data.tar.gz: fbdbd4fc1ced1eea8192b5e580d72b52fce7b8d96ae1136d3fbe77d3bddf5b2ea3986e263b8bb25c831b01b761e630a62d6a926b9a84acf209e6e245de2a33d4
@@ -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.14.0'
7
+ spec.version = '2.15.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,51 @@
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_gas'
33
+ require 'to_openstudio/model_object'
34
+
35
+ module Honeybee
36
+ class EnergyWindowMaterialGas
37
+
38
+ def self.from_material(material)
39
+ # create an empty hash
40
+ hash = {}
41
+ hash[:type] = 'EnergyWindowMaterialGas'
42
+ # set hash values from OpenStudio Object
43
+ hash[:identifier] = material.nameString
44
+ hash[:thickness] = material.thickness
45
+ hash[:gas_type] = material.gasType
46
+
47
+ hash
48
+ end
49
+
50
+ end # EnergyWindowMaterialGas
51
+ end # Honeybee
@@ -0,0 +1,94 @@
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_gas_custom'
33
+ require 'to_openstudio/model_object'
34
+
35
+ module Honeybee
36
+ class EnergyWindowMaterialGasCustom
37
+
38
+ def self.from_material(material)
39
+ # create an empty hash
40
+ hash = {}
41
+ hash[:type] = 'EnergyWindowMaterialGasCustom'
42
+ # set hash values from OpenStudio Object
43
+ hash[:identifier] = material.nameString
44
+ hash[:thickness] = material.thickness
45
+ # check if boost optional object is empty
46
+ unless material.customConductivityCoefficientA.empty?
47
+ hash[:conductivity_coeff_a] = material.customConductivityCoefficientA.get
48
+ end
49
+ # check if boost optional object is empty
50
+ unless material.customConductivityCoefficientB.empty?
51
+ hash[:conductivity_coeff_b] = material.customConductivityCoefficientB.get
52
+ end
53
+ # check if boost optional object is empty
54
+ unless material.customConductivityCoefficientC.empty?
55
+ hash[:conductivity_coeff_c] = material.customConductivityCoefficientC.get
56
+ end
57
+ # check if boost optional object is empty
58
+ unless material.viscosityCoefficientA.empty?
59
+ hash[:viscosity_coeff_a] = material.viscosityCoefficientA.get
60
+ end
61
+ # check if boost optional object is empty
62
+ unless material.viscosityCoefficientB.empty?
63
+ hash[:viscosity_coeff_b] = material.viscosityCoefficientB.get
64
+ end
65
+ # check if boost optional object is empty
66
+ unless material.viscosityCoefficientC.empty?
67
+ hash[:viscosity_coeff_c] = material.viscosityCoefficientC.get
68
+ end
69
+ # check if boost optional object is empty
70
+ unless material.specificHeatCoefficientA.empty?
71
+ hash[:specific_heat_coeff_a] = material.specificHeatCoefficientA.get
72
+ end
73
+ # check if boost optional object is empty
74
+ unless material.specificHeatCoefficientB.empty?
75
+ hash[:specific_heat_coeff_b] = material.specificHeatCoefficientB.get
76
+ end
77
+ # check if boost optional object is empty
78
+ unless material.specificHeatCoefficientC.empty?
79
+ hash[:specific_heat_coeff_c] = material.specificHeatCoefficientC.get
80
+ end
81
+ # check if boost optional object is empty
82
+ unless material.specificHeatRatio.empty?
83
+ hash[:specific_heat_ratio] = material.specificHeatRatio.get
84
+ end
85
+ # check if boost optional object is empty
86
+ unless material.molecularWeight.empty?
87
+ hash[:molecular_weight] = material.molecularWeight.get
88
+ end
89
+
90
+ hash
91
+ end
92
+
93
+ end # EnergyWindowMaterialGasCustom
94
+ end # Honeybee
@@ -0,0 +1,70 @@
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_gas_mixture'
33
+ require 'to_openstudio/model_object'
34
+
35
+ module Honeybee
36
+ class EnergyWindowMaterialGasMixture
37
+
38
+ def self.from_material(material)
39
+ # create an empty hash
40
+ hash = {}
41
+ hash[:type] = 'EnergyWindowMaterialGasMixture'
42
+ # set hash values from OpenStudio Object
43
+ hash[:identifier] = material.nameString
44
+ hash[:thickness] = material.thickness
45
+ hash[:gas_types] = []
46
+ hash[:gas_fractions] = []
47
+ number_of_gases = material.numberofGasesinMixture
48
+ if number_of_gases > 1
49
+ (1..number_of_gases).each do |n|
50
+ hash[:gas_types] << material.send('gas' + n.to_s + 'Type')
51
+ end
52
+ hash[:gas_fractions] << material.gas1Fraction
53
+ hash[:gas_fractions] << material.gas2Fraction
54
+ if number_of_gases > 2
55
+ unless material.gas3Fraction.empty?
56
+ hash[:gas_fractions] << material.gas3Fraction.get
57
+ end
58
+ if number_of_gases > 3
59
+ unless material.gas4Fraction.empty?
60
+ hash[:gas_fractions] << material.gas4Fraction.get
61
+ end
62
+ end
63
+ end
64
+ end
65
+
66
+ hash
67
+ end
68
+
69
+ end # EnergyWindowMaterialGasMixture
70
+ end # Honeybee
@@ -38,6 +38,9 @@ require 'from_openstudio/material/opaque_no_mass'
38
38
  require 'from_openstudio/material/window_simpleglazsys'
39
39
  require 'from_openstudio/material/window_glazing'
40
40
  require 'from_openstudio/material/window_blind'
41
+ require 'from_openstudio/material/window_gas'
42
+ require 'from_openstudio/material/window_gas_custom'
43
+ require 'from_openstudio/material/window_gas_mixture'
41
44
 
42
45
  require 'openstudio'
43
46
 
@@ -150,6 +153,20 @@ module Honeybee
150
153
  openstudio_model.getBlinds.each do |material|
151
154
  result << EnergyWindowMaterialBlind.from_material(material)
152
155
  end
156
+ openstudio_model.getGass.each do |material|
157
+ # Create HB WindowGasCustom from OpenStudio Material
158
+ if material.gasType == 'Custom'
159
+ result << EnergyWindowMaterialGasCustom.from_material(material)
160
+ else
161
+ # Create HB WindowGas from OpenStudio Material
162
+ result << EnergyWindowMaterialGas.from_material(material)
163
+ end
164
+ end
165
+ # Create HB EnergyWindowMaterialGasMixture from OpenStudio Material
166
+ openstudio_model.getGasMixtures.each do |material|
167
+ result << EnergyWindowMaterialGasMixture.from_material(material)
168
+ end
169
+
153
170
  result
154
171
  end
155
172
 
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.14.0
4
+ version: 2.15.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-07 00:00:00.000000000 Z
14
+ date: 2021-04-27 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: json_pure
@@ -92,6 +92,9 @@ files:
92
92
  - lib/from_openstudio/material/opaque.rb
93
93
  - lib/from_openstudio/material/opaque_no_mass.rb
94
94
  - lib/from_openstudio/material/window_blind.rb
95
+ - lib/from_openstudio/material/window_gas.rb
96
+ - lib/from_openstudio/material/window_gas_custom.rb
97
+ - lib/from_openstudio/material/window_gas_mixture.rb
95
98
  - lib/from_openstudio/material/window_glazing.rb
96
99
  - lib/from_openstudio/material/window_simpleglazsys.rb
97
100
  - lib/from_openstudio/model.rb