Skip to content

Commit

Permalink
Merge pull request #7386 from NREL/7285-UnitVentControlProblem
Browse files Browse the repository at this point in the history
Unit Ventilator Variable Fraction OA Control Correction and Fix Fan Mode Schedule with Fan:SystemModel
  • Loading branch information
mjwitte authored Jul 29, 2019
2 parents 4aecba1 + 1d4d642 commit 4f4f5d8
Show file tree
Hide file tree
Showing 6 changed files with 273 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1673,13 +1673,13 @@ \subsubsection{Controls and Outdoor Air}\label{controls-and-outdoor-air}

\textbf{HEATING/WITH COIL/FIXED AMOUNT:} The unit is on, there is a heating load, a heating coil is present and is scheduled on, and fixed amount control has been specified. The unit ventilator fixes the outdoor air flow rate as defined by the user and sets the maximum and minimum outdoor air flow rate to be equal in order to avoid the variation of outdoor air flow rate between the maximum and minimum values. The heating coil then attempts to meet any remaining zone heating load.

\textbf{COOLING/NO COIL/VARIABLE PERCENT:} The unit is on, there is a cooling load, no coil is present or it has been scheduled off, and variable percent outdoor air control type has been specified. In this case, the variable percent outdoor air controls what happens with the outdoor air. If the outside temperature is greater than the return temperature, then the outdoor air is set to the minimum as defined by the user input. If the outdoor air temperature is less than the return temperature from the zone, then the outdoor air is set to the maximum outdoor air flow rate as defined by the user. This may be somewhat simplistic in that it could result in overcooling of the space. However, since a temperature goal was not established, this is the best that can be done by the simulation. Since a coil is not present to further condition the supply air, the zone simply receives whatever temperature air results from the outdoor air controls.
\textbf{COOLING/NO COIL/VARIABLE PERCENT:} The unit is on, there is a cooling load, no coil is present or it has been scheduled off, and variable percent outdoor air control type has been specified. In this case, the variable percent outdoor air controls what happens with the outdoor air. If the outside temperature is greater than the return temperature, then the outdoor air is set to the minimum as defined by the user input. If the outdoor air temperature is less than the return temperature from the zone, then the outdoor air is varied up to the maximum flow rate to try to meet whatever cooling load is present. Since a coil is not present to further condition the supply air, the zone simply receives whatever temperature air results from the outdoor air controls.

\textbf{COOLING/NO COIL/FIXED TEMPERATURE:} The unit is on, there is a cooling load, no cooling coil is present or it has been scheduled off, and fixed temperature has been specified. The unit ventilator tries to use outdoor air as best as possible to meet the temperature goal. If it cannot meet this goal because the temperature goal is not between the zone return temperature and the outdoor air temperature, then the unit ventilator will either use the maximum or minimum outdoor air flow rate in the same fashion as the variable percent outdoor air control.

\textbf{COOLING/NO COIL/FIXED AMOUNT:} The unit is on, there is a cooling load, no cooling coil is present or it has been scheduled off, and fixed amount control has been specified. The unit ventilator fixes the outdoor air flow rate as defined by the user and sets the maximum and minimum outdoor air flow rate to be equal in order to avoid the variation of outdoor air flow rate between the maximum and minimum values. Since a coil is not present to further condition the supply air, the zone simply receives whatever temperature air results from the outdoor air controls.

\textbf{COOLING/WITH COIL/VARIABLE PERCENT:} The unit is on, there is a cooling load, a coil is present and is scheduled on, and variable percent outdoor air control type has been specified. In this case, the percentage of outdoor air is set to the minimum flow outdoor air flow rate. The coil then attempts to meet any remaining zone load.
\textbf{COOLING/WITH COIL/VARIABLE PERCENT:} The unit is on, there is a cooling load, a coil is present and is scheduled on, and variable percent outdoor air control type has been specified. In this case, the variable percent outdoor air controls what happens with the outdoor air. If the outside temperature is greater than the return temperature, then the outdoor air is set to the minimum as defined by the user input. If the outdoor air temperature is less than the return temperature from the zone, then the outdoor air is varied up to the maximum flow rate to try to meet whatever cooling load is present. The coil then attempts to meet any remaining zone load.

\textbf{COOLING/WITH COIL/FIXED TEMPERATURE:} The unit is on, there is a cooling load, a cooling coil is present and is scheduled on, and fixed temperature has been specified. The unit ventilator tries to use outdoor air as best as possible to meet the temperature goal. If it cannot meet this goal because the temperature goal is not between the zone return temperature and the outdoor air temperature, then the unit ventilator will either use the maximum or minimum outdoor air flow rate in the same fashion as the fixed temperature outdoor air control for the ``no coil'' conditions. The cooling coil then attempts to meet any remaining zone load.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -924,13 +924,13 @@ \subsection{ZoneHVAC:UnitVentilator}\label{zonehvacunitventilator}

\textbf{Heating /With Coil/FixedAmount:} The unit is on, there is a heating load, a heating coil is present and is scheduled on, and fixed amount control has been specified. The unit ventilator fixes the outdoor air flow rate as defined by the user and sets the maximum and minimum outdoor air flow rate to be equal in order to avoid the variation of outdoor air flow rate between the maximum and minimum values. The heating coil then attempts to meet any remaining zone heating load.

\textbf{Cooling/No Coil/VariablePercent:} The unit is on, there is a cooling load, no coil is present or it has been scheduled off, and variable percent outdoor air control type has been specified. In this case, the variable percent outdoor air controls what happens with the outdoor air. If the outside temperature is greater than the return temperature, then the outdoor air is set to the minimum as defined by the user input. If the outdoor air temperature is less than the return temperature from the zone, then the outdoor air is set to the maximum outdoor air flow rate as defined by the user. This may be somewhat simplistic in that it could result in overcooling of the space. However, since a temperature goal was not established, this is the best that can be done by the simulation. Since a coil is not present to further condition the supply air, the zone simply receives whatever temperature air results from the outdoor air controls.
\textbf{Cooling/No Coil/VariablePercent:} The unit is on, there is a cooling load, no coil is present or it has been scheduled off, and variable percent outdoor air control type has been specified. In this case, the variable percent outdoor air controls what happens with the outdoor air. If the outside temperature is greater than the return temperature, then the outdoor air is set to the minimum as defined by the user input. If the outdoor air temperature is less than the return temperature from the zone, then the outdoor air is varied up to the maximum flow rate to try to meet whatever cooling load is present. Since a coil is not present to further condition the supply air, the zone simply receives whatever temperature air results from the outdoor air controls.

\textbf{Cooling/No Coil/FixedTemperature:} The unit is on, there is a cooling load, no cooling coil is present or it has been scheduled off, and fixed temperature has been specified. The unit ventilator tries to use outdoor air as best as possible to meet the temperature goal. If it cannot meet this goal because the temperature goal is not between the zone return temperature and the outdoor air temperature, then the unit ventilator will either use the maximum or minimum outdoor air flow rate in the same fashion as the variable percent outdoor air control.

\textbf{Cooling/No Coil/FixedAmount:} The unit is on, there is a cooling load, no cooling coil is present or it has been scheduled off, and fixed amount control has been specified. The unit ventilator fixes the outdoor air flow rate as defined by the user and sets the maximum and minimum outdoor air flow rate to be equal in order to avoid the variation of outdoor air flow rate between the maximum and minimum values. Since a coil is not present to further condition the supply air, the zone simply receives whatever temperature air results from the outside air controls.

\textbf{Cooling/With Coil/VariablePercent:} The unit is on, there is a cooling load, a coil is present and is scheduled on, and variable percent outdoor air control type has been specified. In this case, the percentage of outdoor air is set to the minimum flow outdoor air flow rate. The coil then attempts to meet any remaining zone load.
\textbf{Cooling/With Coil/VariablePercent:} The unit is on, there is a cooling load, a coil is present and is scheduled on, and variable percent outdoor air control type has been specified. In this case, the variable percent outdoor air controls what happens with the outdoor air. If the outside temperature is greater than the return temperature, then the outdoor air is set to the minimum as defined by the user input. If the outdoor air temperature is less than the return temperature from the zone, then the outdoor air is varied up to the maximum flow rate to try to meet whatever cooling load is present. The coil then attempts to meet any remaining zone load.

\textbf{Cooling/With Coil/FixedTemperature:} The unit is on, there is a cooling load, a cooling coil is present and is scheduled on, and fixed temperature has been specified. The unit ventilator tries to use outdoor air as best as possible to meet the temperature goal. If it cannot meet this goal because the temperature goal is not between the zone return temperature and the outdoor air temperature, then the unit ventilator will either use the maximum or minimum outdoor air flow rate in the same fashion as the fixed temperature outdoor air control for the ``no coil'' conditions. The cooling coil then attempts to meet any remaining zone load.

Expand Down
73 changes: 54 additions & 19 deletions src/EnergyPlus/UnitVentilator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1508,7 +1508,7 @@ namespace UnitVentilator {
UnitVent(UnitVentNum).FanPartLoadRatio = 0.0;

if (UnitVent(UnitVentNum).FanSchedPtr > 0) {
if (GetCurrentScheduleValue(UnitVent(UnitVentNum).FanSchedPtr) == 0.0 && UnitVent(UnitVentNum).FanType_Num == FanType_SimpleOnOff) {
if (GetCurrentScheduleValue(UnitVent(UnitVentNum).FanSchedPtr) == 0.0) {
UnitVent(UnitVentNum).OpMode = CycFanCycCoil;
} else {
UnitVent(UnitVentNum).OpMode = ContFanCycCoil;
Expand Down Expand Up @@ -3048,22 +3048,11 @@ namespace UnitVentilator {
OAMassFlowRate = MinOAFrac * Node(OutsideAirNode).MassFlowRate;

} else if (SELECT_CASE_var == VariablePercent) {
// This algorithm is probably a bit simplistic in that it just bounces
// back and forth between the maximum outside air and the minimum. In
// REAL(r64)ity, a system *might* vary between the two based on the load in
// the zone. This simple flow control might cause some overcooling but
// chances are that if there is a cooling load and the zone temperature
// gets above the outside temperature that overcooling won't be significant.
if (Tinlet <= Toutdoor) {

OAMassFlowRate = MinOAFrac * Node(OutsideAirNode).MassFlowRate;

} else { // Tinlet > Toutdoor

MaxOAFrac = GetCurrentScheduleValue(UnitVent(UnitVentNum).MaxOASchedPtr);
OAMassFlowRate = MaxOAFrac * Node(OutsideAirNode).MassFlowRate;
}


OAMassFlowRate = SetOAMassFlowRateForCoolingVariablePercent(UnitVentNum,MinOAFrac,Node(OutsideAirNode).MassFlowRate,
GetCurrentScheduleValue(UnitVent(UnitVentNum).MaxOASchedPtr),
Tinlet,Toutdoor);

} else if (SELECT_CASE_var == FixedTemperature) {
// This is basically the same algorithm as for the heating case...
Tdesired = GetCurrentScheduleValue(UnitVent(UnitVentNum).TempSchedPtr);
Expand Down Expand Up @@ -3128,8 +3117,10 @@ namespace UnitVentilator {
OAMassFlowRate = MinOAFrac * Node(OutsideAirNode).MassFlowRate;

} else if (SELECT_CASE_var == VariablePercent) {
// A cooling coil is present so let it try to do the cooling...
OAMassFlowRate = MinOAFrac * Node(OutsideAirNode).MassFlowRate;

OAMassFlowRate = SetOAMassFlowRateForCoolingVariablePercent(UnitVentNum,MinOAFrac,Node(OutsideAirNode).MassFlowRate,
GetCurrentScheduleValue(UnitVent(UnitVentNum).MaxOASchedPtr),
Tinlet,Toutdoor);

} else if (SELECT_CASE_var == FixedTemperature) {
// This is basically the same algorithm as for the heating case...
Expand Down Expand Up @@ -3991,6 +3982,50 @@ namespace UnitVentilator {
}
return Residuum;
}

Real64 SetOAMassFlowRateForCoolingVariablePercent(int const UnitVentNum, // Unit Ventilator index
Real64 const MinOAFrac, // Minimum Outside Air Fraction
Real64 const MassFlowRate, // Design Outside Air Mass Flow Rate
Real64 const MaxOAFrac, // Maximum Outside Air Fraction
Real64 const Tinlet, // Inlet Temperature to Unit or Zone Temperature
Real64 const Toutdoor // Outdoor Air Temperature
)
{

Real64 ActualOAMassFlowRate(0.0); // Result or return value

if (Tinlet <= Toutdoor) {

ActualOAMassFlowRate = MinOAFrac * MassFlowRate;

} else { // Tinlet > Toutdoor
// Use cooler outside air to provide "free" cooling without over-cooling.
// First, use a simple load equals mass flow times Cp time Delta T equation to find OA Mass Flow Rate.
// This must include the enthalpy difference across the fan. Otherwise, this will potentially put a
// small load on the cooling coil (if it exists) or will leave a small load that is not met when it could be.
// Then, limit the OA Mass Flow Rate between the MinOA flow and the MaxOA flow.

Real64 EnthDiffAcrossFan(0.0); // Temperature difference across the fan
if (!UnitVent(UnitVentNum).ATMixerExists) {
EnthDiffAcrossFan = Node(UnitVent(UnitVentNum).FanOutletNode).Enthalpy - Node(UnitVent(UnitVentNum).OAMixerOutNode).Enthalpy;
} else {
if (UnitVent(UnitVentNum).ATMixerType == ATMixer_InletSide) {
EnthDiffAcrossFan = Node(UnitVent(UnitVentNum).FanOutletNode).Enthalpy - Node(UnitVent(UnitVentNum).ATMixerOutNode).Enthalpy;
}
if (UnitVent(UnitVentNum).ATMixerType == ATMixer_SupplySide) {
EnthDiffAcrossFan = Node(UnitVent(UnitVentNum).FanOutletNode).Enthalpy - Node(UnitVent(UnitVentNum).AirInNode).Enthalpy;
}
}

ActualOAMassFlowRate = (std::abs(QZnReq)+(MassFlowRate*std::abs(EnthDiffAcrossFan))) / (PsyCpAirFnWTdb(DataEnvironment::OutHumRat,Tinlet) * (Tinlet-Toutdoor));

ActualOAMassFlowRate = max(ActualOAMassFlowRate,(MinOAFrac*MassFlowRate));
ActualOAMassFlowRate = min(ActualOAMassFlowRate,(MaxOAFrac*MassFlowRate));
}

return ActualOAMassFlowRate;
}


} // namespace UnitVentilator

Expand Down
8 changes: 8 additions & 0 deletions src/EnergyPlus/UnitVentilator.hh
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,14 @@ namespace UnitVentilator {
Real64 CalcUnitVentilatorResidual(Real64 const PartLoadRatio, // Coil Part Load Ratio
Array1<Real64> const &Par // Function parameters
);

Real64 SetOAMassFlowRateForCoolingVariablePercent(int const UnitVentNum, // Unit Ventilator index number
Real64 const MinOAFrac, // Minimum Outside Air Fraction
Real64 const MassFlowRate, // Design Outside Air Mass Flow Rate
Real64 const MaxOAFrac, // Maximum Outside Air Fraction
Real64 const Tinlet, // Inlet Temperature to Unit or Zone Temperature
Real64 const Toutdoor // Outdoor Air Temperature
);

} // namespace UnitVentilator

Expand Down
1 change: 1 addition & 0 deletions tst/EnergyPlus/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ set( test_src
UnitaryHybridAirConditioner.unit.cc
UnitarySystem.unit.cc
UnitHeater.unit.cc
UnitVentilator.unit.cc
UtilityRoutines.unit.cc
VariableSpeedCoils.unit.cc
VAVDefMinMaxFlow.unit.cc
Expand Down
Loading

8 comments on commit 4f4f5d8

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

develop (mjwitte) - x86_64-Linux-Ubuntu-18.04-gcc-7.4: OK (1812 of 1812 tests passed, 0 test warnings)

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

develop (mjwitte) - x86_64-Linux-Ubuntu-18.04-cppcheck: OK (0 of 0 tests passed, 0 test warnings)

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

develop (mjwitte) - x86_64-Linux-Ubuntu-18.04-custom_check: OK (9 of 9 tests passed, 0 test warnings)

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

develop (mjwitte) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-UnitTestsCoverage-Debug: OK (1128 of 1128 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 (mjwitte) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-IntegrationCoverage-Debug: OK (667 of 667 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.

develop (mjwitte) - Win64-Windows-10-VisualStudio-16: OK (1792 of 1792 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 (mjwitte) - x86_64-MacOS-10.13-clang: OK (1791 of 1792 tests passed, 0 test warnings)

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 776
  • Failed: 1

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.

7420-UnitVentCycFanNegCoolCoil (mjwitte) - x86_64-MacOS-10.13-clang: OK (2454 of 2454 tests passed, 0 test warnings)

Build Badge Test Badge

Please sign in to comment.