honeybee-openstudio 2.6.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb2614a414bea5b5781814e138f23cf739ae38599acfa61613f9123d7811f29d
|
4
|
+
data.tar.gz: 14d148cbab6a8a61b5712c309c450cbdb6233f5cb4b22a76f46c545d9b802f6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c60da64ccc91c00e56e44ccee33463bcf082c3712cad3c6138a53ec0e9cc5feb17fc8511b96a6cb6e09a3713cd31251527893e1de6c3dd7b754f2e5a2e3dbfa
|
7
|
+
data.tar.gz: 99e583ab51832f6f716ad14f5582c9ba6e316326694bc7623ea2e8fdbc86f86ddf11b8fe22193c97c2737349610fde89416d3503eca883a259e2639aa5633fb1
|
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.6.
|
7
|
+
spec.version = '2.6.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
|
|
@@ -140,7 +140,8 @@ module FromHoneybee
|
|
140
140
|
if face[:apertures]
|
141
141
|
face[:apertures].each do |aperture|
|
142
142
|
if aperture[:properties][:energy][:vent_opening]
|
143
|
-
window_vent[aperture[:identifier]] =
|
143
|
+
window_vent[aperture[:identifier]] = \
|
144
|
+
[aperture[:properties][:energy][:vent_opening], aperture[:boundary_condition][:type]]
|
144
145
|
end
|
145
146
|
if aperture[:outdoor_shades]
|
146
147
|
unless os_shd_group
|
@@ -157,7 +158,8 @@ module FromHoneybee
|
|
157
158
|
if face[:doors]
|
158
159
|
face[:doors].each do |door|
|
159
160
|
if door[:properties][:energy][:vent_opening]
|
160
|
-
window_vent[door[:identifier]] =
|
161
|
+
window_vent[door[:identifier]] = \
|
162
|
+
[door[:properties][:energy][:vent_opening], door[:boundary_condition][:type]]
|
161
163
|
end
|
162
164
|
if door[:outdoor_shades]
|
163
165
|
unless os_shd_group
|
@@ -312,14 +314,18 @@ module FromHoneybee
|
|
312
314
|
|
313
315
|
# assign window ventilation objects if they exist
|
314
316
|
if $use_simple_vent && !window_vent.empty? # write simple WindAndStack ventilation
|
315
|
-
window_vent.each do |sub_f_id,
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
317
|
+
window_vent.each do |sub_f_id, open_prop|
|
318
|
+
opening = open_prop[0]
|
319
|
+
bc = open_prop[1]
|
320
|
+
if bc == 'Outdoors'
|
321
|
+
opt_sub_f = openstudio_model.getSubSurfaceByName(sub_f_id)
|
322
|
+
unless opt_sub_f.empty?
|
323
|
+
sub_f = opt_sub_f.get
|
324
|
+
vent_open = VentilationOpening.new(opening)
|
325
|
+
os_vent_open = vent_open.to_openstudio(
|
326
|
+
openstudio_model, sub_f, @hash[:properties][:energy][:vent_open_control])
|
327
|
+
os_vent_open.addToThermalZone(os_thermal_zone)
|
328
|
+
end
|
323
329
|
end
|
324
330
|
end
|
325
331
|
elsif !$use_simple_vent # we're using the AFN!
|
@@ -329,13 +335,14 @@ module FromHoneybee
|
|
329
335
|
# write the opening objects for each Aperture / Door
|
330
336
|
operable_subfs = [] # collect the sub-face objects for the EMS
|
331
337
|
opening_factors = [] # collect the maximum opening factors for the EMS
|
332
|
-
window_vent.each do |sub_f_id,
|
338
|
+
window_vent.each do |sub_f_id, open_prop|
|
339
|
+
opening = open_prop[0]
|
333
340
|
opt_sub_f = openstudio_model.getSubSurfaceByName(sub_f_id)
|
334
341
|
unless opt_sub_f.empty?
|
335
342
|
sub_f = opt_sub_f.get
|
336
343
|
if sub_f.adjacentSubSurface.empty? # not an interior window that's already in the AFN
|
337
|
-
|
338
|
-
open_fac =
|
344
|
+
vent_open = VentilationOpening.new(opening)
|
345
|
+
open_fac = vent_open.to_openstudio_afn(openstudio_model, sub_f)
|
339
346
|
operable_subfs << sub_f
|
340
347
|
opening_factors << open_fac
|
341
348
|
end
|
@@ -38,6 +38,9 @@ module FromHoneybee
|
|
38
38
|
attr_reader :errors, :warnings
|
39
39
|
@@outdoor_node = nil
|
40
40
|
@@program_manager = nil
|
41
|
+
@@sensor_count = 1
|
42
|
+
@@actuator_count = 1
|
43
|
+
@@program_count = 1
|
41
44
|
|
42
45
|
def initialize(hash = {})
|
43
46
|
super(hash)
|
@@ -72,6 +75,13 @@ module FromHoneybee
|
|
72
75
|
@@program_manager
|
73
76
|
end
|
74
77
|
|
78
|
+
def replace_ems_special_characters(ems_variable_name)
|
79
|
+
# remove special characters from an name to be used as an EMS variable
|
80
|
+
new_name = ems_variable_name.to_s
|
81
|
+
new_name.gsub!(/[^A-Za-z]/, '')
|
82
|
+
new_name
|
83
|
+
end
|
84
|
+
|
75
85
|
def to_openstudio(openstudio_model, parent_zone, vent_opening_surfaces, vent_opening_factors)
|
76
86
|
# Get the outdoor temperature sensor and the room air temperature sensor
|
77
87
|
out_air_temp = get_outdoor_node(openstudio_model)
|
@@ -84,7 +94,8 @@ module FromHoneybee
|
|
84
94
|
in_var.setKeyValue(os_zone_name)
|
85
95
|
end
|
86
96
|
in_air_temp = OpenStudio::Model::EnergyManagementSystemSensor.new(openstudio_model, in_var)
|
87
|
-
in_sensor_name = os_zone_name
|
97
|
+
in_sensor_name = replace_ems_special_characters(os_zone_name) + '_Sensor' + @@sensor_count.to_s
|
98
|
+
@@sensor_count = @@sensor_count + 1
|
88
99
|
in_air_temp.setName(in_sensor_name)
|
89
100
|
|
90
101
|
# create the actuators for each of the operaable windows
|
@@ -94,7 +105,9 @@ module FromHoneybee
|
|
94
105
|
vent_srf, 'AirFlow Network Window/Door Opening', 'Venting Opening Factor')
|
95
106
|
vent_srf_name = vent_srf.name
|
96
107
|
unless vent_srf_name.empty?
|
97
|
-
act_name = vent_srf_name.get
|
108
|
+
act_name = replace_ems_special_characters(vent_srf_name.get) + \
|
109
|
+
'_OpenFactor' + @@actuator_count.to_s
|
110
|
+
@@actuator_count = @@actuator_count + 1
|
98
111
|
window_act.setName(act_name)
|
99
112
|
actuator_names << act_name
|
100
113
|
end
|
@@ -136,7 +149,9 @@ module FromHoneybee
|
|
136
149
|
|
137
150
|
# initialize the program and add the complete logic
|
138
151
|
ems_program = OpenStudio::Model::EnergyManagementSystemProgram.new(openstudio_model)
|
139
|
-
|
152
|
+
prog_name = replace_ems_special_characters(os_zone_name) + '_WindowOpening' + @@program_count.to_s
|
153
|
+
@@program_count = @@program_count + 1
|
154
|
+
ems_program.setName(prog_name)
|
140
155
|
ems_program.addLine(complete_logic)
|
141
156
|
|
142
157
|
# loop through each of the actuators and open each window
|
@@ -150,7 +150,7 @@ module FromHoneybee
|
|
150
150
|
|
151
151
|
# create the simple opening object for the Aperture or Door using default values
|
152
152
|
flow_exponent = defaults[:flow_exponent_closed][:default].to_f
|
153
|
-
two_way_thresh= defaults[:two_way_threshold][:default].to_f
|
153
|
+
two_way_thresh = defaults[:two_way_threshold][:default].to_f
|
154
154
|
discharge_coeff = defaults[:discharge_coefficient][:default].to_f
|
155
155
|
os_opening = OpenStudio::Model::AirflowNetworkSimpleOpening.new(
|
156
156
|
openstudio_model, flow_coefficient, flow_exponent, two_way_thresh, discharge_coeff)
|
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.6.
|
4
|
+
version: 2.6.1
|
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-09-
|
14
|
+
date: 2020-09-02 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|