Skip to content

Commit

Permalink
Merge 6a438d3 into ea846c6
Browse files Browse the repository at this point in the history
  • Loading branch information
Myoldmopar authored Dec 31, 2024
2 parents ea846c6 + 6a438d3 commit cb3fd7e
Show file tree
Hide file tree
Showing 13 changed files with 337 additions and 569 deletions.
38 changes: 0 additions & 38 deletions .decent_ci-Linux.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions .decent_ci-Windows.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions .decent_ci.yaml

This file was deleted.

34 changes: 10 additions & 24 deletions src/EnergyPlus/Construction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2025,18 +2025,6 @@ void ConstructionProps::setArraysBasedOnMaxSolidWinLayers(EnergyPlusData &state)
this->rbBareVisCoef.allocate(state.dataHeatBal->MaxSolidWinLayers);
this->afBareSolCoef.allocate(state.dataHeatBal->MaxSolidWinLayers);
this->abBareSolCoef.allocate(state.dataHeatBal->MaxSolidWinLayers);
for (int Layer = 1; Layer <= state.dataHeatBal->MaxSolidWinLayers; ++Layer) {
this->AbsBeamCoef(Layer).allocate(DataSurfaces::MaxPolyCoeff);
this->AbsBeamBackCoef(Layer).allocate(DataSurfaces::MaxPolyCoeff);
this->tBareSolCoef(Layer).allocate(DataSurfaces::MaxPolyCoeff);
this->tBareVisCoef(Layer).allocate(DataSurfaces::MaxPolyCoeff);
this->rfBareSolCoef(Layer).allocate(DataSurfaces::MaxPolyCoeff);
this->rfBareVisCoef(Layer).allocate(DataSurfaces::MaxPolyCoeff);
this->rbBareSolCoef(Layer).allocate(DataSurfaces::MaxPolyCoeff);
this->rbBareVisCoef(Layer).allocate(DataSurfaces::MaxPolyCoeff);
this->afBareSolCoef(Layer).allocate(DataSurfaces::MaxPolyCoeff);
this->abBareSolCoef(Layer).allocate(DataSurfaces::MaxPolyCoeff);
}

for (int Layer = 1; Layer <= state.dataHeatBal->MaxSolidWinLayers; ++Layer) {
this->AbsDiff(Layer) = 0.0;
Expand All @@ -2053,18 +2041,16 @@ void ConstructionProps::setArraysBasedOnMaxSolidWinLayers(EnergyPlusData &state)
}
}
for (int Layer = 1; Layer <= state.dataHeatBal->MaxSolidWinLayers; ++Layer) {
for (int Index = 1; Index <= DataSurfaces::MaxPolyCoeff; ++Index) {
this->AbsBeamCoef(Layer)(Index) = 0.0;
this->AbsBeamBackCoef(Layer)(Index) = 0.0;
this->tBareSolCoef(Layer)(Index) = 0.0;
this->tBareVisCoef(Layer)(Index) = 0.0;
this->rfBareSolCoef(Layer)(Index) = 0.0;
this->rfBareVisCoef(Layer)(Index) = 0.0;
this->rbBareSolCoef(Layer)(Index) = 0.0;
this->rbBareVisCoef(Layer)(Index) = 0.0;
this->afBareSolCoef(Layer)(Index) = 0.0;
this->abBareSolCoef(Layer)(Index) = 0.0;
}
std::fill(this->AbsBeamCoef(Layer).begin(), this->AbsBeamCoef(Layer).end(), 0.0);
std::fill(this->AbsBeamBackCoef(Layer).begin(), this->AbsBeamBackCoef(Layer).end(), 0.0);
std::fill(this->tBareSolCoef(Layer).begin(), this->tBareSolCoef(Layer).end(), 0.0);
std::fill(this->tBareVisCoef(Layer).begin(), this->tBareVisCoef(Layer).end(), 0.0);
std::fill(this->rfBareSolCoef(Layer).begin(), this->rfBareSolCoef(Layer).end(), 0.0);
std::fill(this->rfBareVisCoef(Layer).begin(), this->rfBareVisCoef(Layer).end(), 0.0);
std::fill(this->rbBareSolCoef(Layer).begin(), this->rbBareSolCoef(Layer).end(), 0.0);
std::fill(this->rbBareVisCoef(Layer).begin(), this->rbBareVisCoef(Layer).end(), 0.0);
std::fill(this->afBareSolCoef(Layer).begin(), this->afBareSolCoef(Layer).end(), 0.0);
std::fill(this->abBareSolCoef(Layer).begin(), this->abBareSolCoef(Layer).end(), 0.0);
}
}

Expand Down
34 changes: 17 additions & 17 deletions src/EnergyPlus/Construction.hh
Original file line number Diff line number Diff line change
Expand Up @@ -216,32 +216,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<Array1D<Real64>> AbsBeamCoef; // Coefficients of incidence-angle polynomial for solar
Array1D<std::array<Real64, DataSurfaces::MaxPolyCoeff>> AbsBeamCoef; // Coefficients of incidence-angle polynomial for solar
// absorptance for each solid glazing layer
Array1D<Array1D<Real64>> AbsBeamBackCoef; // As for AbsBeamCoef but for back-incident solar
Array1D<Real64> AbsBeamShadeCoef; // Coefficients of incidence-angle polynomial for solar
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
// 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
Array1D<Real64> TransSolBeamCoef; // Coeffs of incidence-angle polynomial for beam sol trans,
std::array<Real64, DataSurfaces::MaxPolyCoeff> TransSolBeamCoef; // Coeffs of incidence-angle polynomial for beam sol trans,
// bare glass or shade on
Array1D<Real64> TransVisBeamCoef; // Coeffs of incidence-angle polynomial for beam vis trans,
std::array<Real64, DataSurfaces::MaxPolyCoeff> TransVisBeamCoef; // Coeffs of incidence-angle polynomial for beam vis trans,
// bare glass or shade on
Array1D<Real64> ReflSolBeamFrontCoef; // Coeffs of incidence-angle polynomial for beam sol front refl,
std::array<Real64, DataSurfaces::MaxPolyCoeff> ReflSolBeamFrontCoef; // Coeffs of incidence-angle polynomial for beam sol front refl,
// bare glass or shade on
Array1D<Real64> ReflSolBeamBackCoef; // Like ReflSolBeamFrontCoef, but for back-incident beam solar
Array1D<Array1D<Real64>> tBareSolCoef; // Isolated glass solar transmittance coeffs of inc. angle polynomial
Array1D<Array1D<Real64>> tBareVisCoef; // Isolated glass visible transmittance coeffs of inc. angle polynomial
Array1D<Array1D<Real64>> rfBareSolCoef; // Isolated glass front solar reflectance coeffs of inc. angle polynomial
Array1D<Array1D<Real64>> rfBareVisCoef; // Isolated glass front visible reflectance coeffs of inc. angle polynomial
Array1D<Array1D<Real64>> rbBareSolCoef; // Isolated glass back solar reflectance coeffs of inc. angle polynomial
Array1D<Array1D<Real64>> rbBareVisCoef; // Isolated glass back visible reflectance coeffs of inc. angle polynomial
Array1D<Array1D<Real64>> afBareSolCoef; // Isolated glass front solar absorptance coeffs of inc. angle polynomial
Array1D<Array1D<Real64>> abBareSolCoef; // Isolated glass back solar absorptance coeffs of inc. angle polynomial
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
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 Expand Up @@ -325,8 +325,8 @@ namespace Construction {

// Default Constructor
ConstructionProps()
: LayerPoint(MaxLayersInConstruct, 0), AbsBeamShadeCoef(6, 0.0), TransDiffVis(0.0), TransSolBeamCoef(6, 0.0), TransVisBeamCoef(6, 0.0),
ReflSolBeamFrontCoef(6, 0.0), ReflSolBeamBackCoef(6, 0.0), tBareSolDiff(5, 0.0), tBareVisDiff(5, 0.0), rfBareSolDiff(5, 0.0),
: LayerPoint(MaxLayersInConstruct, 0), TransDiffVis(0.0),
tBareSolDiff(5, 0.0), tBareVisDiff(5, 0.0), rfBareSolDiff(5, 0.0),
rfBareVisDiff(5, 0.0), rbBareSolDiff(5, 0.0), rbBareVisDiff(5, 0.0), afBareSolDiff(5, 0.0), abBareSolDiff(5, 0.0),
AbsDiffFrontEQL(DataWindowEquivalentLayer::CFSMAXNL, 0.0), AbsDiffBackEQL(DataWindowEquivalentLayer::CFSMAXNL, 0.0)
{
Expand Down
12 changes: 6 additions & 6 deletions src/EnergyPlus/DElightManagerF.cc
Original file line number Diff line number Diff line change
Expand Up @@ -687,12 +687,12 @@ namespace DElightManagerF {
iWndoConstIndexes(iconst) + 10000,
state.dataConstruction->Construct(iWndoConstIndexes(iconst)).TransDiffVis,
state.dataConstruction->Construct(iWndoConstIndexes(iconst)).ReflectVisDiffBack,
state.dataConstruction->Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef(1),
state.dataConstruction->Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef(2),
state.dataConstruction->Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef(3),
state.dataConstruction->Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef(4),
state.dataConstruction->Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef(5),
state.dataConstruction->Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef(6));
state.dataConstruction->Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef[0],
state.dataConstruction->Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef[1],
state.dataConstruction->Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef[2],
state.dataConstruction->Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef[3],
state.dataConstruction->Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef[4],
state.dataConstruction->Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef[5]);

} // Glass Type loop

Expand Down
9 changes: 8 additions & 1 deletion src/EnergyPlus/General.hh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ namespace General {
Real64 X_0, // 1st bound of interval that contains the solution
Real64 X_1); // 2nd bound of interval that contains the solution

constexpr Real64 POLYF(Real64 const X, // Cosine of angle of incidence
std::array<Real64, 6> const &A // Polynomial coefficients
)
{
return (X < 0.0 || X > 1.0) ? 0.0 : (X * (A[0] + X * (A[1] + X * (A[2] + X * (A[3] + X * (A[4] + X * A[5]))))));
}

constexpr Real64 POLYF(Real64 const X, // Cosine of angle of incidence
Array1D<Real64> const &A // Polynomial coefficients
)
Expand All @@ -92,7 +99,7 @@ namespace General {
return X * (A(1) + X * (A(2) + X * (A(3) + X * (A(4) + X * (A(5) + X * A(6))))));
}
}

void MovingAvg(Array1D<Real64> &DataIn, int NumItemsInAvg);

void ProcessDateString(EnergyPlusData &state,
Expand Down
Loading

0 comments on commit cb3fd7e

Please sign in to comment.