SUBROUTINE SizeWaterCoil(CoilNum)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN November 2001
! MODIFIED August 2013 Daeho Kang, add component sizing table entries
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for sizing Water Coil Components for which flow rates and UAs have not been
! specified in the input.
! METHODOLOGY EMPLOYED:
! Obtains flow rates from the zone or system sizing arrays and plant sizing data. UAs are
! calculated by numerically inverting the individual coil calculation routines.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataSizing
USE General, ONLY: SolveRegulaFalsi, TrimSigDigits, RoundSigDigits
USE PlantUtilities, ONLY: RegisterPlantCompDesignFlow
USE DataEnvironment, ONLY: StdBaroPress
USE DataAirSystems, ONLY: PrimaryAirSystem
! USE BranchInputManager, ONLY: MyPlantSizingIndex
USE ReportSizingManager, ONLY: ReportSizingOutput
USE General, ONLY: RoundSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
Integer, Intent(IN) :: CoilNum
! SUBROUTINE PARAMETER DEFINITIONS:
INTEGER, PARAMETER :: MaxIte = 500 ! Maximum number of iterations
REAL(r64), PARAMETER :: Acc = 0.0001d0 ! Accuracy of result
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: PltSizNum ! do loop index for plant sizing
INTEGER :: PltSizCoolNum ! index of plant sizing object for 1st cooling loop
INTEGER :: PltSizHeatNum ! index of plant sizing object for 1st heating loop
LOGICAL :: ErrorsFound ! If errors detected in input
REAL(r64) :: CoilInTemp
REAL(r64) :: CoilOutTemp
REAL(r64) :: CoilOutHumRat
REAL(r64) :: CoilInHumRat
REAL(r64) :: DesCoilLoad
REAL(r64) :: DesMassFlow
REAL(r64) :: DesVolFlow
REAL(r64) :: MinFlowFrac
REAL(r64) :: FCOAFrac
REAL(r64) :: OutAirFrac
REAL(r64) :: CoilDesWaterDeltaT ! water delta T used to calculate the design water flow rate
REAL(r64) :: RhoAirStd ! density of air at standard conditions
REAL(r64) :: CpAirStd ! specific heat of air at std conditions
INTEGER :: SolFla ! Flag of solver
REAL(r64) :: UA0 ! lower bound for UA
REAL(r64) :: UA1 ! upper bound for UA
REAL(r64) :: UA
REAL(r64), DIMENSION(4) :: Par
LOGICAL :: LoopErrorsFound
REAL(r64) :: Cp !
REAL(r64) :: rho !
REAL(r64) :: DesWaterVolFlow = 0.0D0
REAL(r64) :: DesSatEnthAtWaterInTemp ! used in testing coil inputs
REAL(r64) :: DesHumRatAtWaterInTemp ! used in testing coil inputs
REAL(r64) :: T1Out = 0.0D0
REAL(r64) :: T2Out = 0.0D0
REAL(r64) :: TDpIn = 0.0D0
LOGICAL :: IsAutosize ! Indicator to autosize
LOGICAL :: IsAutosizeReq ! Indicator to autosizereq
LOGICAL :: HardSizeNoDesRun ! Indicator to hardsize with sizing run
REAL(r64) :: MaxWaterVolFlowRateDes ! Autosized max water flow for reporting
REAL(r64) :: MaxWaterVolFlowRateUser ! Hardsized max water flow for reporting
REAL(r64) :: DesAirVolFlowRateDes ! Autosized design air flow for reporting
REAL(r64) :: DesAirVolFlowRateUser ! Hardsized design air flow for reporting
REAL(r64) :: DesInletAirtempDes ! Autosized design inlet air temperature for reporting
REAL(r64) :: DesInletAirtempUser ! Hardsized design inlet air temperature for reporting
REAL(r64) :: DesInletWaterTempDes ! Autosized design inlet water temperature for reporting
REAL(r64) :: DesInletWaterTempUser ! Hardsized design inlet water temperature for reporting
REAL(r64) :: DesOutletAirtempDes ! Autosized design outlet air temperature for reporting
REAL(r64) :: DesOutletAirtempUser ! Hardsized design outlet air temperature for reporting
REAL(r64) :: DesInletAirHumRatDes ! Autosized design inlet air humidity ratio for reporting
REAL(r64) :: DesInletAirHumRatUser ! Hardsized design inlet air humidity ratio for reporting
REAL(r64) :: DesOutletAirHumRatDes ! Autosized design outlet air humidity ratio for reporting
REAL(r64) :: DesOutletAirHumRatUser ! Hardsized design outlet air humidity ratio for reporting
REAL(r64) :: NumofTubesperRowDes ! Autosized number of tubes per row for reporting
REAL(r64) :: NumofTubesperRowUser ! Hardsized number of tubes per row for reporting
REAL(r64) :: FinDiamDes ! Autosized fin diameter for reporting
REAL(r64) :: FinDiamUser ! Hardsized fin diameter for reporting
REAL(r64) :: MinAirFlowAreaDes ! Autosized min air flow area for reporting
REAL(r64) :: MinAirFlowAreaUser ! Hardsized min air flow area for reporting
REAL(r64) :: FinSurfAreaDes ! Autosized fin surface area for reporting
REAL(r64) :: FinSurfAreaUser ! Hardsized fin surface area for reporting
REAL(r64) :: TotTubeInsideAreaDes ! Autosized total tube inside area for reporting
REAL(r64) :: TotTubeInsideAreaUser ! Hardsized total tube inside area for reporting
REAL(r64) :: TubeOutsideSurfAreaDes ! Autosized total tube outside surface area for reporting
REAL(r64) :: TubeOutsideSurfAreaUser ! Hardsized total tube outside surface area for reporting
REAL(r64) :: CoilDepthDes ! Autosized coil depth for reporting
REAL(r64) :: CoilDepthUser ! Hardsized coil depth for reporting
REAL(r64) :: DesWaterHeatingCoilRateDes ! Autosized rated capacity for reporting
REAL(r64) :: DesWaterHeatingCoilRateUser ! Hardsized rated capacity for reporting
REAL(r64) :: UACoilDes ! Autosized UA for reporting
REAL(r64) :: UACoilUser ! Hardsized UA 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
ErrorsFound = .FALSE.
IsAutosize = .FALSE.
IsAutosizeReq = .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
PltSizCoolNum = 0
PltSizHeatNum = 0
PltSizNum = 0
CoilInTemp = 0.0d0
CoilInHumRat = 0.0d0
CoilOutTemp = 0.0d0
DesCoilLoad = 0.0d0
MinFlowFrac = 0.0d0
DesMassFlow = 0.0d0
RhoAirStd = StdRhoAir
CpAirStd = PsyCpAirFnWTdb(0.0d0,20.0d0)
CoilDesWaterDeltaT = 0.0d0
LoopErrorsFound = .FALSE.
DesVolFlow = 0.0d0
MaxWaterVolFlowRateDes = 0.0d0
MaxWaterVolFlowRateUser = 0.0d0
DesAirVolFlowRateDes = 0.0d0
DesAirVolFlowRateUser = 0.0d0
DesInletAirtempDes = 0.0d0
DesInletAirtempUser = 0.0d0
DesInletWaterTempDes = 0.0d0
DesInletWaterTempUser = 0.0d0
DesOutletAirtempDes = 0.0d0
DesOutletAirtempUser = 0.0d0
DesInletAirHumRatDes = 0.0d0
DesInletAirHumRatUser = 0.0d0
DesOutletAirHumRatDes = 0.0d0
DesOutletAirHumRatUser = 0.0d0
NumofTubesperRowDes = 0.0d0
NumofTubesperRowUser = 0.0d0
FinDiamDes = 0.0d0
FinDiamUser = 0.0d0
MinAirFlowAreaDes = 0.0d0
MinAirFlowAreaUser = 0.0d0
FinSurfAreaDes = 0.0d0
FinSurfAreaUser = 0.0d0
TotTubeInsideAreaDes = 0.0d0
TotTubeInsideAreaUser = 0.0d0
TubeOutsideSurfAreaDes = 0.0d0
TubeOutsideSurfAreaUser = 0.0d0
CoilDepthDes = 0.0d0
CoilDepthUser = 0.0d0
DesWaterHeatingCoilRateDes = 0.0d0
DesWaterHeatingCoilRateUser = 0.0d0
UACoilDes = 0.0d0
UACoilUser = 0.0d0
! cooling coils
IF (WaterCoil(CoilNum)%WaterCoilType == CoilType_Cooling .and. &
WaterCoil(CoilNum)%RequestingAutosize) THEN
! find the appropriate Plant Sizing object
PltSizCoolNum = MyPlantSizingIndex("chilled water coil", WaterCoil(CoilNum)%Name, WaterCoil(CoilNum)%WaterInletNodeNum, &
WaterCoil(CoilNum)%WaterOutletNodeNum, LoopErrorsFound)
ENDIF
Cp = GetSpecificHeatGlycol(PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidName, &
5.0d0, &
PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidIndex, &
'SizeWaterCoil')
rho = GetDensityGlycol(PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidIndex, &
'SizeWaterCoil')
IF (WaterCoil(CoilNum)%WaterCoilType == CoilType_Cooling) THEN ! 'Cooling'
IF (PltSizCoolNum > 0) THEN
! if this is a central system coil
IF (CurSysNum > 0) THEN
IF (WaterCoil(CoilNum)%RequestingAutosize) THEN
IsAutosizeReq = .TRUE.
END IF
IF (.NOT. IsAutosizeReq .AND. .NOT. SizingDesRunThisAirSys) THEN ! Simulation continue
IF (WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Cooling) THEN
IF (WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'User-Specified Design Water Flow Rate [m3/s]',WaterCoil(CoilNum)%MaxWaterVolFlowRate)
END IF
IF (WaterCoil(CoilNum)%DesAirVolFlowRate > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'User-Specified Design Air Flow Rate [m3/s]',WaterCoil(CoilNum)%DesAirVolFlowRate)
END IF
IF (WaterCoil(CoilNum)%DesInletAirtemp > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'User-Specified Design Inlet Air Temperature [C]',WaterCoil(CoilNum)%DesInletAirtemp)
END IF
IF (WaterCoil(CoilNum)%DesInletwatertemp > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'User-Specified Design Inlet Water Temperature [C]',WaterCoil(CoilNum)%DesInletwatertemp)
END IF
IF (WaterCoil(CoilNum)%DesOutletAirTemp > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'User-Specified Design Outlet Air Temperature [C]',WaterCoil(CoilNum)%DesOutletAirTemp)
END IF
IF (WaterCoil(CoilNum)%DesInletAirHumRat > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name,&
'User-Specified Design Inlet Air Humidity Ratio',WaterCoil(CoilNum)%DesInletAirHumRat)
END IF
IF (WaterCoil(CoilNum)%DesOutletAirHumRat > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'User-Specified Design Outlet Air Humidity Ratio',WaterCoil(CoilNum)%DesOutletAirHumRat)
END IF
ELSE IF(WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) THEN
IF (WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'User-Specified Maximum Water Flow Rate [m3/s]',WaterCoil(CoilNum)%MaxWaterVolFlowRate)
END IF
IF (WaterCoil(CoilNum)%TubeOutsideSurfArea > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'User-Specified Tube Outside Surface Area [m2]',WaterCoil(CoilNum)%TubeOutsideSurfArea)
END IF
IF (WaterCoil(CoilNum)%TotTubeInsideArea > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'User-Specified Total Tube Inside Area [m2]',WaterCoil(CoilNum)%TotTubeInsideArea)
END IF
IF (WaterCoil(CoilNum)%FinSurfArea > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'User-Specified Fin Surface Area [m2]',WaterCoil(CoilNum)%FinSurfArea)
END IF
IF (WaterCoil(CoilNum)%MinAirFlowArea > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'User-Specified Minimum Airflow Area [m2]',WaterCoil(CoilNum)%MinAirFlowArea)
END IF
IF (WaterCoil(CoilNum)%CoilDepth > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'User-Specified Coil Depth [m]',WaterCoil(CoilNum)%CoilDepth)
END IF
IF (WaterCoil(CoilNum)%FinDiam > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'User-Specified Fin Diameter [m]',WaterCoil(CoilNum)%FinDiam)
END IF
IF (WaterCoil(CoilNum)%NumofTubesperRow > 0.0d0) THEN
NumofTubesperRowUser = WaterCoil(CoilNum)%NumofTubesperRow ! convert integer to real for reporting
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'User-Specified Number of Tubes per Row',NumofTubesperRowUser)
END IF
END IF
ELSE ! At least one field is autosize
If(WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) Then ! 'DETAILED FLAT FIN'
CALL CheckSysSizing('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name)
ElseIf(WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Cooling) Then ! 'Cooling'
CALL CheckSysSizing('Coil:Cooling:Water',WaterCoil(CoilNum)%Name)
End If
!ENDIF
! if the water flow rate needs autosizing, calculate the volume flow rate
! If(WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) Then ! 'DETAILED FLAT FIN'
! CALL CheckSysSizing('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name)
! ElseIf(WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Cooling) Then ! 'Cooling'
! CALL CheckSysSizing('Coil:Cooling:Water',WaterCoil(CoilNum)%Name)
! End If
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%MaxWaterVolFlowRate == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurOASysNum > 0) THEN
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesOutAirVolFlow
ELSE
SELECT CASE(CurDuctType)
CASE(Main)
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesMainVolFlow
DesVolFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
CASE(Cooling)
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesCoolVolFlow
DesVolFlow = FinalSysSizing(CurSysNum)%DesCoolVolFlow
CASE(Heating)
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesHeatVolFlow
DesVolFlow = FinalSysSizing(CurSysNum)%DesHeatVolFlow
CASE(Other)
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesMainVolFlow
DesVolFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
CASE DEFAULT
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesMainVolFlow
DesVolFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
END SELECT
END IF
IF (CurOASysNum > 0) THEN ! coil is in the OA system
CoilInTemp = FinalSysSizing(CurSysNum)%CoolOutTemp
CoilOutTemp = FinalSysSizing(CurSysNum)%PrecoolTemp
CoilOutHumRat = FinalSysSizing(CurSysNum)%PrecoolHumRat
CoilInHumRat = FinalSysSizing(CurSysNum)%CoolOutHumRat
ELSE ! coil is in the main air loop
IF (PrimaryAirSystem(CurSysNum)%NumOACoolCoils == 0) THEN ! there is no precooling of the OA stream
CoilInTemp = FinalSysSizing(CurSysNum)%CoolMixTemp
CoilInHumRat = FinalSysSizing(CurSysNum)%CoolMixHumRat
ELSE ! thereis precooling of the OA stream
IF (DesVolFlow > 0.0d0) THEN
OutAirFrac = FinalSysSizing(CurSysNum)%DesOutAirVolFlow / DesVolFlow
ELSE
OutAirFrac = 1.0d0
END IF
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
CoilInTemp = OutAirFrac*FinalSysSizing(CurSysNum)%PrecoolTemp + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%CoolRetTemp
CoilInHumRat = OutAirFrac*FinalSysSizing(CurSysNum)%PrecoolHumRat + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%CoolRetHumRat
END IF
CoilOutHumRat = FinalSysSizing(CurSysNum)%CoolSupHumRat
CoilOutTemp = FinalSysSizing(CurSysNum)%CoolSupTemp
END IF
! None of these IF tests for ".and. WaterCoil(CoilNum)%WaterCoilModel==CoilModel_Cooling" are needed inside the outermost IF block
If((CoilOutHumRat.GT.CoilInHumRat).and.(WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Cooling)) Then
CALL ShowWarningError('SizeWaterCoil: Coil="'//TRIM(WaterCoil(CoilNum)%Name)// &
'", Cooling Coil has leaving humidity ratio > entering humidity ratio.')
CALL ShowContinueError(' Wair,in = ' // TRIM(RoundSigDigits(CoilInHumRat,6)))
CALL ShowContinueError(' Wair,out = ' // TRIM(RoundSigDigits(CoilOutHumRat,6)))
IF (CoilInHumRat > .016d0) THEN
CoilOutHumRat = 0.5d0*CoilInHumRat
ELSE
CoilOutHumRat = CoilInHumRat
END IF
CALL ShowContinueError('....coil chilled water flow rate will be sized using:')
CALL ShowContinueError(' Wair,out = ' // TRIM(RoundSigDigits(CoilOutHumRat,6)))
End if
DesCoilLoad = WaterCoil(CoilNum)%InletAirMassFlowRate &
* (PsyHFnTdbW(CoilInTemp, CoilInHumRat)-PsyHFnTdbW(CoilOutTemp, CoilOutHumRat))
IF (CurOASysNum > 0) THEN
CoilDesWaterDeltaT = 0.5d0 * PlantSizData(PltSizCoolNum)%DeltaT
ELSE
CoilDesWaterDeltaT = PlantSizData(PltSizCoolNum)%DeltaT
END IF
IF (DesCoilLoad >= SmallLoad) THEN
MaxWaterVolFlowRateDes = DesCoilLoad / &
( CoilDesWaterDeltaT * Cp * rho )
ELSE
MaxWaterVolFlowRateDes = 0.0d0
CALL ShowWarningError('The design coil load is zero for Coil:Cooling:Water ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('The autosize value for max water flow rate is zero')
END IF
WaterCoil(CoilNum)%DesWaterCoolingCoilRate = DesCoilLoad
IF (IsAutosize) THEN
WaterCoil(CoilNum)%MaxWaterVolFlowRate = MaxWaterVolFlowRateDes
If(WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) Then ! 'DETAILED FLAT FIN'
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Design Coil Load [W]',WaterCoil(CoilNum)%DesWaterCoolingCoilRate)
ElseIf(WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Cooling) Then ! 'Cooling'
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Coil Load [W]',WaterCoil(CoilNum)%DesWaterCoolingCoilRate)
END IF
If(WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) Then ! 'DETAILED FLAT FIN'
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Maximum Water Flow Rate [m3/s]',MaxWaterVolFlowRateDes)
ElseIf(WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Cooling) Then ! 'Cooling'
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Water Flow Rate [m3/s]',MaxWaterVolFlowRateDes)
END IF
ELSE
MaxWaterVolFlowRateUser = WaterCoil(CoilNum)%MaxWaterVolFlowRate
IF (WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0 .AND. MaxWaterVolFlowRateDes > 0.0d0) THEN
IF(WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) THEN ! 'DETAILED FLAT FIN'
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Maximum Water Flow Rate [m3/s]',MaxWaterVolFlowRateDes, &
'User-Specified Maximum Water Flow Rate [m3/s]',MaxWaterVolFlowRateUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxWaterVolFlowRateDes - MaxWaterVolFlowRateUser)/ MaxWaterVolFlowRateUser) &
> AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Maximum Water Flow Rate of '// &
TRIM(RoundSigDigits(MaxWaterVolFlowRateUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Water Flow Rate of ' // &
TRIM(RoundSigDigits(MaxWaterVolFlowRateDes,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
ELSEIF (WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Cooling) THEN ! 'Cooling'
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Water Flow Rate [m3/s]',MaxWaterVolFlowRateDes, &
'User-Specified Design Water Flow Rate [m3/s]',MaxWaterVolFlowRateUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxWaterVolFlowRateDes - MaxWaterVolFlowRateUser)/MaxWaterVolFlowRateUser) &
> AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Design Water Flow Rate of '// &
TRIM(RoundSigDigits(MaxWaterVolFlowRateUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Design Water Flow Rate of ' // &
TRIM(RoundSigDigits(MaxWaterVolFlowRateDes,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
! if the design input coil design air vol flow rate input needs autosizing, calculate it
IF (WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Cooling) THEN
IsAutosize= .FALSE.
IF (WaterCoil(CoilNum)%DesAirVolFlowRate == AutoSize) THEN ! 'Cooling'
IsAutosize = .TRUE.
END IF
! CALL CheckSysSizing('Coil:Cooling:Water',WaterCoil(CoilNum)%Name)
IF (CurOASysNum > 0) THEN
DesAirVolFlowRateDes = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
ELSE
SELECT CASE(CurDuctType)
CASE(Main)
DesAirVolFlowRateDes = FinalSysSizing(CurSysNum)%DesMainVolFlow
CASE(Cooling)
DesAirVolFlowRateDes = FinalSysSizing(CurSysNum)%DesCoolVolFlow
CASE(Heating)
DesAirVolFlowRateDes = FinalSysSizing(CurSysNum)%DesHeatVolFlow
CASE(Other)
DesAirVolFlowRateDes = FinalSysSizing(CurSysNum)%DesMainVolFlow
CASE DEFAULT
DesAirVolFlowRateDes = FinalSysSizing(CurSysNum)%DesMainVolFlow
END SELECT
END IF
IF (DesAirVolFlowRateDes <= 0.0d0) THEN
DesAirVolFlowRateDes = 0.0d0
CALL ShowWarningError('The design air flow rate is zero for Coil:Cooling:Water ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('The autosize value for max air volume flow rate is zero')
END IF
IF (IsAutosize) THEN
WaterCoil(CoilNum)%DesAirVolFlowRate = DesAirVolFlowRateDes
IF (WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Cooling) THEN ! 'Cooling'
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Air Flow Rate [m3/s]',DesAirVolFlowRateDes)
END IF
ELSE
IF (WaterCoil(CoilNum)%DesAirVolFlowRate > 0.0d0 .AND. DesAirVolFlowRateDes > 0.0d0) THEN
DesAirVolFlowRateUser = WaterCoil(CoilNum)%DesAirVolFlowRate
IF (WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Cooling) THEN ! 'Cooling'
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Air Flow Rate [m3/s]',DesAirVolFlowRateDes, &
'User-Specified Design Air Flow Rate [m3/s]',DesAirVolFlowRateUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(DesAirVolFlowRateDes - DesAirVolFlowRateUser)/DesAirVolFlowRateUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Design Air Flow Rate of '// &
TRIM(RoundSigDigits(DesAirVolFlowRateUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Design Air Flow Rate of ' // &
TRIM(RoundSigDigits(DesAirVolFlowRateDes,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
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%DesInletAirTemp == AutoSize) THEN ! 'Cooling'
IsAutosize = .TRUE.
END IF
IF (CurOASysNum > 0) THEN ! coil is in OA stream
DesInletAirtempDes = FinalSysSizing(CurSysNum)%CoolOutTemp
ELSE ! coil is in main air loop
IF (PrimaryAirSystem(CurSysNum)%NumOACoolCoils == 0) THEN ! there is no precooling of the OA stream
DesInletAirtempDes = FinalSysSizing(CurSysNum)%CoolMixTemp
ELSE ! thereis precooling of the OA stream
IF (DesVolFlow > 0.0d0) THEN
OutAirFrac = FinalSysSizing(CurSysNum)%DesOutAirVolFlow / DesVolFlow
ELSE
OutAirFrac = 1.0d0
END IF
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
DesInletAirtempDes = OutAirFrac*FinalSysSizing(CurSysNum)%PrecoolTemp + &
(1.0-OutAirFrac)*FinalSysSizing(CurSysNum)%CoolRetTemp
END IF
END IF
IF (IsAutosize) THEN
WaterCoil(CoilNum)%DesInletAirtemp = DesInletAirtempDes
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Inlet Air Temperature [C]',DesInletAirtempDes)
ELSE
IF (WaterCoil(CoilNum)%DesInletAirtemp > 0.0d0 .AND. DesInletAirtempDes > 0.0d0) THEN
DesInletAirtempUser = WaterCoil(CoilNum)%DesInletAirtemp
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Inlet Air Temperature [C]',DesInletAirtempDes, &
'User-Specified Design Inlet Air Temperature [C]',DesInletAirtempUser)
IF (DisplayExtraWarnings) THEN
IF (ABS(DesInletAirtempDes - DesInletAirtempUser) > AutoVsHardSizingDeltaTempThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Design Inlet Air Temperature of '// &
TRIM(RoundSigDigits(DesInletAirtempUser,2))// ' [C]')
CALL ShowContinueError('differs from Design Size Design Inlet Air Temperature of ' // &
TRIM(RoundSigDigits(DesInletAirtempDes,2))// ' [C]')
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
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%DesInletWaterTemp == AutoSize) THEN ! 'Cooling'
IsAutosize = .TRUE.
END IF
DesInletWaterTempDes = PlantSizData(PltSizCoolNum)%ExitTemp
IF (IsAutosize) THEN
WaterCoil(CoilNum)%DesInletwatertemp = DesInletwatertempDes
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Inlet Water Temperature [C]',DesInletwatertempDes)
ELSE
IF (WaterCoil(CoilNum)%DesInletwatertemp > 0.0d0 .AND. DesInletwatertempDes > 0.0d0) THEN
DesInletwatertempUser = WaterCoil(CoilNum)%DesInletwatertemp
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Inlet Water Temperature [C]',DesInletwatertempDes, &
'User-Specified Design Inlet Water Temperature [C]',DesInletwatertempUser)
IF (DisplayExtraWarnings) THEN
IF (ABS(DesInletwatertempDes - DesInletwatertempUser) > AutoVsHardSizingDeltaTempThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Design Inlet Water Temperature of '// &
TRIM(RoundSigDigits(DesInletwatertempUser,2))// ' [C]')
CALL ShowContinueError('differs from Design Size Design Inlet Water Temperature of ' // &
TRIM(RoundSigDigits(DesInletWatertempDes,2))// ' [C]')
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
IsAutosize= .FALSE.
IF (WaterCoil(CoilNum)%DesOutletAirTemp == AutoSize) THEN ! 'Cooling'
IsAutosize = .TRUE.
END IF
IF (CurOASysNum > 0) THEN
DesOutletAirTempDes = FinalSysSizing(CurSysNum)%PrecoolTemp
ELSE
DesOutletAirTempDes = FinalSysSizing(CurSysNum)%CoolSupTemp
END IF
If (DesOutletAirTempDes.LT.WaterCoil(CoilNum)%DesInletWaterTemp &
.AND. WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0 ) Then
CALL ShowWarningError('SizeWaterCoil: Coil="'//TRIM(WaterCoil(CoilNum)%Name)// &
'", Cooling Coil has leaving air temperature > entering water temperature.')
CALL ShowContinueError(' Tair,out = ' // TRIM(RoundSigDigits(DesOutletAirTempDes,3)))
CALL ShowContinueError(' Twater,in = ' // TRIM(RoundSigDigits(WaterCoil(CoilNum)%DesInletWaterTemp,3)))
DesOutletAirTempDes = WaterCoil(CoilNum)%DesInletWaterTemp + 0.5d0
CALL ShowContinueError('....coil leaving air temperature will be reset to:')
CALL ShowContinueError(' Tair,out = ' // TRIM(RoundSigDigits(DesOutletAirTempDes,3)))
End If
IF (IsAutosize) THEN
WaterCoil(CoilNum)%DesOutletAirTemp = DesOutletAirTempDes
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Outlet Air Temperature [C]',DesOutletAirTempDes)
ELSE
IF (WaterCoil(CoilNum)%DesOutletAirTemp > 0.0d0 .AND. DesOutletAirTempDes > 0.0d0) THEN
DesOutletAirTempUser = WaterCoil(CoilNum)%DesOutletAirTemp
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Outlet Air Temperature [C]',DesOutletAirTempDes, &
'User-Specified Design Outlet Air Temperature [C]',DesOutletAirTempUser)
IF (DisplayExtraWarnings) THEN
IF (ABS(DesOutletAirTempDes - DesOutletAirTempUser) > AutoVsHardSizingDeltaTempThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Design Outlet Air Temperature of '// &
TRIM(RoundSigDigits(DesOutletAirTempUser,2))// ' [C]')
CALL ShowContinueError('differs from Design Size Design Outlet Air Temperature of ' // &
TRIM(RoundSigDigits(DesOutletAirTempDes,2))// ' [C]')
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
IsAutosize= .FALSE.
IF (WaterCoil(CoilNum)%DesInletAirHumRat == AutoSize) THEN ! 'Cooling'
IsAutosize = .TRUE.
END IF
IF (CurOASysNum > 0) THEN ! coil is in OA stream
DesInletAirHumRatDes = FinalSysSizing(CurSysNum)%CoolOutHumRat
ELSE ! coil is in main air loop
IF (PrimaryAirSystem(CurSysNum)%NumOACoolCoils == 0) THEN ! there is no precooling of the OA stream
DesInletAirHumRatDes = FinalSysSizing(CurSysNum)%CoolMixHumRat
ELSE ! there is precooling of the OA stream
IF (DesVolFlow > 0.0d0) THEN
OutAirFrac = FinalSysSizing(CurSysNum)%DesOutAirVolFlow / DesVolFlow
ELSE
OutAirFrac = 1.0d0
END IF
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
DesInletAirHumRatDes = OutAirFrac*FinalSysSizing(CurSysNum)%PrecoolHumRat + &
(1.0-OutAirFrac)*FinalSysSizing(CurSysNum)%CoolRetHumRat
END IF
END IF
IF (IsAutosize) THEN
WaterCoil(CoilNum)%DesInletAirHumRat = DesInletAirHumRatDes
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Inlet Air Humidity Ratio',DesInletAirHumRatDes)
ELSE
IF (WaterCoil(CoilNum)%DesInletAirHumRat > 0.0d0 .AND. DesInletAirHumRatDes > 0.0d0) THEN
DesInletAirHumRatUser = WaterCoil(CoilNum)%DesInletAirHumRat
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Inlet Air Humidity Ratio',DesInletAirHumRatDes, &
'User-Specified Design Inlet Air Humidity Ratio',DesInletAirHumRatUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(DesInletAirHumRatDes - DesInletAirHumRatUser)/DesInletAirHumRatUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Design Inlet Air Humidity Ratio of '// &
TRIM(RoundSigDigits(DesInletAirHumRatUser,6)))
CALL ShowContinueError('differs from Design Size Design Inlet Air Humidity Ratio of ' // &
TRIM(RoundSigDigits(DesInletAirHumRatDes,6)))
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
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%DesOutletAirHumRat == AutoSize) THEN ! 'Cooling'
IsAutosize = .TRUE.
END IF
IF (CurOASysNum > 0) THEN
DesOutletAirHumRatDes = FinalSysSizing(CurSysNum)%PrecoolHumRat
ELSE
DesOutletAirHumRatDes = FinalSysSizing(CurSysNum)%CoolSupHumRat
END IF
If (DesOutletAirHumRatDes .GT. WaterCoil(CoilNum)%DesInletAirHumRat &
.AND. WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0 ) Then
CALL ShowWarningError('SizeWaterCoil: Coil="'//TRIM(WaterCoil(CoilNum)%Name)// &
'", Cooling Coil has leaving humidity ratio > entering humidity ratio.')
CALL ShowContinueError(' Wair,in = ' // TRIM(RoundSigDigits(WaterCoil(CoilNum)%DesInletAirHumRat,6)))
CALL ShowContinueError(' Wair,out = ' // TRIM(RoundSigDigits(DesOutletAirHumRatDes,6)))
IF (WaterCoil(CoilNum)%DesInletAirHumRat > .016d0) THEN
DesOutletAirHumRatDes = 0.5d0*WaterCoil(CoilNum)%DesInletAirHumRat
ELSE
DesOutletAirHumRatDes = WaterCoil(CoilNum)%DesInletAirHumRat
END IF
CALL ShowContinueError('....coil leaving humidity ratio will be reset to:')
CALL ShowContinueError(' Wair,out = ' // TRIM(RoundSigDigits(DesOutletAirHumRatDes,6)))
End If
! check for dry coil and reset outlet humrat if needed
DesSatEnthAtWaterInTemp =PsyHFnTdbW(WaterCoil(CoilNum)%DesInletWaterTemp, &
PsyWFnTdpPb(WaterCoil(CoilNum)%DesInletWaterTemp,StdBaroPress))
DesHumRatAtWaterInTemp = PsyWFnTdbH(WaterCoil(CoilNum)%DesInletWaterTemp,DesSatEnthAtWaterInTemp,'InitWaterCoil')
IF (DesOutletAirHumRatDes < WaterCoil(CoilNum)%DesInletAirHumRat .AND. &
DesHumRatAtWaterInTemp > WaterCoil(CoilNum)%DesInletAirHumRat .AND. &
WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0 ) THEN
IF (WaterCoil(CoilNum)%DesInletAirHumRat > DesOutletAirHumRatDes) THEN
CALL ShowWarningError('SizeWaterCoil: Coil="'//TRIM(WaterCoil(CoilNum)%Name)// &
'", Cooling Coil is dry and has air leaving humidity ratio < entering humidity ratio.')
CALL ShowContinueError(' Wair,in = ' // TRIM(RoundSigDigits(WaterCoil(CoilNum)%DesInletAirHumRat,6)))
CALL ShowContinueError(' Wair,out = ' // TRIM(RoundSigDigits(DesOutletAirHumRatDes,6)))
DesOutletAirHumRatDes = WaterCoil(CoilNum)%DesInletAirHumRat
CALL ShowContinueError('....coil leaving humidity ratio will be reset to:')
CALL ShowContinueError(' Wair,out = ' // TRIM(RoundSigDigits(DesOutletAirHumRatDes,6)))
END IF
END IF
IF (IsAutosize) THEN
WaterCoil(CoilNum)%DesOutletAirHumRat = DesOutletAirHumRatDes
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Outlet Air Humidity Ratio',DesOutletAirHumRatDes)
ELSE
IF (WaterCoil(CoilNum)%DesOutletAirHumRat > 0.0d0 .AND. DesOutletAirHumRatDes > 0.0d0) THEN
DesOutletAirHumRatUser = WaterCoil(CoilNum)%DesOutletAirHumRat
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Outlet Air Humidity Ratio',DesOutletAirHumRatDes, &
'User-Specified Design Outlet Air Humidity Ratio',DesOutletAirHumRatUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(DesOutletAirHumRatDes - DesOutletAirHumRatUser)/DesOutletAirHumRatUser) &
> AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Design Outlet Air Humidity Ratio of '// &
TRIM(RoundSigDigits(DesOutletAirHumRatUser,6)))
CALL ShowContinueError('differs from Design Size Design Outlet Air Humidity Ratio of ' // &
TRIM(RoundSigDigits(DesOutletAirHumRatDes,6)))
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 of simple coooling coil autosizable fields
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%NumofTubesperRow == AutoSize .AND. WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) THEN
IsAutosize = .TRUE.
END IF
NumofTubesperRowDes = INT(13750.d0 * WaterCoil(CoilNum)%MaxWaterVolFlowRate) + 1
NumofTubesperRowDes = MAX(3.d0, NumofTubesperRowDes)
IF (IsAutosize) THEN
WaterCoil(CoilNum)%NumofTubesperRow = NumofTubesperRowDes
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Number of Tubes per Row',NumofTubesperRowDes)
ELSE
IF (WaterCoil(CoilNum)%NumofTubesperRow > 0.0d0 .AND. NumofTubesperRowDes > 0.0d0) THEN
NumofTubesperRowUser = WaterCoil(CoilNum)%NumofTubesperRow
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Number of Tubes per Row',NumofTubesperRowDes, &
'User-Specified Number of Tubes per Row',NumofTubesperRowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(NumofTubesperRowDes - NumofTubesperRowUser)/NumofTubesperRowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Number of Tubes per Row of '// &
TRIM(RoundSigDigits(NumofTubesperRowUser,1)))
CALL ShowContinueError('differs from Design Size Number of Tubes per Row of ' // &
TRIM(RoundSigDigits(NumofTubesperRowDes,1)))
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
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%FinDiam == AutoSize .AND. WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) THEN
IsAutosize = .TRUE.
END IF
IF (CurOASysNum > 0) THEN
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesOutAirVolFlow
ELSE
SELECT CASE(CurDuctType)
CASE(Main)
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesMainVolFlow
CASE(Cooling)
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesCoolVolFlow
CASE(Heating)
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesHeatVolFlow
CASE(Other)
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesMainVolFlow
CASE DEFAULT
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesMainVolFlow
END SELECT
END IF
FinDiamDes = 0.335d0 * WaterCoil(CoilNum)%InletAirMassFlowRate
IF (IsAutosize) THEN
WaterCoil(CoilNum)%FinDiam = FinDiamDes
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Fin Diameter [m]',FinDiamDes)
ELSE
IF (WaterCoil(CoilNum)%FinDiam > 0.0d0 .AND. FinDiamDes > 0.0d0) THEN
FinDiamUser = WaterCoil(CoilNum)%FinDiam
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Fin Diameter [m]',FinDiamDes, &
'User-Specified Fin Diameter [m]',FinDiamUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(FinDiamDes - FinDiamUser)/FinDiamUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Fin Diameter of '// &
TRIM(RoundSigDigits(FinDiamUser,6))// ' [m]')
CALL ShowContinueError('differs from Design Size Fin Diameter of ' // &
TRIM(RoundSigDigits(FinDiamUser,6))// ' [m]')
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
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%MinAirFlowArea == AutoSize .AND. WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) THEN
IsAutosize = .TRUE.
END IF
IF (CurOASysNum > 0) THEN
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesOutAirVolFlow
ELSE
SELECT CASE(CurDuctType)
CASE(Main)
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesMainVolFlow
CASE(Cooling)
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesCoolVolFlow
CASE(Heating)
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesHeatVolFlow
CASE(Other)
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesMainVolFlow
CASE DEFAULT
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesMainVolFlow
END SELECT
END IF
MinAirFlowAreaDes = 0.44d0 * WaterCoil(CoilNum)%InletAirMassFlowRate
IF (IsAutosize) THEN
WaterCoil(CoilNum)%MinAirFlowArea = MinAirFlowAreaDes
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Minimum Airflow Area [m2]',MinAirFlowAreaDes)
ELSE
IF (WaterCoil(CoilNum)%MinAirFlowArea > 0.0d0 .AND. MinAirFlowAreaDes > 0.0d0) THEN
MinAirFlowAreaUser = WaterCoil(CoilNum)%MinAirFlowArea
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Minimum Airflow Area [m2]',MinAirFlowAreaDes, &
'User-Specified Minimum Airflow Area [m2]',MinAirFlowAreaUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MinAirFlowAreaDes - MinAirFlowAreaUser)/MinAirFlowAreaUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Minimum Airflow Area of '// &
TRIM(RoundSigDigits(MinAirFlowAreaUser,6))// ' [m2]')
CALL ShowContinueError('differs from Design Size Minimum Airflow Area of ' // &
TRIM(RoundSigDigits(MinAirFlowAreaDes,6))// ' [m2]')
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
IF(MinAirFlowAreaDes .LE. 0.0D0 .AND. WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed)THEN
CALL ShowSevereError('Coil:Cooling:Water:DetailedGeometry: "'//TRIM(WaterCoil(CoilNum)%Name)//'"')
CALL ShowContinueError('Coil Minimum Airflow Area must be greater than 0. Coil area = '// &
TRIM(TrimSigDigits(MinAirFlowAreaDes,6)))
ErrorsFound = .TRUE.
END IF
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%FinSurfArea == AutoSize .AND. WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) THEN
IsAutosize = .TRUE.
END IF
IF (CurOASysNum > 0) THEN
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesOutAirVolFlow
ELSE
SELECT CASE(CurDuctType)
CASE(Main)
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesMainVolFlow
CASE(Cooling)
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesCoolVolFlow
CASE(Heating)
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesHeatVolFlow
CASE(Other)
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesMainVolFlow
CASE DEFAULT
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd*FinalSysSizing(CurSysNum)%DesMainVolFlow
END SELECT
END IF
FinSurfAreaDes = 78.5d0 * WaterCoil(CoilNum)%InletAirMassFlowRate
IF (IsAutosize) THEN
WaterCoil(CoilNum)%FinSurfArea = FinSurfAreaDes
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Fin Surface Area [m2]',FinSurfAreaDes)
ELSE
IF (WaterCoil(CoilNum)%FinSurfArea > 0.0d0 .AND. FinSurfAreaDes > 0.0d0) THEN
FinSurfAreaUser = WaterCoil(CoilNum)%FinSurfArea
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Fin Surface Area [m2]',FinSurfAreaDes, &
'User-Specified Fin Surface Area [m2]',FinSurfAreaUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(FinSurfAreaDes - FinSurfAreaUser)/FinSurfAreaUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Fin Surface Area of '// &
TRIM(RoundSigDigits(FinSurfAreaUser,6))// ' [m2]')
CALL ShowContinueError('differs from Design Size Fin Surface Area of ' // &
TRIM(RoundSigDigits(FinSurfAreaDes,6))// ' [m2]')
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
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%TotTubeInsideArea == AutoSize .AND. WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) THEN
IsAutosize = .TRUE.
END IF
TotTubeInsideAreaDes = 4.4d0 * WaterCoil(CoilNum)%TubeInsideDiam * &
WaterCoil(CoilNum)%NumofTubeRows * WaterCoil(CoilNum)%NumofTubesperRow
IF (IsAutosize) THEN
WaterCoil(CoilNum)%TotTubeInsideArea = TotTubeInsideAreaDes
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Total Tube Inside Area [m2]',TotTubeInsideAreaDes)
ELSE
IF (WaterCoil(CoilNum)%TotTubeInsideArea > 0.0d0 .AND. TotTubeInsideAreaDes > 0.0d0) THEN
TotTubeInsideAreaUser = WaterCoil(CoilNum)%TotTubeInsideArea
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Total Tube Inside Area [m2]',TotTubeInsideAreaDes, &
'User-Specified Total Tube Inside Area [m2]',TotTubeInsideAreaUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(TotTubeInsideAreaDes - TotTubeInsideAreaUser)/TotTubeInsideAreaUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Total Tube Inside Area of '// &
TRIM(RoundSigDigits(TotTubeInsideAreaUser,6))// ' [m2]')
CALL ShowContinueError('differs from Design Size Total Tube Inside Area of ' // &
TRIM(RoundSigDigits(TotTubeInsideAreaDes,6))// ' [m2]')
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
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%TubeOutsideSurfArea == AutoSize .AND. WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) THEN
IsAutosize = .TRUE.
END IF
TubeOutsideSurfAreaDes = 4.1d0 * WaterCoil(CoilNum)%TubeOutsideDiam * &
WaterCoil(CoilNum)%NumofTubeRows * WaterCoil(CoilNum)%NumofTubesperRow
IF (IsAutosize) THEN
WaterCoil(CoilNum)%TubeOutsideSurfArea = TubeOutsideSurfAreaDes
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Tube Outside Surface Area [m2]',TubeOutsideSurfAreaDes)
ELSE
IF (WaterCoil(CoilNum)%TubeOutsideSurfArea > 0.0d0 .AND. TubeOutsideSurfAreaDes > 0.0d0) THEN
TubeOutsideSurfAreaUser = WaterCoil(CoilNum)%TubeOutsideSurfArea
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Tube Outside Surface Area [m2]',TubeOutsideSurfAreaDes, &
'User-Specified Tube Outside Surface Area [m2]',TubeOutsideSurfAreaUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(TubeOutsideSurfAreaDes - TubeOutsideSurfAreaUser)/TubeOutsideSurfAreaUser) &
> AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Tube Outside Surface Area of '// &
TRIM(RoundSigDigits(TubeOutsideSurfAreaUser,6))// ' [m2]')
CALL ShowContinueError('differs from Design Size Tube Outside Surface Area of ' // &
TRIM(RoundSigDigits(TubeOutsideSurfAreaDes,6))// ' [m2]')
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
IF (IsAutosize) THEN
IF ( (WaterCoil(CoilNum)%FinSurfArea + WaterCoil(CoilNum)%TubeOutsideSurfArea) .LE. 0.0d0 &
.AND. WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) THEN
CALL ShowSevereError('Coil:Cooling:Water:DetailedGeometry: "'//TRIM(WaterCoil(CoilNum)%Name)//'"')
CALL ShowContinueError('Coil Fin Surface Area plus Coil Tube Outside Surface Area must be greater than 0.'// &
' Total surface area = '// &
TRIM(TrimSigDigits((WaterCoil(CoilNum)%FinSurfArea + WaterCoil(CoilNum)%TubeOutsideSurfArea),6)))
ErrorsFound = .TRUE.
END IF
END IF
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%CoilDepth == AutoSize .AND. WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) THEN
IsAutosize = .TRUE.
END IF
CoilDepthDes = WaterCoil(CoilNum)%TubeDepthSpacing * WaterCoil(CoilNum)%NumofTubeRows
IF (IsAutosize) THEN
WaterCoil(CoilNum)%CoilDepth = CoilDepthDes
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Coil Depth [m]',CoilDepthDes)
ELSE
IF (WaterCoil(CoilNum)%CoilDepth > 0.0d0 .AND. CoilDepthDes > 0.0d0) THEN
CoilDepthUser = WaterCoil(CoilNum)%CoilDepth
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Coil Depth [m]',CoilDepthDes, &
'User-Specified Coil Depth [m]',CoilDepthUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(CoilDepthDes - CoilDepthUser)/CoilDepthUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Coil Depth of '// &
TRIM(RoundSigDigits(CoilDepthUser,6))// ' [m]')
CALL ShowContinueError('differs from Design Size Coil Depth of ' // &
TRIM(RoundSigDigits(CoilDepthDes,6))// ' [m]')
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
ELSE IF (CurZoneEqNum > 0) THEN ! end system coil IF; start zone coil ELSE - IF
IF (WaterCoil(CoilNum)%RequestingAutosize) THEN
IsAutosizeReq = .TRUE.
END IF
IF (.NOT. IsAutosizeReq .AND. .NOT. SysSizingRunDone) THEN ! Simulation continue
IF (WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Cooling) THEN
IF (WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'User-Specified Design Water Flow Rate [m3/s]',WaterCoil(CoilNum)%MaxWaterVolFlowRate)
END IF
IF (WaterCoil(CoilNum)%DesAirVolFlowRate > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'User-Specified Design Air Flow Rate [m3/s]',WaterCoil(CoilNum)%DesAirVolFlowRate)
END IF
IF (WaterCoil(CoilNum)%DesInletAirtemp > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'User-Specified Design Inlet Air Temperature [C]',WaterCoil(CoilNum)%DesInletAirtemp)
END IF
IF (WaterCoil(CoilNum)%DesInletwatertemp > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'User-Specified Design Inlet Water Temperature [C]',WaterCoil(CoilNum)%DesInletwatertemp)
END IF
IF (WaterCoil(CoilNum)%DesOutletAirTemp > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'User-Specified Design Outlet Air Temperature [C]',WaterCoil(CoilNum)%DesOutletAirTemp)
END IF
IF (WaterCoil(CoilNum)%DesInletAirHumRat > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'User-Specified Design Inlet Air Humidity Ratio',WaterCoil(CoilNum)%DesInletAirHumRat)
END IF
IF (WaterCoil(CoilNum)%DesOutletAirHumRat > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'User-Specified Design Outlet Air Humidity Ratio',WaterCoil(CoilNum)%DesOutletAirHumRat)
END IF
ELSE IF(WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) THEN
IF (WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'User-Specified Maximum Water Flow Rate [m3/s]',WaterCoil(CoilNum)%MaxWaterVolFlowRate)
END IF
IF (WaterCoil(CoilNum)%TubeOutsideSurfArea > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'User-Specified Tube Outside Surface Area [m2]',WaterCoil(CoilNum)%TubeOutsideSurfArea)
END IF
IF (WaterCoil(CoilNum)%TotTubeInsideArea > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'User-Specified Total Tube Inside Area [m2]',WaterCoil(CoilNum)%TotTubeInsideArea)
END IF
IF (WaterCoil(CoilNum)%FinSurfArea > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'User-Specified Fin Surface Area [m2]',WaterCoil(CoilNum)%FinSurfArea)
END IF
IF (WaterCoil(CoilNum)%MinAirFlowArea > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'User-Specified Minimum Airflow Area [m2]',WaterCoil(CoilNum)%MinAirFlowArea)
END IF
IF (WaterCoil(CoilNum)%CoilDepth > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'User-Specified Coil Depth [m]',WaterCoil(CoilNum)%CoilDepth)
END IF
IF (WaterCoil(CoilNum)%FinDiam > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'User-Specified Fin Diameter [m]',WaterCoil(CoilNum)%FinDiam)
END IF
IF (WaterCoil(CoilNum)%NumofTubesperRow > 0.0d0) THEN
NumofTubesperRowUser = WaterCoil(CoilNum)%NumofTubesperRow
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'User-Specified Number of Tubes per Row',NumofTubesperRowUser)
END IF
END IF
ELSE ! At least one field is autosize
If(WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) Then ! 'DETAILED FLAT FIN'
CALL CheckZoneSizing('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name)
ElseIf(WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Cooling) Then ! 'Cooling'
CALL CheckZoneSizing('Coil:Cooling:Water',WaterCoil(CoilNum)%Name)
End If
! if the water flow rate needs autosizing, calculate the volume flow rate
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%MaxWaterVolFlowRate == AutoSize) THEN
IsAutosize = .TRUE.
END IF
! If (WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Cooling) Then ! 'Cooling'
! CALL CheckZoneSizing('Coil:Cooling:Water',WaterCoil(CoilNum)%Name)
! End If
IF (TermUnitIU) THEN
MaxWaterVolFlowRateDes = TermUnitSizing(CurZoneEqNum)%MaxCWVolFlow
DesCoilLoad = TermUnitSizing(CurZoneEqNum)%DesCoolingLoad
ELSE IF (ZoneEqFanCoil) THEN
MaxWaterVolFlowRateDes = ZoneEqSizing(CurZoneEqNum)%MaxCWVolFlow
DesCoilLoad = ZoneEqSizing(CurZoneEqNum)%DesCoolingLoad
ELSE
CoilInTemp = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInTemp
CoilOutTemp = FinalZoneSizing(CurZoneEqNum)%CoolDesTemp
CoilOutHumRat = FinalZoneSizing(CurZoneEqNum)%CoolDesHumRat
CoilInHumRat = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInHumRat
DesCoilLoad = FinalZoneSizing(CurZoneEqNum)%DesCoolMassFlow &
* (PsyHFnTdbW(CoilInTemp, CoilInHumRat)-PsyHFnTdbW(CoilOutTemp, CoilOutHumRat))
IF (DesCoilLoad >= SmallLoad) THEN
MaxWaterVolFlowRateDes = DesCoilLoad / &
( PlantSizData(PltSizCoolNum)%DeltaT * &
Cp * rho )
ELSE
MaxWaterVolFlowRateDes = 0.0d0
END IF
END IF
WaterCoil(CoilNum)%DesWaterHeatingCoilRate = DesCoilLoad
IF (MaxWaterVolFlowRateDes == 0.0d0) THEN
CALL ShowWarningError('The design coil load is zero for Coil:Cooling:Water ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('The autosize value for max water flow rate is zero')
END IF
IF (IsAutosize) THEN
WaterCoil(CoilNum)%MaxWaterVolFlowRate = MaxWaterVolFlowRateDes
If(WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Cooling) Then ! 'Cooling'
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Water Flow Rate [m3/s]',MaxWaterVolFlowRateDes)
END IF
ELSE
IF (WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0 .AND. MaxWaterVolFlowRateDes > 0.0d0) THEN
MaxWaterVolFlowRateUser = WaterCoil(CoilNum)%MaxWaterVolFlowRate
IF (WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Cooling) THEN ! 'Cooling'
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Water Flow Rate [m3/s]',MaxWaterVolFlowRateDes, &
'User-Specified Design Water Flow Rate [m3/s]',MaxWaterVolFlowRateUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxWaterVolFlowRateDes - MaxWaterVolFlowRateUser)/MaxWaterVolFlowRateUser) &
> AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Design Water Flow Rate of '// &
TRIM(RoundSigDigits(MaxWaterVolFlowRateUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Design Water Flow Rate of ' // &
TRIM(RoundSigDigits(MaxWaterVolFlowRateDes,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
!@@@@@@@@@@ INSERTING BELOW :Autosizing for Coil Water Cooling
! if the design input coil design air vol flow rate input needs autosizing, calculate it
! Avoid false calculation of temperatures and humidity ratios
IF (WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Cooling) THEN
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%DesAirVolFlowRate == AutoSize) THEN
IsAutosize = .TRUE.
END IF
! CALL CheckZoneSizing('Coil:Cooling:Water',WaterCoil(CoilNum)%Name)
IF (TermUnitIU) THEN
DesAirVolFlowRateDes = TermUnitSizing(CurZoneEqNum)%AirVolFlow
ELSE IF (ZoneEqFanCoil) THEN
DesAirVolFlowRateDes = ZoneEqSizing(CurZoneEqNum)%AirVolFlow
ELSE
DesAirVolFlowRateDes = MAX(FinalZoneSizing(CurZoneEqNum)%DesCoolMassFlow, &
FinalZoneSizing(CurZoneEqNum)%DesHeatMassFlow) / RhoAirStd
END IF
IF (DesAirVolFlowRateDes <= 0.0d0) THEN
CALL ShowWarningError('The design air volume flow rate is zero for Coil:Cooling:Water ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('The autosize value for max air volume flow rate is zero')
END IF
IF (IsAutosize) THEN
WaterCoil(CoilNum)%DesAirVolFlowRate = DesAirVolFlowRateDes
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Air Flow Rate [m3/s]',DesAirVolFlowRateDes)
ELSE
IF (WaterCoil(CoilNum)%DesAirVolFlowRate > 0.0d0 .AND. DesAirVolFlowRateDes > 0.0d0) THEN
DesAirVolFlowRateUser = WaterCoil(CoilNum)%DesAirVolFlowRate
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Air Flow Rate [m3/s]',DesAirVolFlowRateDes, &
'User-Specified Design Air Flow Rate [m3/s]',DesAirVolFlowRateUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(DesAirVolFlowRateDes - DesAirVolFlowRateUser)/DesAirVolFlowRateUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Design Air Flow Rate of '// &
TRIM(RoundSigDigits(DesAirVolFlowRateUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Design Air Flow Rate of ' // &
TRIM(RoundSigDigits(DesAirVolFlowRateDes,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
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%DesInletAirTemp == AutoSize) Then ! 'Cooling'
IsAutosize = .TRUE.
END IF
! CALL CheckZoneSizing('Coil:Cooling:Water',WaterCoil(CoilNum)%Name)
IF (TermUnitIU) THEN
DesInletAirtempDes = FinalZoneSizing(CurZoneEqNum)%ZoneTempAtCoolPeak
ELSE IF (ZoneEqFanCoil) THEN
IF (FinalZoneSizing(CurZoneEqNum)%DesCoolMassFlow > 0.0d0) THEN
FCOAFrac = MIN(RhoAirStd*ZoneEqSizing(CurZoneEqNum)%OAVolFlow/FinalZoneSizing(CurZoneEqNum)%DesCoolMassFlow, 1.0d0)
ELSE
FCOAFrac = 0.0d0
END IF
DesInletAirtempDes = FCOAFrac*FinalZoneSizing(CurZoneEqNum)%OutTempAtCoolPeak + &
(1.0d0-FCOAFrac)*FinalZoneSizing(CurZoneEqNum)%ZoneTempAtCoolPeak
ELSE
DesInletAirtempDes = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInTemp
END IF
IF (IsAutosize) THEN
WaterCoil(CoilNum)%DesInletAirtemp = DesInletAirtempDes
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Inlet Air Temperature [C]',DesInletAirtempDes)
ELSE
IF (WaterCoil(CoilNum)%DesInletAirtemp > 0.0d0 .AND. DesInletAirtempDes > 0.0d0) THEN
DesInletAirtempUser = WaterCoil(CoilNum)%DesInletAirtemp
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Inlet Air Temperature [C]',DesInletAirtempDes, &
'User-Specified Design Inlet Air Temperature [C]',DesInletAirtempUser)
IF (DisplayExtraWarnings) THEN
IF (ABS(DesInletAirtempDes - DesInletAirtempUser) > AutoVsHardSizingDeltaTempThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Design Inlet Air Temperature of '// &
TRIM(RoundSigDigits(DesInletAirtempUser,2))// ' [C]')
CALL ShowContinueError('differs from Design Size Design Inlet Air Temperature of ' // &
TRIM(RoundSigDigits(DesInletAirtempDes,2))// ' [C]')
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
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%DesInletWaterTemp == AutoSize) Then ! 'Cooling'
IsAutosize = .TRUE.
END IF
! CALL CheckZoneSizing('Coil:Cooling:Water',WaterCoil(CoilNum)%Name)
DesInletWaterTempDes = PlantSizData(PltSizCoolNum)%ExitTemp
IF (IsAutosize) THEN
WaterCoil(CoilNum)%DesInletwatertemp = DesInletwatertempDes
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Inlet Water Temperature [C]',DesInletwatertempDes)
ELSE
IF (WaterCoil(CoilNum)%DesInletwatertemp > 0.0d0 .AND. DesInletwatertempDes > 0.0d0) THEN
DesInletwatertempUser = WaterCoil(CoilNum)%DesInletwatertemp
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Inlet Water Temperature [C]',DesInletwatertempDes, &
'User-Specified Design Inlet Water Temperature [C]',DesInletwatertempUser)
IF (DisplayExtraWarnings) THEN
IF (ABS(DesInletwatertempDes - DesInletwatertempUser) > AutoVsHardSizingDeltaTempThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Design Inlet Water Temperature of '// &
TRIM(RoundSigDigits(DesInletwatertempUser,2))// ' [C]')
CALL ShowContinueError('differs from Design Size Design Inlet Water Temperature of ' // &
TRIM(RoundSigDigits(DesInletWatertempDes,2))// ' [C]')
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
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%DesInletAirHumRat == AutoSize) THEN ! 'Cooling'
IsAutosize = .TRUE.
END IF
! CALL CheckZoneSizing('Coil:Cooling:Water',WaterCoil(CoilNum)%Name)
IF (TermUnitIU) THEN
DesInletAirHumRatDes = FinalZoneSizing(CurZoneEqNum)%ZoneHumRatAtCoolPeak
ELSE IF (ZoneEqFanCoil) THEN
IF (FinalZoneSizing(CurZoneEqNum)%DesCoolMassFlow > 0.0d0) THEN
FCOAFrac = MIN(RhoAirStd*ZoneEqSizing(CurZoneEqNum)%OAVolFlow/FinalZoneSizing(CurZoneEqNum)%DesCoolMassFlow, 1.0d0)
ELSE
FCOAFrac = 0.0d0
END IF
DesInletAirHumRatDes = FCOAFrac*FinalZoneSizing(CurZoneEqNum)%OutHumRatAtCoolPeak + &
(1.0d0-FCOAFrac)*FinalZoneSizing(CurZoneEqNum)%ZoneHumRatAtCoolPeak
ELSE
DesInletAirHumRatDes = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInHumRat
END IF
IF (IsAutosize) THEN
WaterCoil(CoilNum)%DesInletAirHumRat = DesInletAirHumRatDes
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Inlet Air Humidity Ratio',DesInletAirHumRatDes)
ELSE
IF (WaterCoil(CoilNum)%DesInletAirHumRat > 0.0d0 .AND. DesInletAirHumRatDes > 0.0d0) THEN
DesInletAirHumRatUser = WaterCoil(CoilNum)%DesInletAirHumRat
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Inlet Air Humidity Ratio',DesInletAirHumRatDes, &
'User-Specified Design Inlet Air Humidity Ratio',DesInletAirHumRatUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(DesInletAirHumRatDes - DesInletAirHumRatUser)/DesInletAirHumRatUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Design Inlet Air Humidity Ratio of '// &
TRIM(RoundSigDigits(DesInletAirHumRatUser,6)))
CALL ShowContinueError('differs from Design Size Design Inlet Air Humidity Ratio of ' // &
TRIM(RoundSigDigits(DesInletAirHumRatDes,6)))
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
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%DesOutletAirTemp == AutoSize) Then ! 'Cooling'
IsAutosize = .TRUE.
END IF
! CALL CheckZoneSizing('Coil:Cooling:Water',WaterCoil(CoilNum)%Name)
IF (TermUnitIU) THEN
Cp = GetSpecificHeatGlycol(PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidName, &
5.0d0, &
PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidIndex, &
'SizeWaterCoil')
rho = GetDensityGlycol(PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidIndex, &
'SizeWaterCoil')
DesCoilLoad = WaterCoil(CoilNum)%MaxWaterVolFlowRate * PlantSizData(PltSizCoolNum)%DeltaT * &
Cp * rho
T1Out = WaterCoil(CoilNum)%DesInletAirtemp - DesCoilLoad / &
(RhoAirStd * PsyCpAirFnWTdb(WaterCoil(CoilNum)%DesInletAirHumRat,WaterCoil(CoilNum)%DesInletAirTemp) * &
WaterCoil(CoilNum)%DesAirVolFlowRate)
T2Out = PlantSizData(PltSizCoolNum)%ExitTemp + 2.0d0
DesOutletAirTempDes = MAX(T1Out,T2Out)
ELSE
DesOutletAirTempDes = FinalZoneSizing(CurZoneEqNum)%CoolDesTemp
END IF
If (DesOutletAirTempDes.LT.WaterCoil(CoilNum)%DesInletWaterTemp &
.AND. WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0 ) Then
CALL ShowWarningError('SizeWaterCoil: Coil="'//TRIM(WaterCoil(CoilNum)%Name)// &
'", Cooling Coil has leaving air temperature > entering water temperature.')
CALL ShowContinueError(' Tair,out = ' // TRIM(RoundSigDigits(DesOutletAirTempDes,3)))
CALL ShowContinueError(' Twater,in = ' // TRIM(RoundSigDigits(WaterCoil(CoilNum)%DesInletWaterTemp,3)))
DesOutletAirTempDes = WaterCoil(CoilNum)%DesInletWaterTemp + 0.5d0
CALL ShowContinueError('....coil leaving air temperature will be reset to:')
CALL ShowContinueError(' Tair,out = ' // TRIM(RoundSigDigits(DesOutletAirTempDes,3)))
End If
IF (IsAutosize) THEN
WaterCoil(CoilNum)%DesOutletAirTemp = DesOutletAirTempDes
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Outlet Air Temperature [C]',DesOutletAirTempDes)
ELSE
IF (WaterCoil(CoilNum)%DesOutletAirTemp > 0.0d0 .AND. DesOutletAirTempDes > 0.0d0) THEN
DesOutletAirTempUser = WaterCoil(CoilNum)%DesOutletAirTemp
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Outlet Air Temperature [C]',DesOutletAirTempDes, &
'User-Specified Design Outlet Air Temperature [C]',DesOutletAirTempUser)
IF (DisplayExtraWarnings) THEN
IF (ABS(DesOutletAirTempDes - DesOutletAirTempUser) > AutoVsHardSizingDeltaTempThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Design Outlet Air Temperature of '// &
TRIM(RoundSigDigits(DesOutletAirTempUser,2))// ' [C]')
CALL ShowContinueError('differs from Design Size Design Outlet Air Temperature of ' // &
TRIM(RoundSigDigits(DesOutletAirTempDes,2))// ' [C]')
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
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%DesOutletAirHumRat == AutoSize) Then ! 'Cooling'
IsAutosize = .TRUE.
END IF
IF (TermUnitIU) THEN
TDpIn = PsyTdpFnWPb(WaterCoil(CoilNum)%DesInletAirHumRat,StdBaroPress)
IF (TDpIn .LE. WaterCoil(CoilNum)%DesInletWaterTemp) THEN
DesOutletAirHumRatDes = WaterCoil(CoilNum)%DesInletAirHumRat
ELSE
DesOutletAirHumRatDes = MIN(PsyWFnTdbRhPb(WaterCoil(CoilNum)%DesOutletAirTemp, &
0.9d0,StdBaroPress),WaterCoil(CoilNum)%DesInletAirHumRat)
END IF
ELSE
DesOutletAirHumRatDes = FinalZoneSizing(CurZoneEqNum)%CoolDesHumRat
END IF
If (DesOutletAirHumRatDes.GT.WaterCoil(CoilNum)%DesInletAirHumRat &
.AND. WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0 ) Then
CALL ShowWarningError('SizeWaterCoil: Coil="'//TRIM(WaterCoil(CoilNum)%Name)// &
'", Cooling Coil has leaving humidity ratio > entering humidity ratio.')
CALL ShowContinueError(' Wair,in = ' // TRIM(RoundSigDigits(WaterCoil(CoilNum)%DesInletAirHumRat,6)))
CALL ShowContinueError(' Wair,out = ' // TRIM(RoundSigDigits(DesOutletAirHumRatDes,6)))
IF (DesInletAirHumRatDes > .016d0) THEN
DesOutletAirHumRatDes = 0.5d0*WaterCoil(CoilNum)%DesInletAirHumRat
ELSE
DesOutletAirHumRatDes = WaterCoil(CoilNum)%DesInletAirHumRat
END IF
CALL ShowContinueError('....coil leaving humidity ratio will be reset to:')
CALL ShowContinueError(' Wair,out = ' // TRIM(RoundSigDigits(DesOutletAirHumRatDes,6)))
End If
! check for dry coil and reset outlet humrat if needed
DesSatEnthAtWaterInTemp =PsyHFnTdbW(WaterCoil(CoilNum)%DesInletWaterTemp, &
PsyWFnTdpPb(WaterCoil(CoilNum)%DesInletWaterTemp,StdBaroPress))
DesHumRatAtWaterInTemp = PsyWFnTdbH(WaterCoil(CoilNum)%DesInletWaterTemp,DesSatEnthAtWaterInTemp,'InitWaterCoil')
IF (DesOutletAirHumRatDes < WaterCoil(CoilNum)%DesInletAirHumRat .AND. &
DesHumRatAtWaterInTemp > WaterCoil(CoilNum)%DesInletAirHumRat .AND. &
WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0 ) THEN
CALL ShowWarningError('SizeWaterCoil: Coil="'//TRIM(WaterCoil(CoilNum)%Name)// &
'", Cooling Coil is dry and has air leaving humidity ratio < entering humidity ratio.')
CALL ShowContinueError(' Wair,in = ' // TRIM(RoundSigDigits(WaterCoil(CoilNum)%DesInletAirHumRat,6)))
CALL ShowContinueError(' Wair,out = ' // TRIM(RoundSigDigits(DesOutletAirHumRatDes,6)))
DesOutletAirHumRatDes = WaterCoil(CoilNum)%DesInletAirHumRat
CALL ShowContinueError('....coil leaving humidity ratio will be reset to:')
CALL ShowContinueError(' Wair,out = ' // TRIM(RoundSigDigits(DesOutletAirHumRatDes,6)))
END IF
IF (IsAutosize) THEN
WaterCoil(CoilNum)%DesOutletAirHumRat = DesOutletAirHumRatDes
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Outlet Air Humidity Ratio',DesOutletAirHumRatDes)
ELSE
IF (WaterCoil(CoilNum)%DesOutletAirHumRat > 0.0d0 .AND. DesOutletAirHumRatDes > 0.0d0) THEN
DesOutletAirHumRatUser = WaterCoil(CoilNum)%DesOutletAirHumRat
CALL ReportSizingOutput('Coil:Cooling:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Outlet Air Humidity Ratio',DesOutletAirHumRatDes, &
'User-Specified Design Outlet Air Humidity Ratio',DesOutletAirHumRatUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(DesOutletAirHumRatDes - DesOutletAirHumRatUser)/DesOutletAirHumRatUser) &
> AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Design Outlet Air Humidity Ratio of '// &
TRIM(RoundSigDigits(DesOutletAirHumRatUser,2)))
CALL ShowContinueError('differs from Design Size Design Outlet Air Humidity Ratio of ' // &
TRIM(RoundSigDigits(DesOutletAirHumRatDes,2)))
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 of simple cooling coil autosizable fields
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%NumofTubesperRow == AutoSize .AND. WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) THEN
IsAutosize = .TRUE.
END IF
NumofTubesperRowDes = INT(13750.d0 * WaterCoil(CoilNum)%MaxWaterVolFlowRate) + 1
NumofTubesperRowDes = MAX(3.d0, NumofTubesperRowDes)
IF (IsAutosize) THEN
WaterCoil(CoilNum)%NumofTubesperRow = NumofTubesperRowDes
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Number of Tubes per Row',NumofTubesperRowDes)
ELSE
IF (WaterCoil(CoilNum)%NumofTubesperRow > 0.0d0 .AND. NumofTubesperRowDes > 0.0d0) THEN
NumofTubesperRowUser = WaterCoil(CoilNum)%NumofTubesperRow
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Number of Tubes per Row',NumofTubesperRowDes, &
'User-Specified Number of Tubes per Row',NumofTubesperRowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(NumofTubesperRowDes - NumofTubesperRowUser)/NumofTubesperRowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Number of Tubes per Row of '// &
TRIM(RoundSigDigits(NumofTubesperRowUser,0)))
CALL ShowContinueError('differs from Design Size Number of Tubes per Row of ' // &
TRIM(RoundSigDigits(NumofTubesperRowDes,0)))
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
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%FinDiam == AutoSize .AND. WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) THEN
IsAutosize = .TRUE.
END IF
IF (TermUnitIU) THEN
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd * TermUnitSizing(CurZoneEqNum)%AirVolFlow
ELSE
WaterCoil(CoilNum)%InletAirMassFlowRate = MAX(FinalZoneSizing(CurZoneEqNum)%DesCoolMassFlow, &
FinalZoneSizing(CurZoneEqNum)%DesHeatMassFlow)
END IF
FinDiamDes = 0.335d0 * WaterCoil(CoilNum)%InletAirMassFlowRate
IF (IsAutosize) THEN
WaterCoil(CoilNum)%FinDiam = FinDiamDes
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Fin Diameter [m]',FinDiamDes)
ELSE
IF (WaterCoil(CoilNum)%FinDiam > 0.0d0 .AND. FinDiamDes > 0.0d0) THEN
FinDiamUser = WaterCoil(CoilNum)%FinDiam
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Fin Diameter [m]',FinDiamDes, &
'User-Specified Fin Diameter [m]',FinDiamUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(FinDiamDes - FinDiamUser)/FinDiamUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Fin Diameter of '// &
TRIM(RoundSigDigits(FinDiamUser,6))// ' [m]')
CALL ShowContinueError('differs from Design Size Fin Diameter of ' // &
TRIM(RoundSigDigits(FinDiamDes,6))// ' [m]')
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
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%MinAirFlowArea == AutoSize .AND. WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) THEN
IsAutosize = .TRUE.
END IF
IF (TermUnitIU) THEN
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd * TermUnitSizing(CurZoneEqNum)%AirVolFlow
ELSE
WaterCoil(CoilNum)%InletAirMassFlowRate = MAX(FinalZoneSizing(CurZoneEqNum)%DesCoolMassFlow, &
FinalZoneSizing(CurZoneEqNum)%DesHeatMassFlow)
END IF
MinAirFlowAreaDes = 0.44d0 * WaterCoil(CoilNum)%InletAirMassFlowRate
IF (IsAutosize) THEN
WaterCoil(CoilNum)%MinAirFlowArea = MinAirFlowAreaDes
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Minimum Airflow Area [m2]',MinAirFlowAreaDes)
ELSE
IF (WaterCoil(CoilNum)%MinAirFlowArea > 0.0d0 .AND. MinAirFlowAreaDes > 0.0d0) THEN
MinAirFlowAreaUser = WaterCoil(CoilNum)%MinAirFlowArea
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Minimum Airflow Area [m2]',MinAirFlowAreaDes, &
'User-Specified Minimum Airflow Area [m2]',MinAirFlowAreaUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MinAirFlowAreaDes - MinAirFlowAreaUser)/MinAirFlowAreaUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Minimum Airflow Area of '// &
TRIM(RoundSigDigits(MinAirFlowAreaUser,6))// ' [m2]')
CALL ShowContinueError('differs from Design Size Minimum Airflow Area of ' // &
TRIM(RoundSigDigits(MinAirFlowAreaDes,6))// ' [m2]')
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
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%FinSurfArea == AutoSize .AND. WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) THEN
IsAutosize = .TRUE.
END IF
IF (TermUnitIU) THEN
WaterCoil(CoilNum)%InletAirMassFlowRate = RhoAirStd * TermUnitSizing(CurZoneEqNum)%AirVolFlow
ELSE
WaterCoil(CoilNum)%InletAirMassFlowRate = MAX(FinalZoneSizing(CurZoneEqNum)%DesCoolMassFlow, &
FinalZoneSizing(CurZoneEqNum)%DesHeatMassFlow)
END IF
FinSurfAreaDes = 78.5d0 * WaterCoil(CoilNum)%InletAirMassFlowRate
IF (IsAutosize) THEN
WaterCoil(CoilNum)%FinSurfArea = FinSurfAreaDes
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Fin Surface Area [m2]',FinSurfAreaDes)
ELSE
IF (WaterCoil(CoilNum)%FinSurfArea > 0.0d0 .AND. FinSurfAreaDes > 0.0d0 ) THEN
FinSurfAreaUser = WaterCoil(CoilNum)%FinSurfArea
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Fin Surface Area [m2]',FinSurfAreaDes, &
'User-Specified Fin Surface Area [m2]',FinSurfAreaUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(FinSurfAreaDes - FinSurfAreaUser)/FinSurfAreaUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Fin Surface Area of '// &
TRIM(RoundSigDigits(FinSurfAreaUser,6))// ' [m2]')
CALL ShowContinueError('differs from Design Size Fin Surface Area of ' // &
TRIM(RoundSigDigits(FinSurfAreaDes,6))// ' [m2]')
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
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%TotTubeInsideArea == AutoSize .AND. WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) THEN
IsAutosize = .TRUE.
END IF
TotTubeInsideAreaDes = 4.4d0 * WaterCoil(CoilNum)%TubeInsideDiam * &
WaterCoil(CoilNum)%NumofTubeRows * WaterCoil(CoilNum)%NumofTubesperRow
IF (IsAutosize) THEN
WaterCoil(CoilNum)%TotTubeInsideArea = TotTubeInsideAreaDes
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Total Tube Inside Area [m2]',TotTubeInsideAreaDes)
ELSE
IF (WaterCoil(CoilNum)%TotTubeInsideArea > 0.0d0 .AND. TotTubeInsideAreaDes > 0.0d0) THEN
TotTubeInsideAreaUser = WaterCoil(CoilNum)%TotTubeInsideArea
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Total Tube Inside Area [m2]',TotTubeInsideAreaDes, &
'User-Specified Total Tube Inside Area [m2]',TotTubeInsideAreaUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(TotTubeInsideAreaDes - TotTubeInsideAreaUser)/TotTubeInsideAreaUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Total Tube Inside Area of '// &
TRIM(RoundSigDigits(TotTubeInsideAreaUser,6))// ' [m2]')
CALL ShowContinueError('differs from Design Size Total Tube Inside Area of ' // &
TRIM(RoundSigDigits(TotTubeInsideAreaDes,6))// ' [m2]')
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
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%TubeOutsideSurfArea == AutoSize .AND. WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) THEN
IsAutosize = .TRUE.
END IF
TubeOutsideSurfAreaDes = 4.1d0 * WaterCoil(CoilNum)%TubeOutsideDiam * &
WaterCoil(CoilNum)%NumofTubeRows * WaterCoil(CoilNum)%NumofTubesperRow
IF (IsAutosize) THEN
WaterCoil(CoilNum)%TubeOutsideSurfArea = TubeOutsideSurfAreaDes
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Tube Outside Surface Area [m2]',TubeOutsideSurfAreaDes)
ELSE
IF (WaterCoil(CoilNum)%TubeOutsideSurfArea > 0.0d0 .AND. TubeOutsideSurfAreaDes > 0.0d0) THEN
TubeOutsideSurfAreaUser = WaterCoil(CoilNum)%TubeOutsideSurfArea
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Tube Outside Surface Area [m2]',TubeOutsideSurfAreaDes, &
'User-Specified Tube Outside Surface Area [m2]',TubeOutsideSurfAreaUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(TubeOutsideSurfAreaDes - TubeOutsideSurfAreaUser)/TubeOutsideSurfAreaUser) &
> AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Tube Outside Surface Area of '// &
TRIM(RoundSigDigits(TubeOutsideSurfAreaUser,6))// ' [m2]')
CALL ShowContinueError('differs from Design Size Tube Outside Surface Area of ' // &
TRIM(RoundSigDigits(TubeOutsideSurfAreaDes,6))// ' [m2]')
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
IsAutosize = .FALSE.
IF (WaterCoil(CoilNum)%CoilDepth == AutoSize .AND. WaterCoil(CoilNum)%WaterCoilModel == CoilModel_Detailed) THEN
IsAutosize = .TRUE.
END IF
CoilDepthDes = WaterCoil(CoilNum)%TubeDepthSpacing * &
WaterCoil(CoilNum)%NumofTubeRows
IF (IsAutosize) THEN
WaterCoil(CoilNum)%CoilDepth = CoilDepthDes
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Coil Depth [m]',CoilDepthDes)
ELSE
IF (WaterCoil(CoilNum)%CoilDepth > 0.0d0 .AND. CoilDepthDes > 0.0d0) THEN
CoilDepthUser = WaterCoil(CoilNum)%CoilDepth
CALL ReportSizingOutput('Coil:Cooling:Water:DetailedGeometry',WaterCoil(CoilNum)%Name, &
'Design Size Coil Depth [m]',CoilDepthDes, &
'User-Specified Coil Depth [m]',CoilDepthUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(CoilDepthDes - CoilDepthUser)/CoilDepthUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Coil Depth of '// &
TRIM(RoundSigDigits(CoilDepthUser,6))// ' [m]')
CALL ShowContinueError('differs from Design Size Coil Depth of ' // &
TRIM(RoundSigDigits(CoilDepthDes,6))// ' [m]')
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 IF ! end zone coil ELSE - IF
ELSE
! If there is no cooling Plant Sizing object and autosizing was requested, issue fatal error message
IF (WaterCoil(CoilNum)%RequestingAutosize) THEN
CALL ShowSevereError('Autosizing of water coil requires a cooling loop Sizing:Plant object')
CALL ShowContinueError('Occurs in water coil object= '//TRIM(WaterCoil(CoilNum)%Name))
ErrorsFound = .TRUE.
END IF
END IF ! end of cooling Plant Sizing existence IF - ELSE
END IF ! end cooling coil IF
! if this is a heating coil
IF (WaterCoil(CoilNum)%WaterCoilType == CoilType_Heating .and. &
WaterCoil(CoilNum)%RequestingAutosize) THEN
! find the appropriate heating Plant Sizing object
PltSizHeatNum = MyPlantSizingIndex("hot water coil", WaterCoil(CoilNum)%Name, WaterCoil(CoilNum)%WaterInletNodeNum, &
WaterCoil(CoilNum)%WaterOutletNodeNum, LoopErrorsFound)
ENDIF
IF (WaterCoil(CoilNum)%WaterCoilType == CoilType_Heating) THEN ! 'Heating'
IF (PltSizHeatNum > 0) THEN
! if this is a central air system heating coil
IF (CurSysNum > 0) THEN
IF (WaterCoil(CoilNum)%RequestingAutosize) THEN
IsAutosizeReq = .TRUE.
END IF
IF (.NOT. IsAutosizeReq .AND. .NOT. SysSizingRunDone) THEN ! Simulation continue
IF (WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Heating:Water',WaterCoil(CoilNum)%Name, &
'User-Specified Maximum Water Flow Rate [m3/s]',WaterCoil(CoilNum)%MaxWaterVolFlowRate)
END IF
IF (WaterCoil(CoilNum)%UACoil > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Heating:Water',WaterCoil(CoilNum)%Name, &
'User-Specified U-Factor Times Area Value [W/K]',WaterCoil(CoilNum)%UACoil)
END IF
IF (WaterCoil(CoilNum)%DesTotWaterCoilLoad > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Heating:Water',WaterCoil(CoilNum)%Name, &
'User-Specified Design Coil Load [W]',WaterCoil(CoilNum)%DesTotWaterCoilLoad)
END IF
ELSE
CALL CheckSysSizing('Coil:Heating:Water',WaterCoil(CoilNum)%Name)
! if the coil water volume flow rate needs autosizing, then do it
IsAutosize = .FALSE.
IF ( (WaterCoil(CoilNum)%CoilPerfInpMeth == UAandFlow .AND. WaterCoil(CoilNum)%MaxWaterVolFlowRate == AutoSize) .OR. &
(WaterCoil(CoilNum)%CoilPerfInpMeth == NomCap .AND. WaterCoil(CoilNum)%DesTotWaterCoilLoad == AutoSize) ) THEN
IsAutosize = .TRUE.
END IF
! CALL CheckSysSizing('Coil:Heating:Water',WaterCoil(CoilNum)%Name)
! set the duct flow rate
IF (CurOASysNum > 0) THEN
DesVolFlow = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
ELSE
SELECT CASE(CurDuctType)
CASE(Main)
DesVolFlow = FinalSysSizing(CurSysNum)%SysAirMinFlowRat*FinalSysSizing(CurSysNum)%DesMainVolFlow
CASE(Cooling)
DesVolFlow = FinalSysSizing(CurSysNum)%SysAirMinFlowRat*FinalSysSizing(CurSysNum)%DesCoolVolFlow
CASE(Heating)
DesVolFlow = FinalSysSizing(CurSysNum)%DesHeatVolFlow
CASE(Other)
DesVolFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
CASE DEFAULT
DesVolFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
END SELECT
END IF
DesMassFlow = RhoAirStd*DesVolFlow
! reset the design air volume flow rate
WaterCoil(CoilNum)%DesAirVolFlowRate = DesVolFlow
! get the outside air fraction
IF (CurOASysNum > 0) THEN
OutAirFrac = 1.0d0
ELSE IF (FinalSysSizing(CurSysNum)%HeatOAOption == MinOA) THEN
IF (DesVolFlow > 0.0d0) THEN
OutAirFrac = FinalSysSizing(CurSysNum)%DesOutAirVolFlow / DesVolFlow
ELSE
OutAirFrac = 1.0d0
END IF
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
ELSE
OutAirFrac = 1.0d0
END IF
! coil input temperature
IF (CurOASysNum == 0 .AND. PrimaryAirSystem(CurSysNum)%NumOAHeatCoils > 0) THEN
CoilInTemp = OutAirFrac*FinalSysSizing(CurSysNum)%PreheatTemp + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%HeatRetTemp
ELSE
CoilInTemp = OutAirFrac*FinalSysSizing(CurSysNum)%HeatOutTemp + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%HeatRetTemp
END IF
! coil load
IF (CurOASysNum > 0) THEN
DesCoilLoad = CpAirStd*DesMassFlow*(FinalSysSizing(CurSysNum)%PreheatTemp - CoilInTemp)
ELSE
DesCoilLoad = CpAirStd*DesMassFlow*(FinalSysSizing(CurSysNum)%HeatSupTemp - CoilInTemp)
END IF
IF (DesCoilLoad >= SmallLoad) THEN
Cp = GetSpecificHeatGlycol(PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidName, &
60.0d0, &
PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidIndex, &
'SizeWaterCoil')
rho = GetDensityGlycol(PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidIndex, &
'SizeWaterCoil')
MaxWaterVolFlowRateDes = DesCoilLoad / &
( PlantSizData(PltSizHeatNum)%DeltaT * &
Cp * rho )
ELSE
MaxWaterVolFlowRateDes = 0.0d0
CALL ShowWarningError('The design coil load is zero for Coil:Heating:Water ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('The autosize value for maximum water flow rate is zero')
CALL ShowContinueError('To change this, input a value for UA, change the heating design day, or lower')
CALL ShowContinueError(' the system heating design supply air temperature')
END IF
WaterCoil(CoilNum)%DesWaterHeatingCoilRate = DesCoilLoad
DesWaterHeatingCoilRateDes = DesCoilLoad
IF (IsAutosize) THEN
WaterCoil(CoilNum)%MaxWaterVolFlowRate = MaxWaterVolFlowRateDes
WaterCoil(CoilNum)%DesTotWaterCoilLoad = DesWaterHeatingCoilRateDes
CALL ReportSizingOutput('Coil:Heating:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Coil Load [W]',DesWaterHeatingCoilRateDes)
CALL ReportSizingOutput('Coil:Heating:Water',WaterCoil(CoilNum)%Name, &
'Design Size Maximum Water Flow Rate [m3/s]',MaxWaterVolFlowRateDes)
ELSE
MaxWaterVolFlowRateUser = WaterCoil(CoilNum)%MaxWaterVolFlowRate
DesWaterHeatingCoilRateUser = WaterCoil(CoilNum)%DesTotWaterCoilLoad
IF (WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0 .AND. MaxWaterVolFlowRateDes > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Heating:Water',WaterCoil(CoilNum)%Name, &
'Design Size Maximum Water Flow Rate [m3/s]',MaxWaterVolFlowRateDes, &
'User-Specified Maximum Water Flow Rate [m3/s]',MaxWaterVolFlowRateUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxWaterVolFlowRateDes - MaxWaterVolFlowRateUser)/MaxWaterVolFlowRateUser) >AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Maximum Water Flow Rate of '// &
TRIM(RoundSigDigits(MaxWaterVolFlowRateUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Water Flow Rate of ' // &
TRIM(RoundSigDigits(MaxWaterVolFlowRateDes,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
IF ( WaterCoil(CoilNum)%DesTotWaterCoilLoad > 0.0d0 .AND. DesWaterHeatingCoilRateDes > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Heating:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Coil Load [W]',DesWaterHeatingCoilRateDes, &
'User-Specified Design Coil Load [W]',DesWaterHeatingCoilRateUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(DesWaterHeatingCoilRateDes - DesWaterHeatingCoilRateUser)/DesWaterHeatingCoilRateUser) &
> AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Design Coil Load of '// &
TRIM(RoundSigDigits(DesWaterHeatingCoilRateUser,2))// ' [W]')
CALL ShowContinueError('differs from Design Size Design Coil Load of ' // &
TRIM(RoundSigDigits(DesWaterHeatingCoilRateDes,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
! if the coil UA needs autosizing, then do it
IsAutosize = .FALSE.
IF ( (WaterCoil(CoilNum)%CoilPerfInpMeth == UAandFlow .AND. WaterCoil(CoilNum)%UACoil == AutoSize) .OR. &
(WaterCoil(CoilNum)%CoilPerfInpMeth == NomCap .AND. WaterCoil(CoilNum)%DesTotWaterCoilLoad == AutoSize) ) THEN
IsAutosize = .TRUE.
END IF
IF (.NOT. IsAutosize) THEN
! to avoid a false indication after calling SolveRegulaFalsi
UACoilUser = WaterCoil(CoilNum)%UACoil
END IF
! CALL CheckSysSizing('Coil:Heating:Water',WaterCoil(CoilNum)%Name)
! set the duct flow rate
IF (CurOASysNum > 0) THEN
DesVolFlow = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
ELSE
SELECT CASE(CurDuctType)
CASE(Main)
DesVolFlow = FinalSysSizing(CurSysNum)%SysAirMinFlowRat*FinalSysSizing(CurSysNum)%DesMainVolFlow
CASE(Cooling)
DesVolFlow = FinalSysSizing(CurSysNum)%SysAirMinFlowRat*FinalSysSizing(CurSysNum)%DesCoolVolFlow
CASE(Heating)
DesVolFlow = FinalSysSizing(CurSysNum)%DesHeatVolFlow
CASE(Other)
DesVolFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
CASE DEFAULT
DesVolFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
END SELECT
END IF
DesMassFlow = RhoAirStd*DesVolFlow
! reset the coil design air volume flow rate
WaterCoil(CoilNum)%DesAirVolFlowRate = DesVolFlow
! get the outside air fraction
IF (CurOASysNum > 0) THEN
OutAirFrac = 1.0d0
ELSE IF (FinalSysSizing(CurSysNum)%HeatOAOption == MinOA) THEN
IF (DesVolFlow > 0.0d0) THEN
OutAirFrac = FinalSysSizing(CurSysNum)%DesOutAirVolFlow / DesVolFlow
ELSE
OutAirFrac = 1.0d0
END IF
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
ELSE
OutAirFrac = 1.0d0
END IF
! coil inlet temperature
IF (CurOASysNum == 0 .AND. PrimaryAirSystem(CurSysNum)%NumOAHeatCoils > 0) THEN
CoilInTemp = OutAirFrac*FinalSysSizing(CurSysNum)%PreheatTemp + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%HeatRetTemp
CoilInHumRat = OutAirFrac*FinalSysSizing(CurSysNum)%PreheatHumRat + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%HeatRetHumRat
ELSE
CoilInTemp = OutAirFrac*FinalSysSizing(CurSysNum)%HeatOutTemp + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%HeatRetTemp
CoilInHumRat = OutAirFrac*FinalSysSizing(CurSysNum)%HeatOutHumRat + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%HeatRetHumRat
END IF
! coil load
IF (CurOASysNum > 0) THEN
DesCoilLoad = CpAirStd*DesMassFlow*(FinalSysSizing(CurSysNum)%PreheatTemp - CoilInTemp)
ELSE
DesCoilLoad = CpAirStd*DesMassFlow*(FinalSysSizing(CurSysNum)%HeatSupTemp - CoilInTemp)
END IF
IF (DesCoilLoad >= SmallLoad) THEN
Par(1) = DesCoilLoad
Par(2) = REAL(CoilNum,r64)
Par(3) = REAL(ContFanCycCoil,r64) !fan operating mode
Par(4) = 1.0d0 ! part-load ratio
WaterCoil(CoilNum)%InletAirTemp = CoilInTemp
WaterCoil(CoilNum)%InletAirHumRat = CoilInHumRat
WaterCoil(CoilNum)%InletWaterTemp = PlantSizData(PltSizHeatNum)%ExitTemp
rho = GetDensityGlycol(PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidIndex, &
'SizeWaterCoil')
WaterCoil(CoilNum)%InletWaterMassFlowRate = rho * WaterCoil(CoilNum)%MaxWaterVolFlowRate
WaterCoil(CoilNum)%InletAirMassFlowRate = DesMassFlow
! set the lower and upper limits on the UA
UA0 = .001d0 * DesCoilLoad
UA1 = DesCoilLoad
! Invert the simple heating coil model: given the design inlet conditions and the design load,
! find the design UA.
CALL SolveRegulaFalsi(Acc, MaxIte, SolFla, UA, SimpleHeatingCoilUAResidual, UA0, UA1, Par)
! if the numerical inversion failed, issue error messages.
IF (SolFla == -1) THEN
CALL ShowSevereError('Autosizing of heating coil UA failed for Coil:Heating:Water "'// &
TRIM(WaterCoil(CoilNum)%Name)//'"')
CALL ShowContinueError(' Iteration limit exceeded in calculating coil UA')
CALL ShowContinueError(' Lower UA estimate = '//TRIM(TrimSigDigits(UA0,6))//' W/m2-K (1% of Design Coil Load)')
CALL ShowContinueError(' Upper UA estimate = '//TRIM(TrimSigDigits(UA1,6))//' W/m2-K (100% of Design Coil Load)')
CALL ShowContinueError(' Final UA estimate when iterations exceeded limit = '//TRIM(TrimSigDigits(UA,6))//' W/m2-K')
CALL ShowContinueError(' AirloopHVAC "'//TRIM(FinalSysSizing(CurSysNum)%AirPriLoopName)// &
'" coil sizing conditions (may be different than Sizing inputs):')
CALL ShowContinueError(' Coil inlet air temperature = '//TRIM(TrimSigDigits(CoilInTemp,3))//' C')
CALL ShowContinueError(' Coil inlet air humidity ratio = '//TRIM(TrimSigDigits(CoilInHumRat,3))// &
' kgWater/kgDryAir')
CALL ShowContinueError(' Coil inlet air mass flow rate = '//TRIM(TrimSigDigits(DesMassFlow,6))//' kg/s')
CALL ShowContinueError(' Design Coil Capacity = '// &
TRIM(TrimSigDigits(WaterCoil(CoilNum)%TotWaterHeatingCoilRate,3))//' W')
CALL ShowContinueError(' Design Coil Load = '//TRIM(TrimSigDigits(DesCoilLoad,3))//' W')
ErrorsFound = .TRUE.
ELSE IF (SolFla == -2) THEN
CALL ShowSevereError('Autosizing of heating coil UA failed for Coil:Heating:Water "'// &
TRIM(WaterCoil(CoilNum)%Name)//'"')
CALL ShowContinueError(' Bad starting values for UA')
CALL ShowContinueError(' Lower UA estimate = '//TRIM(TrimSigDigits(UA0,6))//' W/m2-K (1% of Design Coil Load)')
CALL ShowContinueError(' Upper UA estimate = '//TRIM(TrimSigDigits(UA1,6))//' W/m2-K (100% of Design Coil Load)')
CALL ShowContinueError(' AirloopHVAC "'//TRIM(FinalSysSizing(CurSysNum)%AirPriLoopName)// &
'" coil sizing conditions (may be different than Sizing inputs):')
CALL ShowContinueError(' Coil inlet air temperature = '//TRIM(TrimSigDigits(CoilInTemp,3))//' C')
CALL ShowContinueError(' Coil inlet air humidity ratio = '//TRIM(TrimSigDigits(CoilInHumRat,3))// &
' kgWater/kgDryAir')
CALL ShowContinueError(' Coil inlet air mass flow rate = '//TRIM(TrimSigDigits(DesMassFlow,6))//' kg/s')
CALL ShowContinueError(' Design Coil Capacity = '// &
TRIM(TrimSigDigits(WaterCoil(CoilNum)%TotWaterHeatingCoilRate,3))//' W')
CALL ShowContinueError(' Design Coil Load = '//TRIM(TrimSigDigits(DesCoilLoad,3))//' W')
IF (WaterCoil(CoilNum)%TotWaterHeatingCoilRate < DesCoilLoad) THEN
CALL ShowContinueError(' Inadequate water side capacity: in Plant Sizing for this hot water loop')
CALL ShowContinueError(' increase design loop exit temperature and/or decrease design loop delta T')
CALL ShowContinueError(' Plant Sizing object = '//TRIM(PlantSizData(PltSizHeatNum)%PlantLoopName))
CALL ShowContinueError(' Plant design loop exit temperature = '// &
TRIM(TrimSigDigits(PlantSizData(PltSizHeatNum)%ExitTemp,3))//' C')
CALL ShowContinueError(' Plant design loop delta T = '// &
TRIM(TrimSigDigits(PlantSizData(PltSizHeatNum)%DeltaT,3))//' C')
END IF
ErrorsFound = .TRUE.
END IF
UACoilDes = UA
ELSE
UACoilDes = 1.0d0
IF (WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0) THEN
ErrorsFound = .TRUE.
CALL ShowSevereError('The design coil load is zero for Coil:Heating:Water ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('An autosize value for UA cannot be calculated')
CALL ShowContinueError('Input a value for UA, change the heating design day, or raise')
CALL ShowContinueError(' the system heating design supply air temperature')
END IF
END IF
WaterCoil(CoilNum)%DesWaterHeatingCoilRate = DesCoilLoad
IF (IsAutosize) THEN
WaterCoil(CoilNum)%UACoil = UACoilDes
WaterCoil(CoilNum)%DesTotWaterCoilLoad = DesCoilLoad
CALL ReportSizingOutput('Coil:Heating:Water',WaterCoil(CoilNum)%Name, &
'Design Size U-Factor Times Area Value [W/K]',UACoilDes)
ELSE
IF (UACoilUser > 0.0d0 .AND. UACoilDes > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Heating:Water',WaterCoil(CoilNum)%Name, &
'Design Size U-Factor Times Area Value [W/K]',UACoilDes, &
'User-Specified U-Factor Times Area Value [W/K]',UACoilUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(UACoilDes - UACoilUser)/UACoilUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified U-Factor Times Area Value of '// &
TRIM(RoundSigDigits(UACoilUser,5))// ' [W/K]')
CALL ShowContinueError('differs from Design Size U-Factor Times Area Value of ' // &
TRIM(RoundSigDigits(UACoilDes,5))// ' [W/K]')
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
! if this is a zone coil
ELSE IF (CurZoneEqNum > 0) THEN
IsAutosizeReq = .FALSE.
IF (WaterCoil(CoilNum)%RequestingAutosize) THEN
IsAutosizeReq = .TRUE.
END IF
IF (.NOT. IsAutosizeReq .AND. .NOT. ZoneSizingRunDone) THEN
IF (WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Heating:Water',WaterCoil(CoilNum)%Name, &
'User-Specified Maximum Water Flow Rate [m3/s]',WaterCoil(CoilNum)%MaxWaterVolFlowRate)
END IF
IF (WaterCoil(CoilNum)%UACoil > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Heating:Water',WaterCoil(CoilNum)%Name, &
'User-Specified U-Factor Times Area Value [W/K]',WaterCoil(CoilNum)%UACoil)
END IF
IF (WaterCoil(CoilNum)%DesTotWaterCoilLoad > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Heating:Water',WaterCoil(CoilNum)%Name, &
'User-Specified Design Coil Load [W]',WaterCoil(CoilNum)%DesTotWaterCoilLoad)
END IF
ELSE
CALL CheckZoneSizing('Coil:Heating:Water',WaterCoil(CoilNum)%Name)
! autosize the coil water volume flow rate if needed
IsAutosize = .FALSE.
IF ( (WaterCoil(CoilNum)%CoilPerfInpMeth == UAandFlow .AND. WaterCoil(CoilNum)%MaxWaterVolFlowRate == AutoSize) .OR. &
(WaterCoil(CoilNum)%CoilPerfInpMeth == NomCap .AND. WaterCoil(CoilNum)%DesTotWaterCoilLoad == AutoSize) ) THEN
IsAutosize = .TRUE.
END IF
! CALL CheckZoneSizing('Coil:Heating:Water',WaterCoil(CoilNum)%Name)
! if coil is part of a terminal unit just use the terminal unit value
IF (TermUnitSingDuct .OR. TermUnitPIU .OR. TermUnitIU) THEN
MaxWaterVolFlowRateDes = TermUnitSizing(CurZoneEqNum)%MaxHWVolFlow
Cp = GetSpecificHeatGlycol(PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidName, &
60.0d0, &
PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidIndex, &
'SizeWaterCoil')
rho = GetDensityGlycol(PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidIndex, &
'SizeWaterCoil')
DesCoilLoad = MaxWaterVolFlowRateDes * PlantSizData(PltSizHeatNum)%DeltaT * &
Cp * rho
ELSE IF (ZoneEqFanCoil) THEN
MaxWaterVolFlowRateDes = ZoneEqSizing(CurZoneEqNum)%MaxHWVolFlow
Cp = GetSpecificHeatGlycol(PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidName, &
60.0d0, &
PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidIndex, &
'SizeWaterCoil')
rho = GetDensityGlycol(PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidIndex, &
'SizeWaterCoil')
DesCoilLoad = MaxWaterVolFlowRateDes * PlantSizData(PltSizHeatNum)%DeltaT * &
Cp * rho
! if coil is part of a zonal unit, calc coil load to get hot water flow rate
ELSE
CoilInTemp = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInTemp
CoilOutTemp = FinalZoneSizing(CurZoneEqNum)%HeatDesTemp
CoilOutHumRat = FinalZoneSizing(CurZoneEqNum)%HeatDesHumRat
DesMassFlow = FinalZoneSizing(CurZoneEqNum)%DesHeatMassFlow
DesCoilLoad = PsyCpAirFnWTdb(CoilOutHumRat, 0.5d0*(CoilInTemp+CoilOutTemp)) &
* DesMassFlow * (CoilOutTemp-CoilInTemp)
IF (DesCoilLoad >= SmallLoad) THEN
Cp = GetSpecificHeatGlycol(PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidName, &
60.0d0, &
PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidIndex, &
'SizeWaterCoil')
rho = GetDensityGlycol(PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidIndex, &
'SizeWaterCoil')
MaxWaterVolFlowRateDes = DesCoilLoad / &
( PlantSizData(PltSizHeatNum)%DeltaT * &
Cp* rho )
ELSE
MaxWaterVolFlowRateDes = 0.0d0
END IF
WaterCoil(CoilNum)%DesWaterHeatingCoilRate = DesCoilLoad
DesWaterHeatingCoilRateDes = DesCoilLoad
END IF
! issue warning if hw coil has zero flow
IF (MaxWaterVolFlowRateDes == 0.0d0) THEN
CALL ShowWarningError('The design coil load is zero for Coil:Heating:Water ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('The autosize value for maximum water flow rate is zero')
CALL ShowContinueError('To change this, input a value for UA, change the heating design day, or lower')
CALL ShowContinueError(' the system heating design supply air temperature')
END IF
IF (IsAutosize) THEN
WaterCoil(CoilNum)%MaxWaterVolFlowRate = MaxWaterVolFlowRateDes
!WaterCoil(CoilNum)%DesTotWaterCoilLoad = DesWaterHeatingCoilRateDes
CALL ReportSizingOutput('Coil:Heating:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Coil Load [W]',DesCoilLoad) !DesWaterHeatingCoilRateDes)
CALL ReportSizingOutput('Coil:Heating:Water',WaterCoil(CoilNum)%Name, &
'Design Size Maximum Water Flow Rate [m3/s]',MaxWaterVolFlowRateDes)
ELSE
MaxWaterVolFlowRateUser = WaterCoil(CoilNum)%MaxWaterVolFlowRate
DesWaterHeatingCoilRateUser = WaterCoil(CoilNum)%DesTotWaterCoilLoad
IF (WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0 .AND. MaxWaterVolFlowRateDes > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Heating:Water',WaterCoil(CoilNum)%Name, &
'Design Size Maximum Water Flow Rate [m3/s]',MaxWaterVolFlowRateDes, &
'User-Specified Maximum Water Flow Rate [m3/s]',MaxWaterVolFlowRateUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxWaterVolFlowRateDes - MaxWaterVolFlowRateUser)/MaxWaterVolFlowRateUser) &
> AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Maximum Water Flow Rate of '// &
TRIM(RoundSigDigits(MaxWaterVolFlowRateUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Water Flow Rate of ' // &
TRIM(RoundSigDigits(MaxWaterVolFlowRateDes,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
IF ( WaterCoil(CoilNum)%DesTotWaterCoilLoad > 0.0d0 .AND. DesWaterHeatingCoilRateDes > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Heating:Water',WaterCoil(CoilNum)%Name, &
'Design Size Design Coil Load [W]',DesWaterHeatingCoilRateDes, &
'User-Specified Design Coil Load [W]',DesWaterHeatingCoilRateUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(DesWaterHeatingCoilRateDes - DesWaterHeatingCoilRateUser)/DesWaterHeatingCoilRateUser) &
> AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified Design Coil Load of '// &
TRIM(RoundSigDigits(DesWaterHeatingCoilRateUser,2))// ' [W]')
CALL ShowContinueError('differs from Design Size Design Coil Load of ' // &
TRIM(RoundSigDigits(DesWaterHeatingCoilRateDes,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
! autosize the coil UA if needed
IsAutosize = .FALSE.
IF ( (WaterCoil(CoilNum)%CoilPerfInpMeth == UAandFlow .AND. WaterCoil(CoilNum)%UACoil == AutoSize) .OR. &
(WaterCoil(CoilNum)%CoilPerfInpMeth == NomCap .AND. WaterCoil(CoilNum)%DesTotWaterCoilLoad == AutoSize) ) THEN
IsAutosize = .TRUE.
END IF
IF (.NOT. IsAutosize) THEN
UACoilUser = WaterCoil(CoilNum)%UACoil
END IF
! CALL CheckZoneSizing('Coil:Heating:Water',WaterCoil(CoilNum)%Name)
IF (TermUnitPIU) THEN
MinFlowFrac = TermUnitSizing(CurZoneEqNum)%MinFlowFrac
CoilInTemp = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInTempTU * MinFlowFrac + &
FinalZoneSizing(CurZoneEqNum)%ZoneTempAtHeatPeak * (1.d0 - MinFlowFrac)
CoilInHumRat = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInHumRatTU * MinFlowFrac + &
FinalZoneSizing(CurZoneEqNum)%ZoneHumRatAtHeatPeak * (1.d0 - MinFlowFrac)
ELSE IF (TermUnitIU) THEN
CoilInTemp = FinalZoneSizing(CurZoneEqNum)%ZoneTempAtHeatPeak
CoilInHumRat = FinalZoneSizing(CurZoneEqNum)%ZoneHumRatAtHeatPeak
ELSE IF (TermUnitSingDuct) THEN
CoilInTemp = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInTempTU
CoilInHumRat = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInHumRatTU
ELSE IF (ZoneEqFanCoil) THEN
IF (FinalZoneSizing(CurZoneEqNum)%DesHeatMassFlow > 0.0d0) THEN
FCOAFrac = MIN(RhoAirStd*ZoneEqSizing(CurZoneEqNum)%OAVolFlow / FinalZoneSizing(CurZoneEqNum)%DesHeatMassFlow, 1.0d0)
ELSE
FCOAFrac = 0.0d0
END IF
CoilInTemp = FCOAFrac*FinalZoneSizing(CurZoneEqNum)%OutTempAtHeatPeak + &
(1.0d0-FCOAFrac)*FinalZoneSizing(CurZoneEqNum)%ZoneTempAtHeatPeak
CoilInHumRat = FCOAFrac*FinalZoneSizing(CurZoneEqNum)%OutHumRatAtHeatPeak + &
(1.0d0-FCOAFrac)*FinalZoneSizing(CurZoneEqNum)%ZoneHumRatAtHeatPeak
ELSE
CoilInTemp = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInTemp
CoilInHumRat = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInHumRat
END IF
IF (TermUnitSingDuct .OR. TermUnitPIU .OR. TermUnitIU) THEN
DesMassFlow = RhoAirStd * TermUnitSizing(CurZoneEqNum)%AirVolFlow * TermUnitSizing(CurZoneEqNum)%ReheatAirFlowMult
Cp = GetSpecificHeatGlycol(PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidName, &
60.0d0, &
PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidIndex, &
'SizeWaterCoil')
rho = GetDensityGlycol(PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidIndex, &
'SizeWaterCoil')
DesCoilLoad = WaterCoil(CoilNum)%MaxWaterVolFlowRate * PlantSizData(PltSizHeatNum)%DeltaT * &
Cp * rho * TermUnitSizing(CurZoneEqNum)%ReheatLoadMult
DesWaterVolFlow = WaterCoil(CoilNum)%MaxWaterVolFlowRate * TermUnitSizing(CurZoneEqNum)%ReheatLoadMult
ELSE IF (ZoneEqFanCoil) THEN
DesMassFlow = RhoAirStd * FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow
Cp = GetSpecificHeatGlycol(PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidName, &
60.0d0, &
PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidIndex, &
'SizeWaterCoil')
rho = GetDensityGlycol(PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidIndex, &
'SizeWaterCoil')
DesCoilLoad = WaterCoil(CoilNum)%MaxWaterVolFlowRate * PlantSizData(PltSizHeatNum)%DeltaT * &
Cp * rho
DesWaterVolFlow = WaterCoil(CoilNum)%MaxWaterVolFlowRate
ELSE
DesMassFlow = FinalZoneSizing(CurZoneEqNum)%DesHeatMassFlow
CoilOutTemp = FinalZoneSizing(CurZoneEqNum)%HeatDesTemp
CoilOutHumRat = FinalZoneSizing(CurZoneEqNum)%HeatDesHumRat
DesCoilLoad = PsyCpAirFnWTdb(CoilOutHumRat, 0.5d0*(CoilInTemp+CoilOutTemp)) &
* DesMassFlow * (CoilOutTemp-CoilInTemp)
DesWaterVolFlow = WaterCoil(CoilNum)%MaxWaterVolFlowRate
END IF
IF (DesCoilLoad >= SmallLoad) THEN
! pass along the coil number and the design load to the residual calculation
Par(1) = DesCoilLoad
Par(2) = REAL(CoilNum,r64)
Par(3) = REAL(ContFanCycCoil,r64) !fan operating mode
Par(4) = 1.0d0 ! part-load ratio
WaterCoil(CoilNum)%InletAirTemp = CoilInTemp
WaterCoil(CoilNum)%InletAirHumRat = CoilInHumRat
WaterCoil(CoilNum)%InletAirEnthalpy = PsyHFnTdbW(CoilInTemp,CoilInHumrat) !9216 added
! WaterCoil(CoilNum)%InletAirMassFlowRate = MAX(FinalZoneSizing(CurZoneEqNum)%DesCoolMassFlow, &
! FinalZoneSizing(CurZoneEqNum)%DesHeatMassFlow)
WaterCoil(CoilNum)%InletAirMassFlowRate = DesMassFlow
WaterCoil(CoilNum)%InletWaterTemp = PlantSizData(PltSizHeatNum)%ExitTemp
rho = GetDensityGlycol(PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(WaterCoil(CoilNum)%WaterLoopNum)%FluidIndex, &
'SizeWaterCoil')
WaterCoil(CoilNum)%InletWaterMassFlowRate = rho * DesWaterVolFlow
! set the lower and upper limits on the UA
UA0 = .001d0 * DesCoilLoad
UA1 = DesCoilLoad
! Invert the simple heating coil model: given the design inlet conditions and the design load,
! find the design UA.
CALL SolveRegulaFalsi(Acc, MaxIte, SolFla, UA, SimpleHeatingCoilUAResidual, UA0, UA1, Par)
! if the numerical inversion failed, issue error messages.
IF (SolFla == -1) THEN
CALL ShowSevereError('Autosizing of heating coil UA failed for Coil:Heating:Water "'// &
TRIM(WaterCoil(CoilNum)%Name)//'"')
CALL ShowContinueError(' Iteration limit exceeded in calculating coil UA')
CALL ShowContinueError(' Lower UA estimate = '//TRIM(TrimSigDigits(UA0,6))//' W/m2-K (0.1% of Design Coil Load)')
CALL ShowContinueError(' Upper UA estimate = '//TRIM(TrimSigDigits(UA1,6))//' W/m2-K (100% of Design Coil Load)')
CALL ShowContinueError(' Final UA estimate when iterations exceeded limit = '//TRIM(TrimSigDigits(UA,6))//' W/m2-K')
CALL ShowContinueError(' Zone "'//TRIM(FinalZoneSizing(CurZoneEqNum)%ZoneName)// &
'" coil sizing conditions (may be different than Sizing inputs):')
CALL ShowContinueError(' Coil inlet air temperature = '//TRIM(TrimSigDigits(CoilInTemp,3))//' C')
CALL ShowContinueError(' Coil inlet air humidity ratio = '//TRIM(TrimSigDigits(CoilInHumRat,3))// &
' kgWater/kgDryAir')
CALL ShowContinueError(' Coil inlet air mass flow rate = '//TRIM(TrimSigDigits(DesMassFlow,6))//' kg/s')
! TotWaterHeatingCoilRate is set in CALL to CalcSimpleHeatingCoil
CALL ShowContinueError(' Design Coil Capacity = '// &
TRIM(TrimSigDigits(WaterCoil(CoilNum)%TotWaterHeatingCoilRate,3))//' W')
IF (TermUnitSingDuct .OR. TermUnitPIU .OR. TermUnitIU .OR. ZoneEqFanCoil) THEN
CALL ShowContinueError(' Design Coil Load = '//TRIM(TrimSigDigits(DesCoilLoad,3))//' W')
ELSE
CALL ShowContinueError(' Design Coil Load = '//TRIM(TrimSigDigits(DesCoilLoad,3))//' W')
CALL ShowContinueError(' Coil outlet air temperature = '//TRIM(TrimSigDigits(CoilOutTemp,3))//' C')
CALL ShowContinueError(' Coil outlet air humidity ratio = '//TRIM(TrimSigDigits(CoilOutHumRat,3))// &
' kgWater/kgDryAir')
END IF
ErrorsFound = .TRUE.
ELSE IF (SolFla == -2) THEN
CALL ShowSevereError('Autosizing of heating coil UA failed for Coil:Heating:Water "'// &
TRIM(WaterCoil(CoilNum)%Name)//'"')
CALL ShowContinueError(' Bad starting values for UA')
CALL ShowContinueError(' Lower UA estimate = '//TRIM(TrimSigDigits(UA0,6))//' W/m2-K (0.1% of Design Coil Load)')
CALL ShowContinueError(' Upper UA estimate = '//TRIM(TrimSigDigits(UA1,6))//' W/m2-K (100% of Design Coil Load)')
CALL ShowContinueError(' Zone "'//TRIM(FinalZoneSizing(CurZoneEqNum)%ZoneName)// &
'" coil sizing conditions (may be different than Sizing inputs):')
CALL ShowContinueError(' Coil inlet air temperature = '//TRIM(TrimSigDigits(CoilInTemp,3))//' C')
CALL ShowContinueError(' Coil inlet air humidity ratio = '//TRIM(TrimSigDigits(CoilInHumRat,3))// &
' kgWater/kgDryAir')
CALL ShowContinueError(' Coil inlet air mass flow rate = '//TRIM(TrimSigDigits(DesMassFlow,6))//' kg/s')
CALL ShowContinueError(' Design Coil Capacity = '// &
TRIM(TrimSigDigits(WaterCoil(CoilNum)%TotWaterHeatingCoilRate,3))//' W')
IF (TermUnitSingDuct .OR. TermUnitPIU .OR. TermUnitIU.OR. ZoneEqFanCoil) THEN
CALL ShowContinueError(' Design Coil Load = '//TRIM(TrimSigDigits(DesCoilLoad,3))//' W')
ELSE
CALL ShowContinueError(' Design Coil Load = '//TRIM(TrimSigDigits(DesCoilLoad,3))//' W')
CALL ShowContinueError(' Coil outlet air temperature = '//TRIM(TrimSigDigits(CoilOutTemp,3))//' C')
CALL ShowContinueError(' Coil outlet air humidity ratio = '//TRIM(TrimSigDigits(CoilOutHumRat,3))// &
' kgWater/kgDryAir')
END IF
! TotWaterHeatingCoilRate is set in CALL to CalcSimpleHeatingCoil
IF (WaterCoil(CoilNum)%TotWaterHeatingCoilRate < DesCoilLoad) THEN
CALL ShowContinueError(' Inadequate water side capacity: in Plant Sizing for this hot water loop')
CALL ShowContinueError(' increase design loop exit temperature and/or decrease design loop delta T')
CALL ShowContinueError(' Plant Sizing object = '//TRIM(PlantSizData(PltSizHeatNum)%PlantLoopName))
CALL ShowContinueError(' Plant design loop exit temperature = '// &
TRIM(TrimSigDigits(PlantSizData(PltSizHeatNum)%ExitTemp,3))//' C')
CALL ShowContinueError(' Plant design loop delta T = '// &
TRIM(TrimSigDigits(PlantSizData(PltSizHeatNum)%DeltaT,3))//' C')
END IF
ErrorsFound = .TRUE.
END IF
UACoilDes = UA
ELSE
UACoilDes = 1.0d0
IF (WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0) THEN
ErrorsFound = .TRUE.
CALL ShowSevereError('The design coil load is zero for Coil:Heating:Water ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('An autosize value for UA cannot be calculated')
CALL ShowContinueError('Input a value for UA, change the heating design day, or raise')
CALL ShowContinueError(' the zone heating design supply air temperature')
END IF
END IF
IF (IsAutosize) THEN
WaterCoil(CoilNum)%UACoil = UACoilDes
!WaterCoil(CoilNum)%DesTotWaterCoilLoad = DesCoilLoad
WaterCoil(CoilNum)%DesWaterHeatingCoilRate = DesCoilLoad
CALL ReportSizingOutput('Coil:Heating:Water',WaterCoil(CoilNum)%Name, &
'Design Size U-Factor Times Area Value [W/K]',UACoilDes)
ELSE
IF (UACoilUser > 0.0d0 .AND. UACoilDes > 0.0d0) THEN
CALL ReportSizingOutput('Coil:Heating:Water',WaterCoil(CoilNum)%Name,&
'Design Size U-Factor Times Area Value [W/K]',UACoilDes, &
'User-Specified U-Factor Times Area Value [W/K]',UACoilUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(UACoilDes - UACoilUser)/UACoilUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeWaterCoil: Potential issue with equipment sizing for Coil = ' &
//TRIM(WaterCoil(CoilNum)%Name))
CALL ShowContinueError('User-Specified U-Factor Times Area Value of '// &
TRIM(RoundSigDigits(UACoilUser,2))// ' [W/K]')
CALL ShowContinueError('differs from Design Size U-Factor Times Area Value of ' // &
TRIM(RoundSigDigits(UACoilDes,2))// ' [W/K]')
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 UA autosize IF
END IF ! end zone coil ELSE - IF
ELSE
! if there is no heating Plant Sizing object and autosizng was requested, issue an error message
IF (WaterCoil(CoilNum)%RequestingAutosize) THEN
CALL ShowSevereError('Autosizing of water coil requires a heating loop Sizing:Plant object')
CALL ShowContinueError('Occurs in water coil object= '//TRIM(WaterCoil(CoilNum)%Name))
ErrorsFound = .TRUE.
END IF
END IF ! end of heating Plant Sizing existence IF - ELSE
END IF ! end heating coil IF
! save the design water volumetric flow rate for use by the water loop sizing algorithms
IF (WaterCoil(CoilNum)%MaxWaterVolFlowRate > 0.0d0) THEN
CALL RegisterPlantCompDesignFlow(WaterCoil(CoilNum)%WaterInletNodeNum,WaterCoil(CoilNum)%MaxWaterVolFlowRate)
END IF
IF (ErrorsFound) THEN
CALL ShowFatalError('Preceding water coil sizing errors cause program termination')
END IF
RETURN
END SUBROUTINE SizeWaterCoil