honeybee-openstudio 2.13.0 → 2.16.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/honeybee-openstudio.gemspec +1 -1
- data/lib/from_openstudio/geometry/aperture.rb +1 -1
- data/lib/from_openstudio/geometry/door.rb +1 -1
- data/lib/from_openstudio/geometry/face.rb +1 -1
- data/lib/from_openstudio/geometry/room.rb +1 -1
- data/lib/from_openstudio/geometry/shade.rb +2 -2
- data/lib/from_openstudio/material/window_blind.rb +78 -0
- data/lib/from_openstudio/material/window_gas.rb +51 -0
- data/lib/from_openstudio/material/window_gas_custom.rb +94 -0
- data/lib/from_openstudio/material/window_gas_mixture.rb +70 -0
- data/lib/from_openstudio/material/window_glazing.rb +77 -0
- data/lib/from_openstudio/model.rb +27 -1
- data/lib/honeybee/model_object.rb +1 -1
- data/lib/measures/from_gbxml_model/LICENSE.md +23 -0
- data/lib/measures/from_gbxml_model/README.md +32 -0
- data/lib/measures/from_gbxml_model/measure.rb +114 -0
- data/lib/measures/from_gbxml_model/measure.xml +131 -0
- data/lib/measures/from_gbxml_model/tests/from_gbxml_model_test.rb +107 -0
- data/lib/measures/from_idf_model/LICENSE.md +23 -0
- data/lib/measures/from_idf_model/README.md +32 -0
- data/lib/measures/from_idf_model/measure.rb +114 -0
- data/lib/measures/from_idf_model/measure.xml +110 -0
- data/lib/measures/from_idf_model/tests/from_idf_model_test.rb +107 -0
- data/lib/measures/from_openstudio_model/LICENSE.md +23 -0
- data/lib/measures/from_openstudio_model/README.md +32 -0
- data/lib/measures/from_openstudio_model/measure.rb +114 -0
- data/lib/measures/from_openstudio_model/measure.xml +95 -0
- data/lib/measures/from_openstudio_model/tests/from_openstudio_model_test.rb +107 -0
- data/lib/to_openstudio/hvac/template.rb +13 -5
- metadata +22 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3f1e79e88096584d584ea3dffc280c57fc110bbc309dde1314e7a1b43fdc4a4
|
4
|
+
data.tar.gz: 1685ab3a10833c574596ebf773331fa3618ab99cb121f52564b18f86e348d91e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ba099cce9cb4339d08a4fdb9e6238e44c8c05b33db76ca76643ebd489c4876738c8dd30ecdaf0bcb1c5849a2ecfcb909f42be8c73ac2d6dff5dda5943042fda
|
7
|
+
data.tar.gz: 644999cf2a5cdb030694434a7218da8fd5a5c65c546fbcb5b3698c8e5b3760d12c2751cbe1f65149d06634ae1eec5f5c1ad93e090e89712cce3ffa8e9ce05a82
|
data/honeybee-openstudio.gemspec
CHANGED
@@ -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.
|
7
|
+
spec.version = '2.16.2'
|
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
|
|
@@ -61,12 +61,12 @@ module Honeybee
|
|
61
61
|
|
62
62
|
construction = shading_surface.construction
|
63
63
|
if !construction.empty?
|
64
|
-
hash[:construction] =
|
64
|
+
hash[:construction] = construction.get.nameString
|
65
65
|
end
|
66
66
|
|
67
67
|
transmittance_schedule = shading_surface.transmittanceSchedule
|
68
68
|
if !transmittance_schedule.empty?
|
69
|
-
hash[:transmittance_schedule] =
|
69
|
+
hash[:transmittance_schedule] = transmittance_schedule.get.nameString
|
70
70
|
end
|
71
71
|
|
72
72
|
hash
|
@@ -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,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
|
@@ -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
|