Skip to content
New issue

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

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

Already on GitHub? # to your account

Cooling tower fixes and tests #4528

Merged
merged 16 commits into from
Mar 3, 2022
Merged

Cooling tower fixes and tests #4528

merged 16 commits into from
Mar 3, 2022

Conversation

joseph-robertson
Copy link
Collaborator

@joseph-robertson joseph-robertson commented Feb 7, 2022

Pull request overview

Checklist:

  • Fix ctor for CoolingTowerSingleSpeed: both setNominalCapacity and setBasinHeaterSetpointTemperature were returning false, due to being passed values that were outside the min/max values
  • Model getter tests for CoolingTowerSingleSpeed, CoolingTowerTwoSpeed, and CoolingTowerVariableSpeed
  • Add idd defaults for Evaporation Loss Mode and Blowdown Calculation Mode (and Cell Control for VariableSpeed), and add isDefaulted methods

Questions:

Pull Request Author

  • Model API Changes / Additions
  • Any new or modified fields have been implemented in the EnergyPlus ForwardTranslator (and ReverseTranslator as appropriate)
  • Model API methods are tested (in src/model/test)
  • EnergyPlus ForwardTranslator Tests (in src/energyplus/Test)
  • If a new object or method, added a test in NREL/OpenStudio-resources: Add Link
  • If needed, added VersionTranslation rules for the objects (src/osversion/VersionTranslator.cpp)
  • Verified that C# bindings built fine on Windows, partial classes used as needed, etc.
  • All new and existing tests passes
  • If methods have been deprecated, update rest of code to use the new methods

Labels:

  • If change to an IDD file, add the label IDDChange
  • If breaking existing API, add the label APIChange
  • If deemed ready, add label Pull Request - Ready for CI so that CI builds your PR

Review Checklist

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • Code Style, strip trailing whitespace, etc.
  • All related changes have been implemented: model changes, model tests, FT changes, FT tests, VersionTranslation, OS App
  • Labeling is ok
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified

@joseph-robertson joseph-robertson self-assigned this Feb 7, 2022
@joseph-robertson joseph-robertson added the Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. label Feb 7, 2022
@jmarrec
Copy link
Collaborator

jmarrec commented Feb 18, 2022

Questions:
Does a choice field need to have either \default or \required-field? Seems to lead to a bug if it doesn't. Submitted: NREL/EnergyPlus#9262.

Mostly yes. Unless you have a valid reason for something to be blank (such as "the field is only used if another choice field value is XX" or something, or "feature is turned off if field is blank", etc).

Sometimes E+ doesn't have an IDD default but a hardcoded one in the C++ code (it's is the case here), which is more confusing to users IMHO. And here the I/O ref clearly mentions there is a default, so I agree with you opening an issue.

Copy link
Collaborator

@jmarrec jmarrec left a comment

Choose a reason for hiding this comment

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

I have no issue with these changes

The existing implementation does do thing I wish it didn't though: it hardcodes stuff in the Ctor while it shoumdn't since there is both an IDD default AND a isXXXDefaulted method. That's not your doing though and has been like this for a while, so it's up to you whether you want to tackle it now or not.


setString(OS_CoolingTower_SingleSpeedFields::BasinHeaterOperatingScheduleName, "");

setBasinHeaterSetpointTemperature(2.0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

this has a default of 2.0 in the IDD already, and we do have an isBasinHeaterSetpointTemperatureDefaulted() so I think the Ctor shouldn't set them (not your doing, I know)

Copy link
Collaborator

Choose a reason for hiding this comment

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

same for BasinHeaterCapacity for that matter

setEvaporationLossFactor(0.2);

setDriftLossPercent(0.008);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here... IDD default

setBlowdownCalculationMode("ConcentrationRatio");

setBlowdownConcentrationRatio(3.0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

And here, etc.

@jmarrec jmarrec merged commit 760613c into develop Mar 3, 2022
@jmarrec jmarrec deleted the cooling-tower-fixes branch March 3, 2022 17:24
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
IDDChange Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. severity - Normal Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants