Skip to content

Commit

Permalink
Set source side inlet/outlet heights too.
Browse files Browse the repository at this point in the history
  • Loading branch information
shorowit committed Oct 4, 2024
1 parent 6e6a59b commit 80b8e17
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ __Bugfixes__
- Fixes utility bill calculations if there is battery storage or a generator.
- BuildResidentialScheduleFile measure: Fixes possible divide by zero error during generation of stochastic clothes washer and dishwasher schedules.
- Allows negative values for `Building/Site/Elevation`.
- Fixes lower element height for a water heater using the advanced `WaterHeatingSystem/extension/TankModelType=stratified`.

## OpenStudio-HPXML v1.8.1

Expand Down
6 changes: 3 additions & 3 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>15c66a5f-ad2c-4455-adde-274bb424fef6</version_id>
<version_modified>2024-10-04T16:44:08Z</version_modified>
<version_id>2ecbdcc0-d0e3-4c8f-b8f8-a839e9bdbee1</version_id>
<version_modified>2024-10-04T17:02:56Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -627,7 +627,7 @@
<filename>waterheater.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>949A7458</checksum>
<checksum>1E7D40B1</checksum>
</file>
<file>
<filename>weather.rb</filename>
Expand Down
6 changes: 3 additions & 3 deletions HPXMLtoOpenStudio/resources/waterheater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ def self.setup_hpwh_wrapped_condenser(model, obj_name, coil, tank, fan, airflow_
hpwh = OpenStudio::Model::WaterHeaterHeatPumpWrappedCondenser.new(model, coil, tank, fan, setpoint_schedule, model.alwaysOnDiscreteSchedule)
hpwh.setName("#{obj_name} hpwh")
hpwh.setDeadBandTemperatureDifference(3.89)
hpwh.setCondenserBottomLocation(0.01) # bottom node
hpwh.setCondenserBottomLocation((1.0 - (12 - 0.5) / 12.0) * tank.tankHeight.get) # in the 12th node of a 12-node tank (counting from top)
hpwh.setCondenserTopLocation((1.0 - (6 - 0.5) / 12.0) * tank.tankHeight.get) # in the 6th node of a 12-node tank (counting from top)
hpwh.setEvaporatorAirFlowRate(UnitConversions.convert(airflow_rate * unit_multiplier, 'ft^3/min', 'm^3/s'))
hpwh.setInletAirConfiguration('Schedule')
Expand Down Expand Up @@ -2000,8 +2000,8 @@ def self.create_new_heater(name:, water_heating_system: nil, act_vol:, t_set_c:
new_heater.setUseSideDesignFlowRate(UnitConversions.convert(act_vol, 'gal', 'm^3') / 60.1)
new_heater.setSourceSideDesignFlowRate(0)
new_heater.setSourceSideFlowControlMode('')
new_heater.setSourceSideInletHeight(0)
new_heater.setSourceSideOutletHeight(0)
new_heater.setSourceSideInletHeight((1.0 - (1 - 0.5) / 15) * h_tank) # in the 1st node of a 15-node tank (counting from top)
new_heater.setSourceSideOutletHeight((1.0 - (15 - 0.5) / 15) * h_tank) # in the 15th node of a 15-node tank (counting from top)
new_heater.setSkinLossFractiontoZone(1.0 / unit_multiplier) # Tank losses are multiplied by E+ zone multiplier, so need to compensate here
new_heater.setOffCycleFlueLossFractiontoZone(1.0 / unit_multiplier)
set_stratified_tank_ua(new_heater, u, unit_multiplier)
Expand Down

0 comments on commit 80b8e17

Please sign in to comment.