Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | FanCoilNum |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE SizeFanCoilUnit(FanCoilNum)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN January 2002
! MODIFIED August 2013 Daeho Kang, add component sizing table entries
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for sizing Fan Coil Unit components for which flow rates have not been
! specified in the input.
! METHODOLOGY EMPLOYED:
! Obtains flow rates from the zone or system sizing arrays and plant sizing data.
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor
USE Psychrometrics, ONLY: PsyCpAirFnWTdb, PsyHFnTdbW
USE Fans, ONLY: SimulateFanComponents, GetFanDesignVolumeFlowRate
USE General, ONLY: TrimSigDigits
USE WaterCoils, ONLY: SetCoilDesFlow, GetCoilWaterInletNode, GetCoilWaterOutletNode
USE HVACHXAssistedCoolingCoil, ONLY: GetHXDXCoilName, GetHXCoilType
USE DataPlant, ONLY: PlantLoop, MyPlantSizingIndex
USE FluidProperties, ONLY: GetDensityGlycol, GetSpecificHeatGlycol
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) :: FanCoilNum
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName='SizeFanCoilUnit: ' ! include trailing blank space
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: PltSizHeatNum ! index of plant sizing object for 1st heating loop
INTEGER :: PltSizCoolNum ! index of plant sizing object for 1st cooling loop
REAL(r64) :: CoilInTemp ! design inlet air temperature for coil [C]
REAL(r64) :: CoilOutTemp ! design outlet air temperature for coil [C]
REAL(r64) :: CoilOutHumRat ! design inlet air humidity ratio for coil [kg/kg]
REAL(r64) :: CoilInHumRat ! design outlet air humidity ratio for coil [kg/kg]
LOGICAL :: ErrorsFound ! TRUE if errors foind during sizing
REAL(r64) :: DesCoilLoad ! coil load used for sizing [W]
REAL(r64) :: FCOAFrac ! design outside air fraction for the fan coil unit
INTEGER :: CoilWaterInletNode=0
INTEGER :: CoilWaterOutletNode=0
CHARACTER(len=MaxNameLength) :: CoolingCoilName
CHARACTER(len=MaxNameLength) :: CoolingCoilType
REAL(r64) :: rho
REAL(r64) :: Cp
LOGICAL :: IsAutoSize ! Indicator to autosize for reporting
REAL(r64) :: MaxAirVolFlowDes ! Autosized max air flow for reporting
REAL(r64) :: MaxAirVolFlowUser ! Hardsized max air flow for reporting
REAL(r64) :: OutAirVolFlowDes ! Autosized outdoor air flow for reporting
REAL(r64) :: OutAirVolFlowUser ! Hardsized outdoor air flow for reporting
REAL(r64) :: MaxHotWaterVolFlowDes ! Autosized hot water flow for reporting
REAL(r64) :: MaxHotWaterVolFlowUser ! Hardsized hot water flow for reporting
REAL(r64) :: MaxColdWaterVolFlowDes ! Autosized cold water flow for reporting
REAL(r64) :: MaxColdWaterVolFlowUser ! Hardsized cold water flow for reporting
PltSizCoolNum = 0
PltSizHeatNum = 0
ErrorsFound = .FALSE.
IsAutosize = .FALSE.
MaxAirVolFlowDes = 0.0d0
MaxAirVolFlowUser = 0.0d0
OutAirVolFlowDes = 0.0d0
OutAirVolFlowUser = 0.0d0
MaxHotWaterVolFlowDes = 0.0d0
MaxHotWaterVolFlowUser = 0.0d0
MaxColdWaterVolFlowDes = 0.0d0
MaxColdWaterVolFlowUser = 0.0d0
IF (FanCoil(FanCoilNum)%MaxAirVolFlow == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN
IF (FanCoil(FanCoilNum)%MaxAirVolFlow > 0.0d0) THEN
CALL ReportSizingOutput(FanCoil(FanCoilNum)%UnitType, FanCoil(FanCoilNum)%Name, &
'User-Specified Supply Air Maximum Flow Rate [m3/s]', FanCoil(FanCoilNum)%MaxAirVolFlow)
END IF
ELSE
CALL CheckZoneSizing(FanCoil(FanCoilNum)%UnitType, FanCoil(FanCoilNum)%Name)
MaxAirVolFlowDes = MAX(FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow, &
FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow)
IF (MaxAirVolFlowDes < SmallAirVolFlow) THEN
MaxAirVolFlowDes = 0.0d0
END IF
! If fan is autosized, get fan volumetric flow rate
IF(FanCoil(FanCoilNum)%FanAirVolFlow .EQ. AutoSize)THEN
CALL SimulateFanComponents(FanCoil(FanCoilNum)%FanName,.TRUE.,FanCoil(FanCoilNum)%FanIndex)
FanCoil(FanCoilNum)%FanAirVolFlow = GetFanDesignVolumeFlowRate(TRIM(cFanTypes(FanCoil(FanCoilNum)%FanType_Num)), &
TRIM(FanCoil(FanCoilNum)%FanName),ErrorsFound)
END IF
! Check that the fan volumetric flow rate is greater than or equal to the FCU voluetric flow rate
IF(MaxAirVolFlowDes .GT. FanCoil(FanCoilNum)%FanAirVolFlow )THEN
CALL ShowWarningError(RoutineName//TRIM(FanCoil(FanCoilNum)%UnitType)//': '//TRIM(FanCoil(FanCoilNum)%Name))
CALL ShowContinueError('... Maximum supply air flow rate is greater than the maximum fan flow rate.')
CALL ShowContinueError('... Fan Coil Unit flow = '//TRIM(TrimSigDigits(MaxAirVolFlowDes,5))//' [m3/s].')
CALL ShowContinueError('... Fan = '//TRIM(cFanTypes(FanCoil(FanCoilNum)%FanType_Num))//': '// &
TRIM(FanCoil(FanCoilNum)%FanName))
CALL ShowContinueError('... Fan flow = '//TRIM(TrimSigDigits(FanCoil(FanCoilNum)%FanAirVolFlow,5))//' [m3/s].')
CALL ShowContinueError('... Fan Coil Unit flow rate reduced to match the fan flow rate and the simulation continues.')
MaxAirVolFlowDes = FanCoil(FanCoilNum)%FanAirVolFlow
END IF
IF (IsAutosize) THEN
FanCoil(FanCoilNum)%MaxAirVolFlow = MaxAirVolFlowDes
CALL ReportSizingOutput(FanCoil(FanCoilNum)%UnitType, FanCoil(FanCoilNum)%Name, &
'Design Size Supply Air Maximum Flow Rate [m3/s]', MaxAirVolFlowDes)
ELSE ! Hard size with sizing data
IF (FanCoil(FanCoilNum)%MaxAirVolFlow > 0.0d0 .AND. MaxAirVolFlowDes > 0.0d0) THEN
MaxAirVolFlowUser = FanCoil(FanCoilNum)%MaxAirVolFlow
CALL ReportSizingOutput(FanCoil(FanCoilNum)%UnitType, FanCoil(FanCoilNum)%Name, &
'Design Size Supply Air Maximum Flow Rate [m3/s]', MaxAirVolFlowDes, &
'User-Specified Supply Air Maximum Flow Rate [m3/s]', MaxAirVolFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxAirVolFlowDes - MaxAirVolFlowUser)/MaxAirVolFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeFanCoilUnit: Potential issue with equipment sizing for ' &
//TRIM(FanCoil(FanCoilNum)%UnitType)//' '//TRIM(FanCoil(FanCoilNum)%Name))
CALL ShowContinueError('User-Specified Supply Air Maximum Flow Rate of '// &
TRIM(RoundSigDigits(MaxAirVolFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Supply Air Maximum Flow Rate of ' // &
TRIM(RoundSigDigits(MaxAirVolFlowDes,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
ELSE IF(FanCoil(FanCoilNum)%FanAirVolFlow .EQ. AutoSize)THEN
CALL SimulateFanComponents(FanCoil(FanCoilNum)%FanName,.TRUE.,FanCoil(FanCoilNum)%FanIndex)
FanCoil(FanCoilNum)%FanAirVolFlow = GetFanDesignVolumeFlowRate(TRIM(cFanTypes(FanCoil(FanCoilNum)%FanType_Num)), &
TRIM(FanCoil(FanCoilNum)%FanName),ErrorsFound)
! Check that the fan volumetric flow rate is greater than or equal to the FCU volumetric flow rate
IF(FanCoil(FanCoilNum)%MaxAirVolFlow .GT. FanCoil(FanCoilNum)%FanAirVolFlow)THEN
CALL ShowWarningError(RoutineName//TRIM(FanCoil(FanCoilNum)%UnitType)//': '//TRIM(FanCoil(FanCoilNum)%Name))
CALL ShowContinueError('... Maximum supply air flow rate is greater than the maximum fan flow rate.')
CALL ShowContinueError('... Fan Coil Unit flow = '//TRIM(TrimSigDigits(FanCoil(FanCoilNum)%MaxAirVolFlow,5))//' m3/s.')
CALL ShowContinueError('... Fan = '//TRIM(cFanTypes(FanCoil(FanCoilNum)%FanType_Num))//': '// &
TRIM(FanCoil(FanCoilNum)%FanName))
CALL ShowContinueError('... Fan flow = '//TRIM(TrimSigDigits(FanCoil(FanCoilNum)%FanAirVolFlow,5))//' m3/s.')
CALL ShowContinueError('... Fan Coil Unit flow rate reduced to match the fan flow rate and the simulation continues.')
FanCoil(FanCoilNum)%MaxAirVolFlow = FanCoil(FanCoilNum)%FanAirVolFlow
END IF
END IF
IsAutosize = .FALSE.
IF (FanCoil(FanCoilNum)%OutAirVolFlow == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN
IF (FanCoil(FanCoilNum)%OutAirVolFlow > 0.0d0) THEN
CALL ReportSizingOutput(FanCoil(FanCoilNum)%UnitType, FanCoil(FanCoilNum)%Name, &
'User-Specified Maximum Outdoor Air Flow Rate [m3/s]',FanCoil(FanCoilNum)%OutAirVolFlow)
END IF
ELSE
CALL CheckZoneSizing(FanCoil(FanCoilNum)%UnitType, FanCoil(FanCoilNum)%Name)
OutAirVolFlowDes = MIN(FinalZoneSizing(CurZoneEqNum)%MinOA,FanCoil(FanCoilNum)%MaxAirVolFlow)
IF (OutAirVolFlowDes < SmallAirVolFlow) THEN
OutAirVolFlowDes = 0.0d0
END IF
IF (IsAutosize) THEN
FanCoil(FanCoilNum)%OutAirVolFlow = OutAirVolFlowDes
CALL ReportSizingOutput(FanCoil(FanCoilNum)%UnitType, FanCoil(FanCoilNum)%Name, &
'Design Size Maximum Outdoor Air Flow Rate [m3/s]',OutAirVolFlowDes)
ELSE
IF (FanCoil(FanCoilNum)%OutAirVolFlow > 0.0d0 .AND. OutAirVolFlowDes > 0.0d0) THEN
OutAirVolFlowUser = FanCoil(FanCoilNum)%OutAirVolFlow
CALL ReportSizingOutput(FanCoil(FanCoilNum)%UnitType, FanCoil(FanCoilNum)%Name, &
'Design Size Maximum Outdoor Air Flow Rate [m3/s]',OutAirVolFlowDes, &
'User-Specified Maximum Outdoor Air Flow Rate [m3/s]',OutAirVolFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(OutAirVolFlowDes - OutAirVolFlowUser)/OutAirVolFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeFanCoilUnit: Potential issue with equipment sizing for ' &
//TRIM(FanCoil(FanCoilNum)%UnitType)//' '//TRIM(FanCoil(FanCoilNum)%Name))
CALL ShowContinueError('User-Specified Maximum Outdoor Air Flow Rate of '// &
TRIM(RoundSigDigits(OutAirVolFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Outdoor Air Flow Rate of ' // &
TRIM(RoundSigDigits(OutAirVolFlowDes,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
END IF
IsAutosize = .FALSE.
IF (FanCoil(FanCoilNum)%MaxHotWaterVolFlow == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN
IF (FanCoil(FanCoilNum)%MaxHotWaterVolFlow > 0.0d0) THEN
CALL ReportSizingOutput(FanCoil(FanCoilNum)%UnitType, FanCoil(FanCoilNum)%Name, &
'User-Specified Maximum Hot Water Flow [m3/s]', FanCoil(FanCoilNum)%MaxHotWaterVolFlow)
END IF
ELSE
CoilWaterInletNode = GetCoilWaterInletNode('Coil:Heating:Water',FanCoil(FanCoilNum)%HCoilName,ErrorsFound)
CoilWaterOutletNode = GetCoilWaterOutletNode('Coil:Heating:Water',FanCoil(FanCoilNum)%HCoilName,ErrorsFound)
IF (IsAutosize) THEN
PltSizHeatNum = MyPlantSizingIndex('Coil:Heating:Water', FanCoil(FanCoilNum)%HCoilName, CoilWaterInletNode, &
CoilWaterOutletNode, ErrorsFound)
IF (PltSizHeatNum > 0) THEN
CALL CheckZoneSizing(FanCoil(FanCoilNum)%UnitType, FanCoil(FanCoilNum)%Name)
IF (FinalZoneSizing(CurZoneEqNum)%DesHeatMassFlow > 0.0d0) THEN
FCOAFrac = MIN(FanCoil(FanCoilNum)%OutAirVolFlow / FinalZoneSizing(CurZoneEqNum)%DesHeatMassFlow, 1.0d0)
ELSE
FCOAFrac = 0.0d0
END IF
CoilInTemp = FCOAFrac*FinalZoneSizing(CurZoneEqNum)%OutTempAtHeatPeak + &
(1.0d0-FCOAFrac)*FinalZoneSizing(CurZoneEqNum)%ZoneTempAtHeatPeak
CoilOutTemp = FinalZoneSizing(CurZoneEqNum)%HeatDesTemp
CoilOutHumRat =FinalZoneSizing(CurZoneEqNum)%HeatDesHumRat
DesCoilLoad = PsyCpAirFnWTdb(CoilOutHumRat, 0.5d0*(CoilInTemp+CoilOutTemp)) &
* FinalZoneSizing(CurZoneEqNum)%DesHeatMassFlow &
* (CoilOutTemp-CoilInTemp)
FanCoil(FanCoilNum)%DesHeatingLoad = DesCoilLoad
IF (DesCoilLoad >= SmallLoad) THEN
rho = GetDensityGlycol( PlantLoop(FanCoil(FanCoilNum)%HWLoopNum)%FluidName, &
60.d0, &
PlantLoop(FanCoil(FanCoilNum)%HWLoopNum)%FluidIndex, &
'SizeFanCoilUnit')
Cp = GetSpecificHeatGlycol(PlantLoop(FanCoil(FanCoilNum)%HWLoopNum)%FluidName, &
60.d0, &
PlantLoop(FanCoil(FanCoilNum)%HWLoopNum)%FluidIndex, &
'SizeFanCoilUnit')
MaxHotWaterVolFlowDes = DesCoilLoad / &
( PlantSizData(PltSizHeatNum)%DeltaT * &
Cp * rho )
ELSE
MaxHotWaterVolFlowDes = 0.0d0
END IF
ELSE
CALL ShowSevereError('Autosizing of water flow requires a heating loop Sizing:Plant object')
CALL ShowContinueError('Occurs in ' // TRIM(FanCoil(FanCoilNum)%UnitType) // ' Object=' &
//TRIM(FanCoil(FanCoilNum)%Name))
ErrorsFound = .TRUE.
END IF
END IF
IF (IsAutosize) THEN
FanCoil(FanCoilNum)%MaxHotWaterVolFlow = MaxHotWaterVolFlowDes
CALL ReportSizingOutput(FanCoil(FanCoilNum)%UnitType, FanCoil(FanCoilNum)%Name, &
'Design Size Maximum Hot Water Flow [m3/s]', MaxHotWaterVolFlowDes)
ELSE ! Hard size with sizing data
IF (FanCoil(FanCoilNum)%MaxHotWaterVolFlow > 0.0d0 .AND. MaxHotWaterVolFlowDes > 0.0d0) THEN
MaxHotWaterVolFlowDes = FanCoil(FanCoilNum)%MaxHotWaterVolFlow
CALL ReportSizingOutput(FanCoil(FanCoilNum)%UnitType, FanCoil(FanCoilNum)%Name, &
'Design Size Maximum Hot Water Flow [m3/s]', MaxHotWaterVolFlowDes, &
'User-Specified Maximum Hot Water Flow [m3/s]', MaxHotWaterVolFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxHotWaterVolFlowDes - MaxHotWaterVolFlowUser)/ MaxHotWaterVolFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeFanCoilUnit: Potential issue with equipment sizing for ' &
//TRIM(FanCoil(FanCoilNum)%UnitType)//' '//TRIM(FanCoil(FanCoilNum)%Name))
CALL ShowContinueError('User-Specified Maximum Hot Water Flow of '// &
TRIM(RoundSigDigits(MaxHotWaterVolFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Hot Water Flow of ' // &
TRIM(RoundSigDigits(MaxHotWaterVolFlowDes,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
END IF
IsAutosize = .FALSE.
IF (FanCoil(FanCoilNum)%MaxColdWaterVolFlow == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN
IF (FanCoil(FanCoilNum)%MaxColdWaterVolFlow > 0.0d0) THEN
CALL ReportSizingOutput(FanCoil(FanCoilNum)%UnitType, FanCoil(FanCoilNum)%Name, &
'User-Specified Maximum Cold Water Flow [m3/s]', FanCoil(FanCoilNum)%MaxColdWaterVolFlow)
END IF
ELSE
IF (SameString(FanCoil(FanCoilNum)%CCoilType,'CoilSystem:Cooling:Water:HeatExchangerAssisted')) THEN
CoolingCoilName = GetHXDXCoilName(FanCoil(FanCoilNum)%CCoilType,FanCoil(FanCoilNum)%CCoilName,ErrorsFound)
CoolingCoilType = GetHXCoilType(FanCoil(FanCoilNum)%CCoilType,FanCoil(FanCoilNum)%CCoilName,ErrorsFound)
ELSE
CoolingCoilName = FanCoil(FanCoilNum)%CCoilName
CoolingCoilType = FanCoil(FanCoilNum)%CCoilType
END IF
CoilWaterInletNode = GetCoilWaterInletNode(CoolingCoilType,CoolingCoilName,ErrorsFound)
CoilWaterOutletNode = GetCoilWaterOutletNode(CoolingCoilType,CoolingCoilName,ErrorsFound)
IF (IsAutosize) THEN
PltSizCoolNum = MyPlantSizingIndex(CoolingCoilType, CoolingCoilName, CoilWaterInletNode, &
CoilWaterOutletNode, ErrorsFound)
IF (PltSizCoolNum > 0) THEN
CALL CheckZoneSizing(FanCoil(FanCoilNum)%UnitType, FanCoil(FanCoilNum)%Name)
IF (FinalZoneSizing(CurZoneEqNum)%DesCoolMassFlow > 0.0d0) THEN
FCOAFrac = MIN(FanCoil(FanCoilNum)%OutAirVolFlow / FinalZoneSizing(CurZoneEqNum)%DesCoolMassFlow, 1.0d0)
ELSE
FCOAFrac = 0.0d0
END IF
CoilInTemp = FCOAFrac*FinalZoneSizing(CurZoneEqNum)%OutTempAtCoolPeak + &
(1.0d0-FCOAFrac)*FinalZoneSizing(CurZoneEqNum)%ZoneTempAtCoolPeak
CoilInHumRat = FCOAFrac*FinalZoneSizing(CurZoneEqNum)%OutHumRatAtCoolPeak + &
(1.0d0-FCOAFrac)*FinalZoneSizing(CurZoneEqNum)%ZoneHumRatAtCoolPeak
CoilOutTemp = FinalZoneSizing(CurZoneEqNum)%CoolDesTemp
CoilOutHumRat = FinalZoneSizing(CurZoneEqNum)%CoolDesHumRat
IF (CoilOutHumRat > CoilInHumRat) THEN
IF (CoilInHumRat > 0.016d0) THEN
CoilOutHumRat = 0.5d0*CoilInHumRat
ELSE
CoilOutHumRat = CoilInHumRat
END IF
END IF
DesCoilLoad = FinalZoneSizing(CurZoneEqNum)%DesCoolMassFlow &
* (PsyHFnTdbW(CoilInTemp, CoilInHumRat)-PsyHFnTdbW(CoilOutTemp, CoilOutHumRat))
FanCoil(FanCoilNum)%DesCoolingLoad = DesCoilLoad
IF (DesCoilLoad >= SmallLoad) THEN
rho = GetDensityGlycol( PlantLoop(FanCoil(FanCoilNum)%CWLoopNum)%FluidName, &
5.d0, &
PlantLoop(FanCoil(FanCoilNum)%CWLoopNum)%FluidIndex, &
'SizeFanCoilUnit')
Cp = GetSpecificHeatGlycol(PlantLoop(FanCoil(FanCoilNum)%CWLoopNum)%FluidName, &
5.d0, &
PlantLoop(FanCoil(FanCoilNum)%CWLoopNum)%FluidIndex, &
'SizeFanCoilUnit')
MaxColdWaterVolFlowDes = DesCoilLoad / &
( PlantSizData(PltSizCoolNum)%DeltaT * &
Cp * rho )
ELSE
MaxColdWaterVolFlowDes = 0.0d0
END IF
ELSE
CALL ShowSevereError('Autosizing of water flow requires a cooling loop Sizing:Plant object')
CALL ShowContinueError('Occurs in ' // TRIM(FanCoil(FanCoilNum)%UnitType) // ' Object=' &
//TRIM(FanCoil(FanCoilNum)%Name))
ErrorsFound = .TRUE.
END IF
END IF
IF (IsAutosize) THEN
FanCoil(FanCoilNum)%MaxColdWaterVolFlow = MaxColdWaterVolFlowDes
CALL ReportSizingOutput(FanCoil(FanCoilNum)%UnitType, FanCoil(FanCoilNum)%Name, &
'Design Size Maximum Cold Water Flow [m3/s]', MaxColdWaterVolFlowDes)
ELSE ! Hard size with sizing data
IF (FanCoil(FanCoilNum)%MaxColdWaterVolFlow > 0.0d0 .AND. MaxColdWaterVolFlowDes > 0.0d0) THEN
MaxColdWaterVolFlowUser = FanCoil(FanCoilNum)%MaxColdWaterVolFlow
CALL ReportSizingOutput(FanCoil(FanCoilNum)%UnitType, FanCoil(FanCoilNum)%Name, &
'Design Size Maximum Cold Water Flow [m3/s]', MaxColdWaterVolFlowDes, &
'User-Specified Maximum Cold Water Flow [m3/s]', MaxColdWaterVolFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxColdWaterVolFlowDes - MaxColdWaterVolFlowUser)/MaxColdWaterVolFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeFanCoilUnit: Potential issue with equipment sizing for ' &
//TRIM(FanCoil(FanCoilNum)%UnitType)//' '//TRIM(FanCoil(FanCoilNum)%Name))
CALL ShowContinueError('User-Specified Maximum Cold Water Flow of '// &
TRIM(RoundSigDigits(MaxColdWaterVolFlowUser,5))// '[m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Cold Water Flow of ' // &
TRIM(RoundSigDigits(MaxColdWaterVolFlowDes,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
END IF
! set the design air flow rates for the heating and cooling coils
IF (SameString(FanCoil(FanCoilNum)%CCoilType,'CoilSystem:Cooling:Water:HeatExchangerAssisted')) THEN
CoolingCoilName = GetHXDXCoilName(FanCoil(FanCoilNum)%CCoilType,FanCoil(FanCoilNum)%CCoilName,ErrorsFound)
CoolingCoilType = GetHXCoilType(FanCoil(FanCoilNum)%CCoilType,FanCoil(FanCoilNum)%CCoilName,ErrorsFound)
ELSE
CoolingCoilName = FanCoil(FanCoilNum)%CCoilName
CoolingCoilType = FanCoil(FanCoilNum)%CCoilType
END IF
IF (ZoneSizingRunDone) THEN
CALL SetCoilDesFlow(CoolingCoilType,CoolingCoilName,FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow,&
ErrorsFound)
CALL SetCoilDesFlow(FanCoil(FanCoilNum)%HCoilType,FanCoil(FanCoilNum)%HCoilName,FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow,&
ErrorsFound)
ELSE
CALL SetCoilDesFlow(CoolingCoilType,CoolingCoilName,FanCoil(FanCoilNum)%MaxAirVolFlow,&
ErrorsFound)
CALL SetCoilDesFlow(FanCoil(FanCoilNum)%HCoilType,FanCoil(FanCoilNum)%HCoilName,FanCoil(FanCoilNum)%MaxAirVolFlow,&
ErrorsFound)
END IF
IF (CurZoneEqNum > 0) THEN
ZoneEqSizing(CurZoneEqNum)%MaxHWVolFlow = FanCoil(FanCoilNum)%MaxHotWaterVolFlow
ZoneEqSizing(CurZoneEqNum)%MaxCWVolFlow = FanCoil(FanCoilNum)%MaxColdWaterVolFlow
ZoneEqSizing(CurZoneEqNum)%OAVolFlow = FanCoil(FanCoilNum)%OutAirVolFlow
ZoneEqSizing(CurZoneEqNum)%AirVolFlow = FanCoil(FanCoilNum)%MaxAirVolFlow
ZoneEqSizing(CurZoneEqNum)%DesCoolingLoad = FanCoil(FanCoilNum)%DesCoolingLoad
ZoneEqSizing(CurZoneEqNum)%DesHeatingLoad = FanCoil(FanCoilNum)%DesHeatingLoad
END IF
IF (ErrorsFound) THEN
CALL ShowFatalError('Preceding sizing errors cause program termination')
END IF
RETURN
END SUBROUTINE SizeFanCoilUnit