Skip to content

Commit

Permalink
Apply the multiplier at TBm, instead of everywhere it's used
Browse files Browse the repository at this point in the history
  • Loading branch information
yujiex committed Sep 15, 2023
1 parent cfe41de commit e49cb73
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/EnergyPlus/SolarShading.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7424,15 +7424,16 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state)
TBm -= state.dataSurface->SurfWinBmSolAbsdInsReveal(SurfNum) / TBmDenom;
}
TBm = max(0.0, TBm);
// this multiplier doesn't work with other shading, so no need to apply in other branches
TBm *= state.dataSurface->Surface(SurfNum).IncSolMultiplier;
}

if (TBm == 0.0) continue;
if (InShelfSurf > 0) { // Inside daylighting shelf
// Inside daylighting shelves assume that no beam will pass the end of the shelf.
// Since all beam is absorbed on the shelf, this might cause them to get unrealistically hot at times.
// BTOTWinZone - Transmitted beam solar factor for a window [m2]
Real64 BTOTWinZone = state.dataSurface->Surface(SurfNum).IncSolMultiplier * TBm * SunLitFract *
state.dataSurface->Surface(SurfNum).Area * CosInc * InOutProjSLFracMult;
Real64 BTOTWinZone = TBm * SunLitFract * state.dataSurface->Surface(SurfNum).Area * CosInc * InOutProjSLFracMult;
// Shelf surface area is divided by 2 because only one side sees beam (Area was multiplied by 2 during init)
state.dataSurface->SurfOpaqAI(InShelfSurf) += BTOTWinZone / (0.5 * state.dataSurface->Surface(InShelfSurf).Area); //[-]
BABSZone += BTOTWinZone; //[m2]
Expand All @@ -7453,7 +7454,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state)
Real64 AOverlap =
state.dataHeatBal->SurfWinOverlapAreas(state.dataGlobal->HourOfDay, state.dataGlobal->TimeStep, IBack, SurfNum);
// Back surface area irradiated by beam solar from an exterior window, projected onto window plane
Real64 BOverlap = state.dataSurface->Surface(SurfNum).IncSolMultiplier * TBm * AOverlap * CosInc; //[m2]
Real64 BOverlap = TBm * AOverlap * CosInc; //[m2]
// AOverlap multiplied by exterior window beam transmittance and cosine of incidence angle
if (state.dataConstruction->Construct(ConstrNumBack).TransDiff <= 0.0) {

Expand Down Expand Up @@ -8174,7 +8175,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state)

Real64 AOverlap =
state.dataHeatBal->SurfWinOverlapAreas(state.dataGlobal->HourOfDay, state.dataGlobal->TimeStep, IBack, SurfNum);
Real64 BOverlap = state.dataSurface->Surface(SurfNum).IncSolMultiplier * TBm * AOverlap * CosInc; //[m2]
Real64 BOverlap = TBm * AOverlap * CosInc; //[m2]

if (state.dataConstruction->Construct(ConstrNumBack).TransDiff <= 0.0) {

Expand Down Expand Up @@ -8282,8 +8283,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state)
if (state.dataSolarShading->SurfIntAbsFac(FloorNum) <= 0.0 || FloorNum == SurfNum) continue; // Keep only floor surfaces
int const FlConstrNum = state.dataSurface->SurfActiveConstruction(FloorNum);

Real64 BTOTWinZone = state.dataSurface->Surface(SurfNum).IncSolMultiplier * TBm * SunLitFract *
state.dataSurface->Surface(SurfNum).Area * CosInc * InOutProjSLFracMult; //[m2]
Real64 BTOTWinZone = TBm * SunLitFract * state.dataSurface->Surface(SurfNum).Area * CosInc * InOutProjSLFracMult; //[m2]
Real64 AbsBeamTotWin = 0.0;

if (state.dataConstruction->Construct(FlConstrNum).TransDiff <= 0.0) {
Expand Down Expand Up @@ -8754,6 +8754,7 @@ void CalcInteriorSolarDistributionWCESimple(EnergyPlusData &state)
}

TBm = max(0.0, TBm);
TBm *= state.dataSurface->Surface(SurfNum).IncSolMultiplier;

int NumOfBackSurf = state.dataShadowComb->ShadowComb(BaseSurfNum).NumBackSurf;

Expand All @@ -8769,7 +8770,7 @@ void CalcInteriorSolarDistributionWCESimple(EnergyPlusData &state)
// Irradiated (overlap) area for this back surface, projected onto window plane
// (includes effect of shadowing on exterior window)
Real64 AOverlap = state.dataHeatBal->SurfWinOverlapAreas(state.dataGlobal->HourOfDay, state.dataGlobal->TimeStep, IBack, SurfNum);
Real64 BOverlap = state.dataSurface->Surface(SurfNum).IncSolMultiplier * TBm * AOverlap * CosInc; //[m2]
Real64 BOverlap = TBm * AOverlap * CosInc; //[m2]

if (state.dataConstruction->Construct(ConstrNumBack).TransDiff <= 0.0) {
// Back surface is opaque interior or exterior wall
Expand All @@ -8785,8 +8786,7 @@ void CalcInteriorSolarDistributionWCESimple(EnergyPlusData &state)
if (!state.dataSurface->Surface(FloorNum).HeatTransSurf) continue;
if (state.dataSolarShading->SurfIntAbsFac(FloorNum) <= 0.0 || FloorNum == SurfNum) continue; // Keep only floor surfaces

Real64 BTOTWinZone = state.dataSurface->Surface(SurfNum).IncSolMultiplier * TBm * SunLitFract *
state.dataSurface->Surface(SurfNum).Area * CosInc *
Real64 BTOTWinZone = TBm * SunLitFract * state.dataSurface->Surface(SurfNum).Area * CosInc *
window.InOutProjSLFracMult(state.dataGlobal->HourOfDay); //[m2]

if (state.dataConstruction->Construct(state.dataSurface->Surface(FloorNum).Construction).TransDiff <= 0.0) {
Expand Down

5 comments on commit e49cb73

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

fixIncSolarMultiplier (yujiex) - Win64-Windows-10-VisualStudio-16: OK (2720 of 2720 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

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

fixIncSolarMultiplier (yujiex) - x86_64-MacOS-10.17-clang-14.0.0: OK (3406 of 3505 tests passed, 14 test warnings)

Messages:\n

  • 13 tests had: EIO diffs.
  • 1 test had: ESO big diffs.
  • 95 tests had: Table big diffs.
  • 4 tests had: ESO small diffs.
  • 3 tests had: MTR small diffs.
  • 2 tests had: Table small diffs.
  • 3 tests had: ERR diffs.
  • 5 tests had: MTR big diffs.

Failures:\n

regression Test Summary

  • Passed: 685
  • Failed: 99

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

fixIncSolarMultiplier (yujiex) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3447 of 3546 tests passed, 14 test warnings)

Messages:\n

  • 14 tests had: EIO diffs.
  • 1 test had: ESO big diffs.
  • 95 tests had: Table big diffs.
  • 4 tests had: ESO small diffs.
  • 3 tests had: MTR small diffs.
  • 3 tests had: Table small diffs.
  • 3 tests had: ERR diffs.
  • 5 tests had: MTR big diffs.

Failures:\n

regression Test Summary

  • Passed: 705
  • Failed: 99

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

fixIncSolarMultiplier (yujiex) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (1935 of 1935 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

fixIncSolarMultiplier (yujiex) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (788 of 788 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.