-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathconstants.rb
More file actions
305 lines (290 loc) · 11.1 KB
/
constants.rb
File metadata and controls
305 lines (290 loc) · 11.1 KB
1
2
3
4
5
6
7
8
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
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
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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# frozen_string_literal: true
# Collection of constants used across the code.
module Constants
# Strings/Numbers
AirFilm = 'AirFilm'
AutomaticallyAdded = 'AutomaticallyAdded'
Small = 1e-9
# Object types
ObjectTypeAirSourceHeatPump = 'air source heat pump'
ObjectTypeBattery = 'battery'
ObjectTypeBatteryLossesAdjustment = 'battery losses adjustment'
ObjectTypeBoiler = 'boiler'
ObjectTypeCeilingFan = 'ceiling fan'
ObjectTypeCentralAirConditioner = 'central ac'
ObjectTypeCentralAirConditionerAndFurnace = 'central ac and furnace'
ObjectTypeClothesWasher = 'clothes washer'
ObjectTypeClothesDryer = 'clothes dryer'
ObjectTypeComponentLoadsProgram = 'component loads program'
ObjectTypeCookingRange = 'cooking range'
ObjectTypeCoolingAvailabilitySensor = 'cooling availability sensor'
ObjectTypeDehumidifier = 'dehumidifier'
ObjectTypeDishwasher = 'dishwasher'
ObjectTypeDistributionWaste = 'dhw distribution waste'
ObjectTypeDSECooling = 'dse cooling'
ObjectTypeDSECoolingFanPump = 'dse fan pump cooling'
ObjectTypeDSEHeating = 'dse heating'
ObjectTypeDSEHeatingHeatPumpBackup = 'dse hp backup heating'
ObjectTypeDSEHeatingFanPump = 'dse fan pump heating'
ObjectTypeDSEHeatingHeatPumpBackupFanPump = 'dse hp backup fan pump heating'
ObjectTypeDuctLoad = 'duct load'
ObjectTypeElectricBaseboard = 'electric baseboard'
ObjectTypeEvaporativeCooler = 'evap cooler'
ObjectTypeFanPumpDisaggregateCool = 'disaggregate clg'
ObjectTypeFanPumpDisaggregatePrimaryHeat = 'disaggregate htg primary'
ObjectTypeFanPumpDisaggregateBackupHeat = 'disaggregate htg backup'
ObjectTypeFixtures = 'dhw fixtures'
ObjectTypeFreezer = 'freezer'
ObjectTypeFurnace = 'furnace'
ObjectTypeGeneralWaterUse = 'general water use'
ObjectTypeGeneralWaterUseLatent = 'general water use latent'
ObjectTypeGeneralWaterUseSensible = 'general water use sensible'
ObjectTypeGenerator = 'generator'
ObjectTypeGroundSourceHeatPump = 'ground source heat pump'
ObjectTypeHeatingAvailabilitySensor = 'heating availability sensor'
ObjectTypeHotWaterRecircPump = 'dhw recirc pump'
ObjectTypeHPDefrostSupplHeat = 'heat pump defrost suppl heat'
ObjectTypeHPDefrostHeatLoad = 'heat pump defrost heat load'
ObjectTypeIdealAirSystem = 'ideal air system'
ObjectTypeInfiltration = 'infil'
ObjectTypeLightingExterior = 'exterior lighting'
ObjectTypeLightingExteriorHoliday = 'exterior holiday lighting'
ObjectTypeLightingGarage = 'garage lighting'
ObjectTypeLightingInterior = 'interior lighting'
ObjectTypeMechanicalVentilation = 'mech vent'
ObjectTypeMechanicalVentilationPrecooling = 'mech vent precooling'
ObjectTypeMechanicalVentilationPreheating = 'mech vent preheating'
ObjectTypeMechanicalVentilationHouseFan = 'mech vent house fan'
ObjectTypeMechanicalVentilationHouseFanCFIS = 'mech vent house fan cfis'
ObjectTypeMechanicalVentilationHouseFanCFISSupplFan = 'mech vent house fan cfis suppl'
ObjectTypeMechanicalVentilationBathFan = 'mech vent bath fan'
ObjectTypeMechanicalVentilationRangeFan = 'mech vent range fan'
ObjectTypeMiniSplitAirConditioner = 'mini split air conditioner'
ObjectTypeMiniSplitHeatPump = 'mini split heat pump'
ObjectTypeMiscGrill = 'misc grill'
ObjectTypeMiscLighting = 'misc lighting'
ObjectTypeMiscFireplace = 'misc fireplace'
ObjectTypeMiscPoolHeater = 'misc pool heater'
ObjectTypeMiscPoolPump = 'misc pool pump'
ObjectTypeMiscPermanentSpaHeater = 'misc permanent spa heater'
ObjectTypeMiscPermanentSpaPump = 'misc permanent spa pump'
ObjectTypeMiscPlugLoads = 'misc plug loads'
ObjectTypeMiscTelevision = 'misc tv'
ObjectTypeMiscElectricVehicleCharging = 'misc electric vehicle charging'
ObjectTypeMiscWellPump = 'misc well pump'
ObjectTypeNaturalVentilation = 'natural vent'
ObjectTypeNeighbors = 'neighbors'
ObjectTypeOATDrybulbSensor = 'outdoor air drybulb temperature sensor'
ObjectTypeOccupants = 'occupants'
ObjectTypeCrankcaseHeater = 'crankcase heater'
ObjectTypePanHeater = 'pan heater'
ObjectTypePhotovoltaics = 'photovoltaics'
ObjectTypePTAC = 'packaged terminal air conditioner'
ObjectTypePTHP = 'packaged terminal heat pump'
ObjectTypeRefrigerator = 'fridge'
ObjectTypeRoomAC = 'room ac'
ObjectTypeRoomHP = 'room ac with reverse cycle'
ObjectTypeSolarHotWater = 'solar hot water'
ObjectTypeTotalAirflowsProgram = 'total airflows program'
ObjectTypeTotalLoadsProgram = 'total loads program'
ObjectTypeUnitHeater = 'unit heater'
ObjectTypeUnmetHoursProgram = 'unmet hours program'
ObjectTypeVehicle = 'vehicle'
ObjectTypeVehicleDischargeScheduleSensor = 'vehicle discharge schedule sensor'
ObjectTypeVehicleUnmetHoursProgram = 'vehicle unmet hours program'
ObjectTypeWaterHeater = 'water heater'
ObjectTypeWaterHeaterSetpoint = 'water heater setpoint'
ObjectTypeWaterHeaterAdjustment = 'water heater energy adjustment'
ObjectTypeWaterLoopHeatPump = 'water loop heat pump'
ObjectTypeWholeHouseFan = 'whole house fan'
# Arrays/Maps
ERIVersions = ['2014', '2014A', '2014AE', '2014AEG', '2019', '2019A',
'2019AB', '2019ABC', '2019ABCD', '2022', '2022C', '2022CE',
'latest']
IECCZones = ['1A', '1B', '1C', '2A', '2B', '2C', '3A', '3B', '3C',
'4A', '4B', '4C', '5A', '5B', '5C', '6A', '6B', '6C', '7', '8']
StateCodesMap = { 'AK' => 'Alaska',
'AL' => 'Alabama',
'AR' => 'Arkansas',
'AZ' => 'Arizona',
'CA' => 'California',
'CO' => 'Colorado',
'CT' => 'Connecticut',
'DC' => 'District of Columbia',
'DE' => 'Delaware',
'FL' => 'Florida',
'GA' => 'Georgia',
'HI' => 'Hawaii',
'IA' => 'Iowa',
'ID' => 'Idaho',
'IL' => 'Illinois',
'IN' => 'Indiana',
'KS' => 'Kansas',
'KY' => 'Kentucky',
'LA' => 'Louisiana',
'MA' => 'Massachusetts',
'MD' => 'Maryland',
'ME' => 'Maine',
'MI' => 'Michigan',
'MN' => 'Minnesota',
'MO' => 'Missouri',
'MS' => 'Mississippi',
'MT' => 'Montana',
'NC' => 'North Carolina',
'ND' => 'North Dakota',
'NE' => 'Nebraska',
'NH' => 'New Hampshire',
'NJ' => 'New Jersey',
'NM' => 'New Mexico',
'NV' => 'Nevada',
'NY' => 'New York',
'OH' => 'Ohio',
'OK' => 'Oklahoma',
'OR' => 'Oregon',
'PA' => 'Pennsylvania',
'RI' => 'Rhode Island',
'SC' => 'South Carolina',
'SD' => 'South Dakota',
'TN' => 'Tennessee',
'TX' => 'Texas',
'UT' => 'Utah',
'VA' => 'Virginia',
'VT' => 'Vermont',
'WA' => 'Washington',
'WI' => 'Wisconsin',
'WV' => 'West Virginia',
'WY' => 'Wyoming' }
end
# Total Energy (Constants for output reporting)
module TE
Total = 'Total'
Net = 'Net'
end
# Fuel Types (Constants for output reporting)
module FT
Elec = 'Electricity'
Gas = 'Natural Gas'
Oil = 'Fuel Oil'
Propane = 'Propane'
WoodCord = 'Wood Cord'
WoodPellets = 'Wood Pellets'
Coal = 'Coal'
end
# End Use Types (Constants for output reporting)
module EUT
Heating = 'Heating'
HeatingFanPump = 'Heating Fans/Pumps'
HeatingHeatPumpBackup = 'Heating Heat Pump Backup'
HeatingHeatPumpBackupFanPump = 'Heating Heat Pump Backup Fans/Pumps'
Cooling = 'Cooling'
CoolingFanPump = 'Cooling Fans/Pumps'
HotWater = 'Hot Water'
HotWaterRecircPump = 'Hot Water Recirc Pump'
HotWaterSolarThermalPump = 'Hot Water Solar Thermal Pump'
LightsInterior = 'Lighting Interior'
LightsGarage = 'Lighting Garage'
LightsExterior = 'Lighting Exterior'
MechVent = 'Mech Vent'
MechVentPreheat = 'Mech Vent Preheating'
MechVentPrecool = 'Mech Vent Precooling'
WholeHouseFan = 'Whole House Fan'
Refrigerator = 'Refrigerator'
Freezer = 'Freezer'
Dehumidifier = 'Dehumidifier'
Dishwasher = 'Dishwasher'
ClothesWasher = 'Clothes Washer'
ClothesDryer = 'Clothes Dryer'
RangeOven = 'Range/Oven'
CeilingFan = 'Ceiling Fan'
Television = 'Television'
PlugLoads = 'Plug Loads'
Vehicle = 'Electric Vehicle Charging'
WellPump = 'Well Pump'
PoolHeater = 'Pool Heater'
PoolPump = 'Pool Pump'
PermanentSpaHeater = 'Permanent Spa Heater'
PermanentSpaPump = 'Permanent Spa Pump'
Grill = 'Grill'
Lighting = 'Lighting'
Fireplace = 'Fireplace'
PV = 'PV'
Generator = 'Generator'
Battery = 'Battery'
end
# Hot Water Types (Constants for output reporting)
module HWT
ClothesWasher = 'Clothes Washer'
Dishwasher = 'Dishwasher'
Fixtures = 'Fixtures'
DistributionWaste = 'Distribution Waste'
end
# Load Types (Constants for output reporting)
module LT
Heating = 'Heating: Delivered'
HeatingHeatPumpBackup = 'Heating: Heat Pump Backup' # Needed for ERI calculation for dual-fuel heat pumps
Cooling = 'Cooling: Delivered'
HotWaterDelivered = 'Hot Water: Delivered'
HotWaterTankLosses = 'Hot Water: Tank Losses'
HotWaterDesuperheater = 'Hot Water: Desuperheater'
HotWaterSolarThermal = 'Hot Water: Solar Thermal'
end
# Component Load Types (Constants for output reporting)
module CLT
Roofs = 'Roofs'
Ceilings = 'Ceilings'
Walls = 'Walls'
RimJoists = 'Rim Joists'
FoundationWalls = 'Foundation Walls'
Doors = 'Doors'
WindowsConduction = 'Windows Conduction'
WindowsSolar = 'Windows Solar'
SkylightsConduction = 'Skylights Conduction'
SkylightsSolar = 'Skylights Solar'
Floors = 'Floors'
Slabs = 'Slabs'
InternalMass = 'Internal Mass'
Infiltration = 'Infiltration'
NaturalVentilation = 'Natural Ventilation'
MechanicalVentilation = 'Mechanical Ventilation'
WholeHouseFan = 'Whole House Fan'
Ducts = 'Ducts'
InternalGains = 'Internal Gains'
Lighting = 'Lighting'
end
# Unmet Hours Types (Constants for output reporting)
module UHT
Heating = 'Heating'
Cooling = 'Cooling'
Driving = 'EV Driving'
end
# Resilience Types (Constants for output reporting)
module RT
Battery = 'Battery'
end
# Peak Load Types (Constants for output reporting)
module PLT
Heating = 'Heating: Delivered'
Cooling = 'Cooling: Delivered'
end
# Peak Fuel Types (Constants for output reporting)
module PFT
Summer = 'Summer'
Winter = 'Winter'
Annual = 'Annual'
end
# Airflow Types (Constants for output reporting)
module AFT
Infiltration = 'Infiltration'
MechanicalVentilation = 'Mechanical Ventilation'
NaturalVentilation = 'Natural Ventilation'
WholeHouseFan = 'Whole House Fan'
end
# Weather Types (Constants for output reporting)
module WT
DrybulbTemp = 'Drybulb Temperature'
WetbulbTemp = 'Wetbulb Temperature'
RelativeHumidity = 'Relative Humidity'
WindSpeed = 'Wind Speed'
DiffuseSolar = 'Diffuse Solar Radiation'
DirectSolar = 'Direct Solar Radiation'
end