if not found on a plant loop, check condenser loop and warn user if not found
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | HPNum |
SUBROUTINE SizeHVACWaterToAir(HPNum)
! SUBROUTINE INFORMATION:
! AUTHOR Richard Raustad, FSEC
! DATE WRITTEN June 2009
! 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: TrimSigDigits, RoundSigDigits
USE PlantUtilities, ONLY: RegisterPlantCompDesignFlow
USE ReportSizingManager, ONLY: ReportSizingOutput
USE DataAirSystems, ONLY: PrimaryAirSystem
USE OutputReportPredefined
USE FluidProperties, ONLY: GetDensityGlycol, GetSpecificHeatGlycol
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
Integer, Intent(IN) :: HPNum
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName='SizeWaterToAirCoil'
! 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) :: ratioTDB
REAL(r64) :: ratioTWB
REAL(r64) :: ratioTS
REAL(r64) :: OutAirFrac
REAL(r64) :: VolFlowRate
REAL(r64) :: CoolCapAtPeak
REAL(r64) :: TotCapTempModFac
REAL(r64) :: SensCapAtPeak
REAL(r64) :: SensCapTempModFac
REAL(r64) :: TotalCapCoeff1 ! 1st coefficient of the total cooling capacity performance curve
REAL(r64) :: TotalCapCoeff2 ! 2nd coefficient of the total cooling capacity performance curve
REAL(r64) :: TotalCapCoeff3 ! 3rd coefficient of the total cooling capacity performance curve
REAL(r64) :: TotalCapCoeff4 ! 4th coefficient of the total cooling capacity performance curve
REAL(r64) :: TotalCapCoeff5 ! 5th coefficient of the total cooling capacity performance curve
REAL(r64) :: SensCapCoeff1 ! 1st coefficient of the sensible cooling capacity performance curve
REAL(r64) :: SensCapCoeff2 ! 2nd coefficient of the sensible cooling capacity performance curve
REAL(r64) :: SensCapCoeff3 ! 3rd coefficient of the sensible cooling capacity performance curve
REAL(r64) :: SensCapCoeff4 ! 4th coefficient of the sensible cooling capacity performance curve
REAL(r64) :: SensCapCoeff5 ! 5th coefficient of the sensible cooling capacity performance curve
REAL(r64) :: SensCapCoeff6 ! 6th coefficient of the sensible cooling capacity performance curve
INTEGER :: TimeStepNumAtMax
INTEGER :: DDNum
INTEGER :: PltSizNum
LOGICAL :: RatedCapCoolTotalAutosized
LOGICAL :: RatedCapCoolSensAutosized
LOGICAL :: ErrorsFound
REAL(r64) :: SystemCapacity
REAL(r64) :: rho
REAL(r64) :: cp
LOGICAL :: IsAutosize ! Indicator to autosize
LOGICAL :: HardSizeNoDesRun ! Indicator to hardsize and no sizing run
REAL(r64) :: RatedAirVolFlowRateDes ! Autosized rated air flow for reporting
REAL(r64) :: RatedAirVolFlowRateUser ! Hardsized rated air flow for reporting
REAL(r64) :: RatedCapCoolTotalDes ! Autosized rated cooling capacity for reporting
REAL(r64) :: RatedCapCoolTotalUser ! Hardsized rated cooling capacity for reporting
REAL(r64) :: RatedCapCoolSensDes ! Autosized rated sensible cooling capacity for reporting
REAL(r64) :: RatedCapCoolSensUser ! Hardsized rated sensible 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 rate for reporting
REAL(r64) :: RatedWaterVolFlowRateUser ! Hardsized rated water flow rate 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
PltSizNum = 0
ErrorsFound = .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
RatedAirVolFlowRateDes = 0.0d0
RatedAirVolFlowRateUser = 0.0d0
RatedCapCoolTotalDes = 0.0d0
RatedCapCoolTotalUser = 0.0d0
RatedCapCoolSensDes = 0.0d0
RatedCapCoolSensUser = 0.0d0
RatedCapHeatDes = 0.0d0
RatedCapHeatUser = 0.0d0
RatedWaterVolFlowRateDes = 0.0d0
RatedWaterVolFlowRateUser = 0.0d0
IF (SimpleWatertoAirHP(HPNum)%RatedAirVolFlowRate == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurSysNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. SizingDesRunThisAirSys) THEN ! Simulation continue
HardSizeNoDesRun = .TRUE.
IF (SimpleWatertoAirHP(HPNum)%RatedAirVolFlowRate > 0.0d0) THEN
CALL ReportSizingOutput('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name, &
'User-Specified Rated Air Flow Rate [m3/s]', &
SimpleWatertoAirHP(HPNum)%RatedAirVolFlowRate)
END IF
ELSE
CALL CheckSysSizing('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name)
IF (FinalSysSizing(CurSysNum)%DesMainVolFlow >= SmallAirVolFlow) THEN
RatedAirVolFlowRateDes = FinalSysSizing(CurSysNum)%DesMainVolFlow
ELSE
RatedAirVolFlowRateDes = 0.0d0
END IF
END IF
ELSE IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. SizingDesRunThisZone) THEN ! Simulation continue
HardSizeNoDesRun = .TRUE.
IF (SimpleWatertoAirHP(HPNum)%RatedAirVolFlowRate > 0.0d0) THEN
CALL ReportSizingOutput('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name, &
'User-Specified Rated Air Flow Rate [m3/s]', &
SimpleWatertoAirHP(HPNum)%RatedAirVolFlowRate)
END IF
ELSE
CALL CheckZoneSizing('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name)
RatedAirVolFlowRateDes = MAX(FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow, &
FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow)
IF (RatedAirVolFlowRateDes < SmallAirVolFlow) THEN
RatedAirVolFlowRateDes = 0.0d0
END IF
END IF
END IF
IF (.NOT. HardSizeNoDesRun) THEN
IF (IsAutosize) THEN
SimpleWatertoAirHP(HPNum)%RatedAirVolFlowRate = RatedAirVolFlowRateDes
CALL ReportSizingOutput('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name, &
'Design Size Rated Air Flow Rate [m3/s]', &
RatedAirVolFlowRateDes)
ELSE
IF (SimpleWatertoAirHP(HPNum)%RatedAirVolFlowRate > 0.0d0 .AND. RatedAirVolFlowRateDes > 0.0d0 &
.AND. .NOT. HardSizeNoDesRun) THEN
RatedAirVolFlowRateUser = SimpleWatertoAirHP(HPNum)%RatedAirVolFlowRate
CALL ReportSizingOutput('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%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('SizeHVACWaterToAir: Potential issue with equipment sizing for coil ' &
//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)// &
':WATERTOAIRHEATPUMP:EQUATIONFIT "'// TRIM(SimpleWatertoAirHP(HPNum)%Name)//'"')
CALL ShowContinueError('User-Specified Rated Air Volume Flow Rate of '// &
TRIM(RoundSigDigits(RatedAirVolFlowRateUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Rated Air Volume 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
RatedCapCoolTotalAutosized = .FALSE.
RatedCapCoolSensAutosized = .FALSE.
IF (SimpleWatertoAirHP(HPNum)%WaterToAirHPType == 'COOLING') THEN
! size rated total cooling capacity
IF (SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal == AutoSize .AND. &
SimpleWatertoAirHP(HPNum)%WaterToAirHPType == 'COOLING') THEN
RatedCapCoolTotalAutosized = .TRUE.
END IF
IF (SizingDesRunThisAirSys .OR. SizingDesRunThisZone) HardSizeNoDesRun = .FALSE.
IF (CurSysNum > 0) THEN
IF (.NOT. RatedCapCoolTotalAutosized .AND. .NOT. SizingDesRunThisAirSys) THEN ! Simulation continue
HardSizeNoDesRun = .TRUE.
IF (SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal > 0.0d0) THEN
CALL ReportSizingOutput('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name, &
'User-Specified Rated Total Cooling Capacity [W]', &
SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal)
END IF
ELSE
CALL CheckSysSizing('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name)
VolFlowRate = SimpleWatertoAirHP(HPNum)%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(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
TotalCapCoeff1 = SimpleWatertoAirHP(HPNum)%TotalCoolCap1
TotalCapCoeff2 = SimpleWatertoAirHP(HPNum)%TotalCoolCap2
TotalCapCoeff3 = SimpleWatertoAirHP(HPNum)%TotalCoolCap3
TotalCapCoeff4 = SimpleWatertoAirHP(HPNum)%TotalCoolCap4
TotalCapCoeff5 = SimpleWatertoAirHP(HPNum)%TotalCoolCap5
ratioTWB = (MixWetBulb+273.15d0)/283.15d0
! rated condenser water inlet temperature of 85F
ratioTS = (((85.0d0 - 32.0d0)/1.8d0)+273.15d0)/283.15d0
TotCapTempModFac = TotalCapCoeff1 + (ratioTWB * TotalCapCoeff2) + (ratioTS * TotalCapCoeff3) + &
(1.0d0 * TotalCapCoeff4) + (1.0d0 * TotalCapCoeff5)
! 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 (SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal > 0.0d0) THEN
CALL ReportSizingOutput('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name, &
'User-Specified Rated Total Cooling Capacity [W]', &
SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal)
END IF
ELSE
CALL CheckZoneSizing('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name)
VolFlowRate = SimpleWatertoAirHP(HPNum)%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(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
TotalCapCoeff1 = SimpleWatertoAirHP(HPNum)%TotalCoolCap1
TotalCapCoeff2 = SimpleWatertoAirHP(HPNum)%TotalCoolCap2
TotalCapCoeff3 = SimpleWatertoAirHP(HPNum)%TotalCoolCap3
TotalCapCoeff4 = SimpleWatertoAirHP(HPNum)%TotalCoolCap4
TotalCapCoeff5 = SimpleWatertoAirHP(HPNum)%TotalCoolCap5
ratioTWB = (MixWetBulb+273.15d0)/283.15d0
! rated condenser water inlet temperature of 85F
ratioTS = (((85.0d0 - 32.0d0)/1.8d0)+273.15d0)/283.15d0
TotCapTempModFac = TotalCapCoeff1 + (ratioTWB * TotalCapCoeff2) + (ratioTS * TotalCapCoeff3) + &
(1.0d0 * TotalCapCoeff4) + (1.0d0 * TotalCapCoeff5)
! 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
IF (RatedCapCoolTotalDes < SmallLoad) THEN
RatedCapCoolTotalDes = 0.0d0
END IF
END IF
IF (.NOT. HardSizeNoDesRun) THEN
IF (RatedCapCoolTotalAutosized) THEN
SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal = RatedCapCoolTotalDes
CALL ReportSizingOutput('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name, &
'Design Size Rated Total Cooling Capacity [W]', &
RatedCapCoolTotalDes)
CALL PreDefTableEntry(pdchCoolCoilTotCap,SimpleWatertoAirHP(HPNum)%Name,SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal)
CALL PreDefTableEntry(pdchCoolCoilLatCap,SimpleWatertoAirHP(HPNum)%Name,SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal &
- SimpleWatertoAirHP(HPNum)%RatedCapCoolSens)
IF (SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal /= 0.0d0) THEN
CALL PreDefTableEntry(pdchCoolCoilSHR,SimpleWatertoAirHP(HPNum)%Name,SimpleWatertoAirHP(HPNum)%RatedCapCoolSens &
/ SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal)
CALL PreDefTableEntry(pdchCoolCoilNomEff,SimpleWatertoAirHP(HPNum)%Name,SimpleWatertoAirHP(HPNum)%RatedPowerCool &
/ SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal)
ELSE
CALL PreDefTableEntry(pdchCoolCoilSHR,SimpleWatertoAirHP(HPNum)%Name,0.0d0)
CALL PreDefTableEntry(pdchCoolCoilNomEff,SimpleWatertoAirHP(HPNum)%Name,0.0d0)
ENDIF
ELSE ! Hardsized with sizing data
IF (SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal > 0.0d0 .AND. RatedCapCoolTotalDes > 0.0d0 &
.AND. .NOT. HardSizeNoDesRun) THEN
RatedCapCoolTotalUser = SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal
CALL ReportSizingOutput('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%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('SizeHVACWaterToAir: Potential issue with equipment sizing for coil ' &
//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)// &
':WATERTOAIRHEATPUMP:EQUATIONFIT "'// TRIM(SimpleWatertoAirHP(HPNum)%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 (SimpleWatertoAirHP(HPNum)%WaterToAirHPType == 'COOLING') THEN
DXCoolCap = SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal
END IF
! size rated sensible cooling capacity
IF (SimpleWatertoAirHP(HPNum)%RatedCapCoolSens == AutoSize .AND. &
SimpleWatertoAirHP(HPNum)%WaterToAirHPType == 'COOLING') THEN
RatedCapCoolSensAutosized = .TRUE.
END IF
IF (SizingDesRunThisAirSys .OR. SizingDesRunThisZone) HardSizeNoDesRun = .FALSE.
IF (CurSysNum > 0) THEN
IF (.NOT. RatedCapCoolSensAutosized .AND. .NOT. SizingDesRunThisAirSys) THEN ! Simulation continue
HardSizeNoDesRun = .TRUE.
IF (SimpleWatertoAirHP(HPNum)%RatedCapCoolSens > 0.0d0) THEN
CALL ReportSizingOutput('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name, &
'User-Specified Rated Sensible Cooling Capacity [W]', &
SimpleWatertoAirHP(HPNum)%RatedCapCoolSens)
END IF
ELSE
CALL CheckSysSizing('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name)
VolFlowRate = SimpleWatertoAirHP(HPNum)%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(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
SensCapCoeff1 = SimpleWatertoAirHP(HPNum)%SensCoolCap1
SensCapCoeff2 = SimpleWatertoAirHP(HPNum)%SensCoolCap2
SensCapCoeff3 = SimpleWatertoAirHP(HPNum)%SensCoolCap3
SensCapCoeff4 = SimpleWatertoAirHP(HPNum)%SensCoolCap4
SensCapCoeff5 = SimpleWatertoAirHP(HPNum)%SensCoolCap5
SensCapCoeff6 = SimpleWatertoAirHP(HPNum)%SensCoolCap6
ratioTDB = (MixTemp+273.15d0)/283.15d0
ratioTWB = (MixWetBulb+273.15d0)/283.15d0
! rated condenser water inlet temperature of 85F
ratioTS = (((85.0d0 - 32.0d0)/1.8d0)+273.15d0)/283.15d0
CpAir = PsyCpAirFnWTdb(SupHumRat,SupTemp,RoutineName)
SensCapTempModFac = SensCapCoeff1 + (ratioTDB * SensCapCoeff2) + (ratioTWB * SensCapCoeff3) + &
(ratioTS * SensCapCoeff4) + (1.0d0 * SensCapCoeff5) + (1.0d0 * SensCapCoeff6)
! 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(MixTemp .GT. SupTemp)THEN
SensCapAtPeak = rhoair * VolFlowRate * CpAir * (MixTemp-SupTemp)
ELSE
SensCapAtPeak = rhoair * VolFlowRate * CpAir * (24.0d0-SupTemp)
END IF
SensCapAtPeak = MAX(0.0d0, SensCapAtPeak)
RatedCapCoolSensDes = SensCapAtPeak / SensCapTempModFac
ELSE
RatedCapCoolSensDes = 0.0d0
END IF
END IF
ELSE IF (CurZoneEqNum > 0) THEN
IF (.NOT. RatedCapCoolSensAutosized .AND. .NOT. SizingDesRunThisZone) THEN ! Simulation continue
HardSizeNoDesRun = .TRUE.
IF (SimpleWatertoAirHP(HPNum)%RatedCapCoolSens > 0.0d0) THEN
CALL ReportSizingOutput('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name, &
'User-Specified Rated Sensible Cooling Capacity [W]', &
SimpleWatertoAirHP(HPNum)%RatedCapCoolSens)
END IF
ELSE
CALL CheckZoneSizing('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name)
VolFlowRate = SimpleWatertoAirHP(HPNum)%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(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
SensCapCoeff1 = SimpleWatertoAirHP(HPNum)%SensCoolCap1
SensCapCoeff2 = SimpleWatertoAirHP(HPNum)%SensCoolCap2
SensCapCoeff3 = SimpleWatertoAirHP(HPNum)%SensCoolCap3
SensCapCoeff4 = SimpleWatertoAirHP(HPNum)%SensCoolCap4
SensCapCoeff5 = SimpleWatertoAirHP(HPNum)%SensCoolCap5
SensCapCoeff6 = SimpleWatertoAirHP(HPNum)%SensCoolCap6
ratioTDB = (MixTemp+273.15d0)/283.15d0
ratioTWB = (MixWetBulb+273.15d0)/283.15d0
! rated condenser water inlet temperature of 85F
ratioTS = (((85.0d0 - 32.0d0)/1.8d0)+273.15d0)/283.15d0
CpAir = PsyCpAirFnWTdb(SupHumRat,SupTemp,RoutineName)
SensCapTempModFac = SensCapCoeff1 + (ratioTDB * SensCapCoeff2) + (ratioTWB * SensCapCoeff3) + &
(ratioTS * SensCapCoeff4) + (1.0d0 * SensCapCoeff5) + (1.0d0 * SensCapCoeff6)
! 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(MixTemp .GT. SupTemp)THEN
SensCapAtPeak = rhoair * VolFlowRate * CpAir * (MixTemp-SupTemp)
ELSE
SensCapAtPeak = rhoair * VolFlowRate * CpAir * (24.0d0-SupTemp)
END IF
SensCapAtPeak = MAX(0.0d0, SensCapAtPeak)
IF(SensCapTempModFac .GT. 0.0d0)THEN
RatedCapCoolSensDes = SensCapAtPeak / SensCapTempModFac
ELSE
RatedCapCoolSensDes = SensCapAtPeak
END IF
ELSE
RatedCapCoolSensDes = 0.0d0
END IF
END IF
END IF
IF (RatedCapCoolSensDes < SmallLoad) THEN
RatedCapCoolSensDes = 0.0d0
END IF
IF (.NOT. HardSizeNoDesRun) THEN
IF (RatedCapCoolSensAutosized) THEN
SimpleWatertoAirHP(HPNum)%RatedCapCoolSens = RatedCapCoolSensDes
CALL ReportSizingOutput('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name, &
'Design Size Rated Sensible Cooling Capacity [W]', &
RatedCapCoolSensDes)
CALL PreDefTableEntry(pdchCoolCoilSensCap,SimpleWatertoAirHP(HPNum)%Name,SimpleWatertoAirHP(HPNum)%RatedCapCoolSens)
CALL PreDefTableEntry(pdchCoolCoilLatCap,SimpleWatertoAirHP(HPNum)%Name,SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal &
- SimpleWatertoAirHP(HPNum)%RatedCapCoolSens)
IF (SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal /= 0.0d0) THEN
CALL PreDefTableEntry(pdchCoolCoilSHR,SimpleWatertoAirHP(HPNum)%Name,SimpleWatertoAirHP(HPNum)%RatedCapCoolSens &
/ SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal)
ELSE
CALL PreDefTableEntry(pdchCoolCoilSHR,SimpleWatertoAirHP(HPNum)%Name,0.0d0)
ENDIF
ELSE
IF (SimpleWatertoAirHP(HPNum)%RatedCapCoolSens > 0.0d0 .AND. RatedCapCoolSensDes > 0.0d0) THEN
RatedCapCoolSensUser = SimpleWatertoAirHP(HPNum)%RatedCapCoolSens
CALL ReportSizingOutput('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%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('SizeHVACWaterToAir: Potential issue with equipment sizing for coil ' &
//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)// &
':WATERTOAIRHEATPUMP:EQUATIONFIT "'// TRIM(SimpleWatertoAirHP(HPNum)%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
END IF
! test autosized sensible and total cooling capacity for total > sensible
IF(RatedCapCoolSensAutosized .AND. RatedCapCoolTotalAutosized .OR. &
RatedCapCoolSensAutosized)THEN
IF(SimpleWatertoAirHP(HPNum)%RatedCapCoolSens .GT. SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal)THEN
CALL ShowWarningError('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT "'// &
TRIM(SimpleWatertoAirHP(HPNum)%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(SimpleWatertoAirHP(HPNum)%RatedCapCoolSens,2))//' W')
CALL ShowContinueError('Rated Total Cooling Capacity = '// &
TRIM(TrimSigDigits(SimpleWatertoAirHP(HPNum)%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('Sensible Cooling Capacity Modifier = '//TRIM(TrimSigDigits(SensCapTempModFac,5)))
CALL ShowContinueError('...Rated Sensible Cooling Capacity = Sensible Design Load / Sensible Cooling Capacity Modifier')
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(SimpleWatertoAirHP(HPNum)%RatedCapCoolSens .GT. SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal)THEN
CALL ShowWarningError('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT "'// &
TRIM(SimpleWatertoAirHP(HPNum)%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(SimpleWatertoAirHP(HPNum)%RatedCapCoolSens,2))//' W')
CALL ShowContinueError('Rated Total Cooling Capacity = '// &
TRIM(TrimSigDigits(SimpleWatertoAirHP(HPNum)%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('Sensible Cooling Capacity Modifier = '//TRIM(TrimSigDigits(SensCapTempModFac,5)))
CALL ShowContinueError('...Rated Sensible Cooling Capacity = Sensible Design Load / Sensible 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
END IF
ENDIF ! Cooling Coild
IF (SimpleWatertoAirHP(HPNum)%WaterToAirHPType == 'HEATING') THEN
! size rated heating capacity
IsAutosize = .FALSE.
IF (SimpleWatertoAirHP(HPNum)%RatedCapHeat == AutoSize .AND. &
SimpleWatertoAirHP(HPNum)%WaterToAirHPType == 'HEATING') THEN
IsAutosize = .TRUE.
END IF
! simply set heating capacity equal to the cooling capacity
IF (SimpleWatertoAirHP(HPNum)%WaterToAirHPType == 'HEATING') THEN
RatedCapHeatDes = DXCoolCap
IF (RatedCapHeatDes == autosize) THEN
CALL ShowWarningError('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT "'// &
TRIM(SimpleWatertoAirHP(HPNum)%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
IF (RatedCapHeatDes < SmallLoad) THEN
RatedCapHeatDes = 0.0d0
END IF
END IF
IF (IsAutosize) THEN
SimpleWatertoAirHP(HPNum)%RatedCapHeat = RatedCapHeatDes
CALL ReportSizingOutput('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name, &
'Design Size Rated Heating Capacity [W]', &
RatedCapHeatDes)
CALL PreDefTableEntry(pdchHeatCoilNomCap,SimpleWatertoAirHP(HPNum)%Name,SimpleWatertoAirHP(HPNum)%RatedCapHeat)
IF (SimpleWatertoAirHP(HPNum)%RatedCapHeat /= 0.0d0) THEN
CALL PreDefTableEntry(pdchHeatCoilNomEff,SimpleWatertoAirHP(HPNum)%Name,SimpleWatertoAirHP(HPNum)%RatedPowerHeat &
/ SimpleWatertoAirHP(HPNum)%RatedCapHeat)
ELSE
CALL PreDefTableEntry(pdchHeatCoilNomEff,SimpleWatertoAirHP(HPNum)%Name,0.0d0)
ENDIF
ELSE
IF (SimpleWatertoAirHP(HPNum)%RatedCapHeat > 0.0d0 .AND. RatedCapHeatDes > 0.0d0 .AND. .NOT. HardSizeNoDesRun) THEN
RatedCapHeatUser = SimpleWatertoAirHP(HPNum)%RatedCapHeat
CALL ReportSizingOutput('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name, &
'Design Size Rated Heating Capacity [W]', &
RatedCapHeatDes, &
'User-Specified Rated Heating Capacity [W]', &
RatedCapHeatUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(RatedCapHeatDes - RatedCapHeatUser)/RatedCapHeatUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeHVACWaterToAir: Potential issue with equipment sizing for coil ' &
//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)// &
':WATERTOAIRHEATPUMP:EQUATIONFIT "'// TRIM(SimpleWatertoAirHP(HPNum)%Name)//'"')
CALL ShowContinueError('User-Specified Rated Heating Capacity of '// &
TRIM(RoundSigDigits(RatedCapHeatUser,2))// ' [W]')
CALL ShowContinueError('differs from Design Size Rated 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
! Check that heat pump heating capacity is within 20% of cooling capacity. Check only for heating coil and report both.
IF (SimpleWatertoAirHP(HPNum)%WaterToAirHPType == 'HEATING' .AND. &
SimpleWatertoAirHP(HPNum)%CompanionCoolingCoilNum .GT. 0)THEN
IF(SimpleWatertoAirHP(SimpleWatertoAirHP(HPNum)%CompanionCoolingCoilNum)%RatedCapCoolTotal .GT. 0.0D0)THEN
IF(ABS(SimpleWatertoAirHP(SimpleWatertoAirHP(HPNum)%CompanionCoolingCoilNum)%RatedCapCoolTotal-&
SimpleWatertoAirHP(HPNum)%RatedCapHeat)/&
SimpleWatertoAirHP(SimpleWatertoAirHP(HPNum)%CompanionCoolingCoilNum)%RatedCapCoolTotal .GT. 0.2d0) THEN
CALL ShowWarningError('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)// &
':WATERTOAIRHEATPUMP:EQUATIONFIT "'//TRIM(SimpleWatertoAirHP(HPNum)%Name)//'"')
CALL ShowContinueError('...used with COIL:'// &
TRIM(SimpleWatertoAirHP(SimpleWatertoAirHP(HPNum)%CompanionCoolingCoilNum)%WaterToAirHPType)// &
':WATERTOAIRHEATPUMP:EQUATIONFIT "'// &
TRIM(SimpleWatertoAirHP(SimpleWatertoAirHP(HPNum)%CompanionCoolingCoilNum)%Name)//'"')
CALL ShowContinueError('...heating capacity is disproportionate (> 20% different) to total cooling capacity')
CALL ShowContinueError('...heating capacity = '//TRIM(TrimSigDigits(SimpleWatertoAirHP(HPNum)%RatedCapHeat,3))//' W')
CALL ShowContinueError('...cooling capacity = '// &
TRIM(TrimSigDigits(SimpleWatertoAirHP(SimpleWatertoAirHP(HPNum)%CompanionCoolingCoilNum)%RatedCapCoolTotal,3))//' W')
END IF
END IF
END IF
ENDIF ! Heating
! size rated power
IF (SimpleWatertoAirHP(HPNum)%WaterToAirHPType == 'COOLING') THEN
SimpleWatertoAirHP(HPNum)%RatedPowerCool = SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal/SimpleWatertoAirHP(HPNum)%RatedCOPCool
ELSE IF (SimpleWatertoAirHP(HPNum)%WaterToAirHPType == 'HEATING') THEN
SimpleWatertoAirHP(HPNum)%RatedPowerHeat = SimpleWatertoAirHP(HPNum)%RatedCapHeat/SimpleWatertoAirHP(HPNum)%RatedCOPHeat
END IF
! Size water volumetric flow rate
IsAutosize = .FALSE.
IF (SimpleWatertoAirHP(HPNum)%RatedWaterVolFlowRate == AutoSize)THEN
IsAutosize = .TRUE.
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 (IsAutosize) THEN
PltSizNum = &
MyPlantSizingIndex('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name, &
SimpleWatertoAirHP(HPNum)%WaterInletNodeNum, &
SimpleWatertoAirHP(HPNum)%WaterOutletNodeNum, ErrorsFound, .FALSE.)
!! if not found on a plant loop, check condenser loop and warn user if not found
! IF(PltSizNum == 0) THEN
!
! PltSizNum = &
! MyCondPlantSizingIndex('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
! SimpleWatertoAirHP(HPNum)%Name, &
! SimpleWatertoAirHP(HPNum)%WaterInletNodeNum, &
! SimpleWatertoAirHP(HPNum)%WaterOutletNodeNum, ErrorsFound)
! END IF
IF (PltSizNum > 0) THEN
rho = GetDensityGlycol(PlantLoop(SimpleWatertoAirHP(HPNum)%LoopNum)%FluidName, &
PlantSizData(PltSizNum)%ExitTemp, &
PlantLoop(SimpleWatertoAirHP(HPNum)%LoopNum)%FluidIndex, &
'SizeHVACWaterToAir')
Cp = GetSpecificHeatGlycol(PlantLoop(SimpleWatertoAirHP(HPNum)%LoopNum)%FluidName, &
PlantSizData(PltSizNum)%ExitTemp, &
PlantLoop(SimpleWatertoAirHP(HPNum)%LoopNum)%FluidIndex, &
'SizeHVACWaterToAir')
IF (SimpleWatertoAirHP(HPNum)%WaterToAirHPType == 'HEATING') THEN
RatedWaterVolFlowRateDes = SimpleWatertoAirHP(HPNum)%RatedCapHeat / &
( PlantSizData(PltSizNum)%DeltaT * Cp * rho )
ELSEIF(SimpleWatertoAirHP(HPNum)%WaterToAirHPType == 'COOLING') THEN
! use companion heating coil capacity to calculate volumetric flow rate
IF(SimpleWatertoAirHP(HPNum)%CompanionCoolingCoilNum .GT. 0)THEN
SystemCapacity = SimpleWatertoAirHP(SimpleWatertoAirHP(HPNum)%CompanionCoolingCoilNum)%RatedCapHeat
ELSE
SystemCapacity = SimpleWatertoAirHP(HPNum)%RatedCapCoolTotal
END IF
RatedWaterVolFlowRateDes = &
SystemCapacity / &
( PlantSizData(PltSizNum)%DeltaT * Cp * rho )
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(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT' // ' Object=' &
//TRIM(SimpleWatertoAirHP(HPNum)%Name))
ErrorsFound = .TRUE.
END IF
END IF
IF (IsAutosize) THEN
SimpleWatertoAirHP(HPNum)%RatedWaterVolFlowRate = RatedWaterVolFlowRateDes
CALL ReportSizingOutput('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%Name, &
'Design Size Rated Water Flow Rate [m3/s]', RatedWaterVolFlowRateDes)
ELSE
IF (SimpleWatertoAirHP(HPNum)%RatedWaterVolFlowRate > 0.0d0 .AND. RatedWaterVolFlowRateDes > 0.0d0) THEN
RatedWaterVolFlowRateUser = SimpleWatertoAirHP(HPNum)%RatedWaterVolFlowRate
CALL ReportSizingOutput('COIL:'//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)//':WATERTOAIRHEATPUMP:EQUATIONFIT', &
SimpleWatertoAirHP(HPNum)%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('SizeHVACWaterToAir: Potential issue with equipment sizing for coil ' &
//TRIM(SimpleWatertoAirHP(HPNum)%WaterToAirHPType)// &
':WATERTOAIRHEATPUMP:EQUATIONFIT "'// TRIM(SimpleWatertoAirHP(HPNum)%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(SimpleWatertoAirHP(HPNum)%RatedWaterVolFlowRate .GT. 0.0d0)THEN
CALL RegisterPlantCompDesignFlow(SimpleWatertoAirHP(HPNum)%WaterInletNodeNum, &
0.5d0*SimpleWatertoAirHP(HPNum)%RatedWaterVolFlowRate)
END IF
RETURN
END SUBROUTINE SizeHVACWaterToAir