honeybee-openstudio 2.30.3 → 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/from_openstudio/geometry/room.rb +11 -0
- data/lib/honeybee/_defaults/model.json +8 -2
- data/lib/to_openstudio/geometry/room.rb +5 -0
- data/lib/to_openstudio/hvac/ideal_air.rb +3 -0
- 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
|
|
@@ -56,6 +56,9 @@ module Honeybee
|
|
56
56
|
multipler = multiplier_from_space(space)
|
57
57
|
hash[:multipler] = multipler if multipler
|
58
58
|
|
59
|
+
exclude_floor_area = exclude_floor_area_from_space(space)
|
60
|
+
hash[:exclude_floor_area] = exclude_floor_area
|
61
|
+
|
59
62
|
story = story_from_space(space)
|
60
63
|
hash[:story] = story if story
|
61
64
|
|
@@ -279,6 +282,14 @@ module Honeybee
|
|
279
282
|
nil
|
280
283
|
end
|
281
284
|
|
285
|
+
def self.exclude_floor_area_from_space(space)
|
286
|
+
incl_floor = space.partofTotalFloorArea
|
287
|
+
if incl_floor
|
288
|
+
return false
|
289
|
+
end
|
290
|
+
true
|
291
|
+
end
|
292
|
+
|
282
293
|
def self.story_from_space(space)
|
283
294
|
story = space.buildingStory
|
284
295
|
if !story.empty?
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"servers": [],
|
4
4
|
"info": {
|
5
5
|
"description": "Honeybee model schema.",
|
6
|
-
"version": "1.
|
6
|
+
"version": "1.48.1",
|
7
7
|
"title": "Honeybee Model Schema",
|
8
8
|
"contact": {
|
9
9
|
"name": "Ladybug Tools",
|
@@ -3493,6 +3493,12 @@
|
|
3493
3493
|
"type": "integer",
|
3494
3494
|
"format": "int32"
|
3495
3495
|
},
|
3496
|
+
"exclude_floor_area": {
|
3497
|
+
"title": "Exclude Floor Area",
|
3498
|
+
"description": "A boolean for whether the Room floor area contributes to Models it is a part of. Note that this will not affect the floor_area property of this Room itself but it will ensure the Room floor area is excluded from any calculations when the Room is part of a Model, including EUI calculations.",
|
3499
|
+
"default": false,
|
3500
|
+
"type": "boolean"
|
3501
|
+
},
|
3496
3502
|
"story": {
|
3497
3503
|
"title": "Story",
|
3498
3504
|
"description": "Text string for the story identifier to which this Room belongs. Rooms sharing the same story identifier are considered part of the same story in a Model.",
|
@@ -13827,7 +13833,7 @@
|
|
13827
13833
|
"version": {
|
13828
13834
|
"title": "Version",
|
13829
13835
|
"description": "Text string for the current version of the schema.",
|
13830
|
-
"default": "1.
|
13836
|
+
"default": "1.48.1",
|
13831
13837
|
"pattern": "([0-9]+)\\.([0-9]+)\\.([0-9]+)",
|
13832
13838
|
"type": "string",
|
13833
13839
|
"readOnly": true
|
@@ -109,6 +109,11 @@ module Honeybee
|
|
109
109
|
os_thermal_zone.setMultiplier(@hash[:multiplier])
|
110
110
|
end
|
111
111
|
|
112
|
+
# assign the exclude_floor_area
|
113
|
+
if @hash[:exclude_floor_area]
|
114
|
+
os_space.setPartofTotalFloorArea(false)
|
115
|
+
end
|
116
|
+
|
112
117
|
# assign the geometry properties if they exist
|
113
118
|
if @hash[:ceiling_height]
|
114
119
|
os_thermal_zone.setCeilingHeight(@hash[:ceiling_height])
|
@@ -43,6 +43,9 @@ module Honeybee
|
|
43
43
|
unless @hash[:display_name].nil?
|
44
44
|
os_ideal_air.setDisplayName(@hash[:display_name])
|
45
45
|
end
|
46
|
+
# use no dehumidification unless there's a humidistat
|
47
|
+
os_ideal_air.setDehumidificationControlType('None')
|
48
|
+
|
46
49
|
# assign the economizer type
|
47
50
|
if @hash[:economizer_type]
|
48
51
|
os_ideal_air.setOutdoorAirEconomizerType(@hash[:economizer_type])
|
@@ -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-
|
14
|
+
date: 2022-03-11 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|