-
Notifications
You must be signed in to change notification settings - Fork 422
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
Implement new gas steam humidifier simulation model #4740
Conversation
Conflicts: src/EnergyPlus/Humidifiers.cc tst/EnergyPlus/unit/CMakeLists.txt
@Myoldmopar @Nigusse @lgentile it has been 7 days since this pull request was last updated. |
@@ -719,8 +719,8 @@ namespace Psychrometrics { | |||
// FUNCTION LOCAL VARIABLE DECLARATIONS: | |||
|
|||
Int64 const Tdb_tag( bit::bit_shift( TRANSFER( T, Grid_Shift ), -Grid_Shift ) ); // Note that 2nd arg to TRANSFER is not used: Only type matters | |||
// Int64 const hash( bit::bit_and( Tdb_tag, psatcache_mask ) ); //Tuned Replaced by below |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nigusse Ummm, why was this changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Myoldmopar. I do not think this change was related to this work. I do remember going through this section of the code when I was creating unit test for gas humidifier. I had to include the "Psychomterics" initialization to circumvent the crash of the unit test for gas humidifier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, well it was changed during this commit. I'll revert the change and pull out bit.hh from the unit test file below and see what happens. Other than these issues, this branch does look really good though. Thanks for the efforts in getting unit tests included and also objectifying the code.
#include <ObjexxFCL/FArray1D.hh> | ||
#include <ObjexxFCL/IOFlags.hh> | ||
#include <ObjexxFCL/gio.hh> | ||
#include <ObjexxFCL/bit.hh> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nigusse I noticed bit.hh is included here as well, but I don't see where it is actually used in here. Is it possible this (and the psychrometric change) is just an artifact from playing around? Or is it intentional? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Myoldmopar. I was trying to resolve the unit test crash. The solution was was to add Psychometric initialization in the unit test. If I changed any in Psychometric it must be accidental. Also the "bit.hh" include was done for the same reason. I guess it may not be required, I did not check after the unit test crash issue was resolved.
@Nigusse This looks good, except for one thing. Humidifiers.cc was almost completely conflicted. The Objexx commit went through and cleaned up the code in Humidifiers at the same time you went through and made it object oriented and the diff engine can't understand what's up. I pulled in develop and just chose @DeadParrot I'm trying to look through the commit in that Objexx branch from January. It's such a big commit, and Git is seeming to show lines changed when I don't see changes. If I push this branch up, with exactly develop's Humidifiers.cc, could you (@DeadParrot) comment on what changes you had made during cleanup? I know some changes are like the stray |
@Nigusse @wfbuhl @DeadParrot @mjwitte OK, I cleaned up this branch, and then I did the merge from develop, first choosing @Nigusse's Humidifiers.cc file directly, then bringing in changes from @wfbuhl's coil/space peak sizing work. EnergyPlus built fine. Once I cleaned up the unit tests, they also built fine. But they fail when trying to execute them:
Maybe something else needs to be initialized on the class before calling SizeHumdifier? Let me know if you have any thoughts. I'd like to get this merged in soon. PS: I also commented out the SQLite initialization in the unit tests; I don't think it's needed anymore, but I could be wrong. If it is we can un-comment it. |
@Myoldmopar The SQLite initialization isn't required anymore (with current develop), however you might still need to keep the regular IO initialization here...
It depends if any of these functions write to IO behind the scenes, but I am less certain about that. Also don't forget to remove the SQLiteProcedures.hh include...
|
@mbadams5 I know I had added an SQLite initialization to one (or more) of my unit tests. We should find those and remove? |
I believe so, but it's definitely not a priority issue right now. Just another thing on the list... |
Oh, but I'll try to remove them as I see them, especially on new additions. |
@mjwitte I cleaned up your unit tests in my pull request, but I may have missed some. |
@Myoldmopar. I think for now just comment out "ErrorsFound = true;" on line # 778. And initialize the "ThermalEffRated" to 1.0. May be add a statement like this: "Thermal Efficiency is set to 1.0 and the simulation continues." |
@Myoldmopar @mjwitte. I believer, the crash should be due to the "ErrorsFound = true;" statement, which I added in the last minute. The SQLITE was working fine. |
@Nigusse I did that, and when I did, the Humidifiers unit tests completed successfully. However, now the PurchasedAirManager unit tests are failing. I traced it in through SizePurchaedAir to the RequestSizing routine where on line 399 the Any thoughts? It's probably just a matter of allocating that global array in the unit test before calling SizePurchasedAir, but frankly I don't want to chase bugs right now if they aren't relevant to the code being merged. |
@Myoldmopar. I have no clue how the humidifier change affects SizePurchaedAir. The humidifier sizing is self contained, it does not use RequestSizing. |
@Nigusse Yeah, that's what I figured. I don't think I'll attempt a fix with it right now. A side investigation is underway to figure out what's up with the PurchasedAirManager tests. OK, I'll check everything on this branch once more, push up a final commit with the unit test issue fixed, and see how things go. |
@Myoldmopar Yes, I can review the Humidifiers diffs when you are ready. If the goal is to bring still-relevant changes into the revised code I can take a shot at that. |
@DeadParrot I have a commit that I'm not pushing up yet, but it is only white-space changes. For some reason, this branch got a bunch of extra spaces following open-parentheses. They aren't affecting anything, and I'm not going to clog up CI right now by pushing that up when other more important commits will come. So, in summary, if you can look through the code, now is a fine time. I'll push my commit tomorrow. Or tonight. |
@Myoldmopar OK, I will look at it tonight. |
@Nigusse don't worry about the failed tests here, they are all just audit and rdd diff's. If @DeadParrot is satisfied after his perusal I think this will be ready to go in. |
Humidifier changes. Red CI results are all audit and rdd diffs. Good to go.
This branch is ready for review.