openstudio-standards 0.2.12.rc4 → 0.2.12.rc5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/data/standards/OpenStudio_Standards-ashrae_90_1(space_types).xlsx +0 -0
  3. data/data/standards/OpenStudio_Standards-ashrae_90_1.xlsx +0 -0
  4. data/data/standards/test_performance_expected_dd_results.csv +950 -950
  5. data/lib/openstudio-standards.rb +8 -1
  6. data/lib/openstudio-standards/btap/btap.model.rb +1 -1
  7. data/lib/openstudio-standards/btap/economics.rb +14 -11
  8. data/lib/openstudio-standards/btap/envelope.rb +185 -257
  9. data/lib/openstudio-standards/btap/fileio.rb +1 -0
  10. data/lib/openstudio-standards/btap/geometry.rb +21 -1
  11. data/lib/openstudio-standards/btap/measures.rb +12 -11
  12. data/lib/openstudio-standards/btap/schedules.rb +3 -12
  13. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.rb +178 -0
  14. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXMultiSpeed.rb +8 -8
  15. data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +3 -0
  16. data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +3 -3
  17. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +25 -23
  18. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +91 -0
  19. data/lib/openstudio-standards/standards/Standards.CoilDX.rb +20 -2
  20. data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +39 -0
  21. data/lib/openstudio-standards/standards/Standards.Model.rb +29 -0
  22. data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +37 -4
  23. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.unitary_acs.json +15 -15
  24. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.unitary_acs.json +15 -15
  25. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.unitary_acs.json +5 -5
  26. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.unitary_acs.json +15 -15
  27. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/data/doe_ref_1980_2004.spc_typ.json +5963 -2723
  28. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/data/doe_ref_pre_1980.spc_typ.json +5917 -2697
  29. data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/data/nrel_zne_ready_2017.spc_typ.json +2011 -1112
  30. data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/data/ze_aedg_multifamily.spc_typ.json +1946 -1106
  31. data/lib/openstudio-standards/standards/necb/BTAP1980TO2010/btap_1980to2010.rb +2 -18
  32. data/lib/openstudio-standards/standards/necb/BTAP1980TO2010/data/space_types.json +1677 -1005
  33. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb +64 -13
  34. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/building_envelope.rb +31 -19
  35. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/data/curves.json +75 -0
  36. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/data/heat_pumps.json +16 -16
  37. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/data/space_types.json +1677 -1005
  38. data/lib/openstudio-standards/standards/necb/ECMS/data/boiler_set.json +29 -0
  39. data/lib/openstudio-standards/standards/necb/ECMS/data/curves.json +913 -0
  40. data/lib/openstudio-standards/standards/necb/ECMS/data/equip_eff_lim.json +52 -0
  41. data/lib/openstudio-standards/standards/necb/ECMS/data/erv.json +105 -0
  42. data/lib/openstudio-standards/standards/necb/ECMS/data/furnace_set.json +23 -0
  43. data/lib/openstudio-standards/standards/necb/ECMS/data/heat_pumps.json +803 -0
  44. data/lib/openstudio-standards/standards/necb/ECMS/data/heat_pumps_heating.json +787 -0
  45. data/lib/openstudio-standards/standards/necb/ECMS/data/shw_set.json +29 -0
  46. data/lib/openstudio-standards/standards/necb/ECMS/ecms.rb +87 -0
  47. data/lib/openstudio-standards/standards/necb/ECMS/erv.rb +22 -0
  48. data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +1593 -0
  49. data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +68 -33
  50. data/lib/openstudio-standards/standards/necb/NECB2011/beps_compliance_path.rb +24 -13
  51. data/lib/openstudio-standards/standards/necb/NECB2011/building_envelope.rb +104 -99
  52. data/lib/openstudio-standards/standards/necb/NECB2011/data/constants.json +24 -24
  53. data/lib/openstudio-standards/standards/necb/NECB2011/data/curves.json +50 -0
  54. data/lib/openstudio-standards/standards/necb/NECB2011/data/erv.json +31 -0
  55. data/lib/openstudio-standards/standards/necb/NECB2011/data/led_lighting_data.json +2028 -0
  56. data/lib/openstudio-standards/standards/necb/NECB2011/data/space_types.json +1745 -1297
  57. data/lib/openstudio-standards/standards/necb/NECB2011/daylighting_control.md +70 -0
  58. data/lib/openstudio-standards/standards/necb/NECB2011/demand_controlled_ventilation.md +46 -0
  59. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_multi_speed.rb +69 -107
  60. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_single_speed.rb +24 -1
  61. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_multi_speed.rb +139 -141
  62. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_single_speed.rb +24 -0
  63. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +344 -234
  64. data/lib/openstudio-standards/standards/necb/NECB2011/led_lighting.md +51 -0
  65. data/lib/openstudio-standards/standards/necb/NECB2011/lighting.rb +57 -9
  66. data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +1060 -34
  67. data/lib/openstudio-standards/standards/necb/NECB2011/qaqc/necb_qaqc.rb +9 -1
  68. data/lib/openstudio-standards/standards/necb/NECB2011/service_water_heating.rb +1 -1
  69. data/lib/openstudio-standards/standards/necb/NECB2015/data/led_lighting_data.json +2883 -0
  70. data/lib/openstudio-standards/standards/necb/NECB2015/data/space_types.json +2554 -1916
  71. data/lib/openstudio-standards/standards/necb/NECB2015/necb_2015.rb +32 -1
  72. data/lib/openstudio-standards/standards/necb/NECB2017/data/led_lighting_data.json +2883 -0
  73. data/lib/openstudio-standards/standards/necb/NECB2017/data/space_types.json +2554 -1916
  74. data/lib/openstudio-standards/standards/necb/NECB2017/necb_2017.rb +29 -0
  75. data/lib/openstudio-standards/version.rb +1 -1
  76. metadata +21 -2
@@ -212,4 +212,95 @@ class Standard
212
212
 
213
213
  return sql_db_vars_map
214
214
  end
215
+
216
+ # Finds capacity in W
217
+ #
218
+ # @return [Double] capacity in W to be used for find object
219
+ def coil_cooling_dx_multi_speed_find_capacity(coil_cooling_dx_multi_speed)
220
+
221
+ capacity_w = nil
222
+ clg_stages = coil_cooling_dx_multi_speed.stages
223
+ if clg_stages.last.grossRatedTotalCoolingCapacity.is_initialized
224
+ capacity_w = clg_stages.last.grossRatedTotalCoolingCapacity.get
225
+ elsif (clg_stages.size == 1) && (coil_cooling_dx_multi_speed.autosizedSpeed1GrossRatedTotalCoolingCapacity.is_initialized)
226
+ capacity_w = coil_cooling_dx_multi_speed.autosizedSpeed1GrossRatedTotalCoolingCapacity.get
227
+ elsif (clg_stages.size == 2) && (coil_cooling_dx_multi_speed.autosizedSpeed2GrossRatedTotalCoolingCapacity.is_initialized)
228
+ capacity_w = coil_cooling_dx_multi_speed.autosizedSpeed2GrossRatedTotalCoolingCapacity.get
229
+ elsif (clg_stages.size == 3) && (coil_cooling_dx_multi_speed.autosizedSpeed3GrossRatedTotalCoolingCapacity.is_initialized)
230
+ capacity_w = coil_cooling_dx_multi_speed.autosizedSpeed3GrossRatedTotalCoolingCapacity.get
231
+ elsif (clg_stages.size == 4) && (coil_cooling_dx_multi_speed.autosizedSpeed4GrossRatedTotalCoolingCapacity.is_initialized)
232
+ capacity_w = coil_cooling_dx_multi_speed.autosizedSpeed4GrossRatedTotalCoolingCapacity.get
233
+ else
234
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{coil_cooling_dx_multi_speed.name} capacity is not available, cannot apply efficiency standard.")
235
+ successfully_set_all_properties = false
236
+ return successfully_set_all_properties
237
+ end
238
+
239
+ return capacity_w
240
+ end
241
+
242
+ # Finds lookup object in standards and return efficiency
243
+ #
244
+ # @param rename [Bool] if true, object will be renamed to include capacity and efficiency level
245
+ # @return [Double] full load efficiency (COP)
246
+ def coil_cooling_dx_multi_speed_standard_minimum_cop(coil_cooling_dx_multi_speed)
247
+
248
+ search_criteria = coil_dx_find_search_criteria(coil_cooling_dx_multi_speed)
249
+ cooling_type = search_criteria['cooling_type']
250
+ heating_type = search_criteria['heating_type']
251
+ capacity_w = coil_cooling_dx_multi_speed_find_capacity(coil_cooling_dx_multi_speed)
252
+
253
+ # Convert capacity to Btu/hr
254
+ capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
255
+ capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get
256
+
257
+ # Lookup efficiencies depending on whether it is a unitary AC or a heat pump
258
+ ac_props = nil
259
+ ac_props = if coil_dx_heat_pump?(coil_cooling_dx_multi_speed)
260
+ model_find_object(standards_data['heat_pumps'], search_criteria, capacity_btu_per_hr, Date.today)
261
+ else
262
+ model_find_object(standards_data['unitary_acs'], search_criteria, capacity_btu_per_hr, Date.today)
263
+ end
264
+
265
+ # Get the minimum efficiency standards
266
+ cop = nil
267
+
268
+ # If specified as SEER
269
+ unless ac_props['minimum_seasonal_energy_efficiency_ratio'].nil?
270
+ min_seer = ac_props['minimum_seasonal_energy_efficiency_ratio']
271
+ cop = seer_to_cop_cooling_with_fan(min_seer)
272
+ new_comp_name = "#{coil_cooling_dx_multi_speed.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
273
+ # self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
274
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{template}: #{coil_cooling_dx_multi_speed.name}: #{cooling_type} #{heating_type} #{coil_dx_subcategory(coil_cooling_dx_multi_speed)} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
275
+ end
276
+
277
+ # If specified as EER
278
+ unless ac_props['minimum_energy_efficiency_ratio'].nil?
279
+ min_eer = ac_props['minimum_energy_efficiency_ratio']
280
+ cop = eer_to_cop(min_eer)
281
+ new_comp_name = "#{coil_cooling_dx_multi_speed.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_eer}EER"
282
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{template}: #{coil_cooling_dx_multi_speed.name}: #{cooling_type} #{heating_type} #{coil_dx_subcategory(coil_cooling_dx_multi_speed)} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
283
+ end
284
+
285
+ # if specified as SEER (heat pump)
286
+ unless ac_props['minimum_seasonal_efficiency'].nil?
287
+ min_seer = ac_props['minimum_seasonal_efficiency']
288
+ cop = seer_to_cop_cooling_with_fan(min_seer)
289
+ new_comp_name = "#{coil_cooling_dx_multi_speed.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
290
+ # self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
291
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{template}: #{coil_cooling_dx_multi_speed.name}: #{cooling_type} #{heating_type} #{coil_dx_subcategory(coil_cooling_dx_multi_speed)} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
292
+ end
293
+
294
+ # If specified as EER (heat pump)
295
+ unless ac_props['minimum_full_load_efficiency'].nil?
296
+ min_eer = ac_props['minimum_full_load_efficiency']
297
+ cop = eer_to_cop(min_eer)
298
+ new_comp_name = "#{coil_cooling_dx_multi_speed.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_eer}EER"
299
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{template}: #{coil_cooling_dx_multi_speed.name}: #{cooling_type} #{heating_type} #{coil_dx_subcategory(coil_cooling_dx_multi_speed)} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
300
+ end
301
+
302
+ return cop, new_comp_name
303
+
304
+ end
305
+
215
306
  end
@@ -52,7 +52,10 @@ module CoilDX
52
52
  containing_comp = coil_dx.containingHVACComponent.get
53
53
  if containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.is_initialized
54
54
  heat_pump = true
55
- end # TODO: Add other unitary systems
55
+ elsif containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.is_initialized
56
+ htg_coil = containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.get.heatingCoil
57
+ if htg_coil.to_CoilHeatingDXMultiSpeed.is_initialized then heat_pump = true end
58
+ end
56
59
  elsif coil_dx.containingZoneHVACComponent.is_initialized
57
60
  containing_comp = coil_dx.containingZoneHVACComponent.get
58
61
  # PTHP
@@ -60,6 +63,11 @@ module CoilDX
60
63
  heat_pump = true
61
64
  end # TODO: Add other zone hvac systems
62
65
  end
66
+ else
67
+ if (!coil_dx.airLoopHVAC.get.supplyComponents('OS:Coil:Heating:DX:SingleSpeed'.to_IddObjectType).empty?) ||
68
+ (!coil_dx.airLoopHVAC.get.supplyComponents('OS:Coil:Heating:DX:VariableSpeed'.to_IddObjectType).empty?)
69
+ heat_pump = true
70
+ end
63
71
  end
64
72
 
65
73
  return heat_pump
@@ -81,6 +89,14 @@ module CoilDX
81
89
  if containing_comp.name.to_s.include? 'Minisplit'
82
90
  htg_type = 'All Other'
83
91
  end
92
+ elsif containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.is_initialized
93
+ htg_coil = containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.get.heatingCoil
94
+ supp_htg_coil = containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.get.supplementalHeatingCoil
95
+ if htg_coil.to_CoilHeatingDXMultiSpeed.is_initialized || supp_htg_coil.to_CoilHeatingElectric.is_initialized
96
+ htg_type = 'Electric Resistance or None'
97
+ elsif htg_coil.to_CoilHeatingGasMultiStage.is_initialized
98
+ htg_type = 'All Other'
99
+ end
84
100
  end # TODO: Add other unitary systems
85
101
  elsif coil_dx.containingZoneHVACComponent.is_initialized
86
102
  containing_comp = coil_dx.containingZoneHVACComponent.get
@@ -139,7 +155,9 @@ module CoilDX
139
155
  search_criteria['cooling_type'] = case coil_dx.iddObjectType.valueName.to_s
140
156
  when 'OS_Coil_Cooling_DX_SingleSpeed',
141
157
  'OS_Coil_Cooling_DX_TwoSpeed',
142
- 'OS_Coil_Cooling_DX_MultiSpeed'
158
+ 'OS_Coil_Cooling_DX_VariableSpeed',
159
+ 'OS_Coil_Cooling_DX_MultiSpeed',
160
+ 'OS_AirConditioner_VariableRefrigerantFlow'
143
161
  coil_dx.condenserType
144
162
  else
145
163
  'AirCooled'
@@ -2,6 +2,20 @@
2
2
  class Standard
3
3
  # @!group CoilHeatingGasMultiStage
4
4
 
5
+ # find search criteria
6
+ #
7
+ # @return [Hash] used for model_find_object(model)
8
+ def coil_heating_gas_multi_stage_find_search_criteria(coil_heating_gas_multi_stage)
9
+ # Define the criteria to find the coil heating gas multi-stage properties
10
+ # in the hvac standards data set.
11
+ search_criteria = {}
12
+ search_criteria['template'] = template
13
+ search_criteria['fuel_type'] = 'Gas'
14
+ search_criteria['fluid_type'] = 'Air'
15
+
16
+ return search_criteria
17
+ end
18
+
5
19
  # Applies the standard efficiency ratings and typical performance curves to this object.
6
20
  #
7
21
  # @return [Bool] true if successful, false if not
@@ -30,4 +44,29 @@ class Standard
30
44
  successfully_set_all_properties = false
31
45
  end
32
46
  end
47
+
48
+ # Finds capacity in W
49
+ #
50
+ # @return [Double] capacity in W to be used for find object
51
+ def coil_heating_gas_multi_stage_find_capacity(coil_heating_gas_multi_stage)
52
+
53
+ capacity_w = nil
54
+ htg_stages = coil_heating_gas_multi_stage.stages
55
+ if htg_stages.last.nominalCapacity.is_initialized
56
+ capacity_w = htg_stages.last.nominalCapacity.get
57
+ elsif (htg_stages.size == 1) && (coil_heating_gas_multi_stage.autosizedStage1NominalCapacity.is_initialized)
58
+ capacity_w = coil_heating_gas_multi_stage.autosizedStage1NominalCapacity.get
59
+ elsif (htg_stages.size == 2) && (coil_heating_gas_multi_stage.autosizedStage2NominalCapacity.is_initialized)
60
+ capacity_w = coil_heating_gas_multi_stage.autosizedStage2NominalCapacity.get
61
+ elsif (htg_stages.size == 3) && (coil_heating_gas_multi_stage.autosizedStage3NominalCapacity.is_initialized)
62
+ capacity_w = coil_heating_gas_multi_stage.autosizedStage3NominalCapacity.get
63
+ elsif (htg_stages.size == 4) && (coil_heating_gas_multi_stage.autosizedStage4NominalCapacity.is_initialized)
64
+ capacity_w = coil_heating_gas_multi_stage.autosizedStage4NominalCapacity.get
65
+ else
66
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{coil_heating_gas_multi_stage.name} capacity is not available, cannot apply efficiency standard.")
67
+ successfully_set_all_properties = false
68
+ return successfully_set_all_properties
69
+ end
70
+ end
71
+
33
72
  end
@@ -1512,6 +1512,7 @@ class Standard
1512
1512
  # Unitary ACs
1513
1513
  model.getCoilCoolingDXTwoSpeeds.sort.each { |obj| sql_db_vars_map = coil_cooling_dx_two_speed_apply_efficiency_and_curves(obj, sql_db_vars_map) }
1514
1514
  model.getCoilCoolingDXSingleSpeeds.sort.each { |obj| sql_db_vars_map = coil_cooling_dx_single_speed_apply_efficiency_and_curves(obj, sql_db_vars_map) }
1515
+ model.getCoilCoolingDXMultiSpeeds.sort.each { |obj| sql_db_vars_map = coil_cooling_dx_multi_speed_apply_efficiency_and_curves(obj, sql_db_vars_map) }
1515
1516
 
1516
1517
  # WSHPs
1517
1518
  # set WSHP heating coils before cooling coils to get cooling coil capacities before they are renamed
@@ -1545,6 +1546,7 @@ class Standard
1545
1546
 
1546
1547
  # Gas Heaters
1547
1548
  model.getCoilHeatingGass.sort.each { |obj| coil_heating_gas_apply_efficiency_and_curves(obj) }
1549
+ model.getCoilHeatingGasMultiStages.each {|obj| coil_heating_gas_multi_stage_apply_efficiency_and_curves(obj)}
1548
1550
 
1549
1551
  OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.Model', "Finished applying HVAC efficiency standards for #{template} template.")
1550
1552
  end
@@ -2784,6 +2786,33 @@ class Standard
2784
2786
  curve.setMinimumCurveOutput(data['minimum_dependent_variable_output']) if data['minimum_dependent_variable_output']
2785
2787
  curve.setMaximumCurveOutput(data['maximum_dependent_variable_output']) if data['maximum_dependent_variable_output']
2786
2788
  return curve
2789
+ when 'MultiVariableLookupTable'
2790
+ num_ind_var = data['number_independent_variables'].to_i
2791
+ table = OpenStudio::Model::TableMultiVariableLookup.new(model,num_ind_var)
2792
+ table.setName(data['name'])
2793
+ table.setInterpolationMethod(data['interpolation_method'])
2794
+ table.setNumberofInterpolationPoints(data['number_of_interpolation_points'])
2795
+ table.setCurveType(data['curve_type'])
2796
+ table.setTableDataFormat('SingleLineIndependentVariableWithMatrix')
2797
+ table.setNormalizationReference(data['normalization_reference'].to_f)
2798
+ table.setOutputUnitType(data['output_unit_type'])
2799
+ table.setMinimumValueofX1(data['minimum_independent_variable_1'].to_f)
2800
+ table.setMaximumValueofX1(data['maximum_independent_variable_1'].to_f)
2801
+ table.setInputUnitTypeforX1(data['input_unit_type_x1'])
2802
+ if num_ind_var == 2
2803
+ table.setMinimumValueofX2(data['minimum_independent_variable_2'].to_f)
2804
+ table.setMaximumValueofX2(data['maximum_independent_variable_2'].to_f)
2805
+ table.setInputUnitTypeforX2(data['input_unit_type_x2'])
2806
+ end
2807
+ data_points = data.each.select {|key,value| key.include? "data_point"}
2808
+ data_points.each do |key,value|
2809
+ if num_ind_var == 1
2810
+ table.addPoint(value.split(',')[0].to_f,value.split(',')[1].to_f)
2811
+ elsif num_ind_var == 2
2812
+ table.addPoint(value.split(',')[0].to_f,value.split(',')[1].to_f,value.split(',')[2].to_f)
2813
+ end
2814
+ end
2815
+ return table
2787
2816
  else
2788
2817
  OpenStudio::logFree(OpenStudio::Error, "openstudio.Model.Model", "#{curve_name}' has an invalid form: #{data['form']}', cannot create this curve.")
2789
2818
  return nil
@@ -102,6 +102,8 @@ class Standard
102
102
  # all design OA to per-area
103
103
  # unless the "Outdoor Air Method" is "Maximum"
104
104
  thermal_zone.spaces.each do |space|
105
+ # Find the design OA, which may be assigned at either the
106
+ # SpaceType or directly at the Space
105
107
  dsn_oa = space.designSpecificationOutdoorAir
106
108
  next if dsn_oa.empty?
107
109
  dsn_oa = dsn_oa.get
@@ -122,12 +124,35 @@ class Standard
122
124
  # Convert total to per-area
123
125
  tot_oa_per_area = tot_oa / floor_area
124
126
 
127
+ # Check if there is another design OA object that has already
128
+ # been converted from per-person to per-area that matches.
129
+ # If so, reuse that instead of creating a duplicate.
130
+ new_dsn_oa_name = "#{dsn_oa.name} to per-area"
131
+ if thermal_zone.model.getDesignSpecificationOutdoorAirByName(new_dsn_oa_name).is_initialized
132
+ new_dsn_oa = thermal_zone.model.getDesignSpecificationOutdoorAirByName(new_dsn_oa_name).get
133
+ else
134
+ new_dsn_oa = OpenStudio::Model::DesignSpecificationOutdoorAir.new(thermal_zone.model)
135
+ new_dsn_oa.setName(new_dsn_oa_name)
136
+ end
137
+
138
+ # Assign this new design OA to the space
139
+ space.setDesignSpecificationOutdoorAir(new_dsn_oa)
140
+
141
+ # Set the method
142
+ new_dsn_oa.setOutdoorAirMethod('Sum')
125
143
  # Set the per-area requirement
126
- dsn_oa.setOutdoorAirFlowperFloorArea(tot_oa_per_area)
144
+ new_dsn_oa.setOutdoorAirFlowperFloorArea(tot_oa_per_area)
127
145
  # Zero-out the per-person, ACH, and flow requirements
128
- dsn_oa.setOutdoorAirFlowperPerson(0.0)
129
- dsn_oa.setOutdoorAirFlowAirChangesperHour(0.0)
130
- dsn_oa.setOutdoorAirFlowRate(0.0)
146
+ new_dsn_oa.setOutdoorAirFlowperPerson(0.0)
147
+ new_dsn_oa.setOutdoorAirFlowAirChangesperHour(0.0)
148
+ new_dsn_oa.setOutdoorAirFlowRate(0.0)
149
+ # Copy the orignal OA schedule, if any
150
+ if dsn_oa.outdoorAirFlowRateFractionSchedule.is_initialized
151
+ oa_sch = dsn_oa.outdoorAirFlowRateFractionSchedule.get
152
+ new_dsn_oa.setOutdoorAirFlowRateFractionSchedule(oa_sch)
153
+ end
154
+
155
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.Standards.ThermalZone', "For #{thermal_zone.name}: Converted total ventilation requirements to per-area value.")
131
156
  end
132
157
 
133
158
  return true
@@ -1625,6 +1650,14 @@ class Standard
1625
1650
  end
1626
1651
 
1627
1652
  # If here, DCV is required
1653
+ if min_area_m2 && min_area_m2_per_occ
1654
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.ThermalZone', "For #{thermal_zone.name}: DCV is required since the occupant density of #{occ_per_1000_ft2.round} people/1000 ft2 is above minimum occupant density of #{min_occ_per_1000_ft2.round} people/1000 ft2 and the area of #{area_served_ft2.round} ft2 is above the minimum size of #{min_area_ft2.round} ft2.")
1655
+ elsif min_area_m2
1656
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.ThermalZone', "For #{thermal_zone.name}: DCV is required since the area of #{area_served_ft2.round} ft2 is above the minimum size of #{min_area_ft2.round} ft2.")
1657
+ elsif min_area_m2_per_occ
1658
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.ThermalZone', "For #{thermal_zone.name}: DCV is required since the occupant density of #{occ_per_1000_ft2.round} people/1000 ft2 is above minimum occupant density of #{min_occ_per_1000_ft2.round} people/1000 ft2.")
1659
+ end
1660
+
1628
1661
  dcv_required = true
1629
1662
 
1630
1663
  return dcv_required
@@ -269,11 +269,11 @@
269
269
  "ptac_eer_coefficient_1": null,
270
270
  "ptac_eer_coefficient_2": null,
271
271
  "minimum_scop": 2.2,
272
- "cool_cap_ft": "CoilClgDXQRatio_fTwbToadbSI",
273
- "cool_cap_fflow": "CoilClgDXDblQRatio_fCFMRatio",
274
- "cool_eir_ft": "CoilClgDXEIRRatio_fTwbToadbSI",
275
- "cool_eir_fflow": "CoilClgDXDblEIRRatio_fCFMRatio",
276
- "cool_plf_fplr": "CoilClgDXEIRRatio_fQFrac",
272
+ "cool_cap_ft": "PSZ-Fine Storage DX Coil Cap-FT",
273
+ "cool_cap_fflow": "DX Coil Cap-FF",
274
+ "cool_eir_ft": "PSZ-AC DX Coil EIR-FT",
275
+ "cool_eir_fflow": "Split DX Coil EIR-FF",
276
+ "cool_plf_fplr": "HPACCOOLPLFFPLR",
277
277
  "notes": "2004 not specified, follow ASHRAE 90.1-2013 Table 6.8.1-11. capacity here is sensible only. SCOP for downflow units"
278
278
  },
279
279
  {
@@ -292,11 +292,11 @@
292
292
  "ptac_eer_coefficient_1": null,
293
293
  "ptac_eer_coefficient_2": null,
294
294
  "minimum_scop": 2.1,
295
- "cool_cap_ft": "CoilClgDXQRatio_fTwbToadbSI",
296
- "cool_cap_fflow": "CoilClgDXDblQRatio_fCFMRatio",
297
- "cool_eir_ft": "CoilClgDXEIRRatio_fTwbToadbSI",
298
- "cool_eir_fflow": "CoilClgDXDblEIRRatio_fCFMRatio",
299
- "cool_plf_fplr": "CoilClgDXEIRRatio_fQFrac",
295
+ "cool_cap_ft": "PSZ-Fine Storage DX Coil Cap-FT",
296
+ "cool_cap_fflow": "DX Coil Cap-FF",
297
+ "cool_eir_ft": "PSZ-AC DX Coil EIR-FT",
298
+ "cool_eir_fflow": "Split DX Coil EIR-FF",
299
+ "cool_plf_fplr": "HPACCOOLPLFFPLR",
300
300
  "notes": "2004 not specified, follow ASHRAE 90.1-2013 Table 6.8.1-11. capacity here is sensible only. SCOP for downflow units"
301
301
  },
302
302
  {
@@ -315,11 +315,11 @@
315
315
  "ptac_eer_coefficient_1": null,
316
316
  "ptac_eer_coefficient_2": null,
317
317
  "minimum_scop": 1.9,
318
- "cool_cap_ft": "CoilClgDXQRatio_fTwbToadbSI",
319
- "cool_cap_fflow": "CoilClgDXDblQRatio_fCFMRatio",
320
- "cool_eir_ft": "CoilClgDXEIRRatio_fTwbToadbSI",
321
- "cool_eir_fflow": "CoilClgDXDblEIRRatio_fCFMRatio",
322
- "cool_plf_fplr": "CoilClgDXEIRRatio_fQFrac",
318
+ "cool_cap_ft": "PSZ-Fine Storage DX Coil Cap-FT",
319
+ "cool_cap_fflow": "DX Coil Cap-FF",
320
+ "cool_eir_ft": "PSZ-AC DX Coil EIR-FT",
321
+ "cool_eir_fflow": "Split DX Coil EIR-FF",
322
+ "cool_plf_fplr": "HPACCOOLPLFFPLR",
323
323
  "notes": "2004 not specified, follow ASHRAE 90.1-2013 Table 6.8.1-11. capacity here is sensible only. SCOP for downflow units"
324
324
  },
325
325
  {
@@ -269,11 +269,11 @@
269
269
  "ptac_eer_coefficient_1": null,
270
270
  "ptac_eer_coefficient_2": null,
271
271
  "minimum_scop": 2.2,
272
- "cool_cap_ft": "CoilClgDXQRatio_fTwbToadbSI",
273
- "cool_cap_fflow": "CoilClgDXDblQRatio_fCFMRatio",
274
- "cool_eir_ft": "CoilClgDXEIRRatio_fTwbToadbSI",
275
- "cool_eir_fflow": "CoilClgDXDblEIRRatio_fCFMRatio",
276
- "cool_plf_fplr": "CoilClgDXEIRRatio_fQFrac",
272
+ "cool_cap_ft": "PSZ-Fine Storage DX Coil Cap-FT",
273
+ "cool_cap_fflow": "DX Coil Cap-FF",
274
+ "cool_eir_ft": "PSZ-AC DX Coil EIR-FT",
275
+ "cool_eir_fflow": "Split DX Coil EIR-FF",
276
+ "cool_plf_fplr": "HPACCOOLPLFFPLR",
277
277
  "notes": "2007 not specified, follow ASHRAE 90.1-2013 Table 6.8.1-11. capacity here is sensible only. SCOP for downflow units"
278
278
  },
279
279
  {
@@ -292,11 +292,11 @@
292
292
  "ptac_eer_coefficient_1": null,
293
293
  "ptac_eer_coefficient_2": null,
294
294
  "minimum_scop": 2.1,
295
- "cool_cap_ft": "CoilClgDXQRatio_fTwbToadbSI",
296
- "cool_cap_fflow": "CoilClgDXDblQRatio_fCFMRatio",
297
- "cool_eir_ft": "CoilClgDXEIRRatio_fTwbToadbSI",
298
- "cool_eir_fflow": "CoilClgDXDblEIRRatio_fCFMRatio",
299
- "cool_plf_fplr": "CoilClgDXEIRRatio_fQFrac",
295
+ "cool_cap_ft": "PSZ-Fine Storage DX Coil Cap-FT",
296
+ "cool_cap_fflow": "DX Coil Cap-FF",
297
+ "cool_eir_ft": "PSZ-AC DX Coil EIR-FT",
298
+ "cool_eir_fflow": "Split DX Coil EIR-FF",
299
+ "cool_plf_fplr": "HPACCOOLPLFFPLR",
300
300
  "notes": "2007 not specified, follow ASHRAE 90.1-2013 Table 6.8.1-11. capacity here is sensible only. SCOP for downflow units"
301
301
  },
302
302
  {
@@ -315,11 +315,11 @@
315
315
  "ptac_eer_coefficient_1": null,
316
316
  "ptac_eer_coefficient_2": null,
317
317
  "minimum_scop": 1.9,
318
- "cool_cap_ft": "CoilClgDXQRatio_fTwbToadbSI",
319
- "cool_cap_fflow": "CoilClgDXDblQRatio_fCFMRatio",
320
- "cool_eir_ft": "CoilClgDXEIRRatio_fTwbToadbSI",
321
- "cool_eir_fflow": "CoilClgDXDblEIRRatio_fCFMRatio",
322
- "cool_plf_fplr": "CoilClgDXEIRRatio_fQFrac",
318
+ "cool_cap_ft": "PSZ-Fine Storage DX Coil Cap-FT",
319
+ "cool_cap_fflow": "DX Coil Cap-FF",
320
+ "cool_eir_ft": "PSZ-AC DX Coil EIR-FT",
321
+ "cool_eir_fflow": "Split DX Coil EIR-FF",
322
+ "cool_plf_fplr": "HPACCOOLPLFFPLR",
323
323
  "notes": "2007 not specified, follow ASHRAE 90.1-2013 Table 6.8.1-11. capacity here is sensible only. SCOP for downflow units"
324
324
  },
325
325
  {
@@ -315,11 +315,11 @@
315
315
  "ptac_eer_coefficient_1": null,
316
316
  "ptac_eer_coefficient_2": null,
317
317
  "minimum_scop": 1.9,
318
- "cool_cap_ft": "PSZ-AC_CoolCLennoxStandard10Ton_TGA120S2B_CapFT",
319
- "cool_cap_fflow": "AHU-1_CoolCStandard10Ton_CapFF",
320
- "cool_eir_ft": "PSZ-AC_CoolCStandard10Ton_EIRFT",
321
- "cool_eir_fflow": "CoolCLennoxStandard10Ton_TGA120S2B_EIRFFF",
322
- "cool_plf_fplr": "PSZ-AC_CoolCLennoxStandard10Ton_TGA120S2B_PLR",
318
+ "cool_cap_ft": "PSZ-Fine Storage DX Coil Cap-FT",
319
+ "cool_cap_fflow": "DX Coil Cap-FF",
320
+ "cool_eir_ft": "PSZ-AC DX Coil EIR-FT",
321
+ "cool_eir_fflow": "Split DX Coil EIR-FF",
322
+ "cool_plf_fplr": "HPACCOOLPLFFPLR",
323
323
  "notes": "ASHRAE 90.1-2010 Table 6.8.1K. capacity here is sensible only. SCOP for downflow units"
324
324
  },
325
325
  {
@@ -499,11 +499,11 @@
499
499
  "ptac_eer_coefficient_1": null,
500
500
  "ptac_eer_coefficient_2": null,
501
501
  "minimum_scop": 2.2,
502
- "cool_cap_ft": "PSZ-AC_Unitary_PackagecoolCapFT",
503
- "cool_cap_fflow": "PSZ-AC_Unitary_PackagecoolFFF",
504
- "cool_eir_ft": "PSZ-AC DX Unitary Package EIRFT",
505
- "cool_eir_fflow": "PSZ-AC_Unitary_PackagecoolEIRFFF",
506
- "cool_plf_fplr": "PSZ-AC_Unitary_PackagecoolPLR",
502
+ "cool_cap_ft": "PSZ-Fine Storage DX Coil Cap-FT",
503
+ "cool_cap_fflow": "DX Coil Cap-FF",
504
+ "cool_eir_ft": "PSZ-AC DX Coil EIR-FT",
505
+ "cool_eir_fflow": "Split DX Coil EIR-FF",
506
+ "cool_plf_fplr": "HPACCOOLPLFFPLR",
507
507
  "notes": "ASHRAE 90.1-2013 Table 6.8.1-11. capacity here is sensible only. SCOP for downflow units"
508
508
  },
509
509
  {
@@ -522,11 +522,11 @@
522
522
  "ptac_eer_coefficient_1": null,
523
523
  "ptac_eer_coefficient_2": null,
524
524
  "minimum_scop": 2.1,
525
- "cool_cap_ft": "PSZ-AC_Unitary_PackagecoolCapFT",
526
- "cool_cap_fflow": "PSZ-AC_Unitary_PackagecoolFFF",
527
- "cool_eir_ft": "PSZ-AC DX Unitary Package EIRFT",
528
- "cool_eir_fflow": "PSZ-AC_Unitary_PackagecoolEIRFFF",
529
- "cool_plf_fplr": "PSZ-AC_Unitary_PackagecoolPLR",
525
+ "cool_cap_ft": "PSZ-Fine Storage DX Coil Cap-FT",
526
+ "cool_cap_fflow": "DX Coil Cap-FF",
527
+ "cool_eir_ft": "PSZ-AC DX Coil EIR-FT",
528
+ "cool_eir_fflow": "Split DX Coil EIR-FF",
529
+ "cool_plf_fplr": "HPACCOOLPLFFPLR",
530
530
  "notes": "ASHRAE 90.1-2013 Table 6.8.1-11. capacity here is sensible only. SCOP for downflow units"
531
531
  },
532
532
  {
@@ -545,11 +545,11 @@
545
545
  "ptac_eer_coefficient_1": null,
546
546
  "ptac_eer_coefficient_2": null,
547
547
  "minimum_scop": 1.9,
548
- "cool_cap_ft": "PSZ-AC_Unitary_PackagecoolCapFT",
549
- "cool_cap_fflow": "PSZ-AC_Unitary_PackagecoolFFF",
550
- "cool_eir_ft": "PSZ-AC DX Unitary Package EIRFT",
551
- "cool_eir_fflow": "PSZ-AC_Unitary_PackagecoolEIRFFF",
552
- "cool_plf_fplr": "PSZ-AC_Unitary_PackagecoolPLR",
548
+ "cool_cap_ft": "PSZ-Fine Storage DX Coil Cap-FT",
549
+ "cool_cap_fflow": "DX Coil Cap-FF",
550
+ "cool_eir_ft": "PSZ-AC DX Coil EIR-FT",
551
+ "cool_eir_fflow": "Split DX Coil EIR-FF",
552
+ "cool_plf_fplr": "HPACCOOLPLFFPLR",
553
553
  "notes": "ASHRAE 90.1-2013 Table 6.8.1-11. capacity here is sensible only. SCOP for downflow units"
554
554
  },
555
555
  {