Skip to content

Fix HPWH coil removing heat from tank#4670

Merged
rraustad merged 27 commits into
developfrom
4558_hpwh_coil_removing_heat_from_tank
Jan 26, 2015
Merged

Fix HPWH coil removing heat from tank#4670
rraustad merged 27 commits into
developfrom
4558_hpwh_coil_removing_heat_from_tank

Conversation

@nmerket

@nmerket nmerket commented Jan 15, 2015

Copy link
Copy Markdown

This is finally happening. This addresses issue #4558 and by extension #4455.

  • Fixes convergence on the loop that determines the condenser operating temperature in CalcHeatPumpWaterHeater
  • Fixes problem in both CalcWaterThermalTankMixed and CalcWaterThermalTankStratified that was causing the source side heat transfer rate to go negative by changing logic to treat heat pump water heater source side inlet heat transfer as a constant heat rate during a timestep instead of a constant temperature.
  • Added unit tests.
  • Added regression tests for HPWH with stratified tanks.
  • Generally cleaned up code in CalcHeatPumpWaterHeater, CalcWaterThermalTankMixed, and CalcWaterThermalTankStratified removing unnecessary duplicate code blocks for heating mode and converting to use references for the tank and heat pump water heater structs, which helps with readability.

Reviewer:
@rraustad

Noel Merket added 26 commits October 24, 2014 10:32
…king out of the loop if the tank setpoint was overshot #4558
… the right coil heat transfer rate. Also fixing some tab vs spaces issues. #4558
… the CalcWaterThermalTankMixed, still need to do stratified tank.
Comment thread src/EnergyPlus/WaterThermalTanks.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nmerket Why an assert here instead of a warn and correct? Should it truly be impossible for a broken user file to result in a negative deltaT?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, I suppose if the heat pump was attached to the tank backwards it could possibly be negative. Does the IDF construction allow that? Maybe I'll see if I can create an IDF that hits this error. If it is possible I'll change it to be a warning or error instead of assert.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And then expect death on that newly modified failing integration test file!! Just like here. Code coverage, @mbadams5 !

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot seem to create an input file that hits this error without hitting other errors first. I'm leaning towards the assertion because:

  1. It will not negatively affect the code coverage test.
  2. Hitting this error means that someone has been messing around in the source code anyway.

@nmerket

nmerket commented Jan 16, 2015

Copy link
Copy Markdown
Author

@Myoldmopar are these coverage tests failing going to be a problem?

@Myoldmopar

Copy link
Copy Markdown
Member

No, we just need to set the baseline properly. It's fine for now. Unless I'm missing something, @kbenne?

@rraustad

Copy link
Copy Markdown
Collaborator

Original defect file (4455) shows perfect COP=2.7 and very good agreement on coil and tank heat transfer.
issue4455results

@rraustad

Copy link
Copy Markdown
Collaborator

Looking at the detailed output, I can't say this is working as expected. 1) the DX coil RTF is not reporting correctly, and 2) the HPWH is running at full load intermittently where I would expect it to cycle at part-load, probably because of this?

if ( SELECT_CASE_var == HeatMode ) {
// HPWH was heating last iteration and will continue to heat until the set point is reached
HPPartLoadRatio = 1.0;
} else if ( SELECT_CASE_var == FloatMode ) {
...
issue4455results_detailed

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These must be added back in to turn on the DX Cooling coil on the air side of the HPWH

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 6849, 6852, and 6853. Not sure if all are needed of if other code below is needed as well. I will add these back in to my code to see if this turns on the air-side DX coil.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I see these are included below at line 7028. However, I don't think applying PLR there is correct.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rraustad The vast majority of this section of the diff was to clean up the code so we don't have duplicate blocks of code doing the same thing in two places. It's functionally equivalent to what was there before. I went to great lengths to verify that when I moved all this around it didn't change the calculations or results. So, yes 7028 does the exact same thing 6849 and 7002 did, but now in one line. The PLR of 1.0 is applied there if it started out in heating mode. Then it is corrected later using that false position solver and the residual calculations.

I guess what I'm saying is that if the DXCoil isn't turning on when it should, it's not because of this change.

@rraustad

Copy link
Copy Markdown
Collaborator

I agree. The HPWH air-side fan is autosizing to 0 in defect file 4455 (and possibly some example files) which is unrelated to this issue. Interestingly, this does not stop the HPWH from operating even though the air flow through the DX evap coil is 0. Only the DX coil outputs are meaningless. The tank and HPWH heating coil outputs seem to be working correctly.

@nmerket

nmerket commented Jan 23, 2015

Copy link
Copy Markdown
Author

That's odd. Makes me think that the DX coil is working but there's a problem getting that info to the outputs.

@rraustad

Copy link
Copy Markdown
Collaborator

It looks like it's just a fan autosizing issue. If I move the fan to after the coil (drawthru), the coil outputs are correct and air flows through the DX coil on the air-side. However, the fan outputs for RTF and outlet node Vdot both show 0. So this is a separate issue.

@rraustad

Copy link
Copy Markdown
Collaborator

Results for draw thru defect file 4455.
Last 3 columns at right show air flow through DX coil then 0 after the fan, also fan RTF = 0 (Col I). Everything else looks good.
issue4455results_detailed_drawthru

rraustad added a commit that referenced this pull request Jan 26, 2015
…tank

4558 hpwh coil removing heat from tank
@rraustad rraustad merged commit 4dd29a6 into develop Jan 26, 2015
@rraustad

Copy link
Copy Markdown
Collaborator

HPWH example file is working correctly although there is a mismatch in source and use side heat transfer rates as described in this conversation. The COP's in the original defect file look much better now than before. There are still things that need fixing (e.g., issue 4693 fan not autosizing, and source/use heat transfer rate) but those will get addressed as different issues.

@nmerket nmerket deleted the 4558_hpwh_coil_removing_heat_from_tank branch January 27, 2015 15:57
@Myoldmopar Myoldmopar changed the title 4558 hpwh coil removing heat from tank Fix HPWH coil removing heat from tank Mar 7, 2015
@Myoldmopar Myoldmopar added the Defect Includes code to repair a defect in EnergyPlus label Mar 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Defect Includes code to repair a defect in EnergyPlus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants