Class: ASHRAE9012013

Inherits:
ASHRAE901 show all
Includes:
ASHRAE9012013CoolingTower
Defined in:
lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.rb,
lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.rb,
lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Space.rb,
lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.PlantLoop.rb,
lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirLoopHVAC.rb,
lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.ThermalZone.rb,
lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.WaterHeaterMixed.rb,
lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.FanVariableVolume.rb,
lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.CoolingTowerTwoSpeed.rb,
lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.CoolingTowerSingleSpeed.rb,
lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.CoolingTowerVariableSpeed.rb,
lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb,
lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.rb,
lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.FanOnOff.rb,
lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.hvac_systems.rb,
lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.elevators.rb,
lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.FanConstantVolume.rb,
lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.FanVariableVolume.rb,
lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb

Overview

This class holds methods that apply ASHRAE 90.1-2013 to a given model.

Technical References:

Constant Summary collapse

@@template =

rubocop:disable Style/ClassVars

'90.1-2013'

Instance Attribute Summary collapse

Model collapse

Space collapse

PlantLoop collapse

AirLoopHVAC collapse

ThermalZone collapse

WaterHeaterMixed collapse

FanVariableVolume collapse

AirTerminalSingleDuctVAVReheat collapse

FanOnOff collapse

hvac_systems collapse

elevators collapse

FanConstantVolume collapse

CoolingTower collapse

Instance Method Summary collapse

Constructor Details

#initializeASHRAE9012013


9
10
11
12
13
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.rb', line 9

def initialize
  super()
  @template = @@template
  load_standards_database
end

Instance Attribute Details

#templateObject (readonly)

Returns the value of attribute template


7
8
9
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.rb', line 7

def template
  @template
end

Instance Method Details

#air_loop_hvac_apply_multizone_vav_outdoor_air_sizing(air_loop_hvac) ⇒ Object

TODO:

move building-type-specific code to Prototype classes

Apply multizone vav outdoor air method and adjust multizone VAV damper positions to achieve a system minimum ventilation effectiveness of 0.6 per PNNL. Hard-size the resulting min OA into the sizing:system object.

return [Bool] returns true if successful, false if not


12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirLoopHVAC.rb', line 12

def air_loop_hvac_apply_multizone_vav_outdoor_air_sizing(air_loop_hvac)
  # First time adjustment:
  # Only applies to multi-zone vav systems
  # exclusion: for Outpatient: (1) both AHU1 and AHU2 in 'DOE Ref Pre-1980' and 'DOE Ref 1980-2004'
  # (2) AHU1 in 2004-2013
  # TODO refactor: move building-type-specific code to Prototype classes
  if air_loop_hvac_multizone_vav_system?(air_loop_hvac) && !(air_loop_hvac.name.to_s.include? 'Outpatient F1')
    air_loop_hvac_adjust_minimum_vav_damper_positions(air_loop_hvac)
  end

  # Second time adjustment:
  # Only apply to 2010 and 2013 Outpatient (both AHU1 and AHU2)
  # TODO maybe apply to hospital as well?
  # TODO refactor: move building-type-specific code to Prototype classes
  if air_loop_hvac.name.to_s.include? 'Outpatient'
    air_loop_hvac_adjust_minimum_vav_damper_positions_outpatient(air_loop_hvac)
  end

  return true
end

#air_loop_hvac_demand_control_ventilation_limits(air_loop_hvac) ⇒ Array<Double>

Determines the OA flow rates above which an economizer is required. Two separate rates, one for systems with an economizer and another for systems without. are zero for both types.


294
295
296
297
298
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirLoopHVAC.rb', line 294

def air_loop_hvac_demand_control_ventilation_limits(air_loop_hvac)
  min_oa_without_economizer_cfm = 3000
  min_oa_with_economizer_cfm = 750
  return [min_oa_without_economizer_cfm, min_oa_with_economizer_cfm]
end

#air_loop_hvac_economizer_limits(air_loop_hvac, climate_zone) ⇒ Array<Double>

Determine the limits for the type of economizer present on the AirLoopHVAC, if any.


36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirLoopHVAC.rb', line 36

def air_loop_hvac_economizer_limits(air_loop_hvac, climate_zone)
  drybulb_limit_f = nil
  enthalpy_limit_btu_per_lb = nil
  dewpoint_limit_f = nil

  # Get the OA system and OA controller
  oa_sys = air_loop_hvac.airLoopHVACOutdoorAirSystem
  if oa_sys.is_initialized
    oa_sys = oa_sys.get
  else
    return [nil, nil, nil] # No OA system
  end
  oa_control = oa_sys.getControllerOutdoorAir
  economizer_type = oa_control.getEconomizerControlType

  case economizer_type
  when 'NoEconomizer'
    return [nil, nil, nil]
  when 'FixedDryBulb'
    case climate_zone
    when 'ASHRAE 169-2006-1B',
        'ASHRAE 169-2006-2B',
        'ASHRAE 169-2006-3B',
        'ASHRAE 169-2006-3C',
        'ASHRAE 169-2006-4B',
        'ASHRAE 169-2006-4C',
        'ASHRAE 169-2006-5B',
        'ASHRAE 169-2006-5C',
        'ASHRAE 169-2006-6B',
        'ASHRAE 169-2006-7A',
        'ASHRAE 169-2006-7B',
        'ASHRAE 169-2006-8A',
        'ASHRAE 169-2006-8B'
      drybulb_limit_f = 75
    when 'ASHRAE 169-2006-5A',
        'ASHRAE 169-2006-6A'
      drybulb_limit_f = 70
    end
  when 'FixedEnthalpy'
    enthalpy_limit_btu_per_lb = 28
  when 'FixedDewPointAndDryBulb'
    drybulb_limit_f = 75
    dewpoint_limit_f = 55
  end

  return [drybulb_limit_f, enthalpy_limit_btu_per_lb, dewpoint_limit_f]
end

#air_loop_hvac_economizer_type_allowable?(air_loop_hvac, climate_zone) ⇒ Bool

Check the economizer type currently specified in the ControllerOutdoorAir object on this air loop is acceptable per the standard.

Returns false if the economizer type is not allowable.


139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirLoopHVAC.rb', line 139

def air_loop_hvac_economizer_type_allowable?(air_loop_hvac, climate_zone)
  # EnergyPlus economizer types
  # 'NoEconomizer'
  # 'FixedDryBulb'
  # 'FixedEnthalpy'
  # 'DifferentialDryBulb'
  # 'DifferentialEnthalpy'
  # 'FixedDewPointAndDryBulb'
  # 'ElectronicEnthalpy'
  # 'DifferentialDryBulbAndEnthalpy'

  # Get the OA system and OA controller
  oa_sys = air_loop_hvac.airLoopHVACOutdoorAirSystem
  if oa_sys.is_initialized
    oa_sys = oa_sys.get
  else
    return true # No OA system
  end
  oa_control = oa_sys.getControllerOutdoorAir
  economizer_type = oa_control.getEconomizerControlType

  # Return true if no economizer is present
  if economizer_type == 'NoEconomizer'
    return true
  end

  # Determine the prohibited types
  prohibited_types = []
  case climate_zone
  when 'ASHRAE 169-2006-1B',
      'ASHRAE 169-2006-2B',
      'ASHRAE 169-2006-3B',
      'ASHRAE 169-2006-3C',
      'ASHRAE 169-2006-4B',
      'ASHRAE 169-2006-4C',
      'ASHRAE 169-2006-5B',
      'ASHRAE 169-2006-6B',
      'ASHRAE 169-2006-7A',
      'ASHRAE 169-2006-7B',
      'ASHRAE 169-2006-8A',
      'ASHRAE 169-2006-8B'
    prohibited_types = ['FixedEnthalpy']
  when
    'ASHRAE 169-2006-1A',
      'ASHRAE 169-2006-2A',
      'ASHRAE 169-2006-3A',
      'ASHRAE 169-2006-4A'
    prohibited_types = ['FixedDryBulb', 'DifferentialDryBulb']
  when
    'ASHRAE 169-2006-5A',
      'ASHRAE 169-2006-6A',
      prohibited_types = []
  end

  # Check if the specified type is allowed
  economizer_type_allowed = true
  if prohibited_types.include?(economizer_type)
    economizer_type_allowed = false
  end

  return economizer_type_allowed
end

#air_loop_hvac_energy_recovery_ventilator_flow_limit(air_loop_hvac, climate_zone, pct_oa) ⇒ Double

Determine the airflow limits that govern whether or not an ERV is required. Based on climate zone and % OA, plus the number of operating hours the system has. if nil, ERV is never required.


387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirLoopHVAC.rb', line 387

def air_loop_hvac_energy_recovery_ventilator_flow_limit(air_loop_hvac, climate_zone, pct_oa)
  # Calculate the number of system operating hours
  # based on the availability schedule.
  ann_op_hrs = 0.0
  avail_sch = air_loop_hvac.availabilitySchedule
  if avail_sch == air_loop_hvac.model.alwaysOnDiscreteSchedule
    ann_op_hrs = 8760.0
  elsif avail_sch.to_ScheduleRuleset.is_initialized
    avail_sch = avail_sch.to_ScheduleRuleset.get
    ann_op_hrs = schedule_ruleset_annual_hours_above_value(avail_sch, 0.0)
  else
    OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.AirLoopHVAC', "For #{air_loop_hvac.name}: could not determine annual operating hours. Assuming less than 8,000 for ERV determination.")
  end

  if ann_op_hrs < 8000.0    # Table 6.5.6.1-1, less than 8000 hrs

    case climate_zone
    when 'ASHRAE 169-2006-3B', 'ASHRAE 169-2006-3C', 'ASHRAE 169-2006-4B', 'ASHRAE 169-2006-4C', 'ASHRAE 169-2006-5B'
      if pct_oa < 0.1
        erv_cfm = nil
      elsif pct_oa >= 0.1 && pct_oa < 0.2
        erv_cfm = nil
      elsif pct_oa >= 0.2 && pct_oa < 0.3
        erv_cfm = nil
      elsif pct_oa >= 0.3 && pct_oa < 0.4
        erv_cfm = nil
      elsif pct_oa >= 0.4 && pct_oa < 0.5
        erv_cfm = nil
      elsif pct_oa >= 0.5 && pct_oa < 0.6
        erv_cfm = nil
      elsif pct_oa >= 0.6 && pct_oa < 0.7
        erv_cfm = nil
      elsif pct_oa >= 0.7 && pct_oa < 0.8
        erv_cfm = nil
      elsif pct_oa >= 0.8
        erv_cfm = nil
      end
    when 'ASHRAE 169-2006-1B', 'ASHRAE 169-2006-2B', 'ASHRAE 169-2006-5C'
      if pct_oa < 0.1
        erv_cfm = nil
      elsif pct_oa >= 0.1 && pct_oa < 0.2
        erv_cfm = nil
      elsif pct_oa >= 0.2 && pct_oa < 0.3
        erv_cfm = nil
      elsif pct_oa >= 0.3 && pct_oa < 0.4
        erv_cfm = nil
      elsif pct_oa >= 0.4 && pct_oa < 0.5
        erv_cfm = nil
      elsif pct_oa >= 0.5 && pct_oa < 0.6
        erv_cfm = 26_000
      elsif pct_oa >= 0.6 && pct_oa < 0.7
        erv_cfm = 12_000
      elsif pct_oa >= 0.7 && pct_oa < 0.8
        erv_cfm = 5000
      elsif pct_oa >= 0.8
        erv_cfm = 4000
      end
    when 'ASHRAE 169-2006-6B'
      if pct_oa < 0.1
        erv_cfm = nil
      elsif pct_oa >= 0.1 && pct_oa < 0.2
        erv_cfm = 28_000
      elsif pct_oa >= 0.2 && pct_oa < 0.3
        erv_cfm = 26_500
      elsif pct_oa >= 0.3 && pct_oa < 0.4
        erv_cfm = 11_000
      elsif pct_oa >= 0.4 && pct_oa < 0.5
        erv_cfm = 5500
      elsif pct_oa >= 0.5 && pct_oa < 0.6
        erv_cfm = 4500
      elsif pct_oa >= 0.6 && pct_oa < 0.7
        erv_cfm = 3500
      elsif pct_oa >= 0.7 && pct_oa < 0.8
        erv_cfm = 2500
      elsif pct_oa >= 0.8
        erv_cfm = 1500
      end
    when 'ASHRAE 169-2006-1A', 'ASHRAE 169-2006-2A', 'ASHRAE 169-2006-3A', 'ASHRAE 169-2006-4A', 'ASHRAE 169-2006-5A', 'ASHRAE 169-2006-6A'
      if pct_oa < 0.1
        erv_cfm = nil
      elsif pct_oa >= 0.1 && pct_oa < 0.2
        erv_cfm = 26_000
      elsif pct_oa >= 0.2 && pct_oa < 0.3
        erv_cfm = 16_000
      elsif pct_oa >= 0.3 && pct_oa < 0.4
        erv_cfm = 5500
      elsif pct_oa >= 0.4 && pct_oa < 0.5
        erv_cfm = 4500
      elsif pct_oa >= 0.5 && pct_oa < 0.6
        erv_cfm = 3500
      elsif pct_oa >= 0.6 && pct_oa < 0.7
        erv_cfm = 2000
      elsif pct_oa >= 0.7 && pct_oa < 0.8
        erv_cfm = 1000
      elsif pct_oa >= 0.8
        erv_cfm = 0
      end
    when 'ASHRAE 169-2006-7A', 'ASHRAE 169-2006-7B', 'ASHRAE 169-2006-8A', 'ASHRAE 169-2006-8B'
      if pct_oa < 0.1
        erv_cfm = nil
      elsif pct_oa >= 0.1 && pct_oa < 0.2
        erv_cfm = 4500
      elsif pct_oa >= 0.2 && pct_oa < 0.3
        erv_cfm = 4000
      elsif pct_oa >= 0.3 && pct_oa < 0.4
        erv_cfm = 2500
      elsif pct_oa >= 0.4 && pct_oa < 0.5
        erv_cfm = 1000
      elsif pct_oa >= 0.5 && pct_oa < 0.6
        erv_cfm = 0
      elsif pct_oa >= 0.6 && pct_oa < 0.7
        erv_cfm = 0
      elsif pct_oa >= 0.7 && pct_oa < 0.8
        erv_cfm = 0
      elsif pct_oa >= 0.8
        erv_cfm = 0
      end
    end
  else
    # Table 6.5.6.1-2, above 8000 hrs
    case climate_zone
    when 'ASHRAE 169-2006-3C'
      erv_cfm = nil
    when 'ASHRAE 169-2006-1B', 'ASHRAE 169-2006-2B', 'ASHRAE 169-2006-3B', 'ASHRAE 169-2006-4C', 'ASHRAE 169-2006-5C'
      if pct_oa < 0.1
        erv_cfm = nil
      elsif pct_oa >= 0.1 && pct_oa < 0.2
        erv_cfm = nil
      elsif pct_oa >= 0.2 && pct_oa < 0.3
        erv_cfm = 19_500
      elsif pct_oa >= 0.3 && pct_oa < 0.4
        erv_cfm = 9000
      elsif pct_oa >= 0.4 && pct_oa < 0.5
        erv_cfm = 5000
      elsif pct_oa >= 0.5 && pct_oa < 0.6
        erv_cfm = 4000
      elsif pct_oa >= 0.6 && pct_oa < 0.7
        erv_cfm = 3000
      elsif pct_oa >= 0.7 && pct_oa < 0.8
        erv_cfm = 1500
      elsif pct_oa >= 0.8
        erv_cfm = 0
      end
    when 'ASHRAE 169-2006-1A', 'ASHRAE 169-2006-2A', 'ASHRAE 169-2006-3A', 'ASHRAE 169-2006-4B', 'ASHRAE 169-2006-5B'
      if pct_oa < 0.1
        erv_cfm = nil
      elsif pct_oa >= 0.1 && pct_oa < 0.2
        erv_cfm = 2500
      elsif pct_oa >= 0.2 && pct_oa < 0.3
        erv_cfm = 2000
      elsif pct_oa >= 0.3 && pct_oa < 0.4
        erv_cfm = 1000
      elsif pct_oa >= 0.4 && pct_oa < 0.5
        erv_cfm = 500
      elsif pct_oa >= 0.5
        erv_cfm = 0
      end
    when 'ASHRAE 169-2006-4A', 'ASHRAE 169-2006-5A', 'ASHRAE 169-2006-6A', 'ASHRAE 169-2006-6B', 'ASHRAE 169-2006-7A', 'ASHRAE 169-2006-7B', 'ASHRAE 169-2006-8A', 'ASHRAE 169-2006-8B'
      if pct_oa < 0.1
        erv_cfm = nil
      elsif pct_oa >= 0.1
        erv_cfm = 0
      end
    end
  end

  return erv_cfm
end

#air_loop_hvac_integrated_economizer_required?(air_loop_hvac, climate_zone) ⇒ Boolean

Determine if the system economizer must be integrated or not. All economizers must be integrated in 90.1-2013


86
87
88
89
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirLoopHVAC.rb', line 86

def air_loop_hvac_integrated_economizer_required?(air_loop_hvac, climate_zone)
  integrated_economizer_required = true
  return integrated_economizer_required
end

#air_loop_hvac_motorized_oa_damper_limits(air_loop_hvac, climate_zone) ⇒ Array<Double>

Determine the air flow and number of story limits for whether motorized OA damper is required.


303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirLoopHVAC.rb', line 303

def air_loop_hvac_motorized_oa_damper_limits(air_loop_hvac, climate_zone)
  case climate_zone
  when 'ASHRAE 169-2006-1A',
      'ASHRAE 169-2006-1B',
      'ASHRAE 169-2006-2A',
      'ASHRAE 169-2006-2B',
      'ASHRAE 169-2006-3A',
      'ASHRAE 169-2006-3B',
      'ASHRAE 169-2006-3C',
    minimum_oa_flow_cfm = 300
    maximum_stories = 999 # Any number of stories
  else
    minimum_oa_flow_cfm = 300
    maximum_stories = 0
  end

  return [minimum_oa_flow_cfm, maximum_stories]
end

#air_loop_hvac_multizone_vav_optimization_required?(air_loop_hvac, climate_zone) ⇒ Bool

TODO:

Add exception logic for systems with AIA healthcare ventilation requirements dual duct systems

Determine if multizone vav optimization is required.


209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirLoopHVAC.rb', line 209

def air_loop_hvac_multizone_vav_optimization_required?(air_loop_hvac, climate_zone)
  multizone_opt_required = false

  # Not required for systems with fan-powered terminals
  num_fan_powered_terminals = 0
  air_loop_hvac.demandComponents.each do |comp|
    if comp.to_AirTerminalSingleDuctParallelPIUReheat.is_initialized || comp.to_AirTerminalSingleDuctSeriesPIUReheat.is_initialized
      num_fan_powered_terminals += 1
    end
  end
  if num_fan_powered_terminals > 0
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.AirLoopHVAC', "For #{air_loop_hvac.name}, multizone vav optimization is not required because the system has #{num_fan_powered_terminals} fan-powered terminals.")
    return multizone_opt_required
  end

  # Not required for systems that require an ERV
  if air_loop_hvac_energy_recovery?(air_loop_hvac)
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.AirLoopHVAC', "For #{air_loop_hvac.name}: multizone vav optimization is not required because the system has Energy Recovery.")
    return multizone_opt_required
  end

  # Get the OA intake
  controller_oa = nil
  controller_mv = nil
  oa_system = nil
  if air_loop_hvac.airLoopHVACOutdoorAirSystem.is_initialized
    oa_system = air_loop_hvac.airLoopHVACOutdoorAirSystem.get
    controller_oa = oa_system.getControllerOutdoorAir
    controller_mv = controller_oa.controllerMechanicalVentilation
  else
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.AirLoopHVAC', "For #{air_loop_hvac.name}, multizone optimization is not applicable because system has no OA intake.")
    return multizone_opt_required
  end

  # Get the AHU design supply air flow rate
  dsn_flow_m3_per_s = nil
  if air_loop_hvac.designSupplyAirFlowRate.is_initialized
    dsn_flow_m3_per_s = air_loop_hvac.designSupplyAirFlowRate.get
  elsif air_loop_hvac.autosizedDesignSupplyAirFlowRate.is_initialized
    dsn_flow_m3_per_s = air_loop_hvac.autosizedDesignSupplyAirFlowRate.get
  else
    OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.AirLoopHVAC', "For #{air_loop_hvac.name} design supply air flow rate is not available, cannot apply efficiency standard.")
    return multizone_opt_required
  end
  dsn_flow_cfm = OpenStudio.convert(dsn_flow_m3_per_s, 'm^3/s', 'cfm').get

  # Get the minimum OA flow rate
  min_oa_flow_m3_per_s = nil
  if controller_oa.minimumOutdoorAirFlowRate.is_initialized
    min_oa_flow_m3_per_s = controller_oa.minimumOutdoorAirFlowRate.get
  elsif controller_oa.autosizedMinimumOutdoorAirFlowRate.is_initialized
    min_oa_flow_m3_per_s = controller_oa.autosizedMinimumOutdoorAirFlowRate.get
  else
    OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.AirLoopHVAC', "For #{controller_oa.name}: minimum OA flow rate is not available, cannot apply efficiency standard.")
    return multizone_opt_required
  end
  min_oa_flow_cfm = OpenStudio.convert(min_oa_flow_m3_per_s, 'm^3/s', 'cfm').get

  # Calculate the percent OA at design airflow
  pct_oa = min_oa_flow_m3_per_s / dsn_flow_m3_per_s

  # Not required for systems where
  # exhaust is more than 70% of the total OA intake.
  if pct_oa > 0.7
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.AirLoopHVAC', "For #{controller_oa.name}: multizone optimization is not applicable because system is more than 70% OA.")
    return multizone_opt_required
  end

  # TODO: Not required for dual-duct systems
  # if self.isDualDuct
  # OpenStudio::logFree(OpenStudio::Info, "openstudio.standards.AirLoopHVAC", "For #{controller_oa.name}: multizone optimization is not applicable because it is a dual duct system")
  # return multizone_opt_required
  # end

  # If here, multizone vav optimization is required
  multizone_opt_required = true

  return multizone_opt_required
end

#air_loop_hvac_prm_economizer_type_and_limits(air_loop_hvac, climate_zone) ⇒ Array<Double>

Determine the economizer type and limits for the the PRM Defaults to 90.1-2007 logic.


94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirLoopHVAC.rb', line 94

def air_loop_hvac_prm_economizer_type_and_limits(air_loop_hvac, climate_zone)
  economizer_type = 'NoEconomizer'
  drybulb_limit_f = nil
  enthalpy_limit_btu_per_lb = nil
  dewpoint_limit_f = nil

  case climate_zone
  when 'ASHRAE 169-2006-1B',
      'ASHRAE 169-2006-2B',
      'ASHRAE 169-2006-3B',
      'ASHRAE 169-2006-3C',
      'ASHRAE 169-2006-4B',
      'ASHRAE 169-2006-4C',
      'ASHRAE 169-2006-5B',
      'ASHRAE 169-2006-5C',
      'ASHRAE 169-2006-6B',
      'ASHRAE 169-2006-7B',
      'ASHRAE 169-2006-8A',
      'ASHRAE 169-2006-8B'
    economizer_type = 'FixedDryBulb'
    drybulb_limit_f = 75
  when 'ASHRAE 169-2006-2A',
      'ASHRAE 169-2006-3A',
      'ASHRAE 169-2006-4A'
    economizer_type = 'FixedEnthalpy'
    enthalpy_limit_btu_per_lb = 28
  when 'ASHRAE 169-2006-5A',
      'ASHRAE 169-2006-6A',
      'ASHRAE 169-2006-7A'
    economizer_type = 'FixedDryBulb'
    drybulb_limit_f = 70
  else
    economizer_type = 'FixedDryBulb'
    drybulb_limit_f = 65
  end

  return [economizer_type, drybulb_limit_f, enthalpy_limit_btu_per_lb, dewpoint_limit_f]
end

#air_loop_hvac_single_zone_controls_num_stages(air_loop_hvac, climate_zone) ⇒ Integer

Determine the number of stages that should be used as controls for single zone DX systems. 90.1-2013 depends on the cooling capacity of the system.


327
328
329
330
331
332
333
334
335
336
337
338
339
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirLoopHVAC.rb', line 327

def air_loop_hvac_single_zone_controls_num_stages(air_loop_hvac, climate_zone)
  min_clg_cap_btu_per_hr = 65_000
  clg_cap_btu_per_hr = OpenStudio.convert(air_loop_hvac_total_cooling_capacity(air_loop_hvac), 'W', 'Btu/hr').get
  if clg_cap_btu_per_hr >= min_clg_cap_btu_per_hr
    num_stages = 2
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.AirLoopHVAC', "For #{air_loop_hvac.name}: two-stage control is required since cooling capacity of #{clg_cap_btu_per_hr.round} Btu/hr exceeds the minimum of #{min_clg_cap_btu_per_hr.round} Btu/hr .")
  else
    num_stages = 1
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.AirLoopHVAC', "For #{air_loop_hvac.name}: two-stage control is not required since cooling capacity of #{clg_cap_btu_per_hr.round} Btu/hr is less than the minimum of #{min_clg_cap_btu_per_hr.round} Btu/hr .")
  end

  return num_stages
end

#air_loop_hvac_supply_air_temperature_reset_required?(air_loop_hvac, climate_zone) ⇒ Bool

Determine if the system required supply air temperature (SAT) reset. For 90.1-2013, SAT reset requirements are based on climate zone.


346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirLoopHVAC.rb', line 346

def air_loop_hvac_supply_air_temperature_reset_required?(air_loop_hvac, climate_zone)
  is_sat_reset_required = false

  # Only required for multizone VAV systems
  unless air_loop_hvac_multizone_vav_system?(air_loop_hvac)
    return is_sat_reset_required
  end

  case climate_zone
  when 'ASHRAE 169-2006-1A',
    'ASHRAE 169-2006-2A',
    'ASHRAE 169-2006-3A'
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.AirLoopHVAC', "For #{air_loop_hvac.name}: Supply air temperature reset is not required per 6.5.3.4 Exception 1, the system is located in climate zone #{climate_zone}.")
    return is_sat_reset_required
  when 'ASHRAE 169-2006-1B',
    'ASHRAE 169-2006-2B',
    'ASHRAE 169-2006-3B',
    'ASHRAE 169-2006-3C',
    'ASHRAE 169-2006-4A',
    'ASHRAE 169-2006-4B',
    'ASHRAE 169-2006-4C',
    'ASHRAE 169-2006-5A',
    'ASHRAE 169-2006-5B',
    'ASHRAE 169-2006-5C',
    'ASHRAE 169-2006-6A',
    'ASHRAE 169-2006-6B',
    'ASHRAE 169-2006-7A',
    'ASHRAE 169-2006-7B',
    'ASHRAE 169-2006-8A',
    'ASHRAE 169-2006-8B'
    is_sat_reset_required = true
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.AirLoopHVAC', "For #{air_loop_hvac.name}: Supply air temperature reset is required.")
    return is_sat_reset_required
  end
end

#air_terminal_single_duct_vav_reheat_apply_initial_prototype_damper_position(air_terminal_single_duct_vav_reheat, building_type, zone_oa_per_area) ⇒ Bool

Set the initial minimum damper position based on OA rate of the space and the template. Zones with low OA per area get lower initial guesses. Final position will be adjusted upward as necessary by Standards.AirLoopHVAC.apply_minimum_vav_damper_positions


11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb', line 11

def air_terminal_single_duct_vav_reheat_apply_initial_prototype_damper_position(air_terminal_single_duct_vav_reheat, building_type, zone_oa_per_area)
  vav_name = air_terminal_single_duct_vav_reheat.name.get
  min_damper_position = case air_terminal_single_duct_vav_reheat_reheat_type(air_terminal_single_duct_vav_reheat)
                        when 'HotWater'
                          0.2
                        when 'Electricity', 'NaturalGas'
                          0.3
                        end

  # High OA zones
  # Determine whether or not to use the high minimum guess.
  # Cutoff was determined by correlating apparent minimum guesses
  # to OA rates in prototypes since not well documented in papers.
  if zone_oa_per_area > 0.001 # 0.001 m^3/s*m^2 = .196 cfm/ft2
    if building_type == 'Outpatient'
      min_damper_position = 1.0
    elsif building_type == 'Hospital'
      if vav_name.include? 'PatRoom'
        min_damper_position = 0.5
      else
        min_damper_position = 1.0
        min_damper_position = 1.0
      end
    else
      min_damper_position = 0.7
    end
  end

  # Set the minimum flow fraction
  air_terminal_single_duct_vav_reheat.setConstantMinimumAirFlowFraction(min_damper_position)

  return true
end

#air_terminal_single_duct_vav_reheat_minimum_damper_position(air_terminal_single_duct_vav_reheat, has_ddc = false) ⇒ Object

Specifies the minimum damper position for VAV dampers. For terminals with hot water heat and DDC, the minimum is 20%, otherwise the minimum is 30%.


9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb', line 9

def air_terminal_single_duct_vav_reheat_minimum_damper_position(air_terminal_single_duct_vav_reheat, has_ddc = false)
  min_damper_position = nil
  case air_terminal_single_duct_vav_reheat_reheat_type(air_terminal_single_duct_vav_reheat)
  when 'HotWater'
    min_damper_position = if has_ddc
                            0.2
                          else
                            0.3
                          end
  when 'Electricity', 'NaturalGas'
    min_damper_position = 0.3
  end

  return min_damper_position
end

#cooling_tower_apply_minimum_power_per_flow_gpm_limit(cooling_tower) ⇒ Double Originally defined in module ASHRAE9012013CoolingTower

Above this point, centrifugal fan cooling towers must meet the limits of propeller or axial cooling towers instead. 90.1 6.5.5.3 Limit on Centrifugal Fan Open Circuit Cooling Towers. is 1,100 gallons per minute.

OpenStudio::Model::CoolingTowerTwoSpeed, OpenStudio::Model::CoolingTowerVariableSpeed] the cooling tower

#cooling_tower_variable_speed_apply_efficiency_and_curves(cooling_tower_variable_speed) ⇒ Object

Apply the efficiency, plus Multicell heat rejection with VSD per 90.1-2013 6.5.2.2


9
10
11
12
13
14
15
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.CoolingTowerVariableSpeed.rb', line 9

def cooling_tower_variable_speed_apply_efficiency_and_curves(cooling_tower_variable_speed)
  cooling_tower_apply_minimum_power_per_flow(cooling_tower_variable_speed)

  cooling_tower_variable_speed.setCellControl('MaximalCell')

  return true
end

#fan_constant_volume_airloop_fan_pressure_rise(fan_constant_volume) ⇒ Double

Determine the prototype fan pressure rise for a constant volume fan on an AirLoopHVAC based on the airflow of the system. to the logic from ASHRAE 90.1-2004 prototypes.


8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.FanConstantVolume.rb', line 8

def fan_constant_volume_airloop_fan_pressure_rise(fan_constant_volume)
  # Get the max flow rate from the fan.
  maximum_flow_rate_m3_per_s = nil
  if fan_constant_volume.maximumFlowRate.is_initialized
    maximum_flow_rate_m3_per_s = fan_constant_volume.maximumFlowRate.get
  elsif fan_constant_volume.autosizedMaximumFlowRate.is_initialized
    maximum_flow_rate_m3_per_s = fan_constant_volume.autosizedMaximumFlowRate.get
  else
    OpenStudio.logFree(OpenStudio::Warn, 'openstudio.prototype.FanConstantVolume', "For #{fan_constant_volume.name} max flow rate is not available, cannot apply prototype assumptions.")
    return false
  end

  # Convert max flow rate to cfm
  maximum_flow_rate_cfm = OpenStudio.convert(maximum_flow_rate_m3_per_s, 'm^3/s', 'cfm').get

  # Determine the pressure rise
  pressure_rise_in_h2o = if maximum_flow_rate_cfm < 7437
                           2.5
                         else # Over 7,437 cfm
                           4.09
                         end

  return pressure_rise_in_h2o
end

#fan_on_off_airloop_or_unitary_fan_pressure_rise(fan_on_off) ⇒ Double

Determine the prototype fan pressure rise for an on off fan on an AirLoopHVAC or inside a unitary system based on the airflow of the system. to the logic from ASHRAE 90.1-2004 prototypes.


9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.FanOnOff.rb', line 9

def fan_on_off_airloop_or_unitary_fan_pressure_rise(fan_on_off)
  # Get the max flow rate from the fan.
  maximum_flow_rate_m3_per_s = nil
  if fan_on_off.maximumFlowRate.is_initialized
    maximum_flow_rate_m3_per_s = fan_on_off.maximumFlowRate.get
  elsif fan_on_off.autosizedMaximumFlowRate.is_initialized
    maximum_flow_rate_m3_per_s = fan_on_off.autosizedMaximumFlowRate.get
  else
    OpenStudio.logFree(OpenStudio::Warn, 'openstudio.prototype.FanOnOff', "For #{fan_on_off.name} max flow rate is not available, cannot apply prototype assumptions.")
    return false
  end

  # Convert max flow rate to cfm
  maximum_flow_rate_cfm = OpenStudio.convert(maximum_flow_rate_m3_per_s, 'm^3/s', 'cfm').get

  # Determine the pressure rise
  pressure_rise_in_h2o = if maximum_flow_rate_cfm < 7437
                           2.5
                         else # Over 7,437 cfm
                           4.09
                         end

  return pressure_rise_in_h2o
end

#fan_variable_volume_airloop_fan_pressure_rise(fan_variable_volume) ⇒ Double

Determine the prototype fan pressure rise for a variable volume fan on an AirLoopHVAC based on the airflow of the system. to the logic from ASHRAE 90.1-2004 prototypes.


8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.FanVariableVolume.rb', line 8

def fan_variable_volume_airloop_fan_pressure_rise(fan_variable_volume)
  # Get the max flow rate from the fan.
  maximum_flow_rate_m3_per_s = nil
  if fan_variable_volume.maximumFlowRate.is_initialized
    maximum_flow_rate_m3_per_s = fan_variable_volume.maximumFlowRate.get
  elsif fan_variable_volume.autosizedMaximumFlowRate.is_initialized
    maximum_flow_rate_m3_per_s = fan_variable_volume.autosizedMaximumFlowRate.get
  else
    OpenStudio.logFree(OpenStudio::Warn, 'openstudio.prototype.FanVariableVolume', "For #{fan_variable_volume.name} max flow rate is not available, cannot apply prototype assumptions.")
    return false
  end

  # Convert max flow rate to cfm
  maximum_flow_rate_cfm = OpenStudio.convert(maximum_flow_rate_m3_per_s, 'm^3/s', 'cfm').get

  # Determine the pressure rise
  pressure_rise_in_h2o = if maximum_flow_rate_cfm < 4648
                           4.0
                         else # Over 7,437 cfm
                           5.58
                         end

  return pressure_rise_in_h2o
end

#fan_variable_volume_part_load_fan_power_limitation_capacity_limit(fan_variable_volume) ⇒ Double

The threhold capacity below which part load control is not required. Per 90.1-2013, table 6.5.3.2.1: the cooling capacity threshold is 75000 instead of 110000 as of 1/1/2014


29
30
31
32
33
34
35
36
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.FanVariableVolume.rb', line 29

def fan_variable_volume_part_load_fan_power_limitation_capacity_limit(fan_variable_volume)
  cap_limit_btu_per_hr = case fan_variable_volume_cooling_system_type(fan_variable_volume)
                         when 'dx'
                           110_000
                         end

  return cap_limit_btu_per_hr
end

#fan_variable_volume_part_load_fan_power_limitation_hp_limit(fan_variable_volume) ⇒ Double

The threhold horsepower below which part load control is not required. Per 90.1-2013, table 6.5.3.2.1: the fan motor size for chiller-water and evaporative cooling is 0.25 hp as of 1/1/2014 instead of 5 hp


10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.FanVariableVolume.rb', line 10

def fan_variable_volume_part_load_fan_power_limitation_hp_limit(fan_variable_volume)
  hp_limit = case fan_variable_volume_cooling_system_type(fan_variable_volume)
             when 'dx'
               0.0
             when 'chw'
               0.25
             when 'evap'
               0.25
             end

  return hp_limit
end

#model_baseline_system_vav_fan_type(model) ⇒ String

Determines the fan type used by VAV_Reheat and VAV_PFP_Boxes systems. Variable speed fan for 90.1-2013


114
115
116
117
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.rb', line 114

def model_baseline_system_vav_fan_type(model)
  fan_type = 'Variable Speed Fan'
  return fan_type
end

#model_cw_loop_cooling_tower_fan_type(model) ⇒ String

Determine which type of fan the cooling tower will have. Variable Speed Fan for ASHRAE 90.1-2013.


7
8
9
10
# File 'lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.hvac_systems.rb', line 7

def model_cw_loop_cooling_tower_fan_type(model)
  fan_type = 'Variable Speed Fan'
  return fan_type
end

#model_economizer_type(model, climate_zone) ⇒ String

Determine the prototypical economizer type for the model.

'NoEconomizer' 'FixedDryBulb' 'FixedEnthalpy' 'DifferentialDryBulb' 'DifferentialEnthalpy' 'FixedDewPointAndDryBulb' 'ElectronicEnthalpy' 'DifferentialDryBulbAndEnthalpy'


17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.rb', line 17

def model_economizer_type(model, climate_zone)
  economizer_type = case climate_zone
                    when 'ASHRAE 169-2006-1A',
                        'ASHRAE 169-2006-2A',
                        'ASHRAE 169-2006-3A',
                        'ASHRAE 169-2006-4A'
                      'DifferentialEnthalpy'
                    else
                      'DifferentialDryBulb'
                    end
  return economizer_type
end

#model_elevator_fan_pwr(model, vent_rate_cfm) ⇒ Double

Determines the power of the elevator ventilation fan. 90.1-2013 has a requirement for ventilation fan efficiency.


17
18
19
20
21
22
23
24
# File 'lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.elevators.rb', line 17

def model_elevator_fan_pwr(model, vent_rate_cfm)
  vent_pwr_per_flow_w_per_cfm = 0.33
  vent_pwr_w = vent_pwr_per_flow_w_per_cfm * vent_rate_cfm  # addendum 90.1-2007 aj has requirement on efficiency

  vent_pwr_w = vent_pwr_w * 0.29 / 0.70

  return vent_pwr_w
end

#model_elevator_lighting_pct_incandescent(model) ⇒ Object

Determines the percentage of the elevator cab lighting that is incandescent. The remainder is assumed to be LED. Defaults to 0% incandescent (100% LED), representing newer elevators.


8
9
10
11
# File 'lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.elevators.rb', line 8

def model_elevator_lighting_pct_incandescent(model)
  pct_incandescent = 0.0 # 100% LED
  return pct_incandescent
end

#model_prm_baseline_system_change_fuel_type(model, fuel_type, climate_zone, custom = nil) ⇒ String

Change the fuel type based on climate zone, depending on the standard. For 90.1-2013, fuel type is based on climate zone, not the proposed model.


88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.rb', line 88

def model_prm_baseline_system_change_fuel_type(model, fuel_type, climate_zone, custom = nil)
  if custom == 'Xcel Energy CO EDA'
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.Model', 'Custom; per Xcel EDA Program Manual 2014 Table 3.2.2 Baseline HVAC System Types, the 90.1-2010 rules for heating fuel type (based on proposed model) rules apply.')
    return fuel_type
  end

  # For 90.1-2013 the fuel type is determined based on climate zone.
  # Don't change the fuel if it purchased heating or cooling.
  if fuel_type == 'electric' || fuel_type == 'fossil'
    case climate_zone
    when 'ASHRAE 169-2006-1A',
          'ASHRAE 169-2006-2A',
          'ASHRAE 169-2006-3A'
      fuel_type = 'electric'
    else
      fuel_type = 'fossil'
    end
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.Model', "Heating fuel is #{fuel_type} for 90.1-2013, climate zone #{climate_zone}.  This is independent of the heating fuel type in the proposed building, per G3.1.1-3.  This is different than previous versions of 90.1.")
  end

  return fuel_type
end

#model_prm_baseline_system_group_minimum_area(model, custom) ⇒ Double

Determines the area of the building above which point the non-dominant area type gets it's own HVAC system type.


7
8
9
10
11
12
13
14
15
16
17
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.rb', line 7

def model_prm_baseline_system_group_minimum_area(model, custom)
  exception_min_area_ft2 = 20_000  # Customization - Xcel EDA Program Manual 2014
  # 3.2.1 Mechanical System Selection ii

  if custom == 'Xcel Energy CO EDA'
    exception_min_area_ft2 = 5000
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.Model', "Customization; per Xcel EDA Program Manual 2014 3.2.1 Mechanical System Selection ii, minimum area for non-predominant conditions reduced to #{exception_min_area_ft2} ft2.")
  end
  exception_min_area_m2 = OpenStudio.convert(exception_min_area_ft2, 'ft^2', 'm^2').get
  return exception_min_area_m2
end

#model_prm_baseline_system_number(model, climate_zone, area_type, fuel_type, area_ft2, num_stories, custom) ⇒ String

Determines which system number is used for the baseline system. 5_or_6, 7_or_8, 9_or_10


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.rb', line 23

def model_prm_baseline_system_number(model, climate_zone, area_type, fuel_type, area_ft2, num_stories, custom)
  sys_num = nil

  # Customization - Xcel EDA Program Manual 2014
  # Table 3.2.2 Baseline HVAC System Types
  if custom == 'Xcel Energy CO EDA'
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.Model', 'Custom; per Xcel EDA Program Manual 2014 Table 3.2.2 Baseline HVAC System Types, the 90.1-2010 lookup for HVAC system types shall be used.')

    # Set the area limit
    limit_ft2 = 25_000

    case area_type
    when 'residential'
      sys_num = '1_or_2'
    when 'nonresidential'      # nonresidential and 3 floors or less and <25,000 ft2

      if num_stories <= 3 && area_ft2 < limit_ft2
        sys_num = '3_or_4'        # nonresidential and 4 or 5 floors or 5 floors or less and 25,000 ft2 to 150,000 ft2

      elsif ((num_stories == 4 || num_stories == 5) && area_ft2 < limit_ft2) || (num_stories <= 5 && (area_ft2 >= limit_ft2 && area_ft2 <= 150_000))
        sys_num = '5_or_6'        # nonresidential and more than 5 floors or >150,000 ft2

      elsif num_stories >= 5 || area_ft2 > 150_000
        sys_num = '7_or_8'
      end
    when 'heatedonly'
      sys_num = '9_or_10'
    when 'retail'      # Should only be hit by Xcel EDA

      sys_num = '3_or_4'
    end

  else

    # Set the area limit
    limit_ft2 = 25_000

    case area_type
    when 'residential'
      sys_num = '1_or_2'
    when 'nonresidential'      # nonresidential and 3 floors or less and <25,000 ft2

      if num_stories <= 3 && area_ft2 < limit_ft2
        sys_num = '3_or_4'      # nonresidential and 4 or 5 floors or 5 floors or less and 25,000 ft2 to 150,000 ft2

      elsif ((num_stories == 4 || num_stories == 5) && area_ft2 < limit_ft2) || (num_stories <= 5 && (area_ft2 >= limit_ft2 && area_ft2 <= 150_000))
        sys_num = '5_or_6'      # nonresidential and more than 5 floors or >150,000 ft2

      elsif num_stories >= 5 || area_ft2 > 150_000
        sys_num = '7_or_8'
      end
    when 'heatedonly'
      sys_num = '9_or_10'
    when 'retail'
      sys_num = '3_or_4'
    end

  end

  return sys_num
end

#model_prm_skylight_to_roof_ratio_limit(model) ⇒ Double

Determines the skylight to roof ratio limit for a given standard 3% for 90.1-20-13


122
123
124
125
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.rb', line 122

def model_prm_skylight_to_roof_ratio_limit(model)
  srr_lim = 3.0
  return srr_lim
end

#plant_loop_prm_baseline_condenser_water_temperatures(plant_loop, design_oat_wb_c) ⇒ Array<Double>

Determine the performance rating method specified design condenser water temperature, approach, and range


10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.PlantLoop.rb', line 10

def plant_loop_prm_baseline_condenser_water_temperatures(plant_loop, design_oat_wb_c)
  design_oat_wb_f = OpenStudio.convert(design_oat_wb_c, 'C', 'F').get

  # G3.1.3.11 - CW supply temp shall be evaluated at 0.4% evaporative design OATwb
  # per the formulat approach_F = 25.72 - (0.24 * OATwb_F)
  # 55F <= OATwb <= 90F
  # Design range = 10F.
  range_r = 10

  # Limit the OATwb
  if design_oat_wb_f < 55
    design_oat_wb_f = 55
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.PlantLoop', "For #{plant_loop.name}, a design OATwb of 55F will be used for sizing the cooling towers because the actual design value is below the limit in G3.1.3.11.")
  elsif design_oat_wb_f > 90
    design_oat_wb_f = 90
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.PlantLoop', "For #{plant_loop.name}, a design OATwb of 90F will be used for sizing the cooling towers because the actual design value is above the limit in G3.1.3.11.")
  end

  # Calculate the approach
  approach_r = 25.72 - (0.24 * design_oat_wb_f)

  # Calculate the leaving CW temp
  leaving_cw_t_f = design_oat_wb_f + approach_r

  # Convert to SI units
  leaving_cw_t_c = OpenStudio.convert(leaving_cw_t_f, 'F', 'C').get
  approach_k = OpenStudio.convert(approach_r, 'R', 'K').get
  range_k = OpenStudio.convert(range_r, 'R', 'K').get

  return [leaving_cw_t_c, approach_k, range_k]
end

#space_daylighted_area_window_width(space) ⇒ String

Determines the method used to extend the daylighted area horizontally next to a window. If the method is 'fixed', 2 ft is added to the width of each window. If the method is 'proportional', a distance equal to half of the head height of the window is added. If the method is 'none', no additional width is added.


11
12
13
14
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Space.rb', line 11

def space_daylighted_area_window_width(space)
  method = 'proportional'
  return method
end

#space_daylighting_control_required?(space, areas) ⇒ Array<Bool>

Determine if the space requires daylighting controls for toplighting, primary sidelighting, and secondary sidelighting. Defaults to false for all types.


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Space.rb', line 23

def space_daylighting_control_required?(space, areas)
  req_top_ctrl = true
  req_pri_ctrl = true
  req_sec_ctrl = true

  # Get the LPD of the space
  space_lpd_w_per_m2 = space.lightingPowerPerFloorArea

  # Primary Sidelighting
  # Check if the primary sidelit area contains less than 150W of lighting
  if areas['primary_sidelighted_area'] == 0.0
    OpenStudio.logFree(OpenStudio::Debug, 'openstudio.model.Space', "For #{space.name}, primary sidelighting control not required because primary sidelighted area = 0ft2 per 9.4.1.1(e).")
    req_pri_ctrl = false
  elsif areas['primary_sidelighted_area'] * space_lpd_w_per_m2 < 150.0
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Space', "For #{space.name}, primary sidelighting control not required because less than 150W of lighting are present in the primary daylighted area per 9.4.1.1(e).")
    req_pri_ctrl = false
  else
    # Check the size of the windows
    if areas['total_window_area'] < OpenStudio.convert(20.0, 'ft^2', 'm^2').get
      OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Space', "For #{space.name}, primary sidelighting control not required because there are less than 20ft2 of window per 9.4.1.1(e) Exception 2.")
      req_pri_ctrl = false
    end
  end

  # Secondary Sidelighting
  # Check if the primary and secondary sidelit areas contains less than 300W of lighting
  if areas['secondary_sidelighted_area'] == 0.0
    OpenStudio.logFree(OpenStudio::Debug, 'openstudio.model.Space', "For #{space.name}, secondary sidelighting control not required because secondary sidelighted area = 0ft2 per 9.4.1.1(e).")
    req_sec_ctrl = false
  elsif (areas['primary_sidelighted_area'] + areas['secondary_sidelighted_area']) * space_lpd_w_per_m2 < 300
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Space', "For #{space.name}, secondary sidelighting control not required because less than 300W of lighting are present in the combined primary and secondary daylighted areas per 9.4.1.1(e).")
    req_sec_ctrl = false
  else
    # Check the size of the windows
    if areas['total_window_area'] < OpenStudio.convert(20.0, 'ft^2', 'm^2').get
      OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Space', "For #{space.name}, secondary sidelighting control not required because there are less than 20ft2 of window per 9.4.1.1(e) Exception 2.")
      req_sec_ctrl = false
    end
  end

  # Toplighting
  # Check if the toplit area contains less than 150W of lighting
  if areas['toplighted_area'] == 0.0
    OpenStudio.logFree(OpenStudio::Debug, 'openstudio.model.Space', "For #{space.name}, toplighting control not required because toplighted area = 0ft2 per 9.4.1.1(f).")
    req_top_ctrl = false
  elsif areas['toplighted_area'] * space_lpd_w_per_m2 < 150
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Space', "For #{space.name}, toplighting control not required because less than 150W of lighting are present in the toplighted area per 9.4.1.1(f).")
    req_top_ctrl = false
  end

  return [req_top_ctrl, req_pri_ctrl, req_sec_ctrl]
end

#space_daylighting_fractions_and_windows(space, areas, sorted_windows, sorted_skylights, req_top_ctrl, req_pri_ctrl, req_sec_ctrl) ⇒ Object

Determine the fraction controlled by each sensor and which window each sensor should go near.


85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Space.rb', line 85

def space_daylighting_fractions_and_windows(space,
                                            areas,
                                            sorted_windows,
                                            sorted_skylights,
                                            req_top_ctrl,
                                            req_pri_ctrl,
                                            req_sec_ctrl)
  sensor_1_frac = 0.0
  sensor_2_frac = 0.0
  sensor_1_window = nil
  sensor_2_window = nil

  # Get the area of the space
  space_area_m2 = space.floorArea

  if req_top_ctrl && req_pri_ctrl && req_sec_ctrl    # Sensor 1 controls toplighted area

    sensor_1_frac = areas['toplighted_area'] / space_area_m2
    sensor_1_window = sorted_skylights[0]    # Sensor 2 controls primary + secondary area

    sensor_2_frac = (areas['primary_sidelighted_area'] + areas['secondary_sidelighted_area']) / space_area_m2
    sensor_2_window = sorted_windows[0]
  elsif !req_top_ctrl && req_pri_ctrl && req_sec_ctrl    # Sensor 1 controls primary area

    sensor_1_frac = areas['primary_sidelighted_area'] / space_area_m2
    sensor_1_window = sorted_windows[0]    # Sensor 2 controls secondary area

    sensor_2_frac = (areas['secondary_sidelighted_area'] / space_area_m2)
    sensor_2_window = sorted_windows[0]
  elsif req_top_ctrl && !req_pri_ctrl && req_sec_ctrl    # Sensor 1 controls toplighted area

    sensor_1_frac = areas['toplighted_area'] / space_area_m2
    sensor_1_window = sorted_skylights[0]    # Sensor 2 controls secondary area

    sensor_2_frac = (areas['secondary_sidelighted_area'] / space_area_m2)
    sensor_2_window = sorted_windows[0]
  elsif req_top_ctrl && !req_pri_ctrl && !req_sec_ctrl    # Sensor 1 controls toplighted area

    sensor_1_frac = areas['toplighted_area'] / space_area_m2
    sensor_1_window = sorted_skylights[0]
  elsif !req_top_ctrl && req_pri_ctrl && !req_sec_ctrl    # Sensor 1 controls primary area

    sensor_1_frac = areas['primary_sidelighted_area'] / space_area_m2
    sensor_1_window = sorted_windows[0]
  elsif !req_top_ctrl && !req_pri_ctrl && req_sec_ctrl    # Sensor 1 controls secondary area

    sensor_1_frac = areas['secondary_sidelighted_area'] / space_area_m2
    sensor_1_window = sorted_windows[0]
  end

  return [sensor_1_frac, sensor_2_frac, sensor_1_window, sensor_2_window]
end

#space_infiltration_rate_75_pa(space) ⇒ Double

Determine the base infiltration rate at 75 PA.

defaults to no infiltration.


142
143
144
145
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Space.rb', line 142

def space_infiltration_rate_75_pa(space)
  basic_infil_rate_cfm_per_ft2 = 1.0
  return basic_infil_rate_cfm_per_ft2
end

#thermal_zone_demand_control_ventilation_limits(thermal_zone) ⇒ Array<Double>

Determine the area and occupancy level limits for demand control ventilation.

and the minimum occupancy density in m^2/person. Returns nil if there is no requirement.


45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.ThermalZone.rb', line 45

def thermal_zone_demand_control_ventilation_limits(thermal_zone)
  min_area_ft2 = 500
  min_occ_per_1000_ft2 = 25

  # Convert to SI
  min_area_m2 = OpenStudio.convert(min_area_ft2, 'ft^2', 'm^2').get
  min_occ_per_ft2 = min_occ_per_1000_ft2 / 1000.0
  min_ft2_per_occ = 1.0 / min_occ_per_ft2
  min_m2_per_occ = OpenStudio.convert(min_ft2_per_occ, 'ft^2', 'm^2').get

  return [min_area_m2, min_m2_per_occ]
end

#thermal_zone_occupancy_type(thermal_zone) ⇒ String

TODO:

Add public assembly building types

Determine the thermal zone's occupancy type category. Options are: residential, nonresidential, publicassembly, retail


9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.ThermalZone.rb', line 9

def thermal_zone_occupancy_type(thermal_zone)
  occ_type = if thermal_zone_residential?(thermal_zone)
               'residential'
             else
               'nonresidential'
             end

  # Based on the space type that
  # represents a majority of the zone.
  space_type = thermal_zone_majority_space_type(thermal_zone)
  if space_type.is_initialized
    space_type = space_type.get
    bldg_type = space_type.standardsBuildingType
    if bldg_type.is_initialized
      bldg_type = bldg_type.get
      case bldg_type
      when 'Retail', 'StripMall', 'SuperMarket'
        occ_type = 'retail'        # when 'SomeBuildingType' # TODO add publicassembly building types
        # occ_type = 'publicassembly'

      end
    end
  end

  # OpenStudio::logFree(OpenStudio::Info, "openstudio.Standards.ThermalZone", "For #{self.name}, occupancy type = #{occ_type}.")

  return occ_type
end

#water_heater_mixed_apply_prm_baseline_fuel_type(water_heater_mixed, building_type) ⇒ Bool

Applies the correct fuel type for the water heaters in the baseline model. 90.1-2013 requires a change from the proposed building in some scenarios.


10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.WaterHeaterMixed.rb', line 10

def water_heater_mixed_apply_prm_baseline_fuel_type(water_heater_mixed, building_type)
  # Determine the building-type specific
  # fuel requirements from Table G3.1.1-2
  new_fuel = nil
  case building_type
  when 'SecondarySchool', 'PrimarySchool', # School/university
       'SmallHotel', # Motel
       'LargeHotel', # Hotel
       'QuickServiceRestaurant', # Dining: Cafeteria/fast food
       'FullServiceRestaurant', # Dining: Family
       'MidriseApartment', 'HighriseApartment', # Multifamily
       'Hospital', # Hospital
       'Outpatient' # Health-care clinic
    new_fuel = 'NaturalGas'
  when 'SmallOffice', 'MediumOffice', 'LargeOffice', # Office
       'RetailStandalone', 'RetailStripmall', # Retail
       'Warehouse' # Warehouse
    new_fuel = 'Electricity'
  else
    new_fuel = 'NaturalGas'
  end

  # Change the fuel type if necessary
  old_fuel = water_heater_mixed.heaterFuelType
  unless new_fuel == old_fuel
    water_heater_mixed.setHeaterFuelType(new_fuel)
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.WaterHeaterMixed', "For #{water_heater_mixed.name}, changed baseline water heater fuel from #{old_fuel} to #{new_fuel}.")
  end

  return true
end