Class: OpenStudio::Model::Model

Inherits:
Object
  • Object
show all
Defined in:
lib/buildingsync/helpers/Model.hvac.rb

Overview

Model class

Instance Method Summary collapse

Instance Method Details

#add_cbecs_hvac_system(standard, system_type, zones) ⇒ Object

Adds the HVAC system as derived from the combinations of CBECS 2012 MAINHT and MAINCL fields. Mapping between combinations and HVAC systems per www.nrel.gov/docs/fy08osti/41956.pdf Table C-31

Parameters:

  • standard (Standard)
  • system_type (String)
  • zones (Array<OpenStudio::Model::ThermalZone>)


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
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
84
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
137
138
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# File 'lib/buildingsync/helpers/Model.hvac.rb', line 13

def add_cbecs_hvac_system(standard, system_type, zones)
  case system_type
  when 'PTAC with hot water heat'
    standard.model_add_hvac_system(self, 'PTAC', ht = 'NaturalGas', znht = nil, cl = 'Electricity', zones)

  when 'PTAC with gas coil heat'
    standard.model_add_hvac_system(self, 'PTAC', ht = nil, znht = 'NaturalGas', cl = 'Electricity', zones)

  when 'PTAC with electric baseboard heat'
    standard.model_add_hvac_system(self, 'PTAC', ht = nil, znht = nil, cl = 'Electricity', zones)
    standard.model_add_hvac_system(self, 'Baseboards', ht = 'Electricity', znht = nil, cl = nil, zones)

  when 'PTAC with no heat'
    standard.model_add_hvac_system(self, 'PTAC', ht = nil, znht = nil, cl = 'Electricity', zones)

  when 'PTAC with district hot water heat'
    standard.model_add_hvac_system(self, 'PTAC', ht = 'DistrictHeating', znht = nil, cl = 'Electricity', zones)

  when 'PTHP'
    standard.model_add_hvac_system(self, 'PTHP', ht = 'Electricity', znht = nil, cl = 'Electricity', zones)

  when 'PSZ-AC with gas coil heat'
    standard.model_add_hvac_system(self, 'PSZ-AC', ht = 'NaturalGas', znht = nil, cl = 'Electricity', zones)

  when 'PSZ-AC with electric baseboard heat'
    standard.model_add_hvac_system(self, 'PSZ-AC', ht = nil, znht = nil, cl = 'Electricity', zones)
    standard.model_add_hvac_system(self, 'Baseboards', ht = 'Electricity', znht = nil, cl = nil, zones)

  when 'PSZ-AC with no heat'
    standard.model_add_hvac_system(self, 'PSZ-AC', ht = nil, znht = nil, cl = 'Electricity', zones)

  when 'PSZ-AC with district hot water heat'
    standard.model_add_hvac_system(self, 'PSZ-AC', ht = 'DistrictHeating', znht = nil, cl = 'Electricity', zones)

  when 'PSZ-HP'
    standard.model_add_hvac_system(self, 'PSZ-HP', ht = 'Electricity', znht = nil, cl = 'Electricity', zones)

  when 'Fan coil district chilled water with no heat'
    standard.model_add_hvac_system(self, 'Fan Coil', ht = nil, znht = nil, cl = 'DistrictCooling', zones)

  when 'Fan coil district chilled water and boiler'
    standard.model_add_hvac_system(self, 'Fan Coil', ht = 'NaturalGas', znht = nil, cl = 'DistrictCooling', zones)

  when 'Fan coil district chilled water unit heaters'
    standard.model_add_hvac_system(self, 'Fan Coil', ht = nil, znht = nil, cl = 'DistrictCooling', zones)
    standard.model_add_hvac_system(self, 'Unit Heaters', ht = 'NaturalGas', znht = nil, cl = nil, zones)

  when 'Fan coil district chilled water electric baseboard heat'
    standard.model_add_hvac_system(self, 'Fan Coil', ht = nil, znht = nil, cl = 'DistrictCooling', zones)
    standard.model_add_hvac_system(self, 'Baseboards', ht = 'Electricity', znht = nil, cl = nil, zones)

  when 'Fan coil district hot and chilled water'
    standard.model_add_hvac_system(self, 'Fan Coil', ht = 'DistrictHeating', znht = nil, cl = 'DistrictCooling', zones)

  when 'Fan coil district hot water and chiller'
    standard.model_add_hvac_system(self, 'Fan Coil', ht = 'DistrictHeating', znht = nil, cl = 'Electricity', zones)

  when 'Fan coil chiller with no heat'
    standard.model_add_hvac_system(self, 'Fan Coil', ht = nil, znht = nil, cl = 'Electricity', zones)

  when 'Baseboard district hot water heat'
    standard.model_add_hvac_system(self, 'Baseboards', ht = 'DistrictHeating', znht = nil, cl = nil, zones)

  when 'Baseboard district hot water heat with direct evap coolers'
    standard.model_add_hvac_system(self, 'Baseboards', ht = 'DistrictHeating', znht = nil, cl = nil, zones)
    standard.model_add_hvac_system(self, 'Evaporative Cooler', ht = nil, znht = nil, cl = 'Electricity', zones)

  when 'Baseboard electric heat'
    standard.model_add_hvac_system(self, 'Baseboards', ht = 'Electricity', znht = nil, cl = nil, zones)

  when 'Baseboard electric heat with direct evap coolers'
    standard.model_add_hvac_system(self, 'Baseboards', ht = 'Electricity', znht = nil, cl = nil, zones)
    standard.model_add_hvac_system(self, 'Evaporative Cooler', ht = nil, znht = nil, cl = 'Electricity', zones)

  when 'Baseboard hot water heat'
    standard.model_add_hvac_system(self, 'Baseboards', ht = 'NaturalGas', znht = nil, cl = nil, zones)

  when 'Baseboard hot water heat with direct evap coolers'
    standard.model_add_hvac_system(self, 'Baseboards', ht = 'NaturalGas', znht = nil, cl = nil, zones)
    standard.model_add_hvac_system(self, 'Evaporative Cooler', ht = nil, znht = nil, cl = 'Electricity', zones)

  when 'Window AC with no heat'
    standard.model_add_hvac_system(self, 'Window AC', ht = nil, znht = nil, cl = 'Electricity', zones)

  when 'Window AC with forced air furnace'
    standard.model_add_hvac_system(self, 'Window AC', ht = nil, znht = nil, cl = 'Electricity', zones)
    standard.model_add_hvac_system(self, 'Forced Air Furnace', ht = 'NaturalGas', znht = nil, cl = nil, zones)

  when 'Window AC with district hot water baseboard heat'
    standard.model_add_hvac_system(self, 'Window AC', ht = nil, znht = nil, cl = 'Electricity', zones)
    standard.model_add_hvac_system(self, 'Baseboards', ht = 'DistrictHeating', znht = nil, cl = nil, zones)

  when 'Window AC with hot water baseboard heat'
    standard.model_add_hvac_system(self, 'Window AC', ht = nil, znht = nil, cl = 'Electricity', zones)
    standard.model_add_hvac_system(self, 'Baseboards', ht = 'NaturalGas', znht = nil, cl = nil, zones)

  when 'Window AC with electric baseboard heat'
    standard.model_add_hvac_system(self, 'Window AC', ht = nil, znht = nil, cl = 'Electricity', zones)
    standard.model_add_hvac_system(self, 'Baseboards', ht = 'Electricity', znht = nil, cl = nil, zones)

  when 'Window AC with unit heaters'
    standard.model_add_hvac_system(self, 'Window AC', ht = nil, znht = nil, cl = 'Electricity', zones)
    standard.model_add_hvac_system(self, 'Unit Heaters', ht = 'NaturalGas', znht = nil, cl = nil, zones)

  when 'Direct evap coolers'
    standard.model_add_hvac_system(self, 'Evaporative Cooler', ht = nil, znht = nil, cl = 'Electricity', zones)

  when 'Direct evap coolers with unit heaters'
    standard.model_add_hvac_system(self, 'Evaporative Cooler', ht = nil, znht = nil, cl = 'Electricity', zones)
    standard.model_add_hvac_system(self, 'Unit Heaters', ht = 'NaturalGas', znht = nil, cl = nil, zones)

  when 'Unit heaters'
    standard.model_add_hvac_system(self, 'Unit Heaters', ht = 'NaturalGas', znht = nil, cl = nil, zones)

  when 'Heat pump heat with no cooling'
    standard.model_add_hvac_system(self, 'Residential Air Source Heat Pump', ht = nil, znht = nil, cl = 'Electricity', zones)

  when 'Heat pump heat with direct evap cooler'
    # standard.model_add_hvac_system(self, 'Residential Air Source Heat Pump', ht=nil, znht=nil, cl='Electricity', zones)
    # Using PTHP to represent zone heat pump for this configuration
    # because only one airloop may be connected to each thermal zone.
    standard.model_add_hvac_system(self, 'PTHP', ht = 'Electricity', znht = nil, cl = 'Electricity', zones)
    # disable the cooling coils in all the PTHPs
    getZoneHVACPackagedTerminalHeatPumps.each do |pthp|
      clg_coil = pthp.heatingCoil.to_CoilHeatingDXSingleSpeed.get
      clg_coil.setAvailabilitySchedule(alwaysOffDiscreteSchedule)
    end
    standard.model_add_hvac_system(self, 'Evaporative Cooler', ht = nil, znht = nil, cl = 'Electricity', zones)

  when 'VAV with reheat'
    standard.model_add_hvac_system(self, 'VAV Reheat', ht = 'NaturalGas', znht = 'NaturalGas', cl = 'Electricity', zones)

  when 'VAV with PFP boxes'
    standard.model_add_hvac_system(self, 'VAV PFP Boxes', ht = 'NaturalGas', znht = 'NaturalGas', cl = 'Electricity', zones)

  when 'VAV with gas reheat'
    standard.model_add_hvac_system(self, 'VAV Gas Reheat', ht = 'NaturalGas', ht = 'NaturalGas', cl = 'Electricity', zones)

  when 'VAV with zone unit heaters'
    standard.model_add_hvac_system(self, 'VAV No Reheat', ht = 'NaturalGas', znht = nil, cl = 'Electricity', zones)
    standard.model_add_hvac_system(self, 'Unit Heaters', ht = 'NaturalGas', znht = nil, cl = nil, zones)

  when 'VAV with electric baseboard heat'
    standard.model_add_hvac_system(self, 'VAV No Reheat', ht = 'NaturalGas', znht = nil, cl = 'Electricity', zones)
    standard.model_add_hvac_system(self, 'Baseboards', ht = 'Electricity', znht = nil, cl = nil, zones)

  when 'VAV cool with zone heat pump heat'
    standard.model_add_hvac_system(self, 'VAV No Reheat', ht = 'NaturalGas', znht = nil, cl = 'Electricity', zones)
    # standard.model_add_hvac_system(self, 'Residential Air Source Heat Pump', ht=nil, znht=nil, cl='Electricity', zones)
    # Using PTHP to represent zone heat pump for this configuration
    # because only one airloop may be connected to each thermal zone.
    standard.model_add_hvac_system(self, 'PTHP', ht = 'Electricity', znht = nil, cl = 'Electricity', zones)
    # disable the cooling coils in all the PTHPs
    getZoneHVACPackagedTerminalHeatPumps.each do |pthp|
      clg_coil = pthp.heatingCoil.to_CoilHeatingDXSingleSpeed.get
      clg_coil.setAvailabilitySchedule(alwaysOffDiscreteSchedule)
    end

  when 'PVAV with reheat', 'Packaged VAV Air Loop with Boiler' # second enumeration for backwards compatibility with Tenant Star project
    standard.model_add_hvac_system(self, 'PVAV Reheat', ht = 'NaturalGas', znht = 'NaturalGas', cl = 'Electricity', zones)

  when 'PVAV with PFP boxes'
    standard.model_add_hvac_system(self, 'PVAV PFP Boxes', ht = 'Electricity', znht = 'Electricity', cl = 'Electricity', zones)

  when 'Residential forced air'
    standard.model_add_hvac_system(self, 'Unit Heaters', ht = 'NaturalGas', znht = nil, cl = nil, zones)

  when 'Residential forced air cooling hot water baseboard heat'
    standard.model_add_hvac_system(self, 'Residential AC', ht = nil, znht = nil, cl = 'Electricity', zones)
    standard.model_add_hvac_system(self, 'Baseboards', ht = 'NaturalGas', znht = nil, cl = nil, zones)

  when 'Residential forced air with district hot water'
    standard.model_add_hvac_system(self, 'Residential AC', ht = nil, znht = nil, cl = 'Electricity', zones)

  when 'Residential heat pump'
    standard.model_add_hvac_system(self, 'Residential Air Source Heat Pump', ht = 'Electricity', znht = nil, cl = 'Electricity', zones)

  when 'Forced air furnace'
    standard.model_add_hvac_system(self, 'Forced Air Furnace', ht = 'NaturalGas', znht = nil, cl = nil, zones)

  when 'Forced air furnace district chilled water fan coil'
    standard.model_add_hvac_system(self, 'Forced Air Furnace', ht = 'NaturalGas', znht = nil, cl = nil, zones)
    standard.model_add_hvac_system(self, 'Fan Coil', ht = nil, znht = nil, cl = 'DistrictCooling', zones)

  when 'Forced air furnace direct evap cooler'
    # standard.model_add_hvac_system(self, 'Forced Air Furnace', ht='NaturalGas', znht=nil, cl=nil, zones)
    # Using unit heater to represent forced air furnace for this configuration
    # because only one airloop may be connected to each thermal zone.
    standard.model_add_hvac_system(self, 'Unit Heaters', ht = 'NaturalGas', znht = nil, cl = nil, zones)
    standard.model_add_hvac_system(self, 'Evaporative Cooler', ht = nil, znht = nil, cl = 'Electricity', zones)

  when 'Residential AC with no heat'
    standard.model_add_hvac_system(self, 'Residential AC', ht = nil, znht = nil, cl = 'Electricity', zones)

  when 'Residential AC with electric baseboard heat'
    standard.model_add_hvac_system(self, 'Residential AC', ht = nil, znht = nil, cl = 'Electricity', zones)
    standard.model_add_hvac_system(self, 'Baseboards', ht = 'Electricity', znht = nil, cl = nil, zones)

  else
    puts "HVAC system type '#{system_type}' not recognized"

  end
end