lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb in openstudio-standards-0.2.12 vs lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb in openstudio-standards-0.2.13.rc3
- old
+ new
@@ -1,17 +1,16 @@
-
class Standard
# @!group WaterHeaterMixed
# Applies the standard efficiency ratings and typical losses and paraisitic loads to this object.
# Efficiency and skin loss coefficient (UA)
# Per PNNL http://www.energycodes.gov/sites/default/files/documents/PrototypeModelEnhancements_2014_0.pdf
# Appendix A: Service Water Heating
#
# @return [Bool] true if successful, false if not
def water_heater_mixed_apply_efficiency(water_heater_mixed)
- # TODO remove this once workaround for HPWHs is removed
+ # TODO: remove this once workaround for HPWHs is removed
if water_heater_mixed.partLoadFactorCurve.is_initialized
if water_heater_mixed.partLoadFactorCurve.get.name.get.include?('HPWH_COP')
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.WaterHeaterMixed', "For #{water_heater_mixed.name}, the workaround for HPWHs has been applied, efficiency will not be changed.")
return true
end
@@ -28,18 +27,18 @@
capacity_w = capacity_w.get / water_heater_mixed.component_quantity
end
capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
# Get the volume of the water heater
- # TODO add capability to pull autosized water heater volume
+ # TODO: add capability to pull autosized water heater volume
# if the Sizing:WaterHeater object is ever implemented in OpenStudio.
volume_m3 = water_heater_mixed.tankVolume
if volume_m3.empty?
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.WaterHeaterMixed', "For #{water_heater_mixed.name}, cannot find volume, standard will not be applied.")
return false
else
- volume_m3 = @instvarbuilding_type == 'MidriseApartment' ? volume_m3.get / 23 : volume_m3.get / water_heater_mixed.component_quantity
+ volume_m3 = @instvarbuilding_type == 'MidriseApartment' ? volume_m3.get / 23 : volume_m3.get / water_heater_mixed.component_quantity
end
volume_gal = OpenStudio.convert(volume_m3, 'm^3', 'gal').get
# Get the heater fuel type
fuel_type = water_heater_mixed.heaterFuelType
@@ -93,18 +92,18 @@
# this system of equations:
# ua = (1/.95-1/re)/(67.5*(24/41094-1/(re*cap)))
# 0.82 = (ua*67.5+cap*re)/cap
# Solutions to the system of equations were determined
# for discrete values of EF and modeled using a regression
- re = -0.1137 * ef **2 + 0.1997 * ef + 0.731
+ re = -0.1137 * ef**2 + 0.1997 * ef + 0.731
# Calculate the skin loss coefficient (UA)
# Input capacity is assumed to be the output capacity
# divided by a burner efficiency of 80%
ua_btu_per_hr_per_f = (water_heater_eff - re) * capacity_btu_per_hr / 0.8 / 67.5
end
# Two booster water heaters
- ua_btu_per_hr_per_f = water_heater_mixed.name.to_s.include?('Booster') ? ua_btu_per_hr_per_f * 2 : ua_btu_per_hr_per_f
+ ua_btu_per_hr_per_f = water_heater_mixed.name.to_s.include?('Booster') ? ua_btu_per_hr_per_f * 2 : ua_btu_per_hr_per_f
end
# Typically specified this way for large electric water heaters
if wh_props['standby_loss_base'] && wh_props['standby_loss_volume_allowance']
# Fixed water heater efficiency per PNNL
@@ -147,10 +146,10 @@
# SL Storage Tank: polynomial regression based on a set of manufacturer data
sl_tank = 0.0000005 * tank_volume**3 - 0.001 * tank_volume**2 + 1.3519 * tank_volume + 64.456 # in Btu/h
# Calculate the max allowable standby loss (SL)
# Output capacity is assumed to be 10 * Tank volume
# Input capacity = Output capacity / Et
- p_on = capacity_btu_per_hr / et
+ p_on = capacity_btu_per_hr / et
sl_btu_per_hr = p_on / sl_cap_adj + sl_vol_drt * Math.sqrt(wh_tank_volume) + sl_tank
# Calculate the skin loss coefficient (UA)
ua_btu_per_hr_per_f = (sl_btu_per_hr * et) / 70
# Calculate water heater efficiency
water_heater_eff = (ua_btu_per_hr_per_f * 70 + p_on * et) / p_on