Skip to content

Commit

Permalink
Move POLY to Window module.
Browse files Browse the repository at this point in the history
  • Loading branch information
amirroth committed Dec 26, 2024
1 parent ff10fb8 commit 7a8f4b4
Show file tree
Hide file tree
Showing 12 changed files with 121 additions and 143 deletions.
31 changes: 16 additions & 15 deletions src/EnergyPlus/Construction.hh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
#include <EnergyPlus/DataWindowEquivalentLayer.hh>
#include <EnergyPlus/EnergyPlus.hh>
#include <EnergyPlus/Material.hh>
#include <EnergyPlus/WindowManager.hh>

namespace EnergyPlus {

Expand Down Expand Up @@ -216,32 +217,32 @@ namespace Construction {
Real64 AbsDiffShade = 0.0; // Diffuse solar absorptance for shade
Real64 AbsDiffBackShade = 0.0; // Diffuse back solar absorptance for shade
Real64 ShadeAbsorpThermal = 0.0; // Diffuse back thermal absorptance of shade
Array1D<std::array<Real64, DataSurfaces::MaxPolyCoeff>> AbsBeamCoef; // Coefficients of incidence-angle polynomial for solar
Array1D<std::array<Real64, Window::maxPolyCoef>> AbsBeamCoef; // Coefficients of incidence-angle polynomial for solar
// absorptance for each solid glazing layer
Array1D<std::array<Real64, DataSurfaces::MaxPolyCoeff>> AbsBeamBackCoef; // As for AbsBeamCoef but for back-incident solar
std::array<Real64, DataSurfaces::MaxPolyCoeff> AbsBeamShadeCoef; // Coefficients of incidence-angle polynomial for solar
Array1D<std::array<Real64, Window::maxPolyCoef>> AbsBeamBackCoef; // As for AbsBeamCoef but for back-incident solar
std::array<Real64, Window::maxPolyCoef> AbsBeamShadeCoef; // Coefficients of incidence-angle polynomial for solar
// absorptance of shade
Real64 TransDiff = 0.0; // Diffuse solar transmittance, bare glass or shade on
Real64 TransDiffVis; // Diffuse visible transmittance, bare glass or shade on
Real64 ReflectSolDiffBack = 0.0; // Diffuse back solar reflectance, bare glass or shade on
Real64 ReflectSolDiffFront = 0.0; // Diffuse front solar reflectance, bare glass or shade on
Real64 ReflectVisDiffBack = 0.0; // Diffuse back visible reflectance, bare glass or shade on
Real64 ReflectVisDiffFront = 0.0; // Diffuse front visible reflectance, bare glass or shade on
std::array<Real64, DataSurfaces::MaxPolyCoeff> TransSolBeamCoef; // Coeffs of incidence-angle polynomial for beam sol trans,
std::array<Real64, Window::maxPolyCoef> TransSolBeamCoef; // Coeffs of incidence-angle polynomial for beam sol trans,
// bare glass or shade on
std::array<Real64, DataSurfaces::MaxPolyCoeff> TransVisBeamCoef; // Coeffs of incidence-angle polynomial for beam vis trans,
std::array<Real64, Window::maxPolyCoef> TransVisBeamCoef; // Coeffs of incidence-angle polynomial for beam vis trans,
// bare glass or shade on
std::array<Real64, DataSurfaces::MaxPolyCoeff> ReflSolBeamFrontCoef; // Coeffs of incidence-angle polynomial for beam sol front refl,
std::array<Real64, Window::maxPolyCoef> ReflSolBeamFrontCoef; // Coeffs of incidence-angle polynomial for beam sol front refl,
// bare glass or shade on
std::array<Real64, DataSurfaces::MaxPolyCoeff> ReflSolBeamBackCoef; // Like ReflSolBeamFrontCoef, but for back-incident beam solar
Array1D<std::array<Real64, DataSurfaces::MaxPolyCoeff>> tBareSolCoef; // Isolated glass solar transmittance coeffs of inc. angle polynomial
Array1D<std::array<Real64, DataSurfaces::MaxPolyCoeff>> tBareVisCoef; // Isolated glass visible transmittance coeffs of inc. angle polynomial
Array1D<std::array<Real64, DataSurfaces::MaxPolyCoeff>> rfBareSolCoef; // Isolated glass front solar reflectance coeffs of inc. angle polynomial
Array1D<std::array<Real64, DataSurfaces::MaxPolyCoeff>> rfBareVisCoef; // Isolated glass front visible reflectance coeffs of inc. angle polynomial
Array1D<std::array<Real64, DataSurfaces::MaxPolyCoeff>> rbBareSolCoef; // Isolated glass back solar reflectance coeffs of inc. angle polynomial
Array1D<std::array<Real64, DataSurfaces::MaxPolyCoeff>> rbBareVisCoef; // Isolated glass back visible reflectance coeffs of inc. angle polynomial
Array1D<std::array<Real64, DataSurfaces::MaxPolyCoeff>> afBareSolCoef; // Isolated glass front solar absorptance coeffs of inc. angle polynomial
Array1D<std::array<Real64, DataSurfaces::MaxPolyCoeff>> abBareSolCoef; // Isolated glass back solar absorptance coeffs of inc. angle polynomial
std::array<Real64, Window::maxPolyCoef> ReflSolBeamBackCoef; // Like ReflSolBeamFrontCoef, but for back-incident beam solar
Array1D<std::array<Real64, Window::maxPolyCoef>> tBareSolCoef; // Isolated glass solar transmittance coeffs of inc. angle polynomial
Array1D<std::array<Real64, Window::maxPolyCoef>> tBareVisCoef; // Isolated glass visible transmittance coeffs of inc. angle polynomial
Array1D<std::array<Real64, Window::maxPolyCoef>> rfBareSolCoef; // Isolated glass front solar reflectance coeffs of inc. angle polynomial
Array1D<std::array<Real64, Window::maxPolyCoef>> rfBareVisCoef; // Isolated glass front visible reflectance coeffs of inc. angle polynomial
Array1D<std::array<Real64, Window::maxPolyCoef>> rbBareSolCoef; // Isolated glass back solar reflectance coeffs of inc. angle polynomial
Array1D<std::array<Real64, Window::maxPolyCoef>> rbBareVisCoef; // Isolated glass back visible reflectance coeffs of inc. angle polynomial
Array1D<std::array<Real64, Window::maxPolyCoef>> afBareSolCoef; // Isolated glass front solar absorptance coeffs of inc. angle polynomial
Array1D<std::array<Real64, Window::maxPolyCoef>> abBareSolCoef; // Isolated glass back solar absorptance coeffs of inc. angle polynomial
Array1D<Real64> tBareSolDiff; // Isolated glass diffuse solar transmittance
Array1D<Real64> tBareVisDiff; // Isolated glass diffuse visible transmittance
Array1D<Real64> rfBareSolDiff; // Isolated glass diffuse solar front reflectance
Expand Down
3 changes: 0 additions & 3 deletions src/EnergyPlus/DataSurfaces.hh
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ namespace DataSurfaces {
using DataBSDFWindow::BSDFWindowDescript;
using DataVectorTypes::Vector;

// MODULE PARAMETER DEFINITIONS:
constexpr int MaxPolyCoeff(6);

// Not sure this is the right module for this stuff, may move it later
enum class Compass4
{
Expand Down
7 changes: 2 additions & 5 deletions src/EnergyPlus/DaylightingDevices.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1328,9 +1328,6 @@ namespace Dayltg {
// Swift, P. D., and Smith, G. B. "Cylindrical Mirror Light Pipes",
// Solar Energy Materials and Solar Cells 36 (1995), pp. 159-168.

// Using/Aliasing
using General::POLYF;

// Return value
Real64 TransTDD;

Expand All @@ -1353,15 +1350,15 @@ namespace Dayltg {
// Get the transmittance of each component and of total TDD
switch (RadiationType) {
case RadType::VisibleBeam: {
transDome = POLYF(COSI, state.dataConstruction->Construct(constDome).TransVisBeamCoef);
transDome = Window::POLYF(COSI, state.dataConstruction->Construct(constDome).TransVisBeamCoef);
transPipe = InterpolatePipeTransBeam(state, COSI, state.dataDaylightingDevicesData->TDDPipe(PipeNum).PipeTransVisBeam);
transDiff = state.dataConstruction->Construct(constDiff).TransDiffVis; // May want to change to POLYF also!

TransTDD = transDome * transPipe * transDiff;

} break;
case RadType::SolarBeam: {
transDome = POLYF(COSI, state.dataConstruction->Construct(constDome).TransSolBeamCoef);
transDome = Window::POLYF(COSI, state.dataConstruction->Construct(constDome).TransSolBeamCoef);
transPipe = InterpolatePipeTransBeam(state, COSI, state.dataDaylightingDevicesData->TDDPipe(PipeNum).PipeTransSolBeam);
transDiff = state.dataConstruction->Construct(constDiff).TransDiff; // May want to change to POLYF also!

Expand Down
Loading

3 comments on commit 7a8f4b4

@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.

WindowManager2 (amirroth) - x86_64-Linux-Ubuntu-24.04-gcc-13.3-UnitTestsCoverage-RelWithDebInfo: OK (2100 of 2100 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

WindowManager2 (amirroth) - x86_64-Linux-Ubuntu-24.04-gcc-13.3: OK (2918 of 2918 tests passed, 0 test warnings)

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.

WindowManager2 (amirroth) - x86_64-Linux-Ubuntu-24.04-gcc-13.3-IntegrationCoverage-RelWithDebInfo: OK (801 of 801 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.