Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into 8111_DST_Southern_…
Browse files Browse the repository at this point in the history
…Crash
  • Loading branch information
jmarrec committed Jun 30, 2020
2 parents 9ad55ec + a623449 commit 0bd3544
Show file tree
Hide file tree
Showing 81 changed files with 7,073 additions and 7,261 deletions.
4 changes: 2 additions & 2 deletions src/EnergyPlus/AirflowNetworkBalanceManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
#include <EnergyPlus/AirflowNetworkBalanceManager.hh>
#include <EnergyPlus/BranchNodeConnections.hh>
#include <EnergyPlus/Coils/CoilCoolingDX.hh>
#include <EnergyPlus/Construction.hh>
#include <EnergyPlus/CurveManager.hh>
#include <EnergyPlus/DXCoils.hh>
#include <EnergyPlus/Data/EnergyPlusData.hh>
Expand Down Expand Up @@ -6621,7 +6622,6 @@ namespace AirflowNetworkBalanceManager {
using DataEnvironment::OutHumRat;
using DataGlobals::KelvinConv;
using DataGlobals::StefanBoltzmann;
using DataHeatBalance::Construct;
using DataHeatBalFanSys::QRadSurfAFNDuct;
using DataHeatBalSurface::TH;
using DataHVACGlobals::TimeStepSys;
Expand Down Expand Up @@ -6804,7 +6804,7 @@ namespace AirflowNetworkBalanceManager {
Real64 TSurfj = TH(1, 1, ZoneSurfNum);
Real64 TSurfj_K = TSurfj + KelvinConv;

Real64 ZoneSurfEmissivity = Construct(Surface(ZoneSurfNum).Construction).InsideAbsorpThermal;
Real64 ZoneSurfEmissivity = dataConstruction.Construct(Surface(ZoneSurfNum).Construction).InsideAbsorpThermal;
Real64 ZoneSurfArea = Surface(ZoneSurfNum).Area;

Real64 DuctEmissivity = VFObj.DuctEmittance;
Expand Down
8 changes: 5 additions & 3 deletions src/EnergyPlus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ SET( SRC
Coils/CoilCoolingDXCurveFitSpeed.hh
CondenserLoopTowers.cc
CondenserLoopTowers.hh
ConductionTransferFunctionCalc.cc
ConductionTransferFunctionCalc.hh
ConfiguredFunctions.hh
"${CMAKE_CURRENT_BINARY_DIR}/ConfiguredFunctions.cc"
ConvectionCoefficients.cc
ConvectionCoefficients.hh
Construction.cc
Construction.hh
CoolTower.cc
CoolTower.hh
CostEstimateManager.cc
Expand All @@ -83,7 +83,7 @@ SET( SRC
DXCoils.hh
DXFEarClipping.cc
DXFEarClipping.hh
Data/BaseData.hh
Data/BaseData.hh
Data/EnergyPlusData.hh
DataAirLoop.cc
DataAirLoop.hh
Expand Down Expand Up @@ -360,6 +360,8 @@ SET( SRC
InternalHeatGains.hh
LowTempRadiantSystem.cc
LowTempRadiantSystem.hh
Material.cc
Material.hh
MatrixDataManager.cc
MatrixDataManager.hh
MicroCHPElectricGenerator.cc
Expand Down
2,256 changes: 0 additions & 2,256 deletions src/EnergyPlus/ConductionTransferFunctionCalc.cc

This file was deleted.

2,047 changes: 2,047 additions & 0 deletions src/EnergyPlus/Construction.cc

Large diffs are not rendered by default.

347 changes: 347 additions & 0 deletions src/EnergyPlus/Construction.hh

Large diffs are not rendered by default.

27 changes: 14 additions & 13 deletions src/EnergyPlus/ConvectionCoefficients.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@

// EnergyPlus Headers
#include "OutputFiles.hh"
#include <EnergyPlus/Construction.hh>
#include <EnergyPlus/ConvectionCoefficients.hh>
#include <EnergyPlus/CurveManager.hh>
#include <EnergyPlus/DataEnvironment.hh>
Expand All @@ -77,6 +78,7 @@
#include <EnergyPlus/DataZoneEquipment.hh>
#include <EnergyPlus/General.hh>
#include <EnergyPlus/InputProcessing/InputProcessor.hh>
#include <EnergyPlus/Material.hh>
#include <EnergyPlus/Psychrometrics.hh>
#include <EnergyPlus/ScheduleManager.hh>
#include <EnergyPlus/SurfaceGeometry.hh>
Expand Down Expand Up @@ -232,7 +234,6 @@ namespace ConvectionCoefficients {

// Using/Aliasing
using DataGlobals::BeginEnvrnFlag;
using DataHeatBalance::Construct;
using DataHeatBalFanSys::MAT;
using DataLoopNode::Node;
using DataLoopNode::NumOfNodes;
Expand Down Expand Up @@ -364,7 +365,7 @@ namespace ConvectionCoefficients {
if (HConvIn(SurfNum) < LowHConvLimit) HConvIn(SurfNum) = LowHConvLimit;

} else if (SELECT_CASE_var1 == ASHRAETARP) {
if (!Construct(Surface(SurfNum).Construction).TypeIsWindow) {
if (!dataConstruction.Construct(Surface(SurfNum).Construction).TypeIsWindow) {
CalcASHRAEDetailedIntConvCoeff(SurfNum, SurfaceTemperatures(SurfNum), MAT(ZoneNum));
} else {
CalcISO15099WindowIntConvCoeff(SurfNum, SurfaceTemperatures(SurfNum), MAT(ZoneNum));
Expand Down Expand Up @@ -1302,7 +1303,7 @@ namespace ConvectionCoefficients {
UserIntConvectionCoeffs(TotIntConvCoeff).WhichSurface = -999;
for (int surfNum : DataSurfaces::AllHTSurfaceList) {
auto &surf = Surface(surfNum);
if (DataHeatBalance::Construct(surf.Construction).TypeIsAirBoundaryIRTSurface) {
if (dataConstruction.Construct(surf.Construction).TypeIsAirBoundaryIRTSurface) {
surf.IntConvCoeff = TotIntConvCoeff;
}
}
Expand Down Expand Up @@ -1987,7 +1988,7 @@ namespace ConvectionCoefficients {
for (SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) {
if (!Surface(SurfNum).HeatTransSurf) continue;
if (Surface(SurfNum).ExtBoundCond > 0) continue; // Interior surfaces
if (!Construct(Surface(SurfNum).Construction).TypeIsWindow) continue;
if (!dataConstruction.Construct(Surface(SurfNum).Construction).TypeIsWindow) continue;
SurfacesOfType = true;
if (ConvectionType == "OUTSIDE") {
if (Surface(SurfNum).OSCPtr > 0) continue;
Expand Down Expand Up @@ -2211,7 +2212,7 @@ namespace ConvectionCoefficients {
for (SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) {
if (!Surface(SurfNum).HeatTransSurf) continue;
if (Surface(SurfNum).ExtBoundCond <= 0) continue; // Exterior surfaces
if (!Construct(Surface(SurfNum).Construction).TypeIsWindow) continue;
if (!dataConstruction.Construct(Surface(SurfNum).Construction).TypeIsWindow) continue;
SurfacesOfType = true;
if (ConvectionType == "OUTSIDE") {
if (Surface(SurfNum).OSCPtr > 0) continue;
Expand Down Expand Up @@ -2843,7 +2844,7 @@ namespace ConvectionCoefficients {
if (Surface(SurfNum).ExtBoundCond == DataSurfaces::KivaFoundation) {
SurfaceGeometry::kivaManager.surfaceConvMap[SurfNum].in = [=](double Tsurf, double Tamb, double, double, double cosTilt) -> double {
return CalcCeilingDiffuserIntConvCoeff(
ACH, Tsurf, Tamb, cosTilt, AirHumRat, Surface(SurfNum).Height, Construct(Surface(SurfNum).Construction).TypeIsWindow);
ACH, Tsurf, Tamb, cosTilt, AirHumRat, Surface(SurfNum).Height, dataConstruction.Construct(Surface(SurfNum).Construction).TypeIsWindow);
};
} else {
HConvIn(SurfNum) = CalcCeilingDiffuserIntConvCoeff(ACH,
Expand All @@ -2852,7 +2853,7 @@ namespace ConvectionCoefficients {
Surface(SurfNum).CosTilt,
AirHumRat,
Surface(SurfNum).Height,
Construct(Surface(SurfNum).Construction).TypeIsWindow);
dataConstruction.Construct(Surface(SurfNum).Construction).TypeIsWindow);
// Establish some lower limit to avoid a zero convection coefficient (and potential divide by zero problems)
if (HConvIn(SurfNum) < LowHConvLimit) HConvIn(SurfNum) = LowHConvLimit;
}
Expand Down Expand Up @@ -2934,7 +2935,7 @@ namespace ConvectionCoefficients {
if (!Surface(SurfNum).HeatTransSurf) continue; // Skip non-heat transfer surfaces

if (ACH <= 3.0) { // Use the other convection algorithm
if (!Construct(Surface(SurfNum).Construction).TypeIsWindow) {
if (!dataConstruction.Construct(Surface(SurfNum).Construction).TypeIsWindow) {
CalcASHRAEDetailedIntConvCoeff(SurfNum, SurfaceTemperatures(SurfNum), MAT(ZoneNum));
} else {
CalcISO15099WindowIntConvCoeff(SurfNum, SurfaceTemperatures(SurfNum), MAT(ZoneNum));
Expand Down Expand Up @@ -4546,7 +4547,7 @@ namespace ConvectionCoefficients {
Surface(SurfNum).CosTilt,
AirHumRat,
Surface(SurfNum).Height,
Construct(Surface(SurfNum).Construction).TypeIsWindow);
dataConstruction.Construct(Surface(SurfNum).Construction).TypeIsWindow);
}
Surface(SurfNum).TAirRef = ZoneMeanAirTemp;
} else if (SELECT_CASE_var == HcInt_FisherPedersenCeilDiffuserCeiling) {
Expand All @@ -4564,7 +4565,7 @@ namespace ConvectionCoefficients {
Surface(SurfNum).CosTilt,
AirHumRat,
Surface(SurfNum).Height,
Construct(Surface(SurfNum).Construction).TypeIsWindow);
dataConstruction.Construct(Surface(SurfNum).Construction).TypeIsWindow);
}
Surface(SurfNum).TAirRef = ZoneMeanAirTemp;
} else if (SELECT_CASE_var == HcInt_FisherPedersenCeilDiffuserWalls) {
Expand All @@ -4582,7 +4583,7 @@ namespace ConvectionCoefficients {
Surface(SurfNum).CosTilt,
AirHumRat,
Surface(SurfNum).Height,
Construct(Surface(SurfNum).Construction).TypeIsWindow);
dataConstruction.Construct(Surface(SurfNum).Construction).TypeIsWindow);
}
if (Surface(SurfNum).ExtBoundCond == DataSurfaces::KivaFoundation) {
HnFn = [=](double, double, double, double, double) -> double { return tmpHc; };
Expand Down Expand Up @@ -4935,7 +4936,7 @@ namespace ConvectionCoefficients {
SurfWindSpeed = Surface(SurfNum).WindSpeed;
}

int Roughness = Material(Construct(Surface(SurfNum).Construction).LayerPoint(1)).Roughness;
int Roughness = dataMaterial.Material(dataConstruction.Construct(Surface(SurfNum).Construction).LayerPoint(1)).Roughness;

auto const SELECT_CASE_var(ForcedConvModelEqNum);

Expand Down Expand Up @@ -8713,7 +8714,7 @@ namespace ConvectionCoefficients {

static int ErrorIndex(0);

int const RoughnessIndex = Material(Construct(Surface(SurfNum).Construction).LayerPoint(1)).Roughness;
int const RoughnessIndex = dataMaterial.Material(dataConstruction.Construct(Surface(SurfNum).Construction).LayerPoint(1)).Roughness;
// find x, don't know x. avoid time consuming geometry algorithm
x = std::sqrt(RoofArea) / 2.0; // quick simplification, geometry routines to develop

Expand Down
10 changes: 3 additions & 7 deletions src/EnergyPlus/CostEstimateManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include <ObjexxFCL/member.functions.hh>

// EnergyPlus Headers
#include <EnergyPlus/Construction.hh>
#include <EnergyPlus/CostEstimateManager.hh>
#include <EnergyPlus/DXCoils.hh>
#include <EnergyPlus/Data/EnergyPlusData.hh>
Expand All @@ -60,11 +61,9 @@
#include <EnergyPlus/DataHeatBalance.hh>
#include <EnergyPlus/DataIPShortCuts.hh>
#include <EnergyPlus/DataPhotovoltaics.hh>
#include <EnergyPlus/DataPrecisionGlobals.hh>
#include <EnergyPlus/DataSurfaces.hh>
#include <EnergyPlus/HeatingCoils.hh>
#include <EnergyPlus/InputProcessing/InputProcessor.hh>
#include <EnergyPlus/PlantChillers.hh>
#include <EnergyPlus/UtilityRoutines.hh>

namespace EnergyPlus {
Expand All @@ -91,7 +90,6 @@ namespace CostEstimateManager {
// Create report using utility subroutines taken from OutputReportTabular (by J.Glazer)

// Using/Aliasing
using namespace DataPrecisionGlobals;
using DataGlobals::KickOffSimulation;
using namespace DataCostEstimate;

Expand Down Expand Up @@ -250,7 +248,6 @@ namespace CostEstimateManager {
// Calculates the Cost Estimate based on inputs.

// Using/Aliasing
using DataHeatBalance::Construct;
using DataHeatBalance::Zone;
using DataPhotovoltaics::iSimplePVModel;
using DataPhotovoltaics::PVarray;
Expand Down Expand Up @@ -298,7 +295,7 @@ namespace CostEstimateManager {
}

ThisConstructStr = CostLineItem(Item).ParentObjName;
ThisConstructID = UtilityRoutines::FindItem(ThisConstructStr, Construct);
ThisConstructID = UtilityRoutines::FindItem(ThisConstructStr, dataConstruction.Construct);
if (ThisConstructID == 0) { // do any surfaces have the specified construction? If not issue warning.
ShowWarningError("ComponentCost:LineItem: \"" + CostLineItem(Item).LineName + "\" Construction=\"" +
CostLineItem(Item).ParentObjName + "\", no surfaces have the Construction specified");
Expand Down Expand Up @@ -529,7 +526,6 @@ namespace CostEstimateManager {
// Calculates the Cost Estimate based on inputs.

// Using/Aliasing
using DataHeatBalance::Construct;
using DataHeatBalance::Lights;
using DataHeatBalance::Zone;
using DataPhotovoltaics::iSimplePVModel;
Expand Down Expand Up @@ -576,7 +572,7 @@ namespace CostEstimateManager {
} else if (SELECT_CASE_var == "CONSTRUCTION") {

ThisConstructStr = CostLineItem(Item).ParentObjName;
ThisConstructID = UtilityRoutines::FindItem(ThisConstructStr, Construct);
ThisConstructID = UtilityRoutines::FindItem(ThisConstructStr, dataConstruction.Construct);
// need to determine unique surfacs... some surfaces are shared by zones and hence doubled
uniqueSurfMask.dimension(TotSurfaces, true); // init to true and change duplicates to false
SurfMultipleARR.dimension(TotSurfaces, 1.0);
Expand Down
24 changes: 13 additions & 11 deletions src/EnergyPlus/DElightManagerF.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
#include <ObjexxFCL/string.functions.hh>

// EnergyPlus Headers
#include <EnergyPlus/Construction.hh>
#include <EnergyPlus/DElightManagerF.hh>
#include <EnergyPlus/DataDElight.hh>
#include <EnergyPlus/DataDaylighting.hh>
Expand All @@ -69,6 +70,7 @@
#include <EnergyPlus/General.hh>
#include <EnergyPlus/InputProcessing/InputProcessor.hh>
#include <EnergyPlus/InternalHeatGains.hh>
#include <EnergyPlus/Material.hh>
#include <EnergyPlus/OutputProcessor.hh>
#include <EnergyPlus/UtilityRoutines.hh>

Expand Down Expand Up @@ -331,10 +333,10 @@ namespace DElightManagerF {
// Is this Surface exposed to the exterior?
if (surf.ExtSolar) {
// Get the index for the outside (i.e., 1st) Material Layer for this Construction
iMatlLayer = Construct(iconstruct).LayerPoint(1);
iMatlLayer = dataConstruction.Construct(iconstruct).LayerPoint(1);
// Get the outside visible reflectance of this material layer
// (since Construct(iconstruct)%ReflectVisDiffFront always appears to == 0.0)
rExtVisRefl = 1.0 - Material(iMatlLayer).AbsorpVisible;
rExtVisRefl = 1.0 - dataMaterial.Material(iMatlLayer).AbsorpVisible;
} else {
rExtVisRefl = 0.0;
}
Expand All @@ -346,7 +348,7 @@ namespace DElightManagerF {
cNameWOBlanks,
surf.Azimuth,
surf.Tilt,
Construct(iconstruct).ReflectVisDiffBack,
dataConstruction.Construct(iconstruct).ReflectVisDiffBack,
rExtVisRefl,
surf.Sides);

Expand Down Expand Up @@ -647,14 +649,14 @@ namespace DElightManagerF {
print(delightInFile,
Format_921,
iWndoConstIndexes(iconst) + 10000,
Construct(iWndoConstIndexes(iconst)).TransDiffVis,
Construct(iWndoConstIndexes(iconst)).ReflectVisDiffBack,
Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef(1),
Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef(2),
Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef(3),
Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef(4),
Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef(5),
Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef(6));
dataConstruction.Construct(iWndoConstIndexes(iconst)).TransDiffVis,
dataConstruction.Construct(iWndoConstIndexes(iconst)).ReflectVisDiffBack,
dataConstruction.Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef(1),
dataConstruction.Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef(2),
dataConstruction.Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef(3),
dataConstruction.Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef(4),
dataConstruction.Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef(5),
dataConstruction.Construct(iWndoConstIndexes(iconst)).TransVisBeamCoef(6));

} // Glass Type loop

Expand Down
Loading

6 comments on commit 0bd3544

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

8111_DST_Southern_Crash (jmarrec) - x86_64-Linux-Ubuntu-18.04-cppcheck: OK (0 of 0 tests passed, 0 test warnings)

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

8111_DST_Southern_Crash (jmarrec) - x86_64-Linux-Ubuntu-18.04-custom_check: OK (13 of 13 tests passed, 0 test warnings)

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

8111_DST_Southern_Crash (jmarrec) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (2908 of 2908 tests passed, 0 test warnings)

Build Badge Test 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.

8111_DST_Southern_Crash (jmarrec) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1450 of 1450 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

8111_DST_Southern_Crash (jmarrec) - Win64-Windows-10-VisualStudio-16: OK (2136 of 2136 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.

8111_DST_Southern_Crash (jmarrec) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: OK (713 of 713 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please # to comment.