diff --git a/src/EnergyPlus/HybridEvapCoolingModel.cc b/src/EnergyPlus/HybridEvapCoolingModel.cc index 2bc794b0f23..c07f00dcf29 100644 --- a/src/EnergyPlus/HybridEvapCoolingModel.cc +++ b/src/EnergyPlus/HybridEvapCoolingModel.cc @@ -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; @@ -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; } @@ -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) { @@ -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, @@ -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), @@ -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), @@ -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, diff --git a/tst/EnergyPlus/unit/UnitaryHybridAirConditioner.unit.cc b/tst/EnergyPlus/unit/UnitaryHybridAirConditioner.unit.cc index d46389c9a6c..9bb27fad12f 100644 --- a/tst/EnergyPlus/unit/UnitaryHybridAirConditioner.unit.cc +++ b/tst/EnergyPlus/unit/UnitaryHybridAirConditioner.unit.cc @@ -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)