-
Notifications
You must be signed in to change notification settings - Fork 389
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 slinky ground heat exchanger simulation model #4692
Conversation
Changes caused regression diffs which need to be addressed.
QGLHE is still not initialized at the beginning of each environment.
@mmAtTs Good stuff but why the |
That was my doing @DeadParrot. Although some of the devs have an understanding of what an instance is, some don't. Putting the this pointer in there was my way of being clear when referencing a class instance variable or method. I'm sure the compiler doesn't care and creates the same assembly either way, so it shouldn't make any difference on performance. I won't take any hard stand on the issue, just keep in mind the status of the development team when discussing it. |
@Myoldmopar OK. I agree that it makes no difference to the compiled code: this issue is whether it helps users more than it hinders them. I can see some points in its favor. The factors I see are:
It would be a good idea to set up some standards before the code becomes a mish-mosh of different styles. C++ offers too much stylistic freedom to let everyone do their own thing. |
Still has issue where QGLHE is not initialized at the beginning of each environment. I haven't been able to track this bug down yet.
@Myoldmopar @lgentile it has been 7 days since this pull request was last updated. |
…roundHeatExchanger into calcGroundHeatExchanger because a separate function to update the object was no longer needed.
Conflicts: src/EnergyPlus/GroundHeatExchangers.cc
Modifying idd/Energy+.idd.in Adding GSHP:Slinky to the DataPlant.cc and PlantManger.cc, among others. Some cleanup related to merging with develop that was missed earlier.
…t building getInput now.
Finishing the major changes to GetGroundHeatExchangerInput.
…ical slinky g-function code and integrate with plantloops.
@mmAtTs @Myoldmopar @lgentile it has been 7 days since this pull request was last updated. |
@Myoldmopar could you look at this briefly and let me know if I'm headed in a good direction WRT unit testing. I'm pretty much done implementing the g-function generation code and am planning to move on to GLHESlinky::calcGroundHeatExchanger tomorrow. |
|
||
Real64 | ||
GLHESlinky::distance( | ||
int const m, |
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.
Random note; some of these function signatures should have indented arguments. Others already do. Just noting.
@mmAtTs Holy shoot this is looking so good, it's exciting. With the performance PR merged in, you are now out of date with develop -- again -- sorry -- but it had to happen sometime. Anyway, I can assist with resolving conflicts. OK, I resolved them and pushed with beef0f7. The conflicts were pretty minor so just take a quick pass at the updated As for your comment, you were saying you were still passing indices into functions? Could you give an example? |
sqrtAlphaT = std::sqrt( diffusivityGround * t ); | ||
|
||
distance = distToCenter( m, n, m1, n1 ); | ||
sqrtDistDepth = std::sqrt( std::pow( distance, 2.0 ) + 4 * std::pow( coilDepth, 2.0 ) ); |
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.
Performance note: pow_2( x ) is faster than std::pow( x, 2 ) and should be preferred. Yes, these really add up to matter in some of our profiles. We have pow_2 through pow_9 and a few others in ObjexxFCL/Fmath.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.
Thanks @DeadParrot, your eagle eyes are very helpful! I do have a performance sub-checklist on my review checklist, so I've added this as another thing to watch for in PRs.
@Myoldmopar @DeadParrot thanks for the tips. I will get it cleaned up. |
@Myoldmopar Currently the arrays holding the (X,Y,Z) coordinates for each ring live here at the object level. We're looping through all possible combinations of rings here and then within that, to get the distances between any pair of rings, I just pass the correct indices through several functions to the distance function. Would it be easier for unit testing purposes to just pass the (X,Y,Z) center values for each pair of rings through, or can we make this work. |
@Myoldmopar to clarify how the "member array" hack works in ObjexxFCL, because name() is already set up as a member for all 1D arrays We may want to discourage new use of member array syntax but for common usage such as |
… platforms. Still needed: -Final g-function validation -Final slinky model validation. -Current relative diffs for the vertical borehole models are around 10^-3. One final pass to track those down, if possible. -Potentially the most important issue of all: resolving why "DisplayString" is not printing "Calculating g-Functions" to the terminal.
… midFieldResponseFunction.
Looks like it might still be having trouble with Name. I will look tomorrow morning, but it might be that the .Name() is still being used inside the sim routine. Maybe. Just guessing while on my phone... |
@mmAtTs OK, I got it building with commit beef740. I also cleanup up some unneeded trailing semicolons. I didn't actually run it, but it should at least build now. It is very interesting that Windows seemed to build that just fine. One thing to note is that in the Sim function, we won't be able to do the string comparison to check which type we have; it will be too slow. I think it's probably time to bite the bullet and store pointers to the base class in a single array rather than two separate arrays, one per type. Let's chat today about it. |
…nto 1540218-SlinkyGroundHX
… unused timeSS from GLHESlinky::getAnnualTimeConstant.
…sistency with current code.
…base 10, and vertical GLHEs are log base e.
@mmAtTs @Myoldmopar @lgentile it has been 7 days since this pull request was last updated. |
@mmAtTs the test results look good, just tiny diff's in a few files, I'm guessing similar to what you were seeing locally. I think this is ready to merge, let me know if you were all doing anything else. |
@Myoldmopar let's hold off for a little bit. I just tracked down the source of the tiny diffs. I'm going to push that right now. Pending CI and any recommendations from you or others on the unit tests, it should be good. |
…. Other minor cleanups.
…nto 1540218-SlinkyGroundHX
Changing to pass in typeNum rather than type to avoid long string comparisons.
Oh, @mmAtTs the CI results might turn red due to diffs since develop has moved since your commit. I'll look over the results and deem whether we need to merge develop or not. |
The diffs are all the same from the commit earlier into develop; nothing to do with your branch. Merging in now. Thanks for this @mmAtTs.
Making this a PR for convenience for conversation.