openstudio-standards 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/data/standards/OpenStudio_Standards.xlsx +0 -0
  3. data/data/standards/OpenStudio_Standards_boilers.json +62 -4
  4. data/data/standards/OpenStudio_Standards_chillers.json +778 -68
  5. data/data/standards/OpenStudio_Standards_construction_sets.json +52 -93
  6. data/data/standards/OpenStudio_Standards_curve_biquadratics.json +36 -36
  7. data/data/standards/OpenStudio_Standards_curve_quadratics.json +3 -3
  8. data/data/standards/OpenStudio_Standards_heat_pumps.json +840 -0
  9. data/data/standards/OpenStudio_Standards_heat_pumps_heating.json +352 -0
  10. data/data/standards/OpenStudio_Standards_heat_rejection.json +48 -0
  11. data/data/standards/OpenStudio_Standards_motors.json +270 -0
  12. data/data/standards/OpenStudio_Standards_space_types.json +10390 -2824
  13. data/data/standards/OpenStudio_Standards_unitary_acs.json +794 -18
  14. data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.ddy +538 -0
  15. data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.epw +8768 -0
  16. data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.stat +493 -0
  17. data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.ddy +536 -0
  18. data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.epw +8768 -0
  19. data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.stat +554 -0
  20. data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.ddy +536 -0
  21. data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.epw +8768 -0
  22. data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.stat +554 -0
  23. data/data/weather/envelope_info.csv +6 -0
  24. data/lib/openstudio-standards.rb +10 -11
  25. data/lib/openstudio-standards/btap/compliance.rb +251 -969
  26. data/lib/openstudio-standards/btap/envelope.rb +1 -1
  27. data/lib/openstudio-standards/btap/fileio.rb +37 -5
  28. data/lib/openstudio-standards/btap/geometry.rb +27 -17
  29. data/lib/openstudio-standards/btap/hvac.rb +80 -27
  30. data/lib/openstudio-standards/hvac_sizing/{HVACSizing.CoilHeatingDXMultiSpeed.rb → Siz.CoilHeatingDXMultiSpeed.rb} +0 -0
  31. data/lib/openstudio-standards/hvac_sizing/Siz.ControllerOutdoorAir.rb +30 -4
  32. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerTwoSpeed.rb +61 -5
  33. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerVariableSpeed.rb +37 -7
  34. data/lib/openstudio-standards/hvac_sizing/Siz.DistrictCooling.rb +27 -0
  35. data/lib/openstudio-standards/hvac_sizing/Siz.DistrictHeating.rb +27 -0
  36. data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb +55 -0
  37. data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsVariableSpeed.rb +55 -0
  38. data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +51 -9
  39. data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +99 -17
  40. data/lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb +1 -1
  41. data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +29 -6
  42. data/lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb +16 -0
  43. data/lib/openstudio-standards/prototypes/Prototype.AirTerminalSingleDuctVAVReheat.rb +43 -48
  44. data/lib/openstudio-standards/prototypes/Prototype.ControllerWaterCoil.rb +5 -9
  45. data/lib/openstudio-standards/prototypes/Prototype.Fan.rb +68 -0
  46. data/lib/openstudio-standards/prototypes/Prototype.FanConstantVolume.rb +39 -43
  47. data/lib/openstudio-standards/prototypes/Prototype.FanOnOff.rb +49 -51
  48. data/lib/openstudio-standards/prototypes/Prototype.FanVariableVolume.rb +55 -61
  49. data/lib/openstudio-standards/prototypes/Prototype.FanZoneExhaust.rb +8 -10
  50. data/lib/openstudio-standards/prototypes/Prototype.HeatExchangerAirToAirSensibleAndLatent.rb +15 -20
  51. data/lib/openstudio-standards/prototypes/Prototype.Model.hvac.rb +330 -322
  52. data/lib/openstudio-standards/prototypes/Prototype.Model.rb +501 -446
  53. data/lib/openstudio-standards/prototypes/Prototype.Model.swh.rb +221 -230
  54. data/lib/openstudio-standards/prototypes/Prototype.add_objects.rb +0 -2
  55. data/lib/openstudio-standards/prototypes/Prototype.full_service_restaurant.rb +130 -137
  56. data/lib/openstudio-standards/prototypes/Prototype.high_rise_apartment.rb +374 -291
  57. data/lib/openstudio-standards/prototypes/Prototype.hospital.rb +146 -193
  58. data/lib/openstudio-standards/prototypes/Prototype.hvac_systems.rb +1315 -1113
  59. data/lib/openstudio-standards/prototypes/Prototype.large_hotel.rb +65 -88
  60. data/lib/openstudio-standards/prototypes/Prototype.large_office.rb +101 -156
  61. data/lib/openstudio-standards/prototypes/Prototype.medium_office.rb +46 -96
  62. data/lib/openstudio-standards/prototypes/Prototype.mid_rise_apartment.rb +113 -123
  63. data/lib/openstudio-standards/prototypes/Prototype.outpatient.rb +356 -345
  64. data/lib/openstudio-standards/prototypes/Prototype.primary_school.rb +48 -103
  65. data/lib/openstudio-standards/prototypes/Prototype.quick_service_restaurant.rb +115 -123
  66. data/lib/openstudio-standards/prototypes/Prototype.retail_standalone.rb +30 -39
  67. data/lib/openstudio-standards/prototypes/Prototype.retail_stripmall.rb +32 -45
  68. data/lib/openstudio-standards/prototypes/Prototype.secondary_school.rb +98 -258
  69. data/lib/openstudio-standards/prototypes/Prototype.small_hotel.rb +429 -474
  70. data/lib/openstudio-standards/prototypes/Prototype.small_office.rb +28 -36
  71. data/lib/openstudio-standards/prototypes/Prototype.strip_model.rb +7 -7
  72. data/lib/openstudio-standards/prototypes/Prototype.utilities.rb +172 -146
  73. data/lib/openstudio-standards/prototypes/Prototype.warehouse.rb +46 -53
  74. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +885 -707
  75. data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctParallelPIUReheat.rb +48 -57
  76. data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +24 -31
  77. data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +80 -93
  78. data/lib/openstudio-standards/standards/Standards.BuildingStory.rb +69 -0
  79. data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +60 -72
  80. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +104 -108
  81. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +190 -198
  82. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +134 -146
  83. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +56 -60
  84. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +151 -161
  85. data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +30 -34
  86. data/lib/openstudio-standards/standards/Standards.Construction.rb +116 -132
  87. data/lib/openstudio-standards/standards/Standards.CoolingTower.rb +138 -0
  88. data/lib/openstudio-standards/standards/Standards.CoolingTowerSingleSpeed.rb +11 -0
  89. data/lib/openstudio-standards/standards/Standards.CoolingTowerTwoSpeed.rb +11 -0
  90. data/lib/openstudio-standards/standards/Standards.CoolingTowerVariableSpeed.rb +16 -0
  91. data/lib/openstudio-standards/standards/Standards.Fan.rb +190 -236
  92. data/lib/openstudio-standards/standards/Standards.FanConstantVolume.rb +0 -2
  93. data/lib/openstudio-standards/standards/Standards.FanOnOff.rb +0 -2
  94. data/lib/openstudio-standards/standards/Standards.FanVariableVolume.rb +168 -14
  95. data/lib/openstudio-standards/standards/Standards.FanZoneExhaust.rb +0 -2
  96. data/lib/openstudio-standards/standards/Standards.HeaderedPumpsConstantSpeed.rb +33 -0
  97. data/lib/openstudio-standards/standards/Standards.HeaderedPumpsVariableSpeed.rb +83 -0
  98. data/lib/openstudio-standards/standards/Standards.HeatExchangerSensLat.rb +22 -0
  99. data/lib/openstudio-standards/standards/Standards.Model.rb +2385 -1622
  100. data/lib/openstudio-standards/standards/Standards.PlanarSurface.rb +83 -35
  101. data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +805 -395
  102. data/lib/openstudio-standards/standards/Standards.Pump.rb +139 -119
  103. data/lib/openstudio-standards/standards/Standards.PumpConstantSpeed.rb +0 -2
  104. data/lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb +16 -15
  105. data/lib/openstudio-standards/standards/Standards.ScheduleCompact.rb +35 -0
  106. data/lib/openstudio-standards/standards/Standards.ScheduleConstant.rb +7 -13
  107. data/lib/openstudio-standards/standards/Standards.ScheduleRuleset.rb +144 -59
  108. data/lib/openstudio-standards/standards/Standards.Space.rb +1509 -1326
  109. data/lib/openstudio-standards/standards/Standards.SpaceType.rb +254 -262
  110. data/lib/openstudio-standards/standards/Standards.SubSurface.rb +105 -105
  111. data/lib/openstudio-standards/standards/Standards.Surface.rb +27 -31
  112. data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +882 -157
  113. data/lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb +179 -69
  114. data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +75 -0
  115. data/lib/openstudio-standards/utilities/logging.rb +31 -38
  116. data/lib/openstudio-standards/utilities/simulation.rb +118 -82
  117. data/lib/openstudio-standards/version.rb +1 -1
  118. data/lib/openstudio-standards/weather/Weather.Model.rb +382 -390
  119. data/lib/openstudio-standards/weather/Weather.stat_file.rb +159 -78
  120. metadata +59 -6
@@ -1,85 +1,77 @@
1
1
 
2
2
  # Extend the class to add Small Office specific stuff
3
3
  class OpenStudio::Model::Model
4
-
5
- def define_space_type_map(building_type, building_vintage, climate_zone)
4
+ def define_space_type_map(building_type, template, climate_zone)
6
5
  space_type_map = nil
7
-
8
- case building_vintage
9
- when 'NECB 2011'
10
- space_type_map ={
11
- "- undefined -" => ["Attic"],
12
- "Office - enclosed" => ["Core_ZN", "Perimeter_ZN_1", "Perimeter_ZN_2", "Perimeter_ZN_3", "Perimeter_ZN_4"]
13
- }
14
- else
15
- space_type_map = {
16
- 'WholeBuilding - Sm Office' => ['Perimeter_ZN_1', 'Perimeter_ZN_2', 'Perimeter_ZN_3', 'Perimeter_ZN_4', 'Core_ZN'],
17
- 'Attic' => ['Attic']
18
- }
19
- end
20
- return space_type_map
21
6
 
7
+ space_type_map = case template
8
+ when 'NECB 2011'
9
+ # dom = ?
10
+ {
11
+ '- undefined -' => ['Attic'],
12
+ 'Office - enclosed' => ['Core_ZN', 'Perimeter_ZN_1', 'Perimeter_ZN_2', 'Perimeter_ZN_3', 'Perimeter_ZN_4']
13
+ }
14
+ else
15
+ {
16
+ 'WholeBuilding - Sm Office' => ['Perimeter_ZN_1', 'Perimeter_ZN_2', 'Perimeter_ZN_3', 'Perimeter_ZN_4', 'Core_ZN'],
17
+ 'Attic' => ['Attic']
18
+ }
19
+ end
20
+ return space_type_map
22
21
  end
23
22
 
24
- def define_hvac_system_map(building_type, building_vintage, climate_zone)
25
-
23
+ def define_hvac_system_map(building_type, template, climate_zone)
26
24
  system_to_space_map = [
27
25
  {
28
26
  'type' => 'PSZ-AC',
29
27
  'name' => 'PSZ-AC-2',
30
28
  'space_names' =>
31
29
  [
32
- 'Perimeter_ZN_1'
33
- ]
30
+ 'Perimeter_ZN_1'
31
+ ]
34
32
  },
35
33
  {
36
34
  'type' => 'PSZ-AC',
37
35
  'name' => 'PSZ-AC-3',
38
36
  'space_names' =>
39
37
  [
40
- 'Perimeter_ZN_2'
41
- ]
38
+ 'Perimeter_ZN_2'
39
+ ]
42
40
  },
43
41
  {
44
42
  'type' => 'PSZ-AC',
45
43
  'name' => 'PSZ-AC-4',
46
44
  'space_names' =>
47
45
  [
48
- 'Perimeter_ZN_3'
49
- ]
46
+ 'Perimeter_ZN_3'
47
+ ]
50
48
  },
51
49
  {
52
50
  'type' => 'PSZ-AC',
53
51
  'name' => 'PSZ-AC-5',
54
52
  'space_names' =>
55
53
  [
56
- 'Perimeter_ZN_4'
57
- ]
54
+ 'Perimeter_ZN_4'
55
+ ]
58
56
  },
59
57
  {
60
58
  'type' => 'PSZ-AC',
61
59
  'name' => 'PSZ-AC-1',
62
60
  'space_names' =>
63
61
  [
64
- 'Core_ZN'
65
- ]
62
+ 'Core_ZN'
63
+ ]
66
64
  }
67
65
  ]
68
66
 
69
67
  return system_to_space_map
70
-
71
68
  end
72
69
 
73
- def custom_hvac_tweaks(building_type, building_vintage, climate_zone, prototype_input)
74
-
70
+ def custom_hvac_tweaks(building_type, template, climate_zone, prototype_input)
75
71
  return true
76
-
77
72
  end
78
73
 
79
- def custom_swh_tweaks(building_type, building_vintage, climate_zone, prototype_input)
80
-
74
+ def custom_swh_tweaks(building_type, template, climate_zone, prototype_input)
81
75
  return true
82
-
83
76
  end
84
-
85
77
  end
@@ -1,18 +1,18 @@
1
1
  require 'openstudio'
2
2
  require_relative 'Prototype.utilities'
3
3
 
4
- full_filename = "2004.osm"
4
+ full_filename = '2004.osm'
5
5
 
6
6
  if full_filename && (File.file?(full_filename) || File.file?(File.join(Dir.pwd, full_filename)))
7
- model = safe_load_model(full_filename)
7
+ model = safe_load_model(full_filename)
8
8
 
9
- model = strip_model(model)
9
+ model = strip_model(model)
10
10
 
11
- new_path = OpenStudio::Path.new("#{Dir.pwd}/stripped_model.osm")
11
+ new_path = OpenStudio::Path.new("#{Dir.pwd}/stripped_model.osm")
12
12
 
13
- model.save(new_path, true)
13
+ model.save(new_path, true)
14
14
 
15
- puts "Stripped model was saved to #{new_path}"
15
+ puts "Stripped model was saved to #{new_path}"
16
16
  else
17
- puts "Pass a valid file path to this script"
17
+ puts 'Pass a valid file path to this script'
18
18
  end
@@ -1,195 +1,217 @@
1
1
 
2
- #load a model into OS & version translates, exiting and erroring if a problem is found
3
- def safe_load_model(model_path_string)
2
+ # load a model into OS & version translates, exiting and erroring if a problem is found
3
+ def safe_load_model(model_path_string)
4
4
  model_path = OpenStudio::Path.new(model_path_string)
5
- if OpenStudio::exists(model_path)
6
- versionTranslator = OpenStudio::OSVersion::VersionTranslator.new
7
- model = versionTranslator.loadModel(model_path)
5
+ if OpenStudio.exists(model_path)
6
+ version_translator = OpenStudio::OSVersion::VersionTranslator.new
7
+ model = version_translator.loadModel(model_path)
8
8
  if model.empty?
9
- OpenStudio::logFree(OpenStudio::Error, 'openstudio.model.Model', "Version translation failed for #{model_path_string}")
9
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "Version translation failed for #{model_path_string}")
10
10
  return false
11
11
  else
12
12
  model = model.get
13
13
  end
14
14
  else
15
- OpenStudio::logFree(OpenStudio::Error, 'openstudio.model.Model', "#{model_path_string} couldn't be found")
15
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "#{model_path_string} couldn't be found")
16
16
  return false
17
17
  end
18
18
  return model
19
19
  end
20
20
 
21
- #load a sql file, exiting and erroring if a problem is found
21
+ # load a sql file, exiting and erroring if a problem is found
22
22
  def safe_load_sql(sql_path_string)
23
23
  sql_path = OpenStudio::Path.new(sql_path_string)
24
- if OpenStudio::exists(sql_path)
24
+ if OpenStudio.exists(sql_path)
25
25
  sql = OpenStudio::SqlFile.new(sql_path)
26
26
  else
27
- OpenStudio::logFree(OpenStudio::Error, 'openstudio.model.Model', "#{sql_path} couldn't be found")
27
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "#{sql_path} couldn't be found")
28
28
  return false
29
29
  end
30
30
  return sql
31
31
  end
32
32
 
33
33
  def strip_model(model)
34
+ # remove all materials
35
+ model.getMaterials.each(&:remove)
34
36
 
37
+ # remove all constructions
38
+ model.getConstructions.each(&:remove)
35
39
 
36
- #remove all materials
37
- model.getMaterials.each do |mat|
38
- mat.remove
39
- end
40
-
41
- #remove all constructions
42
- model.getConstructions.each do |constr|
43
- constr.remove
44
- end
40
+ # remove performance curves
41
+ model.getCurves.each(&:remove)
45
42
 
46
- #remove performance curves
47
- model.getCurves.each do |curve|
48
- curve.remove
49
- end
50
-
51
- #remove all zone equipment
43
+ # remove all zone equipment
52
44
  model.getThermalZones.each do |zone|
53
- zone.equipment.each do |equip|
54
- equip.remove
55
- end
56
- end
57
-
58
- #remove all thermostats
59
- model.getThermostatSetpointDualSetpoints.each do |tstat|
60
- tstat.remove
45
+ zone.equipment.each(&:remove)
61
46
  end
62
47
 
63
- #remove all people
64
- model.getPeoples.each do |people|
65
- people.remove
66
- end
67
- model.getPeopleDefinitions.each do |people_def|
68
- people_def.remove
69
- end
48
+ # remove all thermostats
49
+ model.getThermostatSetpointDualSetpoints.each(&:remove)
70
50
 
71
- #remove all lights
72
- model.getLightss.each do |lights|
73
- lights.remove
74
- end
75
- model.getLightsDefinitions.each do |lights_def|
76
- lights_def.remove
77
- end
51
+ # remove all people
52
+ model.getPeoples.each(&:remove)
53
+ model.getPeopleDefinitions.each(&:remove)
78
54
 
79
- #remove all electric equipment
80
- model.getElectricEquipments.each do |equip|
81
- equip.remove
82
- end
83
- model.getElectricEquipmentDefinitions.each do |equip_def|
84
- equip_def.remove
85
- end
55
+ # remove all lights
56
+ model.getLightss.each(&:remove)
57
+ model.getLightsDefinitions.each(&:remove)
86
58
 
87
- #remove all gas equipment
88
- model.getGasEquipments.each do |equip|
89
- equip.remove
90
- end
91
- model.getGasEquipmentDefinitions.each do |equip_def|
92
- equip_def.remove
93
- end
59
+ # remove all electric equipment
60
+ model.getElectricEquipments.each(&:remove)
61
+ model.getElectricEquipmentDefinitions.each(&:remove)
94
62
 
95
- #remove all outdoor air
96
- model.getDesignSpecificationOutdoorAirs.each do |oa_spec|
97
- oa_spec.remove
98
- end
63
+ # remove all gas equipment
64
+ model.getGasEquipments.each(&:remove)
65
+ model.getGasEquipmentDefinitions.each(&:remove)
99
66
 
100
- #remove all infiltration
101
- model.getSpaceInfiltrationDesignFlowRates.each do |infil|
102
- infil.remove
103
- end
67
+ # remove all outdoor air
68
+ model.getDesignSpecificationOutdoorAirs.each(&:remove)
69
+
70
+ # remove all infiltration
71
+ model.getSpaceInfiltrationDesignFlowRates.each(&:remove)
104
72
 
105
73
  # Remove all internal mass
106
- model.getInternalMasss.each do |tm|
107
- tm.remove
108
- end
74
+ model.getInternalMasss.each(&:remove)
109
75
 
110
76
  # Remove all internal mass defs
111
- model.getInternalMassDefinitions.each do |tmd|
112
- tmd.remove
113
- end
114
-
77
+ model.getInternalMassDefinitions.each(&:remove)
78
+
115
79
  # Remove all thermal zones
116
- model.getThermalZones.each do |zone|
117
- zone.remove
118
- end
119
-
80
+ model.getThermalZones.each(&:remove)
81
+
120
82
  # Remove all schedules
121
- model.getSchedules.each do |sch|
122
- sch.remove
123
- end
124
-
83
+ model.getSchedules.each(&:remove)
84
+
125
85
  # Remove all schedule type limits
126
- model.getScheduleTypeLimitss.each do |typ_lim|
127
- typ_lim.remove
128
- end
129
-
86
+ model.getScheduleTypeLimitss.each(&:remove)
87
+
130
88
  # Remove the sizing parameters
131
89
  model.getSizingParameters.remove
132
-
90
+
133
91
  # Remove the design days
134
- model.getDesignDays.each do |dd|
135
- dd.remove
136
- end
92
+ model.getDesignDays.each(&:remove)
137
93
 
138
94
  # Remove the rendering colors
139
- model.getRenderingColors.each do |rc|
140
- rc.remove
141
- end
142
-
95
+ model.getRenderingColors.each(&:remove)
96
+
143
97
  # Remove the daylight controls
144
- model.getDaylightingControls.each do |dc|
145
- dc.remove
146
- end
147
-
98
+ model.getDaylightingControls.each(&:remove)
99
+
148
100
  return model
101
+ end
149
102
 
103
+ # Convert from SEER to COP (no fan) for cooling coils
104
+ # per the method specified in 90.1-2013 Appendix G
105
+ #
106
+ # @param seer [Double] seasonal energy efficiency ratio (SEER)
107
+ # @return [Double] Coefficient of Performance (COP)
108
+ def seer_to_cop_cooling_no_fan(seer)
109
+ cop = -0.0076 * seer * seer + 0.3796 * seer
150
110
 
111
+ return cop
151
112
  end
152
113
 
153
- # Convert from SEER to COP
154
- # per the method specified in "Achieving the 30% Goal: Energy
155
- # and cost savings analysis of ASHRAE Standard 90.1-2010
156
- # Thornton, et al 2011
114
+ # Convert from COP_H to COP (no fan) for heat pump heating coils
115
+ # per the method specified in 90.1-2013 Appendix G
157
116
  #
158
- # @param seer [Double] seasonal energy efficiency ratio (SEER)
117
+ # @param coph47 [Double] coefficient of performance at 47F Tdb, 42F Twb
118
+ # @param capacity_w [Double] the heating capacity at AHRI rating conditions, in W
159
119
  # @return [Double] Coefficient of Performance (COP)
160
- def seer_to_cop(seer)
161
-
162
- cop = nil
120
+ def cop_heating_to_cop_heating_no_fan(coph47, capacity_w)
121
+ # Convert the capacity to Btu/hr
122
+ capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
123
+
124
+ cop = 1.48E-7 * coph47 * capacity_btu_per_hr + 1.062 * coph47
163
125
 
164
- # First convert from SEER to EER
165
- eer = (-0.0182 * seer * seer) + (1.1088 * seer)
166
-
167
- # Next convert EER to COP
168
- cop = eer_to_cop(eer)
169
-
170
126
  return cop
171
-
172
127
  end
173
128
 
174
- # Convert from EER to COP
175
- # per the method specified in "Achieving the 30% Goal: Energy
129
+ # Convert from HSPF to COP (no fan) for heat pump heating coils
130
+ # per the method specified in 90.1-2013 Appendix G
131
+ #
132
+ # @param hspf [Double] heating seasonal performance factor (HSPF)
133
+ # @return [Double] Coefficient of Performance (COP)
134
+ def hspf_to_cop_heating_no_fan(hspf)
135
+ cop = -0.0296 * hspf * hspf + 0.7134 * hspf
136
+
137
+ return cop
138
+ end
139
+
140
+ # Convert from COP to SEER
141
+ # per the method specified in "Achieving the 30% Goal: Energy
176
142
  # and cost savings analysis of ASHRAE Standard 90.1-2010
177
143
  # Thornton, et al 2011
178
144
  #
145
+ # @param [Double] COP
146
+ # @return [Double] Seasonal Energy Efficiency Ratio
147
+ def cop_to_seer(cop)
148
+ seer = nil
149
+
150
+ # First convert COP to EER
151
+ eer = cop_to_eer(cop)
152
+
153
+ # Next convert from EER to SEER
154
+ delta = 1.1088**2 - 4.0 * 0.0182 * eer
155
+ seer = (-delta**0.5 + 1.1088) / (2.0 * 0.0182)
156
+
157
+ return seer
158
+ end
159
+
160
+ # Convert from EER to COP
161
+ # If capacity is not supplied, use the method specified
162
+ # in "Achieving the 30% Goal: Energy and cost savings
163
+ # analysis of ASHRAE Standard 90.1-2010
164
+ # Thornton, et al 2011.
165
+ # If capacity is supplied, use the method specified in
166
+ # 90.1-2013.
167
+ #
179
168
  # @param eer [Double] Energy Efficiency Ratio (EER)
169
+ # @param capacity_w [Double] the heating capacity at AHRI rating conditions, in W
180
170
  # @return [Double] Coefficient of Performance (COP)
181
- def eer_to_cop(eer)
182
-
171
+ def eer_to_cop(eer, capacity_w = nil)
183
172
  cop = nil
184
173
 
174
+ if capacity_w.nil?
175
+
176
+ # The PNNL Method.
177
+
178
+ # r is the ratio of supply fan power to total equipment power at the rating condition,
179
+ # assumed to be 0.12 for the reference buildngs per PNNL.
180
+ r = 0.12
181
+
182
+ cop = (eer / 3.413 + r) / (1 - r)
183
+
184
+ else
185
+
186
+ # The 90.1-2013 method
187
+
188
+ # Convert the capacity to Btu/hr
189
+ capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
190
+
191
+ cop = 7.84E-8 * eer * capacity_btu_per_hr + 0.338 * eer
192
+
193
+ end
194
+
195
+ return cop
196
+ end
197
+
198
+ # Convert from COP to EER
199
+ # per the method specified in "Achieving the 30% Goal: Energy
200
+ # and cost savings analysis of ASHRAE Standard 90.1-2010
201
+ # Thornton, et al 2011
202
+ #
203
+ # @param [Double] COP
204
+ # @return [Double] Energy Efficiency Ratio (EER)
205
+ def cop_to_eer(cop)
206
+ eer = nil
207
+
185
208
  # r is the ratio of supply fan power to total equipment power at the rating condition,
186
209
  # assumed to be 0.12 for the reference buildngs per PNNL.
187
210
  r = 0.12
188
-
189
- cop = (eer/3.413 + r)/(1-r)
190
-
191
- return cop
192
-
211
+
212
+ eer = 3.413 * (cop * (1 - r) - r)
213
+
214
+ return eer
193
215
  end
194
216
 
195
217
  # Convert from COP to kW/ton
@@ -197,9 +219,7 @@ end
197
219
  # @param cop [Double] Coefficient of Performance (COP)
198
220
  # @return [Double] kW of input power per ton of cooling
199
221
  def cop_to_kw_per_ton(cop)
200
-
201
- return 3.517/cop
202
-
222
+ return 3.517 / cop
203
223
  end
204
224
 
205
225
  # A helper method to convert from kW/ton to COP
@@ -207,9 +227,7 @@ end
207
227
  # @param kw_per_ton [Double] kW of input power per ton of cooling
208
228
  # @return [Double] Coefficient of Performance (COP)
209
229
  def kw_per_ton_to_cop(kw_per_ton)
210
-
211
- return 3.517/kw_per_ton
212
-
230
+ return 3.517 / kw_per_ton
213
231
  end
214
232
 
215
233
  # A helper method to convert from AFUE to thermal efficiency
@@ -217,9 +235,15 @@ end
217
235
  # @param afue [Double] Annual Fuel Utilization Efficiency
218
236
  # @return [Double] Thermal efficiency (%)
219
237
  def afue_to_thermal_eff(afue)
220
-
221
238
  return afue # Per PNNL doc, Boiler Addendum 90.1-04an
222
-
239
+ end
240
+
241
+ # A helper method to convert from thermal efficiency to AFUE
242
+ #
243
+ # @param teff [Double] Thermal Efficiency
244
+ # @return [Double] AFUE
245
+ def thermal_eff_to_afue(teff)
246
+ return teff # Per PNNL doc, Boiler Addendum 90.1-04an
223
247
  end
224
248
 
225
249
  # A helper method to convert from combustion efficiency to thermal efficiency
@@ -227,9 +251,15 @@ end
227
251
  # @param combustion_eff [Double] Combustion efficiency (%)
228
252
  # @return [Double] Thermal efficiency (%)
229
253
  def combustion_eff_to_thermal_eff(combustion_eff)
230
-
231
254
  return combustion_eff - 0.007 # Per PNNL doc, Boiler Addendum 90.1-04an
232
-
255
+ end
256
+
257
+ # A helper method to convert from thermal efficiency to combustion efficiency
258
+ #
259
+ # @param combustion_eff [Double] Thermal efficiency
260
+ # @return [Double] Thermal efficiency
261
+ def thermal_eff_to_comb_eff(teff)
262
+ return teff + 0.007 # Per PNNL doc, Boiler Addendum 90.1-04an
233
263
  end
234
264
 
235
265
  # Convert one infiltration rate at a given pressure
@@ -242,21 +272,18 @@ end
242
272
  # @param final_pressure_pa [Double] desired pressure rise to adjust infiltration rate to in Pa
243
273
  # @param infiltration_coefficient [Double] infiltration coeffiecient
244
274
  def adjust_infiltration_to_lower_pressure(initial_infiltration_rate_m3_per_s, intial_pressure_pa, final_pressure_pa, infiltration_coefficient = 0.65)
245
-
246
- adjusted_infiltration_rate_m3_per_s = initial_infiltration_rate_m3_per_s * (final_pressure_pa/intial_pressure_pa)**infiltration_coefficient
275
+ adjusted_infiltration_rate_m3_per_s = initial_infiltration_rate_m3_per_s * (final_pressure_pa / intial_pressure_pa)**infiltration_coefficient
247
276
 
248
277
  return adjusted_infiltration_rate_m3_per_s
249
-
250
- end
278
+ end
251
279
 
252
280
  # Convert the infiltration rate at a 75 Pa
253
281
  # to an infiltration rate at the typical value for the prototype buildings
254
282
  # per method described here: http://www.taskair.net/knowledge/Infiltration%20Modeling%20Guidelines%20for%20Commercial%20Building%20Energy%20Analysis.pdf
255
283
  #
256
284
  # @param initial_infiltration_rate_m3_per_s [Double] initial infiltration rate in m^3/s
257
- # @return [Double]
285
+ # @return [Double]
258
286
  def adjust_infiltration_to_prototype_building_conditions(initial_infiltration_rate_m3_per_s)
259
-
260
287
  # Details of these coefficients can be found in paper
261
288
  alpha = 0.22 # unitless - terrain adjustment factor
262
289
  intial_pressure_pa = 75.0 # 75 Pa
@@ -264,14 +291,13 @@ def adjust_infiltration_to_prototype_building_conditions(initial_infiltration_ra
264
291
  rho = 1.18 # kg/m^3 - air density
265
292
  cs = 0.1617 # unitless - positive surface pressure coefficient
266
293
  n = 0.65 # unitless - infiltration coefficient
267
-
294
+
268
295
  # Calculate the typical pressure - same for all building types
269
296
  final_pressure_pa = 0.5 * cs * rho * uh**2
270
-
271
- #OpenStudio::logFree(OpenStudio::Debug, "openstudio.Standards.Space", "Final pressure PA = #{final_pressure_pa.round(3)} Pa.")
272
297
 
273
- adjusted_infiltration_rate_m3_per_s = (1.0 + alpha) * initial_infiltration_rate_m3_per_s * (final_pressure_pa/intial_pressure_pa)**n
298
+ # OpenStudio::logFree(OpenStudio::Debug, "openstudio.Standards.Space", "Final pressure PA = #{final_pressure_pa.round(3)} Pa.")
274
299
 
275
- return adjusted_infiltration_rate_m3_per_s
300
+ adjusted_infiltration_rate_m3_per_s = (1.0 + alpha) * initial_infiltration_rate_m3_per_s * (final_pressure_pa / intial_pressure_pa)**n
276
301
 
277
- end
302
+ return adjusted_infiltration_rate_m3_per_s
303
+ end