-
Notifications
You must be signed in to change notification settings - Fork 425
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
Bypass interior solar distribution calculation at night #8182
Conversation
// IntDifIncInsSurfAmountRep(SurfNum) = IntDifIncInsSurfIntensRep(SurfNum) * & | ||
// (Surface(SurfNum)%Area + SurfaceWindow(SurfNum)%DividerArea) | ||
// IntDifIncInsSurfAmountRepEnergy(SurfNum) = IntDifIncInsSurfAmountRep(SurfNum) * TimeStepZoneSec | ||
if (SunIsUp) { |
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.
Do any variables need to be set to 0 when the sun is down? I wonder if the last time these variables were calculated when the sun was up will be used during the night. Maybe they are set to 0 elsewhere.
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.
@rraustad There are 3 variables inside section:
IntBmIncInsSurfIntensRep(SurfNum)
IntBmIncInsSurfAmountRep(SurfNum)
IntBmIncInsSurfAmountRepEnergy(SurfNum)
The variables are initialized at 0 in the beginning of InitSolarHeatGains before calling InitIntSolarDistribution. Therefore, no additional initialization is needed.
This is clean modification for performance. I will update the branch, run the unit tests locally and push the branch. |
@Myoldmopar Run the unit test locally and all passed. If the CI machine comes clean, this branch can be merged in. |
Thanks for looking it over and running tests, @Nigusse. CI looks happy so far, I'll take a final peek and if all is well it should merge in the morning. |
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.
Looks like primarily just formatting cleanup here, and that the actual functional changes are minimal. I share @rraustad's concern that skipping over the functionality could end up leaving variables with previous data. I see you have determined which variables are used and that they are properly initialized, so I will take that, and also rely on CI to show whether this causes any unexpected diffs.
And as I already noted, CI is not showing any diffs at all, so I feel good about these changes. I'm going to pull in develop locally just to verify, but I assume this will go in shortly. |
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.
The report variables are already initialized earlier. I am okay with the current fix.
@lgu1234 there wasn't an issue or Pivotal ticket for this, was there? If so assign them to me so I can close them. |
@Myoldmopar This PR does not have an issue and an associated Pivotal ticket. Thanks. |
@Nigusse I just created an issue as Bypass interior solar distribution calculation at night #8201and a Pivotal ticket as #174304363. |
Pull request overview
LBL identified 20 hotspots for speed improvement. InitIntSolarDistribution is one of hotspots. The interior solar distribution calculation is performed every time step. The present check-in bypasses the calculation at night, because no solar is available at night.
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.