diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index 53ca10051d2..4a7dc663e2a 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -3964,6 +3964,7 @@ namespace DXCoils { DXCoil(DXCoilNum).MSErrIndex.allocate(DXCoil(DXCoilNum).NumOfSpeeds); DXCoil(DXCoilNum).MSErrIndex = 0; DXCoil(DXCoilNum).MSRatedTotCap.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSRatedTotCapDes.allocate(DXCoil(DXCoilNum).NumOfSpeeds); DXCoil(DXCoilNum).MSRatedSHR.allocate(DXCoil(DXCoilNum).NumOfSpeeds); DXCoil(DXCoilNum).MSRatedCOP.allocate(DXCoil(DXCoilNum).NumOfSpeeds); DXCoil(DXCoilNum).MSRatedAirVolFlowRate.allocate(DXCoil(DXCoilNum).NumOfSpeeds); @@ -6669,34 +6670,18 @@ namespace DXCoils { using ReportSizingManager::ReportSizingOutput; using ReportSizingManager::RequestSizing; using namespace OutputReportPredefined; - using DataAirSystems::PrimaryAirSystem; using StandardRatings::CalcDXCoilStandardRating; // SUBROUTINE PARAMETER DEFINITIONS: static std::string const RoutineName("SizeDXCoil"); // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - Real64 rhoair; - Real64 MixTemp; - Real64 MixHumRat; - Real64 MixEnth; - Real64 MixWetBulb; - Real64 SupTemp; - Real64 SupHumRat; - Real64 SupEnth; - Real64 OutTemp; - Real64 OutAirFrac; - Real64 CoilInTemp; - Real64 VolFlowRate; - Real64 CoolCapAtPeak; - Real64 TotCapTempModFac; - Real64 RatedVolFlowPerRatedTotCap; // Rated Air Volume Flow Rate divided by Rated Total Capacity[m3/s-W) - int TimeStepNumAtMax; - int DDNum; - 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 + Real64 RatedVolFlowPerRatedTotCap; // Rated Air Volume Flow Rate divided by Rated Total Capacity[m3/s-W) + 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 @@ -6722,7 +6707,7 @@ namespace DXCoils { Real64 DefrostCapacityUser; // Hard-sized defrost heater capacity for reporting Real64 MSRatedAirVolFlowRateDes; // Design multispeed rated air volume flow rate for reporting Real64 MSRatedAirVolFlowRateUser; // Hard-sized multispeed rated air volume flow rate for reporting - Real64 MSRatedTotCapDes; // Design multispeed rated total capacity for reporting + Real64 MSRatedTotCapDesAtMaxSpeed; // Design multispeed rated total capacity for reporting (at maximum speed) Real64 MSRatedTotCapUser; // Hard-sized multispeed rated total capacity for reporting Real64 MSRatedSHRDes; // Design multispeed rated SHR for reporting Real64 MSRatedSHRUser; // Hard-sized multispeed rated SHR for reporting @@ -6782,6 +6767,7 @@ namespace DXCoils { RatedTotCapUser = 0.0; RatedTotCap2Des = 0.0; RatedTotCap2User = 0.0; + MSRatedTotCapDesAtMaxSpeed = 0.0; RatedSHRDes = 0.0; RatedSHRUser = 0.0; RatedSHR2Des = 0.0; @@ -6798,7 +6784,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; @@ -7321,39 +7307,53 @@ namespace DXCoils { if (DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode) == AutoSize) { IsAutoSize = true; } - + DataSizing::DataIsDXCoil = true; + CompName = DXCoil(DXCoilNum).Name; + CompType = DXCoil(DXCoilNum).DXCoilType; if (Mode == DXCoil(DXCoilNum).NumOfSpeeds) { - CompName = DXCoil(DXCoilNum).Name; FieldNum = 10 + (Mode - 1) * 13; SizingString = DXCoilNumericFields(DXCoilNum).PerfMode(1).FieldNames(FieldNum) + " [m3/s]"; SizingMethod = CoolingAirflowSizing; - CompType = DXCoil(DXCoilNum).DXCoilType; TempSize = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode); - DataIsDXCoil = true; DataEMSOverrideON = DXCoil(DXCoilNum).RatedAirVolFlowRateEMSOverrideON(Mode); DataEMSOverride = DXCoil(DXCoilNum).RatedAirVolFlowRateEMSOverrideValue(Mode); RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode) = TempSize; - DataIsDXCoil = false; DataEMSOverrideON = false; DataEMSOverride = 0.0; + if ( !IsAutoSize && !HardSizeNoDesRun) { + TempSize = AutoSize; + bPRINT = false; + RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, bPRINT, RoutineName); + MSRatedAirVolFlowRateDes = TempSize; + bPRINT = true; + } + if ( IsAutoSize) { + MSRatedAirVolFlowRateDes = TempSize;; + } } else { - MSRatedAirVolFlowRateDes = - DXCoil(DXCoilNum).MSRatedAirVolFlowRate(DXCoil(DXCoilNum).NumOfSpeeds) * Mode / DXCoil(DXCoilNum).NumOfSpeeds; - CompName = DXCoil(DXCoilNum).Name; FieldNum = 10 + (Mode - 1) * 13; SizingString = DXCoilNumericFields(DXCoilNum).PerfMode(1).FieldNames(FieldNum) + " [m3/s]"; - SizingMethod = AutoCalculateSizing; - CompType = DXCoil(DXCoilNum).DXCoilType; - // Auto size low speed capacity to 1/3 high speed capacity - DataConstantUsedForSizing = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(DXCoil(DXCoilNum).NumOfSpeeds); - DataFractionUsedForSizing = (float)Mode / DXCoil(DXCoilNum).NumOfSpeeds; - TempSize = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode); + SizingMethod = CoolingAirflowSizing; + 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; + } + TempSize = DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( Mode ); + DataEMSOverrideON = DXCoil(DXCoilNum).RatedAirVolFlowRateEMSOverrideON(Mode); + DataEMSOverride = DXCoil(DXCoilNum).RatedAirVolFlowRateEMSOverrideValue(Mode); RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, bPRINT, RoutineName); DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode) = TempSize; - DataConstantUsedForSizing = 0.0; - DataFractionUsedForSizing = 0.0; } + DataEMSOverride = 0.0; + DataEMSOverrideON = false; + DataSizing::DataIsDXCoil = false; + DataSizing::DataTotCapCurveIndex = 0; + DataSizing::DataConstantUsedForSizing = 0.0; + DataSizing::DataFractionUsedForSizing = 0.0; } // Ensure flow rate at lower speed must be lower or equal to the flow rate at higher speed. Otherwise, a severe error is isssued. @@ -7367,235 +7367,74 @@ namespace DXCoils { } } - // Sizing multispeed rated total capacity + // Sizing multispeed rated total cooling capacity for (Mode = DXCoil(DXCoilNum).NumOfSpeeds; Mode >= 1; --Mode) { IsAutoSize = false; if (DXCoil(DXCoilNum).MSRatedTotCap(Mode) == AutoSize) { IsAutoSize = true; } + CompName = DXCoil( DXCoilNum ).Name; + CompType = DXCoil( DXCoilNum ).DXCoilType; + DataSizing::DataIsDXCoil = true; + DataSizing::DataTotCapCurveIndex = DXCoil( DXCoilNum ).MSCCapFTemp( Mode ); if (Mode == DXCoil(DXCoilNum).NumOfSpeeds) { - if (CurSysNum > 0) { - if (SizingDesRunThisAirSys) HardSizeNoDesRun = false; - if (!IsAutoSize && !SizingDesRunThisAirSys) { - HardSizeNoDesRun = true; - if (DXCoil(DXCoilNum).MSRatedTotCap(Mode) > 0.0) { - ReportSizingOutput(DXCoil(DXCoilNum).DXCoilType, - DXCoil(DXCoilNum).Name, - "Speed " + TrimSigDigits(Mode) + " User-Specified Total Cooling Capacity [W]", - DXCoil(DXCoilNum).MSRatedTotCap(Mode)); - } - } else { // autosize or hard-sized with system sizing data - CheckSysSizing(DXCoil(DXCoilNum).DXCoilType, DXCoil(DXCoilNum).Name); - VolFlowRate = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode); - if (VolFlowRate >= SmallAirVolFlow) { - if (CurOASysNum > 0) { // coil is in the OA stream - MixTemp = FinalSysSizing(CurSysNum).OutTempAtCoolPeak; - MixHumRat = FinalSysSizing(CurSysNum).OutHumRatAtCoolPeak; - SupTemp = FinalSysSizing(CurSysNum).PrecoolTemp; - SupHumRat = FinalSysSizing(CurSysNum).PrecoolHumRat; - } else { // coil is on the main air loop - SupTemp = FinalSysSizing(CurSysNum).CoolSupTemp; - SupHumRat = FinalSysSizing(CurSysNum).CoolSupHumRat; - if (PrimaryAirSystem(CurSysNum).NumOACoolCoils == 0) { // there is no precooling of the OA stream - MixTemp = FinalSysSizing(CurSysNum).MixTempAtCoolPeak; - MixHumRat = FinalSysSizing(CurSysNum).MixHumRatAtCoolPeak; - } else { // there is precooling of OA stream - if (VolFlowRate > 0.0) { - OutAirFrac = FinalSysSizing(CurSysNum).DesOutAirVolFlow / VolFlowRate; - } else { - OutAirFrac = 1.0; - } - OutAirFrac = min(1.0, max(0.0, OutAirFrac)); - MixTemp = OutAirFrac * FinalSysSizing(CurSysNum).PrecoolTemp + - (1.0 - OutAirFrac) * FinalSysSizing(CurSysNum).RetTempAtCoolPeak; - MixHumRat = OutAirFrac * FinalSysSizing(CurSysNum).PrecoolHumRat + - (1.0 - OutAirFrac) * FinalSysSizing(CurSysNum).RetHumRatAtCoolPeak; - } - } - OutTemp = FinalSysSizing(CurSysNum).OutTempAtCoolPeak; - rhoair = PsyRhoAirFnPbTdbW(StdBaroPress, MixTemp, MixHumRat, RoutineName); - MixEnth = PsyHFnTdbW(MixTemp, MixHumRat); - MixWetBulb = PsyTwbFnTdbWPb(MixTemp, MixHumRat, StdBaroPress, RoutineName); - SupEnth = PsyHFnTdbW(SupTemp, SupHumRat); - TotCapTempModFac = CurveValue(DXCoil(DXCoilNum).MSCCapFTemp(Mode), MixWetBulb, OutTemp); - CoolCapAtPeak = max(0.0, (rhoair * VolFlowRate * (MixEnth - SupEnth))); - if (TotCapTempModFac > 0.0) { - MSRatedTotCapDes = CoolCapAtPeak / TotCapTempModFac; - } else { - MSRatedTotCapDes = CoolCapAtPeak; - } - if (UnitarySysEqSizing(CurSysNum).CoolingCapacity) { // override capacity if parent speicifies size - MSRatedTotCapDes = UnitarySysEqSizing(CurSysNum).DesCoolingLoad; - } - if (MSRatedTotCapDes > 0.0) { - RatedVolFlowPerRatedTotCap = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode) / MSRatedTotCapDes; - } else { - RatedVolFlowPerRatedTotCap = 0.0; - } - // check capacity to make sure design volume flow per total capacity is within range - if (RatedVolFlowPerRatedTotCap < MinRatedVolFlowPerRatedTotCap(DXCT)) { - if (DisplayExtraWarnings) { - ShowWarningError("SizeDXCoil: " + DXCoil(DXCoilNum).DXCoilType + ' ' + DXCoil(DXCoilNum).Name); - ShowContinueError("...Rated Total Cooling Capacity will be limited by the minimum rated volume flow per " - "rated total capacity ratio."); - ShowContinueError("...DX coil speed = " + TrimSigDigits(Mode)); - ShowContinueError("...DX coil volume flow rate (m3/s) = " + - TrimSigDigits(DXCoil(DXCoilNum).RatedAirVolFlowRate(Mode), 6)); - ShowContinueError("...Requested capacity (W) = " + TrimSigDigits(MSRatedTotCapDes, 3)); - ShowContinueError("...Requested flow/capacity ratio (m3/s/W) = " + - TrimSigDigits(RatedVolFlowPerRatedTotCap, 3)); - ShowContinueError("...Minimum flow/capacity ratio (m3/s/W) = " + - TrimSigDigits(MinRatedVolFlowPerRatedTotCap(DXCT), 3)); - } - MSRatedTotCapDes = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode) / MinRatedVolFlowPerRatedTotCap(DXCT); - - if (DisplayExtraWarnings) { - ShowContinueError("...Adjusted capacity (W) = " + TrimSigDigits(MSRatedTotCapDes, 3)); - } - } else if (RatedVolFlowPerRatedTotCap > MaxRatedVolFlowPerRatedTotCap(DXCT)) { - if (DisplayExtraWarnings) { - ShowWarningError("SizeDXCoil: " + DXCoil(DXCoilNum).DXCoilType + ' ' + DXCoil(DXCoilNum).Name); - ShowContinueError("...Rated Total Cooling Capacity will be limited by the maximum rated volume flow per " - "rated total capacity ratio."); - ShowContinueError("...DX coil speed = " + TrimSigDigits(Mode)); - ShowContinueError("...DX coil volume flow rate (m3/s) = " + - TrimSigDigits(DXCoil(DXCoilNum).RatedAirVolFlowRate(Mode), 6)); - ShowContinueError("...Requested capacity (W) = " + TrimSigDigits(MSRatedTotCapDes, 3)); - ShowContinueError("...Requested flow/capacity ratio (m3/s/W) = " + - TrimSigDigits(RatedVolFlowPerRatedTotCap, 3)); - ShowContinueError("...Maximum flow/capacity ratio (m3/s/W) = " + - TrimSigDigits(MaxRatedVolFlowPerRatedTotCap(DXCT), 3)); - } - MSRatedTotCapDes = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode) / MaxRatedVolFlowPerRatedTotCap(DXCT); - if (DisplayExtraWarnings) { - ShowContinueError("...Adjusted capacity (W) = " + TrimSigDigits(MSRatedTotCapDes, 3)); - } - } - } else { - MSRatedTotCapDes = 0.0; - } - } - } else if (CurZoneEqNum > 0) { - if (SizingDesRunThisZone) HardSizeNoDesRun = false; - if (!IsAutoSize && !SizingDesRunThisZone) { - HardSizeNoDesRun = true; - if (DXCoil(DXCoilNum).MSRatedTotCap(Mode) > 0.0) { - ReportSizingOutput(DXCoil(DXCoilNum).DXCoilType, - DXCoil(DXCoilNum).Name, - "Speed " + TrimSigDigits(Mode) + " User-Specified Total Cooling Capacity [W]", - DXCoil(DXCoilNum).MSRatedTotCap(Mode)); - } - } else { // autosize or hard-sized with system sizing data - CheckZoneSizing(DXCoil(DXCoilNum).DXCoilType, DXCoil(DXCoilNum).Name); - VolFlowRate = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode); - if (VolFlowRate >= SmallAirVolFlow) { - MixTemp = FinalZoneSizing(CurZoneEqNum).DesCoolCoilInTemp; - MixHumRat = FinalZoneSizing(CurZoneEqNum).DesCoolCoilInHumRat; - SupTemp = FinalZoneSizing(CurZoneEqNum).CoolDesTemp; - SupHumRat = FinalZoneSizing(CurZoneEqNum).CoolDesHumRat; - TimeStepNumAtMax = FinalZoneSizing(CurZoneEqNum).TimeStepNumAtCoolMax; - DDNum = FinalZoneSizing(CurZoneEqNum).CoolDDNum; - if (DDNum > 0 && TimeStepNumAtMax > 0) { - OutTemp = DesDayWeath(DDNum).Temp(TimeStepNumAtMax); - } else { - OutTemp = 0.0; - } - rhoair = PsyRhoAirFnPbTdbW(StdBaroPress, MixTemp, MixHumRat, RoutineName); - MixEnth = PsyHFnTdbW(MixTemp, MixHumRat); - MixWetBulb = PsyTwbFnTdbWPb(MixTemp, MixHumRat, StdBaroPress, RoutineName); - SupEnth = PsyHFnTdbW(SupTemp, SupHumRat); - TotCapTempModFac = CurveValue(DXCoil(DXCoilNum).MSCCapFTemp(Mode), MixWetBulb, OutTemp); - CoolCapAtPeak = max(0.0, (rhoair * VolFlowRate * (MixEnth - SupEnth))); - if (TotCapTempModFac > 0.0) { - MSRatedTotCapDes = CoolCapAtPeak / TotCapTempModFac; - } else { - MSRatedTotCapDes = CoolCapAtPeak; - } - if (ZoneEqSizing(CurZoneEqNum).CoolingCapacity) { // override capacity if parent speicifies size - MSRatedTotCapDes = ZoneEqSizing(CurZoneEqNum).DesCoolingLoad; - } - if (MSRatedTotCapDes > 0.0) { - RatedVolFlowPerRatedTotCap = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode) / MSRatedTotCapDes; - } else { - RatedVolFlowPerRatedTotCap = 0.0; - } - // check capacity to make sure design volume flow per total capacity is within range - if (RatedVolFlowPerRatedTotCap < MinRatedVolFlowPerRatedTotCap(DXCT)) { - if (DisplayExtraWarnings) { - ShowWarningError("SizeDXCoil: " + DXCoil(DXCoilNum).DXCoilType + ' ' + DXCoil(DXCoilNum).Name); - ShowContinueError("...Rated Total Cooling Capacity will be limited by the minimum rated volume flow per " - "rated total capacity ratio."); - ShowContinueError("...DX coil speed = " + TrimSigDigits(Mode)); - ShowContinueError("...DX coil volume flow rate (m3/s) = " + - TrimSigDigits(DXCoil(DXCoilNum).RatedAirVolFlowRate(Mode), 6)); - ShowContinueError("...Requested capacity (W) = " + TrimSigDigits(MSRatedTotCapDes, 3)); - ShowContinueError("...Requested flow/capacity ratio (m3/s/W) = " + - TrimSigDigits(RatedVolFlowPerRatedTotCap, 3)); - ShowContinueError("...Minimum flow/capacity ratio (m3/s/W) = " + - TrimSigDigits(MinRatedVolFlowPerRatedTotCap(DXCT), 3)); - } - MSRatedTotCapDes = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode) / MinRatedVolFlowPerRatedTotCap(DXCT); - if (DisplayExtraWarnings) { - ShowContinueError("...Adjusted capacity (W) = " + TrimSigDigits(MSRatedTotCapDes, 3)); - } - } else if (RatedVolFlowPerRatedTotCap > MaxRatedVolFlowPerRatedTotCap(DXCT)) { - if (DisplayExtraWarnings) { - ShowWarningError("SizeDXCoil: " + DXCoil(DXCoilNum).DXCoilType + ' ' + DXCoil(DXCoilNum).Name); - ShowContinueError("...Rated Total Cooling Capacity will be limited by the maximum rated volume flow per " - "rated total capacity ratio."); - ShowContinueError("...DX coil speed = " + TrimSigDigits(Mode)); - ShowContinueError("...DX coil volume flow rate (m3/s) = " + - TrimSigDigits(DXCoil(DXCoilNum).RatedAirVolFlowRate(Mode), 6)); - ShowContinueError("...Requested capacity (W) = " + TrimSigDigits(MSRatedTotCapDes, 3)); - ShowContinueError("...Requested flow/capacity ratio (m3/s/W) = " + - TrimSigDigits(RatedVolFlowPerRatedTotCap, 3)); - ShowContinueError("...Maximum flow/capacity ratio (m3/s/W) = " + - TrimSigDigits(MaxRatedVolFlowPerRatedTotCap(DXCT), 3)); - } - MSRatedTotCapDes = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode) / MaxRatedVolFlowPerRatedTotCap(DXCT); - if (DisplayExtraWarnings) { - ShowContinueError("...Adjusted capacity (W) = " + TrimSigDigits(MSRatedTotCapDes, 3)); - } - } - } else { - MSRatedTotCapDes = 0.0; - } - } + 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 ); + if (!HardSizeNoDesRun) { + PrintFlag = false; + TempSize = DataSizing::AutoSize; + // Auto size capacity at the highest speed + RequestSizing( CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName ); + SizingMethod = AutoCalculateSizing; + DataConstantUsedForSizing = TempSize; + DataFractionUsedForSizing = 1.0; + MSRatedTotCapDesAtMaxSpeed = TempSize; + DXCoil( DXCoilNum ).MSRatedTotCapDes( Mode ) = TempSize; + PrintFlag = true; } - } else { - MSRatedTotCapDes = DXCoil(DXCoilNum).MSRatedTotCap(DXCoil(DXCoilNum).NumOfSpeeds) * Mode / DXCoil(DXCoilNum).NumOfSpeeds; - } - if (!HardSizeNoDesRun) { + TempSize = DXCoil( DXCoilNum ).MSRatedTotCap( Mode ); + RequestSizing( CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName ); + DXCoil( DXCoilNum ).MSRatedTotCap( Mode ) = TempSize; if (IsAutoSize) { - DXCoil(DXCoilNum).MSRatedTotCap(Mode) = MSRatedTotCapDes; - ReportSizingOutput(DXCoil(DXCoilNum).DXCoilType, - DXCoil(DXCoilNum).Name, - "Speed " + TrimSigDigits(Mode) + " Design Size Rated Total Cooling Capacity [W]", - MSRatedTotCapDes); - } else { - if (DXCoil(DXCoilNum).MSRatedTotCap(Mode) > 0.0 && MSRatedTotCapDes > 0.0 && !HardSizeNoDesRun) { - MSRatedTotCapUser = DXCoil(DXCoilNum).MSRatedTotCap(Mode); - ReportSizingOutput(DXCoil(DXCoilNum).DXCoilType, - DXCoil(DXCoilNum).Name, - "Speed " + TrimSigDigits(Mode) + " Design Size Rated Total Cooling Capacity [W]", - MSRatedTotCapDes, - "Speed " + TrimSigDigits(Mode) + " User-Specified Rated Total Cooling Capacity [W]", - MSRatedTotCapUser); - if (DisplayExtraWarnings) { - if ((std::abs(MSRatedTotCapDes - MSRatedTotCapUser) / MSRatedTotCapUser) > AutoVsHardSizingThreshold) { - ShowMessage("SizeDxCoil: Potential issue with equipment sizing for " + DXCoil(DXCoilNum).DXCoilType + ' ' + - DXCoil(DXCoilNum).Name); - ShowContinueError("User-Specified Rated Total Cooling Capacity of " + RoundSigDigits(MSRatedTotCapUser, 2) + - " [W]"); - ShowContinueError("differs from Design Size Rated Totla Cooling Capacity of " + - RoundSigDigits(MSRatedTotCapDes, 2) + " [W]"); - ShowContinueError("This may, or may not, indicate mismatched component sizes."); - ShowContinueError("Verify that the value entered is intended and is consistent with other components."); - } - } + MSRatedTotCapDesAtMaxSpeed = TempSize; + DXCoil( DXCoilNum ).MSRatedTotCapDes( Mode ) = TempSize; + } + } else { + // cooling capacity at lower speeds + PrintFlag = true; + SizingMethod = CoolingCapacitySizing; + FieldNum = 7 + (Mode - 1) * 13; + SizingString = DXCoilNumericFields(DXCoilNum).PerfMode(1).FieldNames(FieldNum) + " [W]"; + if (IsAutoSize || !HardSizeNoDesRun) { + SizingMethod = AutoCalculateSizing; + // auto size low speed capacity to fraction of the highest speed capacity + if ( !HardSizeNoDesRun ) { + DataConstantUsedForSizing = MSRatedTotCapDesAtMaxSpeed; + } else { + DataConstantUsedForSizing = DXCoil( DXCoilNum ).MSRatedTotCap( DXCoil( DXCoilNum ).NumOfSpeeds ); } + DataFractionUsedForSizing = (float)Mode / DXCoil(DXCoilNum).NumOfSpeeds; + DXCoil( DXCoilNum ).MSRatedTotCapDes( Mode ) = DataConstantUsedForSizing * DataFractionUsedForSizing; } + TempSize = DXCoil(DXCoilNum).MSRatedTotCap(Mode); + DataEMSOverrideON = DXCoil(DXCoilNum).RatedTotCapEMSOverrideOn(Mode); + DataEMSOverride = DXCoil(DXCoilNum).RatedTotCapEMSOverrideValue(Mode); + RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); + DXCoil(DXCoilNum).MSRatedTotCap(Mode) = TempSize; } + DataEMSOverride = 0.0; + DataEMSOverrideON = false; + DataSizing::DataIsDXCoil = false; + DataSizing::DataCoolCoilCap = 0.0; + DataSizing::DataTotCapCurveIndex = 0; + DataSizing::DataConstantUsedForSizing = 0.0; + DataSizing::DataFractionUsedForSizing = 0.0; } // Ensure capacity at lower speed must be lower or equal to the capacity at higher speed. @@ -7616,36 +7455,28 @@ namespace DXCoils { if (DXCoil(DXCoilNum).MSRatedSHR(Mode) == AutoSize) { IsAutoSize = true; } - if (Mode == DXCoil(DXCoilNum).NumOfSpeeds) { - if (CurSysNum > 0) { - if (SizingDesRunThisAirSys) HardSizeNoDesRun = false; - if (!IsAutoSize && !SizingDesRunThisAirSys) { + if ( Mode == DXCoil( DXCoilNum ).NumOfSpeeds ) { + if ( CurSysNum > 0 ) { + if ( SizingDesRunThisAirSys ) HardSizeNoDesRun = false; + if ( !IsAutoSize && !SizingDesRunThisAirSys ) { HardSizeNoDesRun = true; - if (DXCoil(DXCoilNum).MSRatedSHR(Mode) > 0.0) { - ReportSizingOutput(DXCoil(DXCoilNum).DXCoilType, - DXCoil(DXCoilNum).Name, - "Speed " + TrimSigDigits(Mode) + " User-Specified Rated Sensible Heat Ratio", - DXCoil(DXCoilNum).MSRatedSHR(Mode)); + if ( DXCoil( DXCoilNum ).MSRatedSHR( Mode ) > 0.0 ) { // added for rated sensible cooling capacity estimate for html reporting, issue #7381 - DXCoil(DXCoilNum).RatedSHR(1) = DXCoil(DXCoilNum).MSRatedSHR(Mode); + DXCoil( DXCoilNum ).RatedSHR( 1 ) = DXCoil( DXCoilNum ).MSRatedSHR( Mode ); } } else { // autosize or hard-sized with system sizing data - CheckSysSizing(DXCoil(DXCoilNum).DXCoilType, DXCoil(DXCoilNum).Name); + CheckSysSizing( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name ); } - } else if (CurZoneEqNum > 0) { - if (SizingDesRunThisZone) HardSizeNoDesRun = false; - if (!IsAutoSize && !SizingDesRunThisZone) { + } else if ( CurZoneEqNum > 0 ) { + if ( SizingDesRunThisZone ) HardSizeNoDesRun = false; + if ( !IsAutoSize && !SizingDesRunThisZone ) { HardSizeNoDesRun = true; - if (DXCoil(DXCoilNum).MSRatedSHR(Mode) > 0.0) { - ReportSizingOutput(DXCoil(DXCoilNum).DXCoilType, - DXCoil(DXCoilNum).Name, - "Speed " + TrimSigDigits(Mode) + " User-Specified Rated Sensible Heat Ratio", - DXCoil(DXCoilNum).MSRatedSHR(Mode)); + if ( DXCoil( DXCoilNum ).MSRatedSHR( Mode ) > 0.0 ) { // added for rated sensible cooling capacity estimate for html reporting, issue #7381 - DXCoil(DXCoilNum).RatedSHR(1) = DXCoil(DXCoilNum).MSRatedSHR(Mode); + DXCoil( DXCoilNum ).RatedSHR( 1 ) = DXCoil( DXCoilNum ).MSRatedSHR( Mode ); } } else { // autosize or hard-sized with system sizing data - CheckZoneSizing(DXCoil(DXCoilNum).DXCoilType, DXCoil(DXCoilNum).Name); + CheckZoneSizing( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name ); } } if (DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode) >= SmallAirVolFlow && DXCoil(DXCoilNum).MSRatedTotCap(Mode) > 0.0) { @@ -7655,7 +7486,16 @@ namespace DXCoils { // [cfm/ton]. For flow / capacity ratios between the min and max we linearly interpolate between min and max SHR. Thus rated // SHR is a linear function of the rated flow / capacity ratio. This linear function (see below) is the result of a regression // of flow/capacity ratio vs SHR for several actual coils. - RatedVolFlowPerRatedTotCap = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode) / DXCoil(DXCoilNum).MSRatedTotCap(Mode); + if ( IsAutoSize || !HardSizeNoDesRun ) { + // this ratio is the same for all speeds if all autosized + if ( MSRatedTotCapDesAtMaxSpeed > 0.0 ) { + RatedVolFlowPerRatedTotCap = MSRatedAirVolFlowRateDes / MSRatedTotCapDesAtMaxSpeed; + } else { + RatedVolFlowPerRatedTotCap = 0.0; + } + } else { + RatedVolFlowPerRatedTotCap = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode) / DXCoil(DXCoilNum).MSRatedTotCap(Mode); + } if (RatedVolFlowPerRatedTotCap > MaxRatedVolFlowPerRatedTotCap(DXCT)) { MSRatedSHRDes = 0.431 + 6086.0 * MaxRatedVolFlowPerRatedTotCap(DXCT); } else if (RatedVolFlowPerRatedTotCap < MinRatedVolFlowPerRatedTotCap(DXCT)) { @@ -7667,40 +7507,50 @@ namespace DXCoils { MSRatedSHRDes = 1.0; } } else { - MSRatedSHRDes = DXCoil(DXCoilNum).MSRatedSHR(Mode + 1); + // design SHR value at the maxiumum speed calculated above was supposed to be used for all speeds + // Now user specified SHR value is used when the SHR field is not autosized and design day run is + // set to yes unless the code below is commented out + MSRatedSHRDes = DXCoil( DXCoilNum ).MSRatedSHR( Mode + 1 ); } - if (!HardSizeNoDesRun) { - if (IsAutoSize) { - DXCoil(DXCoilNum).MSRatedSHR(Mode) = MSRatedSHRDes; + if (IsAutoSize) { + DXCoil(DXCoilNum).MSRatedSHR(Mode) = MSRatedSHRDes; + ReportSizingOutput(DXCoil(DXCoilNum).DXCoilType, + DXCoil(DXCoilNum).Name, + "Design Size Speed " + TrimSigDigits(Mode) + " Rated Sensible Heat Ratio", + MSRatedSHRDes); + // added for rated sensible cooling capacity estimate for html reporting, issue #7381 + DXCoil(DXCoilNum).RatedSHR(1) = MSRatedSHRDes; + + } else if ( HardSizeNoDesRun ) { + if (DXCoil(DXCoilNum).MSRatedSHR(Mode) > 0.0) { + MSRatedSHRUser = DXCoil(DXCoilNum).MSRatedSHR(Mode); ReportSizingOutput(DXCoil(DXCoilNum).DXCoilType, - DXCoil(DXCoilNum).Name, - "Speed " + TrimSigDigits(Mode) + " Design Size Rated Sensible Heat Ratio", - MSRatedSHRDes); - // added for rated sensible cooling capacity estimate for html reporting, issue #7381 - DXCoil(DXCoilNum).RatedSHR(1) = MSRatedSHRDes; - } else { - if (DXCoil(DXCoilNum).MSRatedSHR(Mode) > 0.0 && MSRatedSHRDes > 0.0 && !HardSizeNoDesRun) { - MSRatedSHRUser = DXCoil(DXCoilNum).MSRatedSHR(Mode); - ReportSizingOutput(DXCoil(DXCoilNum).DXCoilType, - DXCoil(DXCoilNum).Name, - "Speed " + TrimSigDigits(Mode) + " Design Size Rated Sensible Heat Ratio", - MSRatedSHRDes, - "Speed " + TrimSigDigits(Mode) + " User-Specified Rated Sensible Heat Ratio", - MSRatedSHRUser); - if (DisplayExtraWarnings) { - if ((std::abs(MSRatedSHRDes - MSRatedSHRUser) / MSRatedSHRUser) > AutoVsHardSizingThreshold) { - ShowMessage("SizeDxCoil: Potential issue with equipment sizing for " + DXCoil(DXCoilNum).DXCoilType + ' ' + - DXCoil(DXCoilNum).Name); - ShowContinueError("User-Specified Rated Sensible Heat Ratio of " + RoundSigDigits(MSRatedSHRUser, 3)); - ShowContinueError("differs from Design Size Rated Sensible Heat Ratio of " + RoundSigDigits(MSRatedSHRDes, 3)); - ShowContinueError("This may, or may not, indicate mismatched component sizes."); - ShowContinueError("Verify that the value entered is intended and is consistent with other components."); - } + DXCoil(DXCoilNum).Name, + "User-Specified Speed " + TrimSigDigits(Mode) + " Rated Sensible Heat Ratio", + MSRatedSHRUser); + } + } else { + if (DXCoil(DXCoilNum).MSRatedSHR(Mode) > 0.0 && MSRatedSHRDes > 0.0 && !HardSizeNoDesRun) { + MSRatedSHRUser = DXCoil(DXCoilNum).MSRatedSHR(Mode); + ReportSizingOutput(DXCoil(DXCoilNum).DXCoilType, + DXCoil(DXCoilNum).Name, + "Design Size Speed " + TrimSigDigits(Mode) + " Rated Sensible Heat Ratio", + MSRatedSHRDes, + "User-Specified Speed " + TrimSigDigits(Mode) + " Rated Sensible Heat Ratio", + MSRatedSHRUser); + if (DisplayExtraWarnings) { + if ((std::abs(MSRatedSHRDes - MSRatedSHRUser) / MSRatedSHRUser) > AutoVsHardSizingThreshold) { + ShowMessage("SizeDxCoil: Potential issue with equipment sizing for " + DXCoil(DXCoilNum).DXCoilType + ' ' + + DXCoil(DXCoilNum).Name); + ShowContinueError("User-Specified Rated Sensible Heat Ratio of " + RoundSigDigits(MSRatedSHRUser, 3)); + ShowContinueError("differs from Design Size Rated Sensible Heat Ratio of " + RoundSigDigits(MSRatedSHRDes, 3)); + ShowContinueError("This may, or may not, indicate mismatched component sizes."); + ShowContinueError("Verify that the value entered is intended and is consistent with other components."); } } } - } + } } // Rated Evapovative condenser airflow rates @@ -7709,23 +7559,27 @@ namespace DXCoils { if (DXCoil(DXCoilNum).MSEvapCondAirFlow(Mode) == AutoSize) { IsAutoSize = true; } - // Auto size condenser air flow to Total Capacity * 0.000114 m3/s/w (850 cfm/ton) - MSEvapCondAirFlowDes = DXCoil(DXCoilNum).MSRatedTotCap(Mode) * 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; + } if (IsAutoSize) { DXCoil(DXCoilNum).MSEvapCondAirFlow(Mode) = MSEvapCondAirFlowDes; ReportSizingOutput(DXCoil(DXCoilNum).DXCoilType, DXCoil(DXCoilNum).Name, - "Speed " + TrimSigDigits(Mode) + " Design Size Evaporative Condenser Air Flow Rate [m3/s]", + "Design Size Speed " + TrimSigDigits(Mode) + " Evaporative Condenser Air Flow Rate [m3/s]", MSEvapCondAirFlowDes); } else { if (DXCoil(DXCoilNum).MSEvapCondAirFlow(Mode) > 0.0 && MSEvapCondAirFlowDes > 0.0 && !HardSizeNoDesRun) { MSEvapCondAirFlowUser = DXCoil(DXCoilNum).MSEvapCondAirFlow(Mode); ReportSizingOutput(DXCoil(DXCoilNum).DXCoilType, DXCoil(DXCoilNum).Name, - "Speed " + TrimSigDigits(Mode) + " Design Size Evaporative Condenser Air Flow Rate [m3/s]", + "Design Size Speed " + TrimSigDigits(Mode) + " Evaporative Condenser Air Flow Rate [m3/s]", MSEvapCondAirFlowDes, - "Speed " + TrimSigDigits(Mode) + " User-Specified Evaporative Condenser Air Flow Rate [m3/s]", + "User-Specified Speed " + TrimSigDigits(Mode) + " Evaporative Condenser Air Flow Rate [m3/s]", MSEvapCondAirFlowUser); if (DisplayExtraWarnings) { if ((std::abs(MSEvapCondAirFlowDes - MSEvapCondAirFlowUser) / MSEvapCondAirFlowUser) > AutoVsHardSizingThreshold) { @@ -7761,23 +7615,29 @@ namespace DXCoils { if (DXCoil(DXCoilNum).MSEvapCondPumpElecNomPower(Mode) == AutoSize) { IsAutoSize = true; } - // Auto size low speed evap condenser pump power to 1/3 Total Capacity * 0.004266 w/w (15 w/ton) - MSEvapCondPumpElecNomPowerDes = DXCoil(DXCoilNum).MSRatedTotCap(Mode) * 0.004266; + + 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 { + // this is done to duplicate any existing calc method + MSEvapCondPumpElecNomPowerDes = DXCoil(DXCoilNum).MSRatedTotCap(Mode) * 0.004266; + } // Design Size data is always available if (IsAutoSize) { DXCoil(DXCoilNum).MSEvapCondPumpElecNomPower(Mode) = MSEvapCondPumpElecNomPowerDes; ReportSizingOutput(DXCoil(DXCoilNum).DXCoilType, DXCoil(DXCoilNum).Name, - "Speed " + TrimSigDigits(Mode) + " Design Size Rated Evaporative Condenser Pump Power Consumption [W]", + "Design Size Speed " + TrimSigDigits(Mode) + " Rated Evaporative Condenser Pump Power Consumption [W]", MSEvapCondPumpElecNomPowerDes); } else { if (DXCoil(DXCoilNum).MSEvapCondPumpElecNomPower(Mode) > 0.0 && MSEvapCondPumpElecNomPowerDes > 0.0 && !HardSizeNoDesRun) { MSEvapCondPumpElecNomPowerUser = DXCoil(DXCoilNum).MSEvapCondPumpElecNomPower(Mode); ReportSizingOutput(DXCoil(DXCoilNum).DXCoilType, DXCoil(DXCoilNum).Name, - "Speed " + TrimSigDigits(Mode) + " Design Size Rated Evaporative Condenser Pump Power Consumption [W]", + "Design Size Speed " + TrimSigDigits(Mode) + " Rated Evaporative Condenser Pump Power Consumption [W]", MSEvapCondPumpElecNomPowerDes, - "Speed " + TrimSigDigits(Mode) + " User-Specified Rated Evaporative Condenser Pump Power Consumption [W]", + "User-Specified Speed " + TrimSigDigits(Mode) + " Rated Evaporative Condenser Pump Power Consumption [W]", MSEvapCondPumpElecNomPowerUser); if (DisplayExtraWarnings) { if ((std::abs(MSEvapCondPumpElecNomPowerDes - MSEvapCondPumpElecNomPowerUser) / MSEvapCondPumpElecNomPowerUser) > @@ -7817,37 +7677,47 @@ namespace DXCoils { if (DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode) == AutoSize) { IsAutoSize = true; } + DataSizing::DataIsDXCoil = true; + CompName = DXCoil(DXCoilNum).Name; + CompType = DXCoil(DXCoilNum).DXCoilType; // Sizing rated air flow rate if (Mode == DXCoil(DXCoilNum).NumOfSpeeds) { - CompName = DXCoil(DXCoilNum).Name; FieldNum = 12 + (Mode - 1) * 5; SizingString = DXCoilNumericFields(DXCoilNum).PerfMode(1).FieldNames(FieldNum) + " [m3/s]"; SizingMethod = HeatingAirflowSizing; - CompType = DXCoil(DXCoilNum).DXCoilType; TempSize = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode); - DataIsDXCoil = true; DataEMSOverrideON = DXCoil(DXCoilNum).RatedAirVolFlowRateEMSOverrideON(Mode); DataEMSOverride = DXCoil(DXCoilNum).RatedAirVolFlowRateEMSOverrideValue(Mode); RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode) = TempSize; - DataIsDXCoil = false; - DataEMSOverrideON = false; - DataEMSOverride = 0.0; + if ( !IsAutoSize && !HardSizeNoDesRun ) { + TempSize = AutoSize; + bPRINT = false; + RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, bPRINT, RoutineName); + MSRatedAirVolFlowRateDes = TempSize; + bPRINT = true; + } } else { - CompName = DXCoil(DXCoilNum).Name; FieldNum = 12 + (Mode - 1) * 5; SizingString = DXCoilNumericFields(DXCoilNum).PerfMode(1).FieldNames(FieldNum) + " [m3/s]"; - SizingMethod = AutoCalculateSizing; - CompType = DXCoil(DXCoilNum).DXCoilType; - // Auto size low speed flow to fraction of high speed capacity - DataConstantUsedForSizing = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(DXCoil(DXCoilNum).NumOfSpeeds); - DataFractionUsedForSizing = (float)Mode / DXCoil(DXCoilNum).NumOfSpeeds; - TempSize = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode); + SizingMethod = HeatingAirflowSizing; + 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; + DataFractionUsedForSizing = (float)Mode / DXCoil(DXCoilNum).NumOfSpeeds; + } + TempSize = DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( Mode ); RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, bPRINT, RoutineName); DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode) = TempSize; - DataConstantUsedForSizing = 0.0; - DataFractionUsedForSizing = 0.0; } + DataEMSOverride = 0.0; + DataEMSOverrideON = false; + DataSizing::DataIsDXCoil = false; + DataSizing::DataTotCapCurveIndex = 0; + DataSizing::DataConstantUsedForSizing = 0.0; + DataSizing::DataFractionUsedForSizing = 0.0; } // Ensure flow rate at lower speed must be lower or equal to the flow rate at higher speed. Otherwise, a severe error is isssued. @@ -7873,16 +7743,16 @@ namespace DXCoils { DXCoil(DXCoilNum).MSSecCoilAirFlow(Mode) = SecCoilAirFlowDes; ReportSizingOutput(DXCoil(DXCoilNum).DXCoilType, DXCoil(DXCoilNum).Name, - "Speed " + TrimSigDigits(Mode) + " Design Size Secondary Coil Air Flow Rate [m3/s]", + "Design Size Speed " + TrimSigDigits(Mode) + " Secondary Coil Air Flow Rate [m3/s]", SecCoilAirFlowDes); } else { if (DXCoil(DXCoilNum).MSSecCoilAirFlow(Mode) > 0.0 && SecCoilAirFlowDes > 0.0 && !HardSizeNoDesRun) { SecCoilAirFlowUser = DXCoil(DXCoilNum).MSSecCoilAirFlow(Mode); ReportSizingOutput(DXCoil(DXCoilNum).DXCoilType, DXCoil(DXCoilNum).Name, - "Speed " + TrimSigDigits(Mode) + " Design Size Secondary Coil Air Flow Rate [m3/s]", + "Design Size Speed " + TrimSigDigits(Mode) + " Secondary Coil Air Flow Rate [m3/s]", SecCoilAirFlowDes, - "Speed " + TrimSigDigits(Mode) + " User-Specified Secondary Coil Air Flow Rate [m3/s]", + "User-Specified Speed " + TrimSigDigits(Mode) + " Secondary Coil Air Flow Rate [m3/s]", SecCoilAirFlowUser); if (DisplayExtraWarnings) { if ((std::abs(SecCoilAirFlowDes - SecCoilAirFlowUser) / SecCoilAirFlowUser) > AutoVsHardSizingThreshold) { @@ -7907,49 +7777,58 @@ namespace DXCoils { if (DXCoil(DXCoilNum).MSRatedTotCap(Mode) == AutoSize) { IsAutoSize = true; } - + DataSizing::DataIsDXCoil = true; + CompName = DXCoil(DXCoilNum).Name; + CompType = DXCoil(DXCoilNum).DXCoilType; if (Mode == DXCoil(DXCoilNum).NumOfSpeeds) { - - PrintFlag = true; - DataIsDXCoil = true; - CompName = DXCoil(DXCoilNum).Name; - CompType = DXCoil(DXCoilNum).DXCoilType; SizingMethod = HeatingCapacitySizing; + DataSizing::DataFlowUsedForSizing = DXCoil(DXCoilNum).MSRatedAirVolFlowRate(Mode); FieldNum = 10 + (Mode - 1) * 5; SizingString = DXCoilNumericFields(DXCoilNum).PerfMode(1).FieldNames(FieldNum) + " [W]"; DataTotCapCurveIndex = DXCoil(DXCoilNum).MSCCapFTemp(Mode); if (IsAutoSize || !HardSizeNoDesRun) { // Heating capacity is assumed to be equal to the cooling capacity + PrintFlag = false; SizingMethod = AutoCalculateSizing; DataFractionUsedForSizing = 1.0; if (DXCoil(DXCoilNum).CompanionUpstreamDXCoil > 0) { NumOfSpeedCompanion = DXCoil(DXCoil(DXCoilNum).CompanionUpstreamDXCoil).NumOfSpeeds; - DataConstantUsedForSizing = DXCoil(DXCoil(DXCoilNum).CompanionUpstreamDXCoil).MSRatedTotCap(NumOfSpeedCompanion); + DataConstantUsedForSizing = DXCoil(DXCoil(DXCoilNum).CompanionUpstreamDXCoil).MSRatedTotCapDes(NumOfSpeedCompanion); } else { DataConstantUsedForSizing = DXCoil(DXCoilNum).RatedTotCap(1); // sized above } + TempSize = DataSizing::AutoSize; + DataEMSOverrideON = DXCoil(DXCoilNum).RatedTotCapEMSOverrideOn(Mode); + DataEMSOverride = DXCoil(DXCoilNum).RatedTotCapEMSOverrideValue(Mode); + RequestSizing( CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName ); + MSRatedTotCapDesAtMaxSpeed = TempSize; + SizingMethod = AutoCalculateSizing; + DataConstantUsedForSizing = TempSize; + DataFractionUsedForSizing = 1.0; } + PrintFlag = true; TempSize = DXCoil(DXCoilNum).MSRatedTotCap(Mode); DataEMSOverrideON = DXCoil(DXCoilNum).RatedTotCapEMSOverrideOn(Mode); DataEMSOverride = DXCoil(DXCoilNum).RatedTotCapEMSOverrideValue(Mode); RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); DXCoil(DXCoilNum).MSRatedTotCap(Mode) = TempSize; - + if (IsAutoSize) { + MSRatedTotCapDesAtMaxSpeed = TempSize; + } } else { - PrintFlag = true; - CompName = DXCoil(DXCoilNum).Name; - CompType = DXCoil(DXCoilNum).DXCoilType; - SizingMethod = AutoCalculateSizing; + SizingMethod = HeatingCapacitySizing; FieldNum = 10 + (Mode - 1) * 5; SizingString = DXCoilNumericFields(DXCoilNum).PerfMode(1).FieldNames(FieldNum) + " [W]"; if (IsAutoSize || !HardSizeNoDesRun) { - // Auto size low speed capacity to fraction of high speed capacity - DataConstantUsedForSizing = DXCoil(DXCoilNum).MSRatedTotCap(DXCoil(DXCoilNum).NumOfSpeeds); + SizingMethod = AutoCalculateSizing; + // auto size low speed capacity to fraction of the highest speed capacity + if ( !HardSizeNoDesRun ) { + DataConstantUsedForSizing = MSRatedTotCapDesAtMaxSpeed; + } else { + DataConstantUsedForSizing = DXCoil( DXCoilNum ).MSRatedTotCap( DXCoil( DXCoilNum ).NumOfSpeeds ); + } DataFractionUsedForSizing = (float)Mode / DXCoil(DXCoilNum).NumOfSpeeds; - } else { - DataConstantUsedForSizing = DXCoil(DXCoilNum).MSRatedTotCap(Mode); - DataFractionUsedForSizing = 1.0; } TempSize = DXCoil(DXCoilNum).MSRatedTotCap(Mode); DataEMSOverrideON = DXCoil(DXCoilNum).RatedTotCapEMSOverrideOn(Mode); @@ -7957,17 +7836,15 @@ namespace DXCoils { RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); DXCoil(DXCoilNum).MSRatedTotCap(Mode) = TempSize; } - PrintFlag = false; - DataIsDXCoil = false; - DataFlowUsedForSizing = 0.0; - DataCoolCoilCap = 0.0; - DataTotCapCurveIndex = 0; DataEMSOverrideON = false; DataEMSOverride = 0.0; - DataConstantUsedForSizing = 0.0; - DataFractionUsedForSizing = 0.0; - DataTotCapCurveValue = 0.0; + DataSizing::DataIsDXCoil = false; + DataSizing::DataFlowUsedForSizing = 0.0; + DataSizing::DataCoolCoilCap = 0.0; + DataSizing::DataTotCapCurveIndex = 0; + DataSizing::DataConstantUsedForSizing = 0.0; + DataSizing::DataFractionUsedForSizing = 0.0; } // Ensure capacity at lower speed must be lower or equal to the capacity at higher speed. for (Mode = 1; Mode <= DXCoil(DXCoilNum).NumOfSpeeds - 1; ++Mode) { diff --git a/src/EnergyPlus/DXCoils.hh b/src/EnergyPlus/DXCoils.hh index 8c74bb538f9..13e64f6a911 100644 --- a/src/EnergyPlus/DXCoils.hh +++ b/src/EnergyPlus/DXCoils.hh @@ -419,6 +419,7 @@ namespace DXCoils { bool LatentImpact; // Latent degradation applied to Speed Number > 1 Array1D_int MSErrIndex; // index flag for num speeds/recurring messages Array1D MSRatedTotCap; // Rated cooling capacity for MS heat pump [W] + Array1D MSRatedTotCapDes; // Autosized Gross total cooling capacity at rated conditions [watts] Array1D MSRatedSHR; // Rated SHR for MS heat pump [dimensionless] Array1D MSRatedCOP; // Rated COP for MS heat pump [dimensionless] Array1D MSRatedAirVolFlowRate; // Air volume flow rate through unit at rated conditions [m3/s] diff --git a/src/EnergyPlus/UnitarySystem.cc b/src/EnergyPlus/UnitarySystem.cc index 3e8a96b6485..55995f8eaad 100644 --- a/src/EnergyPlus/UnitarySystem.cc +++ b/src/EnergyPlus/UnitarySystem.cc @@ -1526,6 +1526,14 @@ namespace UnitarySystems { bool anyEMSRan; EMSManager::ManageEMS(DataGlobals::emsCallFromUnitarySystemSizing, anyEMSRan); // calling point + bool HardSizeNoDesRun; // Indicator to a hard-sized field with no design sizing data + + // Initiate all reporting variables + if (DataSizing::SysSizingRunDone || DataSizing::ZoneSizingRunDone) { + HardSizeNoDesRun = false; + } else { + HardSizeNoDesRun = true; + } std::string SizingString(""); std::string CompName = this->Name; @@ -1663,7 +1671,26 @@ namespace UnitarySystems { EqSizing.CoolingCapacity = true; EqSizing.DesCoolingLoad = CoolCapAtPeak; } else { - CoolCapAtPeak = this->m_DesignCoolingCapacity; + if ( !HardSizeNoDesRun && (CoolingSAFlowMethod != FlowPerCoolingCapacity && this->m_DesignCoolingCapacity > 0.0)) { + if ( this->m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_MultiSpeedCooling ) { + DataSizing::DataTotCapCurveIndex = DXCoils::GetDXCoilCapFTCurveIndex( this->m_CoolingCoilIndex, ErrFound ); + DataSizing::DataIsDXCoil = true; + } + if (this->m_CoolingCoilType_Num == DataHVACGlobals::Coil_CoolingAirToAirVariableSpeed) { + DataSizing::DataTotCapCurveIndex = VariableSpeedCoils::GetVSCoilCapFTCurveIndex(this->m_CoolingCoilIndex, ErrFound); + DataSizing::DataIsDXCoil = true; + } + SizingMethod = DataHVACGlobals::CoolingCapacitySizing; + DataSizing::DataFlowUsedForSizing = EqSizing.CoolingAirVolFlow; + TempSize = DataSizing::AutoSize; + ReportSizingManager::RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); + CoolCapAtPeak = TempSize; + DataSizing::DXCoolCap = CoolCapAtPeak; + EqSizing.CoolingCapacity = true; + EqSizing.DesCoolingLoad = CoolCapAtPeak; + } else { + CoolCapAtPeak = this->m_DesignCoolingCapacity; + } } DataSizing::DataIsDXCoil = false; DataSizing::DataTotCapCurveIndex = 0; @@ -1744,7 +1771,26 @@ namespace UnitarySystems { EqSizing.HeatingCapacity = true; EqSizing.DesHeatingLoad = HeatCapAtPeak; } else { - HeatCapAtPeak = this->m_DesignHeatingCapacity; + if ( !HardSizeNoDesRun && (HeatingSAFlowMethod != FlowPerHeatingCapacity && this->m_DesignHeatingCapacity != DataSizing::AutoSize)) { + if ( this->m_HeatingCoilType_Num == DataHVACGlobals::CoilDX_MultiSpeedHeating ) { + SizingMethod = DataHVACGlobals::HeatingCapacitySizing; + DataSizing::DataFlowUsedForSizing = EqSizing.HeatingAirVolFlow; + TempSize = DataSizing::AutoSize; + DataSizing::DataHeatSizeRatio = this->m_HeatingSizingRatio; + DataSizing::DataTotCapCurveIndex = DXCoils::GetDXCoilCapFTCurveIndex(this->m_HeatingCoilIndex, ErrFound); + DataSizing::DataIsDXCoil = true; + if (DataSizing::CurSysNum > 0) + DataAirLoop::AirLoopControlInfo(AirLoopNum).UnitarySysSimulating = + false; // set to false to allow calculation of actual heating capacity + ReportSizingManager::RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); + if (DataSizing::CurSysNum > 0) DataAirLoop::AirLoopControlInfo(AirLoopNum).UnitarySysSimulating = true; + HeatCapAtPeak = TempSize; + EqSizing.HeatingCapacity = true; + EqSizing.DesHeatingLoad = HeatCapAtPeak; + } + } else { + HeatCapAtPeak = this->m_DesignHeatingCapacity; + } } // if ( ! UnitarySystem( UnitarySysNum ).CoolCoilExists )DXCoolCap = HeatCapAtPeak; DataSizing::DataIsDXCoil = false; @@ -2019,8 +2065,13 @@ namespace UnitarySystems { EqSizing.CoolingAirVolFlow * DataEnvironment::StdRhoAir; // doesn't matter what this value is since only coil size is needed and CompOn = 0 here DXCoils::SimDXCoilMultiSpeed(blankString, 1.0, 1.0, this->m_CoolingCoilIndex, 0, 0, 0); - DataSizing::DXCoolCap = DXCoils::GetCoilCapacityByIndexType(this->m_CoolingCoilIndex, this->m_CoolingCoilType_Num, ErrFound); - EqSizing.DesCoolingLoad = DataSizing::DXCoolCap; + if ( !HardSizeNoDesRun && EqSizing.Capacity ) { + // do nothing, the vars EqSizing.DesCoolingLoad and DataSizing::DXCoolCap are already set earlier and the values could be max of the + // cooling and heating austosized values. Thus reseting them here to user specified value may not be the design size used else where + } else { + DataSizing::DXCoolCap = DXCoils::GetCoilCapacityByIndexType( this->m_CoolingCoilIndex, this->m_CoolingCoilType_Num, ErrFound ); + EqSizing.DesCoolingLoad = DataSizing::DXCoolCap; + } MSHPIndex = this->m_DesignSpecMSHPIndex; if (MSHPIndex > -1) { @@ -2410,7 +2461,14 @@ namespace UnitarySystems { DataSizing::DataHeatSizeRatio = 1.0; } - DataSizing::UnitaryHeatCap = this->m_DesignHeatingCapacity; + if ( !HardSizeNoDesRun && (EqSizing.Capacity && EqSizing.DesHeatingLoad > 0.0)) { + // vars EqSizing.DesHeatingLoad is already set earlier and supplemental heating coil should + // be sized to design value instead of user specified value if HardSizeNoDesRun is false + DataSizing::UnitaryHeatCap = EqSizing.DesHeatingLoad; + + } else { + DataSizing::UnitaryHeatCap = this->m_DesignHeatingCapacity; + } if ((this->m_HeatCoilExists || this->m_SuppCoilExists) && this->m_ControlType != ControlType::CCMASHRAE) { diff --git a/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md b/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md index d42f80db545..a932086351f 100644 --- a/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md +++ b/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md @@ -12,3 +12,41 @@ This will eventually become a more structured file, but currently it isn't clear A new column "Peak Load Type to Size On" has been added to the `Coil Sizing Details:Coils` report See [7397](https://github.com/NREL/EnergyPlus/pull/7397) + +### Name re-ordering in the sizing labels and modified variable names for MulitSpeed DX Cooling and Heating Coils + +The change impacts rated capacity, rated flow rate, rated sensible heat ratio, etc, see sample changes below + +``` +Before: +'Speed X' Design Size Design Size Rated Total Cooling Capacity +'Speed X' Design Size Gross Rated Heating Capacity +'Speed X' Design Size Rated Air Flow Rate +'Speed X' Design Size Rated Sensible Heat Ratio +'Speed X' Design Size Evaporative Condenser Air Flow Rate +'Speed X' Design Size Rated Evaporative Condenser Pump Power Consumption + +'Speed X' User-Specified User-Specified Total Cooling Capacity +'Speed X' User-Specified Gross Rated Heating Capacity +'Speed X' User-Specified Rated Air Flow Rate +'Speed X' User-Specified Rated Sensible Heat Ratio +'Speed X' User-Specified Evaporative Condenser Air Flow Rate +'Speed X' User-Specified Rated Evaporative Condenser Pump Power Consumption + +After: +Design Size 'Speed X' Gross Rated Total Cooling Capacity +Design Size 'Speed X' Gross Rated Heating Capacity +Design Size 'Speed X' Rated Air Flow Rate +Design Size 'Speed X' Rated Sensible Heat Ratio +Design Size 'Speed X' Evaporative Condenser Air Flow Rate +Design Size 'Speed X' Rated Evaporative Condenser Pump Power Consumption + +User-Specified 'Speed X' Gross Rated Total Cooling Capacity +User-Specified 'Speed X' Gross Rated Heating Capacity +User-Specified 'Speed X' Rated Air Flow Rate +User-Specified 'Speed X' Rated Sensible Heat Ratio +User-Specified 'Speed X' Evaporative Condenser Air Flow Rate +User-Specified 'Speed X' Rated Evaporative Condenser Pump Power Consumption + + +``` \ No newline at end of file diff --git a/tst/EnergyPlus/unit/DXCoils.unit.cc b/tst/EnergyPlus/unit/DXCoils.unit.cc index c4e0379a1fb..0b4af144a59 100644 --- a/tst/EnergyPlus/unit/DXCoils.unit.cc +++ b/tst/EnergyPlus/unit/DXCoils.unit.cc @@ -3142,4 +3142,695 @@ TEST_F(EnergyPlusFixture, TestMultiSpeedCoolingCoilTabularReporting) EXPECT_EQ("10237.271", RetrievePreDefTableEntry(pdch2CoilFinalSensCap, "Coil Final Gross Sensible Capacity [W]")); } +TEST_F(EnergyPlusFixture, TestMultiSpeedCoilsAutoSizingOutput) +{ + // Test rated heating capacity for Coil:Heating:DX:MultiSpeed #7477 + + std::string const idf_objects = delimited_string({ + + " Coil:Cooling:DX:MultiSpeed,", + " ashp clg coil, !- Name", + " , !- Availability Schedule Name", + " ashp unitary system Fan - Cooling Coil Node, !- Air Inlet Node Name", + " ashp unitary system Cooling Coil - Heating Coil Node, !- Air Outlet Node Name", + " , !- Condenser Air Inlet Node Name", + " AirCooled, !- Condenser Type", + " , !- Minimum Outdoor Dry-Bulb Temperature for Compressor Operation {C}", + " , !- Supply Water Storage Tank Name", + " , !- Condensate Collection Water Storage Tank Name", + " No, !- Apply Part Load Fraction to Speeds Greater than 1", + " No, !- Apply Latent Degradation to Speeds Greater than 1", + " 0, !- Crankcase Heater Capacity {W}", + " 10, !- Maximum Outdoor Dry-Bulb Temperature for Crankcase Heater Operation {C}", + " 0, !- Basin Heater Capacity {W/K}", + " 2, !- Basin Heater Setpoint Temperature {C}", + " , !- Basin Heater Operating Schedule Name", + " Electricity, !- Fuel Type", + " 2, !- Number of Speeds", + " AutoSize, !- Speed Gross Rated Total Cooling Capacity 1 {W}", + " AutoSize, !- Speed Gross Rated Sensible Heat Ratio 1", + " 4.80, !- Speed Gross Rated Cooling COP 1 {W/W}", + " AutoSize, !- Speed Rated Air Flow Rate 1 {m3/s}", + " 773.3, !- Speed Rated Evaporator Fan Power Per Volume Flow Rate 1 {W/(m3/s)}", + " Cool-Cap-fT1, !- Speed Total Cooling Capacity Function of Temperature Curve Name 1", + " Cool-Cap-fFF1, !- Speed Total Cooling Capacity Function of Flow Fraction Curve Name 1", + " Cool-EIR-fT1, !- Speed Energy Input Ratio Function of Temperature Curve Name 1", + " Cool-EIR-fFF1, !- Speed Energy Input Ratio Function of Flow Fraction Curve Name 1", + " Cool-PLF-fPLR1, !- Speed Part Load Fraction Correlation Curve Name 1", + " 1000, !- Speed Nominal Time for Condensate Removal to Begin 1 {s}", + " 1.5, !- Speed Ratio of Initial Moisture Evaporation Rate and Steady State Latent Capacity 1 " + "{dimensionless}", + " 3, !- Speed Maximum Cycling Rate 1 {cycles/hr}", + " 45, !- Speed Latent Capacity Time Constant 1 {s}", + " 0.2, !- Speed Rated Waste Heat Fraction of Power Input 1 {dimensionless}", + " ConstantBiquadratic 1, !- Speed Waste Heat Function of Temperature Curve Name 1", + " 0.9, !- Speed Evaporative Condenser Effectiveness 1 {dimensionless}", + " AutoSize, !- Speed Evaporative Condenser Air Flow Rate 1 {m3/s}", + " AutoSize, !- Speed Rated Evaporative Condenser Pump Power Consumption 1 {W}", + " AutoSize, !- Speed Gross Rated Total Cooling Capacity 2 {W}", + " AutoSize, !- Speed Gross Rated Sensible Heat Ratio 2", + " 4.80, !- Speed Gross Rated Cooling COP 2 {W/W}", + " AutoSize, !- Speed Rated Air Flow Rate 2 {m3/s}", + " 773.3, !- Speed Rated Evaporator Fan Power Per Volume Flow Rate 2 {W/(m3/s)}", + " Cool-Cap-fT2, !- Speed Total Cooling Capacity Function of Temperature Curve Name 2", + " Cool-Cap-fFF2, !- Speed Total Cooling Capacity Function of Flow Fraction Curve Name 2", + " Cool-EIR-fT2, !- Speed Energy Input Ratio Function of Temperature Curve Name 2", + " Cool-EIR-fFF2, !- Speed Energy Input Ratio Function of Flow Fraction Curve Name 2", + " Cool-PLF-fPLR2, !- Speed Part Load Fraction Correlation Curve Name 2", + " 1000, !- Speed Nominal Time for Condensate Removal to Begin 2 {s}", + " 1.5, !- Speed Ratio of Initial Moisture Evaporation Rate and Steady State Latent Capacity 2 " + "{dimensionless}", + " 3, !- Speed Maximum Cycling Rate 2 {cycles/hr}", + " 45, !- Speed Latent Capacity Time Constant 2 {s}", + " 0.2, !- Speed Rated Waste Heat Fraction of Power Input 2 {dimensionless}", + " ConstantBiquadratic 1, !- Speed Waste Heat Function of Temperature Curve Name 2", + " 0.9, !- Speed Evaporative Condenser Effectiveness 2 {dimensionless}", + " AutoSize, !- Speed Evaporative Condenser Air Flow Rate 2 {m3/s}", + " AutoSize; !- Speed Rated Evaporative Condenser Pump Power Consumption 2 {W}", + + " Curve:Biquadratic,", + " Cool-Cap-fT1, !- Name", + " 1.658788451, !- Coefficient1 Constant", + " -0.0834530076, !- Coefficient2 x", + " 0.00342409032, !- Coefficient3 x**2", + " 0.0024332436, !- Coefficient4 y", + " -4.5036e-005, !- Coefficient5 y**2", + " -0.00053367984, !- Coefficient6 x*y", + " 13.88, !- Minimum Value of x {BasedOnField A2}", + " 23.88, !- Maximum Value of x {BasedOnField A2}", + " 18.33, !- Minimum Value of y {BasedOnField A3}", + " 51.66; !- Maximum Value of y {BasedOnField A3}", + + " Curve:Quadratic,", + " Cool-Cap-fFF1, !- Name", + " 0.655239515, !- Coefficient1 Constant", + " 0.511655216, !- Coefficient2 x", + " -0.166894731, !- Coefficient3 x**2", + " 0, !- Minimum Value of x {BasedOnField A2}", + " 2, !- Maximum Value of x {BasedOnField A2}", + " 0, !- Minimum Curve Output {BasedOnField A3}", + " 2; !- Maximum Curve Output {BasedOnField A3}", + + " Curve:Biquadratic,", + " Cool-EIR-fT1, !- Name", + " -0.582915701, !- Coefficient1 Constant", + " 0.1581006726, !- Coefficient2 x", + " -0.00439794684, !- Coefficient3 x**2", + " -0.020335122, !- Coefficient4 y", + " 0.00107983368, !- Coefficient5 y**2", + " -0.0006395922, !- Coefficient6 x*y", + " 13.88, !- Minimum Value of x {BasedOnField A2}", + " 23.88, !- Maximum Value of x {BasedOnField A2}", + " 18.33, !- Minimum Value of y {BasedOnField A3}", + " 51.66; !- Maximum Value of y {BasedOnField A3}", + + " Curve:Quadratic,", + " Cool-EIR-fFF1, !- Name", + " 1.639108268, !- Coefficient1 Constant", + " -0.998953996, !- Coefficient2 x", + " 0.359845728, !- Coefficient3 x**2", + " 0, !- Minimum Value of x {BasedOnField A2}", + " 2, !- Maximum Value of x {BasedOnField A2}", + " 0, !- Minimum Curve Output {BasedOnField A3}", + " 2; !- Maximum Curve Output {BasedOnField A3}", + + " Curve:Quadratic,", + " Cool-PLF-fPLR1, !- Name", + " 0.89, !- Coefficient1 Constant", + " 0.11, !- Coefficient2 x", + " 0, !- Coefficient3 x**2", + " 0, !- Minimum Value of x {BasedOnField A2}", + " 1, !- Maximum Value of x {BasedOnField A2}", + " 0.7, !- Minimum Curve Output {BasedOnField A3}", + " 1; !- Maximum Curve Output {BasedOnField A3}", + + " Curve:Biquadratic,", + " ConstantBiquadratic 1, !- Name", + " 1, !- Coefficient1 Constant", + " 0, !- Coefficient2 x", + " 0, !- Coefficient3 x**2", + " 0, !- Coefficient4 y", + " 0, !- Coefficient5 y**2", + " 0, !- Coefficient6 x*y", + " -100, !- Minimum Value of x {BasedOnField A2}", + " 100, !- Maximum Value of x {BasedOnField A2}", + " -100, !- Minimum Value of y {BasedOnField A3}", + " 100; !- Maximum Value of y {BasedOnField A3}", + + " Curve:Biquadratic,", + " Cool-Cap-fT2, !- Name", + " 1.472738138, !- Coefficient1 Constant", + " -0.0672218352, !- Coefficient2 x", + " 0.0029199042, !- Coefficient3 x**2", + " 5.16005999999982e-005, !- Coefficient4 y", + " -2.97756e-005, !- Coefficient5 y**2", + " -0.00035908596, !- Coefficient6 x*y", + " 13.88, !- Minimum Value of x {BasedOnField A2}", + " 23.88, !- Maximum Value of x {BasedOnField A2}", + " 18.33, !- Minimum Value of y {BasedOnField A3}", + " 51.66; !- Maximum Value of y {BasedOnField A3}", + + " Curve:Quadratic,", + " Cool-Cap-fFF2, !- Name", + " 0.618281092, !- Coefficient1 Constant", + " 0.569060264, !- Coefficient2 x", + " -0.187341356, !- Coefficient3 x**2", + " 0, !- Minimum Value of x {BasedOnField A2}", + " 2, !- Maximum Value of x {BasedOnField A2}", + " 0, !- Minimum Curve Output {BasedOnField A3}", + " 2; !- Maximum Curve Output {BasedOnField A3}", + + " Curve:Biquadratic,", + " Cool-EIR-fT2, !- Name", + " -0.488195597, !- Coefficient1 Constant", + " 0.0991621818, !- Coefficient2 x", + " -0.00236967444, !- Coefficient3 x**2", + " 0.019503441, !- Coefficient4 y", + " 0.0004297698, !- Coefficient5 y**2", + " -0.00109743984, !- Coefficient6 x*y", + " 13.88, !- Minimum Value of x {BasedOnField A2}", + " 23.88, !- Maximum Value of x {BasedOnField A2}", + " 18.33, !- Minimum Value of y {BasedOnField A3}", + " 51.66; !- Maximum Value of y {BasedOnField A3}", + + " Curve:Quadratic,", + " Cool-EIR-fFF2, !- Name", + " 1.570774717, !- Coefficient1 Constant", + " -0.914152018, !- Coefficient2 x", + " 0.343377302, !- Coefficient3 x**2", + " 0, !- Minimum Value of x {BasedOnField A2}", + " 2, !- Maximum Value of x {BasedOnField A2}", + " 0, !- Minimum Curve Output {BasedOnField A3}", + " 2; !- Maximum Curve Output {BasedOnField A3}", + + " Curve:Quadratic,", + " Cool-PLF-fPLR2, !- Name", + " 0.89, !- Coefficient1 Constant", + " 0.11, !- Coefficient2 x", + " 0, !- Coefficient3 x**2", + " 0, !- Minimum Value of x {BasedOnField A2}", + " 1, !- Maximum Value of x {BasedOnField A2}", + " 0.7, !- Minimum Curve Output {BasedOnField A3}", + " 1; !- Maximum Curve Output {BasedOnField A3}", + + " Coil:Heating:DX:MultiSpeed,", + " ashp htg coil, !- Name", + " , !- Availability Schedule Name", + " ashp unitary system Cooling Coil - Heating Coil Node, !- Air Inlet Node Name", + " ashp unitary system Heating Coil - Supplemental Coil Node, !- Air Outlet Node Name", + " -17.7777777777778, !- Minimum Outdoor Dry-Bulb Temperature for Compressor Operation {C}", + " , !- Outdoor Dry-Bulb Temperature to Turn On Compressor {C}", + " 50, !- Crankcase Heater Capacity {W}", + " 10, !- Maximum Outdoor Dry-Bulb Temperature for Crankcase Heater Operation {C}", + " DefrostEIR, !- Defrost Energy Input Ratio Function of Temperature Curve Name", + " 4.44444444444444, !- Maximum Outdoor Dry-Bulb Temperature for Defrost Operation {C}", + " ReverseCycle, !- Defrost Strategy", + " OnDemand, !- Defrost Control", + " 0.058333, !- Defrost Time Period Fraction", + " AutoSize, !- Resistive Defrost Heater Capacity {W}", + " No, !- Apply Part Load Fraction to Speeds Greater than 1", + " Electricity, !- Fuel Type", + " 4, !- Region number for Calculating HSPF", + " 2, !- Number of Speeds", + " AutoSize, !- Speed Gross Rated Heating Capacity 1 {W}", + " 4.60, !- Speed Gross Rated Heating COP 1 {W/W}", + " AutoSize, !- Speed Rated Air Flow Rate 1 {m3/s}", + " 773.3, !- Speed Rated Supply Air Fan Power Per Volume Flow Rate 1 {W/(m3/s)}", + " HP_Heat-Cap-fT1, !- Speed Heating Capacity Function of Temperature Curve Name 1", + " HP_Heat-CAP-fFF1, !- Speed Heating Capacity Function of Flow Fraction Curve Name 1", + " HP_Heat-EIR-fT1, !- Speed Energy Input Ratio Function of Temperature Curve Name 1", + " HP_Heat-EIR-fFF1, !- Speed Energy Input Ratio Function of Flow Fraction Curve Name 1", + " HP_Heat-PLF-fPLR1, !- Speed Part Load Fraction Correlation Curve Name 1", + " 0.2, !- Speed Rated Waste Heat Fraction of Power Input 1 {dimensionless}", + " ConstantBiquadratic, !- Speed Waste Heat Function of Temperature Curve Name 1", + " AutoSize, !- Speed Gross Rated Heating Capacity 2 {W}", + " 4.40, !- Speed Gross Rated Heating COP 2 {W/W}", + " AutoSize, !- Speed Rated Air Flow Rate 2 {m3/s}", + " 773.3, !- Speed Rated Supply Air Fan Power Per Volume Flow Rate 2 {W/(m3/s)}", + " HP_Heat-Cap-fT2, !- Speed Heating Capacity Function of Temperature Curve Name 2", + " HP_Heat-CAP-fFF2, !- Speed Heating Capacity Function of Flow Fraction Curve Name 2", + " HP_Heat-EIR-fT2, !- Speed Energy Input Ratio Function of Temperature Curve Name 2", + " HP_Heat-EIR-fFF2, !- Speed Energy Input Ratio Function of Flow Fraction Curve Name 2", + " HP_Heat-PLF-fPLR2, !- Speed Part Load Fraction Correlation Curve Name 2", + " 0.2, !- Speed Rated Waste Heat Fraction of Power Input 2 {dimensionless}", + " ConstantBiquadratic; !- Speed Waste Heat Function of Temperature Curve Name 2", + + " Curve:Biquadratic,", + " DefrostEIR, !- Name", + " 0.1528, !- Coefficient1 Constant", + " 0, !- Coefficient2 x", + " 0, !- Coefficient3 x**2", + " 0, !- Coefficient4 y", + " 0, !- Coefficient5 y**2", + " 0, !- Coefficient6 x*y", + " -100, !- Minimum Value of x {BasedOnField A2}", + " 100, !- Maximum Value of x {BasedOnField A2}", + " -100, !- Minimum Value of y {BasedOnField A3}", + " 100; !- Maximum Value of y {BasedOnField A3}", + + " Curve:Biquadratic,", + " HP_Heat-Cap-fT1, !- Name", + " 0.84077409, !- Coefficient1 Constant", + " -0.0014336586, !- Coefficient2 x", + " -0.000150336, !- Coefficient3 x**2", + " 0.029628603, !- Coefficient4 y", + " 0.000161676, !- Coefficient5 y**2", + " -2.349e-005, !- Coefficient6 x*y", + " -100, !- Minimum Value of x {BasedOnField A2}", + " 100, !- Maximum Value of x {BasedOnField A2}", + " -100, !- Minimum Value of y {BasedOnField A3}", + " 100; !- Maximum Value of y {BasedOnField A3}", + + " Curve:Quadratic,", + " HP_Heat-CAP-fFF1, !- Name", + " 0.741466907, !- Coefficient1 Constant", + " 0.378645444, !- Coefficient2 x", + " -0.119754733, !- Coefficient3 x**2", + " 0, !- Minimum Value of x {BasedOnField A2}", + " 2, !- Maximum Value of x {BasedOnField A2}", + " 0, !- Minimum Curve Output {BasedOnField A3}", + " 2; !- Maximum Curve Output {BasedOnField A3}", + + " Curve:Biquadratic,", + " HP_Heat-EIR-fT1, !- Name", + " 0.539472334, !- Coefficient1 Constant", + " 0.0165103146, !- Coefficient2 x", + " 0.00083874528, !- Coefficient3 x**2", + " -0.00403234020000001, !- Coefficient4 y", + " 0.00142404156, !- Coefficient5 y**2", + " -0.00211806252, !- Coefficient6 x*y", + " -100, !- Minimum Value of x {BasedOnField A2}", + " 100, !- Maximum Value of x {BasedOnField A2}", + " -100, !- Minimum Value of y {BasedOnField A3}", + " 100; !- Maximum Value of y {BasedOnField A3}", + + " Curve:Quadratic,", + " HP_Heat-EIR-fFF1, !- Name", + " 2.153618211, !- Coefficient1 Constant", + " -1.737190609, !- Coefficient2 x", + " 0.584269478, !- Coefficient3 x**2", + " 0, !- Minimum Value of x {BasedOnField A2}", + " 2, !- Maximum Value of x {BasedOnField A2}", + " 0, !- Minimum Curve Output {BasedOnField A3}", + " 2; !- Maximum Curve Output {BasedOnField A3}", + + " Curve:Quadratic,", + " HP_Heat-PLF-fPLR1, !- Name", + " 0.89, !- Coefficient1 Constant", + " 0.11, !- Coefficient2 x", + " 0, !- Coefficient3 x**2", + " 0, !- Minimum Value of x {BasedOnField A2}", + " 1, !- Maximum Value of x {BasedOnField A2}", + " 0.7, !- Minimum Curve Output {BasedOnField A3}", + " 1; !- Maximum Curve Output {BasedOnField A3}", + + " Curve:Biquadratic,", + " ConstantBiquadratic, !- Name", + " 1, !- Coefficient1 Constant", + " 0, !- Coefficient2 x", + " 0, !- Coefficient3 x**2", + " 0, !- Coefficient4 y", + " 0, !- Coefficient5 y**2", + " 0, !- Coefficient6 x*y", + " -100, !- Minimum Value of x {BasedOnField A2}", + " 100, !- Maximum Value of x {BasedOnField A2}", + " -100, !- Minimum Value of y {BasedOnField A3}", + " 100; !- Maximum Value of y {BasedOnField A3}", + + " Curve:Biquadratic,", + " HP_Heat-Cap-fT2, !- Name", + " 0.831506971, !- Coefficient1 Constant", + " 0.0018392166, !- Coefficient2 x", + " -0.000187596, !- Coefficient3 x**2", + " 0.0266002056, !- Coefficient4 y", + " 0.000191484, !- Coefficient5 y**2", + " -6.5772e-005, !- Coefficient6 x*y", + " -100, !- Minimum Value of x {BasedOnField A2}", + " 100, !- Maximum Value of x {BasedOnField A2}", + " -100, !- Minimum Value of y {BasedOnField A3}", + " 100; !- Maximum Value of y {BasedOnField A3}", + + " Curve:Quadratic,", + " HP_Heat-CAP-fFF2, !- Name", + " 0.76634609, !- Coefficient1 Constant", + " 0.32840943, !- Coefficient2 x", + " -0.094701495, !- Coefficient3 x**2", + " 0, !- Minimum Value of x {BasedOnField A2}", + " 2, !- Maximum Value of x {BasedOnField A2}", + " 0, !- Minimum Curve Output {BasedOnField A3}", + " 2; !- Maximum Curve Output {BasedOnField A3}", + + " Curve:Biquadratic,", + " HP_Heat-EIR-fT2, !- Name", + " 0.787746797, !- Coefficient1 Constant", + " -0.000652314599999999, !- Coefficient2 x", + " 0.00078866784, !- Coefficient3 x**2", + " -0.0023209056, !- Coefficient4 y", + " 0.00074760408, !- Coefficient5 y**2", + " -0.00109173096, !- Coefficient6 x*y", + " -100, !- Minimum Value of x {BasedOnField A2}", + " 100, !- Maximum Value of x {BasedOnField A2}", + " -100, !- Minimum Value of y {BasedOnField A3}", + " 100; !- Maximum Value of y {BasedOnField A3}", + + " Curve:Quadratic,", + " HP_Heat-EIR-fFF2, !- Name", + " 2.001041353, !- Coefficient1 Constant", + " -1.58869128, !- Coefficient2 x", + " 0.587593517, !- Coefficient3 x**2", + " 0, !- Minimum Value of x {BasedOnField A2}", + " 2, !- Maximum Value of x {BasedOnField A2}", + " 0, !- Minimum Curve Output {BasedOnField A3}", + " 2; !- Maximum Curve Output {BasedOnField A3}", + + " Curve:Quadratic,", + " HP_Heat-PLF-fPLR2, !- Name", + " 0.89, !- Coefficient1 Constant", + " 0.11, !- Coefficient2 x", + " 0, !- Coefficient3 x**2", + " 0, !- Minimum Value of x {BasedOnField A2}", + " 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)); + + // get input + GetDXCoils(); + SetPredefinedTables(); + // check multi-speed DX cooling coil + EXPECT_EQ("ASHP CLG COIL", DXCoil(1).Name); + EXPECT_EQ("Coil:Cooling:DX:MultiSpeed", DXCoil(1).DXCoilType); + + DataEnvironment::StdBaroPress = 101325.0; + DataEnvironment::StdRhoAir = 1.2; + Psychrometrics::InitializePsychRoutines(); + + // set system sizing parameters + DataSizing::CurZoneEqNum = 0; + DataSizing::CurSysNum = 1; + DataSizing::FinalSysSizing.allocate(1); + + DataSizing::SysSizingRunDone = true; + DataSizing::FinalSysSizing(CurSysNum).DesMainVolFlow = 1.75; + DataSizing::FinalSysSizing(CurSysNum).CoolSupTemp = 13.0; + DataSizing::FinalSysSizing(CurSysNum).CoolSupHumRat = 0.0080; + DataSizing::FinalSysSizing(CurSysNum).MixTempAtCoolPeak = 24.290004300002032; + DataSizing::FinalSysSizing(CurSysNum).MixHumRatAtCoolPeak = 0.0095218208835786931; + DataSizing::FinalSysSizing(CurSysNum).OutTempAtCoolPeak = 28.244709704058657; + + DataAirSystems::PrimaryAirSystem.allocate(1); + DataAirSystems::PrimaryAirSystem(CurSysNum).NumOACoolCoils = 0; + DataAirSystems::PrimaryAirSystem(CurSysNum).SupFanNum = 0; + DataAirSystems::PrimaryAirSystem(CurSysNum).RetFanNum = 0; + + DataSizing::SysSizInput.allocate(1); + DataSizing::SysSizInput(1).AirLoopNum = CurSysNum; + DataSizing::NumSysSizInput = 1; + // Need this to prevent crash in RequestSizing + DataSizing::UnitarySysEqSizing.allocate(1); + + SizeDXCoil(1); + // Design flow rate at speed 2 and speed 1 + EXPECT_EQ(1.75, DXCoil(1).MSRatedAirVolFlowRate(2)); + EXPECT_EQ(0.875, DXCoil(1).MSRatedAirVolFlowRate(2) * 0.5); + EXPECT_EQ(0.875, DXCoil(1).MSRatedAirVolFlowRate(1)); + // Design Capacity at speed 2 and speed 1 + EXPECT_EQ(31899.037804634620, DXCoil(1).MSRatedTotCap(2)); + EXPECT_EQ(31899.037804634620 * 0.5, DXCoil(1).MSRatedTotCap(1)); + + // 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; + SizeDXCoil(2); + EXPECT_EQ(1.75, DXCoil(2).MSRatedAirVolFlowRate(2)); + EXPECT_EQ(0.875, DXCoil(2).MSRatedAirVolFlowRate(2) * 0.5); + EXPECT_EQ(0.875, DXCoil(2).MSRatedAirVolFlowRate(1)); + EXPECT_EQ(31899.037804634620, DXCoil(2).MSRatedTotCap(2)); + EXPECT_EQ(31899.037804634620 * 0.5, DXCoil(2).MSRatedTotCap(1)); +} + +TEST_F(EnergyPlusFixture, TestMultiSpeedCoolingCoilPartialAutoSizeOutput) +{ + // Test partial autosize Coil:Cooling:DX:MultiSpeed #7477 + + std::string const idf_objects = delimited_string({ + + " Coil:Cooling:DX:MultiSpeed,", + " ashp clg coil, !- Name", + " , !- Availability Schedule Name", + " ashp unitary system Fan - Cooling Coil Node, !- Air Inlet Node Name", + " ashp unitary system Cooling Coil - Heating Coil Node, !- Air Outlet Node Name", + " , !- Condenser Air Inlet Node Name", + " AirCooled, !- Condenser Type", + " , !- Minimum Outdoor Dry-Bulb Temperature for Compressor Operation {C}", + " , !- Supply Water Storage Tank Name", + " , !- Condensate Collection Water Storage Tank Name", + " No, !- Apply Part Load Fraction to Speeds Greater than 1", + " No, !- Apply Latent Degradation to Speeds Greater than 1", + " 0, !- Crankcase Heater Capacity {W}", + " 10, !- Maximum Outdoor Dry-Bulb Temperature for Crankcase Heater Operation {C}", + " 0, !- Basin Heater Capacity {W/K}", + " 2, !- Basin Heater Setpoint Temperature {C}", + " , !- Basin Heater Operating Schedule Name", + " Electricity, !- Fuel Type", + " 2, !- Number of Speeds", + " AutoSize, !- Speed Gross Rated Total Cooling Capacity 1 {W}", + " AutoSize, !- Speed Gross Rated Sensible Heat Ratio 1", + " 4.80, !- Speed Gross Rated Cooling COP 1 {W/W}", + " AutoSize, !- Speed Rated Air Flow Rate 1 {m3/s}", + " 773.3, !- Speed Rated Evaporator Fan Power Per Volume Flow Rate 1 {W/(m3/s)}", + " Cool-Cap-fT1, !- Speed Total Cooling Capacity Function of Temperature Curve Name 1", + " Cool-Cap-fFF1, !- Speed Total Cooling Capacity Function of Flow Fraction Curve Name 1", + " Cool-EIR-fT1, !- Speed Energy Input Ratio Function of Temperature Curve Name 1", + " Cool-EIR-fFF1, !- Speed Energy Input Ratio Function of Flow Fraction Curve Name 1", + " Cool-PLF-fPLR1, !- Speed Part Load Fraction Correlation Curve Name 1", + " 1000, !- Speed Nominal Time for Condensate Removal to Begin 1 {s}", + " 1.5, !- Speed Ratio of Initial Moisture Evaporation Rate and Steady State Latent Capacity 1 " + "{dimensionless}", + " 3, !- Speed Maximum Cycling Rate 1 {cycles/hr}", + " 45, !- Speed Latent Capacity Time Constant 1 {s}", + " 0.2, !- Speed Rated Waste Heat Fraction of Power Input 1 {dimensionless}", + " ConstantBiquadratic 1, !- Speed Waste Heat Function of Temperature Curve Name 1", + " 0.9, !- Speed Evaporative Condenser Effectiveness 1 {dimensionless}", + " AutoSize, !- Speed Evaporative Condenser Air Flow Rate 1 {m3/s}", + " AutoSize, !- Speed Rated Evaporative Condenser Pump Power Consumption 1 {W}", + " AutoSize, !- Speed Gross Rated Total Cooling Capacity 2 {W}", + " AutoSize, !- Speed Gross Rated Sensible Heat Ratio 2", + " 4.80, !- Speed Gross Rated Cooling COP 2 {W/W}", + " AutoSize, !- Speed Rated Air Flow Rate 2 {m3/s}", + " 773.3, !- Speed Rated Evaporator Fan Power Per Volume Flow Rate 2 {W/(m3/s)}", + " Cool-Cap-fT2, !- Speed Total Cooling Capacity Function of Temperature Curve Name 2", + " Cool-Cap-fFF2, !- Speed Total Cooling Capacity Function of Flow Fraction Curve Name 2", + " Cool-EIR-fT2, !- Speed Energy Input Ratio Function of Temperature Curve Name 2", + " Cool-EIR-fFF2, !- Speed Energy Input Ratio Function of Flow Fraction Curve Name 2", + " Cool-PLF-fPLR2, !- Speed Part Load Fraction Correlation Curve Name 2", + " 1000, !- Speed Nominal Time for Condensate Removal to Begin 2 {s}", + " 1.5, !- Speed Ratio of Initial Moisture Evaporation Rate and Steady State Latent Capacity 2 " + "{dimensionless}", + " 3, !- Speed Maximum Cycling Rate 2 {cycles/hr}", + " 45, !- Speed Latent Capacity Time Constant 2 {s}", + " 0.2, !- Speed Rated Waste Heat Fraction of Power Input 2 {dimensionless}", + " ConstantBiquadratic 1, !- Speed Waste Heat Function of Temperature Curve Name 2", + " 0.9, !- Speed Evaporative Condenser Effectiveness 2 {dimensionless}", + " AutoSize, !- Speed Evaporative Condenser Air Flow Rate 2 {m3/s}", + " AutoSize; !- Speed Rated Evaporative Condenser Pump Power Consumption 2 {W}", + + " Curve:Biquadratic,", + " Cool-Cap-fT1, !- Name", + " 1.658788451, !- Coefficient1 Constant", + " -0.0834530076, !- Coefficient2 x", + " 0.00342409032, !- Coefficient3 x**2", + " 0.0024332436, !- Coefficient4 y", + " -4.5036e-005, !- Coefficient5 y**2", + " -0.00053367984, !- Coefficient6 x*y", + " 13.88, !- Minimum Value of x {BasedOnField A2}", + " 23.88, !- Maximum Value of x {BasedOnField A2}", + " 18.33, !- Minimum Value of y {BasedOnField A3}", + " 51.66; !- Maximum Value of y {BasedOnField A3}", + + " Curve:Quadratic,", + " Cool-Cap-fFF1, !- Name", + " 0.655239515, !- Coefficient1 Constant", + " 0.511655216, !- Coefficient2 x", + " -0.166894731, !- Coefficient3 x**2", + " 0, !- Minimum Value of x {BasedOnField A2}", + " 2, !- Maximum Value of x {BasedOnField A2}", + " 0, !- Minimum Curve Output {BasedOnField A3}", + " 2; !- Maximum Curve Output {BasedOnField A3}", + + " Curve:Biquadratic,", + " Cool-EIR-fT1, !- Name", + " -0.582915701, !- Coefficient1 Constant", + " 0.1581006726, !- Coefficient2 x", + " -0.00439794684, !- Coefficient3 x**2", + " -0.020335122, !- Coefficient4 y", + " 0.00107983368, !- Coefficient5 y**2", + " -0.0006395922, !- Coefficient6 x*y", + " 13.88, !- Minimum Value of x {BasedOnField A2}", + " 23.88, !- Maximum Value of x {BasedOnField A2}", + " 18.33, !- Minimum Value of y {BasedOnField A3}", + " 51.66; !- Maximum Value of y {BasedOnField A3}", + + " Curve:Quadratic,", + " Cool-EIR-fFF1, !- Name", + " 1.639108268, !- Coefficient1 Constant", + " -0.998953996, !- Coefficient2 x", + " 0.359845728, !- Coefficient3 x**2", + " 0, !- Minimum Value of x {BasedOnField A2}", + " 2, !- Maximum Value of x {BasedOnField A2}", + " 0, !- Minimum Curve Output {BasedOnField A3}", + " 2; !- Maximum Curve Output {BasedOnField A3}", + + " Curve:Quadratic,", + " Cool-PLF-fPLR1, !- Name", + " 0.89, !- Coefficient1 Constant", + " 0.11, !- Coefficient2 x", + " 0, !- Coefficient3 x**2", + " 0, !- Minimum Value of x {BasedOnField A2}", + " 1, !- Maximum Value of x {BasedOnField A2}", + " 0.7, !- Minimum Curve Output {BasedOnField A3}", + " 1; !- Maximum Curve Output {BasedOnField A3}", + + " Curve:Biquadratic,", + " ConstantBiquadratic 1, !- Name", + " 1, !- Coefficient1 Constant", + " 0, !- Coefficient2 x", + " 0, !- Coefficient3 x**2", + " 0, !- Coefficient4 y", + " 0, !- Coefficient5 y**2", + " 0, !- Coefficient6 x*y", + " -100, !- Minimum Value of x {BasedOnField A2}", + " 100, !- Maximum Value of x {BasedOnField A2}", + " -100, !- Minimum Value of y {BasedOnField A3}", + " 100; !- Maximum Value of y {BasedOnField A3}", + + " Curve:Biquadratic,", + " Cool-Cap-fT2, !- Name", + " 1.472738138, !- Coefficient1 Constant", + " -0.0672218352, !- Coefficient2 x", + " 0.0029199042, !- Coefficient3 x**2", + " 5.16005999999982e-005, !- Coefficient4 y", + " -2.97756e-005, !- Coefficient5 y**2", + " -0.00035908596, !- Coefficient6 x*y", + " 13.88, !- Minimum Value of x {BasedOnField A2}", + " 23.88, !- Maximum Value of x {BasedOnField A2}", + " 18.33, !- Minimum Value of y {BasedOnField A3}", + " 51.66; !- Maximum Value of y {BasedOnField A3}", + + " Curve:Quadratic,", + " Cool-Cap-fFF2, !- Name", + " 0.618281092, !- Coefficient1 Constant", + " 0.569060264, !- Coefficient2 x", + " -0.187341356, !- Coefficient3 x**2", + " 0, !- Minimum Value of x {BasedOnField A2}", + " 2, !- Maximum Value of x {BasedOnField A2}", + " 0, !- Minimum Curve Output {BasedOnField A3}", + " 2; !- Maximum Curve Output {BasedOnField A3}", + + " Curve:Biquadratic,", + " Cool-EIR-fT2, !- Name", + " -0.488195597, !- Coefficient1 Constant", + " 0.0991621818, !- Coefficient2 x", + " -0.00236967444, !- Coefficient3 x**2", + " 0.019503441, !- Coefficient4 y", + " 0.0004297698, !- Coefficient5 y**2", + " -0.00109743984, !- Coefficient6 x*y", + " 13.88, !- Minimum Value of x {BasedOnField A2}", + " 23.88, !- Maximum Value of x {BasedOnField A2}", + " 18.33, !- Minimum Value of y {BasedOnField A3}", + " 51.66; !- Maximum Value of y {BasedOnField A3}", + + " Curve:Quadratic,", + " Cool-EIR-fFF2, !- Name", + " 1.570774717, !- Coefficient1 Constant", + " -0.914152018, !- Coefficient2 x", + " 0.343377302, !- Coefficient3 x**2", + " 0, !- Minimum Value of x {BasedOnField A2}", + " 2, !- Maximum Value of x {BasedOnField A2}", + " 0, !- Minimum Curve Output {BasedOnField A3}", + " 2; !- Maximum Curve Output {BasedOnField A3}", + + " Curve:Quadratic,", + " Cool-PLF-fPLR2, !- Name", + " 0.89, !- Coefficient1 Constant", + " 0.11, !- Coefficient2 x", + " 0, !- Coefficient3 x**2", + " 0, !- Minimum Value of x {BasedOnField A2}", + " 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)); + + // get input + GetDXCoils(); + SetPredefinedTables(); + // check multi-speed DX cooling coil + EXPECT_EQ("ASHP CLG COIL", DXCoil(1).Name); + EXPECT_EQ("Coil:Cooling:DX:MultiSpeed", DXCoil(1).DXCoilType); + + DataEnvironment::StdBaroPress = 101325.0; + DataEnvironment::StdRhoAir = 1.2; + Psychrometrics::InitializePsychRoutines(); + + // set system sizing parameters + DataSizing::CurZoneEqNum = 0; + DataSizing::CurSysNum = 1; + DataSizing::FinalSysSizing.allocate(1); + + DataSizing::SysSizingRunDone = true; + DataSizing::FinalSysSizing(CurSysNum).DesMainVolFlow = 1.75; + DataSizing::FinalSysSizing(CurSysNum).CoolSupTemp = 13.0; + DataSizing::FinalSysSizing(CurSysNum).CoolSupHumRat = 0.0080; + DataSizing::FinalSysSizing(CurSysNum).MixTempAtCoolPeak = 24.290004300002032; + DataSizing::FinalSysSizing(CurSysNum).MixHumRatAtCoolPeak = 0.0095218208835786931; + DataSizing::FinalSysSizing(CurSysNum).OutTempAtCoolPeak = 28.244709704058657; + + DataAirSystems::PrimaryAirSystem.allocate(1); + DataAirSystems::PrimaryAirSystem(CurSysNum).NumOACoolCoils = 0; + DataAirSystems::PrimaryAirSystem(CurSysNum).SupFanNum = 0; + DataAirSystems::PrimaryAirSystem(CurSysNum).RetFanNum = 0; + + DataSizing::SysSizInput.allocate(1); + DataSizing::SysSizInput(1).AirLoopNum = CurSysNum; + DataSizing::NumSysSizInput = 1; + // Need this to prevent crash in RequestSizing + DataSizing::UnitarySysEqSizing.allocate(1); + + // test SHR design size when all autosized + SizeDXCoil(1); + // Design flow rate at speed 2 and speed 1 + EXPECT_EQ(1.75, DXCoil(1).MSRatedAirVolFlowRate(2)); + EXPECT_EQ(0.875, DXCoil(1).MSRatedAirVolFlowRate(2) * 0.5); + EXPECT_EQ(0.875, DXCoil(1).MSRatedAirVolFlowRate(1)); + // Design Capacity at speed 2 and speed 1 + EXPECT_EQ(31899.037804634620, DXCoil(1).MSRatedTotCapDes(2)); + EXPECT_EQ(31899.037804634620, DXCoil(1).MSRatedTotCap(2)); + EXPECT_EQ(31899.037804634620 * 0.5, DXCoil(1).MSRatedTotCap(1)); + // Design SHR at speed 2 and speed 1 + EXPECT_EQ(0.76488154417788068, DXCoil(1).MSRatedSHR(2)); + EXPECT_EQ(0.76488154417788068, DXCoil(1).MSRatedSHR(1)); + + // test SHR design size when partial autosizing (capacity is hardsized) + DXCoil( 1 ).MSRatedTotCap( 1 ) = 17500.0; // DataSizing::AutoSize; + DXCoil( 1 ).MSRatedTotCap( 2 ) = 35000.0; // DataSizing::AutoSize; + + SizeDXCoil(1); + // Design size SHR at speed 2 and speed 1 + EXPECT_EQ(0.76488154417788068, DXCoil(1).MSRatedSHR(2)); + EXPECT_EQ(0.76488154417788068, DXCoil(1).MSRatedSHR(1)); + // Design Capacity at speed 2 and speed 1 + EXPECT_EQ(31899.037804634620, DXCoil(1).MSRatedTotCapDes(2)); + EXPECT_EQ(35000.0, DXCoil(1).MSRatedTotCap(2)); + EXPECT_EQ(35000.0 * 0.5, DXCoil(1).MSRatedTotCap(1)); + // Design flow rate at speed 2 and speed 1 + EXPECT_EQ(1.75, DXCoil(1).MSRatedAirVolFlowRate(2)); + EXPECT_EQ(0.875, DXCoil(1).MSRatedAirVolFlowRate(1)); +} } // namespace EnergyPlus