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

Provide accurate value of RatedInletAirHumRat in DXCoils #7993

Merged
merged 7 commits into from
Jun 27, 2020

Conversation

lgu1234
Copy link
Contributor

@lgu1234 lgu1234 commented May 15, 2020

Pull request overview

Two changes were made in DXCoils. The first change is to add two more digits for wet bulb temperature at 19.4444, so that Twet is more accurate than 19.44 and has equivalent accuracy to the rated dry bulb temperature at 26.6667. The second change is to calculate rated inlet air W using rated dry bulb temperature at 26.6667, rate wet bulb temperature at 19.4444, and standard see level pressure at 101325. The value used after round off is 0.0111847.
Real64 const RatedInletWetBulbTemp(19.4444); // 19.44 or 67F
Real64 const RatedInletAirHumRat(0.0111847); // Humidity ratio corresponding to 80F dry bulb/67F wet bulb

At the same time, some unit test files are revised due to the above changes.
The present changes are limited in DXCoils. If the changes are accepted, more changes are expected in both Coil:Cooling:DX and VariableSpeedCoil, because both coils also use RatedInletAirHumRat.

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
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies

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
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

@Myoldmopar Myoldmopar added the Defect Includes code to repair a defect in EnergyPlus label May 18, 2020
@Myoldmopar
Copy link
Member

@lgu1234 you had more to do on this after the discussion on the sizing call, right?

@lgu1234
Copy link
Contributor Author

lgu1234 commented May 21, 2020

@Myoldmopar Yes. I will do little bit more tomorrow.

@lgu1234
Copy link
Contributor Author

lgu1234 commented May 22, 2020

@Myoldmopar It is ready for review.

@nrel-bot-2b
Copy link

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

Copy link
Member

@Myoldmopar Myoldmopar left a comment

Choose a reason for hiding this comment

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

I need to investigate the one little unit test to make sure I understand what it is doing. Otherwise the change in precision seems reasonable, and having to make small tweaks to the unit test values is also quite expected.

Real64 RatedInletWetBulbTemp = 19.44; // 19.44 or 67F
Real64 RatedInletAirHumRat = 0.01125; // Humidity ratio corresponding to 80F dry bulb/67F wet bulb
Real64 RatedInletWetBulbTemp = 19.4444; // 19.44 or 67F
Real64 RatedInletAirHumRat = 0.0111847; // Humidity ratio corresponding to 80F dry bulb/67F wet bulb
Copy link
Member

Choose a reason for hiding this comment

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

I wish these could be declared on some single location, but regardless these seem completely valid.

EXPECT_NEAR(0.788472, DXCoil(1).RatedSHR(1), 0.0000001);
EXPECT_NEAR(0.0003944, CBF_calculated, 0.0000001);
EXPECT_NEAR(0.792472, DXCoil(1).RatedSHR(1), 0.0000001);
EXPECT_NEAR(0.00213735, CBF_calculated, 0.0000001);
Copy link
Member

Choose a reason for hiding this comment

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

That small change on SHR caused a pretty big difference in the bypass factor. I don't disagree, just noting.

Real64 Twet = 19.4444;
Real64 RatedW = Psychrometrics::PsyWFnTdbTwbPb(Tdb, Twet, 101325.0);
EXPECT_NEAR(RatedInletAirHumRat, RatedW, 0.000001);
}
Copy link
Member

Choose a reason for hiding this comment

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

This is kind of a funny little unit test. Where is RatedInletAirHumRat declared?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Myoldmopar The RatedInletAirHumRat is defined at line 159 in DXCoils as below:

Real64 const RatedInletAirHumRat(0.0111847); // Humidity ratio corresponding to 80F dry bulb/67F wet bulb

Copy link
Member

Choose a reason for hiding this comment

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

I see. OK, thanks!

@Myoldmopar
Copy link
Member

@lgu1234 the code changes seem fine. This needs a new set of CI results, and there are some conflicts. I'll take care of them shortly and let CI respond and then I'll take another look.

@Myoldmopar
Copy link
Member

OK, I pulled, merged and resolved conflicts, built, and tested locally. All is well. If CI approves I think this is ready.

@Myoldmopar
Copy link
Member

OK, I think it's time to pull the trigger on this one. I think CI might be all done catching up from the busy workweek so this shouldn't start throwing diffs as long as other branches get develop pulled in. Thanks @lgu1234

@Myoldmopar Myoldmopar merged commit 4be2b38 into develop Jun 27, 2020
@Myoldmopar Myoldmopar deleted the 172827102-Issue5934 branch June 27, 2020 12:46
# for free to join this conversation on GitHub. Already have an account? # 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