Skip to content

Commit

Permalink
Clothes dryer.
Browse files Browse the repository at this point in the history
  • Loading branch information
shorowit committed Apr 7, 2019
1 parent 4c0da6b commit 29ee208
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 27 deletions.
16 changes: 10 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2190,13 +2190,17 @@ def get_hpxml_file_clothes_dryer_values(hpxml_file, clothes_dryer_values)
elsif hpxml_file == 'valid-appliances-none.xml'
clothes_dryer_values = {}
elsif hpxml_file == 'valid-appliances-dryer-cef.xml'
clothes_dryer_values[:energy_factor] = nil
clothes_dryer_values[:combined_energy_factor] = 2.62
clothes_dryer_values[:control_type] = "moisture"
clothes_dryer_values = { :id => "ClothesDryer",
:location => "living space",
:fuel_type => "electricity",
:combined_energy_factor => 2.62,
:control_type => "moisture" }
elsif hpxml_file == 'valid-appliances-gas.xml'
clothes_dryer_values[:fuel_type] = "natural gas"
clothes_dryer_values[:energy_factor] = 2.67
clothes_dryer_values[:control_type] = "moisture"
clothes_dryer_values = { :id => "ClothesDryer",
:location => "living space",
:fuel_type => "natural gas",
:energy_factor => 2.67,
:control_type => "moisture" }
elsif hpxml_file == 'valid-appliances-in-basement.xml'
clothes_dryer_values[:location] = "basement - conditioned"
end
Expand Down
23 changes: 7 additions & 16 deletions measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1854,22 +1854,13 @@ def self.add_hot_water_and_appliances(runner, model, building, unit, weather, sp

# Clothes Dryer
clothes_dryer_values = HPXML.get_clothes_dryer_values(clothes_dryer: building.elements["BuildingDetails/Appliances/ClothesDryer"])
if not clothes_dryer_values.nil?
cd_space = get_space_from_location(clothes_dryer_values[:location], "ClothesDryer", model, spaces)
cd_fuel = to_beopt_fuel(clothes_dryer_values[:fuel_type])
cd_ef = clothes_dryer_values[:energy_factor]
cd_cef = clothes_dryer_values[:combined_energy_factor]
if cd_ef.nil? and cd_cef.nil?
cd_ef = HotWaterAndAppliances.get_clothes_dryer_reference_ef(cd_fuel)
cd_control = HotWaterAndAppliances.get_clothes_dryer_reference_control()
else
if cd_ef.nil?
cd_ef = HotWaterAndAppliances.calc_clothes_dryer_ef_from_cef(cd_cef)
end
cd_control = clothes_dryer_values[:control_type]
end
else
cd_ef = cd_control = cd_fuel = nil
cd_space = get_space_from_location(clothes_dryer_values[:location], "ClothesDryer", model, spaces)
cd_fuel = to_beopt_fuel(clothes_dryer_values[:fuel_type])
cd_control = clothes_dryer_values[:control_type]
cd_ef = clothes_dryer_values[:energy_factor]
cd_cef = clothes_dryer_values[:combined_energy_factor]
if cd_ef.nil?
cd_ef = HotWaterAndAppliances.calc_clothes_dryer_ef_from_cef(cd_cef)
end

# Dishwasher
Expand Down
6 changes: 1 addition & 5 deletions resources/EPvalidator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -593,11 +593,7 @@ def self.run_validator(hpxml_doc)
"SystemIdentifier" => one, # Required by HPXML schema
"[Location='living space' or Location='basement - conditioned' or Location='basement - unconditioned' or Location='garage']" => zero_or_one,
"[FuelType='natural gas' or FuelType='fuel oil' or FuelType='propane' or FuelType='electricity']" => one,
"[EnergyFactor | CombinedEnergyFactor]" => zero_or_one, # Uses ERI Reference Home if neither provided; otherwise see [CDType=UserSpecified]
},

## [CDType=UserSpecified]
"/HPXML/Building/BuildingDetails/Appliances/ClothesDryer[EnergyFactor | CombinedEnergyFactor]" => {
"[EnergyFactor | CombinedEnergyFactor]" => one,
"[ControlType='timer' or ControlType='moisture']" => one,
},

Expand Down

0 comments on commit 29ee208

Please sign in to comment.