openstudio-standards 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/data/standards/OpenStudio_Standards.xlsx +0 -0
  3. data/data/standards/OpenStudio_Standards_boilers.json +62 -4
  4. data/data/standards/OpenStudio_Standards_chillers.json +778 -68
  5. data/data/standards/OpenStudio_Standards_construction_sets.json +52 -93
  6. data/data/standards/OpenStudio_Standards_curve_biquadratics.json +36 -36
  7. data/data/standards/OpenStudio_Standards_curve_quadratics.json +3 -3
  8. data/data/standards/OpenStudio_Standards_heat_pumps.json +840 -0
  9. data/data/standards/OpenStudio_Standards_heat_pumps_heating.json +352 -0
  10. data/data/standards/OpenStudio_Standards_heat_rejection.json +48 -0
  11. data/data/standards/OpenStudio_Standards_motors.json +270 -0
  12. data/data/standards/OpenStudio_Standards_space_types.json +10390 -2824
  13. data/data/standards/OpenStudio_Standards_unitary_acs.json +794 -18
  14. data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.ddy +538 -0
  15. data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.epw +8768 -0
  16. data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.stat +493 -0
  17. data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.ddy +536 -0
  18. data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.epw +8768 -0
  19. data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.stat +554 -0
  20. data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.ddy +536 -0
  21. data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.epw +8768 -0
  22. data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.stat +554 -0
  23. data/data/weather/envelope_info.csv +6 -0
  24. data/lib/openstudio-standards.rb +10 -11
  25. data/lib/openstudio-standards/btap/compliance.rb +251 -969
  26. data/lib/openstudio-standards/btap/envelope.rb +1 -1
  27. data/lib/openstudio-standards/btap/fileio.rb +37 -5
  28. data/lib/openstudio-standards/btap/geometry.rb +27 -17
  29. data/lib/openstudio-standards/btap/hvac.rb +80 -27
  30. data/lib/openstudio-standards/hvac_sizing/{HVACSizing.CoilHeatingDXMultiSpeed.rb → Siz.CoilHeatingDXMultiSpeed.rb} +0 -0
  31. data/lib/openstudio-standards/hvac_sizing/Siz.ControllerOutdoorAir.rb +30 -4
  32. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerTwoSpeed.rb +61 -5
  33. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerVariableSpeed.rb +37 -7
  34. data/lib/openstudio-standards/hvac_sizing/Siz.DistrictCooling.rb +27 -0
  35. data/lib/openstudio-standards/hvac_sizing/Siz.DistrictHeating.rb +27 -0
  36. data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb +55 -0
  37. data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsVariableSpeed.rb +55 -0
  38. data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +51 -9
  39. data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +99 -17
  40. data/lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb +1 -1
  41. data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +29 -6
  42. data/lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb +16 -0
  43. data/lib/openstudio-standards/prototypes/Prototype.AirTerminalSingleDuctVAVReheat.rb +43 -48
  44. data/lib/openstudio-standards/prototypes/Prototype.ControllerWaterCoil.rb +5 -9
  45. data/lib/openstudio-standards/prototypes/Prototype.Fan.rb +68 -0
  46. data/lib/openstudio-standards/prototypes/Prototype.FanConstantVolume.rb +39 -43
  47. data/lib/openstudio-standards/prototypes/Prototype.FanOnOff.rb +49 -51
  48. data/lib/openstudio-standards/prototypes/Prototype.FanVariableVolume.rb +55 -61
  49. data/lib/openstudio-standards/prototypes/Prototype.FanZoneExhaust.rb +8 -10
  50. data/lib/openstudio-standards/prototypes/Prototype.HeatExchangerAirToAirSensibleAndLatent.rb +15 -20
  51. data/lib/openstudio-standards/prototypes/Prototype.Model.hvac.rb +330 -322
  52. data/lib/openstudio-standards/prototypes/Prototype.Model.rb +501 -446
  53. data/lib/openstudio-standards/prototypes/Prototype.Model.swh.rb +221 -230
  54. data/lib/openstudio-standards/prototypes/Prototype.add_objects.rb +0 -2
  55. data/lib/openstudio-standards/prototypes/Prototype.full_service_restaurant.rb +130 -137
  56. data/lib/openstudio-standards/prototypes/Prototype.high_rise_apartment.rb +374 -291
  57. data/lib/openstudio-standards/prototypes/Prototype.hospital.rb +146 -193
  58. data/lib/openstudio-standards/prototypes/Prototype.hvac_systems.rb +1315 -1113
  59. data/lib/openstudio-standards/prototypes/Prototype.large_hotel.rb +65 -88
  60. data/lib/openstudio-standards/prototypes/Prototype.large_office.rb +101 -156
  61. data/lib/openstudio-standards/prototypes/Prototype.medium_office.rb +46 -96
  62. data/lib/openstudio-standards/prototypes/Prototype.mid_rise_apartment.rb +113 -123
  63. data/lib/openstudio-standards/prototypes/Prototype.outpatient.rb +356 -345
  64. data/lib/openstudio-standards/prototypes/Prototype.primary_school.rb +48 -103
  65. data/lib/openstudio-standards/prototypes/Prototype.quick_service_restaurant.rb +115 -123
  66. data/lib/openstudio-standards/prototypes/Prototype.retail_standalone.rb +30 -39
  67. data/lib/openstudio-standards/prototypes/Prototype.retail_stripmall.rb +32 -45
  68. data/lib/openstudio-standards/prototypes/Prototype.secondary_school.rb +98 -258
  69. data/lib/openstudio-standards/prototypes/Prototype.small_hotel.rb +429 -474
  70. data/lib/openstudio-standards/prototypes/Prototype.small_office.rb +28 -36
  71. data/lib/openstudio-standards/prototypes/Prototype.strip_model.rb +7 -7
  72. data/lib/openstudio-standards/prototypes/Prototype.utilities.rb +172 -146
  73. data/lib/openstudio-standards/prototypes/Prototype.warehouse.rb +46 -53
  74. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +885 -707
  75. data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctParallelPIUReheat.rb +48 -57
  76. data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +24 -31
  77. data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +80 -93
  78. data/lib/openstudio-standards/standards/Standards.BuildingStory.rb +69 -0
  79. data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +60 -72
  80. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +104 -108
  81. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +190 -198
  82. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +134 -146
  83. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +56 -60
  84. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +151 -161
  85. data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +30 -34
  86. data/lib/openstudio-standards/standards/Standards.Construction.rb +116 -132
  87. data/lib/openstudio-standards/standards/Standards.CoolingTower.rb +138 -0
  88. data/lib/openstudio-standards/standards/Standards.CoolingTowerSingleSpeed.rb +11 -0
  89. data/lib/openstudio-standards/standards/Standards.CoolingTowerTwoSpeed.rb +11 -0
  90. data/lib/openstudio-standards/standards/Standards.CoolingTowerVariableSpeed.rb +16 -0
  91. data/lib/openstudio-standards/standards/Standards.Fan.rb +190 -236
  92. data/lib/openstudio-standards/standards/Standards.FanConstantVolume.rb +0 -2
  93. data/lib/openstudio-standards/standards/Standards.FanOnOff.rb +0 -2
  94. data/lib/openstudio-standards/standards/Standards.FanVariableVolume.rb +168 -14
  95. data/lib/openstudio-standards/standards/Standards.FanZoneExhaust.rb +0 -2
  96. data/lib/openstudio-standards/standards/Standards.HeaderedPumpsConstantSpeed.rb +33 -0
  97. data/lib/openstudio-standards/standards/Standards.HeaderedPumpsVariableSpeed.rb +83 -0
  98. data/lib/openstudio-standards/standards/Standards.HeatExchangerSensLat.rb +22 -0
  99. data/lib/openstudio-standards/standards/Standards.Model.rb +2385 -1622
  100. data/lib/openstudio-standards/standards/Standards.PlanarSurface.rb +83 -35
  101. data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +805 -395
  102. data/lib/openstudio-standards/standards/Standards.Pump.rb +139 -119
  103. data/lib/openstudio-standards/standards/Standards.PumpConstantSpeed.rb +0 -2
  104. data/lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb +16 -15
  105. data/lib/openstudio-standards/standards/Standards.ScheduleCompact.rb +35 -0
  106. data/lib/openstudio-standards/standards/Standards.ScheduleConstant.rb +7 -13
  107. data/lib/openstudio-standards/standards/Standards.ScheduleRuleset.rb +144 -59
  108. data/lib/openstudio-standards/standards/Standards.Space.rb +1509 -1326
  109. data/lib/openstudio-standards/standards/Standards.SpaceType.rb +254 -262
  110. data/lib/openstudio-standards/standards/Standards.SubSurface.rb +105 -105
  111. data/lib/openstudio-standards/standards/Standards.Surface.rb +27 -31
  112. data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +882 -157
  113. data/lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb +179 -69
  114. data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +75 -0
  115. data/lib/openstudio-standards/utilities/logging.rb +31 -38
  116. data/lib/openstudio-standards/utilities/simulation.rb +118 -82
  117. data/lib/openstudio-standards/version.rb +1 -1
  118. data/lib/openstudio-standards/weather/Weather.Model.rb +382 -390
  119. data/lib/openstudio-standards/weather/Weather.stat_file.rb +159 -78
  120. metadata +59 -6
@@ -1,143 +1,93 @@
1
1
 
2
2
  # Extend the class to add Medium Office specific stuff
3
3
  class OpenStudio::Model::Model
4
-
5
- def define_space_type_map(building_type, building_vintage, climate_zone)
4
+ def define_space_type_map(building_type, template, climate_zone)
6
5
  space_type_map = nil
7
- case building_vintage
6
+ space_type_map = case template
8
7
  when 'NECB 2011'
9
- space_type_map ={
10
- "Office - open plan" => ["Core_bottom", "Core_mid", "Core_top",
11
- "Perimeter_bot_ZN_1", "Perimeter_bot_ZN_2", "Perimeter_bot_ZN_3",
12
- "Perimeter_bot_ZN_4", "Perimeter_mid_ZN_1", "Perimeter_mid_ZN_2",
13
- "Perimeter_mid_ZN_3", "Perimeter_mid_ZN_4", "Perimeter_top_ZN_1",
14
- "Perimeter_top_ZN_2", "Perimeter_top_ZN_3", "Perimeter_top_ZN_4"],
15
-
16
- "- undefined -" => ["FirstFloor_Plenum", "TopFloor_Plenum", "MidFloor_Plenum"]
8
+ {
9
+ '- undefined -' => ['FirstFloor_Plenum', 'TopFloor_Plenum', 'MidFloor_Plenum'],
10
+ 'Office - open plan' => ['Core_bottom', 'Core_mid', 'Core_top', 'Perimeter_bot_ZN_1', 'Perimeter_bot_ZN_2', 'Perimeter_bot_ZN_3', 'Perimeter_bot_ZN_4', 'Perimeter_mid_ZN_1', 'Perimeter_mid_ZN_2', 'Perimeter_mid_ZN_3', 'Perimeter_mid_ZN_4', 'Perimeter_top_ZN_1', 'Perimeter_top_ZN_2', 'Perimeter_top_ZN_3', 'Perimeter_top_ZN_4']
11
+
17
12
  }
18
13
  else
19
- space_type_map = {
20
- 'WholeBuilding - Md Office' => [
21
- 'Perimeter_bot_ZN_1', 'Perimeter_bot_ZN_2', 'Perimeter_bot_ZN_3', 'Perimeter_bot_ZN_4', 'Core_bottom',
22
- 'Perimeter_mid_ZN_1', 'Perimeter_mid_ZN_2', 'Perimeter_mid_ZN_3', 'Perimeter_mid_ZN_4', 'Core_mid',
23
- 'Perimeter_top_ZN_1', 'Perimeter_top_ZN_2', 'Perimeter_top_ZN_3', 'Perimeter_top_ZN_4', 'Core_top'
24
- ]
14
+ {
15
+ 'WholeBuilding - Md Office' => ['Perimeter_bot_ZN_1', 'Perimeter_bot_ZN_2', 'Perimeter_bot_ZN_3', 'Perimeter_bot_ZN_4', 'Core_bottom', 'Perimeter_mid_ZN_1', 'Perimeter_mid_ZN_2', 'Perimeter_mid_ZN_3', 'Perimeter_mid_ZN_4', 'Core_mid', 'Perimeter_top_ZN_1', 'Perimeter_top_ZN_2', 'Perimeter_top_ZN_3', 'Perimeter_top_ZN_4', 'Core_top']
25
16
  }
26
- end
17
+ end
27
18
  return space_type_map
28
19
  end
29
20
 
30
- def define_hvac_system_map(building_type, building_vintage, climate_zone)
31
- case building_vintage
21
+ def define_hvac_system_map(building_type, template, climate_zone)
22
+ system_to_space_map = case template
32
23
  when 'DOE Ref Pre-1980'
33
- system_to_space_map = [
34
- {
24
+ [
25
+ {
35
26
  'type' => 'PSZ-AC',
36
27
 
37
28
  'space_names' =>
38
- [
39
- 'Perimeter_bot_ZN_1',
40
- 'Perimeter_bot_ZN_2',
41
- 'Perimeter_bot_ZN_3',
42
- 'Perimeter_bot_ZN_4',
43
- 'Core_bottom',
44
- 'Perimeter_mid_ZN_1',
45
- 'Perimeter_mid_ZN_2',
46
- 'Perimeter_mid_ZN_3',
47
- 'Perimeter_mid_ZN_4',
48
- 'Core_mid',
49
- 'Perimeter_top_ZN_1',
50
- 'Perimeter_top_ZN_2',
51
- 'Perimeter_top_ZN_3',
52
- 'Perimeter_top_ZN_4',
53
- 'Core_top'
54
- ]
29
+ ['Perimeter_bot_ZN_1', 'Perimeter_bot_ZN_2', 'Perimeter_bot_ZN_3', 'Perimeter_bot_ZN_4', 'Core_bottom', 'Perimeter_mid_ZN_1', 'Perimeter_mid_ZN_2', 'Perimeter_mid_ZN_3', 'Perimeter_mid_ZN_4', 'Core_mid', 'Perimeter_top_ZN_1', 'Perimeter_top_ZN_2', 'Perimeter_top_ZN_3', 'Perimeter_top_ZN_4', 'Core_top']
55
30
  }
56
31
  ]
57
32
  else
58
- system_to_space_map = [
33
+ [
59
34
  {
60
35
  'type' => 'PVAV',
61
36
  'space_names' =>
62
- [
63
- 'Perimeter_bot_ZN_1',
64
- 'Perimeter_bot_ZN_2',
65
- 'Perimeter_bot_ZN_3',
66
- 'Perimeter_bot_ZN_4',
67
- 'Core_bottom'
68
- ],
37
+ ['Perimeter_bot_ZN_1', 'Perimeter_bot_ZN_2', 'Perimeter_bot_ZN_3', 'Perimeter_bot_ZN_4', 'Core_bottom'],
69
38
  'return_plenum' => 'FirstFloor_Plenum'
70
39
  },
71
40
  {
72
41
  'type' => 'PVAV',
73
42
  'space_names' =>
74
- [
75
- 'Perimeter_mid_ZN_1',
76
- 'Perimeter_mid_ZN_2',
77
- 'Perimeter_mid_ZN_3',
78
- 'Perimeter_mid_ZN_4',
79
- 'Core_mid'
80
- ],
43
+ ['Perimeter_mid_ZN_1', 'Perimeter_mid_ZN_2', 'Perimeter_mid_ZN_3', 'Perimeter_mid_ZN_4', 'Core_mid'],
81
44
  'return_plenum' => 'MidFloor_Plenum'
82
45
  },
83
46
  {
84
47
  'type' => 'PVAV',
85
48
  'space_names' =>
86
- [
87
- 'Perimeter_top_ZN_1',
88
- 'Perimeter_top_ZN_2',
89
- 'Perimeter_top_ZN_3',
90
- 'Perimeter_top_ZN_4',
91
- 'Core_top'
92
- ],
49
+ ['Perimeter_top_ZN_1', 'Perimeter_top_ZN_2', 'Perimeter_top_ZN_3', 'Perimeter_top_ZN_4', 'Core_top'],
93
50
  'return_plenum' => 'TopFloor_Plenum'
94
51
  }
95
52
  ]
96
- end
53
+ end
97
54
  return system_to_space_map
98
55
  end
99
-
100
- def custom_hvac_tweaks(building_type, building_vintage, climate_zone, prototype_input)
101
-
102
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.model.Model', 'Started building type specific adjustments')
103
-
104
- self.getSpaces.each do |space|
105
-
106
- if space.name.get.to_s == "Core_bottom"
107
- self.add_elevator(building_vintage,
108
- space,
109
- prototype_input['number_of_elevators'],
110
- prototype_input['elevator_type'],
111
- prototype_input['elevator_schedule'],
112
- prototype_input['elevator_fan_schedule'],
113
- prototype_input['elevator_fan_schedule'],
114
- building_type)
115
- end
116
-
56
+
57
+ def custom_hvac_tweaks(building_type, template, climate_zone, prototype_input)
58
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Started building type specific adjustments')
59
+
60
+ getSpaces.each do |space|
61
+ if space.name.get.to_s == 'Core_bottom'
62
+ add_elevator(template,
63
+ space,
64
+ prototype_input['number_of_elevators'],
65
+ prototype_input['elevator_type'],
66
+ prototype_input['elevator_schedule'],
67
+ prototype_input['elevator_fan_schedule'],
68
+ prototype_input['elevator_fan_schedule'],
69
+ building_type)
70
+ end
117
71
  end
118
72
 
119
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.model.Model', 'Finished building type specific adjustments')
120
-
73
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Finished building type specific adjustments')
74
+
121
75
  return true
122
-
123
- end #add hvac
76
+ end # add hvac
124
77
 
125
- def update_waterheater_loss_coefficient(building_vintage)
126
- case building_vintage
78
+ def update_waterheater_loss_coefficient(template)
79
+ case template
127
80
  when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013', 'NECB 2011'
128
- self.getWaterHeaterMixeds.sort.each do |water_heater|
81
+ getWaterHeaterMixeds.sort.each do |water_heater|
129
82
  water_heater.setOffCycleLossCoefficienttoAmbientTemperature(7.561562668)
130
83
  water_heater.setOnCycleLossCoefficienttoAmbientTemperature(7.561562668)
131
84
  end
132
- end
133
- end
134
-
135
- def custom_swh_tweaks(building_type, building_vintage, climate_zone, prototype_input)
136
-
137
- self.update_waterheater_loss_coefficient(building_vintage)
138
-
139
- return true
140
-
85
+ end
141
86
  end
142
87
 
88
+ def custom_swh_tweaks(building_type, template, climate_zone, prototype_input)
89
+ update_waterheater_loss_coefficient(template)
90
+
91
+ return true
92
+ end
143
93
  end
@@ -1,12 +1,10 @@
1
1
 
2
2
 
3
3
  class OpenStudio::Model::Model
4
-
5
- def define_space_type_map(building_type, building_vintage, climate_zone)
6
-
4
+ def define_space_type_map(building_type, template, climate_zone)
7
5
  space_type_map = nil
8
-
9
- case building_vintage
6
+
7
+ case template
10
8
  when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013'
11
9
  space_type_map = {
12
10
  'Office' => ['Office'],
@@ -72,86 +70,86 @@ class OpenStudio::Model::Model
72
70
  'T S2 Apartment'
73
71
  ]
74
72
  }
75
-
73
+
76
74
  when 'NECB 2011'
77
- space_type_map ={
78
- "Corr. < 2.4m wide" => ["G Corridor", "M Corridor", "T Corridor"],
79
-
80
- "Dormitory - living quarters" => ["G N1 Apartment", "G N2 Apartment", "G NE Apartment",
81
- "G NW Apartment", "G S1 Apartment", "G S2 Apartment",
82
- "G SW Apartment", "M N1 Apartment", "M N2 Apartment",
83
- "M NE Apartment", "M NW Apartment", "M S1 Apartment",
84
- "M S2 Apartment", "M SE Apartment", "M SW Apartment",
85
- "T N1 Apartment", "T N2 Apartment", "T NE Apartment",
86
- "T NW Apartment", "T S1 Apartment", "T S2 Apartment",
87
- "T SE Apartment", "T SW Apartment"],
88
- "Office - enclosed" => ["Office"]
75
+ sch = 'G'
76
+ space_type_map = {
77
+ "Corr. < 2.4m wide-sch-#{sch}" => ['G Corridor', 'M Corridor', 'T Corridor'],
78
+
79
+ 'Dwelling Unit(s)' => ['G N1 Apartment', 'G N2 Apartment', 'G NE Apartment',
80
+ 'G NW Apartment', 'G S1 Apartment', 'G S2 Apartment',
81
+ 'G SW Apartment', 'M N1 Apartment', 'M N2 Apartment',
82
+ 'M NE Apartment', 'M NW Apartment', 'M S1 Apartment',
83
+ 'M S2 Apartment', 'M SE Apartment', 'M SW Apartment',
84
+ 'T N1 Apartment', 'T N2 Apartment', 'T NE Apartment',
85
+ 'T NW Apartment', 'T S1 Apartment', 'T S2 Apartment',
86
+ 'T SE Apartment', 'T SW Apartment'],
87
+ 'Office - enclosed' => ['Office']
89
88
  }
90
89
  end
91
-
90
+
92
91
  return space_type_map
93
92
  end
94
93
 
95
-
96
- def define_hvac_system_map(building_type, building_vintage, climate_zone)
94
+ def define_hvac_system_map(building_type, template, climate_zone)
97
95
  system_to_space_map = [
98
- {'type' => 'SAC',
99
- 'space_names' => ['G SW Apartment']},
100
- {'type' => 'SAC',
101
- 'space_names' => ['G NW Apartment']},
102
- {'type' => 'SAC',
103
- 'space_names' => ['G NE Apartment']},
104
- {'type' => 'SAC',
105
- 'space_names' => ['G N1 Apartment']},
106
- {'type' => 'SAC',
107
- 'space_names' => ['G N2 Apartment']},
108
- {'type' => 'SAC',
109
- 'space_names' => ['G S1 Apartment']},
110
- {'type' => 'SAC',
111
- 'space_names' => ['G S2 Apartment']},
112
- {'type' => 'SAC',
113
- 'space_names' => ['M SW Apartment']},
114
- {'type' => 'SAC',
115
- 'space_names' => ['M NW Apartment']},
116
- {'type' => 'SAC',
117
- 'space_names' => ['M SE Apartment']},
118
- {'type' => 'SAC',
119
- 'space_names' => ['M NE Apartment']},
120
- {'type' => 'SAC',
121
- 'space_names' => ['M N1 Apartment']},
122
- {'type' => 'SAC',
123
- 'space_names' => ['M N2 Apartment']},
124
- {'type' => 'SAC',
125
- 'space_names' => ['M S1 Apartment']},
126
- {'type' => 'SAC',
127
- 'space_names' => ['M S2 Apartment']},
128
- {'type' => 'SAC',
129
- 'space_names' => ['T SW Apartment']},
130
- {'type' => 'SAC',
131
- 'space_names' => ['T NW Apartment']},
132
- {'type' => 'SAC',
133
- 'space_names' => ['T SE Apartment']},
134
- {'type' => 'SAC',
135
- 'space_names' => ['T NE Apartment']},
136
- {'type' => 'SAC',
137
- 'space_names' => ['T N1 Apartment']},
138
- {'type' => 'SAC',
139
- 'space_names' => ['T N2 Apartment']},
140
- {'type' => 'SAC',
141
- 'space_names' => ['T S1 Apartment']},
142
- {'type' => 'SAC',
143
- 'space_names' => ['T S2 Apartment']},
144
- {'type' => 'SAC',
145
- 'space_names' => ['Office']}
96
+ { 'type' => 'SAC',
97
+ 'space_names' => ['G SW Apartment'] },
98
+ { 'type' => 'SAC',
99
+ 'space_names' => ['G NW Apartment'] },
100
+ { 'type' => 'SAC',
101
+ 'space_names' => ['G NE Apartment'] },
102
+ { 'type' => 'SAC',
103
+ 'space_names' => ['G N1 Apartment'] },
104
+ { 'type' => 'SAC',
105
+ 'space_names' => ['G N2 Apartment'] },
106
+ { 'type' => 'SAC',
107
+ 'space_names' => ['G S1 Apartment'] },
108
+ { 'type' => 'SAC',
109
+ 'space_names' => ['G S2 Apartment'] },
110
+ { 'type' => 'SAC',
111
+ 'space_names' => ['M SW Apartment'] },
112
+ { 'type' => 'SAC',
113
+ 'space_names' => ['M NW Apartment'] },
114
+ { 'type' => 'SAC',
115
+ 'space_names' => ['M SE Apartment'] },
116
+ { 'type' => 'SAC',
117
+ 'space_names' => ['M NE Apartment'] },
118
+ { 'type' => 'SAC',
119
+ 'space_names' => ['M N1 Apartment'] },
120
+ { 'type' => 'SAC',
121
+ 'space_names' => ['M N2 Apartment'] },
122
+ { 'type' => 'SAC',
123
+ 'space_names' => ['M S1 Apartment'] },
124
+ { 'type' => 'SAC',
125
+ 'space_names' => ['M S2 Apartment'] },
126
+ { 'type' => 'SAC',
127
+ 'space_names' => ['T SW Apartment'] },
128
+ { 'type' => 'SAC',
129
+ 'space_names' => ['T NW Apartment'] },
130
+ { 'type' => 'SAC',
131
+ 'space_names' => ['T SE Apartment'] },
132
+ { 'type' => 'SAC',
133
+ 'space_names' => ['T NE Apartment'] },
134
+ { 'type' => 'SAC',
135
+ 'space_names' => ['T N1 Apartment'] },
136
+ { 'type' => 'SAC',
137
+ 'space_names' => ['T N2 Apartment'] },
138
+ { 'type' => 'SAC',
139
+ 'space_names' => ['T S1 Apartment'] },
140
+ { 'type' => 'SAC',
141
+ 'space_names' => ['T S2 Apartment'] },
142
+ { 'type' => 'SAC',
143
+ 'space_names' => ['Office'] }
146
144
  ]
147
145
 
148
- case building_vintage
146
+ case template
149
147
  when 'DOE Ref 1980-2004', 'DOE Ref Pre-1980'
150
- system_to_space_map.push({'type' => 'UnitHeater', 'space_names' => ['G Corridor']})
151
- system_to_space_map.push({'type' => 'UnitHeater', 'space_names' => ['M Corridor']})
152
- system_to_space_map.push({'type' => 'UnitHeater', 'space_names' => ['T Corridor']})
148
+ system_to_space_map.push('type' => 'UnitHeater', 'space_names' => ['G Corridor'])
149
+ system_to_space_map.push('type' => 'UnitHeater', 'space_names' => ['M Corridor'])
150
+ system_to_space_map.push('type' => 'UnitHeater', 'space_names' => ['T Corridor'])
153
151
  end
154
-
152
+
155
153
  return system_to_space_map
156
154
  end
157
155
 
@@ -170,49 +168,44 @@ class OpenStudio::Model::Model
170
168
  }
171
169
  return space_multiplier_map
172
170
  end
173
-
174
- def custom_hvac_tweaks(building_type, building_vintage, climate_zone, prototype_input)
175
-
176
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.model.Model', 'Started building type specific adjustments')
177
171
 
172
+ def custom_hvac_tweaks(building_type, template, climate_zone, prototype_input)
173
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Started building type specific adjustments')
178
174
 
179
175
  # adjust the cooling setpoint
180
- self.adjust_clg_setpoint(building_vintage,climate_zone)
176
+ adjust_clg_setpoint(template, climate_zone)
181
177
  # add elevator and lights&fans for the ground floor corridor
182
- self.add_extra_equip_corridor(building_vintage)
178
+ add_extra_equip_corridor(template)
183
179
  # add extra infiltration for ground floor corridor
184
- self.add_door_infiltration(building_vintage,climate_zone)
180
+ add_door_infiltration(template, climate_zone)
181
+
182
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Finished building type specific adjustments')
185
183
 
186
-
187
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.model.Model', 'Finished building type specific adjustments')
188
-
189
184
  return true
190
-
191
185
  end
192
186
 
193
- def adjust_clg_setpoint(building_vintage,climate_zone)
187
+ def adjust_clg_setpoint(template, climate_zone)
194
188
  space_name = 'Office'
195
- space_type_name = self.getSpaceByName(space_name).get.spaceType.get.name.get
189
+ space_type_name = getSpaceByName(space_name).get.spaceType.get.name.get
196
190
  thermostat_name = space_type_name + ' Thermostat'
197
- thermostat = self.getThermostatSetpointDualSetpointByName(thermostat_name).get
198
- case building_vintage
191
+ thermostat = getThermostatSetpointDualSetpointByName(thermostat_name).get
192
+ case template
199
193
  when '90.1-2004', '90.1-2007', '90.1-2010'
200
194
  case climate_zone
201
195
  when 'ASHRAE 169-2006-2B', 'ASHRAE 169-2006-1B', 'ASHRAE 169-2006-3B'
202
- thermostat.setCoolingSetpointTemperatureSchedule(add_schedule("ApartmentMidRise CLGSETP_OFF_SCH_NO_OPTIMUM"))
196
+ thermostat.setCoolingSetpointTemperatureSchedule(add_schedule('ApartmentMidRise CLGSETP_OFF_SCH_NO_OPTIMUM'))
203
197
  end
204
198
  end
205
199
  end
206
200
 
207
-
208
201
  # add elevator and lights&fans for the ground floor corridor
209
- def add_extra_equip_corridor(building_vintage)
210
- corridor_ground_space = self.getSpaceByName('G Corridor').get
202
+ def add_extra_equip_corridor(template)
203
+ corridor_ground_space = getSpaceByName('G Corridor').get
211
204
  elec_equip_def1 = OpenStudio::Model::ElectricEquipmentDefinition.new(self)
212
205
  elec_equip_def2 = OpenStudio::Model::ElectricEquipmentDefinition.new(self)
213
- elec_equip_def1.setName("Ground Corridor Electric Equipment Definition1")
214
- elec_equip_def2.setName("Ground Corridor Electric Equipment Definition2")
215
- case building_vintage
206
+ elec_equip_def1.setName('Ground Corridor Electric Equipment Definition1')
207
+ elec_equip_def2.setName('Ground Corridor Electric Equipment Definition2')
208
+ case template
216
209
  when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013'
217
210
  elec_equip_def1.setFractionLatent(0)
218
211
  elec_equip_def1.setFractionRadiant(0)
@@ -220,10 +213,10 @@ class OpenStudio::Model::Model
220
213
  elec_equip_def2.setFractionLatent(0)
221
214
  elec_equip_def2.setFractionRadiant(0)
222
215
  elec_equip_def2.setFractionLost(0.95)
223
- elec_equip_def1.setDesignLevel(16055)
224
- if building_vintage == '90.1-2013'
216
+ elec_equip_def1.setDesignLevel(16_055)
217
+ if template == '90.1-2013'
225
218
  elec_equip_def2.setDesignLevel(63)
226
- elsif building_vintage == '90.1-2010'
219
+ elsif template == '90.1-2010'
227
220
  elec_equip_def2.setDesignLevel(105.9)
228
221
  else
229
222
  elec_equip_def2.setDesignLevel(161.9)
@@ -231,51 +224,51 @@ class OpenStudio::Model::Model
231
224
  # Create the electric equipment instance and hook it up to the space type
232
225
  elec_equip1 = OpenStudio::Model::ElectricEquipment.new(elec_equip_def1)
233
226
  elec_equip2 = OpenStudio::Model::ElectricEquipment.new(elec_equip_def2)
234
- elec_equip1.setName("G Corridor_Elevators_Equip")
235
- elec_equip2.setName("Elevators_Lights_Fan")
227
+ elec_equip1.setName('G Corridor_Elevators_Equip')
228
+ elec_equip2.setName('Elevators_Lights_Fan')
236
229
  elec_equip1.setSpace(corridor_ground_space)
237
230
  elec_equip2.setSpace(corridor_ground_space)
238
- elec_equip1.setSchedule(add_schedule("ApartmentMidRise BLDG_ELEVATORS"))
239
- case building_vintage
231
+ elec_equip1.setSchedule(add_schedule('ApartmentMidRise BLDG_ELEVATORS'))
232
+ case template
240
233
  when '90.1-2004', '90.1-2007'
241
- elec_equip2.setSchedule(add_schedule("ApartmentMidRise ELEV_LIGHT_FAN_SCH_24_7"))
234
+ elec_equip2.setSchedule(add_schedule('ApartmentMidRise ELEV_LIGHT_FAN_SCH_24_7'))
242
235
  when '90.1-2010', '90.1-2013'
243
- elec_equip2.setSchedule(add_schedule("ApartmentMidRise ELEV_LIGHT_FAN_SCH_ADD_DF"))
236
+ elec_equip2.setSchedule(add_schedule('ApartmentMidRise ELEV_LIGHT_FAN_SCH_ADD_DF'))
244
237
  end
245
238
  when 'DOE Ref Pre-1980', 'DOE Ref 1980-2004'
246
- elec_equip_def1.setDesignLevel(16055)
239
+ elec_equip_def1.setDesignLevel(16_055)
247
240
  elec_equip_def1.setFractionLatent(0)
248
241
  elec_equip_def1.setFractionRadiant(0)
249
242
  elec_equip_def1.setFractionLost(0.95)
250
243
  # Create the electric equipment instance and hook it up to the space type
251
244
  elec_equip1 = OpenStudio::Model::ElectricEquipment.new(elec_equip_def1)
252
- elec_equip1.setName("G Corridor_Elevators_Equip")
245
+ elec_equip1.setName('G Corridor_Elevators_Equip')
253
246
  elec_equip1.setSpace(corridor_ground_space)
254
- elec_equip1.setSchedule(add_schedule("ApartmentMidRise BLDG_ELEVATORS Pre2004"))
247
+ elec_equip1.setSchedule(add_schedule('ApartmentMidRise BLDG_ELEVATORS Pre2004'))
255
248
  end
256
249
  end
257
250
 
258
- def update_waterheater_loss_coefficient(building_vintage)
259
- case building_vintage
251
+ def update_waterheater_loss_coefficient(template)
252
+ case template
260
253
  when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013', 'NECB 2011'
261
- self.getWaterHeaterMixeds.sort.each do |water_heater|
254
+ getWaterHeaterMixeds.sort.each do |water_heater|
262
255
  water_heater.setOffCycleLossCoefficienttoAmbientTemperature(46.288874618)
263
256
  water_heater.setOnCycleLossCoefficienttoAmbientTemperature(46.288874618)
264
257
  end
265
- end
258
+ end
266
259
  end
267
260
 
268
261
  # add extra infiltration for ground floor corridor
269
- def add_door_infiltration(building_vintage,climate_zone)
270
- case building_vintage
262
+ def add_door_infiltration(template, climate_zone)
263
+ case template
271
264
  when 'DOE Ref 1980-2004', 'DOE Ref Pre-1980'
272
265
  # no door infiltration in these two vintages
273
266
  when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013'
274
- g_corridor = self.getSpaceByName('G Corridor').get
267
+ g_corridor = getSpaceByName('G Corridor').get
275
268
  infiltration_g_corridor_door = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(self)
276
- infiltration_g_corridor_door.setName("G Corridor door Infiltration")
269
+ infiltration_g_corridor_door.setName('G Corridor door Infiltration')
277
270
  infiltration_g_corridor_door.setSpace(g_corridor)
278
- case building_vintage
271
+ case template
279
272
  when '90.1-2004'
280
273
  infiltration_g_corridor_door.setDesignFlowRate(0.520557541)
281
274
  infiltration_g_corridor_door.setSchedule(add_schedule('ApartmentMidRise INFIL_Door_Opening_SCH_2004_2007'))
@@ -299,12 +292,9 @@ class OpenStudio::Model::Model
299
292
  end
300
293
  end
301
294
 
302
- def custom_swh_tweaks(building_type, building_vintage, climate_zone, prototype_input)
295
+ def custom_swh_tweaks(building_type, template, climate_zone, prototype_input)
296
+ update_waterheater_loss_coefficient(template)
303
297
 
304
- self.update_waterheater_loss_coefficient(building_vintage)
305
-
306
298
  return true
307
-
308
- end
309
-
299
+ end
310
300
  end