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

Fix PTHP capacity and VAV minimum damper calculation issues #1804

Merged
merged 5 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2080,7 +2080,7 @@ def air_loop_hvac_adjust_minimum_vav_damper_positions(air_loop_hvac)
v_pz = clg_dsn_flow
end
else
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.AirLoopHVAC', "For #{air_loop_hvac.name}: #{zone.name} clg_dsn_flow could not be found.")
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.AirLoopHVAC', "For #{air_loop_hvac.name}: #{zone.name}, zone CoolingDesignAirFlowRate could not be found.")
end
htg_dsn_flow = zone.autosizedHeatingDesignAirFlowRate
if htg_dsn_flow.is_initialized
Expand All @@ -2089,7 +2089,11 @@ def air_loop_hvac_adjust_minimum_vav_damper_positions(air_loop_hvac)
v_pz = htg_dsn_flow
end
else
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.AirLoopHVAC', "For #{air_loop_hvac.name}: #{zone.name} htg_dsn_flow could not be found.")
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.AirLoopHVAC', "For #{air_loop_hvac.name}: #{zone.name}, zone HeatingDesignAirFlowRate could not be found.")
end

if v_pz.zero?
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.")
end

# Get the minimum damper position
Expand Down Expand Up @@ -2135,7 +2139,7 @@ def air_loop_hvac_adjust_minimum_vav_damper_positions(air_loop_hvac)
v_dz = v_pz * mdp

# Zone discharge air fraction
z_d = v_oz / v_dz
z_d = v_dz.zero? || v_oz.zero? ? 0.0 : v_oz / v_dz

# Zone ventilation effectiveness
e_vz = 1.0 + x_s - z_d
Expand All @@ -2157,7 +2161,8 @@ def air_loop_hvac_adjust_minimum_vav_damper_positions(air_loop_hvac)
v_dz_adj = v_oz / z_d_adj

# Adjusted minimum damper position
mdp_adj = v_dz_adj / v_pz
# default to 0.2 if either values are zero
mdp_adj = v_dz_adj.zero? || v_pz.zero? ? 0.2 : v_dz_adj / v_pz

# Don't allow values > 1
if mdp_adj > 1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,23 @@ def coil_heating_dx_single_speed_standard_minimum_cop(coil_heating_dx_single_spe
# TABLE 6.8.1D
# COP = pthp_cop_coeff_1 - (pthp_cop_coeff_2 * Cap / 1000)
# Note c: Cap means the rated cooling capacity of the product in Btu/h.
# If the unit's capacity is less than 7000 Btu/h, use 7000 Btu/h in the calculation.
# If the unit's capacity is greater than 15,000 Btu/h, use 15,000 Btu/h in the calculation.
capacity_btu_per_hr = 7000 if capacity_btu_per_hr < 7000
capacity_btu_per_hr = 15_000 if capacity_btu_per_hr > 15_000

# If the unit's capacity is nil or less than 7000 Btu/h, use 7000 Btu/h in the calculation
# If the unit's capacity is greater than 15,000 Btu/h, use 15,000 Btu/h in the calculation
if capacity_btu_per_hr.nil?
capacity_btu_per_hr = 7000.0
capacity_kbtu_per_hr = capacity_btu_per_hr / 1000.0
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.")
elsif capacity_btu_per_hr < 7000
capacity_btu_per_hr = 7000.0
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.")
elsif capacity_btu_per_hr > 15_000
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.")
capacity_btu_per_hr = 15_000.0
end

min_coph = pthp_cop_coeff_1 - (pthp_cop_coeff_2 * capacity_btu_per_hr / 1000.0)
cop = cop_heating_to_cop_heating_no_fan(min_coph, OpenStudio.convert(capacity_kbtu_per_hr, 'kBtu/hr', 'W').get)
cop = cop_heating_to_cop_heating_no_fan(min_coph, OpenStudio.convert(capacity_btu_per_hr, 'Btu/hr', 'W').get)
new_comp_name = "#{coil_heating_dx_single_speed.name} #{capacity_kbtu_per_hr.round} Clg kBtu/hr #{min_coph.round(1)}COPH"
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)}")
end
Expand Down