Skip to content
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

Merged
merged 21 commits into from
May 3, 2024

Conversation

mjwitte
Copy link
Contributor

@mjwitte mjwitte commented Mar 20, 2024

Pull request overview

  • Fixes "Surface Window Net Heat Transfer Energy" does not account for all heat transfer across the windows #10333
  • Correct "Surface Inside Face Initial Transmitted Diffuse Transmitted Out Window Solar Radiation Rate" (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.
  • When using full interior solar distribution, some direct beam solar can leave the zone when it is incident on the inside face of a window (interior or exterior). This component is now added to "Surface Window Shortwave from Zone Back Out Window Heat Transfer Rate".
  • Correct "Surface Window Net Heat Transfer Rate" and related outputs to subtract "Surface Inside Face Initial Transmitted Diffuse Transmitted Out Window Solar Radiation Rate". Previously, this term was omitted, so the window heat gain was overstated. Related outputs include "Surface Window Heat Gain Rate/Energy" and "Surface Window Heat Loss Rate/Energy". Note that there may be significant changes in these outputs for highly glazed enclosures.
  • Fixes eio output for WindowConstruction to write the values for Solar Transmittance at Normal Incidence and Visible Transmittance at Normal Incidence. Previously, the format did not have enough terms, so the last two values were not written. This happened in v22.1 when "Conductance (Before Adjusted) {W/m2-K}" and "Convection Coefficient Adjustment Ratio" were added in Post release I/O changes of the simple glazing frame feature #9117.

Expected Diffs

  • NO mtr diffs because none of the impacted calculations are actually used in the heat balance, they are all side calcs used to generate various output variables.
  • eio diffs due to missing terms in the WindowConstruction report. And equivalent table diffs in the Initialization Summary report, e.g. PurchAirWindowBlind:
- WindowConstruction,WIN-CON-SINGLEPANE,5,1,VerySmooth,5.894,5.894,1.000,0.919
+ WindowConstruction,WIN-CON-SINGLEPANE,5,1,VerySmooth,5.894,5.894,1.000,0.919,0.900,0.900

image

  • eso diffs for any of the affected output variables
  • Table diffs for the Sensible Heat Gain Summary, because Surface Window Heat Gain Energy (and Loss) are used for the "Window Heat Addition/Loss" columns in this report, e.g. percent diff output for _5ZoneAirCooled_annual:

image

ToDo List

  • Unit test
  • I/O Ref updates, maybe Engineering Ref?
  • Confirm that the correct reflectance values have been used for the various window types (normal, complex, and equivalent layer).
  • Demonstrate solar and energy balances with defect file.
  • Check results for all variations of solar distribution (so far FullExterior looks good).
  • Demonstrate solar and energy balances with defect file.
  • Some minor refactoring to avoid extra multiplications.
  • A separate no-diff PR with some additional code cleanup (e.g. reduced variable scope, reference assignments, avoid duplicate code where possible, etc.).

Pull Request Author

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies

Reviewer

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

@mjwitte mjwitte added Defect Includes code to repair a defect in EnergyPlus OutputChange Code changes output in such a way that it cannot be merged after IO freeze labels Mar 20, 2024
@mjwitte
Copy link
Contributor Author

mjwitte commented Mar 21, 2024

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.

@rraustad
Copy link
Contributor

Could you provide a walk-thru, and discuss the "* transmittance" versus "* (1 - Reflectance)" changes and why.

@shorowit
Copy link
Contributor

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.

@shorowit
Copy link
Contributor

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.

@rraustad
Copy link
Contributor

I noticed this in CppCheck. If no other changes this can be cleaned out later.
https://github.com/NREL/EnergyPlus/blob/develop/src/EnergyPlus/SolarShading.cc#L6734-L6737

@mjwitte
Copy link
Contributor Author

mjwitte commented Mar 21, 2024

I noticed this in CppCheck. If no other changes this can be cleaned out later. https://github.com/NREL/EnergyPlus/blob/develop/src/EnergyPlus/SolarShading.cc#L6734-L6737

Well, that's only been in there for 3 yrs. Removed.

@mjwitte mjwitte removed the OutputChange Code changes output in such a way that it cannot be merged after IO freeze label Mar 21, 2024
@mjwitte
Copy link
Contributor Author

mjwitte commented Mar 21, 2024

Could you provide a walk-thru, and discuss the "* transmittance" versus "* (1 - Reflectance)" changes and why.

Here's the I/O Reference definition for Window Heat Gain for an unshaded window:

The total heat flow to the zone from the glazing, frame and divider of an exterior window when the total
heat flow is positive.
For a window without an interior shading device, this heat flow is equal to:
• [Surface Window Transmitted Solar Radiation Rate (see definition, above)]
• [Convective heat flow to the zone from the zone side of the glazing]
• [Net IR heat flow to the zone from zone side of the glazing]
• [Short-wave radiation from zone transmitted back out the window]
• [Convection to zone from window frame and divider, if present]
Here, short-wave radiation is that from lights and diffuse interior solar radiation.
The total window heat flow can also be thought of as the sum of the solar and conductive gain to the
zone from the window.

The first term, solar transmitted into the zone, as well as the convective and IR heat flow, are at the boundary volume of the inside face of the window surface. So the shortwave that leaves the zone should also be at the inside face, thus OutgoingSolarOrShortwave*(1-Reflectance). Any energy absorbed in the glass on the way in or out will be accounted for in the glass temperature that impacts the convective and IR heat flow.

Stepping back from the heat gain, I first tried to balance just the solar components, expecting that:
Zone Windows Total Transmitted Solar Radiation Energy = Sum Opaque Surface Inside Face Solar Radiation Heat Gain Energy + Sum Surface Window Shortwave from Zone Back Out Window Heat Transfer Energy + Sum Surface Inside Face Initial Transmitted Diffuse Transmitted Out Window Solar Radiation Energy.

Here's the solar balance before and after for the defect file (which is a box with four walls that are nearly 100% glazing) with FullExterior solar distribution:
Develop:
image
This Branch:
image

Not perfect, but balancing within 0.2% is much better than 8%.

Then I tried the same with FullInteriorAndExterior, and the imbalance ranges from 0.8 to 6%, highest in the winter months. Looks like we need yet another window variable to track beam solar that leaves out a window.

state.dataConstruction->Construct(surface.Construction).TransDiff;
state.dataSurface->SurfWinLossSWZoneToOutWinRep(SurfNum) =
state.dataHeatBal->EnclSolQSWRad(surface.SolarEnclIndex) * surface.Area *
(1 - state.dataConstruction->Construct(surface.Construction).ReflectSolDiffBack);
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

@mjwitte mjwitte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First walkthru.

Comment on lines -8103 to -8104
// Calculate window heat gain for TDD:DIFFUSER since this calculation is usually done in WindowManager
state.dataSurface->SurfWinHeatGain(SurfNum) =
Copy link
Contributor Author

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.

Comment on lines 8121 to 8111
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);
Copy link
Contributor Author

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.

Comment on lines +8114 to +8117
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);
Copy link
Contributor Author

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) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove old debug code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol

Comment on lines +11917 to +11921
// 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;
Copy link
Contributor Author

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.

Comment on lines 3341 to 3345
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);
Copy link
Contributor Author

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");
Copy link
Contributor Author

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.

Copy link
Contributor Author

@mjwitte mjwitte left a 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}
Copy link
Contributor Author

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.
Copy link
Contributor Author

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.
Copy link
Contributor Author

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.
Copy link
Contributor Author

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]
Copy link
Contributor Author

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.

Comment on lines -824 to +826
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);
Copy link
Contributor Author

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) -=
Copy link
Contributor Author

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) -=
Copy link
Contributor Author

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.

@mjwitte mjwitte marked this pull request as ready for review April 26, 2024 16:28
@mjwitte
Copy link
Contributor Author

mjwitte commented Apr 26, 2024

See #10444 (comment) for before/after results with FullExterior solar distribution. Zip of working folder attached (with idfs, outputs, and xlsx).
After Fixes 5-Final.zip

Results after fix for FullInteriorAndExterior. Not perfect, but all within 1% balance. Results are similar for FullInteriorAndExteriorWithReflections.
image

image

@shorowit
Copy link
Contributor

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!

shorowit added a commit to NREL/OpenStudio-HPXML that referenced this pull request Apr 29, 2024
@Myoldmopar Myoldmopar self-assigned this Apr 30, 2024
Copy link
Member

@Myoldmopar Myoldmopar left a 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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol

@@ -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);
Copy link
Member

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.

Copy link
Contributor

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:

state.dataHeatBalSurf->SurfWinInitialDifSolInTrans(HeatTransSurfNum) +=
(SolarTrans_ViewFactor - DifSolarReflW) / state.dataSurface->Surface(HeatTransSurfNum).Area;

and
state.dataHeatBalSurf->SurfWinInitialDifSolInTrans(HeatTransSurfNum) +=
(SolarTrans_ViewFactor - DifSolarReflW) / state.dataSurface->Surface(HeatTransSurfNum).Area;

Copy link
Contributor Author

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.

Copy link
Contributor

@vidanovic vidanovic left a 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.

@Myoldmopar
Copy link
Member

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!

@Myoldmopar Myoldmopar merged commit e0b62ad into develop May 3, 2024
15 checks passed
@Myoldmopar Myoldmopar deleted the WindowAndSolarOutputs branch May 3, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Includes code to repair a defect in EnergyPlus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Surface Window Net Heat Transfer Energy" does not account for all heat transfer across the windows
10 participants