Skip to content

Commit

Permalink
Merge pull request #7797 from NREL/7558HumDiffWhenZoneMultUsed
Browse files Browse the repository at this point in the history
Correction of Moisture Load Outputs
  • Loading branch information
Myoldmopar authored Mar 3, 2020
2 parents 4a3642b + f3a66dd commit 415a34b
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -816,11 +816,11 @@ \subsubsection{Outputs}\label{outputs-2-027}

\paragraph{Zone Predicted Moisture Load to Humidifying Setpoint Moisture Transfer Rate {[}kgWater/s{]}}\label{zone-predicted-moisture-load-to-humidifying-setpoint-moisture-transfer-rate-kgwaters}

This is the predicted latent (moisture) load in kg\(_{r}\)/s required to meet the current zone humidistat \textbf{humidifying} setpoint. This is calculated and reported from the Predict step in the Zone Predictor-Corrector module. For nearly all equipment types, the Predictor-Corrector evaluates the active humidistat humidifying setpoints, determines if the zone requires humidification or not, and then passes this load to the equipment for the case of a dual setpoint humidistat (see Zone Predicted Moisture Load Moisture Transfer Rate, above, for single setpoint humidistat case). This value is multiplied by zone or group multipliers.
This is the predicted latent (moisture) load in kg\(_{r}\)/s required to meet the current zone humidistat \textbf{humidifying} setpoint. This is calculated and reported from the Predict step in the Zone Predictor-Corrector module. For nearly all equipment types, the Predictor-Corrector evaluates the active humidistat humidifying setpoints, determines if the zone requires humidification or not, and then passes this load to the equipment for the case of a dual setpoint humidistat (see Zone Predicted Moisture Load Moisture Transfer Rate, above, for single setpoint humidistat case). This value is not multiplied by zone or group multipliers.

\paragraph{Zone Predicted Moisture Load to Dehumidifying Setpoint Moisture Transfer Rate {[}kgWater/s{]}}\label{zone-predicted-moisture-load-to-dehumidifying-setpoint-moisture-transfer-rate-kgwaters}

This is the predicted latent (moisture) load in kg\(_{r}\)/s required to meet the current zone humidistat \textbf{dehumidifying} setpoint. This is calculated and reported from the Predict step in the Zone Predictor-Corrector module. For nearly all equipment types, the Predictor-Corrector evaluates the active humidistat humidifying setpoints, determines if the zone requires dehumidification or not, and then passes this load to the equipment for a dual setpoint humidistat (see Zone Predicted Moisture Load Moisture Transfer Rate, above, for single setpoint humidistat case). This value is multiplied by zone or group multipliers.
This is the predicted latent (moisture) load in kg\(_{r}\)/s required to meet the current zone humidistat \textbf{dehumidifying} setpoint. This is calculated and reported from the Predict step in the Zone Predictor-Corrector module. For nearly all equipment types, the Predictor-Corrector evaluates the active humidistat humidifying setpoints, determines if the zone requires dehumidification or not, and then passes this load to the equipment for a dual setpoint humidistat (see Zone Predicted Moisture Load Moisture Transfer Rate, above, for single setpoint humidistat case). This value is not multiplied by zone or group multipliers.

\subsection{ZoneControl:Thermostat:ThermalComfort}\label{zonecontrolthermostatthermalcomfort}

Expand Down
4 changes: 4 additions & 0 deletions src/EnergyPlus/DataHeatBalance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,8 @@ namespace DataHeatBalance {
Array1D<Real64> SNLoadPredictedHSPRate; // Predicted load to heating setpoint (unmultiplied)
Array1D<Real64> SNLoadPredictedCSPRate; // Predicted load to cooling setpoint (unmultiplied)
Array1D<Real64> MoisturePredictedRate;
Array1D<Real64> MoisturePredictedHumSPRate; // Predicted latent load to humidification setpoint (unmultiplied)
Array1D<Real64> MoisturePredictedDehumSPRate; // Predicted latent load to dehumidification setpoint (unmultiplied)

Array1D<Real64> ListSNLoadHeatEnergy;
Array1D<Real64> ListSNLoadCoolEnergy;
Expand Down Expand Up @@ -960,6 +962,8 @@ namespace DataHeatBalance {
SNLoadPredictedHSPRate.deallocate();
SNLoadPredictedCSPRate.deallocate();
MoisturePredictedRate.deallocate();
MoisturePredictedHumSPRate.deallocate();
MoisturePredictedDehumSPRate.deallocate();
ListSNLoadHeatEnergy.deallocate();
ListSNLoadCoolEnergy.deallocate();
ListSNLoadHeatRate.deallocate();
Expand Down
2 changes: 2 additions & 0 deletions src/EnergyPlus/DataHeatBalance.hh
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ namespace DataHeatBalance {
extern Array1D<Real64> SNLoadPredictedHSPRate; // Predicted load to heating setpoint (unmultiplied)
extern Array1D<Real64> SNLoadPredictedCSPRate; // Predicted load to cooling setpoint (unmultiplied)
extern Array1D<Real64> MoisturePredictedRate;
extern Array1D<Real64> MoisturePredictedHumSPRate; // Predicted latent load to humidification setpoint (unmultiplied)
extern Array1D<Real64> MoisturePredictedDehumSPRate; // Predicted latent load to dehumidification setpoint (unmultiplied)

extern Array1D<Real64> ListSNLoadHeatEnergy;
extern Array1D<Real64> ListSNLoadCoolEnergy;
Expand Down
43 changes: 34 additions & 9 deletions src/EnergyPlus/ZoneTempPredictorCorrector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2785,6 +2785,8 @@ namespace ZoneTempPredictorCorrector {
SNLoadPredictedHSPRate.dimension(NumOfZones, 0.0);
SNLoadPredictedCSPRate.dimension(NumOfZones, 0.0);
MoisturePredictedRate.dimension(NumOfZones, 0.0);
MoisturePredictedHumSPRate.dimension(NumOfZones, 0.0);
MoisturePredictedDehumSPRate.dimension(NumOfZones, 0.0);
WZoneTimeMinus1.dimension(NumOfZones, 0.0);
WZoneTimeMinus2.dimension(NumOfZones, 0.0);
WZoneTimeMinus3.dimension(NumOfZones, 0.0);
Expand Down Expand Up @@ -2924,17 +2926,16 @@ namespace ZoneTempPredictorCorrector {
Zone(Loop).Name);
SetupOutputVariable("Zone Predicted Moisture Load to Humidifying Setpoint Moisture Transfer Rate",
OutputProcessor::Unit::kgWater_s,
ZoneSysMoistureDemand(Loop).OutputRequiredToHumidifyingSP,
MoisturePredictedHumSPRate(Loop),
"System",
"Average",
Zone(Loop).Name);
SetupOutputVariable("Zone Predicted Moisture Load to Dehumidifying Setpoint Moisture Transfer Rate",
OutputProcessor::Unit::kgWater_s,
ZoneSysMoistureDemand(Loop).OutputRequiredToDehumidifyingSP,
MoisturePredictedDehumSPRate(Loop),
"System",
"Average",
Zone(Loop).Name);
// Zone thermostat setpoints
SetupOutputVariable(
"Zone Thermostat Control Type", OutputProcessor::Unit::None, TempControlType(Loop), "Zone", "Average", Zone(Loop).Name);
SetupOutputVariable("Zone Thermostat Heating Setpoint Temperature",
Expand Down Expand Up @@ -3100,6 +3101,9 @@ namespace ZoneTempPredictorCorrector {
SNLoadPredictedHSPRate = 0.0;
SNLoadPredictedCSPRate = 0.0;
MoisturePredictedRate = 0.0;
MoisturePredictedHumSPRate = 0.0;
MoisturePredictedDehumSPRate = 0.0;

TempIndZnLd = 0.0;
TempDepZnLd = 0.0;
NonAirSystemResponse = 0.0;
Expand Down Expand Up @@ -4746,12 +4750,11 @@ namespace ZoneTempPredictorCorrector {
}

// Save the unmultiplied zone moisture load to a report variable
MoisturePredictedRate(ZoneNum) = ZoneSysMoistureDemand(ZoneNum).TotalOutputRequired;

// Apply the Zone Multiplier to the total zone moisture load
ZoneSysMoistureDemand(ZoneNum).TotalOutputRequired *= Zone(ZoneNum).Multiplier * Zone(ZoneNum).ListMultiplier;
ZoneSysMoistureDemand(ZoneNum).OutputRequiredToHumidifyingSP *= Zone(ZoneNum).Multiplier * Zone(ZoneNum).ListMultiplier;
ZoneSysMoistureDemand(ZoneNum).OutputRequiredToDehumidifyingSP *= Zone(ZoneNum).Multiplier * Zone(ZoneNum).ListMultiplier;
ReportMoistLoadsZoneMultiplier(ZoneSysMoistureDemand(ZoneNum).TotalOutputRequired,
ZoneSysMoistureDemand(ZoneNum).OutputRequiredToHumidifyingSP,
ZoneSysMoistureDemand(ZoneNum).OutputRequiredToDehumidifyingSP,
MoisturePredictedRate(ZoneNum),MoisturePredictedHumSPRate(ZoneNum),MoisturePredictedDehumSPRate(ZoneNum),
Zone(ZoneNum).Multiplier,Zone(ZoneNum).ListMultiplier);

// init each sequenced demand to the full output
if (allocated(ZoneSysMoistureDemand(ZoneNum).SequencedOutputRequired))
Expand All @@ -4764,6 +4767,28 @@ namespace ZoneTempPredictorCorrector {
ZoneSysMoistureDemand(ZoneNum).OutputRequiredToDehumidifyingSP; // array assignment
}

void ReportMoistLoadsZoneMultiplier(Real64 &TotalLoad,
Real64 &TotalHumidLoad,
Real64 &TotalDehumidLoad,
Real64 &MoistLoadSingleZone,
Real64 &MoistLoadHumidSingleZone,
Real64 &MoistLoadDehumidSingleZone,
Real64 const ZoneMultiplier,
Real64 const ZoneMultiplierList
)
{
MoistLoadSingleZone = TotalLoad;
MoistLoadHumidSingleZone = TotalHumidLoad;
MoistLoadDehumidSingleZone = TotalDehumidLoad;

Real64 ZoneMultFac = ZoneMultiplier * ZoneMultiplierList;

TotalLoad *= ZoneMultFac;
TotalHumidLoad *= ZoneMultFac;
TotalDehumidLoad *= ZoneMultFac;
}


void CorrectZoneAirTemp(Real64 &ZoneTempChange, // Temperature change in zone air between previous and current timestep
bool const ShortenTimeStepSys,
bool const UseZoneTimeStepHistory, // if true then use zone timestep history, if false use system time step history
Expand Down
10 changes: 10 additions & 0 deletions src/EnergyPlus/ZoneTempPredictorCorrector.hh
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,16 @@ namespace ZoneTempPredictorCorrector {

void CalcPredictedHumidityRatio(int const ZoneNum, Real64 RAFNFrac);

void ReportMoistLoadsZoneMultiplier(Real64 &TotalLoad,
Real64 &TotalHumidLoad,
Real64 &TotalDehumidLoad,
Real64 &MoistLoadSingleZone,
Real64 &MoistLoadHumidSingleZone,
Real64 &MoistLoadDehumidSingleZone,
Real64 const ZoneMultiplier,
Real64 const ZoneMultiplierList
);

void CorrectZoneAirTemp(Real64 &ZoneTempChange, // Temperature change in zone air between previous and current timestep
bool const ShortenTimeStepSys,
bool const UseZoneTimeStepHistory, // if true then use zone timestep history, if false use system time step history
Expand Down
93 changes: 93 additions & 0 deletions tst/EnergyPlus/unit/ZoneTempPredictorCorrector.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1471,3 +1471,96 @@ TEST_F(EnergyPlusFixture, TempAtPrevTimeStepWithCutoutDeltaT_test)
EXPECT_EQ(22.0, ZoneThermostatSetPointLo(1));
EXPECT_EQ(24.0, ZoneThermostatSetPointHi(1));
}

TEST_F(EnergyPlusFixture, ReportMoistLoadsZoneMultiplier_Test)
{
Real64 TotOutReq;
Real64 OutReqToHumSP;
Real64 OutReqToDehumSP;
Real64 SingleZoneTotRate;
Real64 SingleZoneHumRate;
Real64 SingleZoneDehRate;
Real64 ZoneMultiplier;
Real64 ZoneMultiplierList;
Real64 ExpectedResult;
Real64 AcceptableTolerance = 0.00001;

// Test 1: Zone Multipliers are all unity (1.0). So, single zone loads should be the same as total loads
TotOutReq = 1000.0;
OutReqToHumSP = 2000.0;
OutReqToDehumSP = 3000.0;
ZoneMultiplier = 1.0;
ZoneMultiplierList = 1.0;
ReportMoistLoadsZoneMultiplier(TotOutReq,OutReqToHumSP,OutReqToDehumSP,
SingleZoneTotRate,SingleZoneHumRate,SingleZoneDehRate,
ZoneMultiplier,ZoneMultiplierList);
EXPECT_NEAR(TotOutReq,SingleZoneTotRate,AcceptableTolerance);
EXPECT_NEAR(OutReqToHumSP,SingleZoneHumRate,AcceptableTolerance);
EXPECT_NEAR(OutReqToDehumSP,SingleZoneDehRate,AcceptableTolerance);

// Test 2a: Zone Multiplier (non-list) is greater than 1, list Zone Multiplier is still one
TotOutReq = 1000.0;
OutReqToHumSP = 2000.0;
OutReqToDehumSP = 3000.0;
ZoneMultiplier = 7.0;
ZoneMultiplierList = 1.0;
ReportMoistLoadsZoneMultiplier(TotOutReq,OutReqToHumSP,OutReqToDehumSP,
SingleZoneTotRate,SingleZoneHumRate,SingleZoneDehRate,
ZoneMultiplier,ZoneMultiplierList);
ExpectedResult = 1000.0;
EXPECT_NEAR(ExpectedResult,SingleZoneTotRate,AcceptableTolerance);
ExpectedResult = 2000.0;
EXPECT_NEAR(ExpectedResult,SingleZoneHumRate,AcceptableTolerance);
ExpectedResult = 3000.0;
EXPECT_NEAR(ExpectedResult,SingleZoneDehRate,AcceptableTolerance);
ExpectedResult = 7000.0;
EXPECT_NEAR(TotOutReq,ExpectedResult,AcceptableTolerance);
ExpectedResult = 14000.0;
EXPECT_NEAR(OutReqToHumSP,ExpectedResult,AcceptableTolerance);
ExpectedResult = 21000.0;
EXPECT_NEAR(OutReqToDehumSP,ExpectedResult,AcceptableTolerance);

// Test 2a: list Zone Multiplier is greater than 1, non-list Zone Multiplier is one
TotOutReq = 1000.0;
OutReqToHumSP = 2000.0;
OutReqToDehumSP = 3000.0;
ZoneMultiplier = 1.0;
ZoneMultiplierList = 7.0;
ReportMoistLoadsZoneMultiplier(TotOutReq,OutReqToHumSP,OutReqToDehumSP,
SingleZoneTotRate,SingleZoneHumRate,SingleZoneDehRate,
ZoneMultiplier,ZoneMultiplierList);
ExpectedResult = 1000.0;
EXPECT_NEAR(ExpectedResult,SingleZoneTotRate,AcceptableTolerance);
ExpectedResult = 2000.0;
EXPECT_NEAR(ExpectedResult,SingleZoneHumRate,AcceptableTolerance);
ExpectedResult = 3000.0;
EXPECT_NEAR(ExpectedResult,SingleZoneDehRate,AcceptableTolerance);
ExpectedResult = 7000.0;
EXPECT_NEAR(TotOutReq,ExpectedResult,AcceptableTolerance);
ExpectedResult = 14000.0;
EXPECT_NEAR(OutReqToHumSP,ExpectedResult,AcceptableTolerance);
ExpectedResult = 21000.0;
EXPECT_NEAR(OutReqToDehumSP,ExpectedResult,AcceptableTolerance);

// Test 3: both zone multipliers are greater than 1.0
TotOutReq = 300.0;
OutReqToHumSP = 150.0;
OutReqToDehumSP = 100.0;
ZoneMultiplier = 2.0;
ZoneMultiplierList = 3.0;
ReportMoistLoadsZoneMultiplier(TotOutReq,OutReqToHumSP,OutReqToDehumSP,
SingleZoneTotRate,SingleZoneHumRate,SingleZoneDehRate,
ZoneMultiplier,ZoneMultiplierList);
ExpectedResult = 300.0;
EXPECT_NEAR(ExpectedResult,SingleZoneTotRate,AcceptableTolerance);
ExpectedResult = 150.0;
EXPECT_NEAR(ExpectedResult,SingleZoneHumRate,AcceptableTolerance);
ExpectedResult = 100.0;
EXPECT_NEAR(ExpectedResult,SingleZoneDehRate,AcceptableTolerance);
ExpectedResult = 1800.0;
EXPECT_NEAR(TotOutReq,ExpectedResult,AcceptableTolerance);
ExpectedResult = 900.0;
EXPECT_NEAR(OutReqToHumSP,ExpectedResult,AcceptableTolerance);
ExpectedResult = 600.0;
EXPECT_NEAR(OutReqToDehumSP,ExpectedResult,AcceptableTolerance);
}

14 comments on commit 415a34b

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

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

171609993-Issue7656 (Myoldmopar) - x86_64-MacOS-10.13-clang: OK (2703 of 2703 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

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

develop (Myoldmopar) - x86_64-MacOS-10.13-clang: OK (2014 of 2014 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.

171609993-Issue7656 (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.4: OK (2735 of 2735 tests passed, 1 test warnings)

Messages:\n

  • 1 test had: EIO diffs.
  • 1 test had: ESO small diffs.
  • 1 test had: MTR small diffs.
  • 1 test had: Table small diffs.

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.

171609993-Issue7656 (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-cppcheck: OK (0 of 0 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.

171609993-Issue7656 (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-custom_check: OK (11 of 11 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.

171609993-Issue7656 (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-IntegrationCoverage-Debug: OK (693 of 694 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 693
  • Timeout: 1

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

develop (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.4: OK (2026 of 2026 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.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-cppcheck: OK (0 of 0 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.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-custom_check: OK (11 of 11 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.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-UnitTestsCoverage-Debug: OK (1315 of 1315 tests passed, 0 test warnings)

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

develop (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-IntegrationCoverage-Debug: OK (693 of 694 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 693
  • Timeout: 1

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.

develop (Myoldmopar) - Win64-Windows-10-VisualStudio-16: OK (2010 of 2010 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

171609993-Issue7656 (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-UnitTestsCoverage-Debug: OK (1315 of 1315 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.

171609993-Issue7656 (Myoldmopar) - Win64-Windows-10-VisualStudio-16: OK (2699 of 2699 tests passed, 0 test warnings)

Build Badge Test Badge

Please sign in to comment.