openstudio-standards 0.6.3 → 0.7.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/data/standards/OpenStudio_Standards-ashrae_90_1.xlsx +0 -0
  3. data/data/standards/manage_OpenStudio_Standards.rb +2 -49
  4. data/data/standards/openstudio_standards_duplicates_log.csv +1 -7962
  5. data/data/standards/test_performance_expected_dd_results.csv +2005 -97
  6. data/lib/openstudio-standards/create_typical/space_type_ratios.rb +47 -57
  7. data/lib/openstudio-standards/geometry/create.rb +1 -1
  8. data/lib/openstudio-standards/geometry/create_bar.rb +6 -3
  9. data/lib/openstudio-standards/geometry/create_shape.rb +1 -1
  10. data/lib/openstudio-standards/geometry/group.rb +1 -1
  11. data/lib/openstudio-standards/geometry/information.rb +1 -1
  12. data/lib/openstudio-standards/geometry/modify.rb +53 -1
  13. data/lib/openstudio-standards/infiltration/nist_infiltration.rb +1 -1
  14. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.rb +11 -11
  15. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.rb +11 -11
  16. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.hvac_systems.rb +2 -2
  17. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SuperTallBuilding.rb +44 -47
  18. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.TallBuilding.rb +43 -48
  19. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CentralAirSourceHeatPump.rb +1 -1
  20. data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +44 -24
  21. data/lib/openstudio-standards/prototypes/common/objects/Prototype.refrigeration.rb +24 -24
  22. data/lib/openstudio-standards/schedules/parametric.rb +1 -1
  23. data/lib/openstudio-standards/service_water_heating/create_piping_losses.rb +152 -0
  24. data/lib/openstudio-standards/service_water_heating/create_water_heater.rb +544 -0
  25. data/lib/openstudio-standards/service_water_heating/create_water_heating_loop.rb +303 -0
  26. data/lib/openstudio-standards/service_water_heating/create_water_use.rb +95 -0
  27. data/lib/openstudio-standards/space/space.rb +1 -1
  28. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +65 -70
  29. data/lib/openstudio-standards/standards/Standards.CoilCoolingWaterToAirHeatPumpEquationFit.rb +12 -14
  30. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +16 -5
  31. data/lib/openstudio-standards/standards/Standards.Model.rb +2 -2
  32. data/lib/openstudio-standards/standards/Standards.PlanarSurface.rb +10 -2
  33. data/lib/openstudio-standards/{prototypes/common/objects/Prototype.Model.swh.rb → standards/Standards.ServiceWaterHeating.rb} +209 -139
  34. data/lib/openstudio-standards/standards/Standards.Surface.rb +1 -1
  35. data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +4 -8
  36. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.Model.rb +2 -2
  37. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.construction_properties.json +22251 -12963
  38. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.construction_sets.json +91 -91
  39. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.construction_properties.json +8981 -5228
  40. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.construction_properties.json +8935 -5182
  41. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.construction_properties.json +7281 -5391
  42. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.construction_sets.json +91 -91
  43. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.construction_properties.json +9005 -15215
  44. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.construction_sets.json +136 -136
  45. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirLoopHVAC.rb +1 -1
  46. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.construction_properties.json +8717 -17168
  47. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.construction_sets.json +136 -136
  48. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.constructions.json +1941 -651
  49. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/data/doe_ref_1980_2004.construction_properties.json +135 -135
  50. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/data/doe_ref_pre_1980.construction_properties.json +135 -135
  51. data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/data/nrel_zne_ready_2017.construction_properties.json +36 -36
  52. data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/data/ze_aedg_multifamily.construction_properties.json +36 -36
  53. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.PlantLoop.rb +377 -99
  54. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.SpaceType.rb +2 -2
  55. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019.Model.rb +3 -3
  56. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.construction_properties.json +6889 -4044
  57. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_constructions.json +108 -108
  58. data/lib/openstudio-standards/standards/cbes/cbes_pre_1978/data/cbes_pre_1978.construction_properties.json +16 -16
  59. data/lib/openstudio-standards/standards/cbes/cbes_t24_1978/data/cbes_t24_1978.construction_properties.json +16 -16
  60. data/lib/openstudio-standards/standards/cbes/cbes_t24_1992/data/cbes_t24_1992.construction_properties.json +16 -16
  61. data/lib/openstudio-standards/standards/cbes/cbes_t24_2001/data/cbes_t24_2001.construction_properties.json +16 -16
  62. data/lib/openstudio-standards/standards/cbes/cbes_t24_2005/data/cbes_t24_2005.construction_properties.json +16 -16
  63. data/lib/openstudio-standards/standards/cbes/cbes_t24_2008/data/cbes_t24_2008.construction_properties.json +16 -16
  64. data/lib/openstudio-standards/standards/cbes/data/cbes.constructions.json +142 -142
  65. data/lib/openstudio-standards/standards/deer/data/deer.constructions.json +5 -1551
  66. data/lib/openstudio-standards/standards/deer/data/deer.materials.json +40 -0
  67. data/lib/openstudio-standards/standards/deer/deer_1985/data/deer_1985.motors.json +88 -8
  68. data/lib/openstudio-standards/standards/deer/deer_1996/data/deer_1996.motors.json +88 -8
  69. data/lib/openstudio-standards/standards/deer/deer_2003/data/deer_2003.motors.json +88 -8
  70. data/lib/openstudio-standards/standards/deer/deer_2007/data/deer_2007.motors.json +88 -8
  71. data/lib/openstudio-standards/standards/deer/deer_2011/data/deer_2011.motors.json +88 -8
  72. data/lib/openstudio-standards/standards/deer/deer_2014/data/deer_2014.motors.json +88 -8
  73. data/lib/openstudio-standards/standards/deer/deer_2015/data/deer_2015.motors.json +88 -8
  74. data/lib/openstudio-standards/standards/deer/deer_2017/data/deer_2017.motors.json +88 -8
  75. data/lib/openstudio-standards/standards/deer/deer_2020/data/deer_2020.motors.json +88 -8
  76. data/lib/openstudio-standards/standards/deer/deer_2025/data/deer_2025.motors.json +88 -8
  77. data/lib/openstudio-standards/standards/deer/deer_2030/data/deer_2030.motors.json +88 -8
  78. data/lib/openstudio-standards/standards/deer/deer_2035/data/deer_2035.motors.json +88 -8
  79. data/lib/openstudio-standards/standards/deer/deer_2040/data/deer_2040.motors.json +88 -8
  80. data/lib/openstudio-standards/standards/deer/deer_2045/data/deer_2045.motors.json +88 -8
  81. data/lib/openstudio-standards/standards/deer/deer_2050/data/deer_2050.motors.json +88 -8
  82. data/lib/openstudio-standards/standards/deer/deer_2055/data/deer_2055.motors.json +88 -8
  83. data/lib/openstudio-standards/standards/deer/deer_2060/data/deer_2060.motors.json +88 -8
  84. data/lib/openstudio-standards/standards/deer/deer_2065/data/deer_2065.motors.json +88 -8
  85. data/lib/openstudio-standards/standards/deer/deer_2070/data/deer_2070.motors.json +88 -8
  86. data/lib/openstudio-standards/standards/deer/deer_2075/data/deer_2075.motors.json +88 -8
  87. data/lib/openstudio-standards/standards/deer/deer_pre_1975/data/deer_pre_1975.motors.json +88 -8
  88. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb +17 -0
  89. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_systems.rb +2 -1
  90. data/lib/openstudio-standards/standards/necb/ECMS/ecms.rb +4 -4
  91. data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +61 -88
  92. data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +3 -2
  93. data/lib/openstudio-standards/standards/necb/NECB2011/data/boiler_fuel_type_sets.json +54 -0
  94. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LEEPMidriseApartment.osm +1 -1
  95. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LEEPMultiTower.osm +1 -1
  96. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LEEPPointTower.osm +1 -1
  97. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LEEPTownHouse.osm +1 -1
  98. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/NorthernEducation.osm +4 -4
  99. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/NorthernHealthCare.osm +4 -4
  100. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +32 -24
  101. data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +89 -15
  102. data/lib/openstudio-standards/standards/necb/NECB2011/qaqc/necb_qaqc.rb +5 -1
  103. data/lib/openstudio-standards/standards/necb/NECB2011/service_water_heating.rb +22 -65
  104. data/lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb +19 -0
  105. data/lib/openstudio-standards/standards/necb/common/btap_data.rb +56 -2
  106. data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +3 -1
  107. data/lib/openstudio-standards/standards/necb/common/construction_defaults.osm +2 -2
  108. data/lib/openstudio-standards/standards/necb/docs/air_system_names_method.md +127 -0
  109. data/lib/openstudio-standards/thermal_zone/thermal_zone.rb +1 -1
  110. data/lib/openstudio-standards/utilities/template_measure/resources/BTAPMeasureHelper.rb +1 -1
  111. data/lib/openstudio-standards/version.rb +1 -1
  112. data/lib/openstudio-standards/weather/information.rb +61 -5
  113. data/lib/openstudio-standards/weather/modify.rb +1 -1
  114. data/lib/openstudio-standards.rb +5 -3
  115. metadata +12 -63
  116. data/data/standards/OpenStudio_Standards-deer.xlsx +0 -0
  117. data/lib/openstudio-standards/prototypes/common/objects/Prototype.ServiceWaterHeating.rb +0 -1100
  118. data/lib/openstudio-standards/service_water_heating/component.rb +0 -189
@@ -297,11 +297,7 @@ class Standard
297
297
  end
298
298
 
299
299
  # Clean name of airloop
300
- loop_name_clean = air_loop_hvac.name.get.to_s.gsub(/\W/, '').delete('_')
301
- # If the name starts with a number, prepend with a letter
302
- if loop_name_clean[0] =~ /[0-9]/
303
- loop_name_clean = "SYS#{loop_name_clean}"
304
- end
300
+ loop_name_clean = ems_friendly_name(air_loop_hvac.name)
305
301
 
306
302
  # Sensors
307
303
  oat_db_c_sen = OpenStudio::Model::EnergyManagementSystemSensor.new(air_loop_hvac.model, 'Site Outdoor Air Drybulb Temperature')
@@ -333,14 +329,14 @@ class Standard
333
329
 
334
330
  # Actuators
335
331
  htg_sch_act = OpenStudio::Model::EnergyManagementSystemActuator.new(htg_sch, htg_sch_type, 'Schedule Value')
336
- htg_sch_act.setName("#{loop_name_clean}HtgSch#{i}")
332
+ htg_sch_act.setName("#{loop_name_clean}_HtgSch#{i}")
337
333
 
338
334
  clg_sch_act = OpenStudio::Model::EnergyManagementSystemActuator.new(clg_sch, clg_sch_type, 'Schedule Value')
339
- clg_sch_act.setName("#{loop_name_clean}ClgSch#{i}")
335
+ clg_sch_act.setName("#{loop_name_clean}_ClgSch#{i}")
340
336
 
341
337
  # Programs
342
338
  optstart_prg = OpenStudio::Model::EnergyManagementSystemProgram.new(air_loop_hvac.model)
343
- optstart_prg.setName("#{loop_name_clean}OptimumStartProg#{i}")
339
+ optstart_prg.setName("#{loop_name_clean}_OptimumStartProg#{i}")
344
340
  optstart_prg_body = <<-EMS
345
341
  IF DaylightSavings==0 && DayOfWeek>1 && Hour==5 && #{oat_db_c_sen.handle}<23.9 && #{oat_db_c_sen.handle}>1.7
346
342
  SET #{clg_sch_act.handle} = 29.4
@@ -363,7 +359,7 @@ class Standard
363
359
 
364
360
  # Program Calling Managers
365
361
  setup_mgr = OpenStudio::Model::EnergyManagementSystemProgramCallingManager.new(air_loop_hvac.model)
366
- setup_mgr.setName("#{loop_name_clean}OptimumStartCallingManager#{i}")
362
+ setup_mgr.setName("#{loop_name_clean}_OptimumStartCallingManager#{i}")
367
363
  setup_mgr.setCallingPoint('BeginTimestepBeforePredictor')
368
364
  setup_mgr.addProgram(optstart_prg)
369
365
  end
@@ -2080,7 +2076,7 @@ class Standard
2080
2076
  v_pz = clg_dsn_flow
2081
2077
  end
2082
2078
  else
2083
- OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.AirLoopHVAC', "For #{air_loop_hvac.name}: #{zone.name} clg_dsn_flow could not be found.")
2079
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.AirLoopHVAC', "For #{air_loop_hvac.name}: #{zone.name}, zone CoolingDesignAirFlowRate could not be found.")
2084
2080
  end
2085
2081
  htg_dsn_flow = zone.autosizedHeatingDesignAirFlowRate
2086
2082
  if htg_dsn_flow.is_initialized
@@ -2089,7 +2085,11 @@ class Standard
2089
2085
  v_pz = htg_dsn_flow
2090
2086
  end
2091
2087
  else
2092
- OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.AirLoopHVAC', "For #{air_loop_hvac.name}: #{zone.name} htg_dsn_flow could not be found.")
2088
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.AirLoopHVAC', "For #{air_loop_hvac.name}: #{zone.name}, zone HeatingDesignAirFlowRate could not be found.")
2089
+ end
2090
+
2091
+ if v_pz.zero?
2092
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.AirLoopHVAC', "For #{air_loop_hvac.name}: #{zone.name}, neither the CoolingDesignAirFlowRate nor the HeatingDesignAirFlowRate could be found. The primary design air flow rate, v_pz, is zero. The zone may be missing a DesignSpecificationOutdoorAir object, or both heating and cooling load may be zero.")
2093
2093
  end
2094
2094
 
2095
2095
  # Get the minimum damper position
@@ -2135,7 +2135,7 @@ class Standard
2135
2135
  v_dz = v_pz * mdp
2136
2136
 
2137
2137
  # Zone discharge air fraction
2138
- z_d = v_oz / v_dz
2138
+ z_d = v_dz.zero? || v_oz.zero? ? 0.0 : v_oz / v_dz
2139
2139
 
2140
2140
  # Zone ventilation effectiveness
2141
2141
  e_vz = 1.0 + x_s - z_d
@@ -2157,7 +2157,8 @@ class Standard
2157
2157
  v_dz_adj = v_oz / z_d_adj
2158
2158
 
2159
2159
  # Adjusted minimum damper position
2160
- mdp_adj = v_dz_adj / v_pz
2160
+ # default to 0.2 if either values are zero
2161
+ mdp_adj = v_dz_adj.zero? || v_pz.zero? ? 0.2 : v_dz_adj / v_pz
2161
2162
 
2162
2163
  # Don't allow values > 1
2163
2164
  if mdp_adj > 1.0
@@ -2931,17 +2932,11 @@ class Standard
2931
2932
  fan_control = air_loop_hvac_multi_stage_dx_cooling?(air_loop_hvac)
2932
2933
 
2933
2934
  # Scrub special characters from the system name
2934
- sn = air_loop_hvac.name.get.to_s
2935
- snc = sn.gsub(/\W/, '').delete('_')
2936
- # If the name starts with a number, prepend with a letter
2937
- if snc[0] =~ /[0-9]/
2938
- snc = "SYS#{snc}"
2939
- end
2935
+ snc = ems_friendly_name(air_loop_hvac.name)
2940
2936
 
2941
2937
  # Get the zone name
2942
2938
  zone = air_loop_hvac.thermalZones[0]
2943
- zone_name = zone.name.get.to_s
2944
- zn_name_clean = zone_name.gsub(/\W/, '_')
2939
+ zn_name_clean = ems_friendly_name(zone.name)
2945
2940
 
2946
2941
  # Zone air node
2947
2942
  zone_air_node = zone.zoneAirNode
@@ -3018,36 +3013,36 @@ class Standard
3018
3013
  oat_wb_c_sen.setKeyName('Environment')
3019
3014
 
3020
3015
  oa_sch_sen = OpenStudio::Model::EnergyManagementSystemSensor.new(air_loop_hvac.model, 'Schedule Value')
3021
- oa_sch_sen.setName("#{snc}OASch")
3016
+ oa_sch_sen.setName("#{snc}_OASch")
3022
3017
  oa_sch_sen.setKeyName(min_oa_sch.handle.to_s)
3023
3018
 
3024
3019
  oa_flow_sen = OpenStudio::Model::EnergyManagementSystemSensor.new(air_loop_hvac.model, 'System Node Mass Flow Rate')
3025
- oa_flow_sen.setName("#{snc}OAFlowMass")
3020
+ oa_flow_sen.setName("#{snc}_OAFlowMass")
3026
3021
  oa_flow_sen.setKeyName(oa_node.handle.to_s)
3027
3022
 
3028
3023
  dat_sen = OpenStudio::Model::EnergyManagementSystemSensor.new(air_loop_hvac.model, 'System Node Setpoint Temperature')
3029
- dat_sen.setName("#{snc}DATRqd")
3024
+ dat_sen.setName("#{snc}_DATRqd")
3030
3025
  dat_sen.setKeyName(sup_out_node.handle.to_s)
3031
3026
 
3032
3027
  # Internal Variables
3033
3028
  oa_flow_var = OpenStudio::Model::EnergyManagementSystemInternalVariable.new(air_loop_hvac.model, 'Outdoor Air Controller Minimum Mass Flow Rate')
3034
- oa_flow_var.setName("#{snc}OADesignMass")
3029
+ oa_flow_var.setName("#{snc}_OADesignMass")
3035
3030
  oa_flow_var.setInternalDataIndexKeyName(oa_control.handle.to_s)
3036
3031
 
3037
3032
  # Global Variables
3038
- gvar = OpenStudio::Model::EnergyManagementSystemGlobalVariable.new(air_loop_hvac.model, "#{snc}NumberofStages")
3033
+ gvar = OpenStudio::Model::EnergyManagementSystemGlobalVariable.new(air_loop_hvac.model, "#{snc}_NumberofStages")
3039
3034
 
3040
3035
  # Programs
3041
3036
  num_stg_prg = OpenStudio::Model::EnergyManagementSystemProgram.new(air_loop_hvac.model)
3042
- num_stg_prg.setName("#{snc}SetNumberofStages")
3037
+ num_stg_prg.setName("#{snc}_SetNumberofStages")
3043
3038
  num_stg_prg_body = <<-EMS
3044
- SET #{snc}NumberofStages = #{num_stages}
3039
+ SET #{snc}_NumberofStages = #{num_stages}
3045
3040
  EMS
3046
3041
  num_stg_prg.setBody(num_stg_prg_body)
3047
3042
 
3048
3043
  # Program Calling Managers
3049
3044
  setup_mgr = OpenStudio::Model::EnergyManagementSystemProgramCallingManager.new(air_loop_hvac.model)
3050
- setup_mgr.setName("#{snc}SetNumberofStagesCallingManager")
3045
+ setup_mgr.setName("#{snc}_SetNumberofStagesCallingManager")
3051
3046
  setup_mgr.setCallingPoint('BeginNewEnvironment')
3052
3047
  setup_mgr.addProgram(num_stg_prg)
3053
3048
 
@@ -3057,11 +3052,11 @@ class Standard
3057
3052
  ### Economizer Control ###
3058
3053
  # Actuators
3059
3054
  econ_eff_act = OpenStudio::Model::EnergyManagementSystemActuator.new(max_oa_sch, 'Schedule:Year', 'Schedule Value')
3060
- econ_eff_act.setName("#{snc}TimestepEconEff")
3055
+ econ_eff_act.setName("#{snc}_TimestepEconEff")
3061
3056
 
3062
3057
  # Programs
3063
3058
  econ_prg = OpenStudio::Model::EnergyManagementSystemProgram.new(air_loop_hvac.model)
3064
- econ_prg.setName("#{snc}EconomizerCTRLProg")
3059
+ econ_prg.setName("#{snc}_EconomizerCTRLProg")
3065
3060
  econ_prg_body = <<-EMS
3066
3061
  SET #{econ_eff_act.handle} = 0.7
3067
3062
  SET MaxE = 0.7
@@ -3082,7 +3077,7 @@ class Standard
3082
3077
  SET CoolLoad = 0
3083
3078
  ENDIF
3084
3079
  IF EconoActive == 1
3085
- SET Stage = #{snc}NumberofStages
3080
+ SET Stage = #{snc}_NumberofStages
3086
3081
  IF Stage == 2
3087
3082
  IF CoolLoad < 0.6
3088
3083
  SET #{econ_eff_act.handle} = MaxE
@@ -3114,72 +3109,72 @@ class Standard
3114
3109
 
3115
3110
  # Program Calling Managers
3116
3111
  econ_mgr = OpenStudio::Model::EnergyManagementSystemProgramCallingManager.new(air_loop_hvac.model)
3117
- econ_mgr.setName("#{snc}EcoManager")
3112
+ econ_mgr.setName("#{snc}_EcoManager")
3118
3113
  econ_mgr.setCallingPoint('InsideHVACSystemIterationLoop')
3119
3114
  econ_mgr.addProgram(econ_prg)
3120
3115
 
3121
3116
  # Sensors
3122
3117
  zn_temp_sen = OpenStudio::Model::EnergyManagementSystemSensor.new(air_loop_hvac.model, 'System Node Temperature')
3123
- zn_temp_sen.setName("#{zn_name_clean}Temp")
3118
+ zn_temp_sen.setName("#{zn_name_clean}_Temp")
3124
3119
  zn_temp_sen.setKeyName(zone_air_node.handle.to_s)
3125
3120
 
3126
3121
  htg_rtf_sen = OpenStudio::Model::EnergyManagementSystemSensor.new(air_loop_hvac.model, 'Heating Coil Runtime Fraction')
3127
- htg_rtf_sen.setName("#{snc}HeatingRTF")
3122
+ htg_rtf_sen.setName("#{snc}_HeatingRTF")
3128
3123
  htg_rtf_sen.setKeyName(htg_coil.handle.to_s)
3129
3124
 
3130
3125
  clg_rtf_sen = OpenStudio::Model::EnergyManagementSystemSensor.new(air_loop_hvac.model, 'Cooling Coil Runtime Fraction')
3131
- clg_rtf_sen.setName("#{snc}RTF")
3126
+ clg_rtf_sen.setName("#{snc}_RTF")
3132
3127
  clg_rtf_sen.setKeyName(dx_coil.handle.to_s)
3133
3128
 
3134
3129
  spd_sen = OpenStudio::Model::EnergyManagementSystemSensor.new(air_loop_hvac.model, 'Coil System Compressor Speed Ratio')
3135
- spd_sen.setName("#{snc}SpeedRatio")
3130
+ spd_sen.setName("#{snc}_SpeedRatio")
3136
3131
  spd_sen.setKeyName("#{dx_coil.handle} CoilSystem")
3137
3132
 
3138
3133
  # Internal Variables
3139
3134
  fan_pres_var = OpenStudio::Model::EnergyManagementSystemInternalVariable.new(air_loop_hvac.model, 'Fan Nominal Pressure Rise')
3140
- fan_pres_var.setName("#{snc}FanDesignPressure")
3135
+ fan_pres_var.setName("#{snc}_FanDesignPressure")
3141
3136
  fan_pres_var.setInternalDataIndexKeyName(fan.handle.to_s)
3142
3137
 
3143
3138
  dsn_flow_var = OpenStudio::Model::EnergyManagementSystemInternalVariable.new(air_loop_hvac.model, 'Outdoor Air Controller Maximum Mass Flow Rate')
3144
- dsn_flow_var.setName("#{snc}DesignFlowMass")
3139
+ dsn_flow_var.setName("#{snc}_DesignFlowMass")
3145
3140
  dsn_flow_var.setInternalDataIndexKeyName(oa_control.handle.to_s)
3146
3141
 
3147
3142
  # Actuators
3148
3143
  fan_pres_act = OpenStudio::Model::EnergyManagementSystemActuator.new(fan, 'Fan', 'Fan Pressure Rise')
3149
- fan_pres_act.setName("#{snc}FanPressure")
3144
+ fan_pres_act.setName("#{snc}_FanPressure")
3150
3145
 
3151
3146
  # Global Variables
3152
- gvar = OpenStudio::Model::EnergyManagementSystemGlobalVariable.new(air_loop_hvac.model, "#{snc}FanPwrExp")
3153
- gvar = OpenStudio::Model::EnergyManagementSystemGlobalVariable.new(air_loop_hvac.model, "#{snc}Stg1Spd")
3154
- gvar = OpenStudio::Model::EnergyManagementSystemGlobalVariable.new(air_loop_hvac.model, "#{snc}Stg2Spd")
3155
- gvar = OpenStudio::Model::EnergyManagementSystemGlobalVariable.new(air_loop_hvac.model, "#{snc}HeatSpeed")
3156
- gvar = OpenStudio::Model::EnergyManagementSystemGlobalVariable.new(air_loop_hvac.model, "#{snc}VenSpeed")
3147
+ gvar = OpenStudio::Model::EnergyManagementSystemGlobalVariable.new(air_loop_hvac.model, "#{snc}_FanPwrExp")
3148
+ gvar = OpenStudio::Model::EnergyManagementSystemGlobalVariable.new(air_loop_hvac.model, "#{snc}_Stg1Spd")
3149
+ gvar = OpenStudio::Model::EnergyManagementSystemGlobalVariable.new(air_loop_hvac.model, "#{snc}_Stg2Spd")
3150
+ gvar = OpenStudio::Model::EnergyManagementSystemGlobalVariable.new(air_loop_hvac.model, "#{snc}_HeatSpeed")
3151
+ gvar = OpenStudio::Model::EnergyManagementSystemGlobalVariable.new(air_loop_hvac.model, "#{snc}_VenSpeed")
3157
3152
 
3158
3153
  # Programs
3159
3154
  fan_par_prg = OpenStudio::Model::EnergyManagementSystemProgram.new(air_loop_hvac.model)
3160
- fan_par_prg.setName("#{snc}SetFanPar")
3155
+ fan_par_prg.setName("#{snc}_SetFanPar")
3161
3156
  fan_par_prg_body = <<-EMS
3162
- IF #{snc}NumberofStages == 1
3157
+ IF #{snc}_NumberofStages == 1
3163
3158
  Return
3164
3159
  ENDIF
3165
- SET #{snc}FanPwrExp = 2.2
3160
+ SET #{snc}_FanPwrExp = 2.2
3166
3161
  SET OAFrac = #{oa_flow_sen.handle}/#{dsn_flow_var.handle}
3167
3162
  IF OAFrac < 0.66
3168
- SET #{snc}VenSpeed = 0.66
3169
- SET #{snc}Stg1Spd = 0.66
3163
+ SET #{snc}_VenSpeed = 0.66
3164
+ SET #{snc}_Stg1Spd = 0.66
3170
3165
  ELSE
3171
- SET #{snc}VenSpeed = OAFrac
3172
- SET #{snc}Stg1Spd = OAFrac
3166
+ SET #{snc}_VenSpeed = OAFrac
3167
+ SET #{snc}_Stg1Spd = OAFrac
3173
3168
  ENDIF
3174
- SET #{snc}Stg2Spd = 1.0
3175
- SET #{snc}HeatSpeed = 1.0
3169
+ SET #{snc}_Stg2Spd = 1.0
3170
+ SET #{snc}_HeatSpeed = 1.0
3176
3171
  EMS
3177
3172
  fan_par_prg.setBody(fan_par_prg_body)
3178
3173
 
3179
3174
  fan_ctrl_prg = OpenStudio::Model::EnergyManagementSystemProgram.new(air_loop_hvac.model)
3180
- fan_ctrl_prg.setName("#{snc}FanControl")
3175
+ fan_ctrl_prg.setName("#{snc}_FanControl")
3181
3176
  fan_ctrl_prg_body = <<-EMS
3182
- IF #{snc}NumberofStages == 1
3177
+ IF #{snc}_NumberofStages == 1
3183
3178
  Return
3184
3179
  ENDIF
3185
3180
  IF #{htg_rtf_sen.handle} > 0
@@ -3190,7 +3185,7 @@ class Standard
3190
3185
  SET Stage2 = 0
3191
3186
  ELSE
3192
3187
  SET Heating = 0
3193
- SET EcoSpeed = #{snc}VenSpeed
3188
+ SET EcoSpeed = #{snc}_VenSpeed
3194
3189
  IF #{spd_sen.handle} == 0
3195
3190
  IF #{clg_rtf_sen.handle} > 0
3196
3191
  SET Stage1 = #{clg_rtf_sen.handle}
@@ -3198,7 +3193,7 @@ class Standard
3198
3193
  SET Ven = 1-#{clg_rtf_sen.handle}
3199
3194
  SET Eco = 0
3200
3195
  IF #{oa_flow_sen.handle} > (#{oa_flow_var.handle}*#{oa_sch_sen.handle})
3201
- SET #{snc}Stg1Spd = 1.0
3196
+ SET #{snc}_Stg1Spd = 1.0
3202
3197
  ENDIF
3203
3198
  ELSE
3204
3199
  SET Stage1 = 0
@@ -3207,10 +3202,10 @@ class Standard
3207
3202
  SET Eco = 1.0
3208
3203
  SET Ven = 0
3209
3204
  !Calculate the expected discharge air temperature if the system runs at its low speed
3210
- SET ExpDAT = #{dat_sen.handle}-(1-#{snc}VenSpeed)*#{zn_temp_sen.handle}
3211
- SET ExpDAT = ExpDAT/#{snc}VenSpeed
3205
+ SET ExpDAT = #{dat_sen.handle}-(1-#{snc}_VenSpeed)*#{zn_temp_sen.handle}
3206
+ SET ExpDAT = ExpDAT/#{snc}_VenSpeed
3212
3207
  IF #{oat_db_c_sen.handle} > ExpDAT
3213
- SET EcoSpeed = #{snc}Stg2Spd
3208
+ SET EcoSpeed = #{snc}_Stg2Spd
3214
3209
  ENDIF
3215
3210
  ELSE
3216
3211
  SET Eco = 0
@@ -3223,18 +3218,18 @@ class Standard
3223
3218
  SET Ven = 0
3224
3219
  SET Eco = 0
3225
3220
  IF #{oa_flow_sen.handle} > (#{oa_flow_var.handle}*#{oa_sch_sen.handle})
3226
- SET #{snc}Stg1Spd = 1.0
3221
+ SET #{snc}_Stg1Spd = 1.0
3227
3222
  ENDIF
3228
3223
  ENDIF
3229
3224
  ENDIF
3230
3225
  ! For each mode (percent time in mode)*(fanSpeer^PwrExp) is the contribution to weighted fan power over time step
3231
- SET FPR = Ven*(#{snc}VenSpeed ^ #{snc}FanPwrExp)
3232
- SET FPR = FPR+Eco*(EcoSpeed^#{snc}FanPwrExp)
3233
- SET FPR1 = Stage1*(#{snc}Stg1Spd^#{snc}FanPwrExp)
3226
+ SET FPR = Ven*(#{snc}_VenSpeed ^ #{snc}_FanPwrExp)
3227
+ SET FPR = FPR+Eco*(EcoSpeed^#{snc}_FanPwrExp)
3228
+ SET FPR1 = Stage1*(#{snc}_Stg1Spd^#{snc}_FanPwrExp)
3234
3229
  SET FPR = FPR+FPR1
3235
- SET FPR2 = Stage2*(#{snc}Stg2Spd^#{snc}FanPwrExp)
3230
+ SET FPR2 = Stage2*(#{snc}_Stg2Spd^#{snc}_FanPwrExp)
3236
3231
  SET FPR = FPR+FPR2
3237
- SET FPR3 = Heating*(#{snc}HeatSpeed^#{snc}FanPwrExp)
3232
+ SET FPR3 = Heating*(#{snc}_HeatSpeed^#{snc}_FanPwrExp)
3238
3233
  SET FanPwrRatio = FPR+ FPR3
3239
3234
  ! system fan power is directly proportional to static pressure so this change linearly adjusts fan energy for speed control
3240
3235
  SET #{fan_pres_act.handle} = #{fan_pres_var.handle}*FanPwrRatio
@@ -3247,7 +3242,7 @@ class Standard
3247
3242
  setup_mgr.addProgram(fan_par_prg)
3248
3243
 
3249
3244
  fan_ctrl_mgr = OpenStudio::Model::EnergyManagementSystemProgramCallingManager.new(air_loop_hvac.model)
3250
- fan_ctrl_mgr.setName("#{snc}FanMainManager")
3245
+ fan_ctrl_mgr.setName("#{snc}_FanMainManager")
3251
3246
  fan_ctrl_mgr.setCallingPoint('BeginTimestepBeforePredictor')
3252
3247
  fan_ctrl_mgr.addProgram(fan_ctrl_prg)
3253
3248
 
@@ -3866,10 +3861,10 @@ class Standard
3866
3861
  # @param snc [String] System name
3867
3862
  # @return [OpenStudio::Model::ScheduleRuleset] Generated maximum outdoor air fraction schedule for later use
3868
3863
  def set_maximum_fraction_outdoor_air_schedule(air_loop_hvac, oa_control, snc)
3869
- max_oa_sch_name = "#{snc}maxOASch"
3864
+ max_oa_sch_name = "#{snc}_maxOASch"
3870
3865
  max_oa_sch = OpenStudio::Model::ScheduleRuleset.new(air_loop_hvac.model)
3871
3866
  max_oa_sch.setName(max_oa_sch_name)
3872
- max_oa_sch.defaultDaySchedule.setName("#{max_oa_sch_name}Default")
3867
+ max_oa_sch.defaultDaySchedule.setName("#{max_oa_sch_name}_Default")
3873
3868
  max_oa_sch.defaultDaySchedule.addValue(OpenStudio::Time.new(0, 24, 0, 0), 0.7)
3874
3869
  oa_control.setMaximumFractionofOutdoorAirSchedule(max_oa_sch)
3875
3870
  return max_oa_sch
@@ -48,6 +48,17 @@ class Standard
48
48
  end
49
49
  coil_props = model_find_object(standards_data[equipment_type], search_criteria, capacity_btu_per_hr, Date.today)
50
50
 
51
+ # Check to make sure properties were found
52
+ if coil_props.nil?
53
+ # search again without capacity
54
+ matching_objects = model_find_objects(standards_data[equipment_type], search_criteria, nil, Date.today)
55
+ if !matching_objects.empty? && (equipment_type == 'water_source_heat_pumps') && (capacity_btu_per_hr > 135000)
56
+ # Issue warning indicate the coil size is may be too large
57
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingWaterToAirHeatPumpEquationFit', "The capacity of coil '#{coil_cooling_water_to_air_heat_pump.name}' is #{capacity_btu_per_hr.round} Btu/hr, which is larger than the 135,000 Btu/hr maximum capacity listed in the efficiency standard. This may be because of zone loads, zone size, or because zone equipment sizing in EnergyPlus includes zone multipliers. Will assume a capacity of 134,999 Btu/hr for the efficiency lookup.")
58
+ coil_props = model_find_object(standards_data[equipment_type], search_criteria, 134999, Date.today)
59
+ end
60
+ end
61
+
51
62
  # Check to make sure properties were found
52
63
  if coil_props.nil?
53
64
  OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingWaterToAirHeatPumpEquationFit', "For #{coil_cooling_water_to_air_heat_pump.name}, cannot find efficiency info using #{search_criteria}, cannot apply efficiency standard.")
@@ -119,23 +130,10 @@ class Standard
119
130
  if matching_objects.empty?
120
131
  # This proves that the search_criteria has issue finding the correct coil prop
121
132
  OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingWaterToAirHeatPumpEquationFit', "For #{coil_cooling_water_to_air_heat_pump.name}, cannot find efficiency info using #{search_criteria}, cannot apply efficiency standard.")
122
- else
123
- # Issue warning indicate the coil size is may be too large
124
- OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingWaterToAirHeatPumpEquationFit', "The capacity of the coil: #{coil_cooling_water_to_air_heat_pump.name} maybe too large to be found in the efficiency standard. The coil capacity is #{capacity_btu_per_hr} Btu/hr.")
133
+ return sql_db_vars_map
125
134
  end
126
- return sql_db_vars_map
127
135
  end
128
136
 
129
- # @todo Add methods to set coefficients, and add coefficients to data spreadsheet
130
- # using OS defaults for now
131
- # tot_cool_cap_coeff1 = coil_props['tot_cool_cap_coeff1']
132
- # if tot_cool_cap_coeff1
133
- # coil_cooling_water_to_air_heat_pump.setTotalCoolingCapacityCoefficient1(tot_cool_cap_coeff1)
134
- # else
135
- # OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingWaterToAirHeatPumpEquationFit', "For #{coil_cooling_water_to_air_heat_pump.name}, cannot find tot_cool_cap_coeff1, will not be set.")
136
- # successfully_set_all_properties = false
137
- # end
138
-
139
137
  # Preserve the original name
140
138
  orig_name = coil_cooling_water_to_air_heat_pump.name.to_s
141
139
 
@@ -133,12 +133,23 @@ class Standard
133
133
  # TABLE 6.8.1D
134
134
  # COP = pthp_cop_coeff_1 - (pthp_cop_coeff_2 * Cap / 1000)
135
135
  # Note c: Cap means the rated cooling capacity of the product in Btu/h.
136
- # If the unit's capacity is less than 7000 Btu/h, use 7000 Btu/h in the calculation.
137
- # If the unit's capacity is greater than 15,000 Btu/h, use 15,000 Btu/h in the calculation.
138
- capacity_btu_per_hr = 7000 if capacity_btu_per_hr < 7000
139
- capacity_btu_per_hr = 15_000 if capacity_btu_per_hr > 15_000
136
+
137
+ # If the unit's capacity is nil or less than 7000 Btu/h, use 7000 Btu/h in the calculation
138
+ # If the unit's capacity is greater than 15,000 Btu/h, use 15,000 Btu/h in the calculation
139
+ if capacity_btu_per_hr.nil?
140
+ capacity_btu_per_hr = 7000.0
141
+ capacity_kbtu_per_hr = capacity_btu_per_hr / 1000.0
142
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For PTHP units, 90.1 heating efficiency depends on paired cooling capacity. Cooling Capacity for #{coil_heating_dx_single_speed.name}: #{sub_category} is nil. This zone may not have heating. Using default equipment efficiency for a 7 kBtu/hr unit.")
143
+ elsif capacity_btu_per_hr < 7000
144
+ capacity_btu_per_hr = 7000.0
145
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For PTHP units, 90.1 heating efficiency depends on paired cooling capacity. Cooling Capacity for #{coil_heating_dx_single_speed.name}: #{sub_category} is #{capacity_btu_per_hr.round} Btu/hr, which is less than the typical minimum equipment size of 7 kBtu/hr. Using default equipment efficiency for a 7 kBtu/hr unit.")
146
+ elsif capacity_btu_per_hr > 15_000
147
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For PTHP units, 90.1 heating efficiency depends on paired cooling capacity. Cooling Capacity for #{coil_heating_dx_single_speed.name}: #{sub_category} is #{capacity_btu_per_hr.round} Btu/hr, which is more than the typical maximum equipment size of 15 kBtu/hr. Using default equipment efficiency for a 15 kBtu/hr unit.")
148
+ capacity_btu_per_hr = 15_000.0
149
+ end
150
+
140
151
  min_coph = pthp_cop_coeff_1 - (pthp_cop_coeff_2 * capacity_btu_per_hr / 1000.0)
141
- cop = cop_heating_to_cop_heating_no_fan(min_coph, OpenStudio.convert(capacity_kbtu_per_hr, 'kBtu/hr', 'W').get)
152
+ cop = cop_heating_to_cop_heating_no_fan(min_coph, OpenStudio.convert(capacity_btu_per_hr, 'Btu/hr', 'W').get)
142
153
  new_comp_name = "#{coil_heating_dx_single_speed.name} #{capacity_kbtu_per_hr.round} Clg kBtu/hr #{min_coph.round(1)}COPH"
143
154
  OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{coil_heating_dx_single_speed.name}: #{sub_category} Cooling Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; COPH = #{min_coph.round(2)}")
144
155
  end
@@ -443,7 +443,7 @@ class Standard
443
443
  next if plant_loop_swh_loop?(plant_loop)
444
444
 
445
445
  plant_loop_apply_prm_number_of_boilers(plant_loop)
446
- plant_loop_apply_prm_number_of_chillers(plant_loop, sizing_run_dir)
446
+ plant_loop_apply_prm_number_of_chillers(plant_loop)
447
447
  end
448
448
 
449
449
  # Set the baseline number of cooling towers
@@ -5504,7 +5504,7 @@ class Standard
5504
5504
  def model_does_require_wwr_adjustment?(wwr_limit, wwr_list)
5505
5505
  require_adjustment = false
5506
5506
  wwr_list.each do |wwr|
5507
- require_adjustment = true unless wwr > wwr_limit
5507
+ require_adjustment = true if wwr > wwr_limit
5508
5508
  end
5509
5509
  return require_adjustment
5510
5510
  end
@@ -94,9 +94,17 @@ class Standard
94
94
  end
95
95
  case stds_type
96
96
  when 'Metal Framing', 'Metal Framing with Thermal Break'
97
- stds_type = 'Metal framing (all other)'
97
+ if template == '90.1-2013'
98
+ stds_type = 'Metal framing, fixed'
99
+ else
100
+ stds_type = 'Metal framing (all other)'
101
+ end
98
102
  when 'Non-Metal Framing'
99
- stds_type = 'Nonmetal framing (all)'
103
+ if template == '90.1-2013'
104
+ stds_type = 'Nonmetal framing, all'
105
+ else
106
+ stds_type = 'Nonmetal framing (all)'
107
+ end
100
108
  when 'Any Vertical Glazing'
101
109
  stds_type = 'Any Vertical Glazing'
102
110
  else