From 8edb4317fc59240d2447e8458435bb1cd4fc763c Mon Sep 17 00:00:00 2001 From: Yujie Xu Date: Thu, 11 May 2023 08:50:13 -0700 Subject: [PATCH 1/3] Add multiplier to adjust BTOTZone and BTOTWinZone --- src/EnergyPlus/SolarShading.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EnergyPlus/SolarShading.cc b/src/EnergyPlus/SolarShading.cc index f380036fb83..75e71d3c346 100644 --- a/src/EnergyPlus/SolarShading.cc +++ b/src/EnergyPlus/SolarShading.cc @@ -7301,7 +7301,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) } else { TBmAll = TBmBm + TBmDif; } - BTOTZone += TBmAll * SunLitFract * CosInc * state.dataSurface->Surface(SurfNum).Area * InOutProjSLFracMult; // [m2] + BTOTZone += state.dataSurface->Surface(SurfNum).IncSolMultiplier * TBmAll * SunLitFract * CosInc * state.dataSurface->Surface(SurfNum).Area * InOutProjSLFracMult; // [m2] } } @@ -8236,7 +8236,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 = TBm * SunLitFract * state.dataSurface->Surface(SurfNum).Area * CosInc * InOutProjSLFracMult; //[m2] + Real64 BTOTWinZone = state.dataSurface->Surface(SurfNum).IncSolMultiplier * TBm * SunLitFract * state.dataSurface->Surface(SurfNum).Area * CosInc * InOutProjSLFracMult; //[m2] Real64 AbsBeamTotWin = 0.0; if (state.dataConstruction->Construct(FlConstrNum).TransDiff <= 0.0) { From 2cbbe1b3eb0963fcfe9eaffb6005d4c00ab8775e Mon Sep 17 00:00:00 2001 From: Yujie Xu Date: Tue, 12 Sep 2023 15:29:32 -0700 Subject: [PATCH 2/3] add more adjustment to TBm, clang-format --- src/EnergyPlus/SolarShading.cc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/EnergyPlus/SolarShading.cc b/src/EnergyPlus/SolarShading.cc index 7a93c909da7..34342d4fee6 100644 --- a/src/EnergyPlus/SolarShading.cc +++ b/src/EnergyPlus/SolarShading.cc @@ -7345,7 +7345,8 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) } else { TBmAll = TBmBm + TBmDif; } - BTOTZone += state.dataSurface->Surface(SurfNum).IncSolMultiplier * TBmAll * SunLitFract * CosInc * state.dataSurface->Surface(SurfNum).Area * InOutProjSLFracMult; // [m2] + BTOTZone += state.dataSurface->Surface(SurfNum).IncSolMultiplier * TBmAll * SunLitFract * CosInc * + state.dataSurface->Surface(SurfNum).Area * InOutProjSLFracMult; // [m2] } } @@ -7430,7 +7431,8 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) // 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 = TBm * SunLitFract * state.dataSurface->Surface(SurfNum).Area * CosInc * InOutProjSLFracMult; + Real64 BTOTWinZone = state.dataSurface->Surface(SurfNum).IncSolMultiplier * 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] @@ -7451,7 +7453,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 = TBm * AOverlap * CosInc; //[m2] + Real64 BOverlap = state.dataSurface->Surface(SurfNum).IncSolMultiplier * TBm * AOverlap * CosInc; //[m2] // AOverlap multiplied by exterior window beam transmittance and cosine of incidence angle if (state.dataConstruction->Construct(ConstrNumBack).TransDiff <= 0.0) { @@ -8172,7 +8174,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) Real64 AOverlap = state.dataHeatBal->SurfWinOverlapAreas(state.dataGlobal->HourOfDay, state.dataGlobal->TimeStep, IBack, SurfNum); - Real64 BOverlap = TBm * AOverlap * CosInc; //[m2] + Real64 BOverlap = state.dataSurface->Surface(SurfNum).IncSolMultiplier * TBm * AOverlap * CosInc; //[m2] if (state.dataConstruction->Construct(ConstrNumBack).TransDiff <= 0.0) { @@ -8280,7 +8282,8 @@ 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 = state.dataSurface->Surface(SurfNum).IncSolMultiplier * TBm * SunLitFract * + state.dataSurface->Surface(SurfNum).Area * CosInc * InOutProjSLFracMult; //[m2] Real64 AbsBeamTotWin = 0.0; if (state.dataConstruction->Construct(FlConstrNum).TransDiff <= 0.0) { @@ -8766,7 +8769,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 = TBm * AOverlap * CosInc; //[m2] + Real64 BOverlap = state.dataSurface->Surface(SurfNum).IncSolMultiplier * TBm * AOverlap * CosInc; //[m2] if (state.dataConstruction->Construct(ConstrNumBack).TransDiff <= 0.0) { // Back surface is opaque interior or exterior wall @@ -8782,7 +8785,8 @@ 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 = TBm * SunLitFract * state.dataSurface->Surface(SurfNum).Area * CosInc * + Real64 BTOTWinZone = state.dataSurface->Surface(SurfNum).IncSolMultiplier * 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) { From e49cb73e5f63984ece066d479475a1e58ad855a6 Mon Sep 17 00:00:00 2001 From: Yujie Xu Date: Fri, 15 Sep 2023 11:32:56 -0700 Subject: [PATCH 3/3] Apply the multiplier at TBm, instead of everywhere it's used --- src/EnergyPlus/SolarShading.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/EnergyPlus/SolarShading.cc b/src/EnergyPlus/SolarShading.cc index 34342d4fee6..ab34215775c 100644 --- a/src/EnergyPlus/SolarShading.cc +++ b/src/EnergyPlus/SolarShading.cc @@ -7424,6 +7424,8 @@ 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; @@ -7431,8 +7433,7 @@ void CalcInteriorSolarDistribution(EnergyPlusData &state) // 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] @@ -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) { @@ -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) { @@ -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) { @@ -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; @@ -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 @@ -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) {