honeybee-openstudio 2.30.5 → 2.30.6
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 +4 -4
- data/honeybee-openstudio.gemspec +1 -1
- data/lib/to_openstudio/hvac/template.rb +94 -80
- data/lib/to_openstudio/model.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3152d4118f8b8ed6aedfeff6e4ae46b7965e1956d4049d86056f54bd423cad7c
|
4
|
+
data.tar.gz: d2fba53c5594e7c7f88da70ef8f317161bb36ef7272dc3e22bebed25d2b9990f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26297730ec9926925ec8338abd9e650af554905eaf612114a6d1527f6d84e05d15e38015462da699e18479ce037fec213e6c0a8098795d1f4885996ff167109c
|
7
|
+
data.tar.gz: 669b0bf005d96be102d4bf8c8138c2e86a60c2af03c0f16b27034cdf2e3b0a582855f6a03d614d17fcc64813512d60d06a8b761706365b3722607d5afc5b0072
|
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.30.
|
7
|
+
spec.version = '2.30.6'
|
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
|
|
@@ -80,119 +80,132 @@ module Honeybee
|
|
80
80
|
end
|
81
81
|
|
82
82
|
# create the HVAC system and assign the display name to the air loop name if it exists
|
83
|
-
|
84
|
-
|
83
|
+
openstudio_model.add_cbecs_hvac_system(standard, equipment_type, zones)
|
84
|
+
os_air_loops = []
|
85
85
|
air_loops = openstudio_model.getAirLoopHVACs
|
86
86
|
unless air_loops.length == $air_loop_count # check if any new loops were added
|
87
87
|
$air_loop_count = air_loops.length
|
88
|
-
os_air_terminal = []
|
89
88
|
zones.each do |zon|
|
90
89
|
os_air_terminal = zon.airLoopHVACTerminal
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
90
|
+
unless os_air_terminal.empty?
|
91
|
+
os_air_terminal = os_air_terminal.get
|
92
|
+
os_air_loop_opt = os_air_terminal.airLoopHVAC
|
93
|
+
unless os_air_loop_opt.empty?
|
94
|
+
os_air_loop = os_air_loop_opt.get
|
95
|
+
os_air_loops << os_air_loop
|
96
|
+
loop_name = os_air_loop.name
|
97
|
+
unless loop_name.empty?
|
98
|
+
# set the name of the air loop to align with the HVAC name
|
99
|
+
if @hash[:display_name]
|
100
|
+
clean_name = @hash[:display_name].to_s.gsub(/[^.A-Za-z0-9_-] /, " ")
|
101
|
+
os_air_loop.setName(clean_name + ' - ' + loop_name.get)
|
102
|
+
end
|
104
103
|
end
|
104
|
+
break if !equipment_type.include? 'PSZ' # multiple air loops have been added
|
105
105
|
end
|
106
106
|
end
|
107
107
|
end
|
108
108
|
end
|
109
109
|
|
110
110
|
# assign the economizer type if there's an air loop and the economizer is specified
|
111
|
-
if @hash[:economizer_type] &&
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
111
|
+
if @hash[:economizer_type] && !os_air_loops.empty?
|
112
|
+
os_air_loops.each do |os_air_loop|
|
113
|
+
oasys = os_air_loop.airLoopHVACOutdoorAirSystem
|
114
|
+
unless oasys.empty?
|
115
|
+
os_oasys = oasys.get
|
116
|
+
oactrl = os_oasys.getControllerOutdoorAir
|
117
|
+
oactrl.setEconomizerControlType(@hash[:economizer_type])
|
118
|
+
end
|
117
119
|
end
|
118
120
|
end
|
119
121
|
|
120
122
|
# set the sensible heat recovery if there's an air loop and the heat recovery is specified
|
121
|
-
if @hash[:sensible_heat_recovery] && @hash[:sensible_heat_recovery] != 0 &&
|
122
|
-
|
123
|
-
|
124
|
-
erv
|
123
|
+
if @hash[:sensible_heat_recovery] && @hash[:sensible_heat_recovery] != 0 && !os_air_loops.empty?
|
124
|
+
os_air_loops.each do |os_air_loop|
|
125
|
+
erv = get_existing_erv(os_air_loop)
|
126
|
+
unless erv
|
127
|
+
erv = create_erv(openstudio_model, os_air_loop)
|
128
|
+
end
|
129
|
+
eff_at_max = @hash[:sensible_heat_recovery] * (0.76 / 0.81) # taken from OpenStudio defaults
|
130
|
+
erv.setSensibleEffectivenessat100CoolingAirFlow(eff_at_max)
|
131
|
+
erv.setSensibleEffectivenessat100HeatingAirFlow(eff_at_max)
|
132
|
+
erv.setSensibleEffectivenessat75CoolingAirFlow(@hash[:sensible_heat_recovery])
|
133
|
+
erv.setSensibleEffectivenessat75HeatingAirFlow(@hash[:sensible_heat_recovery])
|
125
134
|
end
|
126
|
-
eff_at_max = @hash[:sensible_heat_recovery] * (0.76 / 0.81) # taken from OpenStudio defaults
|
127
|
-
erv.setSensibleEffectivenessat100CoolingAirFlow(eff_at_max)
|
128
|
-
erv.setSensibleEffectivenessat100HeatingAirFlow(eff_at_max)
|
129
|
-
erv.setSensibleEffectivenessat75CoolingAirFlow(@hash[:sensible_heat_recovery])
|
130
|
-
erv.setSensibleEffectivenessat75HeatingAirFlow(@hash[:sensible_heat_recovery])
|
131
135
|
end
|
132
136
|
|
133
137
|
# set the latent heat recovery if there's an air loop and the heat recovery is specified
|
134
|
-
if @hash[:latent_heat_recovery] && @hash[:latent_heat_recovery] != 0 &&
|
135
|
-
|
136
|
-
|
137
|
-
erv
|
138
|
+
if @hash[:latent_heat_recovery] && @hash[:latent_heat_recovery] != 0 && !os_air_loops.empty?
|
139
|
+
os_air_loops.each do |os_air_loop|
|
140
|
+
erv = get_existing_erv(os_air_loop)
|
141
|
+
unless erv
|
142
|
+
erv = create_erv(openstudio_model, os_air_loop)
|
143
|
+
end
|
144
|
+
eff_at_max = @hash[:latent_heat_recovery] * (0.68 / 0.73) # taken from OpenStudio defaults
|
145
|
+
erv.setLatentEffectivenessat100CoolingAirFlow(eff_at_max)
|
146
|
+
erv.setLatentEffectivenessat100HeatingAirFlow(eff_at_max)
|
147
|
+
erv.setLatentEffectivenessat75CoolingAirFlow(@hash[:latent_heat_recovery])
|
148
|
+
erv.setLatentEffectivenessat75HeatingAirFlow(@hash[:latent_heat_recovery])
|
138
149
|
end
|
139
|
-
eff_at_max = @hash[:latent_heat_recovery] * (0.68 / 0.73) # taken from OpenStudio defaults
|
140
|
-
erv.setLatentEffectivenessat100CoolingAirFlow(eff_at_max)
|
141
|
-
erv.setLatentEffectivenessat100HeatingAirFlow(eff_at_max)
|
142
|
-
erv.setLatentEffectivenessat75CoolingAirFlow(@hash[:latent_heat_recovery])
|
143
|
-
erv.setLatentEffectivenessat75HeatingAirFlow(@hash[:latent_heat_recovery])
|
144
150
|
end
|
145
151
|
|
146
152
|
# assign demand controlled ventilation if there's an air loop
|
147
|
-
if @hash[:demand_controlled_ventilation] &&
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
153
|
+
if @hash[:demand_controlled_ventilation] && !os_air_loops.empty?
|
154
|
+
os_air_loops.each do |os_air_loop|
|
155
|
+
oasys = os_air_loop.airLoopHVACOutdoorAirSystem
|
156
|
+
unless oasys.empty?
|
157
|
+
os_oasys = oasys.get
|
158
|
+
oactrl = os_oasys.getControllerOutdoorAir
|
159
|
+
vent_ctrl = oactrl.controllerMechanicalVentilation
|
160
|
+
vent_ctrl.setDemandControlledVentilationNoFail(true)
|
161
|
+
oactrl.resetMinimumFractionofOutdoorAirSchedule
|
162
|
+
end
|
155
163
|
end
|
156
164
|
end
|
157
165
|
|
158
166
|
# assign the DOAS availability schedule if there's an air loop and it is specified
|
159
|
-
if @hash[:doas_availability_schedule] &&
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
167
|
+
if @hash[:doas_availability_schedule] && !os_air_loops.empty?
|
168
|
+
os_air_loops.each do |os_air_loop|
|
169
|
+
schedule = openstudio_model.getScheduleByName(@hash[:doas_availability_schedule])
|
170
|
+
unless schedule.empty?
|
171
|
+
avail_sch = schedule.get
|
172
|
+
os_air_loop.setAvailabilitySchedule(avail_sch)
|
173
|
+
end
|
164
174
|
end
|
165
175
|
end
|
166
176
|
|
167
177
|
# set the outdoor air controller to respect room-level ventilation schedules if they exist
|
168
|
-
if
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
if oa_sch_name.nil? || space_oa_sch_name == oa_sch_name
|
185
|
-
oa_sch, oa_sch_name = space_oa_sch, space_oa_sch_name
|
186
|
-
else
|
187
|
-
oa_sch = nil
|
188
|
-
end
|
178
|
+
if !os_air_loops.empty?
|
179
|
+
oa_sch, oa_sch_name = nil, nil
|
180
|
+
zones.each do |zone|
|
181
|
+
oa_spec = zone.spaces[0].designSpecificationOutdoorAir
|
182
|
+
unless oa_spec.empty?
|
183
|
+
oa_spec = oa_spec.get
|
184
|
+
space_oa_sch = oa_spec.outdoorAirFlowRateFractionSchedule
|
185
|
+
unless space_oa_sch.empty?
|
186
|
+
space_oa_sch = space_oa_sch.get
|
187
|
+
space_oa_sch_name = space_oa_sch.name
|
188
|
+
unless space_oa_sch_name.empty?
|
189
|
+
space_oa_sch_name = space_oa_sch_name.get
|
190
|
+
if oa_sch_name.nil? || space_oa_sch_name == oa_sch_name
|
191
|
+
oa_sch, oa_sch_name = space_oa_sch, space_oa_sch_name
|
192
|
+
else
|
193
|
+
oa_sch = nil
|
189
194
|
end
|
190
195
|
end
|
191
196
|
end
|
192
197
|
end
|
193
|
-
|
194
|
-
|
195
|
-
|
198
|
+
end
|
199
|
+
|
200
|
+
if oa_sch
|
201
|
+
os_air_loops.each do |os_air_loop|
|
202
|
+
oasys = os_air_loop.airLoopHVACOutdoorAirSystem
|
203
|
+
unless oasys.empty?
|
204
|
+
os_oasys = oasys.get
|
205
|
+
oactrl = os_oasys.getControllerOutdoorAir
|
206
|
+
oactrl.resetMinimumFractionofOutdoorAirSchedule
|
207
|
+
oactrl.setMinimumOutdoorAirSchedule(oa_sch)
|
208
|
+
end
|
196
209
|
end
|
197
210
|
end
|
198
211
|
end
|
@@ -234,7 +247,7 @@ module Honeybee
|
|
234
247
|
end
|
235
248
|
|
236
249
|
# assign an electric humidifier if there's an air loop and the zones have a humidistat
|
237
|
-
if
|
250
|
+
if !os_air_loops.empty?
|
238
251
|
humidistat_exists = false
|
239
252
|
zones.each do |zone|
|
240
253
|
h_stat = zone.zoneControlHumidistat
|
@@ -243,7 +256,9 @@ module Honeybee
|
|
243
256
|
end
|
244
257
|
end
|
245
258
|
if humidistat_exists
|
246
|
-
|
259
|
+
os_air_loops.each do |os_air_loop|
|
260
|
+
humidifier = create_humidifier(openstudio_model, os_air_loop)
|
261
|
+
end
|
247
262
|
end
|
248
263
|
end
|
249
264
|
|
@@ -253,7 +268,6 @@ module Honeybee
|
|
253
268
|
sizing.setSizingOption('NonCoincident')
|
254
269
|
end
|
255
270
|
|
256
|
-
os_hvac
|
257
271
|
end
|
258
272
|
|
259
273
|
private
|
data/lib/to_openstudio/model.rb
CHANGED
@@ -564,7 +564,7 @@ module Honeybee
|
|
564
564
|
end
|
565
565
|
elsif TemplateHVAC.types.include?(system_type)
|
566
566
|
template_system = TemplateHVAC.new(hvac)
|
567
|
-
|
567
|
+
template_system.to_openstudio(@openstudio_model, hvac['rooms'])
|
568
568
|
end
|
569
569
|
end
|
570
570
|
end
|
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.30.
|
4
|
+
version: 2.30.6
|
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: 2022-03-
|
14
|
+
date: 2022-03-11 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|