Skip to content

Commit

Permalink
Addressed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Nigusse committed Jul 8, 2019
1 parent 0d23eeb commit 130d322
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1442,15 +1442,15 @@ \subsubsection{Controls}\label{controls-000}

If zone air temperature is within the throttling range, $\PB{T_{set}-0.5\Delta T_{throttle}} < T_{zone} < \PB{T_{set}+0.5\Delta T_{throttle}}$, then continue to operate the cooler if it was running during the previous timestep and do not operate the cooler if it was not running during the previous timestep.

Whenever the unit is operating, it runs at the full design air mass flow rate regardless if the fan is constant or variable speed.
Whenever the unit is operating, it runs at the full design air mass flow rate regardless if the fan is constant or variable speed but the unit cycles to meet the current cooling load.

\textbf{ZoneCoolingLoadOnOffCycling.} This control method operates the cooler similar to how a thermostat would behave, but instead of using temperatures it uses the predicted zone load to cooling setpoint.~ The control uses input for the threshold value for a load that is considered a significant, \({\dot Q_{thresh}}\), and the result from the Predictor for the zone's load to cooling setpoint, \({\dot Q_{CoolLoad}}\). The following algorithm is used to determine if the unit will operate.

If \(\left[ {{{\dot Q}_{CoolLoad}} \le {{\dot Q}_{thresh}}} \right]\) is true, then do not operate cooler unit.

If \(\left[ {{{\dot Q}_{CoolLoad}} > {{\dot Q}_{thresh}}} \right]\) is true, then operate the cooler unit (at full speed).

Whenever the unit is operating, it runs at the full design air mass flow rate regardless if the fan is constant or variable speed.
Whenever the unit is operating, it runs at the full design air mass flow rate regardless if the fan is constant or variable speed but the unit cycles to meet the current cooling load.

\textbf{ZoneCoolingLoadVariableSpeedFan.} This control method also operates the cooler using the predicted zone load to cooling setpoint but instead of on/off cycling, it modulates the fan speed to meet the cooling load.~ This control method is only applicable to cooler units with variable speed supply fans. The control uses input for the threshold value for a load that is considered a significant, \({\dot Q_{thresh}}\), and the result from the Predictor for the zone's cooling load to setpoint, \({\dot Q_{CoolLoad}}\). The following algorithm is used to determine if the unit will operate.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ \subsubsection{Inputs}\label{inputs-4-040}
\item
\textbf{ZoneTemperatureDeadbandOnOffCycling}. This control method determines whether or not to operate the cooler based on the thermostat setpoint and the zone air temperature.~ This thermostatic control method uses a throttling temperature range, determined in the following input field, to model hysteresis-type control to avoid excessive short-cycling.~ If the zone air temperature is warmer than the cooling setpoint temperature plus one-half of the throttling range, then the unit is operated for the entire timestep at the design air mass flow rate.~ If the zone air temperature is cooler than the cooling setpoint temperature minus one-half of the throttling range, then the unit is off for the entire timestep.~ When the zone air temperatures are within the throttling range, then the unit will stay off if it was not running during the previous timestep and will stay on if it was already running. If the unit is On, then the unit is cycled such that it meets the current cooling load and avoids over-cooling the zone.
\item
\textbf{ZoneCoolingLoadOnOffCycling}. This control method determines whether or not to operate the cooler based on the predicted zone load to cooling setpoint.~ If there is a cooling load (and the unit is available), then the unit is operated for the entire timestep at the design air mass flow rate. If there is no cooling load, then the unit is not operated at all.~ The magnitude of the cooling load that will trigger the unit to operate can be controlled using the field below called Cooling Load Control Threshold Heat Transfer Rate. If the unit is On, then the unit is cycled such that it meets the current cooling load and avoids over-cooling the zone.
\textbf{ZoneCoolingLoadOnOffCycling}. This control method determines whether or not to operate the cooler based on the predicted zone load to cooling setpoint.~ If there is a cooling load (and the unit is available), then the unit is operated for the entire timestep at the design air mass flow rate. If there is no cooling load, then the unit is cycled at the design air mass flow rate such that it meets the current cooling load.~ The magnitude of the cooling load that will trigger the unit to operate can be controlled using the field below called Cooling Load Control Threshold Heat Transfer Rate.
\item
\textbf{ZoneCoolingLoadVariableSpeedFan}.~ This control method determines whether or not to operate the cooler based on the predicted zone load to cooling setpoint.~ If there is a cooling load (and the unit is available), then the unit is operated for the entire timestep at a fan speed that is controlled to meet the sensible cooling load (if possible). The magnitude of the cooling load that will trigger the unit to operate can be controlled using the field below called Cooling Load Control Threshold Heat Transfer Rate.~ This control method requires a variable speed fan and cannot be used with \hyperref[fanconstantvolume]{Fan:ConstantVolume} or \hyperref[fanonoff]{Fan:OnOff}.
\end{itemize}
Expand Down
70 changes: 27 additions & 43 deletions src/EnergyPlus/EvaporativeCoolers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ namespace EvaporativeCoolers {
// use these. They are cleared by clear_state() for use by unit tests, but normal simulations should be unaffected.
// This is purposefully in an anonymous namespace so nothing outside this implementation file can use it.
bool InitEvapCoolerMyOneTimeFlag(true);
} // namespace
bool ZoneEquipmentListChecked(false); // True after the Zone Equipment List has been checked for items
} // namespace

// DERIVED TYPE DEFINITIONS

Expand Down Expand Up @@ -3652,8 +3653,6 @@ namespace EvaporativeCoolers {
// Using/Aliasing
using BranchNodeConnections::SetUpCompSets;
using DataGlobals::NumOfZones;
// using DataHVACGlobals::FanType_SimpleConstVolume;
// using DataHVACGlobals::FanType_SimpleOnOff;
using DataSizing::ZoneHVACSizing;
using DataZoneEquipment::ZoneEquipConfig;
using Fans::GetFanAvailSchPtr;
Expand Down Expand Up @@ -4121,7 +4120,6 @@ namespace EvaporativeCoolers {

// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
int Loop;
static bool ZoneEquipmentListChecked(false); // True after the Zone Equipment List has been checked for items
Real64 TimeElapsed;

if (allocated(ZoneComp)) {
Expand Down Expand Up @@ -4544,32 +4542,8 @@ namespace EvaporativeCoolers {
Real64 &LatentOutputProvided // target cooling load
)
{

// PURPOSE OF THIS SUBROUTINE:
// caculates zone evaporative cooler sensible and latent outputs

// METHODOLOGY EMPLOYED:
// na

// REFERENCES:
// na

// Using/Aliasing
using DataHVACGlobals::ZoneCompTurnFansOff;
using DataHVACGlobals::ZoneCompTurnFansOn;

// Locals
// SUBROUTINE ARGUMENT DEFINITIONS:

// SUBROUTINE PARAMETER DEFINITIONS:
// na
// INTERFACE BLOCK SPECIFICATIONS:
// na

// DERIVED TYPE DEFINITIONS:
// na

// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
Real64 MinHumRat; // minimum humidity ratio

int const ZoneNodeNum = ZoneEvapUnit(UnitNum).ZoneNodeNum;
Expand Down Expand Up @@ -4617,10 +4591,15 @@ namespace EvaporativeCoolers {
Node(FanOutletNodeNum).MassFlowRate = Node(OAInletNodeNum).MassFlowRate;
Node(FanOutletNodeNum).MassFlowRateMaxAvail = Node(OAInletNodeNum).MassFlowRate;
if (ZoneEvapUnit(UnitNum).FanType_Num != DataHVACGlobals::FanType_SystemModelObject) {
Fans::SimulateFanComponents(
ZoneEvapUnit(UnitNum).FanName, false, ZoneEvapUnit(UnitNum).FanIndex, _, ZoneCompTurnFansOn, ZoneCompTurnFansOff);
Fans::SimulateFanComponents(ZoneEvapUnit(UnitNum).FanName,
false,
ZoneEvapUnit(UnitNum).FanIndex,
_,
DataHVACGlobals::ZoneCompTurnFansOn,
DataHVACGlobals::ZoneCompTurnFansOff);
} else {
HVACFan::fanObjs[ZoneEvapUnit(UnitNum).FanIndex]->simulate(_, ZoneCompTurnFansOn, ZoneCompTurnFansOff, _);
HVACFan::fanObjs[ZoneEvapUnit(UnitNum).FanIndex]->simulate(
_, DataHVACGlobals::ZoneCompTurnFansOn, DataHVACGlobals::ZoneCompTurnFansOff, _);
}
}

Expand All @@ -4633,10 +4612,15 @@ namespace EvaporativeCoolers {
}
if (ZoneEvapUnit(UnitNum).FanLocation == DrawThruFan) {
if (ZoneEvapUnit(UnitNum).FanType_Num != DataHVACGlobals::FanType_SystemModelObject) {
Fans::SimulateFanComponents(
ZoneEvapUnit(UnitNum).FanName, false, ZoneEvapUnit(UnitNum).FanIndex, _, ZoneCompTurnFansOn, ZoneCompTurnFansOff);
Fans::SimulateFanComponents(ZoneEvapUnit(UnitNum).FanName,
false,
ZoneEvapUnit(UnitNum).FanIndex,
_,
DataHVACGlobals::ZoneCompTurnFansOn,
DataHVACGlobals::ZoneCompTurnFansOff);
} else {
HVACFan::fanObjs[ZoneEvapUnit(UnitNum).FanIndex]->simulate(_, ZoneCompTurnFansOn, ZoneCompTurnFansOff, _);
HVACFan::fanObjs[ZoneEvapUnit(UnitNum).FanIndex]->simulate(
_, DataHVACGlobals::ZoneCompTurnFansOn, DataHVACGlobals::ZoneCompTurnFansOff, _);
}
}

Expand All @@ -4654,11 +4638,6 @@ namespace EvaporativeCoolers {

// calculates unit cooling part load ratio using root solver numerical method

// Using/Aliasing
using DataGlobals::WarmupFlag;
using General::RoundSigDigits;
using General::SolveRoot;

// local variables
int const MaxIte(50); // maximum number of iterations
Real64 const Tol(0.01); // error tolerance
Expand All @@ -4677,16 +4656,17 @@ namespace EvaporativeCoolers {
Par(1) = UnitNum;
Par(2) = ZoneCoolingLoad;

SolveRoot(Tol, MaxIte, SolFla, PartLoadRatio, ZoneEvapUnitLoadResidual, 0.0, 1.0, Par);
General::SolveRoot(Tol, MaxIte, SolFla, PartLoadRatio, ZoneEvapUnitLoadResidual, 0.0, 1.0, Par);
if (SolFla == -1) {
if (ZoneEvapUnit(UnitNum).UnitLoadControlMaxIterErrorIndex == 0) {
ShowWarningError("Iteration limit exceeded calculating evap unit part load ratio, for unit=" + ZoneEvapUnit(UnitNum).Name);
ShowContinueErrorTimeStamp("");
ShowContinueError("Unit part load ratio returned=" + RoundSigDigits(PartLoadRatio, 2));
ShowContinueError("Unit part load ratio returned=" + General::RoundSigDigits(PartLoadRatio, 2));
ShowContinueError("Check input for Fan Placement.");
}
ShowRecurringWarningErrorAtEnd("Zone Evaporative Cooler unit part load ratio control failed (iteration limit [" +
RoundSigDigits(MaxIte) + "]) for ZoneHVAC:EvaporativeCoolerUnit =\"" + ZoneEvapUnit(UnitNum).Name,
General::RoundSigDigits(MaxIte) + "]) for ZoneHVAC:EvaporativeCoolerUnit =\"" +
ZoneEvapUnit(UnitNum).Name,
ZoneEvapUnit(UnitNum).UnitLoadControlMaxIterErrorIndex);

} else if (SolFla == -2) {
Expand All @@ -4695,7 +4675,7 @@ namespace EvaporativeCoolers {
ZoneEvapUnit(UnitNum).Name);
ShowContinueError("Check input for Fan Placement.");
ShowContinueErrorTimeStamp("");
if (WarmupFlag) ShowContinueError("Error occurred during warmup days.");
if (DataGlobals::WarmupFlag) ShowContinueError("Error occurred during warmup days.");
}
ShowRecurringWarningErrorAtEnd(
"Zone Evaporative Cooler unit part load ratio control failed (limits exceeded) for ZoneHVAC:EvaporativeCoolerUnit =\"" +
Expand Down Expand Up @@ -5028,14 +5008,18 @@ namespace EvaporativeCoolers {
void clear_state()
{
NumEvapCool = 0;
EvapCond.clear();
NumZoneEvapUnits = 0;
ZoneEvapUnit.clear();
ZoneEvapCoolerUnitFields.clear();
GetInputEvapComponentsFlag = false;
GetInputZoneEvapUnit = true;
UniqueEvapCondNames.clear();
MySizeFlag.clear();
CheckEquipName.clear();
CheckZoneEvapUnitName.clear();
InitEvapCoolerMyOneTimeFlag = true;
ZoneEquipmentListChecked = false;
}

} // namespace EvaporativeCoolers
Expand Down

8 comments on commit 130d322

@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.

166330897_Issue6707 (Nigusse) - x86_64-Linux-Ubuntu-18.04-cppcheck: OK (0 of 0 tests passed, 0 test warnings)

Build 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.

166330897_Issue6707 (Nigusse) - x86_64-Linux-Ubuntu-18.04-custom_check: OK (9 of 9 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.

166330897_Issue6707 (Nigusse) - x86_64-Linux-Ubuntu-18.04-gcc-7.4: OK (2472 of 2477 tests passed, 2 test warnings)

Messages:\n

  • 5 tests had: MTR big diffs.
  • 4 tests had: Table big diffs.
  • 3 tests had: AUD diffs.
  • 3 tests had: EIO diffs.
  • 3 tests had: ESO big diffs.
  • 3 tests had: RDD diffs.
  • 2 tests had: ESO small diffs.

Failures:\n

regression Test Summary

  • Passed: 676
  • Failed: 5

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.

166330897_Issue6707 (Nigusse) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-UnitTestsCoverage-Debug: OK (1113 of 1113 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

166330897_Issue6707 (Nigusse) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-IntegrationCoverage-Debug: OK (666 of 666 tests passed, 0 test warnings)

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

166330897_Issue6707 (Nigusse) - x86_64-MacOS-10.13-clang: OK (2432 of 2437 tests passed, 2 test warnings)

Messages:\n

  • 5 tests had: MTR big diffs.
  • 4 tests had: Table big diffs.
  • 3 tests had: AUD diffs.
  • 3 tests had: EIO diffs.
  • 3 tests had: ESO big diffs.
  • 3 tests had: RDD diffs.
  • 2 tests had: ESO small diffs.

Failures:\n

regression Test Summary

  • Passed: 656
  • Failed: 5

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.

166330897_Issue6707 (Nigusse) - x86_64-MacOS-10.13-clang: OK (2432 of 2437 tests passed, 2 test warnings)

Messages:\n

  • 5 tests had: MTR big diffs.
  • 4 tests had: Table big diffs.
  • 3 tests had: AUD diffs.
  • 3 tests had: EIO diffs.
  • 3 tests had: ESO big diffs.
  • 3 tests had: RDD diffs.
  • 2 tests had: ESO small diffs.

Failures:\n

regression Test Summary

  • Passed: 656
  • Failed: 5

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

166330897_Issue6707 (Nigusse) - Win64-Windows-10-VisualStudio-16: OK (2430 of 2437 tests passed, 0 test warnings)

Messages:\n

  • 5 tests had: MTR big diffs.
  • 4 tests had: Table big diffs.
  • 3 tests had: AUD diffs.
  • 3 tests had: EIO diffs.
  • 3 tests had: ESO big diffs.
  • 3 tests had: RDD diffs.
  • 2 tests had: ESO small diffs.

Failures:\n

regression Test Summary

  • Passed: 654
  • Failed: 7

Build Badge Test Badge

Please sign in to comment.