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) | :: | UnitHeatNum |
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 SizeUnitHeater(UnitHeatNum)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN February 2002
! MODIFIED August 2013 Daeho Kang, add component sizing table entries
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for sizing Unit Heater components for which flow rates have not been
! specified in the input.
! METHODOLOGY EMPLOYED:
! Obtains flow rates from the zone sizing arrays and plant sizing data.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataSizing
USE InputProcessor
USE WaterCoils, ONLY: SetCoilDesFlow, GetCoilWaterInletNode, GetCoilWaterOutletNode
USE SteamCoils, ONLY: GetCoilSteamInletNode, GetCoilSteamOutletNode
! USE BranchInputManager, ONLY: MyPlantSizingIndex
USE DataPlant, ONLY: PlantLoop, MyPlantSizingIndex
USE Psychrometrics, ONLY: CpHW
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) :: UnitHeatNum
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: PltSizHeatNum ! index of plant sizing object for 1st heating loop
LOGICAL :: ErrorsFound
REAL(r64) :: DesCoilLoad
REAL(r64) :: TempSteamIn
REAL(r64) :: EnthSteamInDry
REAL(r64) :: EnthSteamOutWet
REAL(r64) :: LatentHeatSteam
REAL(r64) :: SteamDensity
INTEGER :: RefrigIndex=0
INTEGER :: CoilWaterInletNode=0
INTEGER :: CoilWaterOutletNode=0
INTEGER :: CoilSteamInletNode=0
INTEGER :: CoilSteamOutletNode=0
REAL(r64) :: Cp ! local temporary for fluid specific heat
REAL(r64) :: rho ! local temporary for fluid density
LOGICAL :: IsAutosize ! Indicator to autosize
REAL(r64) :: MaxAirVolFlowDes ! Autosized maximum air flow for reporting
REAL(r64) :: MaxAirVolFlowUser ! Hardsized maximum air flow for reporting
REAL(r64) :: MaxVolHotWaterFlowDes ! Autosized maximum hot water flow for reporting
REAL(r64) :: MaxVolHotWaterFlowUser ! Hardsized maximum hot water flow for reporting
REAL(r64) :: MaxVolHotSteamFlowDes ! Autosized maximum hot steam flow for reporting
REAL(r64) :: MaxVolHotSteamFlowUser ! Hardsized maximum hot steam flow for reporting
PltSizHeatNum = 0
ErrorsFound = .FALSE.
IsAutosize = .FALSE.
MaxAirVolFlowDes = 0.0d0
MaxAirVolFlowUser = 0.0d0
MaxVolHotWaterFlowDes = 0.0d0
MaxVolHotWaterFlowUser = 0.0d0
MaxVolHotSteamFlowDes = 0.0d0
MaxVolHotSteamFlowUser = 0.0d0
IF (UnitHeat(UnitHeatNum)%MaxAirVolFlow == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (UnitHeat(UnitHeatNum)%MaxAirVolFlow > 0.0d0) THEN
CALL ReportSizingOutput('ZoneHVAC:UnitHeater', UnitHeat(UnitHeatNum)%Name, &
'User-Specified Maximum Supply Air Flow Rate [m3/s]', UnitHeat(UnitHeatNum)%MaxAirVolFlow)
END IF
ELSE
CALL CheckZoneSizing('ZoneHVAC:UnitHeater', UnitHeat(UnitHeatNum)%Name)
IF (FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow >= SmallAirVolFlow) THEN
MaxAirVolFlowDes = FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow
ELSE
MaxAirVolFlowDes = 0.0d0
END IF
IF (IsAutosize) THEN
UnitHeat(UnitHeatNum)%MaxAirVolFlow = MaxAirVolFlowDes
CALL ReportSizingOutput('ZoneHVAC:UnitHeater', UnitHeat(UnitHeatNum)%Name, &
'Design Size Maximum Supply Air Flow Rate [m3/s]', MaxAirVolFlowDes)
ELSE
IF (UnitHeat(UnitHeatNum)%MaxAirVolFlow > 0.0d0 .AND. MaxAirVolFlowDes > 0.0d0) THEN
MaxAirVolFlowUser = UnitHeat(UnitHeatNum)%MaxAirVolFlow
CALL ReportSizingOutput('ZoneHVAC:UnitHeater', UnitHeat(UnitHeatNum)%Name, &
'Design Size Maximum Supply Air Flow Rate [m3/s]', MaxAirVolFlowDes, &
'User-Specified Maximum Supply Air Flow Rate [m3/s]', MaxAirVolFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxAirVolFlowDes - MaxAirVolFlowUser)/MaxAirVolFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeUnitHeater: Potential issue with equipment sizing for ZoneHVAC:UnitHeater ' &
//TRIM(UnitHeat(UnitHeatNum)%Name))
CALL ShowContinueError('User-Specified Maximum Hot Water Flow of '// &
TRIM(RoundSigDigits(MaxAirVolFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('.differs from Design Size Maximum Hot Water Flow 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
END IF
IsAutosize = .FALSE.
IF(UnitHeat(UnitHeatNum)%MaxVolHotWaterFlow==AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (UnitHeat(UnitHeatNum)%HCoilType == WaterCoil) THEN
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (UnitHeat(UnitHeatNum)%MaxVolHotWaterFlow > 0.0d0) THEN
CALL ReportSizingOutput('ZoneHVAC:UnitHeater', UnitHeat(UnitHeatNum)%Name, &
'User-Specified Maximum Hot Water Flow [m3/s]', UnitHeat(UnitHeatNum)%MaxVolHotWaterFlow)
END IF
ELSE
CALL CheckZoneSizing('ZoneHVAC:UnitHeater', UnitHeat(UnitHeatNum)%Name)
CoilWaterInletNode = GetCoilWaterInletNode('Coil:Heating:Water',UnitHeat(UnitHeatNum)%HCoilName,ErrorsFound)
CoilWaterOutletNode = GetCoilWaterOutletNode('Coil:Heating:Water',UnitHeat(UnitHeatNum)%HCoilName,ErrorsFound)
IF (IsAutosize) THEN
PltSizHeatNum = MyPlantSizingIndex('Coil:Heating:Water', UnitHeat(UnitHeatNum)%HCoilName, CoilWaterInletNode, &
CoilWaterOutletNode, ErrorsFound)
IF (PltSizHeatNum > 0) THEN
DesCoilLoad = FinalZoneSizing(CurZoneEqNum)%DesHeatLoad
IF (DesCoilLoad >= SmallLOad) THEN
rho = GetDensityGlycol(PlantLoop(UnitHeat(UnitHeatNum)%HWLoopNum)%FluidName, &
60.d0, &
PlantLoop(UnitHeat(UnitHeatNum)%HWLoopNum)%FluidIndex, &
'SizeUnitHeater')
Cp = GetSpecificHeatGlycol(PlantLoop(UnitHeat(UnitHeatNum)%HWLoopNum)%FluidName, &
60.d0, &
PlantLoop(UnitHeat(UnitHeatNum)%HWLoopNum)%FluidIndex, &
'SizeUnitHeater')
MaxVolHotWaterFlowDes = DesCoilLoad / &
( PlantSizData(PltSizHeatNum)%DeltaT * &
Cp * rho )
ELSE
MaxVolHotWaterFlowDes = 0.0d0
END IF
ELSE
CALL ShowSevereError('Autosizing of water flow requires a heating loop Sizing:Plant object')
CALL ShowContinueError('Occurs in ' // 'ZoneHVAC:UnitHeater' // ' Object=' &
//TRIM(UnitHeat(UnitHeatNum)%Name))
ErrorsFound = .TRUE.
END IF
END IF
IF (IsAutosize) THEN
UnitHeat(UnitHeatNum)%MaxVolHotWaterFlow = MaxVolHotWaterFlowDes
CALL ReportSizingOutput('ZoneHVAC:UnitHeater', UnitHeat(UnitHeatNum)%Name, &
'Design Size Maximum Hot Water Flow [m3/s]', MaxVolHotWaterFlowDes)
ELSE
IF (UnitHeat(UnitHeatNum)%MaxVolHotWaterFlow > 0.0d0 .AND. MaxVolHotWaterFlowDes > 0.0d0) THEN
MaxVolHotWaterFlowUser = UnitHeat(UnitHeatNum)%MaxVolHotWaterFlow
CALL ReportSizingOutput('ZoneHVAC:UnitHeater', UnitHeat(UnitHeatNum)%Name, &
'Design Size Maximum Hot Water Flow [m3/s]', MaxVolHotWaterFlowDes, &
'User-Specified Maximum Hot Water Flow [m3/s]', MaxVolHotWaterFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxVolHotWaterFlowDes - MaxVolHotWaterFlowUser)/MaxVolHotWaterFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeUnitHeater: Potential issue with equipment sizing for ZoneHVAC:UnitHeater ' &
//TRIM(UnitHeat(UnitHeatNum)%Name))
CALL ShowContinueError('User-Specified Maximum Hot Water Flow of '// &
TRIM(RoundSigDigits(MaxVolHotWaterFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Hot Water Flow of ' // &
TRIM(RoundSigDigits(MaxVolHotWaterFlowDes,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
ELSE
UnitHeat(UnitHeatNum)%MaxVolHotWaterFlow = 0.0d0
END IF
IsAutosize = .FALSE.
IF (UnitHeat(UnitHeatNum)%MaxVolHotSteamFlow==AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (UnitHeat(UnitHeatNum)%HCoilType == SteamCoil) THEN
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (UnitHeat(UnitHeatNum)%MaxVolHotSteamFlow > 0.0d0) THEN
CALL ReportSizingOutput('ZoneHVAC:UnitHeater', UnitHeat(UnitHeatNum)%Name, &
'User-Specified Maximum Steam Flow [m3/s]', UnitHeat(UnitHeatNum)%MaxVolHotSteamFlow)
END IF
ELSE
CALL CheckZoneSizing('ZoneHVAC:UnitHeater', UnitHeat(UnitHeatNum)%Name)
CoilSteamInletNode = GetCoilSteamInletNode('Coil:Heating:Steam',UnitHeat(UnitHeatNum)%HCoilName,ErrorsFound)
CoilSteamOutletNode = GetCoilSteamInletNode('Coil:Heating:Steam',UnitHeat(UnitHeatNum)%HCoilName,ErrorsFound)
IF (IsAutosize) THEN
PltSizHeatNum = MyPlantSizingIndex('Coil:Heating:Steam', UnitHeat(UnitHeatNum)%HCoilName, CoilSteamInletNode, &
CoilSteamOutletNode, ErrorsFound)
IF (PltSizHeatNum > 0) THEN
DesCoilLoad = FinalZoneSizing(CurZoneEqNum)%DesHeatLoad
IF (DesCoilLoad >= SmallLOad) THEN
TempSteamIn= 100.00d0
EnthSteamInDry = GetSatEnthalpyRefrig('STEAM',TempSteamIn,1.0d0,RefrigIndex,'SizeUnitHeater')
EnthSteamOutWet= GetSatEnthalpyRefrig('STEAM',TempSteamIn,0.0d0,RefrigIndex,'SizeUnitHeater')
LatentHeatSteam=EnthSteamInDry-EnthSteamOutWet
SteamDensity=GetSatDensityRefrig('STEAM',TempSteamIn,1.0d0,RefrigIndex,'SizeUnitHeater')
MaxVolHotSteamFlowDes = DesCoilLoad/(SteamDensity*(LatentHeatSteam + &
PlantSizData(PltSizHeatNum)%DeltaT*CPHW(PlantSizData(PltSizHeatNum)%ExitTemp)))
ELSE
MaxVolHotSteamFlowDes = 0.0d0
END IF
ELSE
CALL ShowSevereError('Autosizing of Steam flow requires a heating loop Sizing:Plant object')
CALL ShowContinueError('Occurs in ' // 'ZoneHVAC:UnitHeater' // ' Object=' &
//TRIM(UnitHeat(UnitHeatNum)%Name))
ErrorsFound = .TRUE.
END IF
END IF
IF (IsAutosize) THEN
UnitHeat(UnitHeatNum)%MaxVolHotSteamFlow = MaxVolHotSteamFlowDes
CALL ReportSizingOutput('ZoneHVAC:UnitHeater', UnitHeat(UnitHeatNum)%Name, &
'Design Size Maximum Steam Flow [m3/s]', MaxVolHotSteamFlowDes)
ELSE
IF (UnitHeat(UnitHeatNum)%MaxVolHotSteamFlow > 0.0d0 .AND. MaxVolHotSteamFlowDes > 0.0d0) THEN
MaxVolHotSteamFlowUser = UnitHeat(UnitHeatNum)%MaxVolHotSteamFlow
CALL ReportSizingOutput('ZoneHVAC:UnitHeater', UnitHeat(UnitHeatNum)%Name, &
'Design Size Maximum Steam Flow [m3/s]', MaxVolHotSteamFlowDes, &
'User-Specified Maximum Steam Flow [m3/s]', MaxVolHotSteamFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxVolHotSteamFlowDes - MaxVolHotSteamFlowUser)/MaxVolHotSteamFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeUnitHeater: Potential issue with equipment sizing for ZoneHVAC:UnitHeater ' &
//TRIM(UnitHeat(UnitHeatNum)%Name))
CALL ShowContinueError('User-Specified Maximum Steam Flow of '// &
TRIM(RoundSigDigits(MaxVolHotSteamFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Steam Flow of ' // &
TRIM(RoundSigDigits(MaxVolHotSteamFlowDes,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
ELSE
UnitHeat(UnitHeatNum)%MaxVolHotSteamFlow = 0.0d0
END IF
! set the design air flow rate for the heating coil
CALL SetCoilDesFlow(UnitHeat(UnitHeatNum)%HCoilTypeCh,UnitHeat(UnitHeatNum)%HCoilName,UnitHeat(UnitHeatNum)%MaxAirVolFlow,&
ErrorsFound)
IF (ErrorsFound) THEN
CALL ShowFatalError('Preceding sizing errors cause program termination')
END IF
RETURN
END SUBROUTINE SizeUnitHeater