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) | :: | PIUNum |
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 SizePIU(PIUNum)
! 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 PIU terminal units for which flow rates have not been
! specified in the input.
! METHODOLOGY EMPLOYED:
! Obtains flow rates from the zone or system sizing arrays.
! 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 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) :: PIUNum
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: PltSizNum ! do loop index for plant sizing
INTEGER :: PltSizHeatNum ! index of plant sizing object for 1st heating loop
REAL(r64) :: CoilInTemp
REAL(r64) :: CoilOutTemp
REAL(r64) :: CoilOutHumRat
REAL(r64) :: DesCoilLoad
REAL(r64) :: DesMassFlow
REAL(r64) :: TempSteamIn
REAL(r64) :: EnthSteamInDry
REAL(r64) :: EnthSteamOutWet
REAL(r64) :: LatentHeatSteam
REAL(r64) :: SteamDensity
INTEGER :: CoilWaterInletNode=0
INTEGER :: CoilWaterOutletNode=0
INTEGER :: CoilSteamInletNode=0
INTEGER :: CoilSteamOutletNode=0
LOGICAL :: ErrorsFound
REAL(r64) :: rho
REAL(r64) :: Cp
INTEGER :: DummyWaterIndex = 1
LOGICAL :: IsAutosize ! Indicator to autosize
REAL(r64) :: MaxPriAirVolFlowDes ! Autosized maximum primary air flow for reporting
REAL(r64) :: MaxPriAirVolFlowUser ! Hardsized maximum primary air flow for reporting
REAL(r64) :: MaxTotAirVolFlowDes ! Autosized maximum air flow for reporting
REAL(r64) :: MaxTotAirVolFlowUser ! Hardsized maximum air flow for reporting
REAL(r64) :: MaxSecAirVolFlowDes ! Autosized maximum secondary air flow for reporting
REAL(r64) :: MaxSecAirVolFlowUser ! Hardsized maximum secondary air flow for reporting
REAL(r64) :: MinPriAirFlowFracDes ! Autosized minimum primary air flow fraction for reporting
REAL(r64) :: MinPriAirFlowFracUser ! Hardsized minimum primary air flow fraction for reporting
REAL(r64) :: FanOnFlowFracDes ! Autosized fan on flow fraction for reporting
REAL(r64) :: FanOnFlowFracUser ! Hardsized fan on flow fraction 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
DesMassFlow = 0.0d0
ErrorsFound = .FALSE.
IsAutosize = .FALSE.
MaxPriAirVolFlowDes = 0.0d0
MaxPriAirVolFlowUser = 0.0d0
MaxTotAirVolFlowDes = 0.0d0
MaxTotAirVolFlowUser = 0.0d0
MaxSecAirVolFlowDes = 0.0d0
MaxSecAirVolFlowUser = 0.0d0
MinPriAirFlowFracDes = 0.0d0
MinPriAirFlowFracUser = 0.0d0
FanOnFlowFracDes = 0.0d0
FanOnFlowFracUser = 0.0d0
MaxVolHotWaterFlowDes = 0.0d0
MaxVolHotWaterFlowUser = 0.0d0
MaxVolHotSteamFlowDes = 0.0d0
MaxVolHotSteamFlowUser = 0.0d0
IF (PIU(PIUNum)%MaxPriAirVolFlow == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (PIU(PIUNum)%MaxPriAirVolFlow > 0.0d0) THEN
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'User-Specified Maximum Primary Air Flow Rate [m3/s]', PIU(PIUNum)%MaxPriAirVolFlow)
END IF
ELSE
CALL CheckZoneSizing(PIU(PIUNum)%UnitType,PIU(PIUNum)%Name)
MaxPriAirVolFlowDes = MAX(TermUnitFinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow, &
TermUnitFinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow)
IF (MaxPriAirVolFlowDes < SmallAirVolFlow) THEN
MaxPriAirVolFlowDes = 0.0d0
END IF
IF (IsAutosize) THEN
PIU(PIUNum)%MaxPriAirVolFlow = MaxPriAirVolFlowDes
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'Design Size Maximum Primary Air Flow Rate [m3/s]', MaxPriAirVolFlowDes)
ELSE
IF (PIU(PIUNum)%MaxPriAirVolFlow > 0.0d0 .AND. MaxPriAirVolFlowDes > 0.0d0) THEN
MaxPriAirVolFlowUser = PIU(PIUNum)%MaxPriAirVolFlow
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'Design Size Maximum Primary Air Flow Rate [m3/s]', MaxPriAirVolFlowDes, &
'User-Specified Maximum Primary Air Flow Rate [m3/s]', MaxPriAirVolFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxPriAirVolFlowDes - MaxPriAirVolFlowUser)/MaxPriAirVolFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizePIU: Potential issue with equipment sizing for ' &
//TRIM(PIU(PIUNum)%UnitType)//' '//TRIM(PIU(PIUNum)%Name))
CALL ShowContinueError('User-Specified Primary Air Flow Rate of '// &
TRIM(RoundSigDigits(MaxPriAirVolFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Primary Air Flow Rate of ' // &
TRIM(RoundSigDigits(MaxPriAirVolFlowDes,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 (PIU(PIUNum)%MaxTotAirVolFlow == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (PIU(PIUNum)%MaxTotAirVolFlow > 0.0d0) THEN
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'User-Specified Maximum Air Flow Rate [m3/s]', PIU(PIUNum)%MaxTotAirVolFlow)
END IF
ELSE
CALL CheckZoneSizing(PIU(PIUNum)%UnitType,PIU(PIUNum)%Name)
MaxTotAirVolFlowDes = MAX(TermUnitFinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow, &
TermUnitFinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow)
IF (MaxTotAirVolFlowDes < SmallAirVolFlow) THEN
MaxTotAirVolFlowDes = 0.0d0
END IF
IF (IsAutosize) THEN
PIU(PIUNum)%MaxTotAirVolFlow = MaxTotAirVolFlowDes
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'Design Size Maximum Air Flow Rate [m3/s]', MaxTotAirVolFlowDes)
ELSE
IF (PIU(PIUNum)%MaxTotAirVolFlow > 0.0d0 .AND. MaxTotAirVolFlowDes> 0.0d0) THEN
MaxTotAirVolFlowUser = PIU(PIUNum)%MaxTotAirVolFlow
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'Design Size Maximum Air Flow Rate [m3/s]', MaxTotAirVolFlowDes, &
'User-Specified Maximum Air Flow Rate [m3/s]', MaxTotAirVolFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxTotAirVolFlowDes - MaxTotAirVolFlowUser)/MaxTotAirVolFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizePIU: Potential issue with equipment sizing for ' &
//TRIM(PIU(PIUNum)%UnitType)//' '//TRIM(PIU(PIUNum)%Name))
CALL ShowContinueError('User-Specified Maximum Air Flow Rate of '// &
TRIM(RoundSigDigits(MaxTotAirVolFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Air Flow Rate of ' // &
TRIM(RoundSigDigits(MaxTotAirVolFlowDes,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 (PIU(PIUNum)%MaxSecAirVolFlow == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (PIU(PIUNum)%MaxSecAirVolFlow > 0.0d0) THEN
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'User-Specified Maximum Secondary Air Flow Rate [m3/s]', PIU(PIUNum)%MaxSecAirVolFlow)
END IF
ELSE
CALL CheckZoneSizing(PIU(PIUNum)%UnitType,PIU(PIUNum)%Name)
MaxSecAirVolFlowDes = MAX(TermUnitFinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow, &
TermUnitFinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow)
IF (MaxSecAirVolFlowDes < SmallAirVolFlow) THEN
MaxSecAirVolFlowDes = 0.0d0
END IF
IF (IsAutosize) THEN
PIU(PIUNum)%MaxSecAirVolFlow = MaxSecAirVolFlowDes
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'Design Size Maximum Secondary Air Flow Rate [m3/s]', MaxSecAirVolFlowDes)
ELSE
IF (PIU(PIUNum)%MaxSecAirVolFlow > 0.0d0 .AND. MaxSecAirVolFlowDes > 0.0d0) THEN
MaxSecAirVolFlowUser = PIU(PIUNum)%MaxSecAirVolFlow
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'Design Size Maximum Secondary Air Flow Rate [m3/s]', MaxSecAirVolFlowDes, &
'User-Specified Maximum Secondary Air Flow Rate [m3/s]', MaxSecAirVolFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxSecAirVolFlowDes - MaxSecAirVolFlowUser)/MaxSecAirVolFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizePIU: Potential issue with equipment sizing for ' &
//TRIM(PIU(PIUNum)%UnitType)//' '//TRIM(PIU(PIUNum)%Name))
CALL ShowContinueError('User-Specified Maximum Secondary Air Flow Rate of '// &
TRIM(RoundSigDigits(MaxSecAirVolFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Secondary Air Flow Rate of ' // &
TRIM(RoundSigDigits(MaxSecAirVolFlowDes,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 (PIU(PIUNum)%MinPriAirFlowFrac == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (PIU(PIUNum)%MinPriAirFlowFrac > 0.0d0) THEN
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'User-Specified Minimum Primary Air Flow Fraction', PIU(PIUNum)%MinPriAirFlowFrac)
END IF
ELSE
CALL CheckZoneSizing(PIU(PIUNum)%UnitType,PIU(PIUNum)%Name)
IF (PIU(PIUNum)%MaxPriAirVolFlow >= SmallAirVolFlow .AND. &
TermUnitFinalZoneSizing(CurZoneEqNum)%MinOA >= SmallAirVolFlow) THEN
MinPriAirFlowFracDes = TermUnitFinalZoneSizing(CurZoneEqNum)%MinOA / PIU(PIUNum)%MaxPriAirVolFlow
ELSE
MinPriAirFlowFracDes = 0.0d0
END IF
IF (IsAutosize) THEN
PIU(PIUNum)%MinPriAirFlowFrac = MinPriAirFlowFracDes
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'Design Size Minimum Primary Air Flow Fraction', MinPriAirFlowFracDes)
ELSE
IF (PIU(PIUNum)%MinPriAirFlowFrac > 0.0d0 .AND. MinPriAirFlowFracDes > 0.0d0) THEN
MinPriAirFlowFracUser = PIU(PIUNum)%MinPriAirFlowFrac
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'Design Size Minimum Primary Air Flow Fraction', MinPriAirFlowFracDes, &
'User-Specified Minimum Primary Air Flow Fraction', MinPriAirFlowFracUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MinPriAirFlowFracDes - MinPriAirFlowFracUser)/MinPriAirFlowFracUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizePIU: Potential issue with equipment sizing for ' &
//TRIM(PIU(PIUNum)%UnitType)//' '//TRIM(PIU(PIUNum)%Name))
CALL ShowContinueError('User-Specified Minimum Primary Air Flow Fraction of '// &
TRIM(RoundSigDigits(MinPriAirFlowFracUser,1)))
CALL ShowContinueError('differs from Design Size Minimum Primary Air Flow Fraction of ' // &
TRIM(RoundSigDigits(MinPriAirFlowFracDes,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
END IF
END IF
IF (CurZoneEqNum > 0) THEN
SELECT CASE(PIU(PIUNum)%UnitType_Num)
CASE (SingleDuct_SeriesPIU_Reheat)
TermUnitSizing(CurZoneEqNum)%AirVolFlow = PIU(PIUNum)%MaxTotAirVolFlow
CASE (SingleDuct_ParallelPIU_Reheat)
TermUnitSizing(CurZoneEqNum)%AirVolFlow = PIU(PIUNum)%MaxSecAirVolFlow + &
PIU(PIUNum)%MinPriAirFlowFrac * PIU(PIUNum)%MaxPriAirVolFlow
END SELECT
END IF
IsAutosize = .FALSE.
IF (PIU(PIUNum)%FanOnFlowFrac == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (PIU(PIUNum)%FanOnFlowFrac > 0.0d0) THEN
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'User-Specified Fan On Flow Fraction', PIU(PIUNum)%FanOnFlowFrac)
END IF
ELSE
CALL CheckZoneSizing(PIU(PIUNum)%UnitType,PIU(PIUNum)%Name)
FanOnFlowFracDes = PIU(PIUNum)%MinPriAirFlowFrac
IF (IsAutosize) THEN
PIU(PIUNum)%FanOnFlowFrac = FanOnFlowFracDes
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'Design Size Fan On Flow Fraction', FanOnFlowFracDes)
ELSE
IF (PIU(PIUNum)%FanOnFlowFrac > 0.0d0 .AND. FanOnFlowFracDes > 0.0d0) THEN
FanOnFlowFracUser = PIU(PIUNum)%FanOnFlowFrac
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'Design Size Fan On Flow Fraction', FanOnFlowFracDes, &
'User-Specified Fan On Flow Fraction', FanOnFlowFracUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(FanOnFlowFracDes - FanOnFlowFracUser)/FanOnFlowFracUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizePIU: Potential issue with equipment sizing for ' &
//TRIM(PIU(PIUNum)%UnitType)//' '//TRIM(PIU(PIUNum)%Name))
CALL ShowContinueError('User-Specified Fan On Flow Fraction of '// &
TRIM(RoundSigDigits(FanOnFlowFracUser,1)))
CALL ShowContinueError('differs from Design Size Fan On Flow Fraction of ' // &
TRIM(RoundSigDigits(FanOnFlowFracDes,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
END IF
END IF
IsAutosize = .FALSE.
IF (PIU(PIUNum)%MaxVolHotWaterFlow == AutoSize) THEN !.or.()) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (PIU(PIUNum)%MaxVolHotWaterFlow > 0.0d0) THEN
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'User-Specified Maximum Reheat Water Flow Rate [m3/s]', PIU(PIUNum)%MaxVolHotWaterFlow)
END IF
ELSE
CALL CheckZoneSizing(PIU(PIUNum)%UnitType,PIU(PIUNum)%Name)
IF (SameString(PIU(PIUNum)%HCoilType,'Coil:Heating:Water')) THEN
CoilWaterInletNode = GetCoilWaterInletNode('Coil:Heating:Water',PIU(PIUNum)%HCoil,ErrorsFound)
CoilWaterOutletNode = GetCoilWaterOutletNode('Coil:Heating:Water',PIU(PIUNum)%HCoil,ErrorsFound)
IF (IsAutosize) THEN
PltSizHeatNum = MyPlantSizingIndex('Coil:Heating:Water', PIU(PIUNum)%HCoil, CoilWaterInletNode, &
CoilWaterOutletNode, ErrorsFound)
IF (PltSizHeatNum > 0) THEN
IF (TermUnitFinalZoneSizing(CurZoneEqNum)%DesHeatMassFlow >= SmallAirVolFlow) THEN
CoilInTemp = TermUnitFinalZoneSizing(CurZoneEqNum)%DesHeatCoilInTempTU * PIU(PIUNum)%MinPriAirFlowFrac + &
TermUnitFinalZoneSizing(CurZoneEqNum)%ZoneTempAtHeatPeak * (1.0d0 - PIU(PIUNum)%MinPriAirFlowFrac)
CoilOutTemp = TermUnitFinalZoneSizing(CurZoneEqNum)%HeatDesTemp
CoilOutHumRat = TermUnitFinalZoneSizing(CurZoneEqNum)%HeatDesHumRat
DesMassFlow = StdRhoAir * TermUnitSizing(CurZoneEqNum)%AirVolFlow
DesCoilLoad = PsyCpAirFnWTdb(CoilOutHumRat, 0.5d0*(CoilInTemp+CoilOutTemp)) &
* DesMassFlow * (CoilOutTemp-CoilInTemp)
rho = GetDensityGlycol(PlantLoop(PIU(PIUNum)%HWLoopNum)%FluidName, &
60.d0, &
PlantLoop(PIU(PIUNum)%HWLoopNum)%FluidIndex, &
'SizePIU')
Cp = GetSpecificHeatGlycol(PlantLoop(PIU(PIUNum)%HWLoopNum)%FluidName, &
60.d0, &
PlantLoop(PIU(PIUNum)%HWLoopNum)%FluidIndex, &
'SizePIU')
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' // TRIM(PIU(PIUNum)%UnitType) // ' Object='//TRIM(PIU(PIUNum)%Name))
ErrorsFound = .TRUE.
END IF
END IF
IF (IsAutosize) THEN
PIU(PIUNum)%MaxVolHotWaterFlow = MaxVolHotWaterFlowDes
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'Design Size Maximum Reheat Water Flow Rate [m3/s]', MaxVolHotWaterFlowDes)
ELSE ! Hardsize with sizing data
IF (PIU(PIUNum)%MaxVolHotWaterFlow > 0.0d0 .AND. MaxVolHotWaterFlowDes > 0.0d0) THEN
MaxVolHotWaterFlowUser = PIU(PIUNum)%MaxVolHotWaterFlow
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'Design Size Maximum Reheat Water Flow Rate [m3/s]', MaxVolHotWaterFlowDes, &
'User-Specified Maximum Reheat Water Flow Rate [m3/s]', MaxVolHotWaterFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxVolHotWaterFlowDes - MaxVolHotWaterFlowUser)/MaxVolHotWaterFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizePIU: Potential issue with equipment sizing for ' &
//TRIM(PIU(PIUNum)%UnitType)//' '//TRIM(PIU(PIUNum)%Name))
CALL ShowContinueError('User-Specified Maximum Reheat Water Flow Rate of '// &
TRIM(RoundSigDigits(MaxVolHotWaterFlowUser,5))//' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Reheat Water Flow Rate 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
ELSE
PIU(PIUNum)%MaxVolHotWaterFlow = 0.0d0
END IF
END IF
END IF
IsAutosize = .FALSE.
IF (PIU(PIUNum)%MaxVolHotSteamFlow == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (PIU(PIUNum)%MaxVolHotWaterFlow > 0.0d0) THEN
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'User-Specified Maximum Reheat Steam Flow Rate [m3/s]', PIU(PIUNum)%MaxVolHotWaterFlow)
END IF
ELSE
IF (SameString(PIU(PIUNum)%HCoilType,'Coil:Heating:Steam')) THEN
CoilSteamInletNode = GetCoilSteamInletNode('Coil:Heating:Steam',PIU(PIUNum)%HCoil,ErrorsFound)
CoilSteamOutletNode = GetCoilSteamOutletNode('Coil:Heating:Steam',PIU(PIUNum)%HCoil,ErrorsFound)
IF (IsAutosize) THEN
PltSizHeatNum = MyPlantSizingIndex('Coil:Heating:Steam', PIU(PIUNum)%HCoil, CoilSteamInletNode, &
CoilSteamOutletNode, ErrorsFound)
IF (PltSizHeatNum > 0) THEN
IF (TermUnitFinalZoneSizing(CurZoneEqNum)%DesHeatMassFlow >= SmallAirVolFlow) THEN
CoilInTemp = TermUnitFinalZoneSizing(CurZoneEqNum)%DesHeatCoilInTempTU * PIU(PIUNum)%MinPriAirFlowFrac + &
TermUnitFinalZoneSizing(CurZoneEqNum)%ZoneTempAtHeatPeak * (1.0d0 - PIU(PIUNum)%MinPriAirFlowFrac)
CoilOutTemp = TermUnitFinalZoneSizing(CurZoneEqNum)%HeatDesTemp
CoilOutHumRat = TermUnitFinalZoneSizing(CurZoneEqNum)%HeatDesHumRat
DesMassFlow = StdRhoAir * TermUnitSizing(CurZoneEqNum)%AirVolFlow
DesCoilLoad = PsyCpAirFnWTdb(CoilOutHumRat, 0.5d0*(CoilInTemp+CoilOutTemp)) &
* DesMassFlow * (CoilOutTemp-CoilInTemp)
TempSteamIn= 100.00d0
EnthSteamInDry = GetSatEnthalpyRefrig('STEAM',TempSteamIn,1.0d0,PIU(PIUNum)%HCoil_FluidIndex,'SizePIU')
EnthSteamOutWet= GetSatEnthalpyRefrig('STEAM',TempSteamIn,0.0d0,PIU(PIUNum)%HCoil_FluidIndex,'SizePIU')
LatentHeatSteam=EnthSteamInDry-EnthSteamOutWet
SteamDensity=GetSatDensityRefrig('STEAM',TempSteamIn,1.0d0,PIU(PIUNum)%HCoil_FluidIndex,'SizePIU')
Cp = GetSpecificHeatGlycol('WATER', PlantSizData(PltSizHeatNum)%ExitTemp, DummyWaterIndex, 'SizePIU')
MaxVolHotSteamFlowDes = DesCoilLoad/(SteamDensity*(LatentHeatSteam + &
PlantSizData(PltSizHeatNum)%DeltaT * Cp))
ELSE
MaxVolHotSteamFlowDes = 0.0d0
END IF
ELSE
CALL ShowSevereError('Autosizing of Steam flow requires a heating loop Sizing:Plant object')
CALL ShowContinueError('Occurs in' // TRIM(PIU(PIUNum)%UnitType) // ' Object='//TRIM(PIU(PIUNum)%Name))
ErrorsFound = .TRUE.
END IF
END IF
IF (IsAutosize) THEN
PIU(PIUNum)%MaxVolHotSteamFlow = MaxVolHotSteamFlowDes
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'Design Size Maximum Reheat Steam Flow [m3/s]', MaxVolHotSteamFlowDes)
ELSE
IF (PIU(PIUNum)%MaxVolHotSteamFlow > 0.0d0 .AND. MaxVolHotSteamFlowDes > 0.0d0) THEN
MaxVolHotSteamFlowUser = PIU(PIUNum)%MaxVolHotSteamFlow
CALL ReportSizingOutput(PIU(PIUNum)%UnitType, PIU(PIUNum)%Name, &
'Design Size Maximum Reheat Steam Flow [m3/s]', MaxVolHotSteamFlowDes, &
'User-Specified Maximum Reheat Steam Flow [m3/s]', MaxVolHotSteamFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxVolHotSteamFlowDes - MaxVolHotSteamFlowUser)/MaxVolHotSteamFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizePIU: Potential issue with equipment sizing for ' &
//TRIM(PIU(PIUNum)%UnitType)//' '//TRIM(PIU(PIUNum)%Name))
CALL ShowContinueError('User-Specified Maximum Reheat Steam Flow of '// &
TRIM(RoundSigDigits(MaxVolHotSteamFlowUser,5))//' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Reheat 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
ELSE
PIU(PIUNum)%MaxVolHotSteamFlow = 0.0d0
END IF
END IF
END IF
IF (CurZoneEqNum > 0) THEN
TermUnitSizing(CurZoneEqNum)%MinFlowFrac = PIU(PIUNum)%MinPriAirFlowFrac
TermUnitSizing(CurZoneEqNum)%MaxHWVolFlow = PIU(PIUNum)%MaxVolHotWaterFlow
TermUnitSizing(CurZoneEqNum)%MaxSTVolFlow = PIU(PIUNum)%MaxVolHotSteamFlow
TermUnitSizing(CurZoneEqNum)%InducesPlenumAir = PIU(PIUNum)%InducesPlenumAir
IF (PIU(PIUNum)%HCoilType_Num == HCoilType_SimpleHeating) THEN
CALL SetCoilDesFlow(PIU(PIUNum)%HCoilType,PIU(PIUNum)%HCoil,TermUnitSizing(CurZoneEqNum)%AirVolFlow,&
ErrorsFound)
END IF
END IF
IF (ErrorsFound) THEN
CALL ShowFatalError('Preceding sizing errors cause program termination')
END IF
RETURN
END SUBROUTINE SizePIU