From 24f40640857e9d2603d2c1321f5c45627b2a4ac7 Mon Sep 17 00:00:00 2001 From: Lixing Gu Date: Fri, 15 May 2020 15:17:17 -0400 Subject: [PATCH 1/2] Upload a fix --- src/EnergyPlus/DXCoils.cc | 279 +-- tst/EnergyPlus/unit/DXCoils.unit.cc | 65 +- .../unit/HVACUnitaryBypassVAV.unit.cc | 2 +- .../unit/HVACVariableRefrigerantFlow.unit.cc | 1538 +++++++++-------- 4 files changed, 971 insertions(+), 913 deletions(-) diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index 8940f0de4e4..78dbd9b32ed 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -57,6 +57,7 @@ #include #include #include +#include #include #include #include @@ -75,7 +76,6 @@ #include #include #include -#include #include #include #include @@ -154,14 +154,14 @@ namespace DXCoils { int const On(1); // normal compressor operation int const Off(0); // signal DXCoil that compressor shouldn't run - Real64 const RatedInletAirTemp(26.6667); // 26.6667C or 80F - Real64 const RatedInletWetBulbTemp(19.44); // 19.44 or 67F - Real64 const RatedInletAirHumRat(0.01125); // Humidity ratio corresponding to 80F dry bulb/67F wet bulb - Real64 const RatedOutdoorAirTemp(35.0); // 35 C or 95F - Real64 const RatedInletAirTempHeat(21.11); // 21.11C or 70F - Real64 const RatedOutdoorAirTempHeat(8.33); // 8.33 C or 47F - Real64 const RatedOutdoorWetBulbTempHeat(6.11); // 6.11 C or 43F - Real64 const RatedInletWetBulbTempHeat(15.55); // 15.55 or 60F + Real64 const RatedInletAirTemp(26.6667); // 26.6667C or 80F + Real64 const RatedInletWetBulbTemp(19.4444); // 19.44 or 67F + Real64 const RatedInletAirHumRat(0.0111847); // Humidity ratio corresponding to 80F dry bulb/67F wet bulb + Real64 const RatedOutdoorAirTemp(35.0); // 35 C or 95F + Real64 const RatedInletAirTempHeat(21.11); // 21.11C or 70F + Real64 const RatedOutdoorAirTempHeat(8.33); // 8.33 C or 47F + Real64 const RatedOutdoorWetBulbTempHeat(6.11); // 6.11 C or 43F + Real64 const RatedInletWetBulbTempHeat(15.55); // 15.55 or 60F Real64 const DryCoilOutletHumRatioMin(0.00001); // dry coil outlet minimum hum ratio kgWater/kgDryAir @@ -268,7 +268,8 @@ namespace DXCoils { } // namespace // Functions - void SimDXCoil(EnergyPlusData &state, std::string const &CompName, // name of the fan coil unit + void SimDXCoil(EnergyPlusData &state, + std::string const &CompName, // name of the fan coil unit int const CompOp, // compressor operation; 1=on, 0=off bool const FirstHVACIteration, // True when first HVAC iteration int &CompIndex, @@ -395,7 +396,8 @@ namespace DXCoils { ReportDXCoil(DXCoilNum); } - void SimDXCoilMultiSpeed(EnergyPlusData &state, std::string const &CompName, // name of the fan coil unit + void SimDXCoilMultiSpeed(EnergyPlusData &state, + std::string const &CompName, // name of the fan coil unit Real64 const SpeedRatio, // = (CompressorSpeed - CompressorSpeedMin) / Real64 const CycRatio, // cycling part load ratio for variable speed int &CompIndex, @@ -510,7 +512,8 @@ namespace DXCoils { ReportDXCoil(DXCoilNum); } - void SimDXCoilMultiMode(EnergyPlusData &state, std::string const &CompName, // name of the fan coil unit + void SimDXCoilMultiMode(EnergyPlusData &state, + std::string const &CompName, // name of the fan coil unit int const EP_UNUSED(CompOp), // compressor operation; 1=on, 0=off !unused1208 bool const FirstHVACIteration, // true if first hvac iteration Real64 const PartLoadRatio, // part load ratio @@ -6579,7 +6582,8 @@ namespace DXCoils { // store fan info for coil if (DXCoil(DXCoilNum).SupplyFan_TypeNum == DataHVACGlobals::FanType_SystemModelObject) { if (DXCoil(DXCoilNum).SupplyFanIndex > -1) { - coilSelectionReportObj->setCoilSupplyFanInfo(state, DXCoil(DXCoilNum).Name, + coilSelectionReportObj->setCoilSupplyFanInfo(state, + DXCoil(DXCoilNum).Name, DXCoil(DXCoilNum).DXCoilType, DXCoil(DXCoilNum).SupplyFanName, DataAirSystems::objectVectorOOFanSystemModel, @@ -6588,7 +6592,8 @@ namespace DXCoils { } else { if (DXCoil(DXCoilNum).SupplyFanIndex > 0) { - coilSelectionReportObj->setCoilSupplyFanInfo(state, DXCoil(DXCoilNum).Name, + coilSelectionReportObj->setCoilSupplyFanInfo(state, + DXCoil(DXCoilNum).Name, DXCoil(DXCoilNum).DXCoilType, DXCoil(DXCoilNum).SupplyFanName, DataAirSystems::structArrayLegacyFanModels, @@ -6678,11 +6683,11 @@ namespace DXCoils { static std::string const RoutineName("SizeDXCoil"); // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - Real64 CoilInTemp; // DX coil inlet temperature - int CapacityStageNum; // Loop index for 1,Number of capacity stages - int DehumidModeNum; // Loop index for 1,Number of enhanced dehumidification modes - int Mode; // Operating mode for MultiMode DX coil; Always 1 for other coil types - int NumOfSpeedCompanion; // Number of speed for a companion cooling coil (Multispeed HO heating coil only + Real64 CoilInTemp; // DX coil inlet temperature + int CapacityStageNum; // Loop index for 1,Number of capacity stages + int DehumidModeNum; // Loop index for 1,Number of enhanced dehumidification modes + int Mode; // Operating mode for MultiMode DX coil; Always 1 for other coil types + int NumOfSpeedCompanion; // Number of speed for a companion cooling coil (Multispeed HO heating coil only std::string equipName; Real64 RatedAirVolFlowRateDes; // Design rated air volume flow for reporting Real64 RatedAirVolFlowRateUser; // Hard-sized rated air volume flow for reporting @@ -6785,7 +6790,7 @@ namespace DXCoils { DefrostCapacityUser = 0.0; MSRatedAirVolFlowRateDes = 0.0; MSRatedAirVolFlowRateUser = 0.0; - //MSRatedTotCapDes = 0.0; + // MSRatedTotCapDes = 0.0; MSRatedTotCapUser = 0.0; MSRatedSHRDes = 0.0; MSRatedSHRUser = 0.0; @@ -7330,28 +7335,29 @@ namespace DXCoils { DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode) = TempSize; DataEMSOverrideON = false; DataEMSOverride = 0.0; - if ( !IsAutoSize && !HardSizeNoDesRun) { + if (!IsAutoSize && !HardSizeNoDesRun) { TempSize = AutoSize; bPRINT = false; RequestSizing(state, CompType, CompName, SizingMethod, SizingString, TempSize, bPRINT, RoutineName); MSRatedAirVolFlowRateDes = TempSize; bPRINT = true; } - if ( IsAutoSize) { - MSRatedAirVolFlowRateDes = TempSize;; + if (IsAutoSize) { + MSRatedAirVolFlowRateDes = TempSize; + ; } } else { FieldNum = 10 + (Mode - 1) * 13; SizingString = DXCoilNumericFields(DXCoilNum).PerfMode(1).FieldNames(FieldNum) + " [m3/s]"; SizingMethod = CoolingAirflowSizing; - if ( IsAutoSize || !HardSizeNoDesRun) { + if (IsAutoSize || !HardSizeNoDesRun) { SizingMethod = AutoCalculateSizing; // Auto size low speed flow to fraction of the highest speed flow - DataConstantUsedForSizing = DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( DXCoil( DXCoilNum ).NumOfSpeeds ); - if ( !IsAutoSize && !HardSizeNoDesRun ) DataConstantUsedForSizing = MSRatedAirVolFlowRateDes; - DataFractionUsedForSizing = (float)Mode / DXCoil( DXCoilNum ).NumOfSpeeds; + DataConstantUsedForSizing = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(DXCoil(DXCoilNum).NumOfSpeeds); + if (!IsAutoSize && !HardSizeNoDesRun) DataConstantUsedForSizing = MSRatedAirVolFlowRateDes; + DataFractionUsedForSizing = (float)Mode / DXCoil(DXCoilNum).NumOfSpeeds; } - TempSize = DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( Mode ); + TempSize = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode); DataEMSOverrideON = DXCoil(DXCoilNum).RatedAirVolFlowRateEMSOverrideON(Mode); DataEMSOverride = DXCoil(DXCoilNum).RatedAirVolFlowRateEMSOverrideValue(Mode); RequestSizing(state, CompType, CompName, SizingMethod, SizingString, TempSize, bPRINT, RoutineName); @@ -7382,37 +7388,37 @@ namespace DXCoils { if (DXCoil(DXCoilNum).MSRatedTotCap(Mode) == AutoSize) { IsAutoSize = true; } - CompName = DXCoil( DXCoilNum ).Name; - CompType = DXCoil( DXCoilNum ).DXCoilType; + CompName = DXCoil(DXCoilNum).Name; + CompType = DXCoil(DXCoilNum).DXCoilType; DataSizing::DataIsDXCoil = true; - DataSizing::DataTotCapCurveIndex = DXCoil( DXCoilNum ).MSCCapFTemp( Mode ); + DataSizing::DataTotCapCurveIndex = DXCoil(DXCoilNum).MSCCapFTemp(Mode); if (Mode == DXCoil(DXCoilNum).NumOfSpeeds) { PrintFlag = true; DataSizing::DataFlowUsedForSizing = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode); SizingMethod = CoolingCapacitySizing; FieldNum = 7 + (Mode - 1) * 13; - SizingString = DXCoilNumericFields( DXCoilNum ).PerfMode( 1 ).FieldNames( FieldNum ) + " [W]"; - DataEMSOverrideON = DXCoil( DXCoilNum ).RatedTotCapEMSOverrideOn( Mode ); - DataEMSOverride = DXCoil( DXCoilNum ).RatedTotCapEMSOverrideValue( Mode ); - MSRatedTotCapDesAtMaxSpeed = DXCoil( DXCoilNum ).MSRatedTotCap( Mode ); + SizingString = DXCoilNumericFields(DXCoilNum).PerfMode(1).FieldNames(FieldNum) + " [W]"; + DataEMSOverrideON = DXCoil(DXCoilNum).RatedTotCapEMSOverrideOn(Mode); + DataEMSOverride = DXCoil(DXCoilNum).RatedTotCapEMSOverrideValue(Mode); + MSRatedTotCapDesAtMaxSpeed = DXCoil(DXCoilNum).MSRatedTotCap(Mode); if (!HardSizeNoDesRun) { PrintFlag = false; TempSize = DataSizing::AutoSize; // Auto size capacity at the highest speed - RequestSizing(state, CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName ); + RequestSizing(state, CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); SizingMethod = AutoCalculateSizing; DataConstantUsedForSizing = TempSize; DataFractionUsedForSizing = 1.0; MSRatedTotCapDesAtMaxSpeed = TempSize; - DXCoil( DXCoilNum ).MSRatedTotCapDes( Mode ) = TempSize; + DXCoil(DXCoilNum).MSRatedTotCapDes(Mode) = TempSize; PrintFlag = true; } - TempSize = DXCoil( DXCoilNum ).MSRatedTotCap( Mode ); - RequestSizing(state, CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName ); - DXCoil( DXCoilNum ).MSRatedTotCap( Mode ) = TempSize; + TempSize = DXCoil(DXCoilNum).MSRatedTotCap(Mode); + RequestSizing(state, CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); + DXCoil(DXCoilNum).MSRatedTotCap(Mode) = TempSize; if (IsAutoSize) { MSRatedTotCapDesAtMaxSpeed = TempSize; - DXCoil( DXCoilNum ).MSRatedTotCapDes( Mode ) = TempSize; + DXCoil(DXCoilNum).MSRatedTotCapDes(Mode) = TempSize; } } else { // cooling capacity at lower speeds @@ -7423,13 +7429,13 @@ namespace DXCoils { if (IsAutoSize || !HardSizeNoDesRun) { SizingMethod = AutoCalculateSizing; // auto size low speed capacity to fraction of the highest speed capacity - if ( !HardSizeNoDesRun ) { + if (!HardSizeNoDesRun) { DataConstantUsedForSizing = MSRatedTotCapDesAtMaxSpeed; } else { - DataConstantUsedForSizing = DXCoil( DXCoilNum ).MSRatedTotCap( DXCoil( DXCoilNum ).NumOfSpeeds ); + DataConstantUsedForSizing = DXCoil(DXCoilNum).MSRatedTotCap(DXCoil(DXCoilNum).NumOfSpeeds); } DataFractionUsedForSizing = (float)Mode / DXCoil(DXCoilNum).NumOfSpeeds; - DXCoil( DXCoilNum ).MSRatedTotCapDes( Mode ) = DataConstantUsedForSizing * DataFractionUsedForSizing; + DXCoil(DXCoilNum).MSRatedTotCapDes(Mode) = DataConstantUsedForSizing * DataFractionUsedForSizing; } TempSize = DXCoil(DXCoilNum).MSRatedTotCap(Mode); DataEMSOverrideON = DXCoil(DXCoilNum).RatedTotCapEMSOverrideOn(Mode); @@ -7483,14 +7489,14 @@ namespace DXCoils { // set to yes unless the code below is commented out MSRatedSHRDes = DXCoil(DXCoilNum).MSRatedSHR(Mode); } else { - //TempSize = DXCoil(DXCoilNum).MSRatedSHR(Mode); - //SizingString = "Speed " + TrimSigDigits(Mode) + " Rated Sensible Heat Ratio"; - //DataFlowUsedForSizing = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode); - //DataCapacityUsedForSizing = DXCoil(DXCoilNum).MSRatedTotCap(Mode); - //DataEMSOverrideON = DXCoil(DXCoilNum).RatedSHREMSOverrideOn(Mode); - //DataEMSOverride = DXCoil(DXCoilNum).RatedSHREMSOverrideValue(Mode); - //RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, bPRINT, RoutineName); - //DXCoil(DXCoilNum).MSRatedSHR(Mode) = TempSize; + // TempSize = DXCoil(DXCoilNum).MSRatedSHR(Mode); + // SizingString = "Speed " + TrimSigDigits(Mode) + " Rated Sensible Heat Ratio"; + // DataFlowUsedForSizing = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode); + // DataCapacityUsedForSizing = DXCoil(DXCoilNum).MSRatedTotCap(Mode); + // DataEMSOverrideON = DXCoil(DXCoilNum).RatedSHREMSOverrideOn(Mode); + // DataEMSOverride = DXCoil(DXCoilNum).RatedSHREMSOverrideValue(Mode); + // RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, bPRINT, RoutineName); + // DXCoil(DXCoilNum).MSRatedSHR(Mode) = TempSize; if (IsAutoSize) { DXCoil(DXCoilNum).MSRatedSHR(Mode) = MSRatedSHRDes; ReportSizingOutput(DXCoil(DXCoilNum).DXCoilType, @@ -7540,9 +7546,9 @@ namespace DXCoils { if (DXCoil(DXCoilNum).MSEvapCondAirFlow(Mode) == AutoSize) { IsAutoSize = true; } - if ( IsAutoSize || !HardSizeNoDesRun ) { - // Auto size condenser air flow to Total Capacity * 0.000114 m3/s/w (850 cfm/ton) - MSEvapCondAirFlowDes = ((float)Mode / DXCoil(DXCoilNum).NumOfSpeeds) * MSRatedTotCapDesAtMaxSpeed * 0.000114; + if (IsAutoSize || !HardSizeNoDesRun) { + // Auto size condenser air flow to Total Capacity * 0.000114 m3/s/w (850 cfm/ton) + MSEvapCondAirFlowDes = ((float)Mode / DXCoil(DXCoilNum).NumOfSpeeds) * MSRatedTotCapDesAtMaxSpeed * 0.000114; } else { // this is done to duplicate any existing calc method MSEvapCondAirFlowDes = DXCoil(DXCoilNum).MSRatedTotCap(Mode) * 0.000114; @@ -7597,7 +7603,7 @@ namespace DXCoils { IsAutoSize = true; } - if ( IsAutoSize || !HardSizeNoDesRun ) { + if (IsAutoSize || !HardSizeNoDesRun) { // Auto size low speed evap condenser pump power to 1/3 Total Capacity * 0.004266 w/w (15 w/ton) MSEvapCondPumpElecNomPowerDes = ((float)Mode / DXCoil(DXCoilNum).NumOfSpeeds) * MSRatedTotCapDesAtMaxSpeed * 0.004266; } else { @@ -7671,7 +7677,7 @@ namespace DXCoils { DataEMSOverride = DXCoil(DXCoilNum).RatedAirVolFlowRateEMSOverrideValue(Mode); RequestSizing(state, CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode) = TempSize; - if ( !IsAutoSize && !HardSizeNoDesRun ) { + if (!IsAutoSize && !HardSizeNoDesRun) { TempSize = AutoSize; bPRINT = false; RequestSizing(state, CompType, CompName, SizingMethod, SizingString, TempSize, bPRINT, RoutineName); @@ -7682,14 +7688,14 @@ namespace DXCoils { FieldNum = 12 + (Mode - 1) * 5; SizingString = DXCoilNumericFields(DXCoilNum).PerfMode(1).FieldNames(FieldNum) + " [m3/s]"; SizingMethod = HeatingAirflowSizing; - if ( IsAutoSize || !HardSizeNoDesRun ) { + if (IsAutoSize || !HardSizeNoDesRun) { SizingMethod = AutoCalculateSizing; // Auto size low speed flow to fraction of the highest speed capacity DataConstantUsedForSizing = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(DXCoil(DXCoilNum).NumOfSpeeds); - if (!IsAutoSize && !HardSizeNoDesRun ) DataConstantUsedForSizing = MSRatedAirVolFlowRateDes; + if (!IsAutoSize && !HardSizeNoDesRun) DataConstantUsedForSizing = MSRatedAirVolFlowRateDes; DataFractionUsedForSizing = (float)Mode / DXCoil(DXCoilNum).NumOfSpeeds; } - TempSize = DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( Mode ); + TempSize = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode); RequestSizing(state, CompType, CompName, SizingMethod, SizingString, TempSize, bPRINT, RoutineName); DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode) = TempSize; } @@ -7781,7 +7787,7 @@ namespace DXCoils { TempSize = DataSizing::AutoSize; DataEMSOverrideON = DXCoil(DXCoilNum).RatedTotCapEMSOverrideOn(Mode); DataEMSOverride = DXCoil(DXCoilNum).RatedTotCapEMSOverrideValue(Mode); - RequestSizing(state, CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName ); + RequestSizing(state, CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); MSRatedTotCapDesAtMaxSpeed = TempSize; SizingMethod = AutoCalculateSizing; DataConstantUsedForSizing = TempSize; @@ -7804,10 +7810,10 @@ namespace DXCoils { if (IsAutoSize || !HardSizeNoDesRun) { SizingMethod = AutoCalculateSizing; // auto size low speed capacity to fraction of the highest speed capacity - if ( !HardSizeNoDesRun ) { + if (!HardSizeNoDesRun) { DataConstantUsedForSizing = MSRatedTotCapDesAtMaxSpeed; } else { - DataConstantUsedForSizing = DXCoil( DXCoilNum ).MSRatedTotCap( DXCoil( DXCoilNum ).NumOfSpeeds ); + DataConstantUsedForSizing = DXCoil(DXCoilNum).MSRatedTotCap(DXCoil(DXCoilNum).NumOfSpeeds); } DataFractionUsedForSizing = (float)Mode / DXCoil(DXCoilNum).NumOfSpeeds; } @@ -8583,7 +8589,7 @@ namespace DXCoils { CondInletHumRat = PsyWFnTdbTwbPb(CondInletTemp, OutdoorWetBulb, OutdoorPressure); CompAmbTemp = OutdoorDryBulb; } else if (DXCoil(DXCoilNum).CondenserType(Mode) == WaterHeater) { - CompAmbTemp = HPWHCrankcaseDBTemp; // Temperature at HP water heater compressor + CompAmbTemp = HPWHCrankcaseDBTemp; // Temperature at HP water heater compressor CondInletTemp = HPWHCrankcaseDBTemp; // Temperature at HP water heater compressor } @@ -9464,12 +9470,12 @@ namespace DXCoils { Real64 OutdoorPressure; // Outdoor barometric pressure at condenser (Pa) static Real64 CurrentEndTime(0.0); // end time of time step for current simulation time step - //static Real64 MinAirHumRat(0.0); // minimum of the inlet air humidity ratio and the outlet air humidity ratio - int Mode; // Performance mode for Multimode DX coil; Always 1 for other coil types - Real64 OutletAirTemp; // Supply air temperature (average value if constant fan, full output if cycling fan) - Real64 OutletAirHumRat; // Supply air humidity ratio (average value if constant fan, full output if cycling fan) - Real64 OutletAirEnthalpy; // Supply air enthalpy (average value if constant fan, full output if cycling fan) - Real64 ADiff; // Used for exponential + // static Real64 MinAirHumRat(0.0); // minimum of the inlet air humidity ratio and the outlet air humidity ratio + int Mode; // Performance mode for Multimode DX coil; Always 1 for other coil types + Real64 OutletAirTemp; // Supply air temperature (average value if constant fan, full output if cycling fan) + Real64 OutletAirHumRat; // Supply air humidity ratio (average value if constant fan, full output if cycling fan) + Real64 OutletAirEnthalpy; // Supply air enthalpy (average value if constant fan, full output if cycling fan) + Real64 ADiff; // Used for exponential // If Performance mode not present, then set to 1. Used only by Multimode/Multispeed DX coil (otherwise mode = 1) if (present(PerfMode)) { @@ -10105,7 +10111,7 @@ namespace DXCoils { Real64 OutletAirTemp; // Supply air temperature (average value if constant fan, full output if cycling fan) Real64 OutletAirHumRat; // Supply air humidity ratio (average value if constant fan, full output if cycling fan) Real64 OutletAirEnthalpy; // Supply air enthalpy (average value if constant fan, full output if cycling fan) - static Real64 CompAmbTemp(0.0); // Ambient temperature at compressor + static Real64 CompAmbTemp(0.0); // Ambient temperature at compressor if (present(OnOffAirFlowRatio)) { AirFlowRatio = OnOffAirFlowRatio; @@ -10579,7 +10585,7 @@ namespace DXCoils { Real64 OutdoorHumRat; // Outdoor humidity ratio at condenser (kg/kg) Real64 OutdoorPressure; // Outdoor barometric pressure at condenser (Pa) bool LocalForceOn; - Real64 AirMassFlowRatio2; // Ratio of low speed air mass flow to rated air mass flow + Real64 AirMassFlowRatio2; // Ratio of low speed air mass flow to rated air mass flow static Real64 CompAmbTemp(0.0); // Ambient temperature at compressor if (present(ForceOn)) { @@ -13510,15 +13516,20 @@ namespace DXCoils { // Formats static constexpr auto Header( - "! , DX Coil Type, DX Coil Name, Fan Type, Fan Name, Standard Net Cooling Capacity {{W}}, Standard Net Cooling Capacity {{Btu/h}}, IEER {{Btu/W-h}}, COP 100% Capacity {{W/W}}, COP 75% Capacity {{W/W}}, COP 50% Capacity {{W/W}}, COP 25% Capacity {{W/W}}, EER 100% Capacity {{Btu/W-h}}, EER 75% Capacity {{Btu/W-h}}, EER 50% Capacity {{Btu/W-h}}, EER 25% Capacity {{Btu/W-h}}, Supply Air Flow 100% {{kg/s}}, Supply Air Flow 75% {{kg/s}},Supply Air Flow 50% {{kg/s}},Supply Air Flow 25% {{kg/s}}\n"); + "! , DX Coil Type, DX Coil Name, Fan Type, Fan Name, Standard Net Cooling Capacity " + "{{W}}, Standard Net Cooling Capacity {{Btu/h}}, IEER {{Btu/W-h}}, COP 100% Capacity {{W/W}}, COP 75% Capacity {{W/W}}, COP 50% Capacity " + "{{W/W}}, COP 25% Capacity {{W/W}}, EER 100% Capacity {{Btu/W-h}}, EER 75% Capacity {{Btu/W-h}}, EER 50% Capacity {{Btu/W-h}}, EER 25% " + "Capacity {{Btu/W-h}}, Supply Air Flow 100% {{kg/s}}, Supply Air Flow 75% {{kg/s}},Supply Air Flow 50% {{kg/s}},Supply Air Flow 25% " + "{{kg/s}}\n"); static constexpr auto Format_891{ - " VAV DX Cooling Coil Standard Rating Information, {},{},{},{},{:.2R},{:.2R},{:.2R},{:.2R},{:.2R},{:.2R},{:.2R},{:.2R},{:.2R},{:.2R},{:.2R},{:.4R},{:.4R},{:.4R},{:.4R},\n"}; + " VAV DX Cooling Coil Standard Rating Information, " + "{},{},{},{},{:.2R},{:.2R},{:.2R},{:.2R},{:.2R},{:.2R},{:.2R},{:.2R},{:.2R},{:.2R},{:.2R},{:.4R},{:.4R},{:.4R},{:.4R},\n"}; // Get fan index and name if not already available if (DXCoil(DXCoilNum).SupplyFanIndex == -1) - GetFanIndexForTwoSpeedCoil(state, - DXCoilNum, DXCoil(DXCoilNum).SupplyFanIndex, DXCoil(DXCoilNum).SupplyFanName, DXCoil(DXCoilNum).SupplyFan_TypeNum); + GetFanIndexForTwoSpeedCoil( + state, DXCoilNum, DXCoil(DXCoilNum).SupplyFanIndex, DXCoil(DXCoilNum).SupplyFanName, DXCoil(DXCoilNum).SupplyFan_TypeNum); if (DXCoil(DXCoilNum).SupplyFanIndex == -1) { // didn't find VAV fan, do not rate this coil DXCoil(DXCoilNum).RateWithInternalStaticAndFanObject = false; ShowWarningError("CalcTwoSpeedDXCoilStandardRating: Did not find an appropriate fan associated with DX coil named = \"" + @@ -13575,8 +13586,8 @@ namespace DXCoils { HVACFan::fanObjs[DXCoil(DXCoilNum).SupplyFanIndex]->simulate(state, _, true, false, FanStaticPressureRise); FanPowerCorrection = HVACFan::fanObjs[DXCoil(DXCoilNum).SupplyFanIndex]->fanPower(); } else { - Fans::SimulateFanComponents(state, - DXCoil(DXCoilNum).SupplyFanName, true, DXCoil(DXCoilNum).SupplyFanIndex, _, true, false, FanStaticPressureRise); + Fans::SimulateFanComponents( + state, DXCoil(DXCoilNum).SupplyFanName, true, DXCoil(DXCoilNum).SupplyFanIndex, _, true, false, FanStaticPressureRise); FanPowerCorrection = Fans::GetFanPower(DXCoil(DXCoilNum).SupplyFanIndex); } @@ -13669,14 +13680,15 @@ namespace DXCoils { LowerBoundMassFlowRate = 0.01 * DXCoil(DXCoilNum).RatedAirMassFlowRate(1); - TempSolveRoot::SolveRoot(state, AccuracyTolerance, - MaximumIterations, - SolverFlag, - PartLoadAirMassFlowRate, - CalcTwoSpeedDXCoilIEERResidual, - LowerBoundMassFlowRate, - DXCoil(DXCoilNum).RatedAirMassFlowRate(1), - Par); + TempSolveRoot::SolveRoot(state, + AccuracyTolerance, + MaximumIterations, + SolverFlag, + PartLoadAirMassFlowRate, + CalcTwoSpeedDXCoilIEERResidual, + LowerBoundMassFlowRate, + DXCoil(DXCoilNum).RatedAirMassFlowRate(1), + Par); if (SolverFlag == -1) { @@ -13715,8 +13727,8 @@ namespace DXCoils { HVACFan::fanObjs[DXCoil(DXCoilNum).SupplyFanIndex]->simulate(state, _, true, false, FanStaticPressureRise); FanPowerCorrection = HVACFan::fanObjs[DXCoil(DXCoilNum).SupplyFanIndex]->fanPower(); } else { - Fans::SimulateFanComponents(state, - DXCoil(DXCoilNum).SupplyFanName, true, DXCoil(DXCoilNum).SupplyFanIndex, _, true, false, FanStaticPressureRise); + Fans::SimulateFanComponents( + state, DXCoil(DXCoilNum).SupplyFanName, true, DXCoil(DXCoilNum).SupplyFanIndex, _, true, false, FanStaticPressureRise); FanPowerCorrection = Fans::GetFanPower(DXCoil(DXCoilNum).SupplyFanIndex); } @@ -13838,21 +13850,34 @@ namespace DXCoils { } const auto &fan_type_name = [&]() -> std::pair { - if (DXCoil(DXCoilNum).RateWithInternalStaticAndFanObject) { - return {"Fan:VariableVolume", DXCoil(DXCoilNum).SupplyFanName}; - } else { - return {"N/A", "N/A"}; - } + if (DXCoil(DXCoilNum).RateWithInternalStaticAndFanObject) { + return {"Fan:VariableVolume", DXCoil(DXCoilNum).SupplyFanName}; + } else { + return {"N/A", "N/A"}; + } }(); - print(outputFiles.eio, Format_891 - , "Coil:Cooling:DX:TwoSpeed" , DXCoil(DXCoilNum).Name , fan_type_name.first, fan_type_name.second - , NetCoolingCapRated , (NetCoolingCapRated * ConvFromSIToIP) , IEER - , EER_TestPoint_SI(1) , EER_TestPoint_SI(2) , EER_TestPoint_SI(3) - , EER_TestPoint_SI(4) , EER_TestPoint_IP(1) , EER_TestPoint_IP(2) - , EER_TestPoint_IP(3) , EER_TestPoint_IP(4) , SupAirMdot_TestPoint(1) - , SupAirMdot_TestPoint(2) , SupAirMdot_TestPoint(3) - , SupAirMdot_TestPoint(4)); + print(outputFiles.eio, + Format_891, + "Coil:Cooling:DX:TwoSpeed", + DXCoil(DXCoilNum).Name, + fan_type_name.first, + fan_type_name.second, + NetCoolingCapRated, + (NetCoolingCapRated * ConvFromSIToIP), + IEER, + EER_TestPoint_SI(1), + EER_TestPoint_SI(2), + EER_TestPoint_SI(3), + EER_TestPoint_SI(4), + EER_TestPoint_IP(1), + EER_TestPoint_IP(2), + EER_TestPoint_IP(3), + EER_TestPoint_IP(4), + SupAirMdot_TestPoint(1), + SupAirMdot_TestPoint(2), + SupAirMdot_TestPoint(3), + SupAirMdot_TestPoint(4)); PreDefTableEntry(pdchDXCoolCoilType, DXCoil(DXCoilNum).Name, "Coil:Cooling:DX:TwoSpeed"); // W to tons @@ -13888,7 +13913,8 @@ namespace DXCoils { OutDryBulbTemp = heldOutDryBulb; // reset the outdoor dry bulb when done with it } - void GetFanIndexForTwoSpeedCoil(EnergyPlusData &state, int const CoolingCoilIndex, int &SupplyFanIndex, std::string &SupplyFanName, int &SupplyFan_TypeNum) + void GetFanIndexForTwoSpeedCoil( + EnergyPlusData &state, int const CoolingCoilIndex, int &SupplyFanIndex, std::string &SupplyFanName, int &SupplyFan_TypeNum) { // SUBROUTINE INFORMATION: @@ -13965,7 +13991,8 @@ namespace DXCoils { } } - Real64 CalcTwoSpeedDXCoilIEERResidual(EnergyPlusData &state, Real64 const SupplyAirMassFlowRate, // compressor cycling ratio (1.0 is continuous, 0.0 is off) + Real64 CalcTwoSpeedDXCoilIEERResidual(EnergyPlusData &state, + Real64 const SupplyAirMassFlowRate, // compressor cycling ratio (1.0 is continuous, 0.0 is off) Array1D const &Par // par(1) = DX coil number ) { @@ -14059,8 +14086,8 @@ namespace DXCoils { if (DXCoil(DXCoilNum).SupplyFan_TypeNum == DataHVACGlobals::FanType_SystemModelObject) { HVACFan::fanObjs[DXCoil(DXCoilNum).SupplyFanIndex]->simulate(state, _, true, false, FanStaticPressureRise); } else { - Fans::SimulateFanComponents(state, - DXCoil(DXCoilNum).SupplyFanName, true, DXCoil(DXCoilNum).SupplyFanIndex, _, true, false, FanStaticPressureRise); + Fans::SimulateFanComponents( + state, DXCoil(DXCoilNum).SupplyFanName, true, DXCoil(DXCoilNum).SupplyFanIndex, _, true, false, FanStaticPressureRise); } FanHeatCorrection = Node(FanOutletNodeNum).Enthalpy - Node(FanInletNodeNum).Enthalpy; @@ -14164,7 +14191,8 @@ namespace DXCoils { } } - Real64 GetCoilCapacity(EnergyPlusData &EP_UNUSED(state), std::string const &CoilType, // must match coil types in this module + Real64 GetCoilCapacity(EnergyPlusData &EP_UNUSED(state), + std::string const &CoilType, // must match coil types in this module std::string const &CoilName, // must match coil names for the coil type bool &ErrorsFound // set to true if problem ) @@ -14423,7 +14451,8 @@ namespace DXCoils { return MinOAT; } - int GetCoilInletNode(EnergyPlusData &EP_UNUSED(state), std::string const &CoilType, // must match coil types in this module + int GetCoilInletNode(EnergyPlusData &EP_UNUSED(state), + std::string const &CoilType, // must match coil types in this module std::string const &CoilName, // must match coil names for the coil type bool &ErrorsFound // set to true if problem ) @@ -14464,12 +14493,13 @@ namespace DXCoils { int getCoilInNodeIndex(int const &CoilIndex, // coil index bool &ErrorsFound // set to true if problem - ) { + ) + { int NodeNumber; // returned node number of matched coil // Obtains and Allocates DXCoils - if ( GetCoilsInputFlag ) { + if (GetCoilsInputFlag) { GetDXCoils(); GetCoilsInputFlag = false; } @@ -14485,7 +14515,8 @@ namespace DXCoils { return NodeNumber; } - int GetCoilOutletNode(EnergyPlusData &EP_UNUSED(state), std::string const &CoilType, // must match coil types in this module + int GetCoilOutletNode(EnergyPlusData &EP_UNUSED(state), + std::string const &CoilType, // must match coil types in this module std::string const &CoilName, // must match coil names for the coil type bool &ErrorsFound // set to true if problem ) @@ -14527,12 +14558,13 @@ namespace DXCoils { int getCoilOutNodeIndex(int const &CoilIndex, // must match coil types in this module bool &ErrorsFound // set to true if problem - ) { + ) + { int NodeNumber; // returned node number of matched coil // Obtains and Allocates DXCoils - if ( GetCoilsInputFlag ) { + if (GetCoilsInputFlag) { GetDXCoils(); GetCoilsInputFlag = false; } @@ -14923,7 +14955,8 @@ namespace DXCoils { return CapFTCurveIndex; } - void SetDXCoolingCoilData(EnergyPlusData &state, int const DXCoilNum, // Number of DX Cooling Coil + void SetDXCoolingCoilData(EnergyPlusData &state, + int const DXCoilNum, // Number of DX Cooling Coil bool &ErrorsFound, // Set to true if certain errors found Optional_int HeatingCoilPLFCurvePTR, // Parameter equivalent of heating coil PLR curve index Optional_int CondenserType, // Parameter equivalent of condenser type parameter @@ -15062,13 +15095,15 @@ namespace DXCoils { DXCoil(DXCoilNum).SupplyFan_TypeNum = SupplyFan_TypeNum; if (DXCoil(DXCoilNum).SupplyFanIndex > -1) { if (SupplyFan_TypeNum == DataHVACGlobals::FanType_SystemModelObject) { - coilSelectionReportObj->setCoilSupplyFanInfo(state, DXCoil(DXCoilNum).Name, + coilSelectionReportObj->setCoilSupplyFanInfo(state, + DXCoil(DXCoilNum).Name, DXCoil(DXCoilNum).DXCoilType, HVACFan::fanObjs[DXCoil(DXCoilNum).SupplyFanIndex]->name, DataAirSystems::objectVectorOOFanSystemModel, DXCoil(DXCoilNum).SupplyFanIndex); } else { - coilSelectionReportObj->setCoilSupplyFanInfo(state, DXCoil(DXCoilNum).Name, + coilSelectionReportObj->setCoilSupplyFanInfo(state, + DXCoil(DXCoilNum).Name, DXCoil(DXCoilNum).DXCoilType, Fans::Fan(DXCoil(DXCoilNum).SupplyFanIndex).FanName, DataAirSystems::structArrayLegacyFanModels, @@ -15911,19 +15946,19 @@ namespace DXCoils { // InletAirHumRat may be modified in this ADP/BF loop, use temporary varible for calculations // commented, not used issue #6950 - //InletAirHumRatTemp = InletAirHumRat; + // InletAirHumRatTemp = InletAirHumRat; //// Calculate apparatus dew point conditions using TotCap and CBF - //hDelta = TotCap / AirMassFlow; + // hDelta = TotCap / AirMassFlow; //// there is an issue here with using CBF to calculate the ADP enthalpy. //// at low loads the bypass factor increases significantly. - //hADP = InletAirEnthalpy - hDelta / (1.0 - CBF); - //tADP = PsyTsatFnHPb(hADP, OutdoorPressure, RoutineName); + // hADP = InletAirEnthalpy - hDelta / (1.0 - CBF); + // tADP = PsyTsatFnHPb(hADP, OutdoorPressure, RoutineName); //// Eventually inlet air conditions will be used in DX Coil, these lines are commented out and marked with this comment line //// tADP = PsyTsatFnHPb(hADP,InletAirPressure) - //wADP = min(InletAirHumRat, PsyWFnTdbH(tADP, hADP, RoutineName)); - //hTinwADP = PsyHFnTdbW(InletAirDryBulbTemp, wADP); - //if ((InletAirEnthalpy - hADP) > 1.e-10) { + // wADP = min(InletAirHumRat, PsyWFnTdbH(tADP, hADP, RoutineName)); + // hTinwADP = PsyHFnTdbW(InletAirDryBulbTemp, wADP); + // if ((InletAirEnthalpy - hADP) > 1.e-10) { // SHR = min((hTinwADP - hADP) / (InletAirEnthalpy - hADP), 1.0); //} else { // SHR = 1.0; diff --git a/tst/EnergyPlus/unit/DXCoils.unit.cc b/tst/EnergyPlus/unit/DXCoils.unit.cc index 3ceab57c06b..52cc0719591 100644 --- a/tst/EnergyPlus/unit/DXCoils.unit.cc +++ b/tst/EnergyPlus/unit/DXCoils.unit.cc @@ -56,21 +56,21 @@ #include "Fixtures/SQLiteFixture.hh" #include #include +#include #include #include #include #include #include #include -#include -#include #include #include #include +#include #include +#include #include #include -#include using namespace EnergyPlus; using namespace DXCoils; @@ -2273,10 +2273,11 @@ TEST_F(SQLiteFixture, DXCoils_TestComponentSizingOutput_TwoSpeed) const std::string compName = DXCoils::DXCoil(1).Name; EXPECT_EQ(compName, "MAIN COOLING COIL 1"); - struct TestQuery { + struct TestQuery + { TestQuery(std::string t_description, std::string t_units, Real64 t_value) : description(t_description), units(t_units), expectedValue(t_value), - displayString("Description='" + description + "'; Units='" + units + "'") {}; + displayString("Description='" + description + "'; Units='" + units + "'"){}; const std::string description; const std::string units; @@ -2292,13 +2293,17 @@ TEST_F(SQLiteFixture, DXCoils_TestComponentSizingOutput_TwoSpeed) TestQuery("Design Size Low Speed Evaporative Condenser Pump Rated Power Consumption", "W", lowSpeedCondPumpPower), }); - for (auto& testQuery : testQueries) { + for (auto &testQuery : testQueries) { std::string query("SELECT Value From ComponentSizes" - " WHERE CompType = '" + compType + "'" - " AND CompName = '" + compName + "'" - " AND Description = '" + testQuery.description + "'" + - " AND Units = '" + testQuery.units + "'"); + " WHERE CompType = '" + + compType + + "'" + " AND CompName = '" + + compName + + "'" + " AND Description = '" + + testQuery.description + "'" + " AND Units = '" + testQuery.units + "'"); // execAndReturnFirstDouble returns -10000.0 if not found Real64 return_val = SQLiteFixture::execAndReturnFirstDouble(query); @@ -2487,10 +2492,11 @@ TEST_F(SQLiteFixture, DXCoils_TestComponentSizingOutput_SingleSpeed) const std::string compName = DXCoils::DXCoil(1).Name; EXPECT_EQ(compName, "FURNACE ACDXCOIL 1"); - struct TestQuery { + struct TestQuery + { TestQuery(std::string t_description, std::string t_units, Real64 t_value) : description(t_description), units(t_units), expectedValue(t_value), - displayString("Description='" + description + "'; Units='" + units + "'") {}; + displayString("Description='" + description + "'; Units='" + units + "'"){}; const std::string description; const std::string units; @@ -2504,13 +2510,17 @@ TEST_F(SQLiteFixture, DXCoils_TestComponentSizingOutput_SingleSpeed) TestQuery("Design Size Evaporative Condenser Pump Rated Power Consumption", "W", condPumpPower), }); - for (auto& testQuery : testQueries) { + for (auto &testQuery : testQueries) { std::string query("SELECT Value From ComponentSizes" - " WHERE CompType = '" + compType + "'" - " AND CompName = '" + compName + "'" - " AND Description = '" + testQuery.description + "'" + - " AND Units = '" + testQuery.units + "'"); + " WHERE CompType = '" + + compType + + "'" + " AND CompName = '" + + compName + + "'" + " AND Description = '" + + testQuery.description + "'" + " AND Units = '" + testQuery.units + "'"); // execAndReturnFirstDouble returns -10000.0 if not found Real64 return_val = SQLiteFixture::execAndReturnFirstDouble(query); @@ -3514,7 +3524,7 @@ TEST_F(EnergyPlusFixture, TestMultiSpeedCoilsAutoSizingOutput) " 1, !- Maximum Value of x {BasedOnField A2}", " 0.7, !- Minimum Curve Output {BasedOnField A3}", " 1; !- Maximum Curve Output {BasedOnField A3}", - }); + }); ASSERT_TRUE(process_idf(idf_objects)); @@ -3561,12 +3571,12 @@ TEST_F(EnergyPlusFixture, TestMultiSpeedCoilsAutoSizingOutput) // Design Capacity at speed 2 and speed 1 EXPECT_NEAR(31888.0, DXCoil(1).MSRatedTotCap(2), 0.01); EXPECT_NEAR(15944.0, DXCoil(1).MSRatedTotCap(1), 0.01); - + // check multi-speed DX heating coil EXPECT_EQ("ASHP HTG COIL", DXCoil(2).Name); EXPECT_EQ("Coil:Heating:DX:MultiSpeed", DXCoil(2).DXCoilType); // set companion dx cooling coil - DXCoil( 2 ).CompanionUpstreamDXCoil = 1; + DXCoil(2).CompanionUpstreamDXCoil = 1; SizeDXCoil(state, 2); EXPECT_EQ(1.75, DXCoil(2).MSRatedAirVolFlowRate(2)); EXPECT_EQ(0.875, DXCoil(2).MSRatedAirVolFlowRate(2) * 0.5); @@ -3766,7 +3776,7 @@ TEST_F(EnergyPlusFixture, TestMultiSpeedCoolingCoilPartialAutoSizeOutput) " 0.7, !- Minimum Curve Output {BasedOnField A3}", " 1; !- Maximum Curve Output {BasedOnField A3}", - }); + }); ASSERT_TRUE(process_idf(idf_objects)); @@ -3851,7 +3861,6 @@ TEST_F(EnergyPlusFixture, DXCoils_GetDXCoilCapFTCurveIndexTest) DXCoil(2).DXCoilType_Num = CoilDX_MultiSpeedHeating; DXCoil(2).DXCoilType = "Coil:Heating:DX:MultiSpeed"; - for (DXCoilNum = 1; DXCoilNum <= 2; ++DXCoilNum) { DXCoil(DXCoilNum).NumOfSpeeds = 2; DXCoil(DXCoilNum).MSRatedTotCap.allocate(DXCoil(DXCoilNum).NumOfSpeeds); @@ -3940,7 +3949,7 @@ TEST_F(EnergyPlusFixture, DXCoils_GetDXCoilCapFTCurveIndexTest) // dx cooling coil int CoilIndex = 1; EXPECT_EQ(DXCoil(CoilIndex).DXCoilType, "Coil:Cooling:DX:MultiSpeed"); - DataTotCapCurveIndex = DXCoils::GetDXCoilCapFTCurveIndex( CoilIndex, ErrorsFound ); + DataTotCapCurveIndex = DXCoils::GetDXCoilCapFTCurveIndex(CoilIndex, ErrorsFound); EXPECT_EQ(2, DataTotCapCurveIndex); // evaluate dx cooling coil curves to show impacts of incorrect curve index Real64 TotCapTempModFac_lowestSpeed = CurveValue(1, 19.4, 30.0); @@ -3957,7 +3966,7 @@ TEST_F(EnergyPlusFixture, DXCoils_GetDXCoilCapFTCurveIndexTest) // dx heating coil CoilIndex = 2; EXPECT_EQ(DXCoil(CoilIndex).DXCoilType, "Coil:Heating:DX:MultiSpeed"); - DataTotCapCurveIndex = DXCoils::GetDXCoilCapFTCurveIndex( CoilIndex, ErrorsFound ); + DataTotCapCurveIndex = DXCoils::GetDXCoilCapFTCurveIndex(CoilIndex, ErrorsFound); EXPECT_EQ(4, DataTotCapCurveIndex); // evaluate dx heating coil curves to show impacts of incorrect curve index TotCapTempModFac_lowestSpeed = CurveValue(3, 5.0, 10.0); @@ -3971,5 +3980,13 @@ TEST_F(EnergyPlusFixture, DXCoils_GetDXCoilCapFTCurveIndexTest) EXPECT_DOUBLE_EQ(8763.2701224550547, NominalHeatingDesignCapacity_lowestSpeed); EXPECT_DOUBLE_EQ(8945.5439208717980, NominalHeatingDesignCapacity_designSpeed); } +TEST_F(EnergyPlusFixture, DXCoils_RatedInletAirWTest) +{ + + Real64 Tdb = 26.6667; + Real64 Twet = 19.4444; + Real64 RatedW = Psychrometrics::PsyWFnTdbTwbPb(Tdb, Twet, 101325.0); + EXPECT_NEAR(RatedInletAirHumRat, RatedW, 0.000001); +} } // namespace EnergyPlus diff --git a/tst/EnergyPlus/unit/HVACUnitaryBypassVAV.unit.cc b/tst/EnergyPlus/unit/HVACUnitaryBypassVAV.unit.cc index 114d59908db..30fccf4282e 100644 --- a/tst/EnergyPlus/unit/HVACUnitaryBypassVAV.unit.cc +++ b/tst/EnergyPlus/unit/HVACUnitaryBypassVAV.unit.cc @@ -823,7 +823,7 @@ TEST_F(CBVAVSys, UnitaryBypassVAV_NoOASys) HVACUnitaryBypassVAV::InitCBVAV(state, cbvavNum, FirstHVACIteration, AirLoopNum, OnOffAirFlowRatio, HXUnitOn); Real64 FullOutput = 0.0; HVACUnitaryBypassVAV::CalcCBVAV(state, cbvavNum, FirstHVACIteration, PartLoadFrac, FullOutput, OnOffAirFlowRatio, HXUnitOn); - EXPECT_NEAR(PartLoadFrac, 0.935, 0.001); // load = -7000 W, coil capacity = 10,000 W, SHR = 0.7 so max sensible is just over 7,000 W + EXPECT_NEAR(PartLoadFrac, 0.9387, 0.001); // load = -7000 W, coil capacity = 10,000 W, SHR = 0.7 so max sensible is just over 7,000 W EXPECT_NEAR(cbvav.OutletTempSetPoint, DataLoopNode::Node(cbvav.AirOutNode).Temp, 0.0001); EXPECT_NEAR(cbvav.OutletTempSetPoint, 12.771, 0.001); diff --git a/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc b/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc index 73e0bce0387..2841c413750 100644 --- a/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc +++ b/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc @@ -62,30 +62,29 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include +#include #include -#include #include #include #include #include #include -#include #include -#include #include #include #include #include #include #include +#include #include #include #include @@ -125,11 +124,12 @@ using namespace EnergyPlus::SizingManager; namespace EnergyPlus { -class AirLoopFixture: public EnergyPlusFixture { +class AirLoopFixture : public EnergyPlusFixture +{ public: int NumAirloops = 1; - int NumZoneInletNodes = 1; // number of zone inlet nodes + int NumZoneInletNodes = 1; // number of zone inlet nodes int NumZoneExhaustNodes = 1; // number of zone exhaust nodes bool ErrorsFound = false; Real64 const CpWater = 4180.0; // For estimating the expected result @@ -148,8 +148,8 @@ class AirLoopFixture: public EnergyPlusFixture { DataGlobals::BeginEnvrnFlag = true; DataEnvironment::OutDryBulbTemp = 35.0; DataEnvironment::OutHumRat = 0.012; - DataEnvironment::OutWetBulbTemp = Psychrometrics::PsyTwbFnTdbWPb( - DataEnvironment::OutDryBulbTemp, DataEnvironment::OutHumRat, DataEnvironment::StdPressureSeaLevel); + DataEnvironment::OutWetBulbTemp = + Psychrometrics::PsyTwbFnTdbWPb(DataEnvironment::OutDryBulbTemp, DataEnvironment::OutHumRat, DataEnvironment::StdPressureSeaLevel); DataEnvironment::OutBaroPress = 101325; // sea level DataZoneEquipment::ZoneEquipInputsFilled = true; // denotes zone equipment has been read in @@ -520,15 +520,12 @@ class AirLoopFixture: public EnergyPlusFixture { // set up schedules ScheduleManager::Schedule.allocate(10); - } virtual void TearDown() { EnergyPlusFixture::TearDown(); // Remember to tear down the base fixture after cleaning up derived fixture! } - - }; TEST_F(AirLoopFixture, VRF_SysModel_inAirloop) @@ -640,7 +637,7 @@ TEST_F(AirLoopFixture, VRF_SysModel_inAirloop) EXPECT_FALSE(CoolingLoad(curSysNum)); // verify no load on TU EXPECT_FALSE(HeatingLoad(curSysNum)); - ZoneSysEnergyDemand(curZoneNum).RemainingOutputRequired = 1000.0; // set heating load + ZoneSysEnergyDemand(curZoneNum).RemainingOutputRequired = 1000.0; // set heating load ZoneSysEnergyDemand(curZoneNum).RemainingOutputReqToCoolSP = 2000.0; ZoneSysEnergyDemand(curZoneNum).RemainingOutputReqToHeatSP = 1000.0; InitVRF(state, curTUNum, curZoneNum, FirstHVACIteration, OnOffAirFlowRatio, QZnReq); // Initialize all VRFTU related parameters @@ -650,7 +647,7 @@ TEST_F(AirLoopFixture, VRF_SysModel_inAirloop) SimVRF(state, curTUNum, FirstHVACIteration, OnOffAirFlowRatio, SysOutputProvided, LatOutputProvided, QZnReq); EXPECT_NEAR(SysOutputProvided, QZnReq, 1.0); - ZoneSysEnergyDemand(curZoneNum).RemainingOutputRequired = -1000.0; // set cooling load + ZoneSysEnergyDemand(curZoneNum).RemainingOutputRequired = -1000.0; // set cooling load ZoneSysEnergyDemand(curZoneNum).RemainingOutputReqToCoolSP = -1000.0; ZoneSysEnergyDemand(curZoneNum).RemainingOutputReqToHeatSP = -2000.0; InitVRF(state, curTUNum, curZoneNum, FirstHVACIteration, OnOffAirFlowRatio, QZnReq); // Initialize all VRFTU related parameters @@ -2256,7 +2253,7 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_VRFOU_Compressor) StdRhoAir = PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, 20.0, 0.0); // Read in IDF - ProcessScheduleInput(outputFiles()); // read schedules + ProcessScheduleInput(outputFiles()); // read schedules CurveManager::GetCurveInput(); // read curves FluidProperties::GetFluidPropertiesData(); // read refrigerant properties @@ -2957,7 +2954,6 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_CalcVRFIUAirFlow) EXPECT_NEAR(Toutlet, 38.37, 0.01); EXPECT_NEAR(Houtlet, 49113, 1); EXPECT_NEAR(SCact, 5.00, 0.01); - } TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_CalcVRFIUTeTc) @@ -3722,12 +3718,12 @@ TEST_F(EnergyPlusFixture, VRFTest_SysCurve) ZoneSysEnergyDemand.allocate(1); - ProcessScheduleInput(outputFiles()); // read schedules - GetCurveInput(); // read curves - GetZoneData(ErrorsFound); // read zone data + ProcessScheduleInput(outputFiles()); // read schedules + GetCurveInput(); // read curves + GetZoneData(ErrorsFound); // read zone data EXPECT_FALSE(ErrorsFound); - GetZoneEquipmentData(state); // read equipment list and connections + GetZoneEquipmentData(state); // read equipment list and connections ZoneInletAirNode = GetVRFTUZoneInletAirNode(state, VRFTUNum); // trigger GetVRFInput by calling a mining function Schedule(VRF(VRFCond).SchedPtr).CurrentValue = 1.0; // enable the VRF condenser @@ -3763,7 +3759,8 @@ TEST_F(EnergyPlusFixture, VRFTest_SysCurve) bool ZoneEquipment = true; DataAirLoop::AirLoopInputsFilled = true; - SimulateVRF(state, VRFTU(VRFTUNum).Name, + SimulateVRF(state, + VRFTU(VRFTUNum).Name, FirstHVACIteration, CurZoneNum, ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), @@ -3796,17 +3793,18 @@ TEST_F(EnergyPlusFixture, VRFTest_SysCurve) VRF(VRFCond).HeatingCapacity + 1000.0; // simulates a dual Tstat with load to cooling SP > load to heating SP ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToHeatSP = VRF(VRFCond).HeatingCapacity; - SimulateVRF(state, VRFTU(VRFTUNum).Name, - FirstHVACIteration, - CurZoneNum, - ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), - HeatingActive, - CoolingActive, - OAUnitNum, - OAUCoilOutTemp, - ZoneEquipment, - SysOutputProvided, - LatOutputProvided); + SimulateVRF(state, + VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); ASSERT_TRUE(VRF(VRFCond).DefrostPower > 0.0); // defrost power should be greater than 0 DefrostWatts = VRF(VRFCond).VRFCondRTF * (VRF(VRFCond).HeatingCapacity / 1.01667) * VRF(VRFCond).DefrostFraction; @@ -3882,17 +3880,18 @@ TEST_F(EnergyPlusFixture, VRFTest_SysCurve) Node(VRFTU(VRFCond).VRFTUInletNodeNum).Temp = 20; // 20 C at 13 C WB (44.5 % RH) for indoor heating condition Node(VRFTU(VRFCond).VRFTUInletNodeNum).HumRat = 0.0064516; // need to set these so OA mixer will get proper mixed air condition Node(VRFTU(VRFCond).VRFTUInletNodeNum).Enthalpy = 36485.3142; - SimulateVRF(state, VRFTU(VRFTUNum).Name, - FirstHVACIteration, - CurZoneNum, - ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), - HeatingActive, - CoolingActive, - OAUnitNum, - OAUCoilOutTemp, - ZoneEquipment, - SysOutputProvided, - LatOutputProvided); + SimulateVRF(state, + VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); outWB = Node(VRF(VRFCond).CondenserNodeNum).OutAirWetBulb; // no defrost adjustment to OA WB InletAirDryBulbC = DXCoils::DXCoilHeatInletAirDBTemp(DXHeatingCoilIndex); // load weighted average but only 1 coil here @@ -3967,17 +3966,18 @@ TEST_F(EnergyPlusFixture, VRFTest_SysCurve) VRF(VRFCond).MasterZoneTUIndex = 0; VRF(VRFCond).ThermostatPriority = ThermostatOffsetPriority; - SimulateVRF(state, VRFTU(VRFTUNum).Name, - FirstHVACIteration, - CurZoneNum, - ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), - HeatingActive, - CoolingActive, - OAUnitNum, - OAUCoilOutTemp, - ZoneEquipment, - SysOutputProvided, - LatOutputProvided); + SimulateVRF(state, + VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); EXPECT_NEAR(SysOutputProvided, ZoneSysEnergyDemand(CurZoneNum).RemainingOutputRequired, 5.0); // system output should be less than 0 and approx = to VRF capacity * SHR @@ -4027,7 +4027,7 @@ TEST_F(EnergyPlusFixture, VRFTest_SysCurve) } // ensure that TU turns off when fan heat exceeds the heating load - ZT = 20.0; // set zone temp below heating SP (SP=21) to ensure heating mode + ZT = 20.0; // set zone temp below heating SP (SP=21) to ensure heating mode Node(VRFTU(VRFTUNum).ZoneAirNode).Temp = 20.0; Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).Temp = 20; // 20 C at 13 C WB (44.5 % RH) for indoor heating condition Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).HumRat = 0.0064516; // need to set these so OA mixer will get proper mixed air condition @@ -4038,17 +4038,18 @@ TEST_F(EnergyPlusFixture, VRFTest_SysCurve) ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToCoolSP = 500.0; ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToHeatSP = 400.0; Schedule(VRFTU(VRFTUNum).FanOpModeSchedPtr).CurrentValue = 1.0; // set constant fan operating mode - SimulateVRF(state, VRFTU(VRFTUNum).Name, - FirstHVACIteration, - CurZoneNum, - ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), - HeatingActive, - CoolingActive, - OAUnitNum, - OAUCoilOutTemp, - ZoneEquipment, - SysOutputProvided, - LatOutputProvided); + SimulateVRF(state, + VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); EXPECT_EQ(SysOutputProvided, 0.0); // for this system with 0 no load flow rate output should be = 0 when fan heat at very low TU PLR (1E-20) is greater than load EXPECT_EQ(VRF(VRFCond).VRFCondPLR, 0.0); // system should be off @@ -4061,33 +4062,35 @@ TEST_F(EnergyPlusFixture, VRFTest_SysCurve) ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToCoolSP = 900.0; ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToHeatSP = 800.0; Schedule(VRFTU(VRFTUNum).FanOpModeSchedPtr).CurrentValue = 1.0; // set constant fan operating mode - SimulateVRF(state, VRFTU(VRFTUNum).Name, - FirstHVACIteration, - CurZoneNum, - ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), - HeatingActive, - CoolingActive, - OAUnitNum, - OAUCoilOutTemp, - ZoneEquipment, - SysOutputProvided, - LatOutputProvided); + SimulateVRF(state, + VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); EXPECT_NEAR(SysOutputProvided, ZoneSysEnergyDemand(CurZoneNum).RemainingOutputRequired, 5.0); // system should meet the heating load EXPECT_GT(VRF(VRFCond).VRFCondPLR, 0.0); // system should be on Node(VRF(VRFCond).CondenserNodeNum).Temp = 21.0; // outside the heating temperature range (-20 to 20) of VRF outdoor unit Node(VRFTU(VRFTUNum).VRFTUOAMixerOANodeNum).Temp = 21.0; - SimulateVRF(state, VRFTU(VRFTUNum).Name, - FirstHVACIteration, - CurZoneNum, - ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), - HeatingActive, - CoolingActive, - OAUnitNum, - OAUCoilOutTemp, - ZoneEquipment, - SysOutputProvided, - LatOutputProvided); + SimulateVRF(state, + VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); EXPECT_EQ(VRF(VRFCond).VRFCondPLR, 0.0); // system should be off EXPECT_EQ(Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).MassFlowRate, 0.0); // flow should be = 0 at no load flow rate for constant fan mode in this example @@ -4095,17 +4098,18 @@ TEST_F(EnergyPlusFixture, VRFTest_SysCurve) 0.0); // flow should be = 0 at no load flow rate for constant fan mode in this example Schedule(VRFTU(VRFTUNum).FanOpModeSchedPtr).CurrentValue = 0.0; // set cycling fan operating mode - SimulateVRF(state, VRFTU(VRFTUNum).Name, - FirstHVACIteration, - CurZoneNum, - ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), - HeatingActive, - CoolingActive, - OAUnitNum, - OAUCoilOutTemp, - ZoneEquipment, - SysOutputProvided, - LatOutputProvided); + SimulateVRF(state, + VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); EXPECT_EQ(VRF(VRFCond).VRFCondPLR, 0.0); // system should also be off EXPECT_EQ(Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).MassFlowRate, 0.0); // flow should be = 0 for cycling fan mode EXPECT_EQ(Node(VRFTU(VRFTUNum).VRFTUOutletNodeNum).MassFlowRate, 0.0); // flow should be = 0 for cycling fan mode @@ -4703,9 +4707,9 @@ TEST_F(EnergyPlusFixture, VRFTest_SysCurve_GetInputFailers) ZoneSysEnergyDemand.allocate(1); - ProcessScheduleInput(outputFiles()); // read schedules - GetCurveInput(); // read curves - GetZoneData(ErrorsFound); // read zone data + ProcessScheduleInput(outputFiles()); // read schedules + GetCurveInput(); // read curves + GetZoneData(ErrorsFound); // read zone data EXPECT_FALSE(ErrorsFound); GetZoneEquipmentData(state); // read equipment list and connections @@ -4715,7 +4719,6 @@ TEST_F(EnergyPlusFixture, VRFTest_SysCurve_GetInputFailers) EXPECT_EQ(1, VRFTU(VRFTUNum).ZoneNum); EXPECT_EQ(0, VRFTU(VRFTUNum).TUListIndex); EXPECT_EQ(0, VRFTU(VRFTUNum).IndexToTUInTUList); - } TEST_F(EnergyPlusFixture, VRFTest_SysCurve_WaterCooled) @@ -5608,22 +5611,23 @@ TEST_F(EnergyPlusFixture, VRFTest_SysCurve_WaterCooled) Real64 OAUCoilOutTemp = 0.0; bool ZoneEquipment = true; - SimulateVRF(state, VRFTU(VRFTUNum).Name, - FirstHVACIteration, - CurZoneNum, - ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), - HeatingActive, - CoolingActive, - OAUnitNum, - OAUCoilOutTemp, - ZoneEquipment, - SysOutputProvided, - LatOutputProvided); + SimulateVRF(state, + VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); // call plant-side VRF auto vrfCondPtr = HVACVariableRefrigerantFlow::VRFCondenserEquipment::factory(state, VRF(VRFCond).Name); PlantLocation dummyLoc; - dummyLoc.loopNum = dynamic_cast (vrfCondPtr)->SourceLoopNum; + dummyLoc.loopNum = dynamic_cast(vrfCondPtr)->SourceLoopNum; vrfCondPtr->onInitLoopEquip(state, dummyLoc); DataZoneEnergyDemands::ZoneSysEnergyDemand(CurZoneNum).RemainingOutputRequired = -1000.0; // set cooling load @@ -5641,17 +5645,18 @@ TEST_F(EnergyPlusFixture, VRFTest_SysCurve_WaterCooled) DataEnvironment::OutHumRat = 0.017767; // 50% RH DataEnvironment::OutBaroPress = 101325.0; DataEnvironment::OutWetBulbTemp = 26.045; - SimulateVRF(state, VRFTU(VRFTUNum).Name, - FirstHVACIteration, - CurZoneNum, - ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), - HeatingActive, - CoolingActive, - OAUnitNum, - OAUCoilOutTemp, - ZoneEquipment, - SysOutputProvided, - LatOutputProvided); + SimulateVRF(state, + VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); EXPECT_TRUE(VRF(VRFCond).VRFCondPLR > 0.0); EXPECT_NEAR(SysOutputProvided, ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToCoolSP, 1.0); @@ -5685,17 +5690,18 @@ TEST_F(EnergyPlusFixture, VRFTest_SysCurve_WaterCooled) DataEnvironment::OutHumRat = 0.00269; // 50% RH DataEnvironment::OutBaroPress = 101325.0; DataEnvironment::OutWetBulbTemp = 1.34678; - SimulateVRF(state, VRFTU(VRFTUNum).Name, - FirstHVACIteration, - CurZoneNum, - ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), - HeatingActive, - CoolingActive, - OAUnitNum, - OAUCoilOutTemp, - ZoneEquipment, - SysOutputProvided, - LatOutputProvided); + SimulateVRF(state, + VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); EXPECT_TRUE(VRF(VRFCond).VRFCondPLR > 0.0); EXPECT_NEAR(SysOutputProvided, ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToHeatSP, 1.0); @@ -5706,17 +5712,18 @@ TEST_F(EnergyPlusFixture, VRFTest_SysCurve_WaterCooled) Node(VRF(VRFCond).CondenserNodeNum).Temp = 21.0; // outside the heating temperature range (-20 to 20) of VRF outdoor unit Node(VRFTU(VRFTUNum).VRFTUOAMixerOANodeNum).Temp = 21.0; - SimulateVRF(state, VRFTU(VRFTUNum).Name, - FirstHVACIteration, - CurZoneNum, - ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), - HeatingActive, - CoolingActive, - OAUnitNum, - OAUCoilOutTemp, - ZoneEquipment, - SysOutputProvided, - LatOutputProvided); + SimulateVRF(state, + VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); EXPECT_EQ(VRF(VRFCond).VRFCondPLR, 0.0); // system should be off EXPECT_EQ(Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).MassFlowRate, 0.0); // flow should be = 0 for cycling fan mode EXPECT_EQ(Node(VRFTU(VRFTUNum).VRFTUOutletNodeNum).MassFlowRate, 0.0); // flow should be = 0 for cycling fan mode @@ -5725,17 +5732,18 @@ TEST_F(EnergyPlusFixture, VRFTest_SysCurve_WaterCooled) DataHeatBalFanSys::TempControlType(1) = DataHVACGlobals::DualSetPointWithDeadBand; Schedule(VRFTU(VRFTUNum).FanOpModeSchedPtr).CurrentValue = 1.0; // set constant fan operating mode - SimulateVRF(state, VRFTU(VRFTUNum).Name, - FirstHVACIteration, - CurZoneNum, - ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), - HeatingActive, - CoolingActive, - OAUnitNum, - OAUCoilOutTemp, - ZoneEquipment, - SysOutputProvided, - LatOutputProvided); + SimulateVRF(state, + VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); EXPECT_EQ(VRF(VRFCond).VRFCondPLR, 0.0); // system should also be off EXPECT_GT(Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).MassFlowRate, 0.0); // flow should be > 0 at no load flow rate for constant fan mode in this example @@ -6431,22 +6439,21 @@ TEST_F(EnergyPlusFixture, VRFTest_TU_NoLoad_OAMassFlowRateTest) DataZoneEquipment::GetZoneEquipmentData(state); // read equipment list and connections DataAirLoop::AirLoopInputsFilled = true; HVACVariableRefrigerantFlow::MyEnvrnFlag = true; - ZoneInletAirNode = GetVRFTUZoneInletAirNode(state, VRFTUNum); // trigger GetVRFInput by calling a mining function - OutsideAirNode = VRFTU(VRFTUNum).VRFTUOAMixerOANodeNum; // outside air air inlet node num + ZoneInletAirNode = GetVRFTUZoneInletAirNode(state, VRFTUNum); // trigger GetVRFInput by calling a mining function + OutsideAirNode = VRFTU(VRFTUNum).VRFTUOAMixerOANodeNum; // outside air air inlet node num DataZoneEnergyDemands::ZoneSysEnergyDemand.allocate(1); DataZoneEnergyDemands::ZoneSysEnergyDemand(CurZoneNum).RemainingOutputRequired = 0.0; // No load DataZoneEnergyDemands::ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToCoolSP = 0.0; // No load DataZoneEnergyDemands::ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToHeatSP = 0.0; // No load QZnReq = DataZoneEnergyDemands::ZoneSysEnergyDemand(CurZoneNum).RemainingOutputRequired; // No load // Initialize terminal unit - Schedule(VRFTU(VRFTUNum).FanOpModeSchedPtr).CurrentValue = 1.0; // set continuous fan operating mode + Schedule(VRFTU(VRFTUNum).FanOpModeSchedPtr).CurrentValue = 1.0; // set continuous fan operating mode InitVRF(state, VRFTUNum, ZoneNum, FirstHVACIteration, OnOffAirFlowRatio, QZnReq); // Initialize all VRFTU related parameters - ASSERT_EQ(VRFTU(VRFTUNum).OpMode, DataHVACGlobals::ContFanCycCoil); // continuous fan cycling coil operating mode + ASSERT_EQ(VRFTU(VRFTUNum).OpMode, DataHVACGlobals::ContFanCycCoil); // continuous fan cycling coil operating mode // Set average OA flow rate when there in no load for cont. fan cyc. coil operating mode SetAverageAirFlow(VRFTUNum, PartLoadRatio, OnOffAirFlowRatio); AverageOAMassFlow = DataEnvironment::StdRhoAir * VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow; EXPECT_EQ(AverageOAMassFlow, Node(OutsideAirNode).MassFlowRate); - } TEST_F(EnergyPlusFixture, VRFTest_CondenserCalcTest) @@ -10564,7 +10571,7 @@ TEST_F(EnergyPlusFixture, VRFFluidControl_FanSysModel_OnOffModeTest) Real64 Result_AirMassFlowRate = DataLoopNode::Node(HVACFan::fanObjs[0]->outletNodeNum).MassFlowRate; EXPECT_NEAR(Result_AirMassFlowRate, DXCoils::DXCoil(1).RatedAirMassFlowRate(1), 0.000001); Real64 Result_FanPower = HVACFan::fanObjs[0]->fanPower(); - EXPECT_NEAR(Result_FanPower, 39.589, 0.001); + EXPECT_NEAR(Result_FanPower, 39.593, 0.001); // test no load mode fan operation ZoneSysEnergyDemand(1).RemainingOutputRequired = 0.0; @@ -11176,7 +11183,8 @@ TEST_F(EnergyPlusFixture, VRFTU_SysCurve_ReportOutputVerificationTest) Psychrometrics::PsyHFnTdbW(Node(thisVRFTU.VRFTUInletNodeNum).Temp, Node(thisVRFTU.VRFTUInletNodeNum).HumRat); Node(thisVRFTU.ZoneAirNode).Temp = 24.0; Node(thisVRFTU.ZoneAirNode).HumRat = 0.0075; - Node(thisVRFTU.ZoneAirNode).Enthalpy = Psychrometrics::PsyHFnTdbW(Node(thisVRFTU.VRFTUInletNodeNum).Temp, Node(thisVRFTU.VRFTUInletNodeNum).HumRat); + Node(thisVRFTU.ZoneAirNode).Enthalpy = + Psychrometrics::PsyHFnTdbW(Node(thisVRFTU.VRFTUInletNodeNum).Temp, Node(thisVRFTU.VRFTUInletNodeNum).HumRat); DataEnvironment::OutDryBulbTemp = 35.0; DataEnvironment::OutHumRat = 0.0100; @@ -11204,17 +11212,18 @@ TEST_F(EnergyPlusFixture, VRFTU_SysCurve_ReportOutputVerificationTest) Real64 OAUCoilOutTemp = 0.0; bool ZoneEquipment = true; - SimulateVRF(state, VRFTU(VRFTUNum).Name, - FirstHVACIteration, - CurZoneNum, - ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), - HeatingActive, - CoolingActive, - OAUnitNum, - OAUCoilOutTemp, - ZoneEquipment, - SysOutputProvided, - LatOutputProvided); + SimulateVRF(state, + VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); // check model inputs ASSERT_EQ(1, NumVRFCond); @@ -11228,9 +11237,9 @@ TEST_F(EnergyPlusFixture, VRFTU_SysCurve_ReportOutputVerificationTest) EXPECT_EQ(0.0, thisVRFTU.CoolOutAirMassFlow); EXPECT_EQ(0.0, thisVRFTU.HeatOutAirMassFlow); EXPECT_EQ(0.0, thisVRFTU.NoCoolHeatOutAirMassFlow); - EXPECT_NEAR(5367.4015, thisDXCoolingCoil.TotalCoolingEnergyRate, 0.0001); - EXPECT_NEAR(4999.3782, thisVRFTU.TotalCoolingRate, 0.0001); - EXPECT_NEAR(368.0233, thisFan.FanPower, 0.0001); + EXPECT_NEAR(5367.7224, thisDXCoolingCoil.TotalCoolingEnergyRate, 0.0001); + EXPECT_NEAR(4999.6842, thisVRFTU.TotalCoolingRate, 0.0001); + EXPECT_NEAR(368.0382, thisFan.FanPower, 0.0001); EXPECT_NEAR(thisDXCoolingCoil.TotalCoolingEnergyRate, (thisVRFTU.TotalCoolingRate + thisFan.FanPower), 0.0001); } @@ -12906,7 +12915,8 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_ReportOutputVerificationTest) Psychrometrics::PsyHFnTdbW(Node(thisVRFTU.VRFTUInletNodeNum).Temp, Node(thisVRFTU.VRFTUInletNodeNum).HumRat); Node(thisVRFTU.ZoneAirNode).Temp = 24.0; Node(thisVRFTU.ZoneAirNode).HumRat = 0.0075; - Node(thisVRFTU.ZoneAirNode).Enthalpy = Psychrometrics::PsyHFnTdbW(Node(thisVRFTU.VRFTUInletNodeNum).Temp, Node(thisVRFTU.VRFTUInletNodeNum).HumRat); + Node(thisVRFTU.ZoneAirNode).Enthalpy = + Psychrometrics::PsyHFnTdbW(Node(thisVRFTU.VRFTUInletNodeNum).Temp, Node(thisVRFTU.VRFTUInletNodeNum).HumRat); DataEnvironment::OutDryBulbTemp = 35.0; DataEnvironment::OutHumRat = 0.0100; @@ -12935,17 +12945,18 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_ReportOutputVerificationTest) Real64 OAUCoilOutTemp = 0.0; bool ZoneEquipment = true; - SimulateVRF(state, VRFTU(VRFTUNum).Name, - FirstHVACIteration, - CurZoneNum, - ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), - HeatingActive, - CoolingActive, - OAUnitNum, - OAUCoilOutTemp, - ZoneEquipment, - SysOutputProvided, - LatOutputProvided); + SimulateVRF(state, + VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); // check model inputs ASSERT_EQ(1, NumVRFCond); @@ -12959,9 +12970,9 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_ReportOutputVerificationTest) EXPECT_EQ(0.0, thisVRFTU.CoolOutAirMassFlow); EXPECT_EQ(0.0, thisVRFTU.HeatOutAirMassFlow); EXPECT_EQ(0.0, thisVRFTU.NoCoolHeatOutAirMassFlow); - EXPECT_NEAR(5125.0531, thisDXCoolingCoil.TotalCoolingEnergyRate, 0.0001); + EXPECT_NEAR(5125.0840, thisDXCoolingCoil.TotalCoolingEnergyRate, 0.0001); EXPECT_NEAR(4999.8265, thisVRFTU.TotalCoolingRate, 0.0001); - EXPECT_NEAR(125.2266, thisFan.FanPower, 0.0001); + EXPECT_NEAR(125.2573, thisFan.FanPower, 0.0001); EXPECT_NEAR(thisDXCoolingCoil.TotalCoolingEnergyRate, (thisVRFTU.TotalCoolingRate + thisFan.FanPower), 0.0001); } @@ -13029,8 +13040,6 @@ TEST_F(EnergyPlusFixture, VRFTest_CondenserCalcTest_HREIRFTHeat) " Dimensionless; !- Output Unit Type", }); - - ASSERT_TRUE(process_idf(idf_objects)); CurveManager::GetCurveInput(); @@ -13117,7 +13126,7 @@ TEST_F(EnergyPlusFixture, VRFTest_CondenserCalcTest_HREIRFTHeat) // increment time step DataGlobals::CurrentTime += DataGlobals::TimeStepZone; // 0.5 - // set TU's to request both cooling and heating + // set TU's to request both cooling and heating CoolingLoad(VRFCond) = false; HeatingLoad(VRFCond) = true; LastModeCooling(VRFCond) = false; @@ -13197,7 +13206,6 @@ TEST_F(EnergyPlusFixture, VRFTest_CondenserCalcTest_HREIRFTHeat) EXPECT_EQ(VRF(VRFCond).ElecHeatingPower, VRF(VRFCond).RatedHeatingPower * VRF(VRFCond).VRFCondPLR * HREIRAdjustment); } - TEST_F(EnergyPlusFixture, VRF_BlowthroughFanPlacement_InputTest) { std::string const idf_objects = delimited_string({ @@ -13614,7 +13622,7 @@ TEST_F(EnergyPlusFixture, VRF_BlowthroughFanPlacement_InputTest) " For: AllDays, !- Field 2", " Until: 24:00,1.0; !- Field 3", - }); + }); ASSERT_TRUE(process_idf(idf_objects)); @@ -13654,571 +13662,571 @@ TEST_F(EnergyPlusFixture, VRF_MinPLR_and_EIRfPLRCruveMinPLRInputsTest) std::string const idf_objects = delimited_string({ " Zone,", - " ZONE1-1, !- Name", - " 0, !- Direction of Relative North {deg}", - " 0, !- X Origin {m}", - " 0, !- Y Origin {m}", - " 0, !- Z Origin {m}", - " 1, !- Type", - " 1, !- Multiplier", - " 2.438400269, !- Ceiling Height {m}", - " 239.247360229; !- Volume {m3}", - - " ZoneTerminalUnitList,", - " VRF TU List, !- Zone Terminal Unit List Name", - " TU1; !- Zone Terminal Unit Name 5", - - " AirConditioner:VariableRefrigerantFlow,", - " VRF Heat Pump, !- Heat Pump Name", - " , !- Availability Schedule Name", - " autosize, !- Gross Rated Total Cooling Capacity {W}", - " 3.2917, !- Gross Rated Cooling COP {W/W}", - " -5, !- Minimum Outdoor Temperature in Cooling Mode {C}", - " 43, !- Maximum Outdoor Temperature in Cooling Mode {C}", - " VRFCoolCapFT, !- Cooling Capacity Ratio Modifier Function of Low Temperature Curve Name", - " VRFCoolCapFTBoundary, !- Cooling Capacity Ratio Boundary Curve Name", - " VRFCoolCapFTHi, !- Cooling Capacity Ratio Modifier Function of High Temperature Curve Name", - " VRFCoolEIRFT, !- Cooling Energy Input Ratio Modifier Function of Low Temperature Curve Name", - " VRFCoolEIRFTBoundary, !- Cooling Energy Input Ratio Boundary Curve Name", - " VRFCoolEIRFTHi, !- Cooling Energy Input Ratio Modifier Function of High Temperature Curve Name", - " CoolingEIRLowPLR, !- Cooling Energy Input Ratio Modifier Function of Low Part-Load Ratio Curve Name", - " CoolingEIRHiPLR, !- Cooling Energy Input Ratio Modifier Function of High Part-Load Ratio Curve Name", - " CoolingCombRatio, !- Cooling Combination Ratio Correction Factor Curve Name", - " VRFCPLFFPLR, !- Cooling Part-Load Fraction Correlation Curve Name", - " autosize, !- Gross Rated Heating Capacity {W}", - " , !- Rated Heating Capacity Sizing Ratio {W/W}", - " 3.5484, !- Gross Rated Heating COP {W/W}", - " -20, !- Minimum Outdoor Temperature in Heating Mode {C}", - " 20, !- Maximum Outdoor Temperature in Heating Mode {C}", - " VRFHeatCapFT, !- Heating Capacity Ratio Modifier Function of Low Temperature Curve Name", - " VRFHeatCapFTBoundary, !- Heating Capacity Ratio Boundary Curve Name", - " VRFHeatCapFTHi, !- Heating Capacity Ratio Modifier Function of High Temperature Curve Name", - " VRFHeatEIRFT, !- Heating Energy Input Ratio Modifier Function of Low Temperature Curve Name", - " VRFHeatEIRFTBoundary, !- Heating Energy Input Ratio Boundary Curve Name", - " VRFHeatEIRFTHi, !- Heating Energy Input Ratio Modifier Function of High Temperature Curve Name", - " WetBulbTemperature, !- Heating Performance Curve Outdoor Temperature Type", - " HeatingEIRLowPLR, !- Heating Energy Input Ratio Modifier Function of Low Part-Load Ratio Curve Name", - " HeatingEIRHiPLR, !- Heating Energy Input Ratio Modifier Function of High Part-Load Ratio Curve Name", - " HeatingCombRatio, !- Heating Combination Ratio Correction Factor Curve Name", - " VRFCPLFFPLR, !- Heating Part-Load Fraction Correlation Curve Name", - " 0.15, !- Minimum Heat Pump Part-Load Ratio {dimensionless}", - " ZONE1-1, !- Zone Name for Master Thermostat Location", - " LoadPriority, !- Master Thermostat Priority Control Type", - " , !- Thermostat Priority Schedule Name", - " VRF TU List, !- Zone Terminal Unit List Name", - " No, !- Heat Pump Waste Heat Recovery", - " 30, !- Equivalent Piping Length used for Piping Correction Factor in Cooling Mode {m}", - " 10, !- Vertical Height used for Piping Correction Factor {m}", - " CoolingLengthCorrectionFactor, !- Piping Correction Factor for Length in Cooling Mode Curve Name", - " -0.000386, !- Piping Correction Factor for Height in Cooling Mode Coefficient {1/m}", - " 30, !- Equivalent Piping Length used for Piping Correction Factor in Heating Mode {m}", - " , !- Piping Correction Factor for Length in Heating Mode Curve Name", - " , !- Piping Correction Factor for Height in Heating Mode Coefficient {1/m}", - " 15, !- Crankcase Heater Power per Compressor {W}", - " 3, !- Number of Compressors {dimensionless}", - " 0.33, !- Ratio of Compressor Size to Total Compressor Capacity {W/W}", - " 7, !- Maximum Outdoor Dry-Bulb Temperature for Crankcase Heater {C}", - " Resistive, !- Defrost Strategy", - " Timed, !- Defrost Control", - " , !- Defrost Energy Input Ratio Modifier Function of Temperature Curve Name", - " , !- Defrost Time Period Fraction {dimensionless}", - " autosize, !- Resistive Defrost Heater Capacity {W}", - " 7, !- Maximum Outdoor Dry-bulb Temperature for Defrost Operation {C}", - " AirCooled, !- Condenser Type", - " MyVRFOANode, !- Condenser Inlet Node Name", - " , !- Condenser Outlet Node Name", - " , !- Water Condenser Volume Flow Rate {m3/s}", - " , !- Evaporative Condenser Effectiveness {dimensionless}", - " , !- Evaporative Condenser Air Flow Rate {m3/s}", - " 0, !- Evaporative Condenser Pump Rated Power Consumption {W}", - " , !- Supply Water Storage Tank Name", - " 0, !- Basin Heater Capacity {W/K}", - " , !- Basin Heater Setpoint Temperature {C}", - " , !- Basin Heater Operating Schedule Name", - " Electricity; !- Fuel Type", - - " OutdoorAir:NodeList,", - " OutsideAirInletNodes; !- Node or NodeList Name 1", - - " NodeList,", - " OutsideAirInletNodes, !- Name", - " Outside Air Inlet Node 1,!- Node 1 Name", - " MyVRFOANode; !- Node 2 Name", - - " Curve:Biquadratic,", - " VRFCoolCapFT, !- Name", - " 0.576882692, !- Coefficient1 Constant", - " 0.017447952, !- Coefficient2 x", - " 0.000583269, !- Coefficient3 x**2", - " -1.76324E-06, !- Coefficient4 y", - " -7.474E-09, !- Coefficient5 y**2", - " -1.30413E-07, !- Coefficient6 x*y", - " 15, !- Minimum Value of x", - " 24, !- Maximum Value of x", - " -5, !- Minimum Value of y", - " 23, !- Maximum Value of y", - " , !- Minimum Curve Output", - " , !- Maximum Curve Output", - " Temperature, !- Input Unit Type for X", - " Temperature, !- Input Unit Type for Y", - " Dimensionless; !- Output Unit Type", - - " Curve:Biquadratic,", - " VRFCoolCapFTHi, !- Name", - " 0.6867358, !- Coefficient1 Constant", - " 0.0207631, !- Coefficient2 x", - " 0.0005447, !- Coefficient3 x**2", - " -0.0016218, !- Coefficient4 y", - " -4.259E-07, !- Coefficient5 y**2", - " -0.0003392, !- Coefficient6 x*y", - " 15, !- Minimum Value of x", - " 24, !- Maximum Value of x", - " 16, !- Minimum Value of y", - " 43, !- Maximum Value of y", - " , !- Minimum Curve Output", - " , !- Maximum Curve Output", - " Temperature, !- Input Unit Type for X", - " Temperature, !- Input Unit Type for Y", - " Dimensionless; !- Output Unit Type", - - " Curve:Biquadratic,", - " VRFCoolEIRFT, !- Name", - " 0.989010541, !- Coefficient1 Constant", - " -0.02347967, !- Coefficient2 x", - " 0.000199711, !- Coefficient3 x**2", - " 0.005968336, !- Coefficient4 y", - " -1.0289E-07, !- Coefficient5 y**2", - " -0.00015686, !- Coefficient6 x*y", - " 15, !- Minimum Value of x", - " 24, !- Maximum Value of x", - " -5, !- Minimum Value of y", - " 23, !- Maximum Value of y", - " , !- Minimum Curve Output", - " , !- Maximum Curve Output", - " Temperature, !- Input Unit Type for X", - " Temperature, !- Input Unit Type for Y", - " Dimensionless; !- Output Unit Type", - - " Curve:Biquadratic,", - " VRFCoolEIRFTHi, !- Name", - " 0.14351470, !- Coefficient1 Constant", - " 0.01860035, !- Coefficient2 x", - " -0.0003954, !- Coefficient3 x**2", - " 0.02485219, !- Coefficient4 y", - " 0.00016329, !- Coefficient5 y**2", - " -0.0006244, !- Coefficient6 x*y", - " 15, !- Minimum Value of x", - " 24, !- Maximum Value of x", - " 16, !- Minimum Value of y", - " 43, !- Maximum Value of y", - " , !- Minimum Curve Output", - " , !- Maximum Curve Output", - " Temperature, !- Input Unit Type for X", - " Temperature, !- Input Unit Type for Y", - " Dimensionless; !- Output Unit Type", - - " Curve:Biquadratic,", - " VRFHeatCapFT, !- Name", - " 1.014599599, !- Coefficient1 Constant", - " -0.002506703, !- Coefficient2 x", - " -0.000141599, !- Coefficient3 x**2", - " 0.026931595, !- Coefficient4 y", - " 1.83538E-06, !- Coefficient5 y**2", - " -0.000358147, !- Coefficient6 x*y", - " 15, !- Minimum Value of x", - " 27, !- Maximum Value of x", - " -20, !- Minimum Value of y", - " 15, !- Maximum Value of y", - " , !- Minimum Curve Output", - " , !- Maximum Curve Output", - " Temperature, !- Input Unit Type for X", - " Temperature, !- Input Unit Type for Y", - " Dimensionless; !- Output Unit Type", - - " Curve:Biquadratic,", - " VRFHeatCapFTHi, !- Name", - " 1.161134821, !- Coefficient1 Constant", - " 0.027478868, !- Coefficient2 x", - " -0.00168795, !- Coefficient3 x**2", - " 0.001783378, !- Coefficient4 y", - " 2.03208E-06, !- Coefficient5 y**2", - " -6.8969E-05, !- Coefficient6 x*y", - " 15, !- Minimum Value of x", - " 27, !- Maximum Value of x", - " -10, !- Minimum Value of y", - " 15, !- Maximum Value of y", - " , !- Minimum Curve Output", - " , !- Maximum Curve Output", - " Temperature, !- Input Unit Type for X", - " Temperature, !- Input Unit Type for Y", - " Dimensionless; !- Output Unit Type", - - " Curve:Biquadratic,", - " VRFHeatEIRFT, !- Name", - " 0.87465501, !- Coefficient1 Constant", - " -0.01319754, !- Coefficient2 x", - " 0.00110307, !- Coefficient3 x**2", - " -0.0133118, !- Coefficient4 y", - " 0.00089017, !- Coefficient5 y**2", - " -0.00012766, !- Coefficient6 x*y", - " 15, !- Minimum Value of x", - " 27, !- Maximum Value of x", - " -20, !- Minimum Value of y", - " 12, !- Maximum Value of y", - " , !- Minimum Curve Output", - " , !- Maximum Curve Output", - " Temperature, !- Input Unit Type for X", - " Temperature, !- Input Unit Type for Y", - " Dimensionless; !- Output Unit Type", - - " Curve:Biquadratic,", - " VRFHeatEIRFTHi, !- Name", - " 2.504005146, !- Coefficient1 Constant", - " -0.05736767, !- Coefficient2 x", - " 4.07336E-05, !- Coefficient3 x**2", - " -0.12959669, !- Coefficient4 y", - " 0.00135839, !- Coefficient5 y**2", - " 0.00317047, !- Coefficient6 x*y", - " 15, !- Minimum Value of x", - " 27, !- Maximum Value of x", - " -10, !- Minimum Value of y", - " 15, !- Maximum Value of y", - " , !- Minimum Curve Output", - " , !- Maximum Curve Output", - " Temperature, !- Input Unit Type for X", - " Temperature, !- Input Unit Type for Y", - " Dimensionless; !- Output Unit Type", - - " Curve:Biquadratic,", - " CoolingLengthCorrectionFactor, !- Name", - " 1.0693794, !- Coefficient1 Constant", - " -0.0014951, !- Coefficient2 x", - " 2.56E-06, !- Coefficient3 x**2", - " -0.1151104, !- Coefficient4 y", - " 0.0511169, !- Coefficient5 y**2", - " -0.0004369, !- Coefficient6 x*y", - " 8, !- Minimum Value of x", - " 175, !- Maximum Value of x", - " 0.5, !- Minimum Value of y", - " 1.5, !- Maximum Value of y", - " , !- Minimum Curve Output", - " , !- Maximum Curve Output", - " Temperature, !- Input Unit Type for X", - " Temperature, !- Input Unit Type for Y", - " Dimensionless; !- Output Unit Type", - - " Curve:Quadratic,", - " VRFCPLFFPLR, !- Name", - " 0.85, !- Coefficient1 Constant", - " 0.15, !- Coefficient2 x", - " 0.0, !- Coefficient3 x**2", - " 0.0, !- Minimum Value of x", - " 1.0, !- Maximum Value of x", - " 0.85, !- Minimum Curve Output", - " 1.0, !- Maximum Curve Output", - " Dimensionless, !- Input Unit Type for X", - " Dimensionless; !- Output Unit Type", - - " Curve:Linear,", - " CoolingCombRatio, !- Name", - " 0.618055, !- Coefficient1 Constant", - " 0.381945, !- Coefficient2 x", - " 1.0, !- Minimum Value of x", - " 1.5, !- Maximum Value of x", - " 1.0, !- Minimum Curve Output", - " 1.2, !- Maximum Curve Output", - " Dimensionless, !- Input Unit Type for X", - " Dimensionless; !- Output Unit Type", - - " Curve:Linear,", - " HeatingCombRatio, !- Name", - " 0.96034, !- Coefficient1 Constant", - " 0.03966, !- Coefficient2 x", - " 1.0, !- Minimum Value of x", - " 1.5, !- Maximum Value of x", - " 1.0, !- Minimum Curve Output", - " 1.023, !- Maximum Curve Output", - " Dimensionless, !- Input Unit Type for X", - " Dimensionless; !- Output Unit Type", - - " Curve:Quadratic,", - " CoolingEIRHiPLR, !- Name", - " 1.0, !- Coefficient1 Constant", - " 0.0, !- Coefficient2 x", - " 0.0, !- Coefficient3 x**2", - " 1.0, !- Minimum Value of x", - " 1.5, !- Maximum Value of x", - " , !- Minimum Curve Output", - " , !- Maximum Curve Output", - " Dimensionless, !- Input Unit Type for X", - " Dimensionless; !- Output Unit Type", - - " Curve:Quadratic,", - " HeatingEIRHiPLR, !- Name", - " 2.4294355, !- Coefficient1 Constant", - " -2.235887, !- Coefficient2 x", - " 0.8064516, !- Coefficient3 x**2", - " 1.0, !- Minimum Value of x", - " 1.5, !- Maximum Value of x", - " , !- Minimum Curve Output", - " , !- Maximum Curve Output", - " Dimensionless, !- Input Unit Type for X", - " Dimensionless; !- Output Unit Type", - - " Curve:Quadratic,", - " VarSpeedCyclingPLFFPLR, !- Name", - " 0.85, !- Coefficient1 Constant", - " 0.15, !- Coefficient2 x", - " 0.0, !- Coefficient3 x**2", - " 0.0, !- Minimum Value of x", - " 1.0; !- Maximum Value of x", - - " Curve:Cubic,", - " VRFCoolCapFTBoundary, !- Name", - " 25.73473775, !- Coefficient1 Constant", - " -0.03150043, !- Coefficient2 x", - " -0.01416595, !- Coefficient3 x**2", - " 0, !- Coefficient4 x**3", - " 11, !- Minimum Value of x", - " 30, !- Maximum Value of x", - " , !- Minimum Curve Output", - " , !- Maximum Curve Output", - " Temperature, !- Input Unit Type for X", - " Temperature; !- Output Unit Type", - - " Curve:Cubic,", - " VRFCoolEIRFTBoundary, !- Name", - " 25.73473775, !- Coefficient1 Constant", - " -0.03150043, !- Coefficient2 x", - " -0.01416595, !- Coefficient3 x**2", - " 0, !- Coefficient4 x**3", - " 15, !- Minimum Value of x", - " 24, !- Maximum Value of x", - " , !- Minimum Curve Output", - " , !- Maximum Curve Output", - " Temperature, !- Input Unit Type for X", - " Temperature; !- Output Unit Type", - - " Curve:Cubic,", - " CoolingEIRLowPLR, !- Name", - " 0.4628123, !- Coefficient1 Constant", - " -1.0402406, !- Coefficient2 x", - " 2.17490997, !- Coefficient3 x**2", - " -0.5974817, !- Coefficient4 x**3", - " 0.25, !- Minimum Value of x", - " 1, !- Maximum Value of x", - " , !- Minimum Curve Output", - " , !- Maximum Curve Output", - " Temperature, !- Input Unit Type for X", - " Temperature; !- Output Unit Type", - - " Curve:Cubic,", - " VRFHeatCapFTBoundary, !- Name", - " -7.6000882, !- Coefficient1 Constant", - " 3.05090016, !- Coefficient2 x", - " -0.1162844, !- Coefficient3 x**2", - " 0.0, !- Coefficient4 x**3", - " 15, !- Minimum Value of x", - " 27, !- Maximum Value of x", - " , !- Minimum Curve Output", - " , !- Maximum Curve Output", - " Temperature, !- Input Unit Type for X", - " Temperature; !- Output Unit Type", - - " Curve:Cubic,", - " VRFHeatEIRFTBoundary, !- Name", - " -7.6000882, !- Coefficient1 Constant", - " 3.05090016, !- Coefficient2 x", - " -0.1162844, !- Coefficient3 x**2", - " 0.0, !- Coefficient4 x**3", - " 15, !- Minimum Value of x", - " 27, !- Maximum Value of x", - " -20, !- Minimum Curve Output", - " 15, !- Maximum Curve Output", - " Temperature, !- Input Unit Type for X", - " Temperature; !- Output Unit Type", - - " Curve:Cubic,", - " HeatingEIRLowPLR, !- Name", - " 0.1400093, !- Coefficient1 Constant", - " 0.6415002, !- Coefficient2 x", - " 0.1339047, !- Coefficient3 x**2", - " 0.0845859, !- Coefficient4 x**3", - " 0.25, !- Minimum Value of x", - " 1, !- Maximum Value of x", - " , !- Minimum Curve Output", - " , !- Maximum Curve Output", - " Dimensionless, !- Input Unit Type for X", - " Dimensionless; !- Output Unit Type", - - " ZoneHVAC:TerminalUnit:VariableRefrigerantFlow,", - " TU1, !- Zone Terminal Unit Name", - " VRFAvailSched, !- Terminal Unit Availability Schedule", - " TU1 Inlet Node, !- Terminal Unit Air Inlet Node Name", - " TU1 Outlet Node, !- Terminal Unit Air Outlet Node Name", - " autosize, !- Cooling Supply Air Flow Rate {m3/s}", - " autosize, !- No Cooling Supply Air Flow Rate {m3/s}", - " autosize, !- Heating Supply Air Flow Rate {m3/s}", - " autosize, !- No Heating Supply Air Flow Rate {m3/s}", - " autosize, !- Cooling Outdoor Air Flow Rate {m3/s}", - " autosize, !- Heating Outdoor Air Flow Rate {m3/s}", - " autosize, !- No Load Outdoor Air Flow Rate {m3/s}", - " VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name", - " BlowThrough, !- Supply Air Fan Placement", - " Fan:SystemModel, !- Supply Air Fan Object Type", - " TU1 VRF Supply Fan, !- Supply Air Fan Object Name", - " OutdoorAir:Mixer, !- Outside Air Mixer Object Type", - " TU1 OA Mixer, !- Outside Air Mixer Object Name", - " COIL:Cooling:DX:VariableRefrigerantFlow, !- Cooling Coil Object Type", - " TU1 VRF DX Cooling Coil, !- Cooling Coil Object Name", - " COIL:Heating:DX:VariableRefrigerantFlow, !- Heating Coil Object Type", - " TU1 VRF DX Heating Coil, !- Heating Coil Object Name", - " 30, !- Zone Terminal Unit On Parasitic Electric Energy Use {W}", - " 20, !- Zone Terminal Unit Off Parasitic Electric Energy Use {W}", - " , !- Rated Heating Capacity Sizing Ratio {W/W}", - " , !- Availability Manager List Name", - " , !- Design Specification ZoneHVAC Sizing Object Name", - " , !- Supplemental Heating Coil Object Type", - " , !- Supplemental Heating Coil Name", - " ; !- Maximum Supply Air Temperature from Supplemental Heater {C}", - - " ZoneHVAC:EquipmentList,", - " ZONE1-1 Eq, !- Name", - " SequentialLoad, !- Load Distribution Scheme", - " ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, !- Zone Equipment 1 Object Type", - " TU1, !- Zone Equipment 1 Name", - " 1, !- Zone Equipment 1 Cooling Sequence", - " 1, !- Zone Equipment 1 Heating or No-Load Sequence", - " , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name", - " ; !- Zone Equipment 1 Sequential Heating Fraction Schedule Name", - - " ZoneHVAC:EquipmentConnections,", - " ZONE1-1, !- Zone Name", - " ZONE1-1 Eq, !- Zone Conditioning Equipment List Name", - " ZONE1-1 In Nodes, !- Zone Air Inlet Node or NodeList Name", - " ZONE1-1 Out Nodes, !- Zone Air Exhaust Node or NodeList Name", - " ZONE1-1 Node, !- Zone Air Node Name", - " ZONE1-1 Out Node; !- Zone Return Air Node or NodeList Name", - - " NodeList,", - " ZONE1-1 In Nodes, !- Name", - " TU1 Outlet Node; !- Node 1 Name", - - " NodeList,", - " ZONE1-1 Out Nodes, !- Name", - " TU1 Inlet Node; !- Node 1 Name", - - " Fan:SystemModel,", - " TU1 VRF Supply Fan, !- Name", - " VRFAvailSched, !- Availability Schedule Name", - " TU1 OAMixer Outlet Node, !- Air Inlet Node Name", - " TU1 VRF Fan Outlet Node, !- Air Outlet Node Name", - " AUTOSIZE, !- Design Maximum Air Flow Rate {m3/s}", - " Discrete, !- Speed Control Method", - " 0.0, !- Electric Power Minimum Flow Rate Fraction", - " 600.0, !- Design Pressure Rise {Pa}", - " 0.9, !- Motor Efficiency", - " 1.0, !- Motor In Air Stream Fraction", - " AUTOSIZE, !- Design Electric Power Consumption {W}", - " TotalEfficiencyAndPressure, !- Design Power Sizing Method", - " , !- Electric Power Per Unit Flow Rate {W/(m3/s)}", - " , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)}", - " 0.70; !- Fan Total Efficiency", - - " Coil:Cooling:DX:VariableRefrigerantFlow,", - " TU1 VRF DX Cooling Coil, !- Name", - " VRFAvailSched, !- Availability Schedule Name", - " autosize, !- Gross Rated Total Cooling Capacity {W}", - " autosize, !- Gross Rated Sensible Heat Ratio", - " autosize, !- Rated Air Flow Rate {m3/s}", - " VRFTUCoolCapFT, !- Cooling Capacity Ratio Modifier Function of Temperature Curve Name", - " VRFACCoolCapFFF, !- Cooling Capacity Modifier Curve Function of Flow Fraction Name", - " TU1 VRF Fan Outlet Node, !- Coil Air Inlet Node", - " TU1 VRF DX CCoil Outlet Node; !- Coil Air Outlet Node", - - " Coil:Heating:DX:VariableRefrigerantFlow,", - " TU1 VRF DX Heating Coil, !- Name", - " VRFAvailSched, !- Availability Schedule", - " autosize, !- Gross Rated Heating Capacity {W}", - " autosize, !- Rated Air Flow Rate {m3/s}", - " TU1 VRF DX CCoil Outlet Node, !- Coil Air Inlet Node", - " TU1 Outlet Node, !- Coil Air Outlet Node", - " VRFTUHeatCapFT, !- Heating Capacity Ratio Modifier Function of Temperature Curve Name", - " VRFACCoolCapFFF; !- Heating Capacity Modifier Function of Flow Fraction Curve Name", - - " Curve:Cubic,", - " VRFTUCoolCapFT, !- Name", - " 0.504547273506488, !- Coefficient1 Constant", - " 0.0288891279198444, !- Coefficient2 x", - " -0.000010819418650677, !- Coefficient3 x**2", - " 0.0000101359395177008, !- Coefficient4 x**3", - " 0.0, !- Minimum Value of x", - " 50.0, !- Maximum Value of x", - " 0.5, !- Minimum Curve Output", - " 1.5, !- Maximum Curve Output", - " Temperature, !- Input Unit Type for X", - " Dimensionless; !- Output Unit Type", - - " Curve:Cubic,", - " VRFTUHeatCapFT, !- Name", - " -0.390708928227928, !- Coefficient1 Constant", - " 0.261815023760162, !- Coefficient2 x", - " -0.0130431603151873, !- Coefficient3 x**2", - " 0.000178131745997821, !- Coefficient4 x**3", - " 0.0, !- Minimum Value of x", - " 50.0, !- Maximum Value of x", - " 0.5, !- Minimum Curve Output", - " 1.5, !- Maximum Curve Output", - " Temperature, !- Input Unit Type for X", - " Dimensionless; !- Output Unit Type", - - " Curve:Quadratic,", - " VRFACCoolCapFFF, !- Name", - " 0.8, !- Coefficient1 Constant", - " 0.2, !- Coefficient2 x", - " 0.0, !- Coefficient3 x**2", - " 0.5, !- Minimum Value of x", - " 1.5; !- Maximum Value of x", - - " OutdoorAir:Mixer,", - " TU1 OA Mixer, !- Name", - " TU1 OAMixer Outlet Node, !- Mixed Air Node Name", - " Outside Air Inlet Node 1,!- Outdoor Air Stream Node Name", - " Relief Air Outlet Node 1,!- Relief Air Stream Node Name", - " TU1 Inlet Node; !- Return Air Stream Node Name", - - " Schedule:Compact,", - " VRFFanSchedule, !- Name", - " Any Number, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,1.0; !- Field 3", - - " Schedule:Compact,", - " VRFAvailSched, !- Name", - " Fraction, !- Schedule Type Limits Name", - " Through: 12/31, !- Field 1", - " For: AllDays, !- Field 2", - " Until: 24:00,1.0; !- Field 3", + " ZONE1-1, !- Name", + " 0, !- Direction of Relative North {deg}", + " 0, !- X Origin {m}", + " 0, !- Y Origin {m}", + " 0, !- Z Origin {m}", + " 1, !- Type", + " 1, !- Multiplier", + " 2.438400269, !- Ceiling Height {m}", + " 239.247360229; !- Volume {m3}", - }); + " ZoneTerminalUnitList,", + " VRF TU List, !- Zone Terminal Unit List Name", + " TU1; !- Zone Terminal Unit Name 5", - ASSERT_TRUE(process_idf(idf_objects)); + " AirConditioner:VariableRefrigerantFlow,", + " VRF Heat Pump, !- Heat Pump Name", + " , !- Availability Schedule Name", + " autosize, !- Gross Rated Total Cooling Capacity {W}", + " 3.2917, !- Gross Rated Cooling COP {W/W}", + " -5, !- Minimum Outdoor Temperature in Cooling Mode {C}", + " 43, !- Maximum Outdoor Temperature in Cooling Mode {C}", + " VRFCoolCapFT, !- Cooling Capacity Ratio Modifier Function of Low Temperature Curve Name", + " VRFCoolCapFTBoundary, !- Cooling Capacity Ratio Boundary Curve Name", + " VRFCoolCapFTHi, !- Cooling Capacity Ratio Modifier Function of High Temperature Curve Name", + " VRFCoolEIRFT, !- Cooling Energy Input Ratio Modifier Function of Low Temperature Curve Name", + " VRFCoolEIRFTBoundary, !- Cooling Energy Input Ratio Boundary Curve Name", + " VRFCoolEIRFTHi, !- Cooling Energy Input Ratio Modifier Function of High Temperature Curve Name", + " CoolingEIRLowPLR, !- Cooling Energy Input Ratio Modifier Function of Low Part-Load Ratio Curve Name", + " CoolingEIRHiPLR, !- Cooling Energy Input Ratio Modifier Function of High Part-Load Ratio Curve Name", + " CoolingCombRatio, !- Cooling Combination Ratio Correction Factor Curve Name", + " VRFCPLFFPLR, !- Cooling Part-Load Fraction Correlation Curve Name", + " autosize, !- Gross Rated Heating Capacity {W}", + " , !- Rated Heating Capacity Sizing Ratio {W/W}", + " 3.5484, !- Gross Rated Heating COP {W/W}", + " -20, !- Minimum Outdoor Temperature in Heating Mode {C}", + " 20, !- Maximum Outdoor Temperature in Heating Mode {C}", + " VRFHeatCapFT, !- Heating Capacity Ratio Modifier Function of Low Temperature Curve Name", + " VRFHeatCapFTBoundary, !- Heating Capacity Ratio Boundary Curve Name", + " VRFHeatCapFTHi, !- Heating Capacity Ratio Modifier Function of High Temperature Curve Name", + " VRFHeatEIRFT, !- Heating Energy Input Ratio Modifier Function of Low Temperature Curve Name", + " VRFHeatEIRFTBoundary, !- Heating Energy Input Ratio Boundary Curve Name", + " VRFHeatEIRFTHi, !- Heating Energy Input Ratio Modifier Function of High Temperature Curve Name", + " WetBulbTemperature, !- Heating Performance Curve Outdoor Temperature Type", + " HeatingEIRLowPLR, !- Heating Energy Input Ratio Modifier Function of Low Part-Load Ratio Curve Name", + " HeatingEIRHiPLR, !- Heating Energy Input Ratio Modifier Function of High Part-Load Ratio Curve Name", + " HeatingCombRatio, !- Heating Combination Ratio Correction Factor Curve Name", + " VRFCPLFFPLR, !- Heating Part-Load Fraction Correlation Curve Name", + " 0.15, !- Minimum Heat Pump Part-Load Ratio {dimensionless}", + " ZONE1-1, !- Zone Name for Master Thermostat Location", + " LoadPriority, !- Master Thermostat Priority Control Type", + " , !- Thermostat Priority Schedule Name", + " VRF TU List, !- Zone Terminal Unit List Name", + " No, !- Heat Pump Waste Heat Recovery", + " 30, !- Equivalent Piping Length used for Piping Correction Factor in Cooling Mode {m}", + " 10, !- Vertical Height used for Piping Correction Factor {m}", + " CoolingLengthCorrectionFactor, !- Piping Correction Factor for Length in Cooling Mode Curve Name", + " -0.000386, !- Piping Correction Factor for Height in Cooling Mode Coefficient {1/m}", + " 30, !- Equivalent Piping Length used for Piping Correction Factor in Heating Mode {m}", + " , !- Piping Correction Factor for Length in Heating Mode Curve Name", + " , !- Piping Correction Factor for Height in Heating Mode Coefficient {1/m}", + " 15, !- Crankcase Heater Power per Compressor {W}", + " 3, !- Number of Compressors {dimensionless}", + " 0.33, !- Ratio of Compressor Size to Total Compressor Capacity {W/W}", + " 7, !- Maximum Outdoor Dry-Bulb Temperature for Crankcase Heater {C}", + " Resistive, !- Defrost Strategy", + " Timed, !- Defrost Control", + " , !- Defrost Energy Input Ratio Modifier Function of Temperature Curve Name", + " , !- Defrost Time Period Fraction {dimensionless}", + " autosize, !- Resistive Defrost Heater Capacity {W}", + " 7, !- Maximum Outdoor Dry-bulb Temperature for Defrost Operation {C}", + " AirCooled, !- Condenser Type", + " MyVRFOANode, !- Condenser Inlet Node Name", + " , !- Condenser Outlet Node Name", + " , !- Water Condenser Volume Flow Rate {m3/s}", + " , !- Evaporative Condenser Effectiveness {dimensionless}", + " , !- Evaporative Condenser Air Flow Rate {m3/s}", + " 0, !- Evaporative Condenser Pump Rated Power Consumption {W}", + " , !- Supply Water Storage Tank Name", + " 0, !- Basin Heater Capacity {W/K}", + " , !- Basin Heater Setpoint Temperature {C}", + " , !- Basin Heater Operating Schedule Name", + " Electricity; !- Fuel Type", - Real64 minEIRfLowPLRXInput(0.0); - Real64 maxEIRfLowPLRXInput(0.0); - bool ErrorsFound(false); - ProcessScheduleInput(OutputFiles::getSingleton()); - GetCurveInput(); - GetZoneData(ErrorsFound); - EXPECT_FALSE(ErrorsFound); - // get zone input and connections - GetZoneEquipmentData(state); - GetVRFInputData(state, ErrorsFound); - // expect error due to min PLR value - EXPECT_TRUE(ErrorsFound); - // set pointer to components - auto &thisVRF(VRF(1)); + " OutdoorAir:NodeList,", + " OutsideAirInletNodes; !- Node or NodeList Name 1", + + " NodeList,", + " OutsideAirInletNodes, !- Name", + " Outside Air Inlet Node 1,!- Node 1 Name", + " MyVRFOANode; !- Node 2 Name", + + " Curve:Biquadratic,", + " VRFCoolCapFT, !- Name", + " 0.576882692, !- Coefficient1 Constant", + " 0.017447952, !- Coefficient2 x", + " 0.000583269, !- Coefficient3 x**2", + " -1.76324E-06, !- Coefficient4 y", + " -7.474E-09, !- Coefficient5 y**2", + " -1.30413E-07, !- Coefficient6 x*y", + " 15, !- Minimum Value of x", + " 24, !- Maximum Value of x", + " -5, !- Minimum Value of y", + " 23, !- Maximum Value of y", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " VRFCoolCapFTHi, !- Name", + " 0.6867358, !- Coefficient1 Constant", + " 0.0207631, !- Coefficient2 x", + " 0.0005447, !- Coefficient3 x**2", + " -0.0016218, !- Coefficient4 y", + " -4.259E-07, !- Coefficient5 y**2", + " -0.0003392, !- Coefficient6 x*y", + " 15, !- Minimum Value of x", + " 24, !- Maximum Value of x", + " 16, !- Minimum Value of y", + " 43, !- Maximum Value of y", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " VRFCoolEIRFT, !- Name", + " 0.989010541, !- Coefficient1 Constant", + " -0.02347967, !- Coefficient2 x", + " 0.000199711, !- Coefficient3 x**2", + " 0.005968336, !- Coefficient4 y", + " -1.0289E-07, !- Coefficient5 y**2", + " -0.00015686, !- Coefficient6 x*y", + " 15, !- Minimum Value of x", + " 24, !- Maximum Value of x", + " -5, !- Minimum Value of y", + " 23, !- Maximum Value of y", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " VRFCoolEIRFTHi, !- Name", + " 0.14351470, !- Coefficient1 Constant", + " 0.01860035, !- Coefficient2 x", + " -0.0003954, !- Coefficient3 x**2", + " 0.02485219, !- Coefficient4 y", + " 0.00016329, !- Coefficient5 y**2", + " -0.0006244, !- Coefficient6 x*y", + " 15, !- Minimum Value of x", + " 24, !- Maximum Value of x", + " 16, !- Minimum Value of y", + " 43, !- Maximum Value of y", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " VRFHeatCapFT, !- Name", + " 1.014599599, !- Coefficient1 Constant", + " -0.002506703, !- Coefficient2 x", + " -0.000141599, !- Coefficient3 x**2", + " 0.026931595, !- Coefficient4 y", + " 1.83538E-06, !- Coefficient5 y**2", + " -0.000358147, !- Coefficient6 x*y", + " 15, !- Minimum Value of x", + " 27, !- Maximum Value of x", + " -20, !- Minimum Value of y", + " 15, !- Maximum Value of y", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " VRFHeatCapFTHi, !- Name", + " 1.161134821, !- Coefficient1 Constant", + " 0.027478868, !- Coefficient2 x", + " -0.00168795, !- Coefficient3 x**2", + " 0.001783378, !- Coefficient4 y", + " 2.03208E-06, !- Coefficient5 y**2", + " -6.8969E-05, !- Coefficient6 x*y", + " 15, !- Minimum Value of x", + " 27, !- Maximum Value of x", + " -10, !- Minimum Value of y", + " 15, !- Maximum Value of y", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " VRFHeatEIRFT, !- Name", + " 0.87465501, !- Coefficient1 Constant", + " -0.01319754, !- Coefficient2 x", + " 0.00110307, !- Coefficient3 x**2", + " -0.0133118, !- Coefficient4 y", + " 0.00089017, !- Coefficient5 y**2", + " -0.00012766, !- Coefficient6 x*y", + " 15, !- Minimum Value of x", + " 27, !- Maximum Value of x", + " -20, !- Minimum Value of y", + " 12, !- Maximum Value of y", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " VRFHeatEIRFTHi, !- Name", + " 2.504005146, !- Coefficient1 Constant", + " -0.05736767, !- Coefficient2 x", + " 4.07336E-05, !- Coefficient3 x**2", + " -0.12959669, !- Coefficient4 y", + " 0.00135839, !- Coefficient5 y**2", + " 0.00317047, !- Coefficient6 x*y", + " 15, !- Minimum Value of x", + " 27, !- Maximum Value of x", + " -10, !- Minimum Value of y", + " 15, !- Maximum Value of y", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " CoolingLengthCorrectionFactor, !- Name", + " 1.0693794, !- Coefficient1 Constant", + " -0.0014951, !- Coefficient2 x", + " 2.56E-06, !- Coefficient3 x**2", + " -0.1151104, !- Coefficient4 y", + " 0.0511169, !- Coefficient5 y**2", + " -0.0004369, !- Coefficient6 x*y", + " 8, !- Minimum Value of x", + " 175, !- Maximum Value of x", + " 0.5, !- Minimum Value of y", + " 1.5, !- Maximum Value of y", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " VRFCPLFFPLR, !- Name", + " 0.85, !- Coefficient1 Constant", + " 0.15, !- Coefficient2 x", + " 0.0, !- Coefficient3 x**2", + " 0.0, !- Minimum Value of x", + " 1.0, !- Maximum Value of x", + " 0.85, !- Minimum Curve Output", + " 1.0, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Linear,", + " CoolingCombRatio, !- Name", + " 0.618055, !- Coefficient1 Constant", + " 0.381945, !- Coefficient2 x", + " 1.0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 1.0, !- Minimum Curve Output", + " 1.2, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Linear,", + " HeatingCombRatio, !- Name", + " 0.96034, !- Coefficient1 Constant", + " 0.03966, !- Coefficient2 x", + " 1.0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " 1.0, !- Minimum Curve Output", + " 1.023, !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " CoolingEIRHiPLR, !- Name", + " 1.0, !- Coefficient1 Constant", + " 0.0, !- Coefficient2 x", + " 0.0, !- Coefficient3 x**2", + " 1.0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " HeatingEIRHiPLR, !- Name", + " 2.4294355, !- Coefficient1 Constant", + " -2.235887, !- Coefficient2 x", + " 0.8064516, !- Coefficient3 x**2", + " 1.0, !- Minimum Value of x", + " 1.5, !- Maximum Value of x", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " VarSpeedCyclingPLFFPLR, !- Name", + " 0.85, !- Coefficient1 Constant", + " 0.15, !- Coefficient2 x", + " 0.0, !- Coefficient3 x**2", + " 0.0, !- Minimum Value of x", + " 1.0; !- Maximum Value of x", + + " Curve:Cubic,", + " VRFCoolCapFTBoundary, !- Name", + " 25.73473775, !- Coefficient1 Constant", + " -0.03150043, !- Coefficient2 x", + " -0.01416595, !- Coefficient3 x**2", + " 0, !- Coefficient4 x**3", + " 11, !- Minimum Value of x", + " 30, !- Maximum Value of x", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature; !- Output Unit Type", + + " Curve:Cubic,", + " VRFCoolEIRFTBoundary, !- Name", + " 25.73473775, !- Coefficient1 Constant", + " -0.03150043, !- Coefficient2 x", + " -0.01416595, !- Coefficient3 x**2", + " 0, !- Coefficient4 x**3", + " 15, !- Minimum Value of x", + " 24, !- Maximum Value of x", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature; !- Output Unit Type", + + " Curve:Cubic,", + " CoolingEIRLowPLR, !- Name", + " 0.4628123, !- Coefficient1 Constant", + " -1.0402406, !- Coefficient2 x", + " 2.17490997, !- Coefficient3 x**2", + " -0.5974817, !- Coefficient4 x**3", + " 0.25, !- Minimum Value of x", + " 1, !- Maximum Value of x", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature; !- Output Unit Type", + + " Curve:Cubic,", + " VRFHeatCapFTBoundary, !- Name", + " -7.6000882, !- Coefficient1 Constant", + " 3.05090016, !- Coefficient2 x", + " -0.1162844, !- Coefficient3 x**2", + " 0.0, !- Coefficient4 x**3", + " 15, !- Minimum Value of x", + " 27, !- Maximum Value of x", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature; !- Output Unit Type", + + " Curve:Cubic,", + " VRFHeatEIRFTBoundary, !- Name", + " -7.6000882, !- Coefficient1 Constant", + " 3.05090016, !- Coefficient2 x", + " -0.1162844, !- Coefficient3 x**2", + " 0.0, !- Coefficient4 x**3", + " 15, !- Minimum Value of x", + " 27, !- Maximum Value of x", + " -20, !- Minimum Curve Output", + " 15, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature; !- Output Unit Type", + + " Curve:Cubic,", + " HeatingEIRLowPLR, !- Name", + " 0.1400093, !- Coefficient1 Constant", + " 0.6415002, !- Coefficient2 x", + " 0.1339047, !- Coefficient3 x**2", + " 0.0845859, !- Coefficient4 x**3", + " 0.25, !- Minimum Value of x", + " 1, !- Maximum Value of x", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Dimensionless, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " ZoneHVAC:TerminalUnit:VariableRefrigerantFlow,", + " TU1, !- Zone Terminal Unit Name", + " VRFAvailSched, !- Terminal Unit Availability Schedule", + " TU1 Inlet Node, !- Terminal Unit Air Inlet Node Name", + " TU1 Outlet Node, !- Terminal Unit Air Outlet Node Name", + " autosize, !- Cooling Supply Air Flow Rate {m3/s}", + " autosize, !- No Cooling Supply Air Flow Rate {m3/s}", + " autosize, !- Heating Supply Air Flow Rate {m3/s}", + " autosize, !- No Heating Supply Air Flow Rate {m3/s}", + " autosize, !- Cooling Outdoor Air Flow Rate {m3/s}", + " autosize, !- Heating Outdoor Air Flow Rate {m3/s}", + " autosize, !- No Load Outdoor Air Flow Rate {m3/s}", + " VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name", + " BlowThrough, !- Supply Air Fan Placement", + " Fan:SystemModel, !- Supply Air Fan Object Type", + " TU1 VRF Supply Fan, !- Supply Air Fan Object Name", + " OutdoorAir:Mixer, !- Outside Air Mixer Object Type", + " TU1 OA Mixer, !- Outside Air Mixer Object Name", + " COIL:Cooling:DX:VariableRefrigerantFlow, !- Cooling Coil Object Type", + " TU1 VRF DX Cooling Coil, !- Cooling Coil Object Name", + " COIL:Heating:DX:VariableRefrigerantFlow, !- Heating Coil Object Type", + " TU1 VRF DX Heating Coil, !- Heating Coil Object Name", + " 30, !- Zone Terminal Unit On Parasitic Electric Energy Use {W}", + " 20, !- Zone Terminal Unit Off Parasitic Electric Energy Use {W}", + " , !- Rated Heating Capacity Sizing Ratio {W/W}", + " , !- Availability Manager List Name", + " , !- Design Specification ZoneHVAC Sizing Object Name", + " , !- Supplemental Heating Coil Object Type", + " , !- Supplemental Heating Coil Name", + " ; !- Maximum Supply Air Temperature from Supplemental Heater {C}", + + " ZoneHVAC:EquipmentList,", + " ZONE1-1 Eq, !- Name", + " SequentialLoad, !- Load Distribution Scheme", + " ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, !- Zone Equipment 1 Object Type", + " TU1, !- Zone Equipment 1 Name", + " 1, !- Zone Equipment 1 Cooling Sequence", + " 1, !- Zone Equipment 1 Heating or No-Load Sequence", + " , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name", + " ; !- Zone Equipment 1 Sequential Heating Fraction Schedule Name", + + " ZoneHVAC:EquipmentConnections,", + " ZONE1-1, !- Zone Name", + " ZONE1-1 Eq, !- Zone Conditioning Equipment List Name", + " ZONE1-1 In Nodes, !- Zone Air Inlet Node or NodeList Name", + " ZONE1-1 Out Nodes, !- Zone Air Exhaust Node or NodeList Name", + " ZONE1-1 Node, !- Zone Air Node Name", + " ZONE1-1 Out Node; !- Zone Return Air Node or NodeList Name", + + " NodeList,", + " ZONE1-1 In Nodes, !- Name", + " TU1 Outlet Node; !- Node 1 Name", + + " NodeList,", + " ZONE1-1 Out Nodes, !- Name", + " TU1 Inlet Node; !- Node 1 Name", + + " Fan:SystemModel,", + " TU1 VRF Supply Fan, !- Name", + " VRFAvailSched, !- Availability Schedule Name", + " TU1 OAMixer Outlet Node, !- Air Inlet Node Name", + " TU1 VRF Fan Outlet Node, !- Air Outlet Node Name", + " AUTOSIZE, !- Design Maximum Air Flow Rate {m3/s}", + " Discrete, !- Speed Control Method", + " 0.0, !- Electric Power Minimum Flow Rate Fraction", + " 600.0, !- Design Pressure Rise {Pa}", + " 0.9, !- Motor Efficiency", + " 1.0, !- Motor In Air Stream Fraction", + " AUTOSIZE, !- Design Electric Power Consumption {W}", + " TotalEfficiencyAndPressure, !- Design Power Sizing Method", + " , !- Electric Power Per Unit Flow Rate {W/(m3/s)}", + " , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)}", + " 0.70; !- Fan Total Efficiency", + + " Coil:Cooling:DX:VariableRefrigerantFlow,", + " TU1 VRF DX Cooling Coil, !- Name", + " VRFAvailSched, !- Availability Schedule Name", + " autosize, !- Gross Rated Total Cooling Capacity {W}", + " autosize, !- Gross Rated Sensible Heat Ratio", + " autosize, !- Rated Air Flow Rate {m3/s}", + " VRFTUCoolCapFT, !- Cooling Capacity Ratio Modifier Function of Temperature Curve Name", + " VRFACCoolCapFFF, !- Cooling Capacity Modifier Curve Function of Flow Fraction Name", + " TU1 VRF Fan Outlet Node, !- Coil Air Inlet Node", + " TU1 VRF DX CCoil Outlet Node; !- Coil Air Outlet Node", + + " Coil:Heating:DX:VariableRefrigerantFlow,", + " TU1 VRF DX Heating Coil, !- Name", + " VRFAvailSched, !- Availability Schedule", + " autosize, !- Gross Rated Heating Capacity {W}", + " autosize, !- Rated Air Flow Rate {m3/s}", + " TU1 VRF DX CCoil Outlet Node, !- Coil Air Inlet Node", + " TU1 Outlet Node, !- Coil Air Outlet Node", + " VRFTUHeatCapFT, !- Heating Capacity Ratio Modifier Function of Temperature Curve Name", + " VRFACCoolCapFFF; !- Heating Capacity Modifier Function of Flow Fraction Curve Name", + + " Curve:Cubic,", + " VRFTUCoolCapFT, !- Name", + " 0.504547273506488, !- Coefficient1 Constant", + " 0.0288891279198444, !- Coefficient2 x", + " -0.000010819418650677, !- Coefficient3 x**2", + " 0.0000101359395177008, !- Coefficient4 x**3", + " 0.0, !- Minimum Value of x", + " 50.0, !- Maximum Value of x", + " 0.5, !- Minimum Curve Output", + " 1.5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Cubic,", + " VRFTUHeatCapFT, !- Name", + " -0.390708928227928, !- Coefficient1 Constant", + " 0.261815023760162, !- Coefficient2 x", + " -0.0130431603151873, !- Coefficient3 x**2", + " 0.000178131745997821, !- Coefficient4 x**3", + " 0.0, !- Minimum Value of x", + " 50.0, !- Maximum Value of x", + " 0.5, !- Minimum Curve Output", + " 1.5, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " VRFACCoolCapFFF, !- Name", + " 0.8, !- Coefficient1 Constant", + " 0.2, !- Coefficient2 x", + " 0.0, !- Coefficient3 x**2", + " 0.5, !- Minimum Value of x", + " 1.5; !- Maximum Value of x", + + " OutdoorAir:Mixer,", + " TU1 OA Mixer, !- Name", + " TU1 OAMixer Outlet Node, !- Mixed Air Node Name", + " Outside Air Inlet Node 1,!- Outdoor Air Stream Node Name", + " Relief Air Outlet Node 1,!- Relief Air Stream Node Name", + " TU1 Inlet Node; !- Return Air Stream Node Name", + + " Schedule:Compact,", + " VRFFanSchedule, !- Name", + " Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,1.0; !- Field 3", + + " Schedule:Compact,", + " VRFAvailSched, !- Name", + " Fraction, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,1.0; !- Field 3", + + }); + + ASSERT_TRUE(process_idf(idf_objects)); + + Real64 minEIRfLowPLRXInput(0.0); + Real64 maxEIRfLowPLRXInput(0.0); + bool ErrorsFound(false); + ProcessScheduleInput(OutputFiles::getSingleton()); + GetCurveInput(); + GetZoneData(ErrorsFound); + EXPECT_FALSE(ErrorsFound); + // get zone input and connections + GetZoneEquipmentData(state); + GetVRFInputData(state, ErrorsFound); + // expect error due to min PLR value + EXPECT_TRUE(ErrorsFound); + // set pointer to components + auto &thisVRF(VRF(1)); auto &thisCoolEIRFPLR(PerfCurve(thisVRF.CoolEIRFPLR1)); auto &thisHeatEIRFPLR(PerfCurve(thisVRF.HeatEIRFPLR1)); // check user input VRF Minimum PLR @@ -14228,18 +14236,16 @@ TEST_F(EnergyPlusFixture, VRF_MinPLR_and_EIRfPLRCruveMinPLRInputsTest) EXPECT_EQ(0.25, thisCoolEIRFPLR.Var1Min); EXPECT_EQ(0.25, minEIRfLowPLRXInput); // getinput checks this EXPECT_EQ(1.00, thisCoolEIRFPLR.Var1Max); - EXPECT_EQ(1.00, maxEIRfLowPLRXInput); // getinput checks this + EXPECT_EQ(1.00, maxEIRfLowPLRXInput); // getinput checks this EXPECT_GT(thisCoolEIRFPLR.Var1Min, thisVRF.MinPLR); // expect warning message minEIRfLowPLRXInput = 0.0; maxEIRfLowPLRXInput = 0.0; CurveManager::GetCurveMinMaxValues(thisVRF.HeatEIRFPLR1, minEIRfLowPLRXInput, maxEIRfLowPLRXInput); EXPECT_EQ(0.25, thisHeatEIRFPLR.Var1Min); - EXPECT_EQ(0.25, minEIRfLowPLRXInput); // getinput checks this + EXPECT_EQ(0.25, minEIRfLowPLRXInput); // getinput checks this EXPECT_EQ(1.00, thisHeatEIRFPLR.Var1Max); - EXPECT_EQ(1.00, maxEIRfLowPLRXInput); // getinput checks this - EXPECT_GT(thisHeatEIRFPLR.Var1Min, thisVRF.MinPLR); // expect warning message - + EXPECT_EQ(1.00, maxEIRfLowPLRXInput); // getinput checks this + EXPECT_GT(thisHeatEIRFPLR.Var1Min, thisVRF.MinPLR); // expect warning message } } // end of namespace EnergyPlus - From 19051fbdc06f2c820e970624aa264cd2ade7b834 Mon Sep 17 00:00:00 2001 From: Lixing Gu Date: Fri, 22 May 2020 11:49:45 -0400 Subject: [PATCH 2/2] Revise more rated parameters --- .../CoilCoolingDXCurveFitOperatingMode.cc | 2 +- .../Coils/CoilCoolingDXCurveFitSpeed.cc | 4 +-- .../Coils/CoilCoolingDXCurveFitSpeed.hh | 4 +-- src/EnergyPlus/DXCoils.cc | 8 ++--- src/EnergyPlus/ReportSizingManager.cc | 2 +- src/EnergyPlus/VariableSpeedCoils.cc | 14 ++++---- tst/EnergyPlus/unit/DXCoils.unit.cc | 12 +++---- .../unit/DaylightingManager.unit.cc | 2 +- tst/EnergyPlus/unit/UnitarySystem.unit.cc | 32 +++++++++---------- 9 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.cc b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.cc index d6c8278ce68..67b21688ca4 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.cc +++ b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.cc @@ -163,7 +163,7 @@ void CoilCoolingDXCurveFitOperatingMode::size(EnergyPlusData &state) ReportSizingManager::RequestSizing(state, CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); this->ratedEvapAirFlowRate = TempSize; Real64 const ratedInletAirTemp(26.6667); // 26.6667C or 80F - Real64 const ratedInletAirHumRat(0.01125); // Humidity ratio corresponding to 80F dry bulb/67F wet bulb + Real64 const ratedInletAirHumRat(0.0111847); // Humidity ratio corresponding to 80F dry bulb/67F wet bulb this->ratedEvapAirMassFlowRate = this->ratedEvapAirFlowRate * Psychrometrics::PsyRhoAirFnPbTdbW( DataEnvironment::StdBaroPress, ratedInletAirTemp, ratedInletAirHumRat, RoutineName); diff --git a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.cc b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.cc index 3196a2ce664..42413b71300 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.cc +++ b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.cc @@ -265,8 +265,8 @@ CoilCoolingDXCurveFitSpeed::CoilCoolingDXCurveFitSpeed(const std::string& name_t // rating data RatedInletAirTemp(26.6667), // 26.6667C or 80F - RatedInletWetBulbTemp(19.44), // 19.44 or 67F - RatedInletAirHumRat(0.01125), // Humidity ratio corresponding to 80F dry bulb/67F wet bulb + RatedInletWetBulbTemp(19.4444), // 19.44 or 67F + RatedInletAirHumRat(0.0111847), // Humidity ratio corresponding to 80F dry bulb/67F wet bulb RatedOutdoorAirTemp(35.0), // 35 C or 95F DryCoilOutletHumRatioMin(0.00001) // dry coil outlet minimum hum ratio kgH2O/kgdry air diff --git a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.hh b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.hh index 4524bf31fef..1754f00d41f 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.hh +++ b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.hh @@ -138,8 +138,8 @@ struct CoilCoolingDXCurveFitSpeed // rating data Real64 RatedInletAirTemp = 26.6667; // 26.6667C or 80F - Real64 RatedInletWetBulbTemp = 19.44; // 19.44 or 67F - Real64 RatedInletAirHumRat = 0.01125; // Humidity ratio corresponding to 80F dry bulb/67F wet bulb + Real64 RatedInletWetBulbTemp = 19.4444; // 19.44 or 67F + Real64 RatedInletAirHumRat = 0.0111847; // Humidity ratio corresponding to 80F dry bulb/67F wet bulb Real64 RatedOutdoorAirTemp = 35.0; // 35 C or 95F Real64 DryCoilOutletHumRatioMin = 0.00001; // dry coil outlet minimum hum ratio kgH2O/kgdry air diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index f26774a3c83..11b49117d87 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -158,10 +158,10 @@ namespace DXCoils { Real64 const RatedInletWetBulbTemp(19.4444); // 19.44 or 67F Real64 const RatedInletAirHumRat(0.0111847); // Humidity ratio corresponding to 80F dry bulb/67F wet bulb Real64 const RatedOutdoorAirTemp(35.0); // 35 C or 95F - Real64 const RatedInletAirTempHeat(21.11); // 21.11C or 70F - Real64 const RatedOutdoorAirTempHeat(8.33); // 8.33 C or 47F - Real64 const RatedOutdoorWetBulbTempHeat(6.11); // 6.11 C or 43F - Real64 const RatedInletWetBulbTempHeat(15.55); // 15.55 or 60F + Real64 const RatedInletAirTempHeat(21.1111); // 21.11C or 70F + Real64 const RatedOutdoorAirTempHeat(8.3333); // 8.33 C or 47F + Real64 const RatedOutdoorWetBulbTempHeat(6.1111); // 6.11 C or 43F + Real64 const RatedInletWetBulbTempHeat(15.5556); // 15.55 or 60F Real64 const DryCoilOutletHumRatioMin(0.00001); // dry coil outlet minimum hum ratio kgWater/kgDryAir diff --git a/src/EnergyPlus/ReportSizingManager.cc b/src/EnergyPlus/ReportSizingManager.cc index 2949b0ef2c8..eeb22467faa 100644 --- a/src/EnergyPlus/ReportSizingManager.cc +++ b/src/EnergyPlus/ReportSizingManager.cc @@ -424,7 +424,7 @@ namespace ReportSizingManager { Array1D Par(4); // array passed to RegulaFalsi std::string ScalableSM; // scalable sizing methods label for reporting Real64 const RatedInletAirTemp(26.6667); // 26.6667C or 80F - Real64 const RatedInletAirHumRat(0.01125); // Humidity ratio corresponding to 80F dry bulb/67F wet bulb + Real64 const RatedInletAirHumRat(0.0111847); // Humidity ratio corresponding to 80F dry bulb/67F wet bulb std::string DDNameFanPeak; // Name of the design day that produced the Peak std::string dateTimeFanPeak; // A String representing the DateTime of the Peak diff --git a/src/EnergyPlus/VariableSpeedCoils.cc b/src/EnergyPlus/VariableSpeedCoils.cc index 31ab7554a25..f3e24635b02 100644 --- a/src/EnergyPlus/VariableSpeedCoils.cc +++ b/src/EnergyPlus/VariableSpeedCoils.cc @@ -117,14 +117,14 @@ namespace VariableSpeedCoils { // MODULE PARAMETER DEFINITIONS Real64 const RatedInletAirTemp(26.6667); // 26.6667C or 80F - Real64 const RatedInletWetBulbTemp(19.44); // 19.44 or 67F, cooling mode - Real64 const RatedInletAirHumRat(0.01125); // Humidity ratio corresponding to 80F dry bulb/67F wet bulb - Real64 const RatedInletWaterTemp(29.4); // 85 F cooling mode + Real64 const RatedInletWetBulbTemp(19.4444); // 19.44 or 67F, cooling mode + Real64 const RatedInletAirHumRat(0.0111847); // Humidity ratio corresponding to 80F dry bulb/67F wet bulb + Real64 const RatedInletWaterTemp(29.4444); // 85 F cooling mode Real64 const RatedAmbAirTemp(35.0); // 95 F cooling mode - Real64 const RatedInletAirTempHeat(21.11); // 21.11C or 70F, heating mode - Real64 const RatedInletWaterTempHeat(21.11); // 21.11C or 70F, heating mode - Real64 const RatedAmbAirTempHeat(8.33); // 8.33 or 47F, heating mode - Real64 const RatedAmbAirWBHeat(6.11); // 8.33 or 43F, heating mode, rated wet bulb temperature + Real64 const RatedInletAirTempHeat(21.1111); // 21.11C or 70F, heating mode + Real64 const RatedInletWaterTempHeat(21.1111); // 21.11C or 70F, heating mode + Real64 const RatedAmbAirTempHeat(8.3333); // 8.33 or 47F, heating mode + Real64 const RatedAmbAirWBHeat(6.1111); // 8.33 or 43F, heating mode, rated wet bulb temperature // Water Systems int const CondensateDiscarded(1001); // default mode where water is "lost" diff --git a/tst/EnergyPlus/unit/DXCoils.unit.cc b/tst/EnergyPlus/unit/DXCoils.unit.cc index 52cc0719591..6f1c4039f15 100644 --- a/tst/EnergyPlus/unit/DXCoils.unit.cc +++ b/tst/EnergyPlus/unit/DXCoils.unit.cc @@ -1498,8 +1498,8 @@ TEST_F(EnergyPlusFixture, DXCoil_ValidateADPFunction) DXCoil(1).RatedSHR(1), true); - EXPECT_NEAR(0.788472, DXCoil(1).RatedSHR(1), 0.0000001); - EXPECT_NEAR(0.0003944, CBF_calculated, 0.0000001); + EXPECT_NEAR(0.792472, DXCoil(1).RatedSHR(1), 0.0000001); + EXPECT_NEAR(0.00213735, CBF_calculated, 0.0000001); DXCoil(1).RatedTotCap(1) = 35000.0; // simulate outlet condition right at the saturation curve DXCoil(1).RatedSHR(1) = AutoSize; @@ -1514,8 +1514,8 @@ TEST_F(EnergyPlusFixture, DXCoil_ValidateADPFunction) DXCoil(1).RatedSHR(1), true); - EXPECT_NEAR(0.67608322, DXCoil(1).RatedSHR(1), 0.0000001); - EXPECT_NEAR(0.0003243, CBF_calculated, 0.0000001); + EXPECT_NEAR(0.67908322, DXCoil(1).RatedSHR(1), 0.0000001); + EXPECT_NEAR(0.00298921, CBF_calculated, 0.0000001); DXCoil(1).RatedTotCap(1) = 40000.0; // reverse perturb SHR (i.e., decrease SHR), CalcCBF would have failed with RH >= 1.0 DXCoil(1).RatedSHR(1) = AutoSize; @@ -1530,8 +1530,8 @@ TEST_F(EnergyPlusFixture, DXCoil_ValidateADPFunction) DXCoil(1).RatedSHR(1), true); - EXPECT_NEAR(0.64408322, DXCoil(1).RatedSHR(1), 0.0000001); - EXPECT_NEAR(0.0028271, CBF_calculated, 0.0000001); + EXPECT_NEAR(0.64708322, DXCoil(1).RatedSHR(1), 0.0000001); + EXPECT_NEAR(0.00252307, CBF_calculated, 0.0000001); } TEST_F(EnergyPlusFixture, TestMultiSpeedCoolingCrankcaseOutput) diff --git a/tst/EnergyPlus/unit/DaylightingManager.unit.cc b/tst/EnergyPlus/unit/DaylightingManager.unit.cc index d7bca3c8b0c..43be20566ce 100644 --- a/tst/EnergyPlus/unit/DaylightingManager.unit.cc +++ b/tst/EnergyPlus/unit/DaylightingManager.unit.cc @@ -1572,7 +1572,7 @@ TEST_F(EnergyPlusFixture, DaylightingManager_GetInputDaylightingControls_Roundin EXPECT_EQ(10, DataDaylighting::ZoneDaylight(1).TotalDaylRefPoints); - std::array fractions({0.1053, 0.0936, 0.1213, 0.1018, 0.0893, 0.0842, 0.0882, 0.1026, 0.1134, 0.1003}); + std::vector fractions({0.1053, 0.0936, 0.1213, 0.1018, 0.0893, 0.0842, 0.0882, 0.1026, 0.1134, 0.1003}); Real64 sum(0.0); int i = 1; for (auto frac: fractions) { diff --git a/tst/EnergyPlus/unit/UnitarySystem.unit.cc b/tst/EnergyPlus/unit/UnitarySystem.unit.cc index f44c7f965e1..7a5a3a169fc 100644 --- a/tst/EnergyPlus/unit/UnitarySystem.unit.cc +++ b/tst/EnergyPlus/unit/UnitarySystem.unit.cc @@ -2429,36 +2429,36 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultispeedPerformance) // autosized air flow and capacity, unitary sytsem capacity matches coils EXPECT_EQ(thisSys->m_MaxCoolAirVolFlow, 1.5); EXPECT_EQ(thisSys->m_MaxHeatAirVolFlow, 1.5); - EXPECT_NEAR(thisSys->m_DesignCoolingCapacity, 32752.541, 0.001); + EXPECT_NEAR(thisSys->m_DesignCoolingCapacity, 32768.550, 0.001); EXPECT_EQ(thisSys->m_DesignCoolingCapacity, VariableSpeedCoils::VarSpeedCoil(1).RatedCapCoolTotal); - EXPECT_NEAR(thisSys->m_DesignHeatingCapacity, 32752.541, 0.001); + EXPECT_NEAR(thisSys->m_DesignHeatingCapacity, 32768.550, 0.001); EXPECT_EQ(thisSys->m_DesignHeatingCapacity, VariableSpeedCoils::VarSpeedCoil(2).RatedCapHeat); // variable speed coils size air flow differently than other models. The design air volume flow rate is back calculated from design capacity EXPECT_EQ(VariableSpeedCoils::VarSpeedCoil(1).RatedAirVolFlowRate, VariableSpeedCoils::VarSpeedCoil(1).RatedCapCoolTotal * VariableSpeedCoils::VarSpeedCoil(1).MSRatedAirVolFlowPerRatedTotCap(10)); - EXPECT_NEAR(VariableSpeedCoils::VarSpeedCoil(1).RatedAirVolFlowRate, 1.82964, 0.00001); // different than unitary system air volume flow rate + EXPECT_NEAR(VariableSpeedCoils::VarSpeedCoil(1).RatedAirVolFlowRate, 1.830539, 0.00001); // different than unitary system air volume flow rate EXPECT_NEAR(VariableSpeedCoils::VarSpeedCoil(2).RatedAirVolFlowRate, 1.70, 0.01); // VS DX heating coil was not autosized // checks on autosized cooling air flow rates - EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[1], 0.182964, 0.000001); + EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[1], 0.1830539, 0.000001); EXPECT_EQ(VariableSpeedCoils::VarSpeedCoil(1).MSRatedAirVolFlowRate(1), thisSys->m_CoolVolumeFlowRate[1]); - EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[2], 0.365929, 0.000001); + EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[2], 0.3661078, 0.000001); EXPECT_EQ(VariableSpeedCoils::VarSpeedCoil(1).MSRatedAirVolFlowRate(2), thisSys->m_CoolVolumeFlowRate[2]); - EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[3], 0.548893, 0.000001); + EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[3], 0.5491617, 0.000001); EXPECT_EQ(VariableSpeedCoils::VarSpeedCoil(1).MSRatedAirVolFlowRate(3), thisSys->m_CoolVolumeFlowRate[3]); - EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[4], 0.731858, 0.000001); + EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[4], 0.7322156, 0.000001); EXPECT_EQ(VariableSpeedCoils::VarSpeedCoil(1).MSRatedAirVolFlowRate(4), thisSys->m_CoolVolumeFlowRate[4]); - EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[5], 0.914822, 0.000001); + EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[5], 0.9152695, 0.000001); EXPECT_EQ(VariableSpeedCoils::VarSpeedCoil(1).MSRatedAirVolFlowRate(5), thisSys->m_CoolVolumeFlowRate[5]); - EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[6], 1.097787, 0.000001); + EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[6], 1.0983234, 0.000001); EXPECT_EQ(VariableSpeedCoils::VarSpeedCoil(1).MSRatedAirVolFlowRate(6), thisSys->m_CoolVolumeFlowRate[6]); - EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[7], 1.280751, 0.000001); + EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[7], 1.2813773, 0.000001); EXPECT_EQ(VariableSpeedCoils::VarSpeedCoil(1).MSRatedAirVolFlowRate(7), thisSys->m_CoolVolumeFlowRate[7]); - EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[8], 1.463716, 0.000001); + EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[8], 1.4644312, 0.000001); EXPECT_EQ(VariableSpeedCoils::VarSpeedCoil(1).MSRatedAirVolFlowRate(8), thisSys->m_CoolVolumeFlowRate[8]); - EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[9], 1.646680, 0.000001); + EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[9], 1.6474851, 0.000001); EXPECT_EQ(VariableSpeedCoils::VarSpeedCoil(1).MSRatedAirVolFlowRate(9), thisSys->m_CoolVolumeFlowRate[9]); - EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[10], 1.829645, 0.000001); + EXPECT_NEAR(thisSys->m_CoolVolumeFlowRate[10], 1.830539, 0.000001); EXPECT_EQ(VariableSpeedCoils::VarSpeedCoil(1).MSRatedAirVolFlowRate(10), thisSys->m_CoolVolumeFlowRate[10]); // checks on autosized heating air flow rates @@ -13813,7 +13813,7 @@ TEST_F(EnergyPlusFixture, Test_UnitarySystemModel_SubcoolReheatCoil) EXPECT_EQ(EnergyPlus::coilCoolingDXs[0].performance.ModeRatio, 1.0); EXPECT_NEAR(thisSys->CoilSHR, thisSys->LoadSHR, 0.001); EXPECT_NEAR(SenOutput, -227.705, 0.1); - EXPECT_NEAR(LatOutput, -750.9234, 0.1); + EXPECT_NEAR(LatOutput, -751.3286, 0.1); // OperatingMode 3 with mode ratio < 1 thisSys->m_ZoneSequenceCoolingNum = 0; @@ -13846,7 +13846,7 @@ TEST_F(EnergyPlusFixture, Test_UnitarySystemModel_SubcoolReheatCoil) EXPECT_NEAR(thisSys->LoadSHR, 0.57154, 0.001); EXPECT_NEAR(thisSys->CoilSHR, 0.44680, 0.001); EXPECT_NEAR(SenOutput, -397.162, 0.1); - EXPECT_NEAR(LatOutput, -524.623, 0.1); + EXPECT_NEAR(LatOutput, -524.583, 0.1); // OperatingMode 2 thisSys->m_ZoneSequenceCoolingNum = 0; @@ -13870,7 +13870,7 @@ TEST_F(EnergyPlusFixture, Test_UnitarySystemModel_SubcoolReheatCoil) EXPECT_NEAR(thisSys->LoadSHR, 0.98533, 0.001); EXPECT_NEAR(thisSys->CoilSHR, 0.97600, 0.001); EXPECT_NEAR(SenOutput, -2000.0, 0.5); - EXPECT_NEAR(LatOutput, -330.85, 0.1); + EXPECT_NEAR(LatOutput, -330.95, 0.1); } // This issue tests for GetInput with respect to Autosizing, especially for issue #7771 where // 'Minimum Supply Air Temperature' == 'Autosize' produces a crash