-
Notifications
You must be signed in to change notification settings - Fork 378
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
Fix Window Heat Transfer and Solar Out Window output reporting #10444
Conversation
Tagging this for v24.1, because the change in the Window Heat Gain/Loss outputs is dramatic for highly glazed spaces. But there is still some QA work to be done on these changes, so it may need to wait for v24.2. There is a small output change that can be reverted if this is a go for v24.1. |
Could you provide a walk-thru, and discuss the "* transmittance" versus "* (1 - Reflectance)" changes and why. |
I'm really looking forward to these improvements. We've been providing disaggregated heating/cooling loads by component for many years and have never gotten the sum of all components to perfectly match the total building load, with windows being the primary culprit. It would be nice if the somewhere in the documentation it clearly stated which individual heat transfer components add up to the total window heat transfer. |
I'm also happy to test these changes across a range of our residential models, let me know when you think it is worth testing. |
I noticed this in CppCheck. If no other changes this can be cleaned out later. |
Well, that's only been in there for 3 yrs. Removed. |
state.dataConstruction->Construct(surface.Construction).TransDiff; | ||
state.dataSurface->SurfWinLossSWZoneToOutWinRep(SurfNum) = | ||
state.dataHeatBal->EnclSolQSWRad(surface.SolarEnclIndex) * surface.Area * | ||
(1 - state.dataConstruction->Construct(surface.Construction).ReflectSolDiffBack); |
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.
Isn't part of (1-ReflectSolDiffBack) absorbed by the window on the way out? and therefore doesn't make it out?
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.
Isn't part of (1-ReflectSolDiffBack) absorbed by the window on the way out? and therefore doesn't make it out?
Yes, some is absorbed. If your boundary volume is the inside face, then (1-Reflected) has already made it out. If some gets absorbed, then that's accounted for in the convective/radiative exchange for the glass.
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.
First walkthru.
// Calculate window heat gain for TDD:DIFFUSER since this calculation is usually done in WindowManager | ||
state.dataSurface->SurfWinHeatGain(SurfNum) = |
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.
Move this down, because all of the components are being calculated twice.
state.dataSurface->SurfWinLossSWZoneToOutWinRep(SurfNum) = state.dataHeatBal->EnclSolQSWRad(surface.SolarEnclIndex) * surface.Area * | ||
state.dataConstruction->Construct(surface.Construction).TransDiff; | ||
state.dataSurface->SurfWinLossSWZoneToOutWinRep(SurfNum) = | ||
state.dataHeatBal->EnclSolQSWRad(surface.SolarEnclIndex) * surface.Area * | ||
(1 - state.dataConstruction->Construct(surface.Construction).ReflectSolDiffBack); |
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.
Here and below, calcs just for TDD:Diffuser. Switch this component to use (1-ReflectSolDiffBack)
instead of TransDiff
.
state.dataSurface->SurfWinHeatGain(SurfNum) = | ||
state.dataSurface->SurfWinTransSolar(SurfNum) + state.dataSurface->SurfWinGainConvGlazToZoneRep(SurfNum) + | ||
state.dataSurface->SurfWinGainIRGlazToZoneRep(SurfNum) - state.dataSurface->SurfWinLossSWZoneToOutWinRep(SurfNum) - | ||
surface.Area * state.dataHeatBalSurf->SurfWinInitialDifSolInTrans(SurfNum); |
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.
Calculate SurfWinHeatGain
here, after all of the components have been calculated to avoid duplicate calcs. Also add the - surface.Area * state.dataHeatBalSurf->SurfWinInitialDifSolInTrans(SurfNum)
term.
@@ -6731,10 +6731,6 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) | |||
(AbsBlDiffBack * RGlDiffFront / (1.0 - RhoBlDiffBack * RGlDiffFront)) * | |||
(RGlFront * TBlBmBm * RhoBlBack + TBlBmDiff); | |||
state.dataSolarShading->SurfWinExtBeamAbsByShadFac(SurfNum) = AbsShade * CosInc * SunLitFract * InOutProjSLFracMult; | |||
if (state.dataEnvrn->Month == 7 && state.dataEnvrn->DayOfMonth == 21 && state.dataGlobal->HourOfDay == 8) { |
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.
Remove old debug code.
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.
lol
// Should be just total less reflected | ||
Real64 DifSolarTransIntoW = WinDifSolarTrans_Factor - DifSolarReflW; | ||
|
||
// Accumulate transmitted diffuse solar for reporting | ||
state.dataHeatBalSurf->SurfWinInitialDifSolInTrans(HeatTransSurfNum) += DifSolarTransW * per_HTSurfaceArea; | ||
state.dataHeatBalSurf->SurfWinInitialDifSolInTrans(HeatTransSurfNum) += DifSolarTransIntoW * per_HTSurfaceArea; |
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.
Use total incoming minus reflected for initial solar out window. Similar calcs appear in multiple places for different window types.
TransDiff; | ||
state.dataSurface->SurfWinHeatGain(SurfNum) -= state.dataSurface->SurfWinLossSWZoneToOutWinRep(SurfNum); | ||
(1 - ReflDiff); | ||
state.dataSurface->SurfWinHeatGain(SurfNum) -= | ||
(state.dataSurface->SurfWinLossSWZoneToOutWinRep(SurfNum) + | ||
state.dataHeatBalSurf->SurfWinInitialDifSolInTrans(SurfNum) * state.dataSurface->Surface(SurfNum).Area); |
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.
Use (1-Reflectance) for Shortwave from Zone Out Window, and also subtract the Initial Diffuse Out Window term from SurfWinHeatGain
. This appears in multiple places.
@@ -7371,7 +7379,7 @@ namespace WindowManager { | |||
state.dataConstruction->Construct(ThisNum).VisTransNorm = TransVisNorm; | |||
state.dataConstruction->Construct(ThisNum).SolTransNorm = TransSolNorm; | |||
|
|||
static constexpr std::string_view Format_700(" WindowConstruction,{},{},{},{},{:.3R},{:.3R},{:.3R},{:.3R}\n"); | |||
static constexpr std::string_view Format_700(" WindowConstruction,{},{},{},{},{:.3R},{:.3R},{:.3R},{:.3R},{:.3R},{:.3R}\n"); |
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.
Extend format so that Solar and Visible Transmittance values are written to eio for the WindowConstruction report.
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.
Walkthru part 2. This still needs some unit tests, but I'm marking this ready for review. I'll add another comment showing some before/after results for solar and energy balance.
|
||
\subsubsection{Surface Window Heat Gain Energy {[}J{]}}\label{surface-window-heat-gain-energy-j} | ||
\subsubsection{Surface Window Net Heat Transfer Energy {[}J{]}}\label{surface-window-net-heat-transfer-rate-j} |
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.
Update this section use actual output variable names for the components, add missing components, and delete duplicate list of components. Reviewers, please read these doc changes carefully to see if they make sense.
@@ -3803,7 +3765,7 @@ \subsubsection{Surface Storm Window On Off Status {[]}}\label{surface-storm-wind | |||
|
|||
\subsubsection{Surface Inside Face Initial Transmitted Diffuse Transmitted Out Window Solar Radiation Rate {[}W{]}}\label{surface-inside-face-initial-transmitted-diffuse-transmitted-out-window-solar-radiation-rate-w} | |||
|
|||
As of Version 2.1, the diffuse solar transmitted through exterior windows that is initially distributed to another window in the zone and transmitted out of the zone through that window. For exterior windows, this transmitted diffuse solar is ``lost'' to the exterior environment For interior windows, this transmitted diffuse solar is distributed to heat transfer surfaces in the adjacent zone, and is part of the Surface Inside Face Initial Transmitted Diffuse Absorbed Solar Radiation Rate for these adjacent zone surfaces. | |||
As of Version 2.1, the diffuse solar transmitted through exterior windows that is initially distributed to another window in the zone and transmitted out of the zone through the inside face of the window. Some of this will be absorbed in the window layers and some will be transmitted through. For exterior windows, transmitted diffuse solar is ``lost'' to the exterior environment. For interior windows, this transmitted diffuse solar is distributed to heat transfer surfaces in the adjacent zone, and is part of the Surface Inside Face Initial Transmitted Diffuse Absorbed Solar Radiation Rate for these adjacent zone surfaces. |
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.
Update the description for Surface Inside Face Initial Transmitted Diffuse Transmitted Out Window Solar Radiation Rate to explain that the boundary volume is the inside face of the glass or window assembly.
|
||
\subsubsection{Surface Window Inside Face Frame and Divider Zone Heat Gain Rate {[}W{]}}\label{surface-window-inside-face-frame-and-divider-zone-heat-gain-rate-w} | ||
|
||
This is the heat transfer from any frames and/or dividers to the zone in watts. This output variable is the term called ``{[}Conduction to zone from window frame and divider, if present{]}'' under the description above for Surface Window Heat Gain Rate output variable. (The word ``conduction'' here is used because the models is simplified compared to the complexities of surface convection and radiation.) | ||
This is the convective heat transfer from any frames and/or dividers to the zone in watts. Negative values imply heat flow to the exterior. The Surface Window Frame Inside Temperature and Surface Window Divider Inside Temperature are computed from a heat balance on the frame/divider that includes solar radiation, long-wave radiation, convection, and conduction. The frame/divider is then included in the zone heat balance via convection at this inside temperature. See Engineering Reference ``Window Frame and Divider Calculation'' for more details. |
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.
Add some clarification to Surface Window Inside Face Frame and Divider Zone Heat Gain Rate.
@@ -3819,11 +3781,11 @@ \subsubsection{Surface Window Inside Face Glazing Net Infrared Heat Transfer Rat | |||
|
|||
\subsubsection{Surface Window Shortwave from Zone Back Out Window Heat Transfer Rate {[}W{]}}\label{surface-window-shortwave-from-zone-back-out-window-heat-transfer-rate-w} | |||
|
|||
This is the short-wave radiation heat transfer from the zone back out the window in watts. This is a measure of the diffuse short-wave light (from reflected solar and electric lighting) that leave the zone through the window. This output variable is the term called ``{[}Short-wave radiation from zone transmitted back out the window{]}'' under the description above for Surface Window Heat Gain Rate output variable. | |||
This is the short-wave radiation heat transfer from the zone back out the inside face of the window in watts. This is a measure of the diffuse short-wave light (from beam and diffuse solar and electric lighting) that leaves the zone through the window. |
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.
Update Surface Window Shortwave from Zone Back Out Window Heat Transfer Rate to add interior incident beam (from FullInterior solar distribution) and explain the inside face boundary volume.
Real64 AbsBeamTotWin = 0.0; // Sum of window glass layer beam solar absorptances | ||
Real64 TransBeamWin = 0.0; // Beam solar transmittance of a window | ||
Real64 AbsBeamTotWin = 0.0; // Sum of window glass layer beam solar absorptances | ||
Real64 backSurfBeamSolInTrans = 0.0; // Fraction of BeamSolarRad transmitted out through window inside face [W] |
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.
Track interior beam solar that enters a back surface that's a window.
state.dataSurface->SurfWinTransSolar(SurfNum) + ConvHeatGainWindow + NetIRHeatGainWindow + ConvHeatFlowNatural; | ||
state.dataSurface->SurfWinTransSolar(SurfNum) + ConvHeatGainWindow + NetIRHeatGainWindow + ConvHeatFlowNatural - | ||
(state.dataSurface->SurfWinLossSWZoneToOutWinRep(SurfNum) + | ||
state.dataHeatBalSurf->SurfWinInitialDifSolInTrans(SurfNum) * state.dataSurface->Surface(SurfNum).Area); |
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.
Subtract missing solar leaving components from SurfWinHeatGain
for equivalent layer windows.
state.dataSurface->SurfWinHeatGain(SurfNum) -= state.dataSurface->SurfWinLossSWZoneToOutWinRep(SurfNum); | ||
(1 - reflDiff) + | ||
state.dataHeatBalSurf->SurfWinInitialBeamSolInTrans(SurfNum); | ||
state.dataSurface->SurfWinHeatGain(SurfNum) -= |
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.
Subtract missing solar leaving components from SurfWinHeatGain
for regular windows.
state.dataSurface->SurfWinHeatGain(SurfNum) -= state.dataSurface->SurfWinLossSWZoneToOutWinRep(SurfNum); | ||
(1 - ReflDiff) + | ||
state.dataHeatBalSurf->SurfWinInitialBeamSolInTrans(SurfNum); | ||
state.dataSurface->SurfWinHeatGain(SurfNum) -= |
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.
Subtract missing solar leaving components from SurfWinHeatGain
for complex windows.
See #10444 (comment) for before/after results with FullExterior solar distribution. Zip of working folder attached (with idfs, outputs, and xlsx). Results after fix for FullInteriorAndExterior. Not perfect, but all within 1% balance. Results are similar for FullInteriorAndExteriorWithReflections. |
I tested this on one of our residential files and, using the output variables described in the documentation, got excellent agreement between the individual window heat transfer components and the net heat transfer energy. Looks good to me, thanks @mjwitte! |
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 going to hold from approve/reject to hear back about the parentheses issue. Otherwise this looks fine.
@@ -6731,10 +6731,6 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) | |||
(AbsBlDiffBack * RGlDiffFront / (1.0 - RhoBlDiffBack * RGlDiffFront)) * | |||
(RGlFront * TBlBmBm * RhoBlBack + TBlBmDiff); | |||
state.dataSolarShading->SurfWinExtBeamAbsByShadFac(SurfNum) = AbsShade * CosInc * SunLitFract * InOutProjSLFracMult; | |||
if (state.dataEnvrn->Month == 7 && state.dataEnvrn->DayOfMonth == 21 && state.dataGlobal->HourOfDay == 8) { |
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.
lol
src/EnergyPlus/SolarShading.cc
Outdated
@@ -12603,7 +12618,7 @@ void CalcInteriorWinTransDifSolInitialDistribution(EnergyPlusData &state, | |||
|
|||
// Accumulate transmitted diffuse solar for reporting | |||
state.dataHeatBalSurf->SurfWinInitialDifSolInTrans(HeatTransSurfNum) += | |||
(DifSolarTransW / state.dataSurface->Surface(HeatTransSurfNum).Area); | |||
(SolarTrans_ViewFactor - DifSolarReflW / state.dataSurface->Surface(HeatTransSurfNum).Area); |
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.
Are the parentheses wrong on this one? It is different from the others.
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 You are right, the parentheses are wrong. It seem that it should be:
(SolarTrans_ViewFactor - DifSolarReflW) / state.dataSurface->Surface(HeatTransSurfNum).Area;
I did not run example to confirm this. However, there are other parts using the same equation:
EnergyPlus/src/EnergyPlus/SolarShading.cc
Lines 12441 to 12442 in f3c55b3
state.dataHeatBalSurf->SurfWinInitialDifSolInTrans(HeatTransSurfNum) += | |
(SolarTrans_ViewFactor - DifSolarReflW) / state.dataSurface->Surface(HeatTransSurfNum).Area; |
and
EnergyPlus/src/EnergyPlus/SolarShading.cc
Lines 12511 to 12512 in f3c55b3
state.dataHeatBalSurf->SurfWinInitialDifSolInTrans(HeatTransSurfNum) += | |
(SolarTrans_ViewFactor - DifSolarReflW) / state.dataSurface->Surface(HeatTransSurfNum).Area; |
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, good catch! Fixed. This line is in a section of code that is distributing initial diffuse from an interior window to another window in the receiving zone that has a shading device. This is not currently covered by unit or integration tests. Hoping to improve the coverage.
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 have no further comments. Approving this merge.
Diffs don't look to have changed since before, and everything is happy on CI. Thanks for fixing the parentheses and adding the some extra testing. Let's call this one done. Thanks @mjwitte and @rraustad and @vidanovic! |
Pull request overview
state.dataHeatBal->SurfWinInitialDifSolInTransReport, SurfWinInitialDifSolInTrans
) and "Surface Window Shortwave from Zone Back Out Window Heat Transfer Rate" (state.dataSurface->SurfWinLossSWZoneToOutWinRep
) to be (1-Reflected) solar. Previously, these were calculated using the diffuse transmittance which omits the solar absorbed in the glass on the way out.Expected Diffs
ToDo List
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.