openstudio-standards 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/standards/OpenStudio_Standards.xlsx +0 -0
- data/lib/openstudio-standards/btap/compliance.rb +17 -7
- data/lib/openstudio-standards/btap/hvac.rb +6 -5
- data/lib/openstudio-standards/btap/measures.rb +137 -102
- data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +2 -2
- data/lib/openstudio-standards/prototypes/Prototype.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/prototypes/Prototype.Model.rb +96 -31
- data/lib/openstudio-standards/prototypes/Prototype.Model.swh.rb +1 -1
- data/lib/openstudio-standards/prototypes/Prototype.building_specific_methods.rb +163 -0
- data/lib/openstudio-standards/prototypes/Prototype.full_service_restaurant.rb +54 -52
- data/lib/openstudio-standards/prototypes/Prototype.high_rise_apartment.rb +28 -26
- data/lib/openstudio-standards/prototypes/Prototype.hospital.rb +41 -39
- data/lib/openstudio-standards/prototypes/Prototype.large_hotel.rb +19 -17
- data/lib/openstudio-standards/prototypes/Prototype.large_office.rb +16 -13
- data/lib/openstudio-standards/prototypes/Prototype.medium_office.rb +13 -11
- data/lib/openstudio-standards/prototypes/Prototype.mid_rise_apartment.rb +33 -31
- data/lib/openstudio-standards/prototypes/Prototype.outpatient.rb +66 -64
- data/lib/openstudio-standards/prototypes/Prototype.primary_school.rb +8 -88
- data/lib/openstudio-standards/prototypes/Prototype.quick_service_restaurant.rb +54 -52
- data/lib/openstudio-standards/prototypes/Prototype.retail_standalone.rb +13 -11
- data/lib/openstudio-standards/prototypes/Prototype.retail_stripmall.rb +15 -13
- data/lib/openstudio-standards/prototypes/Prototype.secondary_school.rb +11 -9
- data/lib/openstudio-standards/prototypes/Prototype.small_hotel.rb +13 -11
- data/lib/openstudio-standards/prototypes/Prototype.small_office.rb +7 -5
- data/lib/openstudio-standards/prototypes/Prototype.utilities.rb +18 -13
- data/lib/openstudio-standards/prototypes/Prototype.warehouse.rb +11 -9
- data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +23 -12
- data/lib/openstudio-standards/standards/Standards.Fan.rb +7 -4
- data/lib/openstudio-standards/standards/Standards.Model.rb +4 -4
- data/lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb +9 -4
- data/lib/openstudio-standards/utilities/simulation.rb +6 -1
- data/lib/openstudio-standards/version.rb +1 -1
- data/lib/openstudio-standards/weather/Weather.Model.rb +1 -1
- metadata +3 -2
@@ -1,7 +1,8 @@
|
|
1
1
|
|
2
|
-
#
|
3
|
-
|
4
|
-
|
2
|
+
# Modules for building-type specific methods
|
3
|
+
module PrototypeBuilding
|
4
|
+
module FullServiceRestaurant
|
5
|
+
def self.define_space_type_map(building_type, template, climate_zone)
|
5
6
|
space_type_map = nil
|
6
7
|
case template
|
7
8
|
when 'DOE Ref Pre-1980'
|
@@ -27,7 +28,7 @@ class OpenStudio::Model::Model
|
|
27
28
|
return space_type_map
|
28
29
|
end
|
29
30
|
|
30
|
-
def define_hvac_system_map(building_type, template, climate_zone)
|
31
|
+
def self.define_hvac_system_map(building_type, template, climate_zone)
|
31
32
|
case template
|
32
33
|
when 'DOE Ref Pre-1980', 'DOE Ref 1980-2004'
|
33
34
|
system_to_space_map = [
|
@@ -449,72 +450,72 @@ class OpenStudio::Model::Model
|
|
449
450
|
return system_to_space_map
|
450
451
|
end
|
451
452
|
|
452
|
-
def custom_hvac_tweaks(building_type, template, climate_zone, prototype_input)
|
453
|
+
def self.custom_hvac_tweaks(building_type, template, climate_zone, prototype_input, model)
|
453
454
|
OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Started building type specific adjustments')
|
454
455
|
|
455
456
|
# add extra equipment for kitchen
|
456
|
-
add_extra_equip_kitchen(template)
|
457
|
+
PrototypeBuilding::FullServiceRestaurant.add_extra_equip_kitchen(template, model)
|
457
458
|
# add extra infiltration for dining room door and attic
|
458
|
-
add_door_infiltration(template, climate_zone)
|
459
|
+
PrototypeBuilding::FullServiceRestaurant.add_door_infiltration(template, climate_zone, model)
|
459
460
|
# add zone_mixing between kitchen and dining
|
460
|
-
add_zone_mixing(template)
|
461
|
+
PrototypeBuilding::FullServiceRestaurant.add_zone_mixing(template, model)
|
461
462
|
# Update Sizing Zone
|
462
|
-
update_sizing_zone(template)
|
463
|
+
PrototypeBuilding::FullServiceRestaurant.update_sizing_zone(template, model)
|
463
464
|
# adjust the cooling setpoint
|
464
|
-
adjust_clg_setpoint(template, climate_zone)
|
465
|
+
PrototypeBuilding::FullServiceRestaurant.adjust_clg_setpoint(template, climate_zone, model)
|
465
466
|
# reset the design OA of kitchen
|
466
|
-
reset_kitchen_oa(template)
|
467
|
+
PrototypeBuilding::FullServiceRestaurant.reset_kitchen_oa(template, model)
|
467
468
|
|
468
469
|
OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Finished building type specific adjustments')
|
469
470
|
|
470
471
|
return true
|
471
472
|
end # add hvac
|
472
473
|
|
473
|
-
def add_door_infiltration(template, climate_zone)
|
474
|
+
def self.add_door_infiltration(template, climate_zone, model)
|
474
475
|
# add extra infiltration for dining room door and attic (there is no attic in 'DOE Ref Pre-1980')
|
475
476
|
unless template == 'DOE Ref 1980-2004' || template == 'DOE Ref Pre-1980' || template == 'NECB 2011'
|
476
|
-
dining_space = getSpaceByName('Dining').get
|
477
|
-
attic_space = getSpaceByName('Attic').get
|
478
|
-
infiltration_diningdoor = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(
|
479
|
-
infiltration_attic = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(
|
477
|
+
dining_space = model.getSpaceByName('Dining').get
|
478
|
+
attic_space = model.getSpaceByName('Attic').get
|
479
|
+
infiltration_diningdoor = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(model)
|
480
|
+
infiltration_attic = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(model)
|
480
481
|
infiltration_diningdoor.setName('Dining door Infiltration')
|
481
482
|
infiltration_per_zone_diningdoor = 0
|
482
483
|
infiltration_per_zone_attic = 0.2378
|
483
484
|
if template == '90.1-2004'
|
484
485
|
infiltration_per_zone_diningdoor = 0.614474994
|
485
|
-
infiltration_diningdoor.setSchedule(add_schedule('RestaurantSitDown DOOR_INFIL_SCH'))
|
486
|
+
infiltration_diningdoor.setSchedule(model.add_schedule('RestaurantSitDown DOOR_INFIL_SCH'))
|
486
487
|
elsif template == '90.1-2007'
|
487
488
|
case climate_zone
|
488
489
|
when 'ASHRAE 169-2006-1A', 'ASHRAE 169-2006-2A', 'ASHRAE 169-2006-2B', 'ASHRAE 169-2006-3A', 'ASHRAE 169-2006-3B',
|
489
490
|
'ASHRAE 169-2006-3C', 'ASHRAE 169-2006-4A', 'ASHRAE 169-2006-4B', 'ASHRAE 169-2006-4C'
|
490
491
|
infiltration_per_zone_diningdoor = 0.614474994
|
491
|
-
infiltration_diningdoor.setSchedule(add_schedule('RestaurantSitDown DOOR_INFIL_SCH'))
|
492
|
+
infiltration_diningdoor.setSchedule(model.add_schedule('RestaurantSitDown DOOR_INFIL_SCH'))
|
492
493
|
else
|
493
494
|
infiltration_per_zone_diningdoor = 0.389828222
|
494
|
-
infiltration_diningdoor.setSchedule(add_schedule('RestaurantSitDown VESTIBULE_DOOR_INFIL_SCH'))
|
495
|
+
infiltration_diningdoor.setSchedule(model.add_schedule('RestaurantSitDown VESTIBULE_DOOR_INFIL_SCH'))
|
495
496
|
end
|
496
497
|
elsif template == '90.1-2010' || template == '90.1-2013'
|
497
498
|
case climate_zone
|
498
499
|
when 'ASHRAE 169-2006-1A', 'ASHRAE 169-2006-2A', 'ASHRAE 169-2006-2B', 'ASHRAE 169-2006-3A', 'ASHRAE 169-2006-3B', 'ASHRAE 169-2006-3C'
|
499
500
|
infiltration_per_zone_diningdoor = 0.614474994
|
500
|
-
infiltration_diningdoor.setSchedule(add_schedule('RestaurantSitDown DOOR_INFIL_SCH'))
|
501
|
+
infiltration_diningdoor.setSchedule(model.add_schedule('RestaurantSitDown DOOR_INFIL_SCH'))
|
501
502
|
else
|
502
503
|
infiltration_per_zone_diningdoor = 0.389828222
|
503
|
-
infiltration_diningdoor.setSchedule(add_schedule('RestaurantSitDown VESTIBULE_DOOR_INFIL_SCH'))
|
504
|
+
infiltration_diningdoor.setSchedule(model.add_schedule('RestaurantSitDown VESTIBULE_DOOR_INFIL_SCH'))
|
504
505
|
end
|
505
506
|
end
|
506
507
|
infiltration_diningdoor.setDesignFlowRate(infiltration_per_zone_diningdoor)
|
507
508
|
infiltration_diningdoor.setSpace(dining_space)
|
508
509
|
infiltration_attic.setDesignFlowRate(infiltration_per_zone_attic)
|
509
|
-
infiltration_attic.setSchedule(add_schedule('Always On'))
|
510
|
+
infiltration_attic.setSchedule(model.add_schedule('Always On'))
|
510
511
|
infiltration_attic.setSpace(attic_space)
|
511
512
|
end
|
512
513
|
end
|
513
514
|
|
514
|
-
def update_exhaust_fan_efficiency(template)
|
515
|
+
def self.update_exhaust_fan_efficiency(template, model)
|
515
516
|
case template
|
516
517
|
when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013'
|
517
|
-
getFanZoneExhausts.sort.each do |exhaust_fan|
|
518
|
+
model.getFanZoneExhausts.sort.each do |exhaust_fan|
|
518
519
|
fan_name = exhaust_fan.name.to_s
|
519
520
|
if fan_name.include? 'Dining'
|
520
521
|
exhaust_fan.setFanEfficiency(1)
|
@@ -522,21 +523,21 @@ class OpenStudio::Model::Model
|
|
522
523
|
end
|
523
524
|
end
|
524
525
|
when 'DOE Ref Pre-1980', 'DOE Ref 1980-2004'
|
525
|
-
getFanZoneExhausts.sort.each do |exhaust_fan|
|
526
|
+
model.getFanZoneExhausts.sort.each do |exhaust_fan|
|
526
527
|
exhaust_fan.setFanEfficiency(1)
|
527
528
|
exhaust_fan.setPressureRise(0.000001)
|
528
529
|
end
|
529
530
|
end
|
530
531
|
end
|
531
532
|
|
532
|
-
def add_zone_mixing(template)
|
533
|
+
def self.add_zone_mixing(template, model)
|
533
534
|
# add zone_mixing between kitchen and dining
|
534
|
-
space_kitchen = getSpaceByName('Kitchen').get
|
535
|
+
space_kitchen = model.getSpaceByName('Kitchen').get
|
535
536
|
zone_kitchen = space_kitchen.thermalZone.get
|
536
|
-
space_dining = getSpaceByName('Dining').get
|
537
|
+
space_dining = model.getSpaceByName('Dining').get
|
537
538
|
zone_dining = space_dining.thermalZone.get
|
538
539
|
zone_mixing_kitchen = OpenStudio::Model::ZoneMixing.new(zone_kitchen)
|
539
|
-
zone_mixing_kitchen.setSchedule(add_schedule('RestaurantSitDown Hours_of_operation'))
|
540
|
+
zone_mixing_kitchen.setSchedule(model.add_schedule('RestaurantSitDown Hours_of_operation'))
|
540
541
|
case template
|
541
542
|
when 'DOE Ref Pre-1980', 'DOE Ref 1980-2004'
|
542
543
|
zone_mixing_kitchen.setDesignFlowRate(1.828)
|
@@ -550,12 +551,12 @@ class OpenStudio::Model::Model
|
|
550
551
|
end
|
551
552
|
|
552
553
|
# add extra equipment for kitchen
|
553
|
-
def add_extra_equip_kitchen(template)
|
554
|
-
kitchen_space = getSpaceByName('Kitchen')
|
554
|
+
def self.add_extra_equip_kitchen(template, model)
|
555
|
+
kitchen_space = model.getSpaceByName('Kitchen')
|
555
556
|
kitchen_space = kitchen_space.get
|
556
557
|
kitchen_space_type = kitchen_space.spaceType.get
|
557
|
-
elec_equip_def1 = OpenStudio::Model::ElectricEquipmentDefinition.new(
|
558
|
-
elec_equip_def2 = OpenStudio::Model::ElectricEquipmentDefinition.new(
|
558
|
+
elec_equip_def1 = OpenStudio::Model::ElectricEquipmentDefinition.new(model)
|
559
|
+
elec_equip_def2 = OpenStudio::Model::ElectricEquipmentDefinition.new(model)
|
559
560
|
elec_equip_def1.setName('Kitchen Electric Equipment Definition1')
|
560
561
|
elec_equip_def2.setName('Kitchen Electric Equipment Definition2')
|
561
562
|
case template
|
@@ -580,8 +581,8 @@ class OpenStudio::Model::Model
|
|
580
581
|
elec_equip2.setName('Kitchen_Reach-in-Refrigerator')
|
581
582
|
elec_equip1.setSpaceType(kitchen_space_type)
|
582
583
|
elec_equip2.setSpaceType(kitchen_space_type)
|
583
|
-
elec_equip1.setSchedule(add_schedule('RestaurantSitDown ALWAYS_ON'))
|
584
|
-
elec_equip2.setSchedule(add_schedule('RestaurantSitDown ALWAYS_ON'))
|
584
|
+
elec_equip1.setSchedule(model.add_schedule('RestaurantSitDown ALWAYS_ON'))
|
585
|
+
elec_equip2.setSchedule(model.add_schedule('RestaurantSitDown ALWAYS_ON'))
|
585
586
|
when 'DOE Ref Pre-1980', 'DOE Ref 1980-2004'
|
586
587
|
elec_equip_def1.setDesignLevel(699)
|
587
588
|
elec_equip_def1.setFractionLatent(0)
|
@@ -591,42 +592,42 @@ class OpenStudio::Model::Model
|
|
591
592
|
elec_equip1 = OpenStudio::Model::ElectricEquipment.new(elec_equip_def1)
|
592
593
|
elec_equip1.setName('Kitchen_ExhFan_Equip')
|
593
594
|
elec_equip1.setSpaceType(kitchen_space_type)
|
594
|
-
elec_equip1.setSchedule(add_schedule('RestaurantSitDown Kitchen_Exhaust_SCH'))
|
595
|
+
elec_equip1.setSchedule(model.add_schedule('RestaurantSitDown Kitchen_Exhaust_SCH'))
|
595
596
|
end
|
596
597
|
end
|
597
598
|
|
598
|
-
def update_sizing_zone(template)
|
599
|
+
def self.update_sizing_zone(template, model)
|
599
600
|
case template
|
600
601
|
when '90.1-2007', '90.1-2010', '90.1-2013'
|
601
|
-
zone_sizing = getSpaceByName('Dining').get.thermalZone.get.sizingZone
|
602
|
+
zone_sizing = model.getSpaceByName('Dining').get.thermalZone.get.sizingZone
|
602
603
|
zone_sizing.setCoolingDesignAirFlowMethod('DesignDayWithLimit')
|
603
604
|
zone_sizing.setCoolingMinimumAirFlowperZoneFloorArea(0.003581176)
|
604
|
-
zone_sizing = getSpaceByName('Kitchen').get.thermalZone.get.sizingZone
|
605
|
+
zone_sizing = model.getSpaceByName('Kitchen').get.thermalZone.get.sizingZone
|
605
606
|
zone_sizing.setCoolingDesignAirFlowMethod('DesignDayWithLimit')
|
606
607
|
zone_sizing.setCoolingMinimumAirFlowperZoneFloorArea(0)
|
607
608
|
when '90.1-2004'
|
608
|
-
zone_sizing = getSpaceByName('Dining').get.thermalZone.get.sizingZone
|
609
|
+
zone_sizing = model.getSpaceByName('Dining').get.thermalZone.get.sizingZone
|
609
610
|
zone_sizing.setCoolingDesignAirFlowMethod('DesignDayWithLimit')
|
610
611
|
zone_sizing.setCoolingMinimumAirFlowperZoneFloorArea(0.007111554)
|
611
|
-
zone_sizing = getSpaceByName('Kitchen').get.thermalZone.get.sizingZone
|
612
|
+
zone_sizing = model.getSpaceByName('Kitchen').get.thermalZone.get.sizingZone
|
612
613
|
zone_sizing.setCoolingDesignAirFlowMethod('DesignDayWithLimit')
|
613
614
|
zone_sizing.setCoolingMinimumAirFlowperZoneFloorArea(0)
|
614
615
|
end
|
615
616
|
end
|
616
617
|
|
617
|
-
def adjust_clg_setpoint(template, climate_zone)
|
618
|
+
def self.adjust_clg_setpoint(template, climate_zone, model)
|
618
619
|
['Dining', 'Kitchen'].each do |space_name|
|
619
|
-
space_type_name = getSpaceByName(space_name).get.spaceType.get.name.get
|
620
|
+
space_type_name = model.getSpaceByName(space_name).get.spaceType.get.name.get
|
620
621
|
thermostat_name = space_type_name + ' Thermostat'
|
621
|
-
thermostat = getThermostatSetpointDualSetpointByName(thermostat_name).get
|
622
|
+
thermostat = model.getThermostatSetpointDualSetpointByName(thermostat_name).get
|
622
623
|
case template
|
623
624
|
when '90.1-2004', '90.1-2007', '90.1-2010'
|
624
625
|
if climate_zone == 'ASHRAE 169-2006-2B' || climate_zone == 'ASHRAE 169-2006-1B' || climate_zone == 'ASHRAE 169-2006-3B'
|
625
626
|
case space_name
|
626
627
|
when 'Dining'
|
627
|
-
thermostat.setCoolingSetpointTemperatureSchedule(add_schedule('RestaurantSitDown CLGSETP_SCH_NO_OPTIMUM'))
|
628
|
+
thermostat.setCoolingSetpointTemperatureSchedule(model.add_schedule('RestaurantSitDown CLGSETP_SCH_NO_OPTIMUM'))
|
628
629
|
when 'Kitchen'
|
629
|
-
thermostat.setCoolingSetpointTemperatureSchedule(add_schedule('RestaurantSitDown CLGSETP_KITCHEN_SCH_NO_OPTIMUM'))
|
630
|
+
thermostat.setCoolingSetpointTemperatureSchedule(model.add_schedule('RestaurantSitDown CLGSETP_KITCHEN_SCH_NO_OPTIMUM'))
|
630
631
|
end
|
631
632
|
end
|
632
633
|
end
|
@@ -636,8 +637,8 @@ class OpenStudio::Model::Model
|
|
636
637
|
# In order to provide sufficient OSA to replace exhaust flow through kitchen hoods (3,300 cfm),
|
637
638
|
# modeled OSA to kitchen is different from OSA determined based on ASHRAE 62.1.
|
638
639
|
# It takes into account the available OSA in dining as transfer air.
|
639
|
-
def reset_kitchen_oa(template)
|
640
|
-
space_kitchen = getSpaceByName('Kitchen').get
|
640
|
+
def self.reset_kitchen_oa(template, model)
|
641
|
+
space_kitchen = model.getSpaceByName('Kitchen').get
|
641
642
|
ventilation = space_kitchen.designSpecificationOutdoorAir.get
|
642
643
|
ventilation.setOutdoorAirFlowperPerson(0)
|
643
644
|
ventilation.setOutdoorAirFlowperFloorArea(0)
|
@@ -651,10 +652,10 @@ class OpenStudio::Model::Model
|
|
651
652
|
end
|
652
653
|
end
|
653
654
|
|
654
|
-
def update_waterheater_loss_coefficient(template)
|
655
|
+
def self.update_waterheater_loss_coefficient(template, model)
|
655
656
|
case template
|
656
657
|
when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013', 'NECB 2011'
|
657
|
-
getWaterHeaterMixeds.sort.each do |water_heater|
|
658
|
+
model.getWaterHeaterMixeds.sort.each do |water_heater|
|
658
659
|
if water_heater.name.to_s.include?('Booster')
|
659
660
|
water_heater.setOffCycleLossCoefficienttoAmbientTemperature(1.053159296)
|
660
661
|
water_heater.setOnCycleLossCoefficienttoAmbientTemperature(1.053159296)
|
@@ -666,9 +667,10 @@ class OpenStudio::Model::Model
|
|
666
667
|
end
|
667
668
|
end
|
668
669
|
|
669
|
-
def custom_swh_tweaks(building_type, template, climate_zone, prototype_input)
|
670
|
-
update_waterheater_loss_coefficient(template)
|
670
|
+
def self.custom_swh_tweaks(building_type, template, climate_zone, prototype_input, model)
|
671
|
+
PrototypeBuilding::FullServiceRestaurant.update_waterheater_loss_coefficient(template, model)
|
671
672
|
|
672
673
|
return true
|
673
674
|
end
|
674
675
|
end
|
676
|
+
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
# Modules for building-type specific methods
|
3
|
+
module PrototypeBuilding
|
4
|
+
module HighriseApartment
|
5
|
+
def self.define_space_type_map(building_type, template, climate_zone)
|
5
6
|
space_type_map = nil
|
6
7
|
case template
|
7
8
|
|
@@ -187,7 +188,7 @@ class OpenStudio::Model::Model
|
|
187
188
|
return space_type_map
|
188
189
|
end
|
189
190
|
|
190
|
-
def define_hvac_system_map(building_type, template, climate_zone)
|
191
|
+
def self.define_hvac_system_map(building_type, template, climate_zone)
|
191
192
|
system_to_space_map = [
|
192
193
|
{ 'type' => 'PSZ-AC',
|
193
194
|
'space_names' => ['G SW Apartment'] },
|
@@ -354,20 +355,20 @@ class OpenStudio::Model::Model
|
|
354
355
|
return system_to_space_map
|
355
356
|
end
|
356
357
|
|
357
|
-
def custom_hvac_tweaks(building_type, template, climate_zone, prototype_input)
|
358
|
+
def self.custom_hvac_tweaks(building_type, template, climate_zone, prototype_input, model)
|
358
359
|
# add elevator and lights&fans for the ground floor corridor
|
359
|
-
add_extra_equip_corridor(template)
|
360
|
+
PrototypeBuilding::HighriseApartment.add_extra_equip_corridor(template, model)
|
360
361
|
# add extra infiltration for ground floor corridor
|
361
|
-
add_door_infiltration(template, climate_zone)
|
362
|
+
PrototypeBuilding::HighriseApartment.add_door_infiltration(template, climate_zone, model)
|
362
363
|
|
363
364
|
return true
|
364
365
|
end # add hvac
|
365
366
|
|
366
367
|
# add elevator and lights&fans for the top floor corridor
|
367
|
-
def add_extra_equip_corridor(template)
|
368
|
-
corridor_top_space = getSpaceByName('T Corridor').get
|
369
|
-
elec_equip_def1 = OpenStudio::Model::ElectricEquipmentDefinition.new(
|
370
|
-
elec_equip_def2 = OpenStudio::Model::ElectricEquipmentDefinition.new(
|
368
|
+
def self.add_extra_equip_corridor(template, model)
|
369
|
+
corridor_top_space = model.getSpaceByName('T Corridor').get
|
370
|
+
elec_equip_def1 = OpenStudio::Model::ElectricEquipmentDefinition.new(model)
|
371
|
+
elec_equip_def2 = OpenStudio::Model::ElectricEquipmentDefinition.new(model)
|
371
372
|
elec_equip_def1.setName('T Corridor Electric Equipment Definition1')
|
372
373
|
elec_equip_def2.setName('T Corridor Electric Equipment Definition2')
|
373
374
|
elec_equip_def1.setFractionLatent(0)
|
@@ -392,19 +393,19 @@ class OpenStudio::Model::Model
|
|
392
393
|
elec_equip2.setName('Elevators_Lights_Fan')
|
393
394
|
elec_equip1.setSpace(corridor_top_space)
|
394
395
|
elec_equip2.setSpace(corridor_top_space)
|
395
|
-
elec_equip1.setSchedule(add_schedule('ApartmentMidRise BLDG_ELEVATORS'))
|
396
|
+
elec_equip1.setSchedule(model.add_schedule('ApartmentMidRise BLDG_ELEVATORS'))
|
396
397
|
case template
|
397
398
|
when '90.1-2004', '90.1-2007'
|
398
|
-
elec_equip2.setSchedule(add_schedule('ApartmentMidRise ELEV_LIGHT_FAN_SCH_24_7'))
|
399
|
+
elec_equip2.setSchedule(model.add_schedule('ApartmentMidRise ELEV_LIGHT_FAN_SCH_24_7'))
|
399
400
|
when '90.1-2010', '90.1-2013'
|
400
|
-
elec_equip2.setSchedule(add_schedule('ApartmentMidRise ELEV_LIGHT_FAN_SCH_ADD_DF'))
|
401
|
+
elec_equip2.setSchedule(model.add_schedule('ApartmentMidRise ELEV_LIGHT_FAN_SCH_ADD_DF'))
|
401
402
|
end
|
402
403
|
end
|
403
404
|
|
404
|
-
def update_waterheater_loss_coefficient(template)
|
405
|
+
def self.update_waterheater_loss_coefficient(template, model)
|
405
406
|
case template
|
406
407
|
when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013'
|
407
|
-
getWaterHeaterMixeds.sort.each do |water_heater|
|
408
|
+
model.getWaterHeaterMixeds.sort.each do |water_heater|
|
408
409
|
water_heater.setOffCycleLossCoefficienttoAmbientTemperature(46.288874618)
|
409
410
|
water_heater.setOnCycleLossCoefficienttoAmbientTemperature(46.288874618)
|
410
411
|
end
|
@@ -412,37 +413,38 @@ class OpenStudio::Model::Model
|
|
412
413
|
end
|
413
414
|
|
414
415
|
# add extra infiltration for ground floor corridor
|
415
|
-
def add_door_infiltration(template, climate_zone)
|
416
|
-
g_corridor = getSpaceByName('G Corridor').get
|
417
|
-
infiltration_g_corridor_door = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(
|
416
|
+
def self.add_door_infiltration(template, climate_zone, model)
|
417
|
+
g_corridor = model.getSpaceByName('G Corridor').get
|
418
|
+
infiltration_g_corridor_door = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(model)
|
418
419
|
infiltration_g_corridor_door.setName('G Corridor door Infiltration')
|
419
420
|
infiltration_g_corridor_door.setSpace(g_corridor)
|
420
421
|
case template
|
421
422
|
when '90.1-2004'
|
422
423
|
infiltration_g_corridor_door.setDesignFlowRate(1.523916863)
|
423
|
-
infiltration_g_corridor_door.setSchedule(add_schedule('ApartmentHighRise INFIL_Door_Opening_SCH_0.144'))
|
424
|
+
infiltration_g_corridor_door.setSchedule(model.add_schedule('ApartmentHighRise INFIL_Door_Opening_SCH_0.144'))
|
424
425
|
when '90.1-2007', '90.1-2010', '90.1-2013'
|
425
426
|
case climate_zone
|
426
427
|
when 'ASHRAE 169-2006-1A', 'ASHRAE 169-2006-2A', 'ASHRAE 169-2006-2B'
|
427
428
|
infiltration_g_corridor_door.setDesignFlowRate(1.523916863)
|
428
|
-
infiltration_g_corridor_door.setSchedule(add_schedule('ApartmentHighRise INFIL_Door_Opening_SCH_0.144'))
|
429
|
+
infiltration_g_corridor_door.setSchedule(model.add_schedule('ApartmentHighRise INFIL_Door_Opening_SCH_0.144'))
|
429
430
|
else
|
430
431
|
infiltration_g_corridor_door.setDesignFlowRate(1.008078792)
|
431
|
-
infiltration_g_corridor_door.setSchedule(add_schedule('ApartmentHighRise INFIL_Door_Opening_SCH_0.131'))
|
432
|
+
infiltration_g_corridor_door.setSchedule(model.add_schedule('ApartmentHighRise INFIL_Door_Opening_SCH_0.131'))
|
432
433
|
end
|
433
434
|
end
|
434
435
|
end
|
435
436
|
|
436
|
-
def update_fan_efficiency
|
437
|
-
getFanOnOffs.sort.each do |fan_onoff|
|
437
|
+
def self.update_fan_efficiency(model)
|
438
|
+
model.getFanOnOffs.sort.each do |fan_onoff|
|
438
439
|
fan_onoff.setFanEfficiency(0.53625)
|
439
440
|
fan_onoff.setMotorEfficiency(0.825)
|
440
441
|
end
|
441
442
|
end
|
442
443
|
|
443
|
-
def custom_swh_tweaks(building_type, template, climate_zone, prototype_input)
|
444
|
-
update_waterheater_loss_coefficient(template)
|
444
|
+
def self.custom_swh_tweaks(building_type, template, climate_zone, prototype_input, model)
|
445
|
+
PrototypeBuilding::HighriseApartment.update_waterheater_loss_coefficient(template, model)
|
445
446
|
|
446
447
|
return true
|
447
448
|
end
|
448
449
|
end
|
450
|
+
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
|
2
|
-
#
|
3
|
-
|
4
|
-
|
2
|
+
# Modules for building-type specific methods
|
3
|
+
module PrototypeBuilding
|
4
|
+
module Hospital
|
5
|
+
def self.define_space_type_map(building_type, template, climate_zone)
|
5
6
|
space_type_map = nil
|
6
7
|
case template
|
7
8
|
when 'NECB 2011'
|
@@ -61,7 +62,7 @@ class OpenStudio::Model::Model
|
|
61
62
|
return space_type_map
|
62
63
|
end
|
63
64
|
|
64
|
-
def define_hvac_system_map(building_type, template, climate_zone)
|
65
|
+
def self.define_hvac_system_map(building_type, template, climate_zone)
|
65
66
|
case template
|
66
67
|
when '90.1-2010', '90.1-2013'
|
67
68
|
exhaust_flow = 7200
|
@@ -253,7 +254,7 @@ class OpenStudio::Model::Model
|
|
253
254
|
end
|
254
255
|
end
|
255
256
|
|
256
|
-
def define_space_multiplier
|
257
|
+
def self.define_space_multiplier
|
257
258
|
space_multiplier_map = {
|
258
259
|
'ER_Exam1_Mult4_Flr_1' => 4,
|
259
260
|
'ER_Exam3_Mult4_Flr_1' => 4,
|
@@ -276,13 +277,13 @@ class OpenStudio::Model::Model
|
|
276
277
|
return space_multiplier_map
|
277
278
|
end
|
278
279
|
|
279
|
-
def custom_hvac_tweaks(building_type, template, climate_zone, prototype_input)
|
280
|
+
def self.custom_hvac_tweaks(building_type, template, climate_zone, prototype_input, model)
|
280
281
|
OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Started Adding HVAC')
|
281
282
|
|
282
|
-
system_to_space_map = define_hvac_system_map(building_type, template, climate_zone)
|
283
|
+
system_to_space_map = PrototypeBuilding::Hospital.define_hvac_system_map(building_type, template, climate_zone)
|
283
284
|
|
284
285
|
hot_water_loop = nil
|
285
|
-
getPlantLoops.each do |loop|
|
286
|
+
model.getPlantLoops.each do |loop|
|
286
287
|
# If it has a boiler:hotwater, it is the correct loop
|
287
288
|
unless loop.supplyComponents('OS:Boiler:HotWater'.to_IddObjectType).empty?
|
288
289
|
hot_water_loop = loop
|
@@ -293,29 +294,29 @@ class OpenStudio::Model::Model
|
|
293
294
|
when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013'
|
294
295
|
space_names = ['ER_Exam3_Mult4_Flr_1', 'OR2_Mult5_Flr_2', 'ICU_Flr_2', 'PatRoom5_Mult10_Flr_4', 'Lab_Flr_3']
|
295
296
|
space_names.each do |space_name|
|
296
|
-
add_humidifier(space_name, template, hot_water_loop)
|
297
|
+
PrototypeBuilding::Hospital.add_humidifier(space_name, template, hot_water_loop, model)
|
297
298
|
end
|
298
299
|
when 'DOE Ref Pre-1980', 'DOE Ref 1980-2004'
|
299
300
|
space_names = ['ER_Exam3_Mult4_Flr_1', 'OR2_Mult5_Flr_2']
|
300
301
|
space_names.each do |space_name|
|
301
|
-
add_humidifier(space_name, template, hot_water_loop)
|
302
|
+
PrototypeBuilding::Hospital.add_humidifier(space_name, template, hot_water_loop, model)
|
302
303
|
end
|
303
304
|
end
|
304
305
|
else
|
305
306
|
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.model.Model', 'Could not find hot water loop to attach humidifier to.')
|
306
307
|
end
|
307
308
|
|
308
|
-
reset_kitchen_oa(template)
|
309
|
-
update_exhaust_fan_efficiency(template)
|
310
|
-
reset_or_room_vav_minimum_damper(prototype_input, template)
|
309
|
+
PrototypeBuilding::Hospital.reset_kitchen_oa(template, model)
|
310
|
+
PrototypeBuilding::Hospital.update_exhaust_fan_efficiency(template, model)
|
311
|
+
PrototypeBuilding::Hospital.reset_or_room_vav_minimum_damper(prototype_input, template, model)
|
311
312
|
|
312
313
|
return true
|
313
314
|
end
|
314
315
|
|
315
|
-
def update_waterheater_loss_coefficient(template)
|
316
|
+
def self.update_waterheater_loss_coefficient(template, model)
|
316
317
|
case template
|
317
318
|
when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013'
|
318
|
-
getWaterHeaterMixeds.sort.each do |water_heater|
|
319
|
+
model.getWaterHeaterMixeds.sort.each do |water_heater|
|
319
320
|
if water_heater.name.to_s.include?('Booster')
|
320
321
|
water_heater.setOffCycleLossCoefficienttoAmbientTemperature(1.053159296)
|
321
322
|
water_heater.setOnCycleLossCoefficienttoAmbientTemperature(1.053159296)
|
@@ -327,13 +328,13 @@ class OpenStudio::Model::Model
|
|
327
328
|
end
|
328
329
|
end
|
329
330
|
|
330
|
-
def custom_swh_tweaks(building_type, template, climate_zone, prototype_input)
|
331
|
-
update_waterheater_loss_coefficient(template)
|
331
|
+
def self.custom_swh_tweaks(building_type, template, climate_zone, prototype_input, model)
|
332
|
+
PrototypeBuilding::Hospital.update_waterheater_loss_coefficient(template, model)
|
332
333
|
return true
|
333
334
|
end # add swh
|
334
335
|
|
335
|
-
def reset_kitchen_oa(template)
|
336
|
-
space_kitchen = getSpaceByName('Kitchen_Flr_5').get
|
336
|
+
def self.reset_kitchen_oa(template, model)
|
337
|
+
space_kitchen = model.getSpaceByName('Kitchen_Flr_5').get
|
337
338
|
ventilation = space_kitchen.designSpecificationOutdoorAir.get
|
338
339
|
ventilation.setOutdoorAirFlowperPerson(0)
|
339
340
|
ventilation.setOutdoorAirFlowperFloorArea(0)
|
@@ -345,32 +346,32 @@ class OpenStudio::Model::Model
|
|
345
346
|
end
|
346
347
|
end
|
347
348
|
|
348
|
-
def update_exhaust_fan_efficiency(template)
|
349
|
+
def self.update_exhaust_fan_efficiency(template, model)
|
349
350
|
case template
|
350
351
|
when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013'
|
351
|
-
getFanZoneExhausts.sort.each do |exhaust_fan|
|
352
|
+
model.getFanZoneExhausts.sort.each do |exhaust_fan|
|
352
353
|
exhaust_fan.setFanEfficiency(0.16)
|
353
354
|
exhaust_fan.setPressureRise(125)
|
354
355
|
end
|
355
356
|
when 'DOE Ref Pre-1980', 'DOE Ref 1980-2004'
|
356
|
-
getFanZoneExhausts.sort.each do |exhaust_fan|
|
357
|
+
model.getFanZoneExhausts.sort.each do |exhaust_fan|
|
357
358
|
exhaust_fan.setFanEfficiency(0.338)
|
358
359
|
exhaust_fan.setPressureRise(125)
|
359
360
|
end
|
360
361
|
end
|
361
362
|
end
|
362
363
|
|
363
|
-
def add_humidifier(space_name, template, hot_water_loop)
|
364
|
-
space = getSpaceByName(space_name).get
|
364
|
+
def self.add_humidifier(space_name, template, hot_water_loop, model)
|
365
|
+
space = model.getSpaceByName(space_name).get
|
365
366
|
zone = space.thermalZone.get
|
366
|
-
humidistat = OpenStudio::Model::ZoneControlHumidistat.new(
|
367
|
-
humidistat.setHumidifyingRelativeHumiditySetpointSchedule(add_schedule('Hospital MinRelHumSetSch'))
|
368
|
-
humidistat.setDehumidifyingRelativeHumiditySetpointSchedule(add_schedule('Hospital MaxRelHumSetSch'))
|
367
|
+
humidistat = OpenStudio::Model::ZoneControlHumidistat.new(model)
|
368
|
+
humidistat.setHumidifyingRelativeHumiditySetpointSchedule(model.add_schedule('Hospital MinRelHumSetSch'))
|
369
|
+
humidistat.setDehumidifyingRelativeHumiditySetpointSchedule(model.add_schedule('Hospital MaxRelHumSetSch'))
|
369
370
|
zone.setZoneControlHumidistat(humidistat)
|
370
371
|
|
371
|
-
getAirLoopHVACs.each do |air_loop|
|
372
|
+
model.getAirLoopHVACs.each do |air_loop|
|
372
373
|
if air_loop.thermalZones.include? zone
|
373
|
-
humidifier = OpenStudio::Model::HumidifierSteamElectric.new(
|
374
|
+
humidifier = OpenStudio::Model::HumidifierSteamElectric.new(model)
|
374
375
|
humidifier.setRatedCapacity(3.72E-5)
|
375
376
|
humidifier.setRatedPower(100_000)
|
376
377
|
humidifier.setName("#{air_loop.name.get} Electric Steam Humidifier")
|
@@ -384,12 +385,12 @@ class OpenStudio::Model::Model
|
|
384
385
|
heating_coil_outlet_node = htg_coil.airOutletModelObject.get.to_Node.get
|
385
386
|
supply_outlet_node = air_loop.supplyOutletNode
|
386
387
|
humidifier.addToNode(heating_coil_outlet_node)
|
387
|
-
humidity_spm = OpenStudio::Model::SetpointManagerSingleZoneHumidityMinimum.new(
|
388
|
+
humidity_spm = OpenStudio::Model::SetpointManagerSingleZoneHumidityMinimum.new(model)
|
388
389
|
case template
|
389
390
|
when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013'
|
390
|
-
extra_elec_htg_coil = OpenStudio::Model::CoilHeatingElectric.new(
|
391
|
+
extra_elec_htg_coil = OpenStudio::Model::CoilHeatingElectric.new(model, model.alwaysOnDiscreteSchedule)
|
391
392
|
extra_elec_htg_coil.setName("#{space_name} Electric Htg Coil")
|
392
|
-
extra_water_htg_coil = OpenStudio::Model::CoilHeatingWater.new(
|
393
|
+
extra_water_htg_coil = OpenStudio::Model::CoilHeatingWater.new(model, model.alwaysOnDiscreteSchedule)
|
393
394
|
extra_water_htg_coil.setName("#{space_name} Water Htg Coil")
|
394
395
|
hot_water_loop.addDemandBranchForComponent(extra_water_htg_coil)
|
395
396
|
extra_elec_htg_coil.addToNode(supply_outlet_node)
|
@@ -402,31 +403,31 @@ class OpenStudio::Model::Model
|
|
402
403
|
end
|
403
404
|
end
|
404
405
|
|
405
|
-
def hospital_add_daylighting_controls(template)
|
406
|
+
def self.hospital_add_daylighting_controls(template, model)
|
406
407
|
space_names = ['Office1_Flr_5', 'Office3_Flr_5', 'Lobby_Records_Flr_1']
|
407
408
|
space_names.each do |space_name|
|
408
|
-
space = getSpaceByName(space_name).get
|
409
|
+
space = model.getSpaceByName(space_name).get
|
409
410
|
space.add_daylighting_controls(template, false, false)
|
410
411
|
end
|
411
412
|
end
|
412
413
|
|
413
|
-
def reset_or_room_vav_minimum_damper(prototype_input, template)
|
414
|
+
def self.reset_or_room_vav_minimum_damper(prototype_input, template, model)
|
414
415
|
case template
|
415
416
|
when '90.1-2004', '90.1-2007'
|
416
417
|
return true
|
417
418
|
when '90.1-2010', '90.1-2013'
|
418
|
-
getAirTerminalSingleDuctVAVReheats.sort.each do |airterminal|
|
419
|
+
model.getAirTerminalSingleDuctVAVReheats.sort.each do |airterminal|
|
419
420
|
airterminal_name = airterminal.name.get
|
420
421
|
if airterminal_name.include?('OR1') || airterminal_name.include?('OR2') || airterminal_name.include?('OR3') || airterminal_name.include?('OR4')
|
421
422
|
airterminal.setZoneMinimumAirFlowMethod('Scheduled')
|
422
|
-
airterminal.setMinimumAirFlowFractionSchedule(add_schedule('Hospital OR_MinSA_Sched'))
|
423
|
+
airterminal.setMinimumAirFlowFractionSchedule(model.add_schedule('Hospital OR_MinSA_Sched'))
|
423
424
|
end
|
424
425
|
end
|
425
426
|
end
|
426
427
|
end
|
427
428
|
|
428
|
-
def modify_hospital_oa_controller(template)
|
429
|
-
getAirLoopHVACs.each do |air_loop|
|
429
|
+
def self.modify_hospital_oa_controller(template, model)
|
430
|
+
model.getAirLoopHVACs.each do |air_loop|
|
430
431
|
oa_sys = air_loop.airLoopHVACOutdoorAirSystem.get
|
431
432
|
oa_control = oa_sys.getControllerOutdoorAir
|
432
433
|
case air_loop.name.get
|
@@ -436,3 +437,4 @@ class OpenStudio::Model::Model
|
|
436
437
|
end
|
437
438
|
end
|
438
439
|
end
|
440
|
+
end
|