honeybee-openstudio 2.12.2 → 2.13.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8417eb10e76c159ec8adbacab8126682eb77278cf095b04367e175c5a57ff292
|
4
|
+
data.tar.gz: f09a65c2594eb732ed3bf5b865b6e041a5a3915e075ffe9345fcc06eb8fb7476
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c287c6581410d0b56c0d7dca54768dca173ffdd28a07a3b673b4a39e54d013129ccd73297009a9e4a87669b2a12a14b713a5d89a1950c2e555d985b3bb68341
|
7
|
+
data.tar.gz: 97a86eaaadeb4554c99695686893819cd04035291e569ef5aa4113bde53174a8514b89d866c4e8da46aed9341ad7cc60dd30f9aa925aff9cecc7fcdd26f524eb
|
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.13.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,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,55 @@
|
|
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_simpleglazsys'
|
33
|
+
require 'to_openstudio/model_object'
|
34
|
+
|
35
|
+
module Honeybee
|
36
|
+
class EnergyWindowMaterialSimpleGlazSys < ModelObject
|
37
|
+
|
38
|
+
def self.from_material(material)
|
39
|
+
# create an empty hash
|
40
|
+
hash = {}
|
41
|
+
hash[:type] = 'EnergyWindowMaterialSimpleGlazSys'
|
42
|
+
# set hash values from OpenStudio Object
|
43
|
+
hash[:identifier] = material.nameString
|
44
|
+
hash[:u_factor] = material.uFactor
|
45
|
+
hash[:shgc] = material.solarHeatGainCoefficient
|
46
|
+
# check if boost optional object is empty
|
47
|
+
unless material.visibleTransmittance.empty?
|
48
|
+
hash[:vt] = material.visibleTransmittance.get
|
49
|
+
end
|
50
|
+
|
51
|
+
hash
|
52
|
+
end
|
53
|
+
|
54
|
+
end # EnergyWindowMaterialSimpleGlazSys
|
55
|
+
end # Honeybee
|
@@ -33,6 +33,10 @@ require 'honeybee/model'
|
|
33
33
|
|
34
34
|
require 'from_openstudio/geometry/room'
|
35
35
|
require 'from_openstudio/geometry/shade'
|
36
|
+
require 'from_openstudio/material/opaque'
|
37
|
+
require 'from_openstudio/material/opaque_no_mass'
|
38
|
+
require 'from_openstudio/material/window_simpleglazsys'
|
39
|
+
|
36
40
|
|
37
41
|
require 'openstudio'
|
38
42
|
|
@@ -119,5 +123,26 @@ module Honeybee
|
|
119
123
|
result
|
120
124
|
end
|
121
125
|
|
126
|
+
# Create HB Material from OpenStudio Materials
|
127
|
+
def self.materials_from_model(openstudio_model)
|
128
|
+
result = []
|
129
|
+
|
130
|
+
# TODO: Loop through all materials and add puts statement for unsupported materials.
|
131
|
+
|
132
|
+
# Create HB EnergyMaterial from OpenStudio Material
|
133
|
+
openstudio_model.getStandardOpaqueMaterials.each do |material|
|
134
|
+
result << EnergyMaterial.from_material(material)
|
135
|
+
end
|
136
|
+
# Create HB EnergyMaterialNoMass from OpenStudio Material
|
137
|
+
openstudio_model.getMasslessOpaqueMaterials.each do |material|
|
138
|
+
result << EnergyMaterialNoMass.from_material(material)
|
139
|
+
end
|
140
|
+
# Create HB WindowMaterialSimpleGlazSys from OpenStudio Material
|
141
|
+
openstudio_model.getSimpleGlazings.each do |material|
|
142
|
+
result << EnergyWindowMaterialSimpleGlazSys.from_material(material)
|
143
|
+
end
|
144
|
+
result
|
145
|
+
end
|
146
|
+
|
122
147
|
end # Model
|
123
148
|
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.
|
4
|
+
version: 2.13.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-
|
14
|
+
date: 2021-04-01 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: json_pure
|
@@ -89,6 +89,9 @@ files:
|
|
89
89
|
- lib/from_openstudio/geometry/face.rb
|
90
90
|
- lib/from_openstudio/geometry/room.rb
|
91
91
|
- lib/from_openstudio/geometry/shade.rb
|
92
|
+
- lib/from_openstudio/material/opaque.rb
|
93
|
+
- lib/from_openstudio/material/opaque_no_mass.rb
|
94
|
+
- lib/from_openstudio/material/window_simpleglazsys.rb
|
92
95
|
- lib/from_openstudio/model.rb
|
93
96
|
- lib/from_openstudio/model_object.rb
|
94
97
|
- lib/from_openstudio/simulation/design_day.rb
|