Skip to content
Draft
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
12 changes: 6 additions & 6 deletions HPXMLtoOpenStudio/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>hpxm_lto_openstudio</name>
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
<version_id>5d3b283e-c030-4f98-a754-7be880f9e555</version_id>
<version_modified>2025-08-19T18:18:57Z</version_modified>
<version_id>9ea11599-3b74-4f09-a5d9-e47bcc1b52bc</version_id>
<version_modified>2025-08-20T23:01:28Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -414,7 +414,7 @@
<filename>hvac.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>588304F3</checksum>
<checksum>815C8AEB</checksum>
</file>
<file>
<filename>hvac_sizing.rb</filename>
Expand Down Expand Up @@ -696,7 +696,7 @@
<filename>waterheater.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>14F368DC</checksum>
<checksum>02CDB5BB</checksum>
</file>
<file>
<filename>weather.rb</filename>
Expand Down Expand Up @@ -762,7 +762,7 @@
<filename>test_hvac.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>6BED176F</checksum>
<checksum>DA09CC7B</checksum>
</file>
<file>
<filename>test_hvac_sizing.rb</filename>
Expand Down Expand Up @@ -822,7 +822,7 @@
<filename>test_water_heater.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>CE9FC3E5</checksum>
<checksum>8D98A773</checksum>
</file>
<file>
<filename>test_weather.rb</filename>
Expand Down
232 changes: 120 additions & 112 deletions HPXMLtoOpenStudio/resources/hvac.rb

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions HPXMLtoOpenStudio/resources/waterheater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1516,9 +1516,7 @@ def self.apply_desuperheater(runner, model, water_heating_system, tank, loc_spac

# Get the HVAC cooling coil for the desuperheater
desuperheater_clg_coil = nil
(model.getCoilCoolingDXSingleSpeeds +
model.getCoilCoolingDXMultiSpeeds +
model.getCoilCoolingWaterToAirHeatPumpEquationFits).each do |clg_coil|
(model.getCoilCoolingDXs + model.getCoilCoolingWaterToAirHeatPumpEquationFits).each do |clg_coil|
sys_id = clg_coil.additionalProperties.getFeatureAsString('HPXML_ID')
if sys_id.is_initialized && sys_id.get == water_heating_system.related_hvac_idref
desuperheater_clg_coil = clg_coil
Expand Down
442 changes: 252 additions & 190 deletions HPXMLtoOpenStudio/tests/test_hvac.rb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions HPXMLtoOpenStudio/tests/test_water_heater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def test_desuperheater_1_speed
assert_equal(1, model.getCoilWaterHeatingDesuperheaters.size)
preheat_tank = model.getWaterHeaterMixeds.find { |wh| wh.name.get.include? 'storage tank' }
dsh_coil = model.getCoilWaterHeatingDesuperheaters[0]
assert_equal(true, dsh_coil.heatingSource.get.to_CoilCoolingDXSingleSpeed.is_initialized)
assert_equal(true, dsh_coil.heatingSource.get.to_CoilCoolingDX.is_initialized)
assert_equal(preheat_tank, dsh_coil.heatRejectionTarget.get.to_WaterHeaterMixed.get)
end

Expand Down Expand Up @@ -428,7 +428,7 @@ def test_desuperheater_var_speed
assert_equal(1, model.getCoilWaterHeatingDesuperheaters.size)
preheat_tank = model.getWaterHeaterMixeds.find { |wh| wh.name.get.include? 'storage tank' }
dsh_coil = model.getCoilWaterHeatingDesuperheaters[0]
assert_equal(true, dsh_coil.heatingSource.get.to_CoilCoolingDXMultiSpeed.is_initialized)
assert_equal(true, dsh_coil.heatingSource.get.to_CoilCoolingDX.is_initialized)
assert_equal(preheat_tank, dsh_coil.heatRejectionTarget.get.to_WaterHeaterMixed.get)
end

Expand Down
9 changes: 4 additions & 5 deletions ReportSimulationOutput/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2312,7 +2312,7 @@ def create_all_object_outputs_by_key
next if object.to_AdditionalProperties.is_initialized

[EUT, HWT, LT, RT].each do |class_name|
vars_by_key = get_object_outputs_by_key(@model, object, class_name)
vars_by_key = get_object_outputs_by_key(object, class_name)
next if vars_by_key.size == 0

sys_id = object.additionalProperties.getFeatureAsString('HPXML_ID')
Expand Down Expand Up @@ -2947,11 +2947,10 @@ def get_hpxml_system_ids

# TODO
#
# @param model [OpenStudio::Model::Model] OpenStudio Model object
# @param object [TODO] TODO
# @param class_name [TODO] TODO
# @return [TODO] TODO
def get_object_outputs_by_key(model, object, class_name)
def get_object_outputs_by_key(object, class_name)
# For a given object, returns the Output:Variables or Output:Meters to be requested,
# and associates them with the appropriate keys (e.g., [FT::Elec, EUT::Heating]).

Expand Down Expand Up @@ -3023,9 +3022,9 @@ def get_object_outputs_by_key(model, object, class_name)
return { [to_ft[fuel], EUT::HotWater] => ["Boiler #{fuel} Energy", "Boiler Ancillary #{fuel} Energy"] }
end

elsif object.to_CoilCoolingDXSingleSpeed.is_initialized || object.to_CoilCoolingDXMultiSpeed.is_initialized
elsif object.to_CoilCoolingDX.is_initialized
vars = { [FT::Elec, EUT::Cooling] => ["Cooling Coil #{EPlus::FuelTypeElectricity} Energy"] }
parent = model.getAirLoopHVACUnitarySystems.select { |u| u.coolingCoil.is_initialized && u.coolingCoil.get.handle.to_s == object.handle.to_s }
parent = @model.getAirLoopHVACUnitarySystems.select { |u| u.coolingCoil.is_initialized && u.coolingCoil.get.handle.to_s == object.handle.to_s }
if (not parent.empty?) && parent[0].heatingCoil.is_initialized
htg_coil = parent[0].heatingCoil.get
end
Expand Down
6 changes: 3 additions & 3 deletions ReportSimulationOutput/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>report_simulation_output</name>
<uid>df9d170c-c21a-4130-866d-0d46b06073fd</uid>
<version_id>026726a7-a976-41a8-a433-40ff3eb51f90</version_id>
<version_modified>2025-08-13T04:38:02Z</version_modified>
<version_id>fc74aebc-4808-454c-befb-5a4593a30887</version_id>
<version_modified>2025-08-20T23:30:08Z</version_modified>
<xml_checksum>9BF1E6AC</xml_checksum>
<class_name>ReportSimulationOutput</class_name>
<display_name>HPXML Simulation Output Report</display_name>
Expand Down Expand Up @@ -1991,7 +1991,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>37161673</checksum>
<checksum>6587CDCA</checksum>
</file>
<file>
<filename>test_report_sim_output.rb</filename>
Expand Down
Loading