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,71 +1,62 @@
1
1
 
2
2
  # open the class to add methods to apply HVAC efficiency standards
3
3
  class OpenStudio::Model::AirTerminalSingleDuctParallelPIUReheat
4
-
5
4
  # Sets the fan power of a PIU fan based on the W/cfm
6
5
  # specified in the standard.
7
6
  #
8
- # @param template [String] the standard
7
+ # @param template [String] the template base requirements on
9
8
  # @return [Bool] returns true if successful, false if not
10
- def set_performance_rating_method_baseline_fan_power(template)
9
+ def apply_prm_baseline_fan_power(template)
10
+ OpenStudio.logFree(OpenStudio::Debug, 'openstudio.model.AirTerminalSingleDuctParallelPIUReheat', "Setting PIU fan power for #{name}.")
11
+
12
+ # Determine the fan sizing flow rate, min flow rate,
13
+ # and W/cfm
14
+ sec_flow_frac = 0.5
15
+ min_flow_frac = 0.3
16
+ fan_efficacy_w_per_cfm = 0.35
17
+
18
+ # Convert efficacy to metric
19
+ # 1 cfm = 0.0004719 m^3/s
20
+ fan_efficacy_w_per_m3_per_s = fan_efficacy_w_per_cfm / 0.0004719
21
+
22
+ # Get the maximum flow rate through the terminal
23
+ max_primary_air_flow_rate = nil
24
+ if autosizedMaximumPrimaryAirFlowRate.is_initialized
25
+ max_primary_air_flow_rate = autosizedMaximumPrimaryAirFlowRate.get
26
+ elsif maximumPrimaryAirFlowRate.is_initialized
27
+ max_primary_air_flow_rate = maximumPrimaryAirFlowRate.get
28
+ end
11
29
 
12
- OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.AirTerminalSingleDuctParallelPIUReheat', "Setting PIU fan power for #{self.name}.")
13
-
14
- # Determine the fan sizing flow rate, min flow rate,
15
- # and W/cfm
16
- sec_flow_frac = 0.5
17
- min_flow_frac = 0.3
18
- fan_efficacy_w_per_cfm = 0.35
19
- # case template
20
- # when
21
- # else
22
- # end
23
-
24
- # Get the maximum flow rate through the terminal
25
- max_primary_air_flow_rate = nil
26
- if self.autosizedMaximumPrimaryAirFlowRate.is_initialized
27
- max_primary_air_flow_rate = self.autosizedMaximumPrimaryAirFlowRate.get
28
- elsif self.maximumPrimaryAirFlowRate.is_initialized
29
- max_primary_air_flow_rate = self.maximumPrimaryAirFlowRate.get
30
- end
31
-
32
- # Set the max secondary air flow rate
33
- max_sec_flow_rate_m3_per_s = max_primary_air_flow_rate * sec_flow_frac
34
- self.setMaximumSecondaryAirFlowRate(max_sec_flow_rate_m3_per_s)
35
-
36
- # Set the minimum flow fraction
37
- #TODO Also compare to min OA requirement
38
- self.setMinimumPrimaryAirFlowFraction(min_flow_frac)
39
-
40
- # Set the fan efficacy
41
- fan = self.fan.to_FanConstantVolume.get
42
- fan_rise_pa = fan.pressureRise
43
- fan_rise_in_wc = OpenStudio.convert(fan_rise_pa, "Pa", "inH_{2}O")
44
- OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.AirTerminalSingleDuctParallelPIUReheat', "=> Pressure Rise = #{fan_rise_pa} Pa")
30
+ # Set the max secondary air flow rate
31
+ max_sec_flow_rate_m3_per_s = max_primary_air_flow_rate * sec_flow_frac
32
+ setMaximumSecondaryAirFlowRate(max_sec_flow_rate_m3_per_s)
33
+ max_sec_flow_rate_cfm = OpenStudio.convert(max_sec_flow_rate_m3_per_s, 'm^3/s', 'ft^3/min').get
45
34
 
46
- max_sec_flow_rate_cfm = OpenStudio.convert(max_sec_flow_rate_m3_per_s, "m^3/s", "ft^3/min").get
47
- OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.AirTerminalSingleDuctParallelPIUReheat', "=> Maximum Fan Flow Rate = #{max_sec_flow_rate_cfm} m3/s")
48
- OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.AirTerminalSingleDuctParallelPIUReheat', "=> Maximum Secondary Air Flow Rate = #{self.maximumSecondaryAirFlowRate.get} m3/s")
49
-
50
- fan_efficiency = fan.fanEfficiency
51
- OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.AirTerminalSingleDuctParallelPIUReheat', "=> Fan Total Efficiency = #{fan_efficiency}")
35
+ # Set the minimum flow fraction
36
+ # TODO Also compare to min OA requirement
37
+ setMinimumPrimaryAirFlowFraction(min_flow_frac)
52
38
 
53
- fan_power_w = fan_rise_pa * max_sec_flow_rate_m3_per_s / fan_efficiency
54
- fan_efficacy_calc = fan_power_w / max_sec_flow_rate_m3_per_s
55
- OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.AirTerminalSingleDuctParallelPIUReheat', "=> fan efficacy calculated = #{fan_efficacy_calc} W-s/m3")
39
+ # Get the fan
40
+ fan = self.fan.to_FanConstantVolume.get
56
41
 
57
- fan_efficacy_w_per_m3_per_s = fan_efficacy_w_per_cfm * OpenStudio.convert(1, 'm^3/s', 'cfm').get
42
+ # Set the impeller efficiency
43
+ fan.change_impeller_efficiency(fan.baseline_impeller_efficiency(template))
58
44
 
59
- fan_rise_new_pa = fan_efficacy_w_per_m3_per_s * fan_efficiency
60
- OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.AirTerminalSingleDuctParallelPIUReheat', "=> fan pressure rise new = #{fan_rise_new_pa} Pa")
61
- fan.setPressureRise(fan_rise_new_pa)
62
- fan_power_new_w = fan_rise_new_pa * max_sec_flow_rate_cfm / fan_efficiency
63
- fan_efficacy_new_w_per_cfm = fan_power_new_w / max_sec_flow_rate_cfm
64
-
65
- OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.AirTerminalSingleDuctParallelPIUReheat', "For #{self.name}: fan efficacy set to #{fan_efficacy_new_w_per_cfm.round(2)} W/cfm, fan bhp = #{fan.brakeHorsepower} hp, motor efficiency = #{fan.motorEfficiency}.")
66
-
67
- return true
68
-
69
- end
45
+ # Set the motor efficiency, preserving the impeller efficency.
46
+ # For terminal fans, a bhp lookup of 0.5bhp is always used because
47
+ # they are assumed to represent a series of small fans in reality.
48
+ fan.apply_standard_minimum_motor_efficiency(template, fan.brake_horsepower)
49
+
50
+ # Calculate a new pressure rise to hit the target W/cfm
51
+ fan_tot_eff = fan.fanEfficiency
52
+ fan_rise_new_pa = fan_efficacy_w_per_m3_per_s * fan_tot_eff
53
+ fan.setPressureRise(fan_rise_new_pa)
54
+
55
+ # Calculate the newly set efficacy
56
+ fan_power_new_w = fan_rise_new_pa * max_sec_flow_rate_m3_per_s / fan_tot_eff
57
+ fan_efficacy_new_w_per_cfm = fan_power_new_w / max_sec_flow_rate_cfm
58
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.AirTerminalSingleDuctParallelPIUReheat', "For #{name}: fan efficacy set to #{fan_efficacy_new_w_per_cfm.round(2)} W/cfm.")
70
59
 
60
+ return true
61
+ end
71
62
  end
@@ -1,50 +1,43 @@
1
1
 
2
2
  class OpenStudio::Model::AirTerminalSingleDuctVAVReheat
3
-
4
3
  # Set the minimum damper position based on OA
5
- # rate of the space and the building vintage.
6
- # Zones with low OA per area get lower initial guesses.
4
+ # rate of the space and the template.
5
+ # Zones with low OA per area get lower initial guesses.
7
6
  # Final position will be adjusted upward
8
7
  # as necessary by Standards.AirLoopHVAC.adjust_minimum_vav_damper_positions
9
- # @param building_vintage [String] the building vintage
10
- # @param zone_oa_per_area [Double] the zone outdoor air per area, m^3/s
11
- # @param has_ddc [Bool] whether or not there is DDC control of the VAV terminal
8
+ # @param template [String] the template
9
+ # @param zone_min_oa [Double] the zone outdoor air flow rate, in m^3/s.
10
+ # If supplied, this will be set as a minimum limit in addition to the minimum
11
+ # damper position. EnergyPlus will use the larger of the two values during sizing.
12
+ # @param has_ddc [Bool] whether or not there is DDC control of the VAV terminal,
13
+ # which impacts the minimum damper position requirement.
12
14
  # @return [Bool] returns true if successful, false if not
13
15
  # @todo remove exception where older vintages don't have minimum positions adjusted.
14
- def set_minimum_damper_position(building_vintage, zone_oa_per_area, has_ddc = true)
15
-
16
- # Minimum damper position is based on prototype
17
- # assumptions, which are not clearly documented.
16
+ def apply_minimum_damper_position(template, zone_min_oa = nil, has_ddc = true)
17
+ # Minimum damper position
18
18
  min_damper_position = nil
19
- case building_vintage
19
+ case template
20
20
  when 'DOE Ref Pre-1980', 'DOE Ref 1980-2004', '90.1-2004'
21
21
  min_damper_position = 0.3
22
22
  when '90.1-2007'
23
23
  min_damper_position = 0.3
24
24
  when '90.1-2010', '90.1-2013'
25
- if has_ddc
26
- min_damper_position = 0.2
27
- else
28
- min_damper_position = 0.3
29
- end
25
+ min_damper_position = if has_ddc
26
+ 0.2
27
+ else
28
+ 0.3
29
+ end
30
30
  end
31
-
32
-
33
-
34
- # TODO remove the template conditional; doesn't make sense
35
- # Determine whether or not to use the high minimum guess.
36
- # Cutoff was determined by correlating apparent minimum guesses
37
- # to OA rates in prototypes since not well documented in papers.
38
- if zone_oa_per_area > 0.001 # 0.001 m^3/s*m^2 = .196 cfm/ft2
39
- # High OA zones
40
- self.setConstantMinimumAirFlowFraction(0.7)
41
- else
42
- # Low OA zones
43
- self.setConstantMinimumAirFlowFraction(min_damper_position)
31
+ setConstantMinimumAirFlowFraction(min_damper_position)
32
+
33
+ # Minimum OA flow rate
34
+ # If specified, will also add this limit
35
+ # and the larger of the two will be used
36
+ # for sizing.
37
+ unless zone_min_oa.nil?
38
+ setFixedMinimumAirFlowRate(zone_min_oa)
44
39
  end
45
40
 
46
41
  return true
47
-
48
42
  end
49
-
50
43
  end
@@ -1,13 +1,11 @@
1
1
 
2
2
  # Reopen the OpenStudio class to add methods to apply standards to this object
3
3
  class OpenStudio::Model::BoilerHotWater
4
-
5
4
  # find search criteria
6
5
  #
7
6
  # @param template [String] valid choices: 'DOE Ref Pre-1980', 'DOE Ref 1980-2004', '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013'
8
7
  # @return [Hash] used for find_object
9
8
  def find_search_criteria(template)
10
-
11
9
  # Define the criteria to find the boiler properties
12
10
  # in the hvac standards data set.
13
11
  search_criteria = {}
@@ -15,16 +13,16 @@ class OpenStudio::Model::BoilerHotWater
15
13
 
16
14
  # Get fuel type
17
15
  fuel_type = nil
18
- case self.fuelType
19
- when 'NaturalGas'
20
- fuel_type = 'Gas'
21
- when 'Electricity'
22
- fuel_type = 'Electric'
23
- when 'FuelOil#1', 'FuelOil#2'
24
- fuel_type = 'Oil'
25
- else
26
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{self.name}, a fuel type of #{self.fuelType} is not yet supported. Assuming 'Gas.'")
27
- fuel_type = 'Gas'
16
+ case fuelType
17
+ when 'NaturalGas'
18
+ fuel_type = 'Gas'
19
+ when 'Electricity'
20
+ fuel_type = 'Electric'
21
+ when 'FuelOil#1', 'FuelOil#2'
22
+ fuel_type = 'Oil'
23
+ else
24
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{name}, a fuel type of #{fuelType} is not yet supported. Assuming 'Gas.'")
25
+ fuel_type = 'Gas'
28
26
  end
29
27
 
30
28
  search_criteria['fuel_type'] = fuel_type
@@ -34,32 +32,29 @@ class OpenStudio::Model::BoilerHotWater
34
32
  search_criteria['fluid_type'] = fluid_type
35
33
 
36
34
  return search_criteria
37
-
38
35
  end
39
36
 
40
37
  # find capacity
41
38
  #
42
39
  # @return [Double] capacity_btu_per_hr - used for find_object
43
- def find_capacity()
44
-
40
+ def find_capacity
45
41
  # Get the capacity
46
42
  capacity_w = nil
47
43
  capacity_btu_per_hr = nil
48
- if self.nominalCapacity.is_initialized
49
- capacity_w = self.nominalCapacity.get
50
- elsif self.autosizedNominalCapacity.is_initialized
51
- capacity_w = self.autosizedNominalCapacity.get
44
+ if nominalCapacity.is_initialized
45
+ capacity_w = nominalCapacity.get
46
+ elsif autosizedNominalCapacity.is_initialized
47
+ capacity_w = autosizedNominalCapacity.get
52
48
  else
53
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{self.name} capacity is not available, cannot apply efficiency standard.")
49
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{name} capacity is not available, cannot apply efficiency standard.")
54
50
  successfully_set_all_properties = false
55
51
  return successfully_set_all_properties
56
52
  end
57
53
 
58
54
  # Convert capacity to Btu/hr
59
- capacity_btu_per_hr = OpenStudio.convert(capacity_w, "W", "Btu/hr").get
55
+ capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
60
56
 
61
57
  return capacity_btu_per_hr
62
-
63
58
  end
64
59
 
65
60
  # Finds lookup object in standards and return minimum thermal efficiency
@@ -67,15 +62,14 @@ class OpenStudio::Model::BoilerHotWater
67
62
  # @param template [String] valid choices: 'DOE Ref Pre-1980', 'DOE Ref 1980-2004', '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013'
68
63
  # @param standards [Hash] the OpenStudio_Standards spreadsheet in hash format
69
64
  # @return [Double] minimum thermal efficiency
70
- def standard_minimum_thermal_efficiency(template,standards)
71
-
65
+ def standard_minimum_thermal_efficiency(template, standards)
72
66
  # Get the boiler properties
73
- search_criteria = self.find_search_criteria(template)
74
- capacity_kbtu_per_hr = self.find_capacity
75
- blr_props = self.model.find_object(standards['boilers'], search_criteria, capacity_kbtu_per_hr)
67
+ search_criteria = find_search_criteria(template)
68
+ capacity_kbtu_per_hr = find_capacity
69
+ blr_props = model.find_object(standards['boilers'], search_criteria, capacity_kbtu_per_hr)
76
70
 
77
- fuel_type = blr_props["fuel_type"]
78
- fluid_type = blr_props["fluid_type"]
71
+ fuel_type = blr_props['fuel_type']
72
+ fluid_type = blr_props['fluid_type']
79
73
 
80
74
  # Get the minimum efficiency standards
81
75
  thermal_eff = nil
@@ -84,128 +78,122 @@ class OpenStudio::Model::BoilerHotWater
84
78
  unless blr_props['minimum_annual_fuel_utilization_efficiency'].nil?
85
79
  min_afue = blr_props['minimum_annual_fuel_utilization_efficiency']
86
80
  thermal_eff = afue_to_thermal_eff(min_afue)
87
- self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_afue} AFUE")
88
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.BoilerHotWater', "For #{template}: #{self.name}: #{fuel_type} #{fluid_type} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; AFUE = #{min_afue}")
81
+ setName("#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_afue} AFUE")
82
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.BoilerHotWater', "For #{template}: #{name}: #{fuel_type} #{fluid_type} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; AFUE = #{min_afue}")
89
83
  end
90
84
 
91
85
  # If specified as thermal efficiency
92
86
  unless blr_props['minimum_thermal_efficiency'].nil?
93
87
  thermal_eff = blr_props['minimum_thermal_efficiency']
94
- self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{thermal_eff} Thermal Eff")
95
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.BoilerHotWater', "For #{template}: #{self.name}: #{fuel_type} #{fluid_type} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; Thermal Efficiency = #{thermal_eff}")
88
+ setName("#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{thermal_eff} Thermal Eff")
89
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.BoilerHotWater', "For #{template}: #{name}: #{fuel_type} #{fluid_type} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; Thermal Efficiency = #{thermal_eff}")
96
90
  end
97
91
 
98
92
  # If specified as combustion efficiency
99
93
  unless blr_props['minimum_combustion_efficiency'].nil?
100
94
  min_comb_eff = blr_props['minimum_combustion_efficiency']
101
95
  thermal_eff = combustion_eff_to_thermal_eff(min_comb_eff)
102
- self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_comb_eff} Combustion Eff")
103
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.BoilerHotWater', "For #{template}: #{self.name}: #{fuel_type} #{fluid_type} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; Combustion Efficiency = #{min_comb_eff}")
96
+ setName("#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_comb_eff} Combustion Eff")
97
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.BoilerHotWater', "For #{template}: #{name}: #{fuel_type} #{fluid_type} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; Combustion Efficiency = #{min_comb_eff}")
104
98
  end
105
99
 
106
100
  return thermal_eff
107
-
108
101
  end
109
102
 
110
-
111
103
  # Applies the standard efficiency ratings and typical performance curves to this object.
112
- #
104
+ #
113
105
  # @param template [String] valid choices: 'DOE Ref Pre-1980', 'DOE Ref 1980-2004', '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013', 'NECB2011'
114
106
  # @param standards [Hash] the OpenStudio_Standards spreadsheet in hash format
115
- # @return [Bool] true if successful, false if not
116
- def setStandardEfficiencyAndCurves(template)
117
-
107
+ # @return [Bool] true if successful, false if not
108
+ def apply_efficiency_and_curves(template)
118
109
  successfully_set_all_properties = false
119
-
110
+
120
111
  boilers = $os_standards['boilers']
121
112
 
122
113
  # Define the criteria to find the boiler properties
123
114
  # in the hvac standards data set.
124
115
  search_criteria = {}
125
116
  search_criteria['template'] = template
126
-
117
+
127
118
  # Get fuel type
128
119
  fuel_type = nil
129
- case self.fuelType
130
- when 'NaturalGas'
120
+ case fuelType
121
+ when 'NaturalGas'
131
122
  fuel_type = 'Gas'
132
123
  when 'Electricity'
133
124
  fuel_type = 'Electric'
134
125
  when 'FuelOil#1', 'FuelOil#2'
135
126
  fuel_type = 'Oil'
136
127
  else
137
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{self.name}, a fuel type of #{self.fuelType} is not yet supported. Assuming 'Gas.'")
128
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{name}, a fuel type of #{fuelType} is not yet supported. Assuming 'Gas.'")
138
129
  fuel_type = 'Gas'
139
130
  end
140
-
141
-
142
-
131
+
143
132
  search_criteria['fuel_type'] = fuel_type
144
-
133
+
145
134
  # Get the fluid type
146
135
  fluid_type = 'Hot Water'
147
136
  search_criteria['fluid_type'] = fluid_type
148
137
 
149
138
  # Get the capacity
150
139
  capacity_w = nil
151
- if self.nominalCapacity.is_initialized
152
- capacity_w = self.nominalCapacity.get
153
- elsif self.autosizedNominalCapacity.is_initialized
154
- capacity_w = self.autosizedNominalCapacity.get
140
+ if nominalCapacity.is_initialized
141
+ capacity_w = nominalCapacity.get
142
+ elsif autosizedNominalCapacity.is_initialized
143
+ capacity_w = autosizedNominalCapacity.get
155
144
  else
156
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{self.name} capacity is not available, cannot apply efficiency standard.")
145
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{name} capacity is not available, cannot apply efficiency standard.")
157
146
  successfully_set_all_properties = false
158
147
  return successfully_set_all_properties
159
148
  end
160
-
149
+
161
150
  # for NECB, check if secondary and/or modulating boiler required
162
- if (template == 'NECB 2011')
163
- if (capacity_w/1000.0 >= 352.0)
164
- if (self.name.to_s.include?("Primary Boiler"))
151
+ if template == 'NECB 2011'
152
+ if capacity_w / 1000.0 >= 352.0
153
+ if name.to_s.include?('Primary Boiler')
165
154
  boiler_capacity = capacity_w
166
- self.setBoilerFlowMode('LeavingSetpointModulated')
167
- self.setMinimumPartLoadRatio(0.25)
168
- elsif (self.name.to_s.include?("Secondary Boiler"))
155
+ setBoilerFlowMode('LeavingSetpointModulated')
156
+ setMinimumPartLoadRatio(0.25)
157
+ elsif name.to_s.include?('Secondary Boiler')
169
158
  boiler_capacity = 0.001
170
159
  end
171
- elsif ((capacity_w/1000.0) >= 176.0) && ((capacity_w/1000.0) < 352.0)
172
- boiler_capacity = capacity_w/2
173
- elsif ((capacity_w/1000.0) <= 176.0)
174
- if (self.name.to_s.include?("Primary Boiler"))
160
+ elsif ((capacity_w / 1000.0) >= 176.0) && ((capacity_w / 1000.0) < 352.0)
161
+ boiler_capacity = capacity_w / 2
162
+ elsif (capacity_w / 1000.0) <= 176.0
163
+ if name.to_s.include?('Primary Boiler')
175
164
  boiler_capacity = capacity_w
176
- elsif (self.name.to_s.include?("Secondary Boiler"))
165
+ elsif name.to_s.include?('Secondary Boiler')
177
166
  boiler_capacity = 0.001
178
167
  end
179
168
  end
180
- self.setNominalCapacity(boiler_capacity)
181
- end # NECB 2011
169
+ setNominalCapacity(boiler_capacity)
170
+ end # NECB 2011
182
171
 
183
172
  # Convert capacity to Btu/hr
184
173
  if template == 'NECB 2011'
185
- capacity_btu_per_hr = OpenStudio.convert(boiler_capacity, "W", "Btu/hr").get
186
- capacity_kbtu_per_hr = OpenStudio.convert(boiler_capacity, "W", "kBtu/hr").get
174
+ capacity_btu_per_hr = OpenStudio.convert(boiler_capacity, 'W', 'Btu/hr').get
175
+ capacity_kbtu_per_hr = OpenStudio.convert(boiler_capacity, 'W', 'kBtu/hr').get
187
176
  else
188
- capacity_btu_per_hr = OpenStudio.convert(capacity_w, "W", "Btu/hr").get
189
- capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, "W", "kBtu/hr").get
177
+ capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
178
+ capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get
190
179
  end
191
-
192
180
 
193
181
  # Get the boiler properties
194
- blr_props = self.model.find_object(boilers, search_criteria, capacity_btu_per_hr)
182
+ blr_props = model.find_object(boilers, search_criteria, capacity_btu_per_hr)
195
183
  unless blr_props
196
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{self.name}, cannot find boiler properties, cannot apply efficiency standard.")
184
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{name}, cannot find boiler properties, cannot apply efficiency standard.")
197
185
  successfully_set_all_properties = false
198
186
  return successfully_set_all_properties
199
187
  end
200
188
 
201
189
  # Make the EFFFPLR curve
202
- eff_fplr = self.model.add_curve(blr_props['efffplr'])
190
+ eff_fplr = model.add_curve(blr_props['efffplr'])
203
191
  if eff_fplr
204
- self.setNormalizedBoilerEfficiencyCurve(eff_fplr)
192
+ setNormalizedBoilerEfficiencyCurve(eff_fplr)
205
193
  else
206
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{self.name}, cannot find eff_fplr curve, will not be set.")
194
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{name}, cannot find eff_fplr curve, will not be set.")
207
195
  successfully_set_all_properties = false
208
- end
196
+ end
209
197
 
210
198
  # Get the minimum efficiency standards
211
199
  thermal_eff = nil
@@ -214,31 +202,30 @@ class OpenStudio::Model::BoilerHotWater
214
202
  unless blr_props['minimum_annual_fuel_utilization_efficiency'].nil?
215
203
  min_afue = blr_props['minimum_annual_fuel_utilization_efficiency']
216
204
  thermal_eff = afue_to_thermal_eff(min_afue)
217
- self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_afue} AFUE")
218
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.BoilerHotWater', "For #{template}: #{self.name}: #{fuel_type} #{fluid_type} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; AFUE = #{min_afue}")
205
+ setName("#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_afue} AFUE")
206
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.BoilerHotWater', "For #{template}: #{name}: #{fuel_type} #{fluid_type} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; AFUE = #{min_afue}")
219
207
  end
220
-
208
+
221
209
  # If specified as thermal efficiency
222
210
  unless blr_props['minimum_thermal_efficiency'].nil?
223
211
  thermal_eff = blr_props['minimum_thermal_efficiency']
224
- self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{thermal_eff} Thermal Eff")
225
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.BoilerHotWater', "For #{template}: #{self.name}: #{fuel_type} #{fluid_type} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; Thermal Efficiency = #{thermal_eff}")
212
+ setName("#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{thermal_eff} Thermal Eff")
213
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.BoilerHotWater', "For #{template}: #{name}: #{fuel_type} #{fluid_type} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; Thermal Efficiency = #{thermal_eff}")
226
214
  end
227
215
 
228
216
  # If specified as combustion efficiency
229
217
  unless blr_props['minimum_combustion_efficiency'].nil?
230
218
  min_comb_eff = blr_props['minimum_combustion_efficiency']
231
219
  thermal_eff = combustion_eff_to_thermal_eff(min_comb_eff)
232
- self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_comb_eff} Combustion Eff")
233
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.BoilerHotWater', "For #{template}: #{self.name}: #{fuel_type} #{fluid_type} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; Combustion Efficiency = #{min_comb_eff}")
234
- end
235
-
220
+ setName("#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_comb_eff} Combustion Eff")
221
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.BoilerHotWater', "For #{template}: #{name}: #{fuel_type} #{fluid_type} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; Combustion Efficiency = #{min_comb_eff}")
222
+ end
223
+
236
224
  # Set the efficiency values
237
225
  unless thermal_eff.nil?
238
- self.setNominalThermalEfficiency(thermal_eff)
239
- end
240
-
226
+ setNominalThermalEfficiency(thermal_eff)
227
+ end
228
+
241
229
  return successfully_set_all_properties
242
230
  end
243
-
244
231
  end