@@ -615,11 +615,12 @@ def self.calc_dishwasher_energy_gpd(runner, eri_version, hpxml_bldg, dishwasher,
615615 end
616616
617617 if Constants ::ERIVersions . index ( eri_version ) >= Constants ::ERIVersions . index ( '2019A' )
618- if dishwasher . rated_annual_kwh . nil?
619- dishwasher . rated_annual_kwh = calc_dishwasher_annual_kwh_from_ef ( dishwasher . energy_factor )
618+ rated_annual_kwh = dishwasher . rated_annual_kwh
619+ if rated_annual_kwh . nil?
620+ rated_annual_kwh = calc_dishwasher_annual_kwh_from_ef ( dishwasher . energy_factor )
620621 end
621622 lcy = dishwasher . label_usage * 52.0
622- kwh_per_cyc = ( ( dishwasher . label_annual_gas_cost * 0.5497 / dishwasher . label_gas_rate - dishwasher . rated_annual_kwh * dishwasher . label_electric_rate * 0.02504 / dishwasher . label_electric_rate ) / ( dishwasher . label_electric_rate * 0.5497 / dishwasher . label_gas_rate - 0.02504 ) ) / lcy
623+ kwh_per_cyc = ( ( dishwasher . label_annual_gas_cost * 0.5497 / dishwasher . label_gas_rate - rated_annual_kwh * dishwasher . label_electric_rate * 0.02504 / dishwasher . label_electric_rate ) / ( dishwasher . label_electric_rate * 0.5497 / dishwasher . label_gas_rate - 0.02504 ) ) / lcy
623624 if n_occ . nil? # Asset calculation
624625 if Constants ::ERIVersions . index ( eri_version ) >= Constants ::ERIVersions . index ( 'latest' ) # FIXME: Change from 'latest' when incorporated in 301 standard
625626 # RESNET HERS Addendum 81 Eq. 4.2-36a
@@ -637,18 +638,19 @@ def self.calc_dishwasher_energy_gpd(runner, eri_version, hpxml_bldg, dishwasher,
637638 dwcpy = scy * ( 12.0 / dishwasher . place_setting_capacity )
638639 annual_kwh = kwh_per_cyc * dwcpy
639640
640- gpd = ( dishwasher . rated_annual_kwh - kwh_per_cyc * lcy ) * 0.02504 * dwcpy / 365.0
641+ gpd = ( rated_annual_kwh - kwh_per_cyc * lcy ) * 0.02504 * dwcpy / 365.0
641642 else
642- if dishwasher . energy_factor . nil?
643- dishwasher . energy_factor = calc_dishwasher_ef_from_annual_kwh ( dishwasher . rated_annual_kwh )
643+ energy_factor = dishwasher . energy_factor
644+ if energy_factor . nil?
645+ energy_factor = calc_dishwasher_ef_from_annual_kwh ( dishwasher . rated_annual_kwh )
644646 end
645647 dwcpy = ( 88.4 + 34.9 * nbeds ) * ( 12.0 / dishwasher . place_setting_capacity )
646- annual_kwh = ( ( 86.3 + 47.73 / dishwasher . energy_factor ) / 215.0 ) * dwcpy
648+ annual_kwh = ( ( 86.3 + 47.73 / energy_factor ) / 215.0 ) * dwcpy
647649
648650 if Constants ::ERIVersions . index ( eri_version ) >= Constants ::ERIVersions . index ( '2014A' )
649- gpd = dwcpy * ( 4.6415 * ( 1.0 / dishwasher . energy_factor ) - 1.9295 ) / 365.0
651+ gpd = dwcpy * ( 4.6415 * ( 1.0 / energy_factor ) - 1.9295 ) / 365.0
650652 else
651- gpd = ( ( 88.4 + 34.9 * nbeds ) * 8.16 - ( 88.4 + 34.9 * nbeds ) * 12.0 / dishwasher . place_setting_capacity * ( 4.6415 * ( 1.0 / dishwasher . energy_factor ) - 1.9295 ) ) / 365.0
653+ gpd = ( ( 88.4 + 34.9 * nbeds ) * 8.16 - ( 88.4 + 34.9 * nbeds ) * 12.0 / dishwasher . place_setting_capacity * ( 4.6415 * ( 1.0 / energy_factor ) - 1.9295 ) ) / 365.0
652654 end
653655 end
654656
@@ -714,13 +716,15 @@ def self.calc_clothes_dryer_energy(runner, eri_version, hpxml_bldg, clothes_drye
714716 end
715717
716718 if Constants ::ERIVersions . index ( eri_version ) >= Constants ::ERIVersions . index ( '2019A' )
717- if clothes_dryer . combined_energy_factor . nil?
718- clothes_dryer . combined_energy_factor = calc_clothes_dryer_cef_from_ef ( clothes_dryer . energy_factor )
719+ combined_energy_factor = clothes_dryer . combined_energy_factor
720+ if combined_energy_factor . nil?
721+ combined_energy_factor = calc_clothes_dryer_cef_from_ef ( clothes_dryer . energy_factor )
719722 end
720- if clothes_washer . integrated_modified_energy_factor . nil?
721- clothes_washer . integrated_modified_energy_factor = calc_clothes_washer_imef_from_mef ( clothes_washer . modified_energy_factor )
723+ integrated_modified_energy_factor = clothes_washer . integrated_modified_energy_factor
724+ if integrated_modified_energy_factor . nil?
725+ integrated_modified_energy_factor = calc_clothes_washer_imef_from_mef ( clothes_washer . modified_energy_factor )
722726 end
723- rmc = ( 0.97 * ( clothes_washer . capacity / clothes_washer . integrated_modified_energy_factor ) - clothes_washer . rated_annual_kwh / 312.0 ) / ( ( 2.0104 * clothes_washer . capacity + 1.4242 ) * 0.455 ) + 0.04
727+ rmc = ( 0.97 * ( clothes_washer . capacity / integrated_modified_energy_factor ) - clothes_washer . rated_annual_kwh / 312.0 ) / ( ( 2.0104 * clothes_washer . capacity + 1.4242 ) * 0.455 ) + 0.04
724728 if n_occ . nil? # Asset calculation
725729 if Constants ::ERIVersions . index ( eri_version ) >= Constants ::ERIVersions . index ( 'latest' ) # FIXME: Change from 'latest' when incorporated in 301 standard
726730 # RESNET HERS Addendum 81 Eq. 4.2-34
@@ -736,32 +740,34 @@ def self.calc_clothes_dryer_energy(runner, eri_version, hpxml_bldg, clothes_drye
736740 scy = 123.0 + 61.0 * n_occ # Eq. 1 from http://www.fsec.ucf.edu/en/publications/pdf/fsec-pf-464-15.pdf
737741 end
738742 acy = scy * ( ( 3.0 * 2.08 + 1.59 ) / ( clothes_washer . capacity * 2.08 + 1.59 ) )
739- annual_kwh = ( ( ( rmc - 0.04 ) * 100 ) / 55.5 ) * ( 8.45 / clothes_dryer . combined_energy_factor ) * acy
743+ annual_kwh = ( ( ( rmc - 0.04 ) * 100 ) / 55.5 ) * ( 8.45 / combined_energy_factor ) * acy
740744 if clothes_dryer . fuel_type == HPXML ::FuelTypeElectricity
741745 annual_therm = 0.0
742746 else
743747 annual_therm = annual_kwh * 3412.0 * ( 1.0 - 0.07 ) * ( 3.73 / 3.30 ) / 100000
744748 annual_kwh = annual_kwh * 0.07 * ( 3.73 / 3.30 )
745749 end
746750 else
747- if clothes_dryer . energy_factor . nil?
748- clothes_dryer . energy_factor = calc_clothes_dryer_ef_from_cef ( clothes_dryer . combined_energy_factor )
751+ energy_factor = clothes_dryer . energy_factor
752+ if energy_factor . nil?
753+ energy_factor = calc_clothes_dryer_ef_from_cef ( clothes_dryer . combined_energy_factor )
749754 end
750- if clothes_washer . modified_energy_factor . nil?
751- clothes_washer . modified_energy_factor = calc_clothes_washer_mef_from_imef ( clothes_washer . integrated_modified_energy_factor )
755+ modified_energy_factor = clothes_washer . modified_energy_factor
756+ if modified_energy_factor . nil?
757+ modified_energy_factor = calc_clothes_washer_mef_from_imef ( clothes_washer . integrated_modified_energy_factor )
752758 end
753759 if clothes_dryer . control_type == HPXML ::ClothesDryerControlTypeTimer
754760 field_util_factor = 1.18
755761 elsif clothes_dryer . control_type == HPXML ::ClothesDryerControlTypeMoisture
756762 field_util_factor = 1.04
757763 end
758764 if clothes_dryer . fuel_type == HPXML ::FuelTypeElectricity
759- annual_kwh = 12.5 * ( 164.0 + 46.5 * nbeds ) * ( field_util_factor / clothes_dryer . energy_factor ) * ( ( clothes_washer . capacity / clothes_washer . modified_energy_factor ) - clothes_washer . rated_annual_kwh / 392.0 ) / ( 0.2184 * ( clothes_washer . capacity * 4.08 + 0.24 ) )
765+ annual_kwh = 12.5 * ( 164.0 + 46.5 * nbeds ) * ( field_util_factor / energy_factor ) * ( ( clothes_washer . capacity / modified_energy_factor ) - clothes_washer . rated_annual_kwh / 392.0 ) / ( 0.2184 * ( clothes_washer . capacity * 4.08 + 0.24 ) )
760766 annual_therm = 0.0
761767 else
762- annual_kwh = 12.5 * ( 164.0 + 46.5 * nbeds ) * ( field_util_factor / 3.01 ) * ( ( clothes_washer . capacity / clothes_washer . modified_energy_factor ) - clothes_washer . rated_annual_kwh / 392.0 ) / ( 0.2184 * ( clothes_washer . capacity * 4.08 + 0.24 ) )
763- annual_therm = annual_kwh * 3412.0 * ( 1.0 - 0.07 ) * ( 3.01 / clothes_dryer . energy_factor ) / 100000
764- annual_kwh = annual_kwh * 0.07 * ( 3.01 / clothes_dryer . energy_factor )
768+ annual_kwh = 12.5 * ( 164.0 + 46.5 * nbeds ) * ( field_util_factor / 3.01 ) * ( ( clothes_washer . capacity / modified_energy_factor ) - clothes_washer . rated_annual_kwh / 392.0 ) / ( 0.2184 * ( clothes_washer . capacity * 4.08 + 0.24 ) )
769+ annual_therm = annual_kwh * 3412.0 * ( 1.0 - 0.07 ) * ( 3.01 / energy_factor ) / 100000
770+ annual_kwh = annual_kwh * 0.07 * ( 3.01 / energy_factor )
765771 end
766772 end
767773
0 commit comments