honeybee-openstudio 2.6.1 → 2.6.6

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: cb2614a414bea5b5781814e138f23cf739ae38599acfa61613f9123d7811f29d
4
- data.tar.gz: 14d148cbab6a8a61b5712c309c450cbdb6233f5cb4b22a76f46c545d9b802f6f
3
+ metadata.gz: 441b7f7299d685f024debddb30a66437af776f87a6a8265e31d3930dbd445f65
4
+ data.tar.gz: 5628a169394fae8ba244c485847ff3c9a0e06fdc18480660aaacc384a7ade24b
5
5
  SHA512:
6
- metadata.gz: 3c60da64ccc91c00e56e44ccee33463bcf082c3712cad3c6138a53ec0e9cc5feb17fc8511b96a6cb6e09a3713cd31251527893e1de6c3dd7b754f2e5a2e3dbfa
7
- data.tar.gz: 99e583ab51832f6f716ad14f5582c9ba6e316326694bc7623ea2e8fdbc86f86ddf11b8fe22193c97c2737349610fde89416d3503eca883a259e2639aa5633fb1
6
+ metadata.gz: 824457466f2b48341f02121c6c77fd731433e01bf1fca30dbbd1aa54b033433ccded8e5a031c855b6f1a335bec8bb3b7c22d5ecc3471cf56761e88993638812b
7
+ data.tar.gz: 5cffeeaf970a6252b54c1bc1f4cb7208f8c3d9a3db46828bc2c9e5b2f469bc43a5f2b970d7954096056d8e95269cf43bee7f0c1e0e9b209e0e34b6faf5b53498
@@ -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.1'
7
+ spec.version = '2.6.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
 
@@ -21,4 +21,4 @@ else
21
21
  end
22
22
 
23
23
  # include the honeybee-openstudio-gem
24
- gem 'honeybee-openstudio', '2.5.3'
24
+ gem 'honeybee-openstudio', '2.6.4'
@@ -55,7 +55,12 @@ module FromHoneybee
55
55
  os_construction = OpenStudio::Model::ConstructionAirBoundary.new(openstudio_model)
56
56
  os_construction.setName(@hash[:identifier])
57
57
  os_construction.setSolarAndDaylightingMethod('GroupedZones')
58
- os_construction.setRadiantExchangeMethod('GroupedZones')
58
+ # REMOVE: Remove the use of IRTSurface once the AFN works with GroupedZone air walls
59
+ if !$use_simple_vent # we're using the AFN!
60
+ os_construction.setRadiantExchangeMethod('IRTSurface')
61
+ else
62
+ os_construction.setRadiantExchangeMethod('GroupedZones')
63
+ end
59
64
  os_construction.setAirExchangeMethod('None')
60
65
 
61
66
  os_construction
@@ -323,7 +323,7 @@ module FromHoneybee
323
323
  sub_f = opt_sub_f.get
324
324
  vent_open = VentilationOpening.new(opening)
325
325
  os_vent_open = vent_open.to_openstudio(
326
- openstudio_model, sub_f, @hash[:properties][:energy][:vent_open_control])
326
+ openstudio_model, sub_f, @hash[:properties][:energy][:window_vent_control])
327
327
  os_vent_open.addToThermalZone(os_thermal_zone)
328
328
  end
329
329
  end
@@ -533,12 +533,14 @@ module FromHoneybee
533
533
  system_type = hvac[:type]
534
534
  if system_type == 'IdealAirSystemAbridged'
535
535
  ideal_air_system = IdealAirSystemAbridged.new(hvac)
536
- os_ideal_air_system = ideal_air_system.to_openstudio(@openstudio_model)
537
536
  hvac['rooms'].each do |room_id|
537
+ os_ideal_air = ideal_air_system.to_openstudio(@openstudio_model)
538
+ # enforce a strict naming system for each zone so results can be matched
539
+ os_ideal_air.setName(room_id + ' Ideal Loads Air System')
538
540
  zone_get = @openstudio_model.getThermalZoneByName(room_id)
539
541
  unless zone_get.empty?
540
542
  os_thermal_zone = zone_get.get
541
- os_ideal_air_system.addToThermalZone(os_thermal_zone)
543
+ os_ideal_air.addToThermalZone(os_thermal_zone)
542
544
  end
543
545
  end
544
546
  elsif TemplateHVAC.types.include?(system_type)
@@ -138,7 +138,7 @@ module FromHoneybee
138
138
  openstudio_schedule_rule.setApplyFriday(rule[:apply_friday])
139
139
  openstudio_schedule_rule.setApplySaturday(rule[:apply_saturday])
140
140
  year_description = openstudio_model.getYearDescription
141
- start_date = year_description.makeDate(rule[:start_date][0], rule[:start_date][1])
141
+ start_date = year_description.makeDate(rule[:start_date][0], rule[:start_date][1])
142
142
  end_date = year_description.makeDate(rule[:end_date][0], rule[:end_date][1])
143
143
  openstudio_schedule_rule.setStartDate(start_date)
144
144
  openstudio_schedule_rule.setEndDate(end_date)
@@ -288,7 +288,18 @@ module FromHoneybee
288
288
  @hash[:run_period][:daylight_saving_time][:end_date][1])
289
289
  end
290
290
 
291
- # TODO: set the holidays once they are available in OpenStudio SDK
291
+ # Set the holidays
292
+ if @hash[:run_period][:holidays]
293
+ @hash[:run_period][:holidays].each do |hol|
294
+ begin
295
+ os_hol = OpenStudio::Model::RunPeriodControlSpecialDays.new(
296
+ OpenStudio::MonthOfYear.new(hol[0]), hol[1], @openstudio_model)
297
+ os_hol.setDuration(1)
298
+ os_hol.setSpecialDayType('Holiday')
299
+ rescue NoMethodError # REMOVE: Once the upgrade to OpenStudio 3.0 is official
300
+ end
301
+ end
302
+ end
292
303
  end
293
304
 
294
305
  # set the simulation timestep
@@ -98,6 +98,20 @@ module FromHoneybee
98
98
  @@sensor_count = @@sensor_count + 1
99
99
  in_air_temp.setName(in_sensor_name)
100
100
 
101
+ # set up a schedule sensor if there's a schedule specified
102
+ if @hash[:schedule]
103
+ vent_sch = openstudio_model.getScheduleByName(@hash[:schedule])
104
+ unless vent_sch.empty? # schedule not specified
105
+ sch_var = OpenStudio::Model::OutputVariable.new('Schedule Value', openstudio_model)
106
+ sch_var.setReportingFrequency('Timestep')
107
+ sch_var.setKeyValue(@hash[:schedule])
108
+ sch_sens = OpenStudio::Model::EnergyManagementSystemSensor.new(openstudio_model, sch_var)
109
+ sch_sensor_name = replace_ems_special_characters(os_zone_name) + '_Sensor' + @@sensor_count.to_s
110
+ @@sensor_count = @@sensor_count + 1
111
+ sch_sens.setName(sch_sensor_name)
112
+ end
113
+ end
114
+
101
115
  # create the actuators for each of the operaable windows
102
116
  actuator_names = []
103
117
  vent_opening_surfaces.each do |vent_srf|
@@ -140,6 +154,10 @@ module FromHoneybee
140
154
  if delta_in_out && delta_in_out != defaults[:delta_temperature][:default]
141
155
  logic_statements << '((' + in_sensor_name + ' - Outdoor_Sensor) > ' + delta_in_out.to_s + ')'
142
156
  end
157
+ # check the schedule for ventilation
158
+ if sch_sensor_name
159
+ logic_statements << '(' + sch_sensor_name + ' > 0)'
160
+ end
143
161
  # create the complete logic statement for opening windows
144
162
  if logic_statements.empty?
145
163
  complete_logic = 'IF (Outdoor_Sensor < 100)' # no logic has been provided; always open windows
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.1
4
+ version: 2.6.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: 2020-09-02 00:00:00.000000000 Z
14
+ date: 2020-10-18 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler