Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Divide by Zero in CentralHeatPump #7542

Merged
merged 3 commits into from
Jan 24, 2020
Merged

Conversation

YanfeiNREL
Copy link
Contributor

@YanfeiNREL YanfeiNREL commented Oct 3, 2019

Pull request overview

Pull Request Author

  • Label the PR with at least one of: Defect
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
    Line 2376-2380:
  if (CHPower == 0.0) {
                       ActualCOP = 0.0;
   } else {
                       ActualCOP = (QEvaporator + ChillerFalseLoadRate) / CHPower;
   }

Line 2369 - 2373

   if (ReferenceCOP <= 0.0) {
                    CHPower = 0.0;
    }else{
                    CHPower = (AvailChillerCap / ReferenceCOP) * ChillerEIRFPLR * ChillerEIRFT * FRAC;
    }
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
    For this issue, there are no after-fix plots, because the issue will be fixed after the updated GSHP model is being added and replacing the current model.

Reviewer

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • CI status: all green or justified

@nrel-bot
Copy link

nrel-bot commented Nov 1, 2019

@YanfeiNREL @lgentile it has been 28 days since this pull request was last updated.

1 similar comment
@nrel-bot-2c
Copy link

@YanfeiNREL @lgentile it has been 28 days since this pull request was last updated.

@mitchute mitchute changed the title fix issues related to CentralHeatPump: division by zero + all other issues can be fixed once transient GSHP model being finished Fix Divide by Zero in CentralHeatPump Dec 11, 2019
@mitchute mitchute added the Defect Includes code to repair a defect in EnergyPlus label Dec 19, 2019
@mitchute mitchute added this to the EnergyPlus Future milestone Dec 19, 2019
@mitchute
Copy link
Collaborator

@Myoldmopar This has a couple of basic fixes from @YanfeiNREL. It should be ready to go.

@nrel-bot-2
Copy link

@YanfeiNREL @lgentile it has been 28 days since this pull request was last updated.

@Myoldmopar
Copy link
Member

I was trying to review this. I transitioned the defect file up to latest IDD and ran it with develop. I was using Melbourne weather, but I did not encounter a divide by zero. I ran with this branch and also did not encounter an issue, but I'm having trouble verifying if I can't reproduce the issue.

@mjwitte I know this is pulling from a long time back but if you have any tips I'd be happy to hear them.

In general, these protections are fine, so I'm OK with this going in, but I'd like it better if I could verify the fix.

@mjwitte
Copy link
Contributor

mjwitte commented Jan 22, 2020

@Myoldmopar Depending on the configuration and platform divide by zero could slip by unnoticed. Have you tried running it in the debugger with a breakpoint when Qevap=0 on the affect line? If that doesn't work, I can try to reproduce here.

@Myoldmopar
Copy link
Member

I never get to any of the ==0 lines in the debugger. I'm inclined to just accept this and move on.

@Myoldmopar
Copy link
Member

OK, I'll call it, these changes are sensible and CI is happy. I can't verify the fix though, so I'll merge this, and close the issue with a note about reopening if it is still present.

@Myoldmopar Myoldmopar closed this Jan 24, 2020
@Myoldmopar Myoldmopar reopened this Jan 24, 2020
@Myoldmopar Myoldmopar merged commit 3b407c4 into develop Jan 24, 2020
@Myoldmopar Myoldmopar deleted the CentralHeatPumpSystem_5904 branch January 24, 2020 19:06
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.

CentralHeatPumpSystem problems
9 participants