if not found on a plant loop, check condenser loop and warn user if not found
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | DXCoilNum |
SUBROUTINE SizeVarSpeedCoil(DXCoilNum)
! SUBROUTINE INFORMATION:
! AUTHOR Bo Shen, based on WatertoAirHeatPumpSimple:SizeHVACWaterToAir
! DATE WRITTEN March, 2012
! MODIFIED August 2013 Daeho Kang, add component sizing table entries
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for sizing WSHP Components for which nominal capacities
! and flow rates have not been specified in the input
! METHODOLOGY EMPLOYED:
! Obtains heating capacities and flow rates from the zone or system sizing arrays.
!
! NOTE: For WSHP's we are sizing the heating capacity to be
! equal to the cooling capacity. Thus the cooling and
! and heating capacities of a DX heat pump system will be identical. In real life the ARI
! heating and cooling capacities are close but not identical.
! REFERENCES:
! na
! USE STATEMENTS:
USE Psychrometrics
USE DataPlant, ONLY: PlantLoop, MyPlantSizingIndex
USE DataHVACGlobals, ONLY: SmallAirVolFlow, SmallLoad
USE General, ONLY: RoundSigDigits, TrimSigDigits
USE PlantUtilities, ONLY: RegisterPlantCompDesignFlow
USE ReportSizingManager, ONLY: ReportSizingOutput
USE DataAirSystems, ONLY: PrimaryAirSystem
USE OutputReportPredefined
USE FluidProperties, ONLY: GetDensityGlycol, GetSpecificHeatGlycol
USE CurveManager, ONLY: CurveValue
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
Integer, Intent(IN) :: DXCoilNum
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName='SizeVarSpeedCoil'
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: rhoair
REAL(r64) :: CpAir
REAL(r64) :: MixTemp
REAL(r64) :: MixHumRat
REAL(r64) :: MixEnth
REAL(r64) :: MixWetBulb
REAL(r64) :: SupTemp
REAL(r64) :: SupHumRat
REAL(r64) :: SupEnth
REAL(r64) :: OutTemp
REAL(r64) :: OutAirFrac
REAL(r64) :: VolFlowRate
REAL(r64) :: CoolCapAtPeak
REAL(r64) :: TotCapTempModFac
REAL(r64) :: SensCapAtPeak
INTEGER :: TimeStepNumAtMax
INTEGER :: DDNum
INTEGER :: PltSizNum
LOGICAL :: RatedCapCoolTotalAutosized
LOGICAL :: RatedCapCoolSensAutosized
LOGICAL :: RatedCapHeatAutosized
LOGICAL :: RatedAirFlowAutosized
LOGICAL :: RatedWaterFlowAutosized
LOGICAL :: ErrorsFound
REAL(r64) :: SystemCapacity
REAL(r64) :: rho
REAL(r64) :: cp
INTEGER :: NormSpeed !norminal speed level
INTEGER :: UpperSpeed !highest speed level
INTEGER :: Mode !speed level
REAL(r64) :: rhoW !water density
REAL(r64) :: rhoA !air density
REAL(r64) :: SHR !sensible heat transfer ratio
REAL(r64) :: RatedAirMassFlowRate !rated air mass flow rate
REAL(r64) :: CBFRated !bypass factor at the rated condition, considering difference in flow rates
REAL(r64) :: RatedInletEnth !rated inlet air enthalpy
REAL(r64) :: QLoadTotal1 !placeholder for calculating SHR
REAL(r64) :: QLoadTotal2 !placeholder for calculating SHR
REAL(r64) :: QLoadTotal !placeholder for calculating SHR
REAL(r64) :: AirMassFlowRatio !air mass flow ratio
REAL(r64) :: WaterMassFlowRatio !water mass flow rate
REAL(r64) :: RatedSourceTempCool !rated source temperature, space cooling mode
CHARACTER(len=MaxNameLength) :: CurrentObjSubfix ! Object subfix type for printing
LOGICAL :: IsAutosize ! Indicator to autosize
LOGICAL :: HardSizeNoDesRun ! Indicator to hardsize withouth sizing runs
LOGICAL :: HardSizeNoDesRunAirFlow ! Indicator to hardsize withouth sizing runs for rated air flow field
REAL(r64) :: RatedAirVolFlowRateDes ! Autosized rated air flow for reporting
REAL(r64) :: RatedAirVolFlowRateUser ! Hardsized rated air flow for reporting
REAL(r64) :: RatedCapCoolTotalDes ! Autosized rated total cooling capacity for reporting
REAL(r64) :: RatedCapCoolTotalUser ! Hardsized rated total cooling capacity for reporting
REAL(r64) :: RatedCapHeatDes ! Autosized rated heating capacity for reporting
REAL(r64) :: RatedCapHeatUser ! Hardsized rated heating capacity for reporting
REAL(r64) :: RatedWaterVolFlowRateDes ! Autosized rated water flow for reporting
REAL(r64) :: RatedWaterVolFlowRateUser ! Hardsized rated water flow for reporting
REAL(r64) :: RatedCapCoolSensDes ! Autosized rated sensible cooling capacity for reporting
REAL(r64) :: RatedCapCoolSensUser ! Hardsized rated sensible cooling capacity for reporting
REAL(r64) :: EvapCondPumpElecNomPowerDes ! Autosized evaporative condenser pump power for reporting
REAL(r64) :: EvapCondPumpElecNomPowerUser ! Hardsized evaporative condenser pump power for reporting
REAL(r64) :: DefrostCapacityDes ! Autosized resistive defrost heater capacity for reporting
REAL(r64) :: DefrostCapacityUser ! Hardsized resistive defrost heater capacity for reporting
LOGICAL :: SizingDesRunThisAirSys ! true if a particular air system had a Sizing:System object and system sizing done
LOGICAL :: SizingDesRunThisZone ! true if a particular zone had a Sizing:Zone object and zone sizing was done
UpperSpeed = VarSpeedCoil(DXCoilNum)%NumOfSpeeds
NormSpeed = VarSpeedCoil(DXCoilNum)%NormSpedLevel
PltSizNum = 0
ErrorsFound = .FALSE.
RatedAirFlowAutosized = .FALSE.
RatedWaterFlowAutosized = .FALSE.
RatedCapHeatAutosized = .FALSE.
IsAutosize = .FALSE.
IF (SysSizingRunDone .OR. ZoneSizingRunDone) THEN
HardSizeNoDesRun = .FALSE.
ELSE
HardSizeNoDesRun = .TRUE.
ENDIF
IF (CurSysNum > 0) THEN
CALL CheckThisAirSystemForSizing(CurSysNum, SizingDesRunThisAirSys )
ELSE
SizingDesRunThisAirSys = .FALSE.
ENDIF
IF (CurZoneEqNum > 0) THEN
CALL CheckThisZoneForSizing(CurZoneEqNum, SizingDesRunThisZone)
ELSE
SizingDesRunThisZone = .FALSE.
ENDIF
HardSizeNoDesRunAirFlow = .FALSE.
RatedAirVolFlowRateDes = 0.0d0
RatedAirVolFlowRateUser = 0.0d0
RatedCapCoolTotalDes = 0.0d0
RatedCapCoolTotalUser = 0.0d0
RatedCapHeatDes = 0.0d0
RatedCapHeatUser = 0.0d0
RatedWaterVolFlowRateDes = 0.0d0
RatedWaterVolFlowRateUser = 0.0d0
RatedCapCoolSensDes = 0.0d0
RatedCapCoolSensUser = 0.0d0
EvapCondPumpElecNomPowerDes = 0.0d0
EvapCondPumpElecNomPowerUser = 0.0d0
DefrostCapacityDes = 0.0d0
DefrostCapacityUser = 0.0d0
IF (VarSpeedCoil(DXCoilNum)%VSCoilTypeOfNum==TypeOf_CoilVSWAHPCoolingEquationFit .OR. &
VarSpeedCoil(DXCoilNum)%VSCoilTypeOfNum==TypeOf_CoilVSWAHPHeatingEquationFit ) THEN
CurrentObjSubfix = ':WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT'
ELSE
CurrentObjSubfix = ':DX:VARIABLESPEED'
END IF
IF (VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate == AutoSize) THEN
RatedAirFlowAutosized = .TRUE.
END IF
IF (CurSysNum > 0) THEN
IF (.NOT. RatedAirFlowAutosized .AND. .NOT. SizingDesRunThisAirSys) THEN ! Simulation continue
HardSizeNoDesRunAirFlow = .TRUE.
IF (VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate > 0.0d0) THEN
CALL ReportSizingOutput('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix), &
VarSpeedCoil(DXCoilNum)%Name, &
'User-Specified Rated Air Flow Rate [m3/s]', &
VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate)
END IF
ELSE
CALL CheckSysSizing('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix), &
VarSpeedCoil(DXCoilNum)%Name)
IF (FinalSysSizing(CurSysNum)%DesMainVolFlow >= SmallAirVolFlow) THEN
RatedAirVolFlowRateDes = FinalSysSizing(CurSysNum)%DesMainVolFlow
ELSE
RatedAirVolFlowRateDes = 0.0d0
END IF
END IF
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. RatedAirFlowAutosized .AND. .NOT. SizingDesRunThisZone) THEN ! Simulation continue
HardSizeNoDesRunAirFlow = .TRUE.
IF (VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate > 0.0d0) THEN
CALL ReportSizingOutput('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix), &
VarSpeedCoil(DXCoilNum)%Name, &
'User-Specified Rated Air Flow Rate [m3/s]', &
VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate)
END IF
ELSE
CALL CheckZoneSizing('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix), &
VarSpeedCoil(DXCoilNum)%Name)
RatedAirVolFlowRateDes = MAX(FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow, &
FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow)
IF (RatedAirVolFlowRateDes < SmallAirVolFlow) THEN
RatedAirVolFlowRateDes = 0.0d0
END IF
END IF
END IF
IF (RatedAirFlowAutosized) VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate = RatedAirVolFlowRateDes
! CALL ReportSizingOutput('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix), &
! VarSpeedCoil(DXCoilNum)%Name, &
! 'Rated Air Flow Rate [m3/s]', &
! VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate)
!RatedAirFlowAutosized = .TRUE.
RatedCapCoolTotalAutosized = .FALSE.
RatedCapCoolSensAutosized = .FALSE.
! size rated total cooling capacity
IsAutosize = .FALSE.
IF (VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal == AutoSize .AND. &
VarSpeedCoil(DXCoilNum)%CoolHeatType == 'COOLING') THEN
RatedCapCoolTotalAutosized = .TRUE.
END IF
IF (SizingDesRunThisZone .OR. SizingDesRunThisAirSys) HardSizeNoDesRun = .FALSE.
IF (CurSysNum > 0) THEN
IF (.NOT. RatedCapCoolTotalAutosized .AND. .NOT. SizingDesRunThisAirSys) THEN ! Simulation continue
HardSizeNoDesRun = .TRUE.
IF (VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal > 0.0d0) THEN
CALL ReportSizingOutput('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix),&
VarSpeedCoil(DXCoilNum)%Name, &
'User-Specified Rated Total Cooling Capacity [W]', &
VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal)
END IF
ELSE
CALL CheckSysSizing('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix), &
VarSpeedCoil(DXCoilNum)%Name)
VolFlowRate = VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate
IF (VolFlowRate >= SmallAirVolFlow) THEN
IF (CurOASysNum > 0) THEN ! coil is in the OA stream
MixTemp = FinalSysSizing(CurSysNum)%CoolOutTemp
MixHumRat = FinalSysSizing(CurSysNum)%CoolOutHumRat
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) THEN ! there is no precooling of the OA stream
MixTemp = FinalSysSizing(CurSysNum)%CoolMixTemp
MixHumRat = FinalSysSizing(CurSysNum)%CoolMixHumRat
ELSE ! there is precooling of OA stream
IF (VolFlowRate > 0.0d0) THEN
OutAirFrac = FinalSysSizing(CurSysNum)%DesOutAirVolFlow / VolFlowRate
ELSE
OutAirFrac = 1.0d0
END IF
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
MixTemp = OutAirFrac*FinalSysSizing(CurSysNum)%PrecoolTemp + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%CoolRetTemp
MixHumRat = OutAirFrac*FinalSysSizing(CurSysNum)%PrecoolHumRat + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%CoolRetHumRat
END IF
END IF
OutTemp = FinalSysSizing(CurSysNum)%CoolOutTemp
rhoair = PsyRhoAirFnPbTdbW(OutBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,OutBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
TotCapTempModFac = CurveValue(VarSpeedCoil(DXCoilNum)%MSCCapFTemp(VarSpeedCoil(DXCoilNum)%NormSpedLevel), &
MixWetBulb,RatedInletWaterTemp)
! The mixed air temp for zone equipment without an OA mixer is 0.
! This test avoids a negative capacity until a solution can be found.
IF(MixEnth .GT. SupEnth)THEN
CoolCapAtPeak = rhoair * VolFlowRate * (MixEnth-SupEnth)
ELSE
CoolCapAtPeak = rhoair * VolFlowRate * (48000.0d0-SupEnth)
END IF
CoolCapAtPeak = MAX(0.0d0, CoolCapAtPeak)
IF(TotCapTempModFac .GT. 0.0d0)THEN
RatedCapCoolTotalDes = CoolCapAtPeak / TotCapTempModFac
ELSE
RatedCapCoolTotalDes = CoolCapAtPeak
END IF
ELSE
RatedCapCoolTotalDes = 0.0d0
END IF
END IF
ELSE IF (CurZoneEqNum > 0) THEN
IF (.NOT. RatedCapCoolTotalAutosized .AND. .NOT. SizingDesRunThisZone) THEN ! Simulation continue
HardSizeNoDesRun = .TRUE.
IF (VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal > 0.0d0) THEN
CALL ReportSizingOutput('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix),&
VarSpeedCoil(DXCoilNum)%Name, &
'User-Specified Rated Total Cooling Capacity [W]', &
VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal)
END IF
ELSE
CALL CheckZoneSizing('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix), &
VarSpeedCoil(DXCoilNum)%Name)
VolFlowRate = VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate
IF (VolFlowRate >= SmallAirVolFlow) THEN
IF(ZoneEqDXCoil)THEN
IF (ZoneEqSizing(CurZoneEqNum)%OAVolFlow > 0.0d0) THEN
MixTemp = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInTemp
MixHumRat = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInHumRat
ELSE
MixTemp = FinalZoneSizing(CurZoneEqNum)%ZoneRetTempAtCoolPeak
MixHumRat = FinalZoneSizing(CurZoneEqNum)%ZoneHumRatAtCoolPeak
END IF
ELSE
MixTemp = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInTemp
MixHumRat = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInHumRat
END IF
SupTemp = FinalZoneSizing(CurZoneEqNum)%CoolDesTemp
SupHumRat = FinalZoneSizing(CurZoneEqNum)%CoolDesHumRat
TimeStepNumAtMax = FinalZoneSizing(CurZoneEqNum)%TimeStepNumAtCoolMax
DDNum = FinalZoneSizing(CurZoneEqNum)%CoolDDNum
IF (DDNum > 0 .and. TimeStepNumAtMax > 0) THEN
OutTemp = DesDayWeath(DDNum)%Temp(TimeStepNumAtMax)
ELSE
OutTemp = 0.0d0
ENDIF
rhoair = PsyRhoAirFnPbTdbW(OutBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,OutBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
TotCapTempModFac = CurveValue(VarSpeedCoil(DXCoilNum)%MSCCapFTemp(VarSpeedCoil(DXCoilNum)%NormSpedLevel), &
MixWetBulb,RatedInletWaterTemp)
! The mixed air temp for zone equipment without an OA mixer is 0.
! This test avoids a negative capacity until a solution can be found.
IF(MixEnth .GT. SupEnth)THEN
CoolCapAtPeak = rhoair * VolFlowRate * (MixEnth-SupEnth)
ELSE
CoolCapAtPeak = rhoair * VolFlowRate * (48000.0d0-SupEnth)
END IF
CoolCapAtPeak = MAX(0.0d0, CoolCapAtPeak)
IF(TotCapTempModFac .GT. 0.0d0)THEN
RatedCapCoolTotalDes = CoolCapAtPeak / TotCapTempModFac
ELSE
RatedCapCoolTotalDes = CoolCapAtPeak
END IF
ELSE
RatedCapCoolTotalDes = 0.0d0
END IF
END IF
END IF
IF (RatedCapCoolTotalDes < SmallLoad) THEN
RatedCapCoolTotalDes = 0.0d0
END IF
IF (.NOT. HardSizeNoDesRun) THEN
IF (RatedCapCoolTotalAutosized) THEN
VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal = RatedCapCoolTotalDes
CALL ReportSizingOutput('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix),&
VarSpeedCoil(DXCoilNum)%Name, &
'Design Size Rated Total Cooling Capacity [W]', &
VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal)
CALL PreDefTableEntry(pdchCoolCoilTotCap,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal)
CALL PreDefTableEntry(pdchCoolCoilLatCap,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal &
- VarSpeedCoil(DXCoilNum)%RatedCapCoolSens)
IF (VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal /= 0.0d0) THEN
CALL PreDefTableEntry(pdchCoolCoilSHR,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapCoolSens &
/ VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal)
CALL PreDefTableEntry(pdchCoolCoilNomEff,VarSpeedCoil(DXCoilNum)%Name,&
VarSpeedCoil(DXCoilNum)%MSRatedCOP(NormSpeed))
ELSE
CALL PreDefTableEntry(pdchCoolCoilSHR,VarSpeedCoil(DXCoilNum)%Name,0.0d0)
CALL PreDefTableEntry(pdchCoolCoilNomEff,VarSpeedCoil(DXCoilNum)%Name,0.0d0)
ENDIF
CALL addFootNoteSubTable(pdstCoolCoil, 'Nominal values are gross at rated conditions, i.e., the supply air fan' &
//' heat and electric power NOT accounted for.')
ELSE
IF (VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal > 0.0d0 .AND. RatedCapCoolTotalDes > 0.0d0) THEN
RatedCapCoolTotalUser = VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal
CALL ReportSizingOutput('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix),&
VarSpeedCoil(DXCoilNum)%Name, &
'Design Size Rated Total Cooling Capacity [W]', &
RatedCapCoolTotalDes, &
'User-Specified Rated Total Cooling Capacity [W]', &
RatedCapCoolTotalUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(RatedCapCoolTotalDes - RatedCapCoolTotalUser)/RatedCapCoolTotalUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeVarSpeedCoil: Potential issue with equipment sizing for ' &
//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//' '//TRIM(CurrentObjSubfix))
CALL ShowContinueError('Coil Name ='//TRIM(VarSpeedCoil(DXCoilNum)%Name))
CALL ShowContinueError('User-Specified Rated Total Cooling Capacity of '// &
TRIM(RoundSigDigits(RatedCapCoolTotalUser,2))// ' [W]')
CALL ShowContinueError('differs from Design Size Rated Total Cooling Capacity of ' // &
TRIM(RoundSigDigits(RatedCapCoolTotalDes,2))// ' [W]')
CALL ShowContinueError('This may, or may not, indicate mismatched component sizes.')
CALL ShowContinueError('Verify that the value entered is intended and is consistent with other components.')
END IF
ENDIF
END IF
END IF
END IF
! Set the global DX cooling coil capacity variable for use by other objects
IF (VarSpeedCoil(DXCoilNum)%CoolHeatType == 'COOLING') THEN
DXCoolCap = VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal
END IF
! size rated heating capacity
IF (VarSpeedCoil(DXCoilNum)%RatedCapHeat == AutoSize .AND. &
VarSpeedCoil(DXCoilNum)%CoolHeatType == 'HEATING') THEN
RatedCapHeatAutosized = .TRUE.
END IF
! simply set heating capacity equal to the cooling capacity
!VarSpeedCoil(DXCoilNum)%RatedCapHeat = DXCoolCap
IF (VarSpeedCoil(DXCoilNum)%CoolHeatType == 'HEATING') THEN
IF(VarSpeedCoil(DXCoilNum)%CompanionCoolingCoilNum > 0) THEN
RatedCapHeatDes = VarSpeedCoil(VarSpeedCoil(DXCoilNum)%CompanionCoolingCoilNum)%RatedCapCoolTotal
VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal = RatedCapHeatDes !AVOID BEING ZERO
ELSE
RatedCapHeatDes = DXCoolCap !previous code, can be risky
END IF
!END IF
IF (RatedCapHeatAutosized) THEN
IF(RatedCapHeatDes == Autosize)THEN
CALL ShowWarningError('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType) &
//':WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT "'// &
TRIM(VarSpeedCoil(DXCoilNum)%Name)//'"')
CALL ShowContinueError(RoutineName//': Heating coil could not be autosized since cooling coil was not previously sized.')
CALL ShowContinueError('... Cooling coil must be upstream of heating coil.')
CALL ShowContinueError('... Manually sizing this heating coil will be required.')
END IF
END IF
IF (RatedCapHeatDes < SmallLoad) THEN
RatedCapHeatDes = 0.0d0
END IF
END IF
IF (RatedCapHeatAutosized) THEN
VarSpeedCoil(DXCoilNum)%RatedCapHeat = RatedCapHeatDes
CALL ReportSizingOutput('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix),&
VarSpeedCoil(DXCoilNum)%Name, &
'Design Size Nominal Heating Capacity [W]', &
RatedCapHeatDes)
CALL PreDefTableEntry(pdchHeatCoilNomCap,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapHeat)
IF (VarSpeedCoil(DXCoilNum)%RatedCapHeat /= 0.0d0) THEN
CALL PreDefTableEntry(pdchHeatCoilNomEff,VarSpeedCoil(DXCoilNum)%Name,&
VarSpeedCoil(DXCoilNum)%MSRatedCOP(NormSpeed))
ELSE
CALL PreDefTableEntry(pdchHeatCoilNomEff,VarSpeedCoil(DXCoilNum)%Name,0.0d0)
ENDIF
CALL addFootNoteSubTable(pdstHeatCoil, 'Nominal values are gross at rated conditions, i.e., the supply air fan' &
//' heat and electric power NOT accounted for.')
ELSE
IF (VarSpeedCoil(DXCoilNum)%RatedCapHeat > 0.0d0 .AND. RatedCapHeatDes > 0.0d0) THEN
RatedCapHeatUser = VarSpeedCoil(DXCoilNum)%RatedCapHeat
CALL ReportSizingOutput('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix),&
VarSpeedCoil(DXCoilNum)%Name, &
'Design Size Nominal Heating Capacity [W]', &
RatedCapHeatDes, &
'User-Specified Nominal Heating Capacity [W]', &
RatedCapHeatUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(RatedCapHeatDes - RatedCapHeatUser)/RatedCapHeatUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeVarSpeedCoil: Potential issue with equipment sizing for ' &
//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//' '//TRIM(CurrentObjSubfix))
CALL ShowContinueError('Coil Name ='//TRIM(VarSpeedCoil(DXCoilNum)%Name))
CALL ShowContinueError('User-Specified Rated Total Heating Capacity of '// &
TRIM(RoundSigDigits(RatedCapHeatUser,2))// ' [W]')
CALL ShowContinueError('differs from Design Size Rated Total Heating Capacity of ' // &
TRIM(RoundSigDigits(RatedCapHeatDes,2))// ' [W]')
CALL ShowContinueError('This may, or may not, indicate mismatched component sizes.')
CALL ShowContinueError('Verify that the value entered is intended and is consistent with other components.')
END IF
ENDIF
END IF
END IF
! FORCE BACK TO THE RATED AIR FLOW RATE WITH THE SAME RATIO DEFINED BY THE CATLOG DATA
IF (.NOT. HardSizeNoDesRunAirFlow) THEN
IF((RatedCapCoolTotalAutosized) .AND. &
(RatedAirFlowAutosized)) THEN
RatedAirVolFlowRateDes = VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal &
*VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowPerRatedTotCap(NormSpeed)
ELSE IF((RatedCapHeatAutosized) .AND. &
(RatedAirFlowAutosized)) THEN
RatedAirVolFlowRateDes = VarSpeedCoil(DXCoilNum)%RatedCapHeat &
*VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowPerRatedTotCap(NormSpeed)
END IF
! write the air flow sizing output
IF(RatedAirFlowAutosized) THEN
VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate = RatedAirVolFlowRateDes
CALL ReportSizingOutput('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix), &
VarSpeedCoil(DXCoilNum)%Name, &
'Design Size Rated Air Flow Rate [m3/s]', &
RatedAirVolFlowRateDes)
ELSE
IF (VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate > 0.0d0 .AND. RatedAirVolFlowRateDes > 0.0d0) THEN
RatedAirVolFlowRateUser = VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate
CALL ReportSizingOutput('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix), &
VarSpeedCoil(DXCoilNum)%Name, &
'Design Size Rated Air Flow Rate [m3/s]', &
RatedAirVolFlowRateDes, &
'User-Specified Rated Air Flow Rate [m3/s]', &
RatedAirVolFlowRateUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(RatedAirVolFlowRateDes - RatedAirVolFlowRateUser)/RatedAirVolFlowRateUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeVarSpeedCoil: Potential issue with equipment sizing for' &
//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//' '//TRIM(CurrentObjSubfix))
CALL ShowContinueError('Coil Name ='//TRIM(VarSpeedCoil(DXCoilNum)%Name))
CALL ShowContinueError('User-Specified Rated Air Flow Rate of '// &
TRIM(RoundSigDigits(RatedAirVolFlowRateUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Rated Air Flow Rate of ' // &
TRIM(RoundSigDigits(RatedAirVolFlowRateDes,5))// ' [m3/s]')
CALL ShowContinueError('This may, or may not, indicate mismatched component sizes.')
CALL ShowContinueError('Verify that the value entered is intended and is consistent with other components.')
END IF
ENDIF
END IF
END IF
END IF
! Check that heat pump heating capacity is within 20% of cooling capacity. Check only for heating coil and report both.
IF (VarSpeedCoil(DXCoilNum)%CoolHeatType == 'HEATING' .AND. &
VarSpeedCoil(DXCoilNum)%CompanionCoolingCoilNum .GT. 0)THEN
IF(VarSpeedCoil(VarSpeedCoil(DXCoilNum)%CompanionCoolingCoilNum)%RatedCapCoolTotal .GT. 0.0D0)THEN
IF(ABS(VarSpeedCoil(VarSpeedCoil(DXCoilNum)%CompanionCoolingCoilNum)%RatedCapCoolTotal- &
VarSpeedCoil(DXCoilNum)%RatedCapHeat)/ &
VarSpeedCoil(VarSpeedCoil(DXCoilNum)%CompanionCoolingCoilNum)%RatedCapCoolTotal .GT. 0.2d0) THEN
CALL ShowWarningError('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)// &
':WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT "'//TRIM(VarSpeedCoil(DXCoilNum)%Name)//'"')
CALL ShowContinueError('...used with COIL:'// &
TRIM(VarSpeedCoil(VarSpeedCoil(DXCoilNum)%CompanionCoolingCoilNum)%CoolHeatType)// &
':WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT "'// &
TRIM(VarSpeedCoil(VarSpeedCoil(DXCoilNum)%CompanionCoolingCoilNum)%Name)//'"')
CALL ShowContinueError('...heating capacity is disproportionate (> 20% different) to total cooling capacity')
CALL ShowContinueError('...heating capacity = '//TRIM(TrimSigDigits(VarSpeedCoil(DXCoilNum)%RatedCapHeat,3))//' W')
CALL ShowContinueError('...cooling capacity = '// &
TRIM(TrimSigDigits(VarSpeedCoil(VarSpeedCoil(DXCoilNum)%CompanionCoolingCoilNum)%RatedCapCoolTotal,3))//' W')
END IF
END IF
END IF
!ASSIGN CAPACITY
IF (VarSpeedCoil(DXCoilNum)%CoolHeatType == 'COOLING') THEN
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(UpperSpeed) = VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal/ &
VarSpeedCoil(DXCoilNum)%MSRatedPercentTotCap(NormSpeed)
ELSE IF (VarSpeedCoil(DXCoilNum)%CoolHeatType == 'HEATING') THEN
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(UpperSpeed) = VarSpeedCoil(DXCoilNum)%RatedCapHeat/ &
VarSpeedCoil(DXCoilNum)%MSRatedPercentTotCap(NormSpeed)
END IF
rhoA = PsyRhoAirFnPbTdbW(OutBaroPress,RatedInletAirTemp,RatedInletAirHumRat,RoutineName)
Do Mode = VarSpeedCoil(DXCoilNum)%NumOfSpeeds,1,-1
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(Mode) = VarSpeedCoil(DXCoilNum)%MSRatedTotCap(UpperSpeed) * &
VarSpeedCoil(DXCoilNum)%MSRatedPercentTotCap(Mode)
VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowRate(Mode) = VarSpeedCoil(DXCoilNum)%MSRatedTotCap(Mode) * &
VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowPerRatedTotCap(Mode)
VarSpeedCoil(DXCoilNum)%MSRatedAirMassFlowRate(Mode) = VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowRate(Mode)* &
rhoA
! EVAPORATIVE PRECOOLING CONDENSER AIR FLOW RATE
VarSpeedCoil(DXCoilNum)%EvapCondAirFlow(Mode) = VarSpeedCoil(DXCoilNum)%MSRatedTotCap(Mode) * &
VarSpeedCoil(DXCoilNum)%MSRatedEvapCondVolFlowPerRatedTotCap(Mode)
END DO
! size rated power
IF (VarSpeedCoil(DXCoilNum)%CoolHeatType == 'COOLING') THEN
VarSpeedCoil(DXCoilNum)%RatedCOPCool = VarSpeedCoil(DXCoilNum)%MSRatedCOP(VarSpeedCoil(DXCoilNum)%NormSpedLevel)
VarSpeedCoil(DXCoilNum)%RatedPowerCool = VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal/VarSpeedCoil(DXCoilNum)%RatedCOPCool
ELSE IF (VarSpeedCoil(DXCoilNum)%CoolHeatType == 'HEATING') THEN
VarSpeedCoil(DXCoilNum)%RatedCOPHeat = VarSpeedCoil(DXCoilNum)%MSRatedCOP(VarSpeedCoil(DXCoilNum)%NormSpedLevel)
VarSpeedCoil(DXCoilNum)%RatedPowerHeat = VarSpeedCoil(DXCoilNum)%RatedCapHeat/VarSpeedCoil(DXCoilNum)%RatedCOPHeat
VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal = VarSpeedCoil(DXCoilNum)%RatedCapHeat
END IF
! Size water volumetric flow rate
IF ((VarSpeedCoil(DXCoilNum)%RatedWaterVolFlowRate == AutoSize) .AND. &
(VarSpeedCoil(DXCoilNum)%VSCoilTypeOfNum==TypeOf_CoilVSWAHPCoolingEquationFit .OR. &
VarSpeedCoil(DXCoilNum)%VSCoilTypeOfNum==TypeOf_CoilVSWAHPHeatingEquationFit )) THEN
RatedWaterFlowAutosized = .TRUE.
END IF
!! if not found on a plant loop, check condenser loop and warn user if not found
! IF(PltSizNum == 0) THEN
!
! PltSizNum = &
! MyCondPlantSizingIndex('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)// &
! TRIM(CurrentObjSubfix), &
! VarSpeedCoil(DXCoilNum)%Name, &
! VarSpeedCoil(DXCoilNum)%WaterInletNodeNum, &
! VarSpeedCoil(DXCoilNum)%WaterOutletNodeNum, ErrorsFound)
! END IF
! WSHP condenser can be on either a plant loop or condenser loop. Test each to find plant sizing number.
! first check to see if coil is connected to a plant loop, no warning on this CALL
IF (RatedWaterFlowAutosized) THEN
IF(VarSpeedCoil(DXCoilNum)%CondenserType == WaterCooled)PltSizNum = &
MyPlantSizingIndex('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix), &
VarSpeedCoil(DXCoilNum)%Name, &
VarSpeedCoil(DXCoilNum)%WaterInletNodeNum, &
VarSpeedCoil(DXCoilNum)%WaterOutletNodeNum, ErrorsFound, .FALSE.)
IF (PltSizNum > 0) THEN
rho = GetDensityGlycol(PlantLoop(VarSpeedCoil(DXCoilNum)%LoopNum)%FluidName, &
PlantSizData(PltSizNum)%ExitTemp, &
PlantLoop(VarSpeedCoil(DXCoilNum)%LoopNum)%FluidIndex, &
'SizeHVACWaterToAir')
Cp = GetSpecificHeatGlycol(PlantLoop(VarSpeedCoil(DXCoilNum)%LoopNum)%FluidName, &
PlantSizData(PltSizNum)%ExitTemp, &
PlantLoop(VarSpeedCoil(DXCoilNum)%LoopNum)%FluidIndex, &
'SizeHVACWaterToAir')
IF (VarSpeedCoil(DXCoilNum)%CoolHeatType == 'HEATING') THEN
RatedWaterVolFlowRateDes = VarSpeedCoil(DXCoilNum)%RatedCapHeat / &
( PlantSizData(PltSizNum)%DeltaT * Cp * rho )
! CALL ReportSizingOutput('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//&
! TRIM(CurrentObjSubfix), &
! VarSpeedCoil(DXCoilNum)%Name, &
! 'Rated Water Flow Rate [m3/s]', VarSpeedCoil(DXCoilNum)%RatedWaterVolFlowRate)
ELSEIF(VarSpeedCoil(DXCoilNum)%CoolHeatType == 'COOLING') THEN
! use companion heating coil capacity to calculate volumetric flow rate
IF(VarSpeedCoil(DXCoilNum)%CompanionCoolingCoilNum .GT. 0)THEN
SystemCapacity = VarSpeedCoil(VarSpeedCoil(DXCoilNum)%CompanionCoolingCoilNum)%RatedCapHeat
ELSE
SystemCapacity = VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal
END IF
RatedWaterVolFlowRateDes = &
SystemCapacity / &
( PlantSizData(PltSizNum)%DeltaT * Cp * rho )
! CALL ReportSizingOutput('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)&
! //TRIM(CurrentObjSubfix), &
! VarSpeedCoil(DXCoilNum)%Name, &
! 'Rated Water Flow Rate [m3/s]', VarSpeedCoil(DXCoilNum)%RatedWaterVolFlowRate)
END IF
ELSE
CALL ShowSevereError('Autosizing of water flow requires a loop Sizing:Plant object')
CALL ShowContinueError('Autosizing also requires physical connection to a plant or condenser loop.')
CALL ShowContinueError('Occurs in ' // &
'COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//&
TRIM(CurrentObjSubfix) // ' Object=' &
//TRIM(VarSpeedCoil(DXCoilNum)%Name))
ErrorsFound = .TRUE.
END IF
END IF
!WRITE THE WATER SIZING OUTPUT
IF (RatedWaterFlowAutosized) THEN
! FORCE BACK TO THE RATED WATER FLOW RATE WITH THE SAME RATIO DEFINED BY THE CATLOG DATA
IF(RatedCapCoolTotalAutosized) THEN
RatedWaterVolFlowRateDes = VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal &
*VarSpeedCoil(DXCoilNum)%MSRatedWaterVolFlowPerRatedTotCap(NormSpeed)
ELSE IF(RatedCapHeatAutosized) THEN
RatedWaterVolFlowRateDes = VarSpeedCoil(DXCoilNum)%RatedCapHeat &
*VarSpeedCoil(DXCoilNum)%MSRatedWaterVolFlowPerRatedTotCap(NormSpeed)
END IF
VarSpeedCoil(DXCoilNum)%RatedWaterVolFlowRate = RatedWaterVolFlowRateDes
CALL ReportSizingOutput('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType) &
//TRIM(CurrentObjSubfix), &
VarSpeedCoil(DXCoilNum)%Name, &
'Design Size Rated Water Flow Rate [m3/s]', RatedWaterVolFlowRateDes)
! Ensure water flow rate at lower speed must be lower or
! equal to the flow rate at higher speed. Otherwise, a severe error is isssued.
Do Mode = 1,VarSpeedCoil(DXCoilNum)%NumOfSpeeds-1
If (VarSpeedCoil(DXCoilNum)%MSRatedWaterVolFlowRate(Mode) .GT. &
VarSpeedCoil(DXCoilNum)%MSRatedWaterVolFlowRate(Mode+1) * 1.05d0) Then
CALL ShowWarningError('SizeDXCoil: '//TRIM(VarSpeedCoil(DXCoilNum)%VarSpeedCoilType) &
//' '//TRIM(VarSpeedCoil(DXCoilNum)%Name)//', '// &
'Speed '//Trim(TrimSigDigits(Mode))//' Rated Air Flow Rate must be less than or equal to '//&
'Speed '//Trim(TrimSigDigits(Mode+1))//' Rated Air Flow Rate.')
CALL ShowContinueError('Instead, '//TRIM(RoundSigDigits(VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowRate(Mode),2))//' > '// &
TRIM(RoundSigDigits(VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowRate(Mode+1),2)))
CALL ShowFatalError('Preceding conditions cause termination.')
End If
End Do
ELSE
IF (VarSpeedCoil(DXCoilNum)%RatedWaterVolFlowRate > 0.0d0 .AND. RatedWaterVolFlowRateDes > 0.0d0) THEN
RatedWaterVolFlowRateUser = VarSpeedCoil(DXCoilNum)%RatedWaterVolFlowRate
CALL ReportSizingOutput('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix), &
VarSpeedCoil(DXCoilNum)%Name, &
'Design Size Rated Water Flow Rate [m3/s]', &
RatedWaterVolFlowRateDes, &
'User-Specified Rated Water Flow Rate [m3/s]', &
RatedWaterVolFlowRateUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(RatedWaterVolFlowRateDes - RatedWaterVolFlowRateUser)/RatedWaterVolFlowRateUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeVarSpeedCoil: Potential issue with equipment sizing for' &
//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//' '//TRIM(CurrentObjSubfix))
CALL ShowContinueError('Coil Name ='//TRIM(VarSpeedCoil(DXCoilNum)%Name))
CALL ShowContinueError('User-Specified Rated Water Flow Rate of '// &
TRIM(RoundSigDigits(RatedWaterVolFlowRateUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Rated Water Flow Rate of ' // &
TRIM(RoundSigDigits(RatedWaterVolFlowRateDes,5))// ' [m3/s]')
CALL ShowContinueError('This may, or may not, indicate mismatched component sizes.')
CALL ShowContinueError('Verify that the value entered is intended and is consistent with other components.')
END IF
ENDIF
END IF
END IF
! Save component design water volumetric flow rate.
! Use 1/2 flow since both cooling and heating coil will save flow yet only 1 will operate at a time
IF(VarSpeedCoil(DXCoilNum)%RatedWaterVolFlowRate .GT. 0.0d0)THEN
CALL RegisterPlantCompDesignFlow(VarSpeedCoil(DXCoilNum)%WaterInletNodeNum, &
0.5d0*VarSpeedCoil(DXCoilNum)%RatedWaterVolFlowRate)
END IF
IF (VarSpeedCoil(DXCoilNum)%VSCoilTypeOfNum==TypeOf_CoilVSWAHPCoolingEquationFit .OR. &
VarSpeedCoil(DXCoilNum)%VSCoilTypeOfNum==TypeOf_CoilVSWAHPHeatingEquationFit ) THEN
RatedSourceTempCool = RatedInletWaterTemp
IF (PltSizNum > 0) THEN
rhoW = rho
ELSE IF(VarSpeedCoil(DXCoilNum)%VSCoilTypeOfNum==TypeOf_CoilVSWAHPCoolingEquationFit) THEN
rhoW = GetDensityGlycol(PlantLoop(VarSpeedCoil(DXCoilNum)%LoopNum)%FluidName, &
RatedInletWaterTemp, &
PlantLoop(VarSpeedCoil(DXCoilNum)%LoopNum)%FluidIndex, &
'SizeVarSpeedCoil')
ELSE
rhoW = GetDensityGlycol(PlantLoop(VarSpeedCoil(DXCoilNum)%LoopNum)%FluidName, &
RatedInletWaterTempHeat, &
PlantLoop(VarSpeedCoil(DXCoilNum)%LoopNum)%FluidIndex, &
'SizeVarSpeedCoil')
END IF
VarSpeedCoil(DXCoilNum)%RatedWaterMassFlowRate = VarSpeedCoil(DXCoilNum)%RatedWaterVolFlowRate * rhoW
Do Mode = VarSpeedCoil(DXCoilNum)%NumOfSpeeds,1,-1
VarSpeedCoil(DXCoilNum)%MSRatedWaterVolFlowRate(Mode) = VarSpeedCoil(DXCoilNum)%MSRatedTotCap(Mode) * &
VarSpeedCoil(DXCoilNum)%MSRatedWaterVolFlowPerRatedTotCap(Mode)
VarSpeedCoil(DXCoilNum)%MSRatedWaterMassFlowRate(Mode) = &
VarSpeedCoil(DXCoilNum)%MSRatedWaterVolFlowRate(Mode) * rhoW
END DO
ELSE
RatedSourceTempCool = RatedAmbAirTemp
END IF
! Ensure air flow rate at lower speed must be lower or
! equal to the flow rate at higher speed. Otherwise, a severe error is isssued.
Do Mode = 1,VarSpeedCoil(DXCoilNum)%NumOfSpeeds-1
If (VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowRate(Mode) .GT. VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowRate(Mode+1)) Then
CALL ShowWarningError('SizeDXCoil: '//TRIM(VarSpeedCoil(DXCoilNum)%VarSpeedCoilType) &
//' '//TRIM(VarSpeedCoil(DXCoilNum)%Name)//', '// &
'Speed '//Trim(TrimSigDigits(Mode))//' Rated Air Flow Rate must be less than or equal to '//&
'Speed '//Trim(TrimSigDigits(Mode+1))//' Rated Air Flow Rate.')
CALL ShowContinueError('Instead, '//TRIM(RoundSigDigits(VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowRate(Mode),2))//' > '// &
TRIM(RoundSigDigits(VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowRate(Mode+1),2)))
CALL ShowFatalError('Preceding conditions cause termination.')
End If
End Do
! Ensure capacity at lower speed must be lower or equal to the capacity at higher speed.
Do Mode = 1,VarSpeedCoil(DXCoilNum)%NumOfSpeeds-1
If (VarSpeedCoil(DXCoilNum)%MSRatedTotCap(Mode) .GT. VarSpeedCoil(DXCoilNum)%MSRatedTotCap(Mode+1)) Then
CALL ShowWarningError('SizeDXCoil: '//TRIM(VarSpeedCoil(DXCoilNum)%VarSpeedCoilType)&
//' '//TRIM(VarSpeedCoil(DXCoilNum)%Name)//', '// &
'Speed '//Trim(TrimSigDigits(Mode))//' Rated Total Cooling Capacity must be less than or equal to '//&
'Speed '//Trim(TrimSigDigits(Mode+1))//' Rated Total Cooling Capacity.')
CALL ShowContinueError('Instead, '//TRIM(RoundSigDigits(VarSpeedCoil(DXCoilNum)%MSRatedTotCap(Mode),2))//' > '// &
TRIM(RoundSigDigits(VarSpeedCoil(DXCoilNum)%MSRatedTotCap(Mode+1),2)))
CALL ShowFatalError('Preceding conditions cause termination.')
End If
End Do
!convert SHR to rated Bypass factor and effective air side surface area
IF (VarSpeedCoil(DXCoilNum)%CoolHeatType == 'COOLING') THEN
Do Mode = 1,VarSpeedCoil(DXCoilNum)%NumOfSpeeds
VarSpeedCoil(DXCoilNum)%MSRatedCBF(Mode) = &
CalcCBF(VarSpeedCoil(DXCoilNum)%VarSpeedCoilType,VarSpeedCoil(DXCoilNum)%Name,&
RatedInletAirTemp,RatedInletAirHumRat,VarSpeedCoil(DXCoilNum)%MSRatedTotCap(Mode),&
VarSpeedCoil(DXCoilNum)%MSRatedAirMassFlowRate(Mode),&
VarSpeedCoil(DXCoilNum)%MSRatedSHR(Mode))
IF ( VarSpeedCoil(DXCoilNum)%MSRatedCBF(Mode) .gt. 0.0d0) THEN
VarSpeedCoil(DXCoilNum)%MSEffectiveAo(Mode) = -log( VarSpeedCoil(DXCoilNum)%MSRatedCBF(Mode))* &
VarSpeedCoil(DXCoilNum)%MSRatedAirMassFlowRate(Mode)
ELSE
VarSpeedCoil(DXCoilNum)%MSEffectiveAo(Mode) = 0.0d0
END IF
End Do
END IF
! size rated sensible cooling capacity
RatedCapCoolSensAutosized = .TRUE. !always do that
IF (VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate >= SmallAirVolFloW .AND. VarSpeedCoil(DXCoilNum)%CoolHeatType == 'COOLING') THEN
RatedAirMassFlowRate = VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate* &
PsyRhoAirFnPbTdbW(StdBaroPress,RatedInletAirTemp,RatedInletAirHumRat,RoutineName)
RatedInletEnth = PsyHFnTdbW(RatedInletAirTemp,RatedInletAirHumRat,RoutineName)
CBFRated = AdjustCBF(VarSpeedCoil(DXCoilNum)%MSRatedCBF(NormSpeed), &
VarSpeedCoil(DXCoilNum)%MSRatedAirMassFlowRate(NormSpeed), &
RatedAirMassFlowRate)
IF(CBFRated > 0.999d0) CBFRated = 0.999d0
AirMassFlowRatio = VarSpeedCoil(DXCoilNum)%RatedAirVolFlowRate/ VarSpeedCoil(DXCoilNum)%MSRatedAirVolFlowRate(NormSpeed)
IF(VarSpeedCoil(DXCoilNum)%MSRatedWaterVolFlowRate(NormSpeed).GT. 1.0d-10) THEN
WaterMassFlowRatio = VarSpeedCoil(DXCoilNum)%RatedWaterVolFlowRate/ &
VarSpeedCoil(DXCoilNum)%MSRatedWaterVolFlowRate(NormSpeed)
ELSE
WaterMassFlowRatio = 1.0d0
END IF
CALL CalcTotCapSHR_VSWSHP(RatedInletAirTemp,RatedInletAirHumRat,RatedInletEnth,RatedInletWetbulbTemp, &
AirMassFlowRatio, WaterMassFlowRatio, &
RatedAirMassFlowRate,CBFRated, &
VarSpeedCoil(DXCoilNum)%MSRatedTotCap(NormSpeed),VarSpeedCoil(DXCoilNum)%MSCCapFTemp(NormSpeed), &
VarSpeedCoil(DXCoilNum)%MSCCapAirFFlow(NormSpeed), VarSpeedCoil(DXCoilNum)%MSCCapWaterFFlow(NormSpeed),&
0.0d0,0,0, 0,&
QLoadTotal1, QLoadTotal2, QLoadTotal,SHR,RatedSourceTempCool, &
StdBaroPress, 0.0d0, 1)
RatedCapCoolSensDes = VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal * SHR
ELSE
RatedCapCoolSensDes = 0.0d0
END IF
IF (RatedCapCoolSensDes < SmallLoad) THEN
RatedCapCoolSensDes = 0.0d0
END IF
IF (VarSpeedCoil(DXCoilNum)%CoolHeatType == 'COOLING') THEN !always report for cooling mode
IF(RatedCapCoolTotalAutosized) THEN
VarSpeedCoil(DXCoilNum)%RatedCapCoolSens = RatedCapCoolSensDes
CALL ReportSizingOutput('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix),&
VarSpeedCoil(DXCoilNum)%Name, &
'Design Size Rated Sensible Cooling Capacity [W]', &
VarSpeedCoil(DXCoilNum)%RatedCapCoolSens)
!CALL PreDefTableEntry(pdchCoolCoilSensCap,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapCoolSens)
!CALL PreDefTableEntry(pdchCoolCoilLatCap,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal &
! - VarSpeedCoil(DXCoilNum)%RatedCapCoolSens)
!IF (VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal /= 0.0d0) THEN
! CALL PreDefTableEntry(pdchCoolCoilSHR,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapCoolSens &
! / VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal)
!ELSE
! CALL PreDefTableEntry(pdchCoolCoilSHR,VarSpeedCoil(DXCoilNum)%Name,0.0d0)
!ENDIF
ELSE
! sensible capacity does not have an input field
IF (RatedCapCoolSensDes > 0.0d0 .AND. RatedCapCoolSensDes > 0.0d0) THEN
VarSpeedCoil(DXCoilNum)%RatedCapCoolSens = RatedCapCoolSensDes
CALL ReportSizingOutput('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//TRIM(CurrentObjSubfix),&
VarSpeedCoil(DXCoilNum)%Name, &
'Design Size Rated Sensible Cooling Capacity [W]', &
RatedCapCoolSensDes) !, &
! 'User-Specified Rated Sensible Cooling Capacity [W]', &
! RatedCapCoolSensUser)
! IF (DisplayExtraWarnings) THEN
! IF ((ABS(RatedCapCoolSensDes - RatedCapCoolSensUser)/RatedCapCoolSensUser) > AutoVsHardSizingThreshold) THEN
! CALL ShowMessage('SizeVarSpeedCoil: Potential issue with equipment sizing for:' &
! //TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//' '//TRIM(CurrentObjSubfix))
! CALL ShowContinueError('Coil Name ='//TRIM(VarSpeedCoil(DXCoilNum)%Name))
! CALL ShowContinueError('User-Specified Rated Sensible Cooling Capacity of '// &
! TRIM(RoundSigDigits(RatedCapCoolSensUser,2))// ' [W]')
! CALL ShowContinueError('differs from Design Size Rated Sensible Cooling Capacity of ' // &
! TRIM(RoundSigDigits(RatedCapCoolSensDes,2))// ' [W]')
! CALL ShowContinueError('This may, or may not, indicate mismatched component sizes.')
! CALL ShowContinueError('Verify that the value entered is intended and is consistent with other components.')
! END IF
! ENDIF
END IF
END IF
CALL PreDefTableEntry(pdchCoolCoilTotCap,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal)
CALL PreDefTableEntry(pdchCoolCoilSensCap,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapCoolSens)
CALL PreDefTableEntry(pdchCoolCoilLatCap,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal &
- VarSpeedCoil(DXCoilNum)%RatedCapCoolSens)
IF (VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal /= 0.0d0) THEN
CALL PreDefTableEntry(pdchCoolCoilSHR,VarSpeedCoil(DXCoilNum)%Name,VarSpeedCoil(DXCoilNum)%RatedCapCoolSens &
/ VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal)
ELSE
CALL PreDefTableEntry(pdchCoolCoilSHR,VarSpeedCoil(DXCoilNum)%Name,0.0d0)
ENDIF
CALL PreDefTableEntry(pdchCoolCoilNomEff,VarSpeedCoil(DXCoilNum)%Name,&
VarSpeedCoil(DXCoilNum)%MSRatedCOP(VarSpeedCoil(DXCoilNum)%NormSpedLevel))
CALL addFootNoteSubTable(pdstCoolCoil, 'Nominal values are gross at rated conditions, i.e., the supply air fan' &
//' heat and electric power NOT accounted for.')
END IF
! START SIZING EVAP PRECOOLING PUMP POWER
IsAutosize = .FALSE.
IF(VarSpeedCoil(DXCoilNum)%VSCoilTypeOfNum .EQ. Coil_CoolingAirToAirVariableSpeed) THEN
IF (VarSpeedCoil(DXCoilNum)%EvapCondPumpElecNomPower == AutoSize) THEN
IsAutosize = .TRUE.
END IF
! Auto size high speed evap condenser pump power to Total Capacity * 0.004266 w/w (15 w/ton)
EvapCondPumpElecNomPowerDes = VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal*0.004266d0
IF (IsAutosize) THEN
VarSpeedCoil(DXCoilNum)%EvapCondPumpElecNomPower = EvapCondPumpElecNomPowerDes
CALL ReportSizingOutput("AS VS COOLING COIL", VarSpeedCoil(DXCoilNum)%Name, &
'Design Size Evaporative Condenser Pump Rated Power Consumption [W]', &
EvapCondPumpElecNomPowerDes)
ELSE
IF (VarSpeedCoil(DXCoilNum)%EvapCondPumpElecNomPower > 0.0d0 .AND. EvapCondPumpElecNomPowerDes > 0.0d0) THEN
EvapCondPumpElecNomPowerUser = VarSpeedCoil(DXCoilNum)%EvapCondPumpElecNomPower
CALL ReportSizingOutput("AS VS COOLING COIL", VarSpeedCoil(DXCoilNum)%Name, &
'Design Size Evaporative Condenser Pump Rated Power Consumption [W]', &
EvapCondPumpElecNomPowerDes, &
'User-Specified Evaporative Condenser Pump Rated Power Consumption [W]', &
EvapCondPumpElecNomPowerUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(EvapCondPumpElecNomPowerDes - EvapCondPumpElecNomPowerUser)/EvapCondPumpElecNomPowerUser) &
> AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeVarSpeedCoil: Potential issue with equipment sizing for ' &
//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//' '//TRIM(CurrentObjSubfix))
CALL ShowContinueError('Coil Name ='//TRIM(VarSpeedCoil(DXCoilNum)%Name))
CALL ShowContinueError('User-Specified Evaporative Condenser Pump Rated Power Consumption of '// &
TRIM(RoundSigDigits(EvapCondPumpElecNomPowerUser,2))// ' [W]')
CALL ShowContinueError('differs from Design Size Evaporative Condenser Pump Rated Power Consumption of ' // &
TRIM(RoundSigDigits(EvapCondPumpElecNomPowerDes,2))// ' [W]')
CALL ShowContinueError('This may, or may not, indicate mismatched component sizes.')
CALL ShowContinueError('Verify that the value entered is intended and is consistent with other components.')
END IF
ENDIF
END IF
END IF
END IF
! END SIZING EVAP PRE-COOLING PUMP POWER
!SIZE DEFROST HEATER
! Resistive Defrost Heater Capacity = capacity at the first stage
IsAutosize = .FALSE.
IF(VarSpeedCoil(DXCoilNum)%VSCoilTypeOfNum .EQ. Coil_HeatingAirToAirVariableSpeed) THEN
IF (VarSpeedCoil(DXCoilNum)%DefrostCapacity == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (VarSpeedCoil(DXCoilNum)%DefrostStrategy == Resistive) THEN
DefrostCapacityDes = VarSpeedCoil(DXCoilNum)%RatedCapHeat
ELSE
DefrostCapacityDes = 0.0d0
END IF
IF (IsAutosize) THEN
VarSpeedCoil(DXCoilNum)%DefrostCapacity = DefrostCapacityDes
CALL ReportSizingOutput("AS VS HEATING COIL", VarSpeedCoil(DXCoilNum)%Name, &
'Design Size Resistive Defrost Heater Capacity [W]', DefrostCapacityDes)
ELSE
IF (VarSpeedCoil(DXCoilNum)%DefrostCapacity > 0.0d0 .AND. DefrostCapacityDes > 0.0d0 &
.AND. .NOT. HardSizeNoDesRun) THEN
DefrostCapacityUser = VarSpeedCoil(DXCoilNum)%DefrostCapacity
CALL ReportSizingOutput("AS VS HEATING COIL", VarSpeedCoil(DXCoilNum)%Name, &
'Design Size Resistive Defrost Heater Capacity [W]', DefrostCapacityDes, &
'User-Specified Resistive Defrost Heater Capacity [W]', DefrostCapacityUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(DefrostCapacityDes - DefrostCapacityUser)/DefrostCapacityUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeVarSpeedCoil: Potential issue with equipment sizing for ' &
//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)//' '//TRIM(CurrentObjSubfix))
CALL ShowContinueError('Coil Name ='//TRIM(VarSpeedCoil(DXCoilNum)%Name))
CALL ShowContinueError('User-Specified Resistive Defrost Heater Capacity of '// &
TRIM(RoundSigDigits(DefrostCapacityUser,2))// ' [W]')
CALL ShowContinueError('differs from Design Size Resistive Defrost Heater Capacity of ' // &
TRIM(RoundSigDigits(DefrostCapacityDes,2))// ' [W]')
CALL ShowContinueError('This may, or may not, indicate mismatched component sizes.')
CALL ShowContinueError('Verify that the value entered is intended and is consistent with other components.')
END IF
ENDIF
END IF
END IF
END IF
!END SIZING DEFROST HEATER
! test autosized sensible and total cooling capacity for total > sensible
IF(RatedCapCoolSensAutosized .AND. RatedCapCoolTotalAutosized .OR. &
RatedCapCoolSensAutosized)THEN
IF(VarSpeedCoil(DXCoilNum)%RatedCapCoolSens .GT. VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal)THEN
CALL ShowWarningError('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)// &
':WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT "'// &
TRIM(VarSpeedCoil(DXCoilNum)%Name)//'"')
CALL ShowContinueError(RoutineName//': Rated Sensible Cooling Capacity > Rated Total Cooling Capacity')
CALL ShowContinueError('Each of these capacity inputs have been autosized.')
CALL ShowContinueError('Rated Sensible Cooling Capacity = '// &
TRIM(TrimSigDigits(VarSpeedCoil(DXCoilNum)%RatedCapCoolSens,2))//' W')
CALL ShowContinueError('Rated Total Cooling Capacity = '// &
TRIM(TrimSigDigits(VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal,2))//' W')
CALL ShowContinueError('See eio file for further details.')
CALL ShowContinueError('Check Total and Sensible Cooling Capacity Coefficients to ensure they are accurate.')
CALL ShowContinueError('Check Zone and System Sizing objects to verify sizing inputs.')
CALL ShowContinueError('Sizing statistics:')
CALL ShowContinueError('Entering Air Dry-Bulb Temperature = '//TRIM(TrimSigDigits(MixTemp,3))//' C')
CALL ShowContinueError('Entering Air Wet-Bulb Temperature = '//TRIM(TrimSigDigits(MixWetBulb,3))//' C')
CALL ShowContinueError('Entering Condenser Water Temperature used = 24.4444 C')
CALL ShowContinueError('Used design air and water flow rates (i.e., used 1 for ratioVL and ratioVS)')
CALL ShowContinueError('ratioTDB = '//TRIM(TrimSigDigits(((MixTemp+283.15d0)/273.15d0),3)))
CALL ShowContinueError('ratioTWB = '//TRIM(TrimSigDigits(((MixWetBulb+283.15d0)/273.15d0),3)))
CALL ShowContinueError('ratioTS = '//TRIM(TrimSigDigits(((85.0d0+283.15d0)/273.15d0),3)))
CALL ShowContinueError('Rated Sensible Cooling Capacity = Rated Total Cooling Capacity * Sensible Heat Ratio')
CALL ShowContinueError('Total Cooling Capacity Modifier = '//TRIM(TrimSigDigits(TotCapTempModFac,5)))
CALL ShowContinueError('...Rated Total Cooling Capacity = Total Design Load / Total Cooling Capacity Modifier')
CALL ShowContinueError('Carefully review the Load Side Total, Sensible, and Latent heat transfer rates')
CALL ShowContinueError('... to ensure they meet the expected manufacturers performance specifications.')
END IF
ELSE If(RatedCapCoolTotalAutosized)THEN
IF(VarSpeedCoil(DXCoilNum)%RatedCapCoolSens .GT. VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal)THEN
CALL ShowWarningError('COIL:'//TRIM(VarSpeedCoil(DXCoilNum)%CoolHeatType)&
//':WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT "'// &
TRIM(VarSpeedCoil(DXCoilNum)%Name)//'"')
CALL ShowContinueError(RoutineName//': Rated Sensible Cooling Capacity > Rated Total Cooling Capacity')
CALL ShowContinueError('Only the rated total capacity input is autosized, consider autosizing both inputs.')
CALL ShowContinueError('Rated Sensible Cooling Capacity = '// &
TRIM(TrimSigDigits(VarSpeedCoil(DXCoilNum)%RatedCapCoolSens,2))//' W')
CALL ShowContinueError('Rated Total Cooling Capacity = '// &
TRIM(TrimSigDigits(VarSpeedCoil(DXCoilNum)%RatedCapCoolTotal,2))//' W')
CALL ShowContinueError('See eio file for further details.')
CALL ShowContinueError('Check Total and Sensible Cooling Capacity Coefficients to ensure they are accurate.')
CALL ShowContinueError('Check Zone and System Sizing objects to verify sizing inputs.')
CALL ShowContinueError('Sizing statistics for Total Cooling Capacity:')
CALL ShowContinueError('Entering Air Wet-Bulb Temperature = '//TRIM(TrimSigDigits(MixWetBulb,3))//' C')
CALL ShowContinueError('Entering Condenser Water Temperature used = 24.4444 C')
CALL ShowContinueError('Used design air and water flow rates (i.e., used 1 for ratioVL and ratioVS)')
CALL ShowContinueError('ratioTWB = '//TRIM(TrimSigDigits(((MixWetBulb+283.15d0)/273.15d0),3)))
CALL ShowContinueError('ratioTS = '//TRIM(TrimSigDigits(((85.0d0+283.15d0)/273.15d0),3)))
CALL ShowContinueError('Rated Sensible Cooling Capacity = Rated Total Cooling Capacity * Sensible Heat Ratio')
CALL ShowContinueError('Carefully review the Load Side Total, Sensible, and Latent heat transfer rates')
CALL ShowContinueError('... to ensure they meet the expected manufacturers performance specifications.')
END IF
END IF
RETURN
END SUBROUTINE SizeVarSpeedCoil