Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 11 additions & 15 deletions src/EnergyPlus/HybridEvapCoolingModel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ namespace HybridEvapCoolingModel {

// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
bool DidWeMeetLoad = false;
bool DidWeMeetHumidificaiton = false;
bool DidWeMeetHumidification = false;
bool DidWePartlyMeetLoad = false;
Real64 OptimalSetting_RunFractionTotalFuel = IMPLAUSIBLE_POWER;
Real64 Tma;
Expand Down Expand Up @@ -1490,16 +1490,12 @@ namespace HybridEvapCoolingModel {
}

bool Humidification_load_met = false;

Real64 RequestedDeHumidificationLoad = StepIns.ZoneDehumidificationLoad;
if (DehumidificationRequested && latentRoomORZone > RequestedDeHumidificationLoad) {
if (DehumidificationRequested && latentRoomORZone > StepIns.ZoneDehumidificationLoad) {
Humidification_load_met = true;
}
Real64 RequestedHumidificationLoad = StepIns.ZoneMoistureLoad;
if (HumidificationRequested && latentRoomORZone < RequestedHumidificationLoad) {
if (HumidificationRequested && latentRoomORZone < StepIns.ZoneMoistureLoad) {
Humidification_load_met = true;
}

if (!(HumidificationRequested || DehumidificationRequested)) {
Humidification_load_met = true;
}
Expand Down Expand Up @@ -1538,10 +1534,10 @@ namespace HybridEvapCoolingModel {
OptimalSetting_RunFractionTotalFuel = RunFractionTotalFuel;
OptimalSetting = thisSetting;
DidWeMeetLoad = true;
DidWeMeetHumidificaiton = true;
DidWeMeetHumidification = true;
}
} else {
if (!DidWeMeetLoad && !DidWeMeetHumidificaiton) {
if (!DidWeMeetLoad && !DidWeMeetHumidification) {
bool store_best_attempt = false;

if (Conditioning_load_met) {
Expand Down Expand Up @@ -1633,7 +1629,7 @@ namespace HybridEvapCoolingModel {
if (count_EnvironmentConditionsNotMet > 0) {
ShowWarningError(
state,
EnergyPlus::format("In day {:.1R} was unable to operate for of simulation, {}{:.1R} timesteps because environment conditions "
EnergyPlus::format("In day {:.1R} of simulation, {} was unable to operate for {:.1R} timesteps because environment conditions "
"were beyond the allowable operating range for any mode.",
(Real64)state.dataGlobal->DayOfSim,
Name,
Expand All @@ -1642,8 +1638,8 @@ namespace HybridEvapCoolingModel {
if (count_SAHR_OC_MetOnce > 0) {
ShowWarningError(
state,
EnergyPlus::format("In day {:.1R} of simulation, {} failed to meet supply air humidity ratio for {:.1R} time steps. For these "
"time steps For these time steps was set to mode 0{}",
EnergyPlus::format("In day {:.1R} of simulation, {} failed to meet supply air humidity ratio for {:.1R} timesteps. For these "
"timesteps {} was set to mode 0.",
(Real64)state.dataGlobal->DayOfSim,
Name,
Real64(count_SAHR_OC_MetOnce),
Expand All @@ -1652,8 +1648,8 @@ namespace HybridEvapCoolingModel {
if (count_SAT_OC_MetOnce > 0) {
ShowWarningError(
state,
EnergyPlus::format("In day {:.1R} of simulation, {} failed to meet supply air temperature constraints for {:.1R} time steps. "
"For these time steps For these time steps{} was set to mode 0",
EnergyPlus::format("In day {:.1R} of simulation, {} failed to meet supply air temperature constraints for {:.1R} timesteps. "
"For these timesteps {} was set to mode 0.",
(Real64)state.dataGlobal->DayOfSim,
Name,
Real64(count_SAT_OC_MetOnce),
Expand All @@ -1662,7 +1658,7 @@ namespace HybridEvapCoolingModel {

ShowWarningError(
state,
EnergyPlus::format("In day {:.1R} of simulation, {} failed to satisfy sensible load for {:.1R} time steps. For these time steps "
EnergyPlus::format("In day {:.1R} of simulation, {} failed to satisfy sensible load for {:.1R} timesteps. For these timesteps "
"settings were selected to provide as much sensible cooling or heating as possible, given other constraints.",
(Real64)state.dataGlobal->DayOfSim,
Name,
Expand Down
20 changes: 20 additions & 0 deletions tst/EnergyPlus/unit/UnitaryHybridAirConditioner.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,26 @@ TEST_F(EnergyPlusFixture, Test_UnitaryHybridAirConditioner_ValidateOptionalError
delimited_string({" ** Severe ** GetInputZoneHybridUnitaryAirConditioners: ZoneHVAC:HybridUnitaryHVAC = MUNTERSEPX5000 invalid data",
" ** ~~~ ** Invalid-not found Design Specification Outdoor Air Object Name=\"SZ DSOA SPACE2-1\"."});
EXPECT_TRUE(compare_err_stream(error_string, true));

// Check for warnings when changing operating settings
EnergyPlus::HybridEvapCoolingModel::CStepInputs StepIns;
StepIns.Tosa = 150;
state->dataGlobal->HourOfDay = 1;
state->dataGlobal->TimeStep = 1;
state->dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(1).SetOperatingSetting(*state, StepIns);
state->dataGlobal->HourOfDay = 24;
state->dataHybridUnitaryAC->ZoneHybridUnitaryAirConditioner(1).SetOperatingSetting(*state, StepIns);

std::string const warning_string =
delimited_string({" ** Warning ** In day 0.0 of simulation, MUNTERSEPX5000 was unable to operate for 2.0 timesteps because environment "
"conditions were beyond the allowable operating range for any mode.",
" ** Warning ** In day 0.0 of simulation, MUNTERSEPX5000 failed to meet supply air humidity ratio for 2.0 timesteps. For "
"these timesteps MUNTERSEPX5000 was set to mode 0.",
" ** Warning ** In day 0.0 of simulation, MUNTERSEPX5000 failed to meet supply air temperature constraints for 2.0 "
"timesteps. For these timesteps MUNTERSEPX5000 was set to mode 0.",
" ** Warning ** In day 0.0 of simulation, MUNTERSEPX5000 failed to satisfy sensible load for 2.0 timesteps. For these "
"timesteps settings were selected to provide as much sensible cooling or heating as possible, given other constraints."});
EXPECT_TRUE(compare_err_stream(warning_string, true));
}

TEST_F(EnergyPlusFixture, Test_UnitaryHybridAirConditioner_RuntimeFraction_Initialization)
Expand Down
Loading