Surf heat balance arrays naming and initialization#8820
Surf heat balance arrays naming and initialization#8820mjwitte merged 18 commits intoNatLabRockies:developfrom
Conversation
|
@mjwitte This PR is ready for review as a follow-up of the last surface HB struct branch. However, I'm puzzled by the 0.064% performance done CI showed. Again, tested and profiled locally, the run time of this branch doe not show a consistent speed up and down comparing with the develop branch. The run time fluctuation between two runs is way larger than the CI performance diff and it's hard to tell. |
|
Are you expecting any performance changes here? This looks mostly like naming conventions. I would ignore any fluctuations in the ranges you are looking at. |
mjwitte
left a comment
There was a problem hiding this comment.
Looks good. A few comments.
| where | ||
|
|
||
| \emph{FractDifShortZtoZ(OtherZoneNum,ZoneNum)} = ``diffuse solar exchange factor'' = fraction of short-wave radiation in \emph{OtherZoneNum} that is transmitted to \emph{ZoneNum}. This factor is calculated in subroutine ComputeDifSolExcZonesWIZWindows taking into account multiple reflection between zones. For example, for two zones means that some of the radiation transmitted from Zone1 to Zone2 is reflected back to Zone1, and some of this is in turn reflected back to Zone2, etc. | ||
| \emph{ZoneFractDifShortZtoZ(OtherZoneNum,ZoneNum)} = ``diffuse solar exchange factor'' = fraction of short-wave radiation in \emph{OtherZoneNum} that is transmitted to \emph{ZoneNum}. This factor is calculated in subroutine ComputeDifSolExcZonesWIZWindows taking into account multiple reflection between zones. For example, for two zones means that some of the radiation transmitted from Zone1 to Zone2 is reflected back to Zone1, and some of this is in turn reflected back to Zone2, etc. |
There was a problem hiding this comment.
These may change with the addition of Spaces. And probably should be enclosure, but that's for the final frontier explorer to work out.
| SumHATsurf += state.dataHeatBal->HConvIn(SurfNum) * state.dataSurface->SurfWinFrameArea(SurfNum) * | ||
| (1.0 + state.dataSurface->SurfWinProjCorrFrIn(SurfNum)) * state.dataSurface->SurfWinFrameTempSurfIn(SurfNum); | ||
| SumHATsurf += state.dataHeatBalSurf->SurfHConvInt(SurfNum) * state.dataSurface->SurfWinFrameArea(SurfNum) * | ||
| (1.0 + state.dataSurface->SurfWinProjCorrFrIn(SurfNum)) * state.dataSurface->SurfWinFramerTempIn(SurfNum); |
There was a problem hiding this comment.
SurfWinFramerTempIn should be SurfWinFrameTempIn.
| Array3D<Real64> SUNCOSTS = Array3D<Real64>(60, 24, 3); // Timestep values of solar direction cosines | ||
| Array2D<Real64> BSDFTempMtrx; // Temporary matrix for holding axisymmetric input | ||
| EPVector<DataBSDFWindow::BSDFWindowGeomDescr> ComplexWind; // Window geometry structure: set in CalcPerSolarBeam/SolarShading | ||
| Array2D<Vector3<Real64>> SUNCOSTS = Array2D<Vector3<Real64>>(60, 24); // Timestep values of solar direction cosines |
|
|
||
| // Integer Variables for the Heat Balance Simulation | ||
| Array1D_int SUMH; // From Old Bldctf.inc | ||
| Array1D_int SurfCurrNumHist; // From Old Bldctf.inc |
There was a problem hiding this comment.
That's an interesting name change - with much clearer meaning.
| } | ||
|
|
||
| // Flux of diffuse solar in each zone | ||
|
|
||
| state.dataHeatBal->EnclSolQSDifSol = 0.0; | ||
| // state.dataHeatBal->EnclSolQSDifSol = 0.0; |
| @@ -3558,19 +3557,20 @@ void InitIntSolarDistribution(EnergyPlusData &state) | |||
|
|
|||
| for (int enclosureNum = 1; enclosureNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclosureNum) { | |||
|
|
|||
| if (state.dataHeatBalSurf->RecDifShortFromZ(enclosureNum)) { | |||
| if (state.dataHeatBalSurf->ZoneRecDifShortFromZ(enclosureNum)) { | |||
There was a problem hiding this comment.
So, here it seems clear that ZoneRecDifShortFromZ is an enclosure variable, I think?
| } | ||
| } | ||
|
|
||
| void DetermineMaxBackSurfaces(EnergyPlusData &state) |
There was a problem hiding this comment.
Interesting that this function was present but never used ever since BSDF was added.
|
@mjwitte Thanks for the review! Comments addressed. |
Pull request overview
The branch includes a lot of renaming and relocating surface heat balance arrays in
DataSurface,DataHeatBalanceandDataHeatBalSurface. Other minor changes are mostly inSolarShading.cc, including:SUNCOSTSandSurfSunCosHourlyto 2D of Vector3 arrays to avoid slicing and reconstructions.Enclonly arrays from Zone to Enclosure.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.