Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global DataSurfaces #8559

Merged
merged 23 commits into from
Mar 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
67ae4ca
moving DataSurfaces to state
mitchute Feb 17, 2021
0acdc64
moving DataSurfaces to state
mitchute Feb 17, 2021
00957de
moving DataSurfaces to state
mitchute Feb 17, 2021
0f39398
moving DataSurfaces to state
mitchute Feb 17, 2021
a3f7e74
moving DataSurfaces to state
mitchute Feb 17, 2021
0704490
moving DataSurfaces to state
mitchute Feb 18, 2021
40938ac
moving DataSurfaces to state
mitchute Feb 18, 2021
f03bd3d
moving DataSurfaces to state
mitchute Feb 18, 2021
62bfd68
moving DataSurfaces to state
mitchute Feb 19, 2021
0989d58
moving DataSurfaces to state
mitchute Feb 19, 2021
e1c0549
moving DataSurfaces to state
mitchute Feb 20, 2021
f6428ab
moving DataSurfaces to state
mitchute Feb 20, 2021
659b9ab
merge develop; resolve conflicts
mitchute Feb 21, 2021
40890e7
Merge branch 'global-state-dataHeatBalance' into global-state-dataSur…
mitchute Feb 23, 2021
05614af
merge global-state-dataHeatBalance; resolve conflicts
mitchute Feb 24, 2021
d3d6e69
Merge branch 'global-state-dataHeatBalance' into global-state-dataSur…
mitchute Feb 26, 2021
df82bff
Merge branch 'global-state-dataHeatBalance' into global-state-dataSur…
mitchute Feb 26, 2021
3b82238
fix build errors
mitchute Feb 26, 2021
3c897b2
Merge branch 'global-state-dataHeatBalance' into global-state-dataSur…
mitchute Mar 1, 2021
2bbc691
merge tdd-surf; resolve conflicts
mitchute Mar 3, 2021
1107529
Merge branch 'tdd-surf' into global-state-dataSurfaces
mitchute Mar 3, 2021
746fa3c
Merge branch 'develop' into global-state-dataSurfaces
mitchute Mar 4, 2021
b856da6
Merge branch 'develop' into global-state-dataSurfaces
mitchute Mar 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/EnergyPlus/AirflowNetwork/src/Elements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2122,8 +2122,8 @@ namespace AirflowNetwork {
OpenFactor = MultizoneSurfaceData(i).OpenFactor;
if (OpenFactor > 0.0) {
Width *= OpenFactor;
if (DataSurfaces::Surface(MultizoneSurfaceData(i).SurfNum).Tilt < 90.0) {
Height *= DataSurfaces::Surface(MultizoneSurfaceData(i).SurfNum).SinTilt;
if (state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).Tilt < 90.0) {
Height *= state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).SinTilt;
}
}

Expand Down
14 changes: 2 additions & 12 deletions src/EnergyPlus/AirflowNetwork/src/Solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,9 @@ namespace AirflowNetwork {
// Walton, G. N., 1989, "AIRNET - A Computer Program for Building Airflow Network Modeling,"
// NISTIR 89-4072, National Institute of Standards and Technology, Gaithersburg, Maryland

// OTHER NOTES: none

// USE STATEMENTS:

// Using/Aliasing
using DataSurfaces::Surface;

//std::vector<AirProperties> properties;

// Data
int NetworkNumOfLinks(0);
int NetworkNumOfNodes(0);

int const NrInt(20); // Number of intervals for a large opening

// Common block AFEDAT
Expand Down Expand Up @@ -2035,8 +2025,8 @@ namespace AirflowNetwork {
for (i = 1; i <= Nl; ++i) {
// Check surface tilt
if (i <= Nl - NumOfLinksIntraZone) { // Revised by L.Gu, on 9 / 29 / 10
if (AirflowNetworkLinkageData(i).DetOpenNum > 0 && Surface(MultizoneSurfaceData(i).SurfNum).Tilt < 90) {
Hfl(i) = Surface(MultizoneSurfaceData(i).SurfNum).SinTilt;
if (AirflowNetworkLinkageData(i).DetOpenNum > 0 && state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).Tilt < 90) {
Hfl(i) = state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).SinTilt;
}
}
// Initialisation
Expand Down
382 changes: 186 additions & 196 deletions src/EnergyPlus/AirflowNetworkBalanceManager.cc

Large diffs are not rendered by default.

32 changes: 9 additions & 23 deletions src/EnergyPlus/ChilledCeilingPanelSimple.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,6 @@ namespace EnergyPlus::CoolingPanelSimple {
using DataLoopNode::NodeType_Water;
using DataLoopNode::ObjectIsNotParent;
using DataPlant::TypeOf_CoolingPanel_Simple;
using DataSurfaces::Surface;

using NodeInputManager::GetOnlySingleNode;
using ScheduleManager::GetScheduleIndex;
using namespace DataIPShortCuts;
Expand Down Expand Up @@ -575,7 +573,7 @@ namespace EnergyPlus::CoolingPanelSimple {
ThisCP.TotSurfToDistrib = MinFraction;
}
if (ThisCP.SurfacePtr(SurfNum) != 0) {
Surface(ThisCP.SurfacePtr(SurfNum)).IntConvSurfGetsRadiantHeat = true;
state.dataSurface->Surface(ThisCP.SurfacePtr(SurfNum)).IntConvSurfGetsRadiantHeat = true;
}

AllFracsSummed += ThisCP.FracDistribToSurf(SurfNum);
Expand Down Expand Up @@ -1590,7 +1588,6 @@ namespace EnergyPlus::CoolingPanelSimple {
using DataHeatBalFanSys::MaxRadHeatFlux;
using DataHeatBalFanSys::QCoolingPanelSurf;
using DataHeatBalFanSys::QCoolingPanelToPerson;
using DataSurfaces::Surface;

// SUBROUTINE PARAMETER DEFINITIONS:
Real64 const SmallestArea(0.001); // Smallest area in meters squared (to avoid a divide by zero)
Expand All @@ -1602,7 +1599,6 @@ namespace EnergyPlus::CoolingPanelSimple {
int ZoneNum; // Pointer to the Zone derived type
Real64 ThisSurfIntensity; // temporary for W/m2 term for rad on a surface


// Initialize arrays
QCoolingPanelSurf = 0.0;
QCoolingPanelToPerson = 0.0;
Expand All @@ -1617,7 +1613,7 @@ namespace EnergyPlus::CoolingPanelSimple {

for (RadSurfNum = 1; RadSurfNum <= ThisCP.TotSurfToDistrib; ++RadSurfNum) {
SurfNum = ThisCP.SurfacePtr(RadSurfNum);
auto &ThisSurf(Surface(SurfNum));
auto &ThisSurf(state.dataSurface->Surface(SurfNum));
if (ThisSurf.Area > SmallestArea) {
ThisSurfIntensity = (state.dataChilledCeilingPanelSimple->CoolingPanelSource(CoolingPanelNum) * ThisCP.FracDistribToSurf(RadSurfNum) / ThisSurf.Area);
QCoolingPanelSurf(SurfNum) += ThisSurfIntensity;
Expand Down Expand Up @@ -1689,47 +1685,37 @@ namespace EnergyPlus::CoolingPanelSimple {
// Using/Aliasing
using DataHeatBalSurface::TempSurfInTmp;
using DataSurfaces::WinShadingType;
using DataSurfaces::Surface;
using DataSurfaces::SurfWinShadingFlag;
using DataSurfaces::SurfWinFrameArea;
using DataSurfaces::SurfWinProjCorrFrIn;
using DataSurfaces::SurfWinFrameTempSurfIn;
using DataSurfaces::SurfWinDividerArea;
using DataSurfaces::SurfWinProjCorrDivIn;
using DataSurfaces::SurfWinDividerTempSurfIn;

// Return value
Real64 SumHATsurf;

// FUNCTION LOCAL VARIABLE DECLARATIONS:
int SurfNum; // Surface number
Real64 Area; // Effective surface area


SumHATsurf = 0.0;

for (SurfNum = state.dataHeatBal->Zone(ZoneNum).HTSurfaceFirst; SurfNum <= state.dataHeatBal->Zone(ZoneNum).HTSurfaceLast; ++SurfNum) {

auto &ThisSurf(Surface(SurfNum));
auto &ThisSurf(state.dataSurface->Surface(SurfNum));

Area = ThisSurf.Area;

if (ThisSurf.Class == DataSurfaces::SurfaceClass::Window) {

if (ANY_INTERIOR_SHADE_BLIND(SurfWinShadingFlag(SurfNum))) {
if (ANY_INTERIOR_SHADE_BLIND(state.dataSurface->SurfWinShadingFlag(SurfNum))) {
// The area is the shade or blind area = the sum of the glazing area and the divider area (which is zero if no divider)
Area += DataSurfaces::SurfWinDividerArea(SurfNum);
Area += state.dataSurface->SurfWinDividerArea(SurfNum);
}

if (SurfWinFrameArea(SurfNum) > 0.0) {
if (state.dataSurface->SurfWinFrameArea(SurfNum) > 0.0) {
// Window frame contribution
SumHATsurf += state.dataHeatBal->HConvIn(SurfNum) * SurfWinFrameArea(SurfNum) * (1.0 + SurfWinProjCorrFrIn(SurfNum)) * SurfWinFrameTempSurfIn(SurfNum);
SumHATsurf += state.dataHeatBal->HConvIn(SurfNum) * state.dataSurface->SurfWinFrameArea(SurfNum) * (1.0 + state.dataSurface->SurfWinProjCorrFrIn(SurfNum)) * state.dataSurface->SurfWinFrameTempSurfIn(SurfNum);
}

if (SurfWinDividerArea(SurfNum) > 0.0 && !ANY_INTERIOR_SHADE_BLIND(SurfWinShadingFlag(SurfNum))) {
if (state.dataSurface->SurfWinDividerArea(SurfNum) > 0.0 && !ANY_INTERIOR_SHADE_BLIND(state.dataSurface->SurfWinShadingFlag(SurfNum))) {
// Window divider contribution (only from shade or blind for window with divider and interior shade or blind)
SumHATsurf +=
state.dataHeatBal->HConvIn(SurfNum) * SurfWinDividerArea(SurfNum) * (1.0 + 2.0 * SurfWinProjCorrDivIn(SurfNum)) * SurfWinDividerTempSurfIn(SurfNum);
state.dataHeatBal->HConvIn(SurfNum) * state.dataSurface->SurfWinDividerArea(SurfNum) * (1.0 + 2.0 * state.dataSurface->SurfWinProjCorrDivIn(SurfNum)) * state.dataSurface->SurfWinDividerTempSurfIn(SurfNum);
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/EnergyPlus/ChillerReformulatedEIR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ namespace EnergyPlus::ChillerReformulatedEIR {
// RE-ENGINEERED na

// MODIFIED
// Aug. 2014, Rongpeng Zhang, added An additional part-load performance curve type
// Aug. 2014, Rongpeng Zhang, added An additional part-load performance curve type

// PURPOSE OF THIS MODULE:
// This module simulates the performance of the electric vapor compression
Expand Down Expand Up @@ -220,7 +220,7 @@ namespace EnergyPlus::ChillerReformulatedEIR {
// DATE WRITTEN: July 2006

// MODIFIED
// Aug. 2014, Rongpeng Zhang, added an additional part-load performance curve type
// Aug. 2014, Rongpeng Zhang, added an additional part-load performance curve type

// PURPOSE OF THIS SUBROUTINE:
// This routine will get the input required by the Reformulated Electric EIR Chiller model
Expand Down Expand Up @@ -1799,9 +1799,9 @@ namespace EnergyPlus::ChillerReformulatedEIR {
// RE-ENGINEERED na

// MODIFIED
// Aug. 2014, Rongpeng Zhang, added an additional part-load performance curve type
// Jun. 2016, Rongpeng Zhang, applied the chiller supply water temperature sensor fault model
// Nov. 2016, Rongpeng Zhang, added fouling chiller fault
// Aug. 2014, Rongpeng Zhang, added an additional part-load performance curve type
// Jun. 2016, Rongpeng Zhang, applied the chiller supply water temperature sensor fault model
// Nov. 2016, Rongpeng Zhang, added fouling chiller fault

// PURPOSE OF THIS SUBROUTINE:
// Simulate a vapor compression chiller using the reformulated model developed by Mark Hydeman
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ CoilCoolingDXCurveFitSpeed::CoilCoolingDXCurveFitSpeed(EnergyPlus::EnergyPlusDat
PLR(0.0), // coil operating part load ratio
CondInletTemp(0.0), // condenser inlet temperature {C}
AirFF(0.0), // ratio of air mass flow rate to rated air mass flow rate
// RatedTotCap( 0.0 ), // rated total capacity at speed {W}
// RatedTotCap( 0.0 ), // rated total capacity at speed {W}

fullLoadPower(0.0), // full load power at speed {W}
fullLoadWasteHeat(0.0), // full load waste heat at speed {W}
Expand Down
Loading