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

Add Space Component Loads Report and Fix Zone Component Loads when Enclosures Differ from Zones #10730

Open
wants to merge 35 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
a44e81e
Space IV.6 - component loads 1
mjwitte Sep 10, 2024
f46b541
Merge remote-tracking branch 'remotes/origin/develop' into spaceCompL…
mjwitte Sep 11, 2024
1151757
Space IV.6 - component loads 2
mjwitte Sep 11, 2024
d7ca028
Space IV.6 - component loads 3 - consolidate seq arrays
mjwitte Sep 11, 2024
6491fc6
Space IV.6 - component loads 4
mjwitte Sep 12, 2024
d9f4b5c
Space IV.6 - component loads 4 fix
mjwitte Sep 12, 2024
fa3a81a
Merge remote-tracking branch 'remotes/origin/develop' into spaceCompL…
mjwitte Sep 12, 2024
17cd602
Merge remote-tracking branch 'remotes/origin/develop' into spaceCompL…
mjwitte Sep 18, 2024
c12a40b
Space IV.6 - component loads ReportAirHeatBalance
mjwitte Sep 18, 2024
75ccde6
Space IV.6 - component loads state reduction
mjwitte Sep 18, 2024
0957051
Merge remote-tracking branch 'remotes/origin/develop' into spaceCompL…
mjwitte Sep 19, 2024
ac222b0
Space IV.6 - simple airflow and AirRpt cleanup
mjwitte Sep 19, 2024
9881656
Merge remote-tracking branch 'remotes/origin/develop' into spaceCompL…
mjwitte Sep 20, 2024
00f67f0
Space IV.6 - unwind some 3D comp loads arrays
mjwitte Sep 20, 2024
a9a35c9
Space IV.6 - unwind some 3D comp loads arrays cleanup
mjwitte Sep 23, 2024
634d933
Space IV.6 - fix ZoneRefrigerationDoorMixing diffs
mjwitte Sep 23, 2024
5aa85e3
Merge remote-tracking branch 'remotes/origin/develop' into spaceCompL…
mjwitte Sep 23, 2024
9d8ee71
Space IV.6 - unwind 3D comp loads arrays fix fenestration
mjwitte Sep 23, 2024
77e436d
Clear debug code
mjwitte Sep 23, 2024
075de46
Space IV.6 - component loads gather HVAC
mjwitte Sep 24, 2024
70e9cc4
Delete stray Array3D includes
mjwitte Sep 24, 2024
69432ed
Space IV.6 - unwind 3D comp loads arrays for surfaces
mjwitte Sep 24, 2024
cf45780
Revert errant VS reformat
mjwitte Sep 24, 2024
227c141
Space IV.6 - component loads rename reorder
mjwitte Sep 25, 2024
22c969c
Space IV.6 - fix delayed int gains for space and zone
mjwitte Sep 30, 2024
d77ac57
Merge remote-tracking branch 'remotes/origin/develop' into spaceCompL…
mjwitte Oct 1, 2024
2f7cb4f
Merge remote-tracking branch 'remotes/origin/develop' into spaceCompL…
mjwitte Oct 3, 2024
2af52b9
Space IV.6 - improve delayed surf gains for space
mjwitte Oct 3, 2024
5c82432
Move a few InternalHeatGains variables out of state
mjwitte Oct 4, 2024
c6f4c5b
Move a few HeatBalanceSurfaceManager variables out of state
mjwitte Oct 4, 2024
6f091eb
Space IV.6 - revert separate space and zone decay curves
mjwitte Oct 4, 2024
023142d
Space IV.6 - fix delayed surf gains for space
mjwitte Oct 11, 2024
24c7a50
Merge remote-tracking branch 'remotes/origin/develop' into spaceCompL…
mjwitte Oct 11, 2024
ac27ef4
Merge remote-tracking branch 'remotes/origin/develop' into spaceCompL…
mjwitte Oct 11, 2024
21c20f5
Space IV.6 - fix test for spaceAirRpt.allocate
mjwitte Oct 11, 2024
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
1 change: 0 additions & 1 deletion src/EnergyPlus/CurveManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@

// ObjexxFCL Headers
#include <ObjexxFCL/Array.functions.hh>
#include <ObjexxFCL/Array3D.hh>
Copy link
Contributor Author

@mjwitte mjwitte Oct 11, 2024

Choose a reason for hiding this comment

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

Removed several stray includes that were no longer being used.

#include <ObjexxFCL/Fmath.hh>

// Third-party Headers
Expand Down
1 change: 0 additions & 1 deletion src/EnergyPlus/DataDaylighting.hh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
// ObjexxFCL Headers
#include <ObjexxFCL/Array1D.hh>
#include <ObjexxFCL/Array2D.hh>
#include <ObjexxFCL/Array3D.hh>

// EnergyPlus Headers
#include <EnergyPlus/Data/BaseData.hh>
Expand Down
1 change: 0 additions & 1 deletion src/EnergyPlus/DataHeatBalSurface.hh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
// ObjexxFCL Headers
#include <ObjexxFCL/Array1D.hh>
#include <ObjexxFCL/Array2D.hh>
#include <ObjexxFCL/Array3D.hh>

// EnergyPlus Headers
#include <EnergyPlus/Data/BaseData.hh>
Expand Down
2 changes: 2 additions & 0 deletions src/EnergyPlus/DataHeatBalance.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,8 @@ namespace DataHeatBalance {
Real64 MixVdotStdDensity = 0.0; // Mixing volume flow rate of Air {m3/s} at standard density (adjusted for elevation)
Real64 MixMass = 0.0; // Mixing mass of air {kg}
Real64 MixMdot = 0.0; // Mixing mass flow rate of air {kg/s}
Real64 MixSenLoad = 0.0; // Heat Gain(+)/Loss(-) {J} due to mixing and cross mixing and refrigeration door mixing
Real64 MixLatLoad = 0.0; // Latent Gain(+)/Loss(-) {J} due to mixing and cross mixing and refrigeration door mixing
Real64 MixHeatLoss = 0.0; // Heat Gain {J} due to mixing and cross mixing and refrigeration door mixing
Real64 MixHeatGain = 0.0; // Heat Loss {J} due to mixing and cross mixing and refrigeration door mixing
Real64 MixLatentLoss = 0.0; // Latent Gain {J} due to mixing and cross mixing and refrigeration door mixing
Expand Down
1 change: 0 additions & 1 deletion src/EnergyPlus/DaylightingManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
#include <ObjexxFCL/Array1A.hh>
#include <ObjexxFCL/Array2A.hh>
#include <ObjexxFCL/Array2S.hh>
#include <ObjexxFCL/Array3D.hh>
#include <ObjexxFCL/Vector3.fwd.hh>

// EnergyPlus Headers
Expand Down
864 changes: 463 additions & 401 deletions src/EnergyPlus/HVACManager.cc

Large diffs are not rendered by default.

17 changes: 14 additions & 3 deletions src/EnergyPlus/HVACManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
// EnergyPlus Headers
#include <EnergyPlus/Data/BaseData.hh>
#include <EnergyPlus/EnergyPlus.hh>
#include <EnergyPlus/ZoneTempPredictorCorrector.hh>

namespace EnergyPlus {

Expand Down Expand Up @@ -105,6 +106,19 @@ namespace HVACManager {

void ReportAirHeatBalance(EnergyPlusData &state);

void reportAirHeatBal1(EnergyPlusData &state,
DataHeatBalance::AirReportVars &szAirRpt,
DataZoneEquipment::EquipConfiguration const &szEquipConfig,
int const zoneNum,
int const spaceNum = 0);

void reportAirHeatBal2(EnergyPlusData &state,
DataHeatBalance::AirReportVars &szAirRpt,
DataZoneEquipment::EquipConfiguration const &szEquipConfig,
ZoneTempPredictorCorrector::ZoneSpaceHeatBalanceData const &szHeatBal,
int const zoneNum,
int const spaceNum = 0);

void SetHeatToReturnAirFlag(EnergyPlusData &state);

void UpdateZoneInletConvergenceLog(EnergyPlusData &state);
Expand All @@ -128,7 +142,6 @@ struct HVACManagerData : BaseGlobalStruct
int RepIterAir = 0;
bool SimHVACIterSetup = false;
bool TriggerGetAFN = true;
bool ReportAirHeatBalanceFirstTimeFlag = true;
bool MyOneTimeFlag = true;
bool PrintedWarmup = false;
bool MyEnvrnFlag = true;
Expand All @@ -140,8 +153,6 @@ struct HVACManagerData : BaseGlobalStruct
int ErrCount = 0; // Number of times that the maximum iterations was exceeded
int MaxErrCount = 0;
std::string ErrEnvironmentName;
Array1D<Real64> MixSenLoad; // Mixing sensible loss or gain
Array1D<Real64> MixLatLoad; // Mixing latent loss or gain
Comment on lines -143 to -144
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved to DataHeatBalance::AirReportVars.


void init_state([[maybe_unused]] EnergyPlusData &state) override
{
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/HeatBalanceAirManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err

// Following used for reporting
state.dataHeatBal->ZnAirRpt.allocate(state.dataGlobal->NumOfZones);
if (state.dataHeatBal->doSpaceHeatBalanceSimulation) {
if (state.dataHeatBal->doSpaceHeatBalanceSizing || state.dataHeatBal->doSpaceHeatBalanceSimulation) {
state.dataHeatBal->spaceAirRpt.allocate(state.dataGlobal->numSpaces);
}

Expand Down
44 changes: 21 additions & 23 deletions src/EnergyPlus/HeatBalanceSurfaceManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3819,16 +3819,17 @@ void InitIntSolarDistribution(EnergyPlusData &state)
state.dataViewFactor->EnclRadInfo(radEnclosureNum).radQThermalRad *
state.dataViewFactor->EnclRadInfo(radEnclosureNum).radThermAbsMult * state.dataHeatBalSurf->SurfAbsThermalInt(SurfNum);
} else {
state.dataHeatBalSurfMgr->curQL = state.dataViewFactor->EnclRadInfo(radEnclosureNum).radQThermalRad;
// radiant value prior to adjustment for pulse for load component report
Real64 const curQL = state.dataViewFactor->EnclRadInfo(radEnclosureNum).radQThermalRad;
// for the loads component report during the special sizing run increase the radiant portion
// a small amount to create a "pulse" of heat that is used for the
state.dataHeatBalSurfMgr->adjQL =
state.dataHeatBalSurfMgr->curQL + state.dataViewFactor->EnclRadInfo(radEnclosureNum).FloorArea * pulseMultipler;
// radiant value including adjustment for pulse for load component report
Real64 const adjQL = curQL + state.dataViewFactor->EnclRadInfo(radEnclosureNum).FloorArea * pulseMultipler;
// ITABSF is the Inside Thermal Absorptance
// EnclRadThermAbsMult is a multiplier for each zone/enclosure
// SurfQdotRadIntGainsInPerArea is the thermal radiation absorbed on inside surfaces
state.dataHeatBal->SurfQdotRadIntGainsInPerArea(SurfNum) =
state.dataHeatBalSurfMgr->adjQL * state.dataViewFactor->EnclRadInfo(radEnclosureNum).radThermAbsMult *
adjQL * state.dataViewFactor->EnclRadInfo(radEnclosureNum).radThermAbsMult *
state.dataHeatBalSurf->SurfAbsThermalInt(SurfNum);
}

Expand Down Expand Up @@ -3956,16 +3957,17 @@ void InitIntSolarDistribution(EnergyPlusData &state)
state.dataViewFactor->EnclRadInfo(radEnclosureNum).radQThermalRad *
state.dataViewFactor->EnclRadInfo(radEnclosureNum).radThermAbsMult * state.dataHeatBalSurf->SurfAbsThermalInt(SurfNum);
} else {
state.dataHeatBalSurfMgr->curQL = state.dataViewFactor->EnclRadInfo(radEnclosureNum).radQThermalRad;
// radiant value prior to adjustment for pulse for load component report
Real64 const curQL = state.dataViewFactor->EnclRadInfo(radEnclosureNum).radQThermalRad;
// for the loads component report during the special sizing run increase the radiant portion
// a small amount to create a "pulse" of heat that is used for the
state.dataHeatBalSurfMgr->adjQL =
state.dataHeatBalSurfMgr->curQL + state.dataViewFactor->EnclRadInfo(radEnclosureNum).FloorArea * pulseMultipler;
// radiant value including adjustment for pulse for load component report
Real64 const adjQL = curQL + state.dataViewFactor->EnclRadInfo(radEnclosureNum).FloorArea * pulseMultipler;
// ITABSF is the Inside Thermal Absorptance
// EnclRadThermAbsMult is a multiplier for each zone/radiant enclosure
// SurfQdotRadIntGainsInPerArea is the thermal radiation absorbed on inside surfaces
state.dataHeatBal->SurfQdotRadIntGainsInPerArea(SurfNum) =
state.dataHeatBalSurfMgr->adjQL * state.dataViewFactor->EnclRadInfo(radEnclosureNum).radThermAbsMult *
adjQL * state.dataViewFactor->EnclRadInfo(radEnclosureNum).radThermAbsMult *
state.dataHeatBalSurf->SurfAbsThermalInt(SurfNum);
}
// Radiations absorbed by the window layers coming from zone side
Expand Down Expand Up @@ -6569,31 +6571,28 @@ void ReportSurfaceHeatBalance(EnergyPlusData &state)
}

if (state.dataGlobal->ZoneSizingCalc && state.dataGlobal->CompLoadReportIsReq) {
// This is by surface, so it works for both space and zone component loads
int TimeStepInDay = (state.dataGlobal->HourOfDay - 1) * state.dataGlobal->NumOfTimeStepInHour + state.dataGlobal->TimeStep;
auto &surfCLDayTS = state.dataOutRptTab->surfCompLoads[state.dataSize->CurOverallSimDay - 1].ts[TimeStepInDay - 1];
for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) {
for (int spaceNum : state.dataHeatBal->Zone(zoneNum).spaceIndexes) {
auto const &thisSpace = state.dataHeatBal->space(spaceNum);
int firstSurf = thisSpace.OpaqOrIntMassSurfaceFirst;
int lastSurf = thisSpace.OpaqOrIntMassSurfaceLast;
for (int surfNum = firstSurf; surfNum <= lastSurf; ++surfNum) {
state.dataOutRptTab->lightSWRadSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, surfNum) =
state.dataHeatBalSurf->SurfQdotRadLightsInRep(surfNum);
state.dataOutRptTab->feneSolarRadSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, surfNum) =
state.dataHeatBalSurf->SurfQdotRadSolarInRep(surfNum);
surfCLDayTS.surf[surfNum - 1].lightSWRadSeq = state.dataHeatBalSurf->SurfQdotRadLightsInRep(surfNum);
surfCLDayTS.surf[surfNum - 1].feneSolarRadSeq = state.dataHeatBalSurf->SurfQdotRadSolarInRep(surfNum);
}
firstSurf = thisSpace.OpaqOrWinSurfaceFirst;
lastSurf = thisSpace.OpaqOrWinSurfaceLast;
for (int surfNum = firstSurf; surfNum <= lastSurf; ++surfNum) {
auto const &surface = state.dataSurface->Surface(surfNum);
if (!state.dataGlobal->WarmupFlag) {
if (state.dataGlobal->isPulseZoneSizing) {
state.dataOutRptTab->loadConvectedWithPulse(state.dataSize->CurOverallSimDay, TimeStepInDay, surfNum) =
state.dataHeatBalSurf->SurfQdotConvInRep(surfNum);
surfCLDayTS.surf[surfNum - 1].loadConvectedWithPulse = state.dataHeatBalSurf->SurfQdotConvInRep(surfNum);
} else {
state.dataOutRptTab->loadConvectedNormal(state.dataSize->CurOverallSimDay, TimeStepInDay, surfNum) =
state.dataHeatBalSurf->SurfQdotConvInRep(surfNum);
state.dataOutRptTab->netSurfRadSeq(state.dataSize->CurOverallSimDay, TimeStepInDay, surfNum) =
state.dataHeatBalSurf->SurfQdotRadNetLWInPerArea(surfNum) * surface.Area;
surfCLDayTS.surf[surfNum - 1].loadConvectedNormal = state.dataHeatBalSurf->SurfQdotConvInRep(surfNum);
surfCLDayTS.surf[surfNum - 1].netSurfRadSeq = state.dataHeatBalSurf->SurfQdotRadNetLWInPerArea(surfNum) * surface.Area;
}
}
}
Expand Down Expand Up @@ -9529,17 +9528,16 @@ void GatherComponentLoadsSurfAbsFact(EnergyPlusData &state)
// METHODOLOGY EMPLOYED:
// Save sequence of values for report during sizing.

// This is by surface, so it works for both space and zone component loads
if (state.dataGlobal->CompLoadReportIsReq && !state.dataGlobal->isPulseZoneSizing) {
int TimeStepInDay = (state.dataGlobal->HourOfDay - 1) * state.dataGlobal->NumOfTimeStepInHour + state.dataGlobal->TimeStep;
for (int enclosureNum = 1; enclosureNum <= state.dataViewFactor->NumOfRadiantEnclosures; ++enclosureNum) {
state.dataOutRptTab->TMULTseq(state.dataSize->CurOverallSimDay, TimeStepInDay, enclosureNum) =
state.dataViewFactor->EnclRadInfo(enclosureNum).radThermAbsMult;
}
auto &surfCLDayTS = state.dataOutRptTab->surfCompLoads[state.dataSize->CurOverallSimDay - 1].ts[TimeStepInDay - 1];
for (int jSurf = 1; jSurf <= state.dataSurface->TotSurfaces; ++jSurf) {
auto const &surface = state.dataSurface->Surface(jSurf);
if (!surface.HeatTransSurf || surface.Zone == 0) continue; // Skip non-heat transfer surfaces
if (surface.Class == DataSurfaces::SurfaceClass::TDD_Dome) continue; // Skip tubular daylighting device domes
state.dataOutRptTab->ITABSFseq(state.dataSize->CurOverallSimDay, TimeStepInDay, jSurf) = state.dataHeatBalSurf->SurfAbsThermalInt(jSurf);
surfCLDayTS.surf[jSurf - 1].ITABSFseq = state.dataHeatBalSurf->SurfAbsThermalInt(jSurf);
surfCLDayTS.surf[jSurf - 1].TMULTseq = state.dataViewFactor->EnclRadInfo(surface.RadEnclIndex).radThermAbsMult;
}
}
}
Expand Down
5 changes: 0 additions & 5 deletions src/EnergyPlus/HeatBalanceSurfaceManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,6 @@ struct HeatBalSurfMgr : BaseGlobalStruct

Array2D<Real64> DiffuseArray;

Real64 curQL = 0.0; // radiant value prior to adjustment for pulse for load component report
Real64 adjQL = 0.0; // radiant value including adjustment for pulse for load component report

bool ManageSurfaceHeatBalancefirstTime = true;
bool InitSurfaceHeatBalancefirstTime = true;
bool UpdateThermalHistoriesFirstTimeFlag = true;
Expand Down Expand Up @@ -286,8 +283,6 @@ struct HeatBalSurfMgr : BaseGlobalStruct
ZoneAESum.clear();

DiffuseArray.clear();
curQL = 0.0;
adjQL = 0.0;

ManageSurfaceHeatBalancefirstTime = true;
InitSurfaceHeatBalancefirstTime = true;
Expand Down
Loading
Loading