honeybee-openstudio 2.12.2 → 2.16.1
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/material/opaque.rb +57 -0
- data/lib/from_openstudio/material/opaque_no_mass.rb +63 -0
- 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/material/window_simpleglazsys.rb +55 -0
- data/lib/from_openstudio/model.rb +51 -0
- 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 +25 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bebaa07153272a1ce3f1489cfaa29e09b806d9487c7bf2633e79efa73bdd0478
|
4
|
+
data.tar.gz: 33916d17e71bec4e0ba335215f5fb35e05f6419829f7e9f0e512a8967a2c7475
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2420ded85a17f858b5251992ce9d06787957b5e28760f6f79091747dde619bdf63fc2b41e55f4ae0cec8b6269afbb0a977db714e791083ba7fa5177d0c6fba4
|
7
|
+
data.tar.gz: 3701609f07e44434943d8bdb1e0f349aeb719ffa01c1a2a088860952d205a5fa8578cd7e2c24c13b255c63a28a884b81de71d104be51c2326ea74e6e7813b7d5
|
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.1'
|
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,57 @@
|
|
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/opaque'
|
33
|
+
require 'to_openstudio/model_object'
|
34
|
+
|
35
|
+
module Honeybee
|
36
|
+
class EnergyMaterial < ModelObject
|
37
|
+
|
38
|
+
def self.from_material(material)
|
39
|
+
# create an empty hash
|
40
|
+
hash = {}
|
41
|
+
hash[:type] = 'EnergyMaterial'
|
42
|
+
# set hash values from OpenStudio Object
|
43
|
+
hash[:identifier] = material.nameString
|
44
|
+
hash[:thickness] = material.thickness
|
45
|
+
hash[:conductivity] = material.conductivity
|
46
|
+
hash[:density] = material.density
|
47
|
+
hash[:specific_heat] = material.specificHeat
|
48
|
+
hash[:roughness] = material.roughness
|
49
|
+
hash[:thermal_absorptance] = material.thermalAbsorptance
|
50
|
+
hash[:solar_absorptance] = material.solarAbsorptance
|
51
|
+
hash[:visible_absorptance] = material.visibleAbsorptance
|
52
|
+
|
53
|
+
hash
|
54
|
+
end
|
55
|
+
|
56
|
+
end # EnergyMaterial
|
57
|
+
end # Honeybee
|
@@ -0,0 +1,63 @@
|
|
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/opaque_no_mass.rb'
|
33
|
+
require 'to_openstudio/model_object'
|
34
|
+
|
35
|
+
module Honeybee
|
36
|
+
class EnergyMaterialNoMass < ModelObject
|
37
|
+
|
38
|
+
def self.from_material(material)
|
39
|
+
# create an empty hash
|
40
|
+
hash = {}
|
41
|
+
hash[:type] = 'EnergyMaterialNoMass'
|
42
|
+
# set hash values from OpenStudio Object
|
43
|
+
hash[:identifier] = material.nameString
|
44
|
+
hash[:r_value] = material.thermalResistance
|
45
|
+
hash[:roughness] = material.roughness
|
46
|
+
# check if boost optional object is empty
|
47
|
+
unless material.thermalAbsorptance.empty?
|
48
|
+
hash[:thermal_absorptance] = material.thermalAbsorptance.get
|
49
|
+
end
|
50
|
+
# check if boost optional object is empty
|
51
|
+
unless material.solarAbsorptance.empty?
|
52
|
+
hash[:solar_absorptance] = material.solarAbsorptance.get
|
53
|
+
end
|
54
|
+
# check if boost optional object is empty
|
55
|
+
unless material.visibleAbsorptance.empty?
|
56
|
+
hash[:visible_absorptance] = material.visibleAbsorptance.get
|
57
|
+
end
|
58
|
+
|
59
|
+
hash
|
60
|
+
end
|
61
|
+
|
62
|
+
end #EnergyMaterialNoMass
|
63
|
+
end # Honeybee
|
@@ -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
|