-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address VS DX cooling coil outlet air condition calculation problem when PLR is zero #8607
Changes from 4 commits
fab99b3
65ca742
917d4c6
629a52a
ac6f2fd
55c3808
9b5efd8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5460,19 +5460,21 @@ namespace VariableSpeedCoils { | |
} | ||
} | ||
|
||
// calculate coil outlet state variables | ||
state.dataVariableSpeedCoils->LoadSideOutletEnth = state.dataVariableSpeedCoils->LoadSideInletEnth - state.dataVariableSpeedCoils->QLoadTotal / state.dataVariableSpeedCoils->LoadSideMassFlowRate; | ||
state.dataVariableSpeedCoils->LoadSideOutletDBTemp = state.dataVariableSpeedCoils->LoadSideInletDBTemp - state.dataVariableSpeedCoils->QSensible / (state.dataVariableSpeedCoils->LoadSideMassFlowRate * CpAir); | ||
if ((PartLoadRatio > 0.0 && CyclingScheme == ContFanCycCoil) || (CyclingScheme == CycFanCycCoil)) { | ||
// calculate coil outlet state variables | ||
state.dataVariableSpeedCoils->LoadSideOutletEnth = state.dataVariableSpeedCoils->LoadSideInletEnth - state.dataVariableSpeedCoils->QLoadTotal / state.dataVariableSpeedCoils->LoadSideMassFlowRate; | ||
state.dataVariableSpeedCoils->LoadSideOutletDBTemp = state.dataVariableSpeedCoils->LoadSideInletDBTemp - state.dataVariableSpeedCoils->QSensible / (state.dataVariableSpeedCoils->LoadSideMassFlowRate * CpAir); | ||
|
||
MaxHumRat = PsyWFnTdbRhPb(state, state.dataVariableSpeedCoils->LoadSideOutletDBTemp, 0.9999, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirPressure, RoutineName); | ||
MaxOutletEnth = PsyHFnTdbW(state.dataVariableSpeedCoils->LoadSideOutletDBTemp, MaxHumRat); | ||
if (state.dataVariableSpeedCoils->LoadSideOutletEnth > MaxOutletEnth) { | ||
state.dataVariableSpeedCoils->LoadSideOutletEnth = MaxOutletEnth; | ||
// QLoadTotal = LoadSideMassFlowRate * (LoadSideInletEnth - LoadSideOutletEnth) | ||
} | ||
state.dataVariableSpeedCoils->LoadSideOutletHumRat = PsyWFnTdbH(state, state.dataVariableSpeedCoils->LoadSideOutletDBTemp, state.dataVariableSpeedCoils->LoadSideOutletEnth, RoutineName); | ||
if (state.dataVariableSpeedCoils->LoadSideOutletHumRat > MaxHumRat) { | ||
state.dataVariableSpeedCoils->LoadSideOutletHumRat = MaxHumRat; | ||
MaxHumRat = PsyWFnTdbRhPb(state, state.dataVariableSpeedCoils->LoadSideOutletDBTemp, 0.9999, state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirPressure, RoutineName); | ||
MaxOutletEnth = PsyHFnTdbW(state.dataVariableSpeedCoils->LoadSideOutletDBTemp, MaxHumRat); | ||
if (state.dataVariableSpeedCoils->LoadSideOutletEnth > MaxOutletEnth) { | ||
state.dataVariableSpeedCoils->LoadSideOutletEnth = MaxOutletEnth; | ||
// QLoadTotal = LoadSideMassFlowRate * (LoadSideInletEnth - LoadSideOutletEnth) | ||
} | ||
state.dataVariableSpeedCoils->LoadSideOutletHumRat = PsyWFnTdbH(state, state.dataVariableSpeedCoils->LoadSideOutletDBTemp, state.dataVariableSpeedCoils->LoadSideOutletEnth, RoutineName); | ||
if (state.dataVariableSpeedCoils->LoadSideOutletHumRat > MaxHumRat) { | ||
state.dataVariableSpeedCoils->LoadSideOutletHumRat = MaxHumRat; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is part of the same change. |
||
} | ||
|
||
++Count; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2702,6 +2702,9 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultispeedPerformance) | |
bool const ZoneEquipment = true; | ||
Real64 sensOut = 0.0; | ||
Real64 latOut = 0.0; | ||
|
||
// this setup is a continuous fan cycling coil op mode | ||
thisSys->m_FanOpMode = DataHVACGlobals::ContFanCycCoil; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added this to correct a failing unit test. |
||
|
||
thisSys->simulate(*state, | ||
thisSys->Name, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,9 @@ | |
#include <EnergyPlus/Data/EnergyPlusData.hh> | ||
#include <EnergyPlus/Psychrometrics.hh> | ||
#include <EnergyPlus/VariableSpeedCoils.hh> | ||
#include <EnergyPlus/DataEnvironment.hh> | ||
#include <EnergyPlus/OutputReportPredefined.hh> | ||
#include <EnergyPlus/DataLoopNode.hh> | ||
|
||
namespace EnergyPlus { | ||
|
||
|
@@ -2807,4 +2810,165 @@ TEST_F(EnergyPlusFixture, VariableSpeedCoils_Test_CalcTotCap_VSWSHP) | |
EXPECT_NEAR(OutletAirRH, 0.999, 0.001); | ||
EXPECT_LT(OutletAirRH, 1.0); | ||
} | ||
|
||
TEST_F(EnergyPlusFixture, VariableSpeedCoils_ContFanCycCoil_Test) | ||
{ | ||
std::string const idf_objects = delimited_string({ | ||
" Coil:Cooling:DX:VariableSpeed,", | ||
" VS DXCOIL, !- Name", | ||
" VS DXCOIL_CoolCNode, !- Air Inlet Node Name", | ||
" VS DXCOIL_HeatCNode, !- Air Outlet Node Name", | ||
" 5, !- Number of Speeds {dimensionless}", | ||
" 5, !- Nominal Speed Level {dimensionless}", | ||
" 135000.0, !- Rated Total Cooling Capacity At Selected Nominal Speed Level {w}", | ||
" 5.00, !- Rated Volumetric Air Flow Rate At Selected Nominal Speed Level {m3/s}", | ||
" 0, !- Nominal Time for Condensate to Begin Leaving the Coil {s}", | ||
" 0, !- Initial Moisture Evaporation Rate Divided by Steady-State AC Latent Capacity {dimensionless}", | ||
" PLF Curve, !- Energy Part Load Fraction Curve Name", | ||
" , !- Condenser Air Inlet Node Name", | ||
" AirCooled, !- Condenser Type", | ||
" , !- Evaporative Condenser Pump Rated Power Consumption {W}", | ||
" , !- Crankcase Heater Capacity {W}", | ||
" 10, !- Maximum Outdoor Dry-Bulb Temperature for Crankcase Heater Operation {C}", | ||
" , !- Minimum Outdoor Dry-Bulb Temperature for Compressor Operation {C}", | ||
" , !- Supply Water Storage Tank Name", | ||
" , !- Condensate Collection Water Storage Tank Name", | ||
" , !- Basin Heater Capacity {W/K}", | ||
" 2, !- Basin Heater Setpoint Temperature {C}", | ||
" , !- Basin Heater Operating Schedule Name", | ||
" 33000.0, !- Speed 1 Reference Unit Total Cooling Capacity At Rated Conditions {w}", | ||
" 0.70, !- Speed 1 Reference Unit Sensible Heat Ratio At Rated Conditions {dimensionless}", | ||
" 4.34, !- Speed 1 Reference Unit COP At Rated Conditions {dimensionless}", | ||
" 1.40, !- Speed 1 Reference Unit Air Flow Rate At Rated Conditions {m3/s}", | ||
" 4.03, !- Speed 1 Reference Unit Condenser Flow Rate at Rated Conditions {m3/s}", | ||
" , !- Speed 1 Reference Unit Pad Effectiveness of Evap Precooling at Rated Conditions {dimensionless}", | ||
" CapacityCurve, !- Speed 1 Total Cooling Capacity Function of Temperature Curve Name", | ||
" CAPFF Curve, !- Speed 1 Total Cooling Capacity Function of Air Flow Fraction Curve Name", | ||
" PowerCurve, !- Speed 1 Energy Input Ratio Function of Temperature Curve Name", | ||
" EIRFF Curve, !- Speed 1 Energy Input Ratio Function of Air Flow Fraction Curve Name", | ||
" 35000.0, !- Speed 2 Reference Unit Total Cooling Capacity At Rated Conditions {w}", | ||
" 0.78, !- Speed 2 Reference Unit Sensible Heat Ratio At Rated Conditions {dimensionless}", | ||
" 4.54, !- Speed 2 Reference Unit COP At Rated Conditions {dimensionless}", | ||
" 1.90, !- Speed 2 Reference Unit Air Flow Rate At Rated Conditions {m3/s}", | ||
" 5.47, !- Speed 2 Reference Unit Condenser Flow Rate at Rated Conditions {m3/s}", | ||
" , !- Speed 2 Reference Unit Pad Effectiveness of Evap Precooling at Rated Conditions {dimensionless}", | ||
" CapacityCurve, !- Speed 2 Total Cooling Capacity Function of Temperature Curve Name", | ||
" CAPFF Curve, !- Speed 2 Total Cooling Capacity Function of Air Flow Fraction Curve Name", | ||
" PowerCurve, !- Speed 2 Energy Input Ratio Function of Temperature Curve Name", | ||
" EIRFF Curve, !- Speed 2 Energy Input Ratio Function of Air Flow Fraction Curve Name", | ||
" 70000.0, !- Speed 3 Reference Unit Total Cooling Capacity At Rated Conditions {w}", | ||
" 0.70, !- Speed 3 Reference Unit Sensible Heat Ratio At Rated Conditions {dimensionless}", | ||
" 4.20, !- Speed 3 Reference Unit COP At Rated Conditions {dimensionless}", | ||
" 2.89, !- Speed 3 Reference Unit Air Flow Rate At Rated Conditions {m3/s}", | ||
" 8.26, !- Speed 3 Reference Unit Condenser Flow Rate at Rated Conditions {m3/s}", | ||
" , !- Speed 3 Reference Unit Pad Effectiveness of Evap Precooling at Rated Conditions {dimensionless}", | ||
" CapacityCurve, !- Speed 3 Total Cooling Capacity Function of Temperature Curve Name", | ||
" CAPFF Curve, !- Speed 3 Total Cooling Capacity Function of Air Flow Fraction Curve Name", | ||
" PowerCurve, !- Speed 3 Energy Input Ratio Function of Temperature Curve Name", | ||
" EIRFF Curve, !- Speed 3 Energy Input Ratio Function of Air Flow Fraction Curve Name", | ||
" 120000.0, !- Speed 4 Reference Unit Total Cooling Capacity At Rated Conditions {w}", | ||
" 0.62, !- Speed 4 Reference Unit Sensible Heat Ratio At Rated Conditions {dimensionless}", | ||
" 3.47, !- Speed 4 Reference Unit COP At Rated Conditions {dimensionless}", | ||
" 3.56, !- Speed 4 Reference Unit Air Flow Rate At Rated Conditions {m3/s}", | ||
" 10.25, !- Speed 4 Reference Unit Condenser Flow Rate at Rated Conditions {m3/s}", | ||
" , !- Speed 4 Reference Unit Pad Effectiveness of Evap Precooling at Rated Conditions {dimensionless}", | ||
" CapacityCurve, !- Speed 4 Total Cooling Capacity Function of Temperature Curve Name", | ||
" CAPFF Curve, !- Speed 4 Total Cooling Capacity Function of Air Flow Fraction Curve Name", | ||
" PowerCurve, !- Speed 4 Energy Input Ratio Function of Temperature Curve Name", | ||
" EIRFF Curve, !- Speed 4 Energy Input Ratio Function of Air Flow Fraction Curve Name", | ||
" 140000.0, !- Speed 5 Reference Unit Total Cooling Capacity At Rated Conditions {w}", | ||
" 0.69, !- Speed 5 Reference Unit Sensible Heat Ratio At Rated Conditions {dimensionless}", | ||
" 3.84, !- Speed 5 Reference Unit COP At Rated Conditions {dimensionless}", | ||
" 5.68, !- Speed 5 Reference Unit Air Flow Rate At Rated Conditions {m3/s}", | ||
" 16.36, !- Speed 5 Reference Unit Condenser Flow Rate at Rated Conditions {m3/s}", | ||
" , !- Speed 5 Reference Unit Pad Effectiveness of Evap Precooling at Rated Conditions {dimensionless}", | ||
" CapacityCurve, !- Speed 5 Total Cooling Capacity Function of Temperature Curve Name", | ||
" CAPFF Curve, !- Speed 5 Total Cooling Capacity Function of Air Flow Fraction Curve Name", | ||
" PowerCurve, !- Speed 5 Energy Input Ratio Function of Temperature Curve Name", | ||
" EIRFF Curve; !- Speed 5 Energy Input Ratio Function of Air Flow Fraction Curve Name", | ||
|
||
"Curve:Biquadratic,", | ||
" CapacityCurve, 1, 0, 0, 0, 0, 0, 10, 25.5, 7.2, 48.8, , , Temperature, Temperature, Dimensionless;", | ||
"Curve:Biquadratic,", | ||
" PowerCurve, 1, 0, 0, 0, 0, 0, 10, 25.5, 7.2, 48.8, , , Temperature, Temperature, Dimensionless;", | ||
"Curve:Cubic,", | ||
" CAPFF Curve, 1, 0, 0, 0, 0, 1, , , Dimensionless, Dimensionless;", | ||
"Curve:Cubic,", | ||
" EIRFF Curve, 1, 0, 0, 0, 0, 1, , , Dimensionless, Dimensionless;", | ||
"Curve:Quadratic,", | ||
" PLF Curve, 0.85, 0.8333, 0.0, 0.0, 0.3, 0.85, 1.0, Dimensionless, Dimensionless;", | ||
|
||
}); | ||
|
||
ASSERT_TRUE(process_idf(idf_objects)); | ||
// get coil inputs | ||
VariableSpeedCoils::GetVarSpeedCoilInput(*state); | ||
// Setting predefined tables is needed though | ||
OutputReportPredefined::SetPredefinedTables(*state); | ||
// Set up some environmental parameters | ||
state->dataEnvrn->OutDryBulbTemp = 5.0; | ||
state->dataEnvrn->OutHumRat = 0.0009; | ||
state->dataEnvrn->OutBaroPress = 99000.0; | ||
state->dataEnvrn->WindSpeed = 5.0; | ||
state->dataEnvrn->WindDir = 270.0; | ||
// set coil parameters | ||
int const CyclingScheme = DataHVACGlobals::ContFanCycCoil; | ||
int DXCoilNum = 1; | ||
int CompOp = 0; | ||
int const SpeedCal = 1; | ||
Real64 RuntimeFrac = 1.0; | ||
Real64 SensLoad = 0.0; | ||
Real64 LatentLoad = 0.0; | ||
Real64 PartLoadFrac = 0.0; | ||
Real64 OnOffAirFlowRatio = 1.0; | ||
Real64 SpeedRatio = 0.0; | ||
Real64 MaxONOFFCyclesperHour(0.0); | ||
Real64 HPTimeConstant(0.0); | ||
Real64 FanDelayTime(0.0); | ||
|
||
// run coil init | ||
VariableSpeedCoils::InitVarSpeedCoil( | ||
*state, DXCoilNum, MaxONOFFCyclesperHour, HPTimeConstant, FanDelayTime, SensLoad, LatentLoad, CyclingScheme, OnOffAirFlowRatio, SpeedRatio, SpeedCal); | ||
// set coil inlet condition | ||
state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirDBTemp = 24.0; | ||
state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirHumRat = 0.009; | ||
state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirEnthalpy = Psychrometrics::PsyHFnTdbW(24.0, 0.009); | ||
// test 1: compressor is On but PLR = 0 | ||
CompOp = 1; | ||
PartLoadFrac = 0.0; | ||
// set coil inlet air flow rate to speed 1 | ||
state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).AirMassFlowRate = | ||
state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).MSRatedAirMassFlowRate(1) * 0.1; | ||
state->dataVariableSpeedCoils->LoadSideMassFlowRate = state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).AirMassFlowRate; | ||
DataLoopNode::Node(state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).AirInletNodeNum).MassFlowRate = | ||
state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).AirMassFlowRate; | ||
VariableSpeedCoils::CalcVarSpeedCoilCooling( | ||
*state, DXCoilNum, CyclingScheme, RuntimeFrac, SensLoad, LatentLoad, CompOp, PartLoadFrac, OnOffAirFlowRatio, SpeedRatio, SpeedCal); | ||
; | ||
// check coil outlet and inlet air conditions match | ||
EXPECT_EQ(state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletAirDBTemp, state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirDBTemp); | ||
EXPECT_EQ(state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletAirHumRat, state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirHumRat); | ||
EXPECT_EQ(state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletAirEnthalpy, state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirEnthalpy); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This shows the coil outlet node air condition matches that of the inlet air condition when the PLR is zero. |
||
; | ||
// test 2: compressor is On and PLR > 0 | ||
CompOp = 1; | ||
PartLoadFrac = 0.1; | ||
// set coil inlet condition | ||
state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirDBTemp = 24.0; | ||
state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirHumRat = 0.009; | ||
state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).InletAirEnthalpy = Psychrometrics::PsyHFnTdbW(24.0, 0.009); | ||
// set coil inlet air flow rate to speed 1 times PLR | ||
state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).AirMassFlowRate = | ||
state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).MSRatedAirMassFlowRate(1) * PartLoadFrac; | ||
state->dataVariableSpeedCoils->LoadSideMassFlowRate = state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).AirMassFlowRate; | ||
DataLoopNode::Node(state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).AirInletNodeNum).MassFlowRate = | ||
state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).AirMassFlowRate; | ||
// run the coil | ||
VariableSpeedCoils::CalcVarSpeedCoilCooling( | ||
*state, DXCoilNum, CyclingScheme, RuntimeFrac, SensLoad, LatentLoad, CompOp, PartLoadFrac, OnOffAirFlowRatio, SpeedRatio, SpeedCal); | ||
// check coil air outlet conditions | ||
EXPECT_NEAR(state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletAirDBTemp, 5.79484, 0.00001); | ||
EXPECT_NEAR(state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletAirHumRat, 0.00810, 0.00001); | ||
EXPECT_NEAR(state->dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).OutletAirEnthalpy, 26170.26, 0.01); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New unit test. |
||
} // namespace EnergyPlus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoids calculating the VS DX cooling coil when the compressor PLR is zero and the fan operating mode is ContFanCycCoil. Otherwise, allowing it sometimes may result in very cold coil outlet air condition that leads to psychometric error message.