Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address test failures on master #1700

Merged
merged 10 commits into from
Mar 15, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -5503,7 +5503,7 @@ def model_add_central_air_source_heat_pump(model,
htg_coil = create_coil_heating_dx_single_speed(model,
name: "#{air_loop.name} heating coil",
type: 'Residential Central Air Source HP',
cop: hspf_to_cop_heating_no_fan(hspf))
cop: hspf_to_cop_no_fan(hspf))
if model.version < OpenStudio::VersionString.new('3.5.0')
htg_coil.setRatedSupplyFanPowerPerVolumeFlowRate(ac_w_per_cfm / OpenStudio.convert(1.0, 'cfm', 'm^3/s').get)
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def load_hvac_map(hvac_map_file)
#
# @param seer [Double] seasonal energy efficiency ratio (SEER)
# @return [Double] Coefficient of Performance (COP)
def seer_to_cop_cooling_no_fan(seer)
def seer_to_cop_no_fan(seer)
cop = -0.0076 * seer * seer + 0.3796 * seer

return cop
Expand All @@ -252,31 +252,31 @@ def seer_to_cop_cooling_no_fan(seer)
#
# @param cop [Double] COP
# @return [Double] Seasonal Energy Efficiency Ratio
def cop_to_seer_cooling_no_fan(cop)
def cop_no_fan_to_seer(cop)
delta = 0.3796**2 - 4.0 * 0.0076 * cop
seer = (-delta**0.5 + 0.3796) / (2.0 * 0.0076)

return seer
end

# Convert from SEER to COP (with fan) for cooling coils
# per the method specified in 90.1-2013 Appendix G
# per the method specified in Thornton et al. 2011
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect reference.

#
# @param seer [Double] seasonal energy efficiency ratio (SEER)
# @return [Double] Coefficient of Performance (COP)
def seer_to_cop_cooling_with_fan(seer)
def seer_to_cop(seer)
eer = -0.0182 * seer * seer + 1.1088 * seer
cop = (eer / OpenStudio.convert(1.0, 'W', 'Btu/h').get + 0.12) / (1 - 0.12)
cop = eer_to_cop(eer)
Copy link
Collaborator Author

@lymereJ lymereJ Mar 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing to straight EER to COP conversion, don't remove fan impact from metric since we don't to calculate a "cop no fan".


return cop
end

# Convert from COP to SEER (with fan) for cooling coils
# per the method specified in 90.1-2013 Appendix G
# per the method specified in Thornton et al. 2011
#
# @param cop [Double] Coefficient of Performance (COP)
# @return [Double] seasonal energy efficiency ratio (SEER)
def cop_to_seer_cooling_with_fan(cop)
def cop_to_seer(cop)
eer = cop_to_eer(cop)
delta = 1.1088**2 - 4.0 * 0.0182 * eer
seer = (1.1088 - delta**0.5) / (2.0 * 0.0182)
Expand Down Expand Up @@ -304,18 +304,18 @@ def cop_heating_to_cop_heating_no_fan(coph47, capacity_w)
#
# @param hspf [Double] heating seasonal performance factor (HSPF)
# @return [Double] Coefficient of Performance (COP)
def hspf_to_cop_heating_no_fan(hspf)
def hspf_to_cop_no_fan(hspf)
cop = -0.0296 * hspf * hspf + 0.7134 * hspf

return cop
end

# Convert from HSPF to COP (with fan) for heat pump heating coils
# @ref [References::ASHRAE9012013] Appendix G
# @ref ASHRAE RP-1197
#
# @param hspf [Double] heating seasonal performance factor (HSPF)
# @return [Double] Coefficient of Performance (COP)
def hspf_to_cop_heating_with_fan(hspf)
def hspf_to_cop(hspf)
cop = -0.0255 * hspf * hspf + 0.6239 * hspf

return cop
Expand All @@ -330,9 +330,9 @@ def hspf_to_cop_heating_with_fan(hspf)
# @return [Double] Coefficient of Performance (COP)
def eer_to_cop_no_fan(eer, capacity_w = nil)
if capacity_w.nil?
# The PNNL Method.
# From Thornton et al. 2011
# r is the ratio of supply fan power to total equipment power at the rating condition,
# assumed to be 0.12 for the reference buildings per PNNL.
# assumed to be 0.12 for the reference buildings per Thornton et al. 2011.
r = 0.12
cop = (eer / OpenStudio.convert(1.0, 'W', 'Btu/h').get + r) / (1 - r)
else
Expand All @@ -350,11 +350,11 @@ def eer_to_cop_no_fan(eer, capacity_w = nil)
#
# @param cop [Double] COP
# @return [Double] Energy Efficiency Ratio (EER)
def cop_to_eer_no_fan(cop, capacity_w = nil)
def cop_no_fan_to_eer(cop, capacity_w = nil)
if capacity_w.nil?
# The PNNL Method.
# From Thornton et al. 2011
# r is the ratio of supply fan power to total equipment power at the rating condition,
# assumed to be 0.12 for the reference buildngs per PNNL.
# assumed to be 0.12 for the reference buildngs per Thornton et al. 2011.
r = 0.12
eer = OpenStudio.convert(1.0, 'W', 'Btu/h').get * (cop * (1 - r) - r)
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def coil_cooling_dx_multi_speed_apply_efficiency_and_curves(coil_cooling_dx_mult
# If specified as SEER
unless ac_props['minimum_seasonal_energy_efficiency_ratio'].nil?
min_seer = ac_props['minimum_seasonal_energy_efficiency_ratio']
cop = seer_to_cop_cooling_with_fan(min_seer)
cop = seer_to_cop_no_fan(min_seer)
new_comp_name = "#{coil_cooling_dx_multi_speed.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
# self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{template}: #{coil_cooling_dx_multi_speed.name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
Expand All @@ -189,7 +189,7 @@ def coil_cooling_dx_multi_speed_apply_efficiency_and_curves(coil_cooling_dx_mult
# if specified as SEER (heat pump)
unless ac_props['minimum_seasonal_efficiency'].nil?
min_seer = ac_props['minimum_seasonal_efficiency']
cop = seer_to_cop_cooling_with_fan(min_seer)
cop = seer_to_cop_no_fan(min_seer)
new_comp_name = "#{coil_cooling_dx_multi_speed.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
# self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{template}: #{coil_cooling_dx_multi_speed.name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
Expand Down Expand Up @@ -272,7 +272,7 @@ def coil_cooling_dx_multi_speed_standard_minimum_cop(coil_cooling_dx_multi_speed
# If specified as SEER
unless ac_props['minimum_seasonal_energy_efficiency_ratio'].nil?
min_seer = ac_props['minimum_seasonal_energy_efficiency_ratio']
cop = seer_to_cop_cooling_with_fan(min_seer)
cop = seer_to_cop_no_fan(min_seer)
new_comp_name = "#{coil_cooling_dx_multi_speed.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
# self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{template}: #{coil_cooling_dx_multi_speed.name}: #{cooling_type} #{heating_type} #{coil_dx_subcategory(coil_cooling_dx_multi_speed)} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
Expand All @@ -289,7 +289,7 @@ def coil_cooling_dx_multi_speed_standard_minimum_cop(coil_cooling_dx_multi_speed
# if specified as SEER (heat pump)
unless ac_props['minimum_seasonal_efficiency'].nil?
min_seer = ac_props['minimum_seasonal_efficiency']
cop = seer_to_cop_cooling_with_fan(min_seer)
cop = seer_to_cop_no_fan(min_seer)
new_comp_name = "#{coil_cooling_dx_multi_speed.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
# self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{template}: #{coil_cooling_dx_multi_speed.name}: #{cooling_type} #{heating_type} #{coil_dx_subcategory(coil_cooling_dx_multi_speed)} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def coil_cooling_dx_single_speed_standard_minimum_cop(coil_cooling_dx_single_spe
# If specified as SEER
unless ac_props['minimum_seasonal_energy_efficiency_ratio'].nil?
min_seer = ac_props['minimum_seasonal_energy_efficiency_ratio']
cop = seer_to_cop_cooling_with_fan(min_seer)
cop = seer_to_cop_no_fan(min_seer)
new_comp_name = "#{coil_cooling_dx_single_speed.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{coil_cooling_dx_single_speed.name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
end
Expand All @@ -148,7 +148,7 @@ def coil_cooling_dx_single_speed_standard_minimum_cop(coil_cooling_dx_single_spe
# if specified as SEER (heat pump)
unless ac_props['minimum_seasonal_efficiency'].nil?
min_seer = ac_props['minimum_seasonal_efficiency']
cop = seer_to_cop_cooling_with_fan(min_seer)
cop = seer_to_cop_no_fan(min_seer)
new_comp_name = "#{coil_cooling_dx_single_speed.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{coil_cooling_dx_single_speed.name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def coil_cooling_dx_two_speed_standard_minimum_cop(coil_cooling_dx_two_speed, re
# If specified as SEER
unless ac_props['minimum_seasonal_energy_efficiency_ratio'].nil?
min_seer = ac_props['minimum_seasonal_energy_efficiency_ratio']
cop = seer_to_cop_cooling_with_fan(min_seer)
cop = seer_to_cop_no_fan(min_seer)
new_comp_name = "#{coil_cooling_dx_two_speed.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXTwoSpeed', "For #{template}: #{coil_cooling_dx_two_speed.name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
end
Expand All @@ -78,7 +78,7 @@ def coil_cooling_dx_two_speed_standard_minimum_cop(coil_cooling_dx_two_speed, re
# if specified as SEER (heat pump)
unless ac_props['minimum_seasonal_efficiency'].nil?
min_seer = ac_props['minimum_seasonal_efficiency']
cop = seer_to_cop_cooling_with_fan(min_seer)
cop = seer_to_cop_no_fan(min_seer)
new_comp_name = "#{coil_cooling_dx_two_speed.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXTwoSpeed', "For #{template}: #{coil_cooling_dx_two_speed.name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def coil_heating_dx_multi_speed_apply_efficiency_and_curves(coil_heating_dx_mult
# If specified as SEER
unless hp_props['minimum_seasonal_energy_efficiency_ratio'].nil?
min_seer = hp_props['minimum_seasonal_energy_efficiency_ratio']
cop = seer_to_cop_cooling_with_fan(min_seer)
cop = seer_to_cop_no_fan(min_seer)
coil_heating_dx_multi_speed.setName("#{coil_heating_dx_multi_speed.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{template}: #{coil_heating_dx_multi_speed.name}: #{suppl_heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def coil_heating_dx_single_speed_standard_minimum_cop(coil_heating_dx_single_spe
# If specified as HSPF
unless ac_props['minimum_heating_seasonal_performance_factor'].nil?
min_hspf = ac_props['minimum_heating_seasonal_performance_factor']
cop = hspf_to_cop_heating_with_fan(min_hspf)
cop = hspf_to_cop_no_fan(min_hspf)
new_comp_name = "#{coil_heating_dx_single_speed.name} #{capacity_kbtu_per_hr.round} Clg kBtu/hr #{min_hspf.round(1)}HSPF"
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{template}: #{coil_heating_dx_single_speed.name}: #{suppl_heating_type} #{sub_category} Cooling Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; HSPF = #{min_hspf}")
end
Expand Down
Loading