From 911815e48b897093d1e5b6a5e987b8ac8c30e326 Mon Sep 17 00:00:00 2001 From: Richard Raustad Date: Mon, 6 Mar 2017 16:18:50 -0500 Subject: [PATCH 1/4] Change RatedCBF calculation to use StdBaroPressure --- src/EnergyPlus/DXCoils.cc | 30 +++++++++++++++++---------- src/EnergyPlus/DXCoils.hh | 2 +- src/EnergyPlus/ReportSizingManager.cc | 6 ++---- tst/EnergyPlus/unit/DXCoils.unit.cc | 20 +++++++++--------- 4 files changed, 32 insertions(+), 26 deletions(-) diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index b81a5ccaed2..753abc1fe7f 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -5498,8 +5498,7 @@ namespace DXCoils { MySizeFlag( DXCoilNum ) = false; } - Real64 const RatedAirMassFlowRateSeaLevel = DXCoil( DXCoilNum ).RatedAirVolFlowRate( 1 ) * PsyRhoAirFnPbTdbW( StdPressureSeaLevel, DXCoil( DXCoilNum ).RatedInletDBTemp, HPInletAirHumRat, RoutineName ); - DXCoil( DXCoilNum ).RatedCBF( 1 ) = CalcCBF( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name, DXCoil( DXCoilNum ).RatedInletDBTemp, HPInletAirHumRat, DXCoil( DXCoilNum ).RatedTotCap( 1 ), RatedAirMassFlowRateSeaLevel, DXCoil( DXCoilNum ).RatedSHR( 1 ), true, StdPressureSeaLevel ); + DXCoil( DXCoilNum ).RatedCBF( 1 ) = CalcCBF( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name, DXCoil( DXCoilNum ).RatedInletDBTemp, HPInletAirHumRat, DXCoil( DXCoilNum ).RatedTotCap( 1 ), DXCoil( DXCoilNum ).RatedAirVolFlowRate( 1 ), DXCoil( DXCoilNum ).RatedSHR( 1 ), true, StdPressureSeaLevel ); MyEnvrnFlag( DXCoilNum ) = false; } @@ -5583,7 +5582,7 @@ namespace DXCoils { DXCoil( DXCoilNum ).RatedAirMassFlowRate( Mode ) = DXCoil( DXCoilNum ).RatedAirVolFlowRate( Mode ) * PsyRhoAirFnPbTdbW( StdBaroPress, RatedInletAirTemp, RatedInletAirHumRat, RoutineName ); // get high speed rated coil bypass factor - DXCoil( DXCoilNum ).RatedCBF( Mode ) = CalcCBF( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name, RatedInletAirTemp, RatedInletAirHumRat, DXCoil( DXCoilNum ).RatedTotCap( Mode ), DXCoil( DXCoilNum ).RatedAirMassFlowRate( Mode ), DXCoil( DXCoilNum ).RatedSHR( Mode ) ); + DXCoil( DXCoilNum ).RatedCBF( Mode ) = CalcCBF( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name, RatedInletAirTemp, RatedInletAirHumRat, DXCoil( DXCoilNum ).RatedTotCap( Mode ), DXCoil( DXCoilNum ).RatedAirVolFlowRate( Mode ), DXCoil( DXCoilNum ).RatedSHR( Mode ) ); } @@ -5614,7 +5613,7 @@ namespace DXCoils { } DXCoil( DXCoilNum ).RatedAirMassFlowRate( Mode ) = DXCoil( DXCoilNum ).RatedAirVolFlowRate( Mode ) * PsyRhoAirFnPbTdbW( StdBaroPress, RatedInletAirTemp, RatedInletAirHumRat, RoutineName ); // get rated coil bypass factor - DXCoil( DXCoilNum ).RatedCBF( Mode ) = CalcCBF( DXCoil( DXCoilNum ).CoilPerformanceType( Mode ), DXCoil( DXCoilNum ).CoilPerformanceName( Mode ), RatedInletAirTemp, RatedInletAirHumRat, DXCoil( DXCoilNum ).RatedTotCap( Mode ), DXCoil( DXCoilNum ).RatedAirMassFlowRate( Mode ), DXCoil( DXCoilNum ).RatedSHR( Mode ) ); + DXCoil( DXCoilNum ).RatedCBF( Mode ) = CalcCBF( DXCoil( DXCoilNum ).CoilPerformanceType( Mode ), DXCoil( DXCoilNum ).CoilPerformanceName( Mode ), RatedInletAirTemp, RatedInletAirHumRat, DXCoil( DXCoilNum ).RatedTotCap( Mode ), DXCoil( DXCoilNum ).RatedAirVolFlowRate( Mode ), DXCoil( DXCoilNum ).RatedSHR( Mode ) ); } // End capacity stages loop } // End dehumidification modes loop @@ -5659,7 +5658,7 @@ namespace DXCoils { DXCoil( DXCoilNum ).RatedAirMassFlowRate2 = DXCoil( DXCoilNum ).RatedAirVolFlowRate2 * PsyRhoAirFnPbTdbW( StdBaroPress, RatedInletAirTemp, RatedInletAirHumRat, RoutineName ); // get low speed rated coil bypass factor - DXCoil( DXCoilNum ).RatedCBF2 = CalcCBF( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name, RatedInletAirTemp, RatedInletAirHumRat, DXCoil( DXCoilNum ).RatedTotCap2, DXCoil( DXCoilNum ).RatedAirMassFlowRate2, DXCoil( DXCoilNum ).RatedSHR2 ); + DXCoil( DXCoilNum ).RatedCBF2 = CalcCBF( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name, RatedInletAirTemp, RatedInletAirHumRat, DXCoil( DXCoilNum ).RatedTotCap2, DXCoil( DXCoilNum ).RatedAirVolFlowRate2, DXCoil( DXCoilNum ).RatedSHR2 ); // call for standard ratings for two-speeed DX coil if ( DXCoil( DXCoilNum ).CondenserType( 1 ) == AirCooled ) { @@ -5690,7 +5689,7 @@ namespace DXCoils { } DXCoil( DXCoilNum ).MSRatedAirMassFlowRate( Mode ) = DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( Mode ) * PsyRhoAirFnPbTdbW( StdBaroPress, RatedInletAirTemp, RatedInletAirHumRat, RoutineName ); // get high speed rated coil bypass factor - DXCoil( DXCoilNum ).MSRatedCBF( Mode ) = CalcCBF( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name, RatedInletAirTemp, RatedInletAirHumRat, DXCoil( DXCoilNum ).MSRatedTotCap( Mode ), DXCoil( DXCoilNum ).MSRatedAirMassFlowRate( Mode ), DXCoil( DXCoilNum ).MSRatedSHR( Mode ) ); + DXCoil( DXCoilNum ).MSRatedCBF( Mode ) = CalcCBF( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name, RatedInletAirTemp, RatedInletAirHumRat, DXCoil( DXCoilNum ).MSRatedTotCap( Mode ), DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( Mode ), DXCoil( DXCoilNum ).MSRatedSHR( Mode ) ); } } @@ -9854,7 +9853,7 @@ Label50: ; Real64 const InletAirTemp, // inlet air temperature [C] Real64 const InletAirHumRat, // inlet air humidity ratio [kg water / kg dry air] Real64 const TotCap, // total cooling capacity [Watts] - Real64 const AirMassFlowRate, // the air mass flow rate at the given capacity [kg/s] + Real64 const AirVolFlowRate, // the air volume flow rate at the given capacity [m3/s] Real64 const SHR, // sensible heat ratio at the given capacity and flow rate bool const PrintFlag, // flag used to print warnings if desired Real64 const BaroPress // Barometric pressure [Pa], defaulted to StdBaroPress in header @@ -9923,8 +9922,11 @@ Label50: ; Real64 Slope( 0.0 ); // Calculated Slope used while hunting for Tadp Real64 Tolerance; // Convergence tolerance for CBF calculations Real64 HTinHumRatOut; // Air enthalpy at inlet air temp and outlet air humidity ratio [J/kg] + Real64 AirMassFlowRate; // the standard air mass flow rate at the given capacity [kg/s] + Real64 adjustedSHR; // SHR calculated using adjusted outlet air properties [] static bool CBFErrors( false ); // Set to true if errors in CBF calculation, fatal at end of routine + AirMassFlowRate = AirVolFlowRate * PsyRhoAirFnPbTdbW( StdPressureSeaLevel, InletAirTemp, InletAirHumRat, RoutineName ); DeltaH = TotCap / AirMassFlowRate; InletAirEnthalpy = PsyHFnTdbW( InletAirTemp, InletAirHumRat ); HTinHumRatOut = InletAirEnthalpy - ( 1.0 - SHR ) * DeltaH; @@ -9951,17 +9953,21 @@ Label50: ; ShowContinueError( "...Air Mass Flow Rate used in calculation = " + RoundSigDigits( AirMassFlowRate, 6 ) + " kg/s" ); ShowContinueError( "...Air Volume Flow Rate used in calculation = " + RoundSigDigits( AirMassFlowRate / PsyRhoAirFnPbTdbW( BaroPress, InletAirTemp, InletAirHumRat, RoutineName ), 6 ) + " m3/s" ); if ( TotCap > 0.0 ) { - if ( ( ( MinRatedVolFlowPerRatedTotCap( DXCT ) - AirMassFlowRate / PsyRhoAirFnPbTdbW( BaroPress, InletAirTemp, InletAirHumRat, RoutineName ) / TotCap ) > SmallDifferenceTest ) || ( ( AirMassFlowRate / PsyRhoAirFnPbTdbW( BaroPress, InletAirTemp, InletAirHumRat, RoutineName ) / TotCap - MaxRatedVolFlowPerRatedTotCap( DXCT ) ) > SmallDifferenceTest ) ) { - ShowContinueError( "...Air Volume Flow Rate per Watt of Rated Cooling Capacity is also out of bounds at = " + RoundSigDigits( AirMassFlowRate / PsyRhoAirFnPbTdbW( BaroPress, InletAirTemp, InletAirHumRat, RoutineName ) / TotCap, 7 ) + " m3/s/W" ); + if ( ( ( MinRatedVolFlowPerRatedTotCap( DXCT ) - AirVolFlowRate / TotCap ) > SmallDifferenceTest ) || ( ( AirVolFlowRate / TotCap - MaxRatedVolFlowPerRatedTotCap( DXCT ) ) > SmallDifferenceTest ) ) { + ShowContinueError( "...Air Volume Flow Rate per Watt of Rated Cooling Capacity is also out of bounds at = " + RoundSigDigits( AirVolFlowRate / TotCap, 7 ) + " m3/s/W" ); } } ShowContinueErrorTimeStamp( "" ); - ShowContinueError( "SHR adjusted to achieve valid outlet air properties and the simulation continues." ); OutletAirTempSat = PsyTsatFnHPb(OutletAirEnthalpy, BaroPress, RoutineName); if (OutletAirTemp < OutletAirTempSat) { // Limit to saturated conditions at OutletAirEnthalpy OutletAirTemp = OutletAirTempSat + 0.005; OutletAirHumRat = PsyWFnTdbH( OutletAirTemp, OutletAirEnthalpy, RoutineName ); DeltaHumRat = InletAirHumRat - OutletAirHumRat; + HTinHumRatOut = PsyHFnTdbW( InletAirTemp, OutletAirHumRat ); + adjustedSHR = ( HTinHumRatOut - OutletAirEnthalpy ) / DeltaH; + ShowContinueError( "CalcCBF: SHR adjusted to achieve valid outlet air properties and the simulation continues." ); + ShowContinueError( "CalcCBF: initial SHR = " + RoundSigDigits( SHR, 5 ) ); + ShowContinueError( "CalcCBF: adjusted SHR = " + RoundSigDigits( adjustedSHR, 5 ) ); } } DeltaT = InletAirTemp - OutletAirTemp; @@ -10094,7 +10100,7 @@ Label50: ; Real64 const RatedInletAirTemp, // coil inlet air temperature [C] Real64 const RatedInletAirHumRat, // coil inlet air humidity ratio [kg/kg] Real64 const TotCap, // coil total capacity [W] - Real64 const AirMassFlow, // coil air mass flow rate [kg/s] + Real64 const AirVolFlowRate, // coil air volume flow rate [m3/s] Real64 const InitialSHR, // coil sensible heat ratio [] std::string const & CallingRoutine // function name calling this routine ) @@ -10144,11 +10150,13 @@ Label50: ; Real64 CalcADPHumRat( 0.0 ); // actual ADP humidity ratio based on bypass factor [kg/kg] Real64 CalcADPTempFnHR( 0.0 ); // actual ADP temperature as a function of humidity ratio based on bypass factor [C] Real64 ADPerror( 0.0 ); // difference between ADP function of temperature and humidity ratio [deltaC] + Real64 AirMassFlow( 0.0 ); // air mass flow rate based on standard barometric pressure [kg/s] bool bStillValidating( true ); // while loop flag bool bNoReporting( false ); // don't report specific warnings in calcCBF while iterating on result bool bReversePerturb( false ); // identifies when SHR is being lowered based on outlet air RH SHR = InitialSHR; + AirMassFlow = AirVolFlowRate * PsyRhoAirFnPbTdbW( StdPressureSeaLevel, RatedInletAirTemp, RatedInletAirHumRat, CallingRoutine ); while ( bStillValidating ) { CBF_calculated = max( 0.0, CalcCBF( UnitType, UnitName, RatedInletAirTemp, RatedInletAirHumRat, TotCap, AirMassFlow, SHR, bNoReporting ) ); DeltaH = TotCap / AirMassFlow; diff --git a/src/EnergyPlus/DXCoils.hh b/src/EnergyPlus/DXCoils.hh index 59a0ff136e6..1b38bd76b15 100644 --- a/src/EnergyPlus/DXCoils.hh +++ b/src/EnergyPlus/DXCoils.hh @@ -898,7 +898,7 @@ namespace DXCoils { Real64 const InletAirTemp, // inlet air temperature [C] Real64 const InletAirHumRat, // inlet air humidity ratio [kg water / kg dry air] Real64 const TotCap, // total cooling capacity [Watts] - Real64 const AirMassFlowRate, // the air mass flow rate at the given capacity [kg/s] + Real64 const AirVolFlowRate, // the air volume flow rate at the given capacity [m3/s] Real64 const SHR, // sensible heat ratio at the given capacity and flow rate bool const PrintFlag = true, // flag used to print warnings if desired Real64 const BaroPress=StdBaroPress // Barometric pressure [Pa] diff --git a/src/EnergyPlus/ReportSizingManager.cc b/src/EnergyPlus/ReportSizingManager.cc index 33dbe02e4a1..c5d8f809f7b 100644 --- a/src/EnergyPlus/ReportSizingManager.cc +++ b/src/EnergyPlus/ReportSizingManager.cc @@ -896,8 +896,7 @@ namespace ReportSizingManager { } // check that the autosized SHR corresponds to a valid apperatus dew point (ADP) temperature - DesMassFlow = DataFlowUsedForSizing * PsyRhoAirFnPbTdbW( StdBaroPress, RatedInletAirTemp, RatedInletAirHumRat, CallingRoutine ); - AutosizeDes = ValidateADP( CompType, CompName, RatedInletAirTemp, RatedInletAirHumRat, DataCapacityUsedForSizing, DesMassFlow, AutosizeDes, CallingRoutine ); + AutosizeDes = ValidateADP( CompType, CompName, RatedInletAirTemp, RatedInletAirHumRat, DataCapacityUsedForSizing, DataFlowUsedForSizing, AutosizeDes, CallingRoutine ); } else { AutosizeDes = 1.0; @@ -1615,8 +1614,7 @@ namespace ReportSizingManager { } // check that the autosized SHR corresponds to a valid apperatus dew point (ADP) temperature - DesMassFlow = DataFlowUsedForSizing * PsyRhoAirFnPbTdbW( StdBaroPress, RatedInletAirTemp, RatedInletAirHumRat, CallingRoutine ); - AutosizeDes = ValidateADP( CompType, CompName, RatedInletAirTemp, RatedInletAirHumRat, DataCapacityUsedForSizing, DesMassFlow, AutosizeDes, CallingRoutine ); + AutosizeDes = ValidateADP( CompType, CompName, RatedInletAirTemp, RatedInletAirHumRat, DataCapacityUsedForSizing, DataFlowUsedForSizing, AutosizeDes, CallingRoutine ); } else { ShowSevereError( CallingRoutine + ' ' + CompType + ' ' + CompName ); diff --git a/tst/EnergyPlus/unit/DXCoils.unit.cc b/tst/EnergyPlus/unit/DXCoils.unit.cc index 4d5efb205f5..fe54c37aa0d 100644 --- a/tst/EnergyPlus/unit/DXCoils.unit.cc +++ b/tst/EnergyPlus/unit/DXCoils.unit.cc @@ -894,21 +894,21 @@ namespace EnergyPlus { AirPressure = StdPressureSeaLevel; InletAirHumRat = Psychrometrics::PsyWFnTdbTwbPb(InletDBTemp, InletWBTemp, AirPressure ); AirMassFlowRate = AirVolFlowRate * Psychrometrics::PsyRhoAirFnPbTdbW( AirPressure, InletDBTemp, InletAirHumRat ); - CBF_calculated = CalcCBF( CoilType, CoilName, InletDBTemp, InletAirHumRat, TotalCap, AirMassFlowRate, SHR, true, AirPressure ); + CBF_calculated = CalcCBF( CoilType, CoilName, InletDBTemp, InletAirHumRat, TotalCap, AirVolFlowRate, SHR, true, AirPressure ); CBF_expected = 0.17268167698750708; EXPECT_DOUBLE_EQ( CBF_calculated, CBF_expected ); // push inlet condition towards saturation curve to test CBF calculation robustness InletWBTemp = 19.7; // 19.72 DB / 19.7 WB InletAirHumRat = Psychrometrics::PsyWFnTdbTwbPb( InletDBTemp, InletWBTemp, AirPressure ); - CBF_calculated = CalcCBF( CoilType, CoilName, InletDBTemp, InletAirHumRat, TotalCap, AirMassFlowRate, SHR, true, AirPressure ); - EXPECT_NEAR( CBF_calculated, 0.00021141, 0.0000001 ); + CBF_calculated = CalcCBF( CoilType, CoilName, InletDBTemp, InletAirHumRat, TotalCap, AirVolFlowRate, SHR, true, AirPressure ); + EXPECT_NEAR( CBF_calculated, 0.00020826, 0.0000001 ); InletDBTemp = 13.1; // colder and much less likely inlet air temperature InletWBTemp = 13.08; // 13.1 DB / 13.08 WB - hard to find ADP (needed mod to CalcCBF function) InletAirHumRat = Psychrometrics::PsyWFnTdbTwbPb( InletDBTemp, InletWBTemp, AirPressure ); - CBF_calculated = CalcCBF( CoilType, CoilName, InletDBTemp, InletAirHumRat, TotalCap, AirMassFlowRate, SHR, true, AirPressure ); - EXPECT_NEAR( CBF_calculated, 0.0001531, 0.0000001 ); + CBF_calculated = CalcCBF( CoilType, CoilName, InletDBTemp, InletAirHumRat, TotalCap, AirVolFlowRate, SHR, true, AirPressure ); + EXPECT_NEAR( CBF_calculated, 0.0001572, 0.0000001 ); } TEST_F( EnergyPlusFixture, DXCoilEvapCondPumpSizingTest ) { @@ -1420,16 +1420,16 @@ namespace EnergyPlus { std::string const CallingRoutine( "DXCoil_ValidateADPFunction" ); Real64 DesMassFlow = DXCoil( 1 ).RatedAirVolFlowRate( 1 ) * PsyRhoAirFnPbTdbW( StdBaroPress, RatedInletAirTemp, RatedInletAirHumRat, CallingRoutine ); - Real64 CBF_calculated = CalcCBF( DXCoil( 1 ).DXCoilType, DXCoil( 1 ).Name, RatedInletAirTemp, RatedInletAirHumRat, DXCoil( 1 ).RatedTotCap( 1 ), DesMassFlow, DXCoil( 1 ).RatedSHR( 1 ), true ); + Real64 CBF_calculated = CalcCBF( DXCoil( 1 ).DXCoilType, DXCoil( 1 ).Name, RatedInletAirTemp, RatedInletAirHumRat, DXCoil( 1 ).RatedTotCap( 1 ), DXCoil( 1 ).RatedAirVolFlowRate( 1 ), DXCoil( 1 ).RatedSHR( 1 ), true ); - EXPECT_NEAR( 0.747472, DXCoil( 1 ).RatedSHR( 1 ), 0.0000001 ); - EXPECT_NEAR( 0.1012203, CBF_calculated, 0.0000001 ); + EXPECT_NEAR( 0.788472, DXCoil( 1 ).RatedSHR( 1 ), 0.0000001 ); + EXPECT_NEAR( 0.0003944, CBF_calculated, 0.0000001 ); DXCoil( 1 ).RatedTotCap( 1 ) = 35000.0; // simulate outlet condition right at the saturation curve DXCoil( 1 ).RatedSHR( 1 ) = AutoSize; SizeDXCoil( 1 ); - CBF_calculated = CalcCBF( DXCoil( 1 ).DXCoilType, DXCoil( 1 ).Name, RatedInletAirTemp, RatedInletAirHumRat, DXCoil( 1 ).RatedTotCap( 1 ), DesMassFlow, DXCoil( 1 ).RatedSHR( 1 ), true ); + CBF_calculated = CalcCBF( DXCoil( 1 ).DXCoilType, DXCoil( 1 ).Name, RatedInletAirTemp, RatedInletAirHumRat, DXCoil( 1 ).RatedTotCap( 1 ), DXCoil( 1 ).RatedAirVolFlowRate( 1 ), DXCoil( 1 ).RatedSHR( 1 ), true ); EXPECT_NEAR( 0.67608322, DXCoil( 1 ).RatedSHR( 1 ), 0.0000001 ); EXPECT_NEAR( 0.0003243, CBF_calculated, 0.0000001 ); @@ -1438,7 +1438,7 @@ namespace EnergyPlus { DXCoil( 1 ).RatedSHR( 1 ) = AutoSize; SizeDXCoil( 1 ); - CBF_calculated = CalcCBF( DXCoil( 1 ).DXCoilType, DXCoil( 1 ).Name, RatedInletAirTemp, RatedInletAirHumRat, DXCoil( 1 ).RatedTotCap( 1 ), DesMassFlow, DXCoil( 1 ).RatedSHR( 1 ), true ); + CBF_calculated = CalcCBF( DXCoil( 1 ).DXCoilType, DXCoil( 1 ).Name, RatedInletAirTemp, RatedInletAirHumRat, DXCoil( 1 ).RatedTotCap( 1 ), DXCoil( 1 ).RatedAirVolFlowRate( 1 ), DXCoil( 1 ).RatedSHR( 1 ), true ); EXPECT_NEAR( 0.64408322, DXCoil( 1 ).RatedSHR( 1 ), 0.0000001 ); EXPECT_NEAR( 0.0028271, CBF_calculated, 0.0000001 ); From 933b9ba24e33d6c4e3b5f7d5adc0bebb07714826 Mon Sep 17 00:00:00 2001 From: Richard Raustad Date: Tue, 7 Mar 2017 13:23:58 -0500 Subject: [PATCH 2/4] Fix warning, other updates --- src/EnergyPlus/DXCoils.cc | 33 +++++++++---------- src/EnergyPlus/DXCoils.hh | 3 +- ...oneDataCenterCRAC_wPumpedDXCoolingCoil.idf | 2 +- tst/EnergyPlus/unit/DXCoils.unit.cc | 9 ++--- 4 files changed, 21 insertions(+), 26 deletions(-) diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index 753abc1fe7f..e44c5c58476 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -5498,7 +5498,7 @@ namespace DXCoils { MySizeFlag( DXCoilNum ) = false; } - DXCoil( DXCoilNum ).RatedCBF( 1 ) = CalcCBF( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name, DXCoil( DXCoilNum ).RatedInletDBTemp, HPInletAirHumRat, DXCoil( DXCoilNum ).RatedTotCap( 1 ), DXCoil( DXCoilNum ).RatedAirVolFlowRate( 1 ), DXCoil( DXCoilNum ).RatedSHR( 1 ), true, StdPressureSeaLevel ); + DXCoil( DXCoilNum ).RatedCBF( 1 ) = CalcCBF( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name, DXCoil( DXCoilNum ).RatedInletDBTemp, HPInletAirHumRat, DXCoil( DXCoilNum ).RatedTotCap( 1 ), DXCoil( DXCoilNum ).RatedAirVolFlowRate( 1 ), DXCoil( DXCoilNum ).RatedSHR( 1 ), true ); MyEnvrnFlag( DXCoilNum ) = false; } @@ -9855,8 +9855,7 @@ Label50: ; Real64 const TotCap, // total cooling capacity [Watts] Real64 const AirVolFlowRate, // the air volume flow rate at the given capacity [m3/s] Real64 const SHR, // sensible heat ratio at the given capacity and flow rate - bool const PrintFlag, // flag used to print warnings if desired - Real64 const BaroPress // Barometric pressure [Pa], defaulted to StdBaroPress in header + bool const PrintFlag // flag used to print warnings if desired ) { @@ -9869,7 +9868,7 @@ Label50: ; // PURPOSE OF THIS FUNCTION: // Calculate the coil bypass factor for a coil given the total capacity at the entering conditions, // air mass flow rate at the entering conditions, and the sensible heat ratio (SHR) at the - // entering conditions. + // entering conditions. Standard barometric pressure is used for this model parameter. // METHODOLOGY EMPLOYED: // calculate SlopeRated (deltahumrat/deltaT) using rated unit information provided by @@ -9936,7 +9935,7 @@ Label50: ; OutletAirTemp = PsyTdbFnHW( OutletAirEnthalpy, OutletAirHumRat ); // Eventually inlet air conditions will be used in DX Coil, these lines are commented out and marked with this comment line // Pressure will have to be pass into this subroutine to fix this one - OutletAirRH = PsyRhFnTdbWPb( OutletAirTemp, OutletAirHumRat, BaroPress, RoutineName ); + OutletAirRH = PsyRhFnTdbWPb( OutletAirTemp, OutletAirHumRat, StdPressureSeaLevel, RoutineName ); if ( OutletAirRH >= 1.0 && PrintFlag ) { ShowSevereError( "For object = " + UnitType + ", name = \"" + UnitName + "\"" ); ShowContinueError( "Calculated outlet air relative humidity greater than 1. The combination of" ); @@ -9951,14 +9950,14 @@ Label50: ; ShowContinueError( "...Outlet Air Humidity Ratio = " + RoundSigDigits( OutletAirHumRat, 6 ) + " kgWater/kgDryAir" ); ShowContinueError( "...Total Cooling Capacity used in calculation = " + RoundSigDigits( TotCap, 2 ) + " W" ); ShowContinueError( "...Air Mass Flow Rate used in calculation = " + RoundSigDigits( AirMassFlowRate, 6 ) + " kg/s" ); - ShowContinueError( "...Air Volume Flow Rate used in calculation = " + RoundSigDigits( AirMassFlowRate / PsyRhoAirFnPbTdbW( BaroPress, InletAirTemp, InletAirHumRat, RoutineName ), 6 ) + " m3/s" ); + ShowContinueError( "...Air Volume Flow Rate used in calculation = " + RoundSigDigits( AirVolFlowRate, 6 ) + " m3/s" ); if ( TotCap > 0.0 ) { if ( ( ( MinRatedVolFlowPerRatedTotCap( DXCT ) - AirVolFlowRate / TotCap ) > SmallDifferenceTest ) || ( ( AirVolFlowRate / TotCap - MaxRatedVolFlowPerRatedTotCap( DXCT ) ) > SmallDifferenceTest ) ) { ShowContinueError( "...Air Volume Flow Rate per Watt of Rated Cooling Capacity is also out of bounds at = " + RoundSigDigits( AirVolFlowRate / TotCap, 7 ) + " m3/s/W" ); } } ShowContinueErrorTimeStamp( "" ); - OutletAirTempSat = PsyTsatFnHPb(OutletAirEnthalpy, BaroPress, RoutineName); + OutletAirTempSat = PsyTsatFnHPb(OutletAirEnthalpy, StdPressureSeaLevel, RoutineName); if (OutletAirTemp < OutletAirTempSat) { // Limit to saturated conditions at OutletAirEnthalpy OutletAirTemp = OutletAirTempSat + 0.005; OutletAirHumRat = PsyWFnTdbH( OutletAirTemp, OutletAirEnthalpy, RoutineName ); @@ -9985,10 +9984,10 @@ Label50: ; ShowContinueError( "...Outlet Air Humidity Ratio = " + RoundSigDigits( OutletAirHumRat, 6 ) + " kgWater/kgDryAir" ); ShowContinueError( "...Total Cooling Capacity used in calculation = " + RoundSigDigits( TotCap, 2 ) + " W" ); ShowContinueError( "...Air Mass Flow Rate used in calculation = " + RoundSigDigits( AirMassFlowRate, 6 ) + " kg/s" ); - ShowContinueError( "...Air Volume Flow Rate used in calculation = " + RoundSigDigits( AirMassFlowRate / PsyRhoAirFnPbTdbW( BaroPress, InletAirTemp, InletAirHumRat, RoutineName ), 6 ) + " m3/s" ); + ShowContinueError( "...Air Volume Flow Rate used in calculation = " + RoundSigDigits( AirVolFlowRate, 6 ) + " m3/s" ); if ( TotCap > 0.0 ) { - if ( ( ( MinRatedVolFlowPerRatedTotCap( DXCT ) - AirMassFlowRate / PsyRhoAirFnPbTdbW( BaroPress, InletAirTemp, InletAirHumRat, RoutineName ) / TotCap ) > SmallDifferenceTest ) || ( ( AirMassFlowRate / PsyRhoAirFnPbTdbW( BaroPress, InletAirTemp, InletAirHumRat, RoutineName ) / TotCap - MaxRatedVolFlowPerRatedTotCap( DXCT ) ) > SmallDifferenceTest ) ) { - ShowContinueError( "...Air Volume Flow Rate per Watt of Rated Cooling Capacity is also out of bounds at = " + RoundSigDigits( AirMassFlowRate / PsyRhoAirFnPbTdbW( BaroPress, InletAirTemp, InletAirHumRat, RoutineName ) / TotCap, 7 ) + " m3/s/W" ); + if ( ( ( MinRatedVolFlowPerRatedTotCap( DXCT ) - AirVolFlowRate / TotCap ) > SmallDifferenceTest ) || ( ( AirVolFlowRate / TotCap - MaxRatedVolFlowPerRatedTotCap( DXCT ) ) > SmallDifferenceTest ) ) { + ShowContinueError( "...Air Volume Flow Rate per Watt of Rated Cooling Capacity is also out of bounds at = " + RoundSigDigits( AirVolFlowRate / TotCap, 7 ) + " m3/s/W" ); } } ShowContinueErrorTimeStamp( "" ); @@ -10010,10 +10009,10 @@ Label50: ; ShowContinueError( "...Outlet Air Humidity Ratio = " + RoundSigDigits( OutletAirHumRat, 6 ) + " kgWater/kgDryAir" ); ShowContinueError( "...Total Cooling Capacity used in calculation = " + RoundSigDigits( TotCap, 2 ) + " W" ); ShowContinueError( "...Air Mass Flow Rate used in calculation = " + RoundSigDigits( AirMassFlowRate, 6 ) + " kg/s" ); - ShowContinueError( "...Air Volume Flow Rate used in calculation = " + RoundSigDigits( AirMassFlowRate / PsyRhoAirFnPbTdbW( BaroPress, InletAirTemp, InletAirHumRat, RoutineName ), 6 ) + " m3/s" ); + ShowContinueError( "...Air Volume Flow Rate used in calculation = " + RoundSigDigits( AirVolFlowRate, 6 ) + " m3/s" ); if ( TotCap > 0.0 ) { - if ( ( ( MinRatedVolFlowPerRatedTotCap( DXCT ) - AirMassFlowRate / PsyRhoAirFnPbTdbW( BaroPress, InletAirTemp, InletAirHumRat, RoutineName ) / TotCap ) > SmallDifferenceTest ) || ( ( AirMassFlowRate / PsyRhoAirFnPbTdbW( BaroPress, InletAirTemp, InletAirHumRat, RoutineName ) / TotCap - MaxRatedVolFlowPerRatedTotCap( DXCT ) ) > SmallDifferenceTest ) ) { - ShowContinueError( "...Air Volume Flow Rate per Watt of Rated Cooling Capacity is also out of bounds at = " + RoundSigDigits( AirMassFlowRate / PsyRhoAirFnPbTdbW( BaroPress, InletAirTemp, InletAirHumRat, RoutineName ) / TotCap, 7 ) + " m3/s/W" ); + if ( ( ( MinRatedVolFlowPerRatedTotCap( DXCT ) - AirVolFlowRate / TotCap ) > SmallDifferenceTest ) || ( ( AirVolFlowRate / TotCap - MaxRatedVolFlowPerRatedTotCap( DXCT ) ) > SmallDifferenceTest ) ) { + ShowContinueError( "...Air Volume Flow Rate per Watt of Rated Cooling Capacity is also out of bounds at = " + RoundSigDigits( AirVolFlowRate / TotCap, 7 ) + " m3/s/W" ); } } ShowContinueErrorTimeStamp( "" ); @@ -10024,7 +10023,7 @@ Label50: ; // First guess for Tadp is outlet air dew point // Eventually inlet air conditions will be used in DX Coil, these lines are commented out and marked with this comment line // Pressure will have to be pass into this subroutine to fix this one - ADPTemp = PsyTdpFnWPb( OutletAirHumRat, BaroPress ); + ADPTemp = PsyTdpFnWPb( OutletAirHumRat, StdPressureSeaLevel ); Tolerance = 1.0; // initial conditions for iteration ErrorLast = 100.0; @@ -10039,7 +10038,7 @@ Label50: ; // Eventually inlet air conditions will be used in DX Coil, these lines are commented out and marked with this comment line // Pressure will have to be pass into this subroutine to fix this one - ADPHumRat = min( OutletAirHumRat, PsyWFnTdpPb( ADPTemp, BaroPress ) ); + ADPHumRat = min( OutletAirHumRat, PsyWFnTdpPb( ADPTemp, StdPressureSeaLevel ) ); Slope = ( InletAirHumRat - ADPHumRat ) / max( 0.001, ( InletAirTemp - ADPTemp ) ); // check for convergence (slopes are equal to within error tolerance) @@ -10166,11 +10165,11 @@ Label50: ; DeltaHumRat = RatedInletAirHumRat - OutletAirHumRat; OutletAirEnthalpy = InletAirEnthalpy - DeltaH; OutletAirTemp = PsyTdbFnHW( OutletAirEnthalpy, OutletAirHumRat ); - OutletAirRH = PsyRhFnTdbWPb( OutletAirTemp, OutletAirHumRat, StdBaroPress, CallingRoutine ); + OutletAirRH = PsyRhFnTdbWPb( OutletAirTemp, OutletAirHumRat, StdPressureSeaLevel, CallingRoutine ); if ( CBF_calculated < 1 ) { CalcADPTemp = RatedInletAirTemp - ( ( RatedInletAirTemp - OutletAirTemp ) / ( 1 - CBF_calculated ) ); CalcADPHumRat = RatedInletAirHumRat - ( ( DeltaHumRat ) / ( 1 - CBF_calculated ) ); - CalcADPTempFnHR = PsyTdpFnWPb( CalcADPHumRat, StdBaroPress, CallingRoutine ); + CalcADPTempFnHR = PsyTdpFnWPb( CalcADPHumRat, StdPressureSeaLevel, CallingRoutine ); ADPerror = CalcADPTemp - CalcADPTempFnHR; } else { ADPerror = 0; // might be able to check for RH >= 1 and reduce SHR, need defect file for that since can't create one diff --git a/src/EnergyPlus/DXCoils.hh b/src/EnergyPlus/DXCoils.hh index 1b38bd76b15..e8801874cb8 100644 --- a/src/EnergyPlus/DXCoils.hh +++ b/src/EnergyPlus/DXCoils.hh @@ -900,8 +900,7 @@ namespace DXCoils { Real64 const TotCap, // total cooling capacity [Watts] Real64 const AirVolFlowRate, // the air volume flow rate at the given capacity [m3/s] Real64 const SHR, // sensible heat ratio at the given capacity and flow rate - bool const PrintFlag = true, // flag used to print warnings if desired - Real64 const BaroPress=StdBaroPress // Barometric pressure [Pa] + bool const PrintFlag = true // flag used to print warnings if desired ); Real64 diff --git a/testfiles/1ZoneDataCenterCRAC_wPumpedDXCoolingCoil.idf b/testfiles/1ZoneDataCenterCRAC_wPumpedDXCoolingCoil.idf index 0d638a9161f..6a2116f83bf 100644 --- a/testfiles/1ZoneDataCenterCRAC_wPumpedDXCoolingCoil.idf +++ b/testfiles/1ZoneDataCenterCRAC_wPumpedDXCoolingCoil.idf @@ -374,7 +374,7 @@ Main Cooling Coil 1, !- Name System Availability Schedule, !- Availability Schedule Name 148300, !- Gross Rated Total Cooling Capacity {W} - 0.85, !- Gross Rated Sensible Heat Ratio + 0.83, !- Gross Rated Sensible Heat Ratio 4.5669, !- Gross Rated Cooling COP {W/W} 8.5, !- Rated Air Flow Rate {m3/s} , !- Rated Evaporator Fan Power Per Volume Flow Rate {W/(m3/s)} diff --git a/tst/EnergyPlus/unit/DXCoils.unit.cc b/tst/EnergyPlus/unit/DXCoils.unit.cc index fe54c37aa0d..942c6e4d912 100644 --- a/tst/EnergyPlus/unit/DXCoils.unit.cc +++ b/tst/EnergyPlus/unit/DXCoils.unit.cc @@ -885,7 +885,6 @@ namespace EnergyPlus { Real64 InletAirHumRat; const Real64 TotalCap( 1303.5987246916557 ); const Real64 AirVolFlowRate( 0.085422486640000003 ); - Real64 AirMassFlowRate; const Real64 SHR( 0.88 ); Real64 AirPressure; Real64 CBF_expected; @@ -893,21 +892,20 @@ namespace EnergyPlus { AirPressure = StdPressureSeaLevel; InletAirHumRat = Psychrometrics::PsyWFnTdbTwbPb(InletDBTemp, InletWBTemp, AirPressure ); - AirMassFlowRate = AirVolFlowRate * Psychrometrics::PsyRhoAirFnPbTdbW( AirPressure, InletDBTemp, InletAirHumRat ); - CBF_calculated = CalcCBF( CoilType, CoilName, InletDBTemp, InletAirHumRat, TotalCap, AirVolFlowRate, SHR, true, AirPressure ); + CBF_calculated = CalcCBF( CoilType, CoilName, InletDBTemp, InletAirHumRat, TotalCap, AirVolFlowRate, SHR, true ); CBF_expected = 0.17268167698750708; EXPECT_DOUBLE_EQ( CBF_calculated, CBF_expected ); // push inlet condition towards saturation curve to test CBF calculation robustness InletWBTemp = 19.7; // 19.72 DB / 19.7 WB InletAirHumRat = Psychrometrics::PsyWFnTdbTwbPb( InletDBTemp, InletWBTemp, AirPressure ); - CBF_calculated = CalcCBF( CoilType, CoilName, InletDBTemp, InletAirHumRat, TotalCap, AirVolFlowRate, SHR, true, AirPressure ); + CBF_calculated = CalcCBF( CoilType, CoilName, InletDBTemp, InletAirHumRat, TotalCap, AirVolFlowRate, SHR, true ); EXPECT_NEAR( CBF_calculated, 0.00020826, 0.0000001 ); InletDBTemp = 13.1; // colder and much less likely inlet air temperature InletWBTemp = 13.08; // 13.1 DB / 13.08 WB - hard to find ADP (needed mod to CalcCBF function) InletAirHumRat = Psychrometrics::PsyWFnTdbTwbPb( InletDBTemp, InletWBTemp, AirPressure ); - CBF_calculated = CalcCBF( CoilType, CoilName, InletDBTemp, InletAirHumRat, TotalCap, AirVolFlowRate, SHR, true, AirPressure ); + CBF_calculated = CalcCBF( CoilType, CoilName, InletDBTemp, InletAirHumRat, TotalCap, AirVolFlowRate, SHR, true ); EXPECT_NEAR( CBF_calculated, 0.0001572, 0.0000001 ); } @@ -1419,7 +1417,6 @@ namespace EnergyPlus { Real64 const RatedInletAirHumRat( 0.01125 ); // Humidity ratio corresponding to 80F dry bulb/67F wet bulb std::string const CallingRoutine( "DXCoil_ValidateADPFunction" ); - Real64 DesMassFlow = DXCoil( 1 ).RatedAirVolFlowRate( 1 ) * PsyRhoAirFnPbTdbW( StdBaroPress, RatedInletAirTemp, RatedInletAirHumRat, CallingRoutine ); Real64 CBF_calculated = CalcCBF( DXCoil( 1 ).DXCoilType, DXCoil( 1 ).Name, RatedInletAirTemp, RatedInletAirHumRat, DXCoil( 1 ).RatedTotCap( 1 ), DXCoil( 1 ).RatedAirVolFlowRate( 1 ), DXCoil( 1 ).RatedSHR( 1 ), true ); EXPECT_NEAR( 0.788472, DXCoil( 1 ).RatedSHR( 1 ), 0.0000001 ); From ca823ad6268115fcc213ff33d8b5d5d4a3c3be2f Mon Sep 17 00:00:00 2001 From: Richard Raustad Date: Mon, 20 Mar 2017 15:36:59 -0400 Subject: [PATCH 3/4] Attempt to correct 2-sp DX coil rating calculations --- src/EnergyPlus/DXCoils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index b445d645a8b..6b90d3a0fc2 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -12111,7 +12111,7 @@ Label50: ; Real64 PartLoadAirMassFlowRate; Real64 AirMassFlowRatio; static Real64 AccuracyTolerance( 0.2 ); // tolerance in AHRI 340/360 Table 6 note 1 - static int MaximumIterations( 500 ); + static int MaximumIterations( 1000 ); int SolverFlag; Array1D< Real64 > Par( 12 ); // Parameter array passed to solver Real64 EIR_HighSpeed; From 19823298e0c61feaeeca2f32777e3a730778da87 Mon Sep 17 00:00:00 2001 From: Richard Raustad Date: Mon, 12 Jun 2017 14:09:09 -0400 Subject: [PATCH 4/4] Update example files to eliminate warning. --- testfiles/DOAToVRF.idf | 2 +- testfiles/RefBldgSmallOfficeNew2004_Chicago.idf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/testfiles/DOAToVRF.idf b/testfiles/DOAToVRF.idf index 3d90a67cd96..789e8f44c8b 100644 --- a/testfiles/DOAToVRF.idf +++ b/testfiles/DOAToVRF.idf @@ -2482,7 +2482,7 @@ Sizing:Zone, SPACE1-1, !- Zone or ZoneList Name SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method - 12.5, !- Zone Cooling Design Supply Air Temperature {C} + 12.0, !- Zone Cooling Design Supply Air Temperature {C} , !- Zone Cooling Design Supply Air Temperature Difference {deltaC} SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method 50., !- Zone Heating Design Supply Air Temperature {C} diff --git a/testfiles/RefBldgSmallOfficeNew2004_Chicago.idf b/testfiles/RefBldgSmallOfficeNew2004_Chicago.idf index 56b32eabc33..5b5d848e8dd 100644 --- a/testfiles/RefBldgSmallOfficeNew2004_Chicago.idf +++ b/testfiles/RefBldgSmallOfficeNew2004_Chicago.idf @@ -2470,7 +2470,7 @@ Fan:SystemModel, Sizing:Zone, Perimeter_ZN_1, !- Zone or ZoneList Name SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method - 14.0000, !- Zone Cooling Design Supply Air Temperature {C} + 13.9000, !- Zone Cooling Design Supply Air Temperature {C} , !- Zone Cooling Design Supply Air Temperature Difference {deltaC} SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method 40.0000, !- Zone Heating Design Supply Air Temperature {C} @@ -2532,7 +2532,7 @@ Fan:SystemModel, Sizing:Zone, Perimeter_ZN_3, !- Zone or ZoneList Name SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method - 14.0000, !- Zone Cooling Design Supply Air Temperature {C} + 13.9000, !- Zone Cooling Design Supply Air Temperature {C} , !- Zone Cooling Design Supply Air Temperature Difference {deltaC} SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method 40.0000, !- Zone Heating Design Supply Air Temperature {C}