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
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/EnergyPlus/DataSurfaces.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1597,11 +1597,12 @@ struct SurfacesData : BaseGlobalStruct
Array1D<Real64> SurfWinBmBmSolar; // Exterior beam-to-beam solar transmitted through window, or window plus blind, into zone (W)
Array1D<Real64> SurfWinBmDifSolar; // Exterior beam-to-diffuse solar transmitted through window, or window plus blind, into zone (W)
Array1D<Real64> SurfWinDifSolar; // Exterior diffuse solar transmitted through window, or window plus shade/blind, into zone (W)
Array1D<Real64> SurfWinHeatGain; // Total heat gain from window = WinTransSolar + (IR and convection from glazing, or,
Array1D<Real64> SurfWinHeatGain; // Total heat gain from window (W) = WinTransSolar + (IR and convection from glazing, or,
// if interior shade, IR and convection from zone-side of shade plus gap air convection to zone) +
// (IR convection from frame) + (IR and convection from divider if no interior shade) (W)
Array1D<Real64> SurfWinHeatGainRep; // Equals WinHeatGain when WinHeatGain >= 0.0
Array1D<Real64> SurfWinHeatLossRep; // Equals -WinHeatGain when WinHeatGain < 0.0
// minus SurfWinInitialDifSolInTrans minus SurfWinLossSWZoneToOutWinRep
Array1D<Real64> SurfWinHeatGainRep; // Equals WinHeatGain when WinHeatGain >= 0.0 (W)
Array1D<Real64> SurfWinHeatLossRep; // Equals -WinHeatGain when WinHeatGain < 0.0 (W)
Array1D<Real64> SurfWinGainConvGlazToZoneRep; // component of WinHeatGain convect to zone from glazing (W)
Array1D<Real64> SurfWinGainIRGlazToZoneRep; // component of WinHeatGain net IR to zone from glazing (W)
Array1D<Real64> SurfWinLossSWZoneToOutWinRep; // component of WinHeatGain shortwave transmit back out (W)
Expand Down
53 changes: 23 additions & 30 deletions src/EnergyPlus/HeatBalanceSurfaceManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8100,26 +8100,24 @@ void CalcHeatBalanceInsideSurf2(EnergyPlusData &state,

Real64 const Sigma_Temp_4(Constant::StefanBoltzmann * pow_4(state.dataHeatBalSurf->SurfTempIn(SurfNum) + Constant::Kelvin));

// Calculate window heat gain for TDD:DIFFUSER since this calculation is usually done in WindowManager
state.dataSurface->SurfWinHeatGain(SurfNum) =
Comment on lines -8103 to -8104
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.

state.dataSurface->SurfWinTransSolar(SurfNum) +
HConvIn_surf * surface.Area * (state.dataHeatBalSurf->SurfTempIn(SurfNum) - state.dataHeatBalSurfMgr->RefAirTemp(SurfNum)) +
state.dataConstruction->Construct(surface.Construction).InsideAbsorpThermal * surface.Area *
(Sigma_Temp_4 -
(state.dataSurface->SurfWinIRfromParentZone(SurfNum) + state.dataHeatBalSurf->SurfQdotRadHVACInPerArea(SurfNum))) -
state.dataHeatBal->EnclSolQSWRad(surface.SolarEnclIndex) * surface.Area *
state.dataConstruction->Construct(surface.Construction).TransDiff;
// Transmitted solar | Convection | IR exchange | IR
// Zone diffuse interior shortwave reflected back into the TDD

// fill out report vars for components of Window Heat Gain
state.dataSurface->SurfWinGainConvGlazToZoneRep(SurfNum) =
HConvIn_surf * surface.Area * (state.dataHeatBalSurf->SurfTempIn(SurfNum) - state.dataHeatBalSurfMgr->RefAirTemp(SurfNum));
state.dataSurface->SurfWinGainIRGlazToZoneRep(SurfNum) =
state.dataConstruction->Construct(surface.Construction).InsideAbsorpThermal * surface.Area *
(Sigma_Temp_4 - (state.dataSurface->SurfWinIRfromParentZone(SurfNum) + state.dataHeatBalSurf->SurfQdotRadHVACInPerArea(SurfNum)));
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.

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.


// Calculate window heat gain for TDD:DIFFUSER since this calculation is usually done in WindowManager
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);
Comment on lines +8117 to +8120
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.

// Net ransmitted solar | Convection | IR exchange | IR
// Zone diffuse interior shortwave reflected back into the TDD

} else { // Regular window
if (state.dataHeatBal->InsideSurfIterations == 0) { // Do windows only once
// Get outside convection coeff for exterior window here to avoid calling
Expand Down Expand Up @@ -8788,19 +8786,6 @@ void CalcHeatBalanceInsideSurf2CTFOnly(EnergyPlusData &state,
state.dataHeatBalSurf->SurfTempIn(surfNum) = state.dataHeatBalSurf->SurfTempInTmp(surfNum);
Real64 const Sigma_Temp_4(Constant::StefanBoltzmann * pow_4(state.dataHeatBalSurf->SurfTempIn(surfNum) + Constant::Kelvin));

// Calculate window heat gain for TDD:DIFFUSER since this calculation is usually done in WindowManager
state.dataSurface->SurfWinHeatGain(surfNum) =
state.dataSurface->SurfWinTransSolar(surfNum) +
HConvIn_surf * surface.Area *
(state.dataHeatBalSurf->SurfTempIn(surfNum) - state.dataHeatBalSurfMgr->RefAirTemp(surfNum)) +
state.dataConstruction->Construct(surface.Construction).InsideAbsorpThermal * surface.Area *
(Sigma_Temp_4 -
(state.dataSurface->SurfWinIRfromParentZone(surfNum) + state.dataHeatBalSurf->SurfQdotRadHVACInPerArea(surfNum))) -
state.dataHeatBal->EnclSolQSWRad(surface.SolarEnclIndex) * surface.Area *
state.dataConstruction->Construct(surface.Construction)
.TransDiff; // Transmitted solar | Convection | IR exchange | IR
// Zone diffuse interior shortwave reflected back into the TDD

// fill out report vars for components of Window Heat Gain
state.dataSurface->SurfWinGainConvGlazToZoneRep(surfNum) =
HConvIn_surf * surface.Area *
Expand All @@ -8809,9 +8794,17 @@ void CalcHeatBalanceInsideSurf2CTFOnly(EnergyPlusData &state,
state.dataConstruction->Construct(surface.Construction).InsideAbsorpThermal * surface.Area *
(Sigma_Temp_4 -
(state.dataSurface->SurfWinIRfromParentZone(surfNum) + state.dataHeatBalSurf->SurfQdotRadHVACInPerArea(surfNum)));
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);

// Calculate window heat gain for TDD:DIFFUSER since this calculation is usually done in WindowManager
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);
// Net ransmitted solar | Convection | IR exchange | IR
// Zone diffuse interior shortwave reflected back into the TDD
} else { // Regular window
if (state.dataHeatBal->InsideSurfIterations == 0) { // Do windows only once
// Get outside convection coeff for exterior window here to avoid calling
Expand Down
Loading
Loading