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

Add warnings/errors for unreasonable DHW temperatures for WaterUse:Equipment #8808

Merged
merged 14 commits into from
Sep 1, 2021

Conversation

matthew-larson
Copy link
Contributor

Pull request overview

Pull Request Author

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions

Reviewer

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally

@matthew-larson matthew-larson added Defect Includes code to repair a defect in EnergyPlus NotIDDChange Code does not impact IDD (can be merged after IO freeze) labels Jun 8, 2021
@matthew-larson matthew-larson added this to the EnergyPlus 9.6 BugFix Freeze milestone Jun 8, 2021
@matthew-larson matthew-larson self-assigned this Jun 8, 2021
@matthew-larson matthew-larson linked an issue Jun 8, 2021 that may be closed by this pull request
3 tasks
@matthew-larson
Copy link
Contributor Author

All diffs are due to situations where the target water temperature is unachievable due to the hot water temperature, or the hot water temperature is below the cold water temperature. Not sure if these should be investigated in the models to eliminate these warnings.

@matthew-larson matthew-larson marked this pull request as ready for review July 5, 2021 21:58
@Nigusse Nigusse self-requested a review July 16, 2021 13:31
this->HWTempErrIndex,
this->HotTemp,
this->HotTemp);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Catches when Cold water temp is > available Hot water temp and throws one time and recurring warning error message.

this->TargetTempErrIndex,
this->HotTemp,
this->ColdTemp);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Catches when Target water temp is > available Hot water temp and throws one time and recurring warning error message.

this->TargetTempErrIndex,
this->HotTemp,
this->ColdTemp);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Catches when Target water temp is < available Cold water temp and throws one time and recurring warning error message.

});

EXPECT_TRUE(compare_err_stream(error_string3, true));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This unit test demonstrates the three conditions where throwing warning error message is warranted. Update the branch, built and ran the unit test locally. Also ran the unit test suite locally and all passed.

@Nigusse
Copy link
Contributor

Nigusse commented Jul 16, 2021

Now there are 35 example files that throw warning error message because they are caught by the fix. But these are expected error messages unless we want to modify the example files to eliminate the warning error. @Myoldmopar

@Nigusse
Copy link
Contributor

Nigusse commented Jul 16, 2021

If the warning error message is a concern another alternative is to not report the warning error message unless "DisplayExtraWarnings" variable is set to true.

@mjwitte
Copy link
Contributor

mjwitte commented Jul 19, 2021

@matthew-larson @Nigusse Ultimately, we want to fix these so the example files deliver the requested target temp without warnings. I would not hide these under "DisplayExtraWarnings". That could happen here or as a sperate defect/PR.

These are are all good warnings that indicate the target temp won't be met, and why. Do we have a warning that checks the supply temp vs target temp directly and warns that it didn't deliver? Or would that even be useful? If all of these checks pass, are there other things that could prevent the target temp from being met?

@matthew-larson
Copy link
Contributor Author

@mjwitte @Nigusse I ended up not doing a check for supply temp vs target temp as this would involve whole different part of the code and I thought would probably be better as a separate issue/pull request. This could probably go along with DHW heating capacity checks which could be the other reason that the target temp wouldn't be reached.

I can go ahead and create another issue/pull request to fix the example files so we can push this one through sooner than later without me holding it up.

@Nigusse
Copy link
Contributor

Nigusse commented Jul 19, 2021

@mjwitte @matthew-larson I suspect sometimes the available capacity and demand mismatch may lead to hot water temperature to drop below the target temperature. But these needs to investigate case by case. I think removing the error message from the example files should be handled in a separate issue.

@Nigusse Nigusse closed this Jul 19, 2021
@mjwitte mjwitte reopened this Jul 19, 2021
@Nigusse
Copy link
Contributor

Nigusse commented Jul 19, 2021

@mjwitte I was making comment but ended up closing the issue. That was inadvertent.

@Myoldmopar Myoldmopar modified the milestones: EnergyPlus 9.6 BugFix Freeze, EnergyPlus 9.6 Release Aug 6, 2021
@Nigusse
Copy link
Contributor

Nigusse commented Aug 25, 2021

I looked at a couple of example files trying to understand the source and causes of the warning messages. For instance, the example file ReportHeatEmission_RefFSRestaurant.idf has a total of 41 warning massages and these messages occur during warmup period only. There are also two other observations I made:

  • the warning was issued at Simulation time=07/21 00:00 - 00:15
  • when I switched the order of the SizingPeriod:DesignDay (summer first) the warning error message occurred at Simulation time=01/21 00:00 - 00:15.
  • examining the hot water temperature in the tank during these hours indicate the hot water temperature was ~59C, way higher than the target temperature 49C.
  • This implies there is initialization problem.

@matthew-larson please add timestamp reporting function ShowContinueErrorTimeStamp(state, "") where you added the warning error message code (three locations). This will help us determine if the problem I am seeing is the same across all the example files with error file diffs and it is helpful to have timestamp for future use.

// print error for variables of hot water temperature
++this->HWTempErrorCount;
if (this->HWTempErrorCount < 2) {
ShowWarningError(state, "CalcEquipmentFlowRates: Hot water temperature is less than the cold water temperature");
Copy link
Contributor

@Nigusse Nigusse Aug 25, 2021

Choose a reason for hiding this comment

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

Add this ShowContinueErrorTimeStamp(state, ""); here

// print error for variables of target water temperature
++this->TargetTempErrorCount;
if (this->TargetTempErrorCount < 2) {
ShowWarningError(state, "CalcEquipmentFlowRates: Target water temperature is greater than the hot water temperature");
Copy link
Contributor

Choose a reason for hiding this comment

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

Add this ShowContinueErrorTimeStamp(state, ""); here

// print error for variables of target water temperature
++this->TargetTempErrorCount;
if (this->TargetTempErrorCount < 2) {
ShowWarningError(state, "CalcEquipmentFlowRates: Target water temperature is less than the cold water temperature");
Copy link
Contributor

Choose a reason for hiding this comment

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

Add this ShowContinueErrorTimeStamp(state, ""); here

@matthew-larson
Copy link
Contributor Author

Thanks @Nigusse for your review. I went ahead and added the ShowContinueErrorTimeStamp(state, ""); lines as suggested, updated the unit tests accordingly, and merged in the latest develop branch.

@Myoldmopar
Copy link
Member

I'll pull and test this locally.

@Myoldmopar
Copy link
Member

Builds and passes locally with develop pulled in. Regressions locally are exactly what it was showing the last time Decent ran. Merging, thanks @matthew-larson and @Nigusse!

@Myoldmopar Myoldmopar merged commit 69875d8 into NREL:develop Sep 1, 2021
@matthew-larson
Copy link
Contributor Author

Thanks @Myoldmopar!

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 NotIDDChange Code does not impact IDD (can be merged after IO freeze)
Projects
None yet
9 participants