honeybee-openstudio 2.11.3 → 2.14.0
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/files/urbanopt_Gemfile +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_glazing.rb +77 -0
- data/lib/from_openstudio/material/window_simpleglazsys.rb +55 -0
- data/lib/from_openstudio/model.rb +34 -0
- data/lib/honeybee.rb +1 -0
- data/lib/honeybee/_defaults/model.json +117 -14
- data/lib/honeybee/load/daylight.rb +42 -0
- data/lib/to_openstudio.rb +1 -0
- data/lib/to_openstudio/geometry/room.rb +6 -0
- data/lib/to_openstudio/hvac/template.rb +37 -1
- data/lib/to_openstudio/load/daylight.rb +100 -0
- metadata +15 -93
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d55946adb807546ddf9ab4f0301b2e1cffb35cd8c82410ebe5356917ae477a3
|
4
|
+
data.tar.gz: c514dc1640e95f715b5823850ac33473289646883fd33b1927eb956263a8243f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7504924fd9d88b8e6edc1f7294dffb0e8dad834d4131b269c443ffabf4c24158b4c6b64d8900acd58e4135cfb7e95b675754691d81e2ff7bf28e5e9148bbc8c9
|
7
|
+
data.tar.gz: cfd4957cdeadead04d873cc4c98a2d81b701f8ad7e45aa6fe7f368e1c0f6e352062119d4ee52492efee7c8294421d60a4e18981c68a31bd2d4577134a3eccde1
|
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.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
|
|
data/lib/files/urbanopt_Gemfile
CHANGED
@@ -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,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
|
@@ -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,11 @@ 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
|
+
require 'from_openstudio/material/window_glazing'
|
40
|
+
require 'from_openstudio/material/window_blind'
|
36
41
|
|
37
42
|
require 'openstudio'
|
38
43
|
|
@@ -119,5 +124,34 @@ module Honeybee
|
|
119
124
|
result
|
120
125
|
end
|
121
126
|
|
127
|
+
# Create HB Material from OpenStudio Materials
|
128
|
+
def self.materials_from_model(openstudio_model)
|
129
|
+
result = []
|
130
|
+
|
131
|
+
# TODO: Loop through all materials and add puts statement for unsupported materials.
|
132
|
+
|
133
|
+
# Create HB EnergyMaterial from OpenStudio Material
|
134
|
+
openstudio_model.getStandardOpaqueMaterials.each do |material|
|
135
|
+
result << EnergyMaterial.from_material(material)
|
136
|
+
end
|
137
|
+
# Create HB EnergyMaterialNoMass from OpenStudio Material
|
138
|
+
openstudio_model.getMasslessOpaqueMaterials.each do |material|
|
139
|
+
result << EnergyMaterialNoMass.from_material(material)
|
140
|
+
end
|
141
|
+
# Create HB WindowMaterialSimpleGlazSys from OpenStudio Material
|
142
|
+
openstudio_model.getSimpleGlazings.each do |material|
|
143
|
+
result << EnergyWindowMaterialSimpleGlazSys.from_material(material)
|
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
|
153
|
+
result
|
154
|
+
end
|
155
|
+
|
122
156
|
end # Model
|
123
157
|
end # Honeybee
|
data/lib/honeybee.rb
CHANGED
@@ -77,6 +77,7 @@ require 'honeybee/load/infiltration'
|
|
77
77
|
require 'honeybee/load/ventilation'
|
78
78
|
require 'honeybee/load/setpoint_thermostat'
|
79
79
|
require 'honeybee/load/setpoint_humidistat'
|
80
|
+
require 'honeybee/load/daylight'
|
80
81
|
|
81
82
|
# import the schedule objects
|
82
83
|
require 'honeybee/schedule/type_limit'
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"servers": [],
|
4
4
|
"info": {
|
5
5
|
"description": "Honeybee model schema.",
|
6
|
-
"version": "1.
|
6
|
+
"version": "1.42.2",
|
7
7
|
"title": "Honeybee Model Schema",
|
8
8
|
"contact": {
|
9
9
|
"name": "Ladybug Tools",
|
@@ -139,6 +139,11 @@
|
|
139
139
|
"x-displayName": "ControlType",
|
140
140
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ControlType\" />\n"
|
141
141
|
},
|
142
|
+
{
|
143
|
+
"name": "daylightingcontrol_model",
|
144
|
+
"x-displayName": "DaylightingControl",
|
145
|
+
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/DaylightingControl\" />\n"
|
146
|
+
},
|
142
147
|
{
|
143
148
|
"name": "door_model",
|
144
149
|
"x-displayName": "Door",
|
@@ -907,6 +912,7 @@
|
|
907
912
|
"constructionset_model",
|
908
913
|
"constructionsetabridged_model",
|
909
914
|
"controltype_model",
|
915
|
+
"daylightingcontrol_model",
|
910
916
|
"door_model",
|
911
917
|
"doorconstructionset_model",
|
912
918
|
"doorconstructionsetabridged_model",
|
@@ -2276,7 +2282,7 @@
|
|
2276
2282
|
},
|
2277
2283
|
"radiant_fraction": {
|
2278
2284
|
"title": "Radiant Fraction",
|
2279
|
-
"description": "The radiant fraction of sensible heat released by people.
|
2285
|
+
"description": "The radiant fraction of sensible heat released by people. (Default: 0.3).",
|
2280
2286
|
"default": 0.3,
|
2281
2287
|
"minimum": 0,
|
2282
2288
|
"maximum": 1,
|
@@ -2350,7 +2356,7 @@
|
|
2350
2356
|
},
|
2351
2357
|
"visible_fraction": {
|
2352
2358
|
"title": "Visible Fraction",
|
2353
|
-
"description": "The fraction of heat from lights that goes into the zone as visible (short-wave) radiation.
|
2359
|
+
"description": "The fraction of heat from lights that goes into the zone as visible (short-wave) radiation. (Default: 0.25).",
|
2354
2360
|
"default": 0.25,
|
2355
2361
|
"minimum": 0,
|
2356
2362
|
"maximum": 1,
|
@@ -2359,7 +2365,7 @@
|
|
2359
2365
|
},
|
2360
2366
|
"radiant_fraction": {
|
2361
2367
|
"title": "Radiant Fraction",
|
2362
|
-
"description": "The fraction of heat from lights that is long-wave radiation. Default
|
2368
|
+
"description": "The fraction of heat from lights that is long-wave radiation. (Default: 0.32).",
|
2363
2369
|
"default": 0.32,
|
2364
2370
|
"minimum": 0,
|
2365
2371
|
"maximum": 1,
|
@@ -2368,7 +2374,7 @@
|
|
2368
2374
|
},
|
2369
2375
|
"return_air_fraction": {
|
2370
2376
|
"title": "Return Air Fraction",
|
2371
|
-
"description": "The fraction of the heat from lights that goes into the zone return air. Default
|
2377
|
+
"description": "The fraction of the heat from lights that goes into the zone return air. (Default: 0).",
|
2372
2378
|
"default": 0.0,
|
2373
2379
|
"minimum": 0,
|
2374
2380
|
"maximum": 1,
|
@@ -2805,6 +2811,76 @@
|
|
2805
2811
|
],
|
2806
2812
|
"additionalProperties": false
|
2807
2813
|
},
|
2814
|
+
"DaylightingControl": {
|
2815
|
+
"title": "DaylightingControl",
|
2816
|
+
"description": "Base class for all objects that are not extensible with additional keys.\n\nThis effectively includes all objects except for the Properties classes\nthat are assigned to geometry objects.",
|
2817
|
+
"type": "object",
|
2818
|
+
"properties": {
|
2819
|
+
"sensor_position": {
|
2820
|
+
"title": "Sensor Position",
|
2821
|
+
"description": "A point as 3 (x, y, z) values for the position of the daylight sensor within the parent Room. This point should lie within the Room volume in order for the results to be meaningful.",
|
2822
|
+
"minItems": 3,
|
2823
|
+
"maxItems": 3,
|
2824
|
+
"type": "array",
|
2825
|
+
"items": {
|
2826
|
+
"type": "number",
|
2827
|
+
"format": "double"
|
2828
|
+
}
|
2829
|
+
},
|
2830
|
+
"type": {
|
2831
|
+
"title": "Type",
|
2832
|
+
"default": "DaylightingControl",
|
2833
|
+
"pattern": "^DaylightingControl$",
|
2834
|
+
"type": "string",
|
2835
|
+
"readOnly": true
|
2836
|
+
},
|
2837
|
+
"illuminance_setpoint": {
|
2838
|
+
"title": "Illuminance Setpoint",
|
2839
|
+
"description": "A number for the illuminance setpoint in lux beyond which electric lights are dimmed if there is sufficient daylight.",
|
2840
|
+
"default": 300,
|
2841
|
+
"exclusiveMinimum": 0,
|
2842
|
+
"type": "number",
|
2843
|
+
"format": "double"
|
2844
|
+
},
|
2845
|
+
"control_fraction": {
|
2846
|
+
"title": "Control Fraction",
|
2847
|
+
"description": "A number between 0 and 1 that represents the fraction of the Room lights that are dimmed when the illuminance at the sensor position is at the specified illuminance. 1 indicates that all lights are dim-able while 0 indicates that no lights are dim-able. Deeper rooms should have lower control fractions to account for the face that the lights in the back of the space do not dim in response to suitable daylight at the front of the room.",
|
2848
|
+
"default": 1,
|
2849
|
+
"minimum": 0,
|
2850
|
+
"maximum": 1,
|
2851
|
+
"type": "number",
|
2852
|
+
"format": "double"
|
2853
|
+
},
|
2854
|
+
"min_power_input": {
|
2855
|
+
"title": "Min Power Input",
|
2856
|
+
"description": "A number between 0 and 1 for the the lowest power the lighting system can dim down to, expressed as a fraction of maximum input power.",
|
2857
|
+
"default": 0.3,
|
2858
|
+
"minimum": 0,
|
2859
|
+
"maximum": 1,
|
2860
|
+
"type": "number",
|
2861
|
+
"format": "double"
|
2862
|
+
},
|
2863
|
+
"min_light_output": {
|
2864
|
+
"title": "Min Light Output",
|
2865
|
+
"description": "A number between 0 and 1 the lowest lighting output the lighting system can dim down to, expressed as a fraction of maximum light output.",
|
2866
|
+
"default": 0.2,
|
2867
|
+
"minimum": 0,
|
2868
|
+
"maximum": 1,
|
2869
|
+
"type": "number",
|
2870
|
+
"format": "double"
|
2871
|
+
},
|
2872
|
+
"off_at_minimum": {
|
2873
|
+
"title": "Off At Minimum",
|
2874
|
+
"description": "Boolean to note whether lights should switch off completely when they get to the minimum power input.",
|
2875
|
+
"default": false,
|
2876
|
+
"type": "boolean"
|
2877
|
+
}
|
2878
|
+
},
|
2879
|
+
"required": [
|
2880
|
+
"sensor_position"
|
2881
|
+
],
|
2882
|
+
"additionalProperties": false
|
2883
|
+
},
|
2808
2884
|
"VentilationControlAbridged": {
|
2809
2885
|
"title": "VentilationControlAbridged",
|
2810
2886
|
"description": "Base class for all objects that are not extensible with additional keys.\n\nThis effectively includes all objects except for the Properties classes\nthat are assigned to geometry objects.",
|
@@ -2977,6 +3053,15 @@
|
|
2977
3053
|
}
|
2978
3054
|
]
|
2979
3055
|
},
|
3056
|
+
"daylighting_control": {
|
3057
|
+
"title": "Daylighting Control",
|
3058
|
+
"description": "An optional DaylightingControl object to dictate the dimming of lights. If None, the lighting will respond only to the schedule and not the daylight conditions within the room.",
|
3059
|
+
"allOf": [
|
3060
|
+
{
|
3061
|
+
"$ref": "#/components/schemas/DaylightingControl"
|
3062
|
+
}
|
3063
|
+
]
|
3064
|
+
},
|
2980
3065
|
"window_vent_control": {
|
2981
3066
|
"title": "Window Vent Control",
|
2982
3067
|
"description": "An optional VentilationControl object to dictate the opening of windows. If None, the windows will never open.",
|
@@ -3628,7 +3713,7 @@
|
|
3628
3713
|
},
|
3629
3714
|
"materials": {
|
3630
3715
|
"title": "Materials",
|
3631
|
-
"description": "List of opaque
|
3716
|
+
"description": "List of opaque material definitions that are referenced in the layers. Note that the order of materials does not matter and there is no need to specify duplicated materials in this list.",
|
3632
3717
|
"minItems": 1,
|
3633
3718
|
"maxItems": 10,
|
3634
3719
|
"type": "array",
|
@@ -4245,7 +4330,7 @@
|
|
4245
4330
|
},
|
4246
4331
|
"materials": {
|
4247
4332
|
"title": "Materials",
|
4248
|
-
"description": "List of glazing and gas
|
4333
|
+
"description": "List of glazing and gas material definitions that are referenced in the layers. Note that the order of materials does not matter and there is no need to specify duplicated materials in this list.",
|
4249
4334
|
"minItems": 1,
|
4250
4335
|
"maxItems": 8,
|
4251
4336
|
"type": "array",
|
@@ -7489,7 +7574,7 @@
|
|
7489
7574
|
},
|
7490
7575
|
"radiant_fraction": {
|
7491
7576
|
"title": "Radiant Fraction",
|
7492
|
-
"description": "The radiant fraction of sensible heat released by people.
|
7577
|
+
"description": "The radiant fraction of sensible heat released by people. (Default: 0.3).",
|
7493
7578
|
"default": 0.3,
|
7494
7579
|
"minimum": 0,
|
7495
7580
|
"maximum": 1,
|
@@ -7568,7 +7653,7 @@
|
|
7568
7653
|
},
|
7569
7654
|
"visible_fraction": {
|
7570
7655
|
"title": "Visible Fraction",
|
7571
|
-
"description": "The fraction of heat from lights that goes into the zone as visible (short-wave) radiation.
|
7656
|
+
"description": "The fraction of heat from lights that goes into the zone as visible (short-wave) radiation. (Default: 0.25).",
|
7572
7657
|
"default": 0.25,
|
7573
7658
|
"minimum": 0,
|
7574
7659
|
"maximum": 1,
|
@@ -7577,7 +7662,7 @@
|
|
7577
7662
|
},
|
7578
7663
|
"radiant_fraction": {
|
7579
7664
|
"title": "Radiant Fraction",
|
7580
|
-
"description": "The fraction of heat from lights that is long-wave radiation. Default
|
7665
|
+
"description": "The fraction of heat from lights that is long-wave radiation. (Default: 0.32).",
|
7581
7666
|
"default": 0.32,
|
7582
7667
|
"minimum": 0,
|
7583
7668
|
"maximum": 1,
|
@@ -7586,7 +7671,7 @@
|
|
7586
7671
|
},
|
7587
7672
|
"return_air_fraction": {
|
7588
7673
|
"title": "Return Air Fraction",
|
7589
|
-
"description": "The fraction of the heat from lights that goes into the zone return air. Default
|
7674
|
+
"description": "The fraction of the heat from lights that goes into the zone return air. (Default: 0).",
|
7590
7675
|
"default": 0.0,
|
7591
7676
|
"minimum": 0,
|
7592
7677
|
"maximum": 1,
|
@@ -11037,7 +11122,7 @@
|
|
11037
11122
|
},
|
11038
11123
|
"display_name": {
|
11039
11124
|
"title": "Display Name",
|
11040
|
-
"description": "
|
11125
|
+
"description": "Display name of the object with no character restrictions.",
|
11041
11126
|
"type": "string"
|
11042
11127
|
},
|
11043
11128
|
"room_identifier": {
|
@@ -11074,6 +11159,19 @@
|
|
11074
11159
|
"$ref": "#/components/schemas/Mesh3D"
|
11075
11160
|
}
|
11076
11161
|
]
|
11162
|
+
},
|
11163
|
+
"base_geometry": {
|
11164
|
+
"title": "Base Geometry",
|
11165
|
+
"description": "An optional array of Face3D used to represent the grid. There are no restrictions on how this property relates to the sensors and it is provided only to assist with the display of the grid when the number of sensors or the mesh is too large to be practically visualized.",
|
11166
|
+
"type": "array",
|
11167
|
+
"items": {
|
11168
|
+
"$ref": "#/components/schemas/Face3D"
|
11169
|
+
}
|
11170
|
+
},
|
11171
|
+
"group_identifier": {
|
11172
|
+
"title": "Group Identifier",
|
11173
|
+
"description": "An optional string to note the sensor grid group ' 'to which the sensor is a part of. Grids sharing the same ' 'group_identifier will be written to the same subfolder in Radiance ' 'folder (default: None).",
|
11174
|
+
"type": "string"
|
11077
11175
|
}
|
11078
11176
|
},
|
11079
11177
|
"required": [
|
@@ -11140,7 +11238,7 @@
|
|
11140
11238
|
},
|
11141
11239
|
"display_name": {
|
11142
11240
|
"title": "Display Name",
|
11143
|
-
"description": "
|
11241
|
+
"description": "Display name of the object with no character restrictions.",
|
11144
11242
|
"type": "string"
|
11145
11243
|
},
|
11146
11244
|
"room_identifier": {
|
@@ -11214,6 +11312,11 @@
|
|
11214
11312
|
"description": "View aft clip (-va) at a distance from the view point.Like the view fore plane, it will be perpendicular to the view direction for perspective and parallel view types. For fisheye view types, the clipping plane is actually a clipping sphere, centered on the view point with radius val.",
|
11215
11313
|
"type": "number",
|
11216
11314
|
"format": "double"
|
11315
|
+
},
|
11316
|
+
"group_identifier": {
|
11317
|
+
"title": "Group Identifier",
|
11318
|
+
"description": "An optional string to note the view group ' 'to which the sensor is a part of. Views sharing the same ' 'group_identifier will be written to the same subfolder in Radiance ' 'folder (default: None).",
|
11319
|
+
"type": "string"
|
11217
11320
|
}
|
11218
11321
|
},
|
11219
11322
|
"required": [
|
@@ -11367,7 +11470,7 @@
|
|
11367
11470
|
"version": {
|
11368
11471
|
"title": "Version",
|
11369
11472
|
"description": "Text string for the current version of the schema.",
|
11370
|
-
"default": "1.
|
11473
|
+
"default": "1.42.2",
|
11371
11474
|
"pattern": "([0-9]+)\\.([0-9]+)\\.([0-9]+)",
|
11372
11475
|
"type": "string",
|
11373
11476
|
"readOnly": true
|
@@ -0,0 +1,42 @@
|
|
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/model_object'
|
33
|
+
|
34
|
+
module Honeybee
|
35
|
+
class DaylightingControl < ModelObject
|
36
|
+
|
37
|
+
def defaults
|
38
|
+
@@schema[:components][:schemas][:DaylightingControl][:properties]
|
39
|
+
end
|
40
|
+
|
41
|
+
end #DaylightingControl
|
42
|
+
end #Honeybee
|
data/lib/to_openstudio.rb
CHANGED
@@ -77,6 +77,7 @@ require 'to_openstudio/load/infiltration'
|
|
77
77
|
require 'to_openstudio/load/ventilation'
|
78
78
|
require 'to_openstudio/load/setpoint_thermostat'
|
79
79
|
require 'to_openstudio/load/setpoint_humidistat'
|
80
|
+
require 'to_openstudio/load/daylight'
|
80
81
|
|
81
82
|
# extend the schedule objects
|
82
83
|
require 'to_openstudio/schedule/type_limit'
|
@@ -312,6 +312,12 @@ module Honeybee
|
|
312
312
|
end
|
313
313
|
end
|
314
314
|
|
315
|
+
# assign daylight control if it exists
|
316
|
+
if @hash[:properties][:energy][:daylighting_control]
|
317
|
+
dl_control = DaylightingControl.new(@hash[:properties][:energy][:daylighting_control])
|
318
|
+
os_dl_control = dl_control.to_openstudio(openstudio_model, os_thermal_zone, os_space)
|
319
|
+
end
|
320
|
+
|
315
321
|
# assign window ventilation objects if they exist
|
316
322
|
if $use_simple_vent && !window_vent.empty? # write simple WindAndStack ventilation
|
317
323
|
window_vent.each do |sub_f_id, open_prop|
|
@@ -128,7 +128,43 @@ module Honeybee
|
|
128
128
|
erv.setLatentEffectivenessat75HeatingAirFlow(@hash[:latent_heat_recovery])
|
129
129
|
end
|
130
130
|
|
131
|
-
#
|
131
|
+
# if the systems are PTAC and there is ventilation, ensure the system includes it
|
132
|
+
if equipment_type.include?('PTAC') || equipment_type.include?('PTHP')
|
133
|
+
always_on = openstudio_model.getScheduleByName('Always On').get
|
134
|
+
zones.each do |zone|
|
135
|
+
# check if the space type has ventilation assigned to it
|
136
|
+
out_air = zone.spaces[0].designSpecificationOutdoorAir
|
137
|
+
unless out_air.empty?
|
138
|
+
# get any ventilation schedules
|
139
|
+
vent_sched = always_on
|
140
|
+
out_air = out_air.get
|
141
|
+
air_sch = out_air.outdoorAirFlowRateFractionSchedule
|
142
|
+
unless air_sch.empty?
|
143
|
+
vent_sched = air_sch.get
|
144
|
+
end
|
145
|
+
# get the PTAC object
|
146
|
+
ptac = nil
|
147
|
+
zone.equipment.each do |equip|
|
148
|
+
e_name = equip.name
|
149
|
+
unless e_name.empty?
|
150
|
+
e_name = e_name.get
|
151
|
+
if e_name.include? 'PTAC'
|
152
|
+
ptac = openstudio_model.getZoneHVACPackagedTerminalAirConditioner(equip.handle)
|
153
|
+
elsif e_name.include? 'PTHP'
|
154
|
+
ptac = openstudio_model.getZoneHVACPackagedTerminalHeatPump(equip.handle)
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
158
|
+
# assign the schedule to the PTAC object
|
159
|
+
unless ptac.nil? || ptac.empty?
|
160
|
+
ptac = ptac.get
|
161
|
+
ptac.setSupplyAirFanOperatingModeSchedule(vent_sched)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
# set all plants to non-coincident sizing to avoid simualtion control issues on design days
|
132
168
|
openstudio_model.getPlantLoops.each do |loop|
|
133
169
|
sizing = loop.sizingPlant
|
134
170
|
sizing.setSizingOption('NonCoincident')
|
@@ -0,0 +1,100 @@
|
|
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/load/daylight'
|
33
|
+
|
34
|
+
require 'to_openstudio/model_object'
|
35
|
+
|
36
|
+
module Honeybee
|
37
|
+
class DaylightingControl
|
38
|
+
|
39
|
+
def find_existing_openstudio_object(openstudio_model, parent_space_name)
|
40
|
+
dl_cntrl_name = parent_space_name + '_Daylighting'
|
41
|
+
model_dl_cntrl = openstudio_model.getDaylightingControlByName(dl_cntrl_name)
|
42
|
+
return model_dl_cntrl.get unless model_dl_cntrl.empty?
|
43
|
+
nil
|
44
|
+
end
|
45
|
+
|
46
|
+
def to_openstudio(openstudio_model, parent_zone, parent_space)
|
47
|
+
# create daylighting control openstudio object and set identifier
|
48
|
+
os_dl_control = OpenStudio::Model::DaylightingControl.new(openstudio_model)
|
49
|
+
space_name = parent_space.name
|
50
|
+
unless space_name.empty?
|
51
|
+
os_dl_control.setName(parent_space.name.get + '_Daylighting')
|
52
|
+
end
|
53
|
+
os_dl_control.setSpace(parent_space)
|
54
|
+
parent_zone.setPrimaryDaylightingControl(os_dl_control)
|
55
|
+
|
56
|
+
# assign the position of the sensor point
|
57
|
+
os_dl_control.setPositionXCoordinate(@hash[:sensor_position][0])
|
58
|
+
os_dl_control.setPositionYCoordinate(@hash[:sensor_position][1])
|
59
|
+
os_dl_control.setPositionZCoordinate(@hash[:sensor_position][2])
|
60
|
+
|
61
|
+
# assign the illuminance setpoint if it exists
|
62
|
+
if @hash[:illuminance_setpoint]
|
63
|
+
os_dl_control.setIlluminanceSetpoint(@hash[:illuminance_setpoint])
|
64
|
+
else
|
65
|
+
os_dl_control.setIlluminanceSetpoint(defaults[:illuminance_setpoint][:default])
|
66
|
+
end
|
67
|
+
|
68
|
+
# assign power fraction if it exists
|
69
|
+
if @hash[:min_power_input]
|
70
|
+
os_dl_control.setMinimumInputPowerFractionforContinuousDimmingControl(@hash[:min_power_input])
|
71
|
+
else
|
72
|
+
os_dl_control.setMinimumInputPowerFractionforContinuousDimmingControl(defaults[:min_power_input][:default])
|
73
|
+
end
|
74
|
+
|
75
|
+
# assign light output fraction if it exists
|
76
|
+
if @hash[:min_power_input]
|
77
|
+
os_dl_control.setMinimumLightOutputFractionforContinuousDimmingControl(@hash[:min_light_output])
|
78
|
+
else
|
79
|
+
os_dl_control.setMinimumLightOutputFractionforContinuousDimmingControl(defaults[:min_light_output][:default])
|
80
|
+
end
|
81
|
+
|
82
|
+
# set whether the lights go off when they reach their minimum
|
83
|
+
if @hash[:off_at_minimum]
|
84
|
+
os_dl_control.setLightingControlType('Continuous/Off')
|
85
|
+
else
|
86
|
+
os_dl_control.setLightingControlType('Continuous')
|
87
|
+
end
|
88
|
+
|
89
|
+
# set the fraction of the zone lights that are dimmed
|
90
|
+
if @hash[:control_fraction]
|
91
|
+
parent_zone.setFractionofZoneControlledbyPrimaryDaylightingControl(@hash[:control_fraction])
|
92
|
+
else
|
93
|
+
parent_zone.setFractionofZoneControlledbyPrimaryDaylightingControl(defaults[:control_fraction][:default])
|
94
|
+
end
|
95
|
+
|
96
|
+
os_dl_control
|
97
|
+
end
|
98
|
+
|
99
|
+
end #DaylightingControl
|
100
|
+
end #Honeybee
|
metadata
CHANGED
@@ -1,102 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honeybee-openstudio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanushree Charan
|
8
8
|
- Dan Macumber
|
9
9
|
- Chris Mackey
|
10
10
|
- Mostapha Sadeghipour Roudsari
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2021-
|
14
|
+
date: 2021-04-07 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
17
|
-
name: bundler
|
18
|
-
requirement: !ruby/object:Gem::Requirement
|
19
|
-
requirements:
|
20
|
-
- - "~>"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '2.1'
|
23
|
-
type: :development
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
requirements:
|
27
|
-
- - "~>"
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '2.1'
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: public_suffix
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
requirements:
|
34
|
-
- - "~>"
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: 3.1.1
|
37
|
-
type: :development
|
38
|
-
prerelease: false
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
40
|
-
requirements:
|
41
|
-
- - "~>"
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: 3.1.1
|
44
|
-
- !ruby/object:Gem::Dependency
|
45
|
-
name: json-schema
|
46
|
-
requirement: !ruby/object:Gem::Requirement
|
47
|
-
requirements:
|
48
|
-
- - "~>"
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: 2.8.1
|
51
|
-
type: :development
|
52
|
-
prerelease: false
|
53
|
-
version_requirements: !ruby/object:Gem::Requirement
|
54
|
-
requirements:
|
55
|
-
- - "~>"
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version: 2.8.1
|
58
|
-
- !ruby/object:Gem::Dependency
|
59
|
-
name: rake
|
60
|
-
requirement: !ruby/object:Gem::Requirement
|
61
|
-
requirements:
|
62
|
-
- - "~>"
|
63
|
-
- !ruby/object:Gem::Version
|
64
|
-
version: '13.0'
|
65
|
-
type: :development
|
66
|
-
prerelease: false
|
67
|
-
version_requirements: !ruby/object:Gem::Requirement
|
68
|
-
requirements:
|
69
|
-
- - "~>"
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
version: '13.0'
|
72
|
-
- !ruby/object:Gem::Dependency
|
73
|
-
name: rspec
|
74
|
-
requirement: !ruby/object:Gem::Requirement
|
75
|
-
requirements:
|
76
|
-
- - "~>"
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: '3.9'
|
79
|
-
type: :development
|
80
|
-
prerelease: false
|
81
|
-
version_requirements: !ruby/object:Gem::Requirement
|
82
|
-
requirements:
|
83
|
-
- - "~>"
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '3.9'
|
86
|
-
- !ruby/object:Gem::Dependency
|
87
|
-
name: rubocop
|
88
|
-
requirement: !ruby/object:Gem::Requirement
|
89
|
-
requirements:
|
90
|
-
- - "~>"
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
version: 0.54.0
|
93
|
-
type: :development
|
94
|
-
prerelease: false
|
95
|
-
version_requirements: !ruby/object:Gem::Requirement
|
96
|
-
requirements:
|
97
|
-
- - "~>"
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version: 0.54.0
|
100
16
|
- !ruby/object:Gem::Dependency
|
101
17
|
name: json_pure
|
102
18
|
requirement: !ruby/object:Gem::Requirement
|
@@ -173,6 +89,11 @@ files:
|
|
173
89
|
- lib/from_openstudio/geometry/face.rb
|
174
90
|
- lib/from_openstudio/geometry/room.rb
|
175
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_blind.rb
|
95
|
+
- lib/from_openstudio/material/window_glazing.rb
|
96
|
+
- lib/from_openstudio/material/window_simpleglazsys.rb
|
176
97
|
- lib/from_openstudio/model.rb
|
177
98
|
- lib/from_openstudio/model_object.rb
|
178
99
|
- lib/from_openstudio/simulation/design_day.rb
|
@@ -196,6 +117,7 @@ files:
|
|
196
117
|
- lib/honeybee/geometry/shade.rb
|
197
118
|
- lib/honeybee/hvac/ideal_air.rb
|
198
119
|
- lib/honeybee/hvac/template.rb
|
120
|
+
- lib/honeybee/load/daylight.rb
|
199
121
|
- lib/honeybee/load/electric_equipment.rb
|
200
122
|
- lib/honeybee/load/gas_equipment.rb
|
201
123
|
- lib/honeybee/load/infiltration.rb
|
@@ -252,6 +174,7 @@ files:
|
|
252
174
|
- lib/to_openstudio/hvac/Model.hvac.rb
|
253
175
|
- lib/to_openstudio/hvac/ideal_air.rb
|
254
176
|
- lib/to_openstudio/hvac/template.rb
|
177
|
+
- lib/to_openstudio/load/daylight.rb
|
255
178
|
- lib/to_openstudio/load/electric_equipment.rb
|
256
179
|
- lib/to_openstudio/load/gas_equipment.rb
|
257
180
|
- lib/to_openstudio/load/infiltration.rb
|
@@ -284,24 +207,23 @@ files:
|
|
284
207
|
homepage: https://github.com/ladybug-tools/honeybee-openstudio-gem
|
285
208
|
licenses: []
|
286
209
|
metadata: {}
|
287
|
-
post_install_message:
|
210
|
+
post_install_message:
|
288
211
|
rdoc_options: []
|
289
212
|
require_paths:
|
290
213
|
- lib
|
291
214
|
required_ruby_version: !ruby/object:Gem::Requirement
|
292
215
|
requirements:
|
293
|
-
- - "
|
216
|
+
- - ">="
|
294
217
|
- !ruby/object:Gem::Version
|
295
|
-
version:
|
218
|
+
version: '0'
|
296
219
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
297
220
|
requirements:
|
298
221
|
- - ">="
|
299
222
|
- !ruby/object:Gem::Version
|
300
223
|
version: '0'
|
301
224
|
requirements: []
|
302
|
-
|
303
|
-
|
304
|
-
signing_key:
|
225
|
+
rubygems_version: 3.1.2
|
226
|
+
signing_key:
|
305
227
|
specification_version: 4
|
306
228
|
summary: Gem for translating between Honeybee JSON and OpenStudio Model.
|
307
229
|
test_files: []
|