honeybee-openstudio 2.3.2 → 2.4.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: 35541c0e7f21c2cf1d8036b1b5f845a458504ec2a9203683b18d64970c47894e
|
4
|
+
data.tar.gz: f4cf4ecb4c33a1b4a36192fa286ff21044276db7b33ee014894877425e3b877a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8081aaf32d35c671f50d59cd1515f2ff8c0b8e3f583ec1ebcaef1107507f1acf569c6db35afe5a53a5f928314a4c8cdb9dde3c08016d61f31353073ae904eb36
|
7
|
+
data.tar.gz: d45a7b5b22848894e87d4c6cb8b5d8d043b23b3ed71cb2c218b1411949eb066e805736edffb6f6b750a63f871965d459cf5a5e2cefa4c0e52a5c9a0d6b8065d4
|
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.4.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
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"servers": [],
|
4
4
|
"info": {
|
5
5
|
"description": "This is the documentation for Honeybee model schema.",
|
6
|
-
"version": "1.
|
6
|
+
"version": "1.34.3",
|
7
7
|
"title": "Honeybee Model Schema",
|
8
8
|
"contact": {
|
9
9
|
"name": "Ladybug Tools",
|
@@ -4577,15 +4577,7 @@
|
|
4577
4577
|
"description": "An optional schedule identifier to be applied on top of the control_type. If None, the control_type will govern all behavior of the construction.",
|
4578
4578
|
"maxLength": 100,
|
4579
4579
|
"minLength": 1,
|
4580
|
-
"type": "string"
|
4581
|
-
"anyOf": [
|
4582
|
-
{
|
4583
|
-
"$ref": "#/components/schemas/ScheduleRuleset"
|
4584
|
-
},
|
4585
|
-
{
|
4586
|
-
"$ref": "#/components/schemas/ScheduleFixedInterval"
|
4587
|
-
}
|
4588
|
-
]
|
4580
|
+
"type": "string"
|
4589
4581
|
}
|
4590
4582
|
},
|
4591
4583
|
"required": [
|
@@ -6223,13 +6215,6 @@
|
|
6223
6215
|
"type": "string",
|
6224
6216
|
"readOnly": true
|
6225
6217
|
},
|
6226
|
-
"global_construction_set": {
|
6227
|
-
"title": "Global Construction Set",
|
6228
|
-
"description": "Identifier for the ConstructionSet to be used for all objects lacking their own construction or a parent Room construction_set. This ConstructionSet must appear under the Model construction_sets.",
|
6229
|
-
"maxLength": 100,
|
6230
|
-
"minLength": 1,
|
6231
|
-
"type": "string"
|
6232
|
-
},
|
6233
6218
|
"construction_sets": {
|
6234
6219
|
"title": "Construction Sets",
|
6235
6220
|
"description": "List of all unique ConstructionSets in the Model.",
|
@@ -8662,11 +8647,6 @@
|
|
8662
8647
|
}
|
8663
8648
|
]
|
8664
8649
|
}
|
8665
|
-
},
|
8666
|
-
"global_modifier_set": {
|
8667
|
-
"title": "Global Modifier Set",
|
8668
|
-
"description": "Identifier of a ModifierSet or ModifierSetAbridged object to be used as as a default object for all unassigned objects in the Model (default: None).",
|
8669
|
-
"type": "string"
|
8670
8650
|
}
|
8671
8651
|
},
|
8672
8652
|
"additionalProperties": false
|
@@ -8729,6 +8709,13 @@
|
|
8729
8709
|
"type": "string",
|
8730
8710
|
"readOnly": true
|
8731
8711
|
},
|
8712
|
+
"version": {
|
8713
|
+
"title": "Version",
|
8714
|
+
"description": "Text string for the current version of the schema.",
|
8715
|
+
"default": "0.0.0",
|
8716
|
+
"pattern": "([0-9]+)\\.([0-9]+)\\.([0-9]+)",
|
8717
|
+
"type": "string"
|
8718
|
+
},
|
8732
8719
|
"rooms": {
|
8733
8720
|
"title": "Rooms",
|
8734
8721
|
"description": "A list of Rooms in the model.",
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"servers": [],
|
4
4
|
"info": {
|
5
5
|
"description": "This is the documentation for Honeybee energy simulation parameter schema.",
|
6
|
-
"version": "
|
6
|
+
"version": "1.34.3",
|
7
7
|
"title": "Honeybee Energy Simulation Parameter Schema",
|
8
8
|
"contact": {
|
9
9
|
"name": "Ladybug Tools",
|
@@ -469,7 +469,7 @@
|
|
469
469
|
},
|
470
470
|
"dry_bulb_range": {
|
471
471
|
"title": "Dry Bulb Range",
|
472
|
-
"description": "The difference between min and max temperatures on
|
472
|
+
"description": "The difference between min and max temperatures on the design day [C].",
|
473
473
|
"minimum": 0,
|
474
474
|
"type": "number",
|
475
475
|
"format": "double"
|
@@ -585,7 +585,7 @@
|
|
585
585
|
"properties": {
|
586
586
|
"date": {
|
587
587
|
"title": "Date",
|
588
|
-
"description": "A list of two integers for [month, day], representing the date for the day of the year on which the design day occurs.A third integer may be added to denote whether the date should be re-serialized for a leap year (it should be a 1 in this case).",
|
588
|
+
"description": "A list of two integers for [month, day], representing the date for the day of the year on which the design day occurs. A third integer may be added to denote whether the date should be re-serialized for a leap year (it should be a 1 in this case).",
|
589
589
|
"type": "array",
|
590
590
|
"items": {
|
591
591
|
"type": "integer",
|
@@ -629,7 +629,7 @@
|
|
629
629
|
"properties": {
|
630
630
|
"date": {
|
631
631
|
"title": "Date",
|
632
|
-
"description": "A list of two integers for [month, day], representing the date for the day of the year on which the design day occurs.A third integer may be added to denote whether the date should be re-serialized for a leap year (it should be a 1 in this case).",
|
632
|
+
"description": "A list of two integers for [month, day], representing the date for the day of the year on which the design day occurs. A third integer may be added to denote whether the date should be re-serialized for a leap year (it should be a 1 in this case).",
|
633
633
|
"type": "array",
|
634
634
|
"items": {
|
635
635
|
"type": "integer",
|
@@ -42,6 +42,7 @@ require 'from_honeybee/load/infiltration'
|
|
42
42
|
require 'from_honeybee/load/ventilation'
|
43
43
|
require 'from_honeybee/load/setpoint_thermostat'
|
44
44
|
require 'from_honeybee/load/setpoint_humidistat'
|
45
|
+
require 'from_honeybee/ventcool/opening'
|
45
46
|
|
46
47
|
require 'openstudio'
|
47
48
|
|
@@ -117,6 +118,9 @@ module FromHoneybee
|
|
117
118
|
end
|
118
119
|
os_space.setBuildingStory(story)
|
119
120
|
|
121
|
+
# keep track of all window ventilation objects
|
122
|
+
window_vent = {}
|
123
|
+
|
120
124
|
# assign all of the faces to the room
|
121
125
|
@hash[:faces].each do |face|
|
122
126
|
ladybug_face = Face.new(face)
|
@@ -134,6 +138,9 @@ module FromHoneybee
|
|
134
138
|
# assign aperture-level shades if they exist
|
135
139
|
if face[:apertures]
|
136
140
|
face[:apertures].each do |aperture|
|
141
|
+
if aperture[:properties][:energy][:vent_opening]
|
142
|
+
window_vent[aperture[:identifier]] = aperture[:properties][:energy][:vent_opening]
|
143
|
+
end
|
137
144
|
if aperture[:outdoor_shades]
|
138
145
|
unless os_shd_group
|
139
146
|
os_shd_group = make_shade_group(openstudio_model, os_surface, os_space)
|
@@ -148,6 +155,9 @@ module FromHoneybee
|
|
148
155
|
# assign door-level shades if they exist
|
149
156
|
if face[:doors]
|
150
157
|
face[:doors].each do |door|
|
158
|
+
if door[:properties][:energy][:vent_opening]
|
159
|
+
window_vent[door[:identifier]] = door[:properties][:energy][:vent_opening]
|
160
|
+
end
|
151
161
|
if door[:outdoor_shades]
|
152
162
|
unless os_shd_group
|
153
163
|
os_shd_group = make_shade_group(openstudio_model, os_surface, os_space)
|
@@ -284,14 +294,12 @@ module FromHoneybee
|
|
284
294
|
|
285
295
|
# assign setpoint if it exists
|
286
296
|
if @hash[:properties][:energy][:setpoint]
|
287
|
-
#thermostat object is created because heating and cooling schedule are required
|
288
|
-
#fields.
|
297
|
+
# thermostat object is created because heating and cooling schedule are required
|
289
298
|
setpoint_thermostat_space = SetpointThermostat.new(@hash[:properties][:energy][:setpoint])
|
290
299
|
os_setpoint_thermostat_space = setpoint_thermostat_space.to_openstudio(openstudio_model)
|
291
300
|
#set thermostat to thermal zone
|
292
301
|
os_thermal_zone.setThermostatSetpointDualSetpoint(os_setpoint_thermostat_space)
|
293
|
-
#humidistat object is created if humidifying or dehumidifying schedule is
|
294
|
-
#specified.
|
302
|
+
# humidistat object is created if humidifying or dehumidifying schedule is specified
|
295
303
|
if @hash[:properties][:energy][:setpoint][:humidifying_schedule] or @hash[:properties][:energy][:setpoint][:dehumidifying_schedule]
|
296
304
|
setpoint_humidistat_space = SetpointHumidistat.new(@hash[:properties][:energy][:setpoint])
|
297
305
|
os_setpoint_humidistat_space = setpoint_humidistat_space.to_openstudio(openstudio_model)
|
@@ -299,6 +307,20 @@ module FromHoneybee
|
|
299
307
|
end
|
300
308
|
end
|
301
309
|
|
310
|
+
# assign window ventilation objects if they exist
|
311
|
+
unless window_vent.empty?
|
312
|
+
window_vent.each do |sub_f_id, opening|
|
313
|
+
opt_sub_f = openstudio_model.getSubSurfaceByName(sub_f_id)
|
314
|
+
unless opt_sub_f.empty?
|
315
|
+
sub_f = opt_sub_f.get
|
316
|
+
window_vent = VentilationOpening.new(opening)
|
317
|
+
os_window_vent = window_vent.to_openstudio(
|
318
|
+
openstudio_model, sub_f, @hash[:properties][:energy][:window_vent_control])
|
319
|
+
os_window_vent.addToThermalZone(os_thermal_zone)
|
320
|
+
end
|
321
|
+
end
|
322
|
+
end
|
323
|
+
|
302
324
|
os_space
|
303
325
|
end
|
304
326
|
|
@@ -0,0 +1,160 @@
|
|
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 'from_honeybee/model_object'
|
33
|
+
|
34
|
+
require 'openstudio'
|
35
|
+
|
36
|
+
module FromHoneybee
|
37
|
+
class VentilationOpening < ModelObject
|
38
|
+
attr_reader :errors, :warnings
|
39
|
+
|
40
|
+
def initialize(hash = {})
|
41
|
+
super(hash)
|
42
|
+
end
|
43
|
+
|
44
|
+
def defaults
|
45
|
+
@@schema[:components][:schemas][:VentilationOpening][:properties]
|
46
|
+
end
|
47
|
+
|
48
|
+
def defaults_control
|
49
|
+
@@schema[:components][:schemas][:VentilationControlAbridged][:properties]
|
50
|
+
end
|
51
|
+
|
52
|
+
def to_openstudio(openstudio_model, parent, vent_control_hash)
|
53
|
+
# create wind and stack object and set identifier
|
54
|
+
os_opening = OpenStudio::Model::ZoneVentilationWindandStackOpenArea.new(openstudio_model)
|
55
|
+
os_opening.setName(parent.name.get + '_Opening')
|
56
|
+
|
57
|
+
# assign the opening area
|
58
|
+
if @hash[:fraction_area_operable]
|
59
|
+
os_opening.setOpeningArea(@hash[:fraction_area_operable] * parent.netArea)
|
60
|
+
else
|
61
|
+
os_opening.setOpeningArea(
|
62
|
+
defaults[:fraction_area_operable][:default] * parent.netArea)
|
63
|
+
end
|
64
|
+
|
65
|
+
# assign the height
|
66
|
+
if @hash[:fraction_height_operable]
|
67
|
+
os_opening. setHeightDifference(
|
68
|
+
@hash[:fraction_height_operable] * compute_height(parent))
|
69
|
+
else
|
70
|
+
os_opening. setHeightDifference(
|
71
|
+
defaults[:fraction_height_operable][:default] * compute_height(parent))
|
72
|
+
end
|
73
|
+
|
74
|
+
# assign the azimuth
|
75
|
+
az_degrees = parent.azimuth * 180 / Math::PI
|
76
|
+
os_opening.setEffectiveAngle(az_degrees.round())
|
77
|
+
|
78
|
+
# assign the discharge coefficient
|
79
|
+
if @hash[:discharge_coefficient]
|
80
|
+
os_opening.setDischargeCoefficientforOpening(@hash[:discharge_coefficient])
|
81
|
+
else
|
82
|
+
os_opening.setDischargeCoefficientforOpening(
|
83
|
+
defaults[:discharge_coefficient][:default])
|
84
|
+
end
|
85
|
+
|
86
|
+
# assign the wind pressure coefficient
|
87
|
+
if @hash[:wind_cross_vent]
|
88
|
+
os_opening.autocalculateOpeningEffectiveness()
|
89
|
+
else
|
90
|
+
os_opening.setOpeningEffectiveness(0)
|
91
|
+
end
|
92
|
+
|
93
|
+
# set all of the ventilation control properties
|
94
|
+
if vent_control_hash
|
95
|
+
# assign min_indoor_temperature
|
96
|
+
if vent_control_hash[:min_indoor_temperature]
|
97
|
+
os_opening.setMinimumIndoorTemperature(vent_control_hash[:min_indoor_temperature])
|
98
|
+
else
|
99
|
+
os_opening.setMinimumIndoorTemperature(
|
100
|
+
defaults_control[:min_indoor_temperature][:default])
|
101
|
+
end
|
102
|
+
# assign max_indoor_temperature
|
103
|
+
if vent_control_hash[:max_indoor_temperature]
|
104
|
+
os_opening.setMaximumIndoorTemperature(vent_control_hash[:max_indoor_temperature])
|
105
|
+
else
|
106
|
+
os_opening.setMaximumIndoorTemperature(
|
107
|
+
defaults_control[:max_indoor_temperature][:default])
|
108
|
+
end
|
109
|
+
# assign min_outdoor_temperature
|
110
|
+
if vent_control_hash[:min_outdoor_temperature]
|
111
|
+
os_opening.setMinimumOutdoorTemperature(vent_control_hash[:min_outdoor_temperature])
|
112
|
+
else
|
113
|
+
os_opening.setMinimumOutdoorTemperature(
|
114
|
+
defaults_control[:min_outdoor_temperature][:default])
|
115
|
+
end
|
116
|
+
# assign max_outdoor_temperature
|
117
|
+
if vent_control_hash[:max_outdoor_temperature]
|
118
|
+
os_opening.setMaximumOutdoorTemperature(vent_control_hash[:max_outdoor_temperature])
|
119
|
+
else
|
120
|
+
os_opening.setMaximumOutdoorTemperature(
|
121
|
+
defaults_control[:max_outdoor_temperature][:default])
|
122
|
+
end
|
123
|
+
# assign delta_temperature
|
124
|
+
if vent_control_hash[:delta_temperature]
|
125
|
+
os_opening.setDeltaTemperature(vent_control_hash[:delta_temperature])
|
126
|
+
else
|
127
|
+
os_opening.setDeltaTemperature(
|
128
|
+
defaults_control[:delta_temperature][:default])
|
129
|
+
end
|
130
|
+
# assign schedule if it exists
|
131
|
+
if vent_control_hash[:schedule]
|
132
|
+
vent_sch = openstudio_model.getScheduleByName(vent_control_hash[:schedule])
|
133
|
+
unless vent_sch.empty?
|
134
|
+
vent_sch_object = vent_sch.get
|
135
|
+
os_opening.setOpeningAreaFractionSchedule(vent_sch_object)
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
os_opening
|
141
|
+
end
|
142
|
+
|
143
|
+
def compute_height(surface)
|
144
|
+
# derive the height (difference in z values) of a surface
|
145
|
+
verts = surface.vertices
|
146
|
+
min_pt = verts[0].z
|
147
|
+
max_pt = verts[0].z
|
148
|
+
verts.each do |v|
|
149
|
+
if v.z < min_pt
|
150
|
+
min_pt = v.z
|
151
|
+
elsif v.z > max_pt
|
152
|
+
max_pt = v.z
|
153
|
+
end
|
154
|
+
end
|
155
|
+
max_pt - min_pt
|
156
|
+
end
|
157
|
+
|
158
|
+
end #VentilationOpening
|
159
|
+
end #FromHoneybee
|
160
|
+
|
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.4.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: 2020-07-
|
14
|
+
date: 2020-07-20 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -208,6 +208,7 @@ files:
|
|
208
208
|
- lib/from_honeybee/simulation/designday.rb
|
209
209
|
- lib/from_honeybee/simulation/extension.rb
|
210
210
|
- lib/from_honeybee/simulation/parameter.rb
|
211
|
+
- lib/from_honeybee/ventcool/opening.rb
|
211
212
|
- lib/measures/.gitkeep
|
212
213
|
- lib/measures/from_honeybee_model/LICENSE.md
|
213
214
|
- lib/measures/from_honeybee_model/README.md
|