-
Notifications
You must be signed in to change notification settings - Fork 393
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
Surface Window data struct & heat balance routines refactoring #8257
Conversation
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.
@xuanluo113 I've merged in develop, resolved some minor conflicts and updated this branch.
Unit tests run locally all pass.
CI is looking good so far. In general, this all looks good - variable naming clarifications and loop variable scope reductions. A few comments/questions:
src/EnergyPlus/DataGlobals.cc
Outdated
@@ -257,6 +257,7 @@ namespace DataGlobals { | |||
std::function<void(EnergyPlus::Error e, const std::string &)> errorCallback; | |||
|
|||
bool eplusRunningViaAPI; | |||
double timer_1(0.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.
Did you intend to keep this here?
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.
No. Left by mistake. Just deleted these.
src/EnergyPlus/DataHeatBalSurface.cc
Outdated
Array1D<Real64> ZoneVMULT; // 1/(Sum Of A Zone's Inside Surfaces Area*Absorptance) | ||
Array1D<Real64> ZoneVCONV; // Fraction Of Short-Wave Radiation From Lights Converted To Convection |
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.
These (and others) are really enclosure variables, not zone, indexed on enclosureNum
(or similar). Also, solar and radiant enclosures can be different. Seems like we should use different prefixes for enclosures? SolEncl...
RadEncl...
?
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.
I renamed ZoneVMULT
and QD's to use
SolEnclprefix. I realized
QC,
QDVand
VCONV` are allocated but not used anymore, so I deleted them.
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.
Looking at this now, I realize that this should be EnclSol
to match the pattern of SurfOpaq
SurfWin
etc. It's your call whether to change that in this branch or in your next phase. Sorry I didn't see that before.
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.
Makes sense. I renamed it at the latest commit.
if (BuildingShadingCount || FixedShadingCount || AttachedShadingCount) { | ||
for (int SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) { | ||
if (!Surface(SurfNum).ShadowingSurf) continue; |
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.
Since all shading surfaces are at the top of the surface list, we should be able to add a new variable for TotShadingSurfaces
(or ShadingSurfaceLast
or similar name) and loop here from 1 to TotShadingSurfaces
.
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.
I'm actually working on this at the other branch, but haven't fully tested this piece yet. Do we want to pull that piece in this one? I was hoping this can go first so I'm not blocking Matt.
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.
This is ok here. It can wait for your next phase.
src/EnergyPlus/DataHeatBalSurface.cc
Outdated
// for reporting (W) | ||
Array1D<Real64> TempSurfOut; // Temperature of the Outside Surface for each heat transfer surface | ||
Array1D<Real64> SurfTempSurfOut; // Temperature of the Outside Surface for each heat transfer surface |
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.
Minor, but names like this which already have Surf
in them could simply be SurfTempOut
.
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.
I renamed this globally.
@xuanluo113 Also, please edit the PR description at the top with a brief summary of the changes. |
@mjwitte Thanks for the review. I address them and updated the PR overview. |
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.
@xuanluo113 Thanks for addressing my comments.
@Myoldmopar I'm finished reviewing this. Let me know if you want to review before merging.
Let it go in, I don't have anything further. |
@mjwitte @Myoldmopar thanks! |
Pull request overview
This branch includes refactoring of the HB related data structures and scope reduction in
InitSolarHeatGains
. In detail, the changes include:e.g. Surf (for all surfaces), SurfWin, SurfOpaq
e.g. Surface(SurfNum).FrameDivider > 0
e.g. CalcSolRefl
e.g. TDD diffusers and TDD shelves
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.