honeybee-openstudio 2.33.7 → 2.34.0

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: 851a084f0894099724dc078d840065a7cdc937cb35b95cbce8987531ad3d0832
4
- data.tar.gz: bbc0285689ba78e3edaaa00bab9ec0124cd61b99e505ea95a530c5b98ce56703
3
+ metadata.gz: 0db23d24e0621410e05134519babfe4ae11c803b8df518b3e587afb836eb0304
4
+ data.tar.gz: b2984946072c3c094057e5e0f97dd52c15012290fa6953d1b245d95c9f9f6a06
5
5
  SHA512:
6
- metadata.gz: 0ee011f3f35beed0b80fc15ee4108c9516806b93db9ca0b6f5c188a943ff62571271f384281ec5b2746dfb19696eea84488a68e71a2df660094d90988f1b15b2
7
- data.tar.gz: 9fbb52f03d60d499b035ff0a639304d1b4e478724c20152b9c72defbddff004664729254260af1215d2825b2660b96ee06faeceeca2b8a0358791fbf93e71652
6
+ metadata.gz: e948fb628063eb9f0d7bc6477aaa3e05b425cc68ac0e3127472a7a8df34f7050d70901538f39656aaa39198465a6515ccc9697d632d38249ac1914e218f9dafc
7
+ data.tar.gz: 46cf5d6d1619847528ce5ae15b592dab6c16492b87deb13ca38c5270af7918af581e18891b6062c3904f3b9b0322812815e53cb633dde1699f2b580461650005
@@ -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.33.7'
7
+ spec.version = '2.34.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
 
@@ -153,6 +153,42 @@ class FromHoneybeeModel < OpenStudio::Measure::ModelMeasure
153
153
  end
154
154
  end
155
155
 
156
+ # if an efficiency standard has been set on the model, then run sizing and set everything
157
+ building = model.getBuilding
158
+ unless building.standardsTemplate.empty?
159
+ puts 'Autosizing HVAC systems and assigning efficiencies'
160
+ standard_id = building.standardsTemplate.get
161
+ require 'openstudio-standards'
162
+ standard = Standard.build(standard_id)
163
+ # Set the heating and cooling sizing parameters
164
+ standard.model_apply_prm_sizing_parameters(model)
165
+ # Perform a sizing run
166
+ if standard.model_run_sizing_run(model, "#{Dir.pwd}/SR1") == false
167
+ log_messages_to_runner(runner, debug = true)
168
+ return false
169
+ end
170
+ # If there are any multizone systems, reset damper positions
171
+ # to achieve a 60% ventilation effectiveness minimum for the system
172
+ # following the ventilation rate procedure from 62.1
173
+ standard.model_apply_multizone_vav_outdoor_air_sizing(model)
174
+ # get the climate zone
175
+ climate_zone_obj = model.getClimateZones.getClimateZone('ASHRAE', 2006)
176
+ if climate_zone_obj.empty
177
+ climate_zone_obj = model.getClimateZones.getClimateZone('ASHRAE', 2013)
178
+ end
179
+ climate_zone = climate_zone_obj.value
180
+ # get the building type
181
+ bldg_type = nil
182
+ unless building.standardsBuildingType.empty?
183
+ bldg_type = building.standardsBuildingType.get
184
+ end
185
+ # Apply the prototype HVAC assumptions
186
+ standard.model_apply_prototype_hvac_assumptions(model, bldg_type, climate_zone)
187
+ # Apply the HVAC efficiency standard
188
+ standard.model_apply_hvac_efficiency_standard(model, climate_zone)
189
+ puts 'Done with autosizing HVAC systems!'
190
+ end
191
+
156
192
  puts 'Done with Model translation!'
157
193
 
158
194
  # copy the CSV schedules into the directory where EnergyPlus can find them
@@ -308,6 +308,10 @@ class OpenStudio::Model::Model
308
308
  when 'Furnace'
309
309
  # includes ventilation, whereas residential forced air furnace does not.
310
310
  standard.model_add_hvac_system(self, 'Forced Air Furnace', ht = 'NaturalGas', znht = nil, cl = nil, heated_zones)
311
+
312
+ when 'Furnace_Electric'
313
+ # includes ventilation, whereas residential forced air furnace does not.
314
+ standard.model_add_hvac_system(self, 'Forced Air Furnace', ht = 'Electricity', znht = nil, cl = nil, heated_zones)
311
315
 
312
316
  when 'GasHeaters'
313
317
  standard.model_add_hvac_system(self, 'Unit Heaters', ht = 'NaturalGas', znht = nil, cl = nil, heated_zones)
@@ -90,26 +90,28 @@ module Honeybee
90
90
 
91
91
  # Get the air loops and assign the display name to the air loop name if it exists
92
92
  os_air_loops = []
93
- air_loops = openstudio_model.getAirLoopHVACs
94
- unless air_loops.length == $air_loop_count # check if any new loops were added
95
- $air_loop_count = air_loops.length
96
- zones.each do |zon|
97
- os_air_terminal = zon.airLoopHVACTerminal
98
- unless os_air_terminal.empty?
99
- os_air_terminal = os_air_terminal.get
100
- os_air_loop_opt = os_air_terminal.airLoopHVAC
101
- unless os_air_loop_opt.empty?
102
- os_air_loop = os_air_loop_opt.get
103
- os_air_loops << os_air_loop
104
- loop_name = os_air_loop.name
105
- unless loop_name.empty?
106
- # set the name of the air loop to align with the HVAC name
107
- if @hash[:display_name]
108
- clean_name = @hash[:display_name].to_s.gsub(/[^.A-Za-z0-9_-] /, " ")
109
- os_air_loop.setName(clean_name + ' - ' + loop_name.get)
93
+ unless equipment_type.to_s.include? 'Furnace'
94
+ air_loops = openstudio_model.getAirLoopHVACs
95
+ unless air_loops.length == $air_loop_count
96
+ $air_loop_count = air_loops.length
97
+ zones.each do |zon|
98
+ os_air_terminal = zon.airLoopHVACTerminal
99
+ unless os_air_terminal.empty?
100
+ os_air_terminal = os_air_terminal.get
101
+ os_air_loop_opt = os_air_terminal.airLoopHVAC
102
+ unless os_air_loop_opt.empty?
103
+ os_air_loop = os_air_loop_opt.get
104
+ os_air_loops << os_air_loop
105
+ loop_name = os_air_loop.name
106
+ unless loop_name.empty?
107
+ # set the name of the air loop to align with the HVAC name
108
+ if @hash[:display_name]
109
+ clean_name = @hash[:display_name].to_s.gsub(/[^.A-Za-z0-9_-] /, " ")
110
+ os_air_loop.setName(clean_name + ' - ' + loop_name.get)
111
+ end
110
112
  end
113
+ break if !equipment_type.include? 'PSZ' # multiple air loops have been added
111
114
  end
112
- break if !equipment_type.include? 'PSZ' # multiple air loops have been added
113
115
  end
114
116
  end
115
117
  end
@@ -197,6 +199,21 @@ module Honeybee
197
199
  end
198
200
  end
199
201
 
202
+ # change furnace to electric if specified
203
+ if equipment_type.to_s.include? 'Furnace_Electric'
204
+ openstudio_model.getAirLoopHVACUnitarySystems.sort.each do |obj|
205
+ unless obj.heatingCoil.empty?
206
+ old_coil = obj.heatingCoil.get
207
+ heat_coil = OpenStudio::Model::CoilHeatingElectric.new(openstudio_model)
208
+ unless old_coil.name.empty?
209
+ heat_coil.setName(old_coil.name.get)
210
+ end
211
+ obj.setHeatingCoil(heat_coil)
212
+ old_coil.remove()
213
+ end
214
+ end
215
+ end
216
+
200
217
  # assign the economizer type if there's an air loop and the economizer is specified
201
218
  if @hash[:economizer_type] && !os_air_loops.empty?
202
219
  os_air_loops.each do |os_air_loop|
@@ -101,7 +101,9 @@ module Honeybee
101
101
  def create_openstudio_objects(log_report=true)
102
102
  # assign a standards building type so that David's measures can run
103
103
  building = @openstudio_model.getBuilding
104
- building.setStandardsBuildingType('MediumOffice')
104
+ if building.standardsBuildingType.empty?
105
+ building.setStandardsBuildingType('MediumOffice')
106
+ end
105
107
 
106
108
  # initialize a global variable for whether the AFN is used instead of simple ventilation
107
109
  $use_simple_vent = true
@@ -35,6 +35,16 @@ require 'openstudio'
35
35
 
36
36
  module Honeybee
37
37
  class SimulationParameter
38
+ @@standard_mapper = {
39
+ DOE_Ref_Pre_1980: 'DOE Ref Pre-1980',
40
+ DOE_Ref_1980_2004: 'DOE Ref 1980-2004',
41
+ ASHRAE_2004: '90.1-2004',
42
+ ASHRAE_2007: '90.1-2007',
43
+ ASHRAE_2010: '90.1-2010',
44
+ ASHRAE_2013: '90.1-2013',
45
+ ASHRAE_2016: '90.1-2016',
46
+ ASHRAE_2019: '90.1-2019'
47
+ }
38
48
 
39
49
  # convert to openstudio model, clears errors and warnings
40
50
  def to_openstudio_model(openstudio_model=nil, log_report=false)
@@ -226,6 +236,22 @@ module Honeybee
226
236
  climate_zone_objs.setClimateZone('ASHRAE', cz)
227
237
  end
228
238
 
239
+ # note any efficency standards that have been assigned to the
240
+ if @hash[:sizing_parameter]
241
+ if @hash[:sizing_parameter][:efficiency_standard]
242
+ std_gem_standard = @@standard_mapper[@hash[:sizing_parameter][:efficiency_standard].to_sym]
243
+ building = @openstudio_model.getBuilding
244
+ building.setStandardsTemplate(std_gem_standard)
245
+ end
246
+ if @hash[:sizing_parameter][:climate_zone]
247
+ climate_zone_objs.setClimateZone('ASHRAE', @hash[:sizing_parameter][:climate_zone])
248
+ end
249
+ if @hash[:sizing_parameter][:building_type]
250
+ building = @openstudio_model.getBuilding
251
+ building.setStandardsBuildingType(@hash[:sizing_parameter][:building_type])
252
+ end
253
+ end
254
+
229
255
  # set Outputs for the simulation
230
256
  if @hash[:output]
231
257
  if @hash[:output][:outputs]
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.33.7
4
+ version: 2.34.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: 2023-01-27 00:00:00.000000000 Z
14
+ date: 2023-02-11 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: json_pure