SUBROUTINE SizeSys(SysNum)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN September 2001
! MODIFIED August 2013 Daeho Kang, add component sizing table entries
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for sizing Sys Components 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 InputProcessor
USE WaterCoils, ONLY: SetCoilDesFlow, GetCoilWaterInletNode, GetCoilWaterOutletNode
USE SteamCoils, ONLY: GetCoilSteamInletNode, GetCoilSteamOutletNode
! USE BranchInputManager, ONLY: MyPlantSizingIndex
USE General, ONLY: SafeDivide, TrimSigDigits, RoundSigDigits
!unused USE DataHeatBalance, ONLY: Zone
USE DataGlobals, ONLY: AutoCalculate
USE ReportSizingManager, ONLY: ReportSizingOutput
USE DataPlant, ONLY: PlantLoop, MyPlantSizingIndex
USE FluidProperties, ONLY: GetDensityGlycol, GetSpecificHeatGlycol
USE General, ONLY: RoundSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: SysNum
! 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
REAL(r64) :: CoilInTemp = 0.0D0
REAL(r64) :: DesCoilLoad = 0.0D0
REAL(r64) :: DesZoneHeatLoad = 0.0D0
REAL(r64) :: ZoneDesTemp = 0.0D0
REAL(r64) :: ZoneDesHumRat = 0.0D0
REAL(r64) :: DesMassFlow
REAL(r64) :: TempSteamIn
REAL(r64) :: EnthSteamOutWet
REAL(r64) :: EnthSteamInDry
REAL(r64) :: LatentHeatSteam
REAL(r64) :: SteamDensity
INTEGER :: CoilWaterInletNode=0
INTEGER :: CoilWaterOutletNode=0
INTEGER :: CoilSteamInletNode=0
INTEGER :: CoilSteamOutletNode=0
LOGICAL :: ErrorsFound
LOGICAL :: PlantSizingErrorsFound
REAL(r64) :: rho ! local fluid density
REAL(r64) :: Cp ! local fluid specific heat
INTEGER :: DummyWaterIndex = 1
REAL(r64) :: UserInputMaxHeatAirVolFlowRate = 0.0D0 ! user input for MaxHeatAirVolFlowRate
LOGICAL :: IsAutosize
REAL(r64) :: MaxAirVolFlowRateDes ! Autosized maximum air flow rate for reporting
REAL(r64) :: MaxAirVolFlowRateUser ! Hardsized maximum air flow rate for reporting
REAL(r64) :: MaxHeatAirVolFlowRateDes ! Autosized maximum heating air flow rate for reporting
REAL(r64) :: MaxHeatAirVolFlowRateUser ! Hardsized maximum heating air flow rate for reporting
REAL(r64) :: MaxAirVolFlowRateDuringReheatDes ! Autosized maximum air flow durign reheat for reporting
REAL(r64) :: MaxAirVolFlowRateDuringReheatUser ! Hardsized maximum air flow durign reheat for reporting
REAL(r64) :: MaxAirVolFractionDuringReheatDes ! Autosized maximum air fraction durign reheat for reporting
REAL(r64) :: MaxAirVolFractionDuringReheatUser ! Hardsized maximum air flow durign reheat for reporting
REAL(r64) :: MaxReheatWaterVolFlowDes ! Autosized reheat water flow or reporting
REAL(r64) :: MaxReheatWaterVolFlowUser ! Hardsized reheat water flow for reporting
REAL(r64) :: MaxReheatSteamVolFlowDes ! Autosized reheat steam flow for reporting
REAL(r64) :: MaxReheatSteamVolFlowUser ! Hardsized reheat steam flow for reporting
PltSizHeatNum = 0
DesMassFlow = 0.0D0
ErrorsFound = .FALSE.
IsAutosize = .FALSE.
MaxAirVolFlowRateDes = 0.0d0
MaxAirVolFlowRateUser = 0.0d0
MaxHeatAirVolFlowRateDes = 0.0d0
MaxHeatAirVolFlowRateUser = 0.0d0
MaxAirVolFlowRateDuringReheatDes = 0.0d0
MaxAirVolFlowRateDuringReheatUser = 0.0d0
MaxAirVolFractionDuringReheatDes = 0.0d0
MaxAirVolFractionDuringReheatUser = 0.0d0
MaxReheatWaterVolFlowDes = 0.0d0
MaxReheatWaterVolFlowUser = 0.0d0
MaxReheatSteamVolFlowDes = 0.0d0
MaxReheatSteamVolFlowUser = 0.0d0
IF (Sys(SysNum)%MaxAirVolFlowRate == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! simulation continue
IF (Sys(SysNum)%MaxAirVolFlowRate > 0.0d0) THEN
CALL ReportSizingOutput(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
'User-Specified Maximum Air Flow Rate [m3/s]', Sys(SysNum)%MaxAirVolFlowRate)
END IF
ELSE ! Autosize or hard-size with sizing run
CALL CheckZoneSizing(Sys(SysNum)%SysType, Sys(SysNum)%SysName)
MaxAirVolFlowRateDes = MAX(TermUnitFinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow, &
TermUnitFinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow)
IF (MaxAirVolFlowRateDes < SmallAirVolFlow) THEN
MaxAirVolFlowRateDes = 0.0D0
END IF
IF (IsAutosize) THEN
Sys(SysNum)%MaxAirVolFlowRate = MaxAirVolFlowRateDes
CALL ReportSizingOutput(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
'Design Size Maximum Air Flow Rate [m3/s]', MaxAirVolFlowRateDes)
ELSE ! Hard-size with sizing data
IF (Sys(SysNum)%MaxAirVolFlowRate > 0.0d0 .AND. MaxAirVolFlowRateDes > 0.0d0) THEN
MaxAirVolFlowRateUser = Sys(SysNum)%MaxAirVolFlowRate
CALL ReportSizingOutput(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
'Design Size Maximum Air Flow Rate [m3/s]', MaxAirVolFlowRateDes, &
'User-Specified Maximum Air Flow Rate [m3/s]', MaxAirVolFlowRateUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxAirVolFlowRateDes - MaxAirVolFlowRateUser)/MaxAirVolFlowRateUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeHVACSingleDuct: Potential issue with equipment sizing for '// &
TRIM(Sys(SysNum)%SysType)//' = "'//TRIM(Sys(SysNum)%SysName)//'".')
CALL ShowContinueError('User-Specified Maximum Air Flow Rate of '// &
TRIM(RoundSigDigits(MaxAirVolFlowRateUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Air Flow Rate of ' // &
TRIM(RoundSigDigits(MaxAirVolFlowRateDes,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 (Sys(SysNum)%MaxHeatAirVolFlowRate == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! simulation should continue
UserInputMaxHeatAirVolFlowRate = Sys(SysNum)%MaxHeatAirVolFlowRate
IF (Sys(SysNum)%MaxHeatAirVolFlowRate > 0.d0) THEN
CALL ReportSizingOutput(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
'User-Specified Maximum Heating Air Flow Rate [m3/s]', Sys(SysNum)%MaxHeatAirVolFlowRate)
END IF
ELSE
CALL CheckZoneSizing(Sys(SysNum)%SysType, Sys(SysNum)%SysName)
MaxHeatAirVolFlowRateDes = TermUnitFinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow
IF (MaxHeatAirVolFlowRateDes < SmallAirVolFlow) THEN
MaxHeatAirVolFlowRateDes = 0.0D0
END IF
IF (IsAutosize) THEN
Sys(SysNum)%MaxHeatAirVolFlowRate = MaxHeatAirVolFlowRateDes
UserInputMaxHeatAirVolFlowRate = 0.0D0
CALL ReportSizingOutput(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
'Design Size Maximum Heating Air Flow Rate [m3/s]', MaxHeatAirVolFlowRateDes)
ELSE ! Hard-size with sizing data
IF (Sys(SysNum)%MaxHeatAirVolFlowRate > 0.0d0 .AND. MaxHeatAirVolFlowRateDes > 0.0d0) THEN
MaxHeatAirVolFlowRateUser = Sys(SysNum)%MaxHeatAirVolFlowRate
UserInputMaxHeatAirVolFlowRate = Sys(SysNum)%MaxHeatAirVolFlowRate
CALL ReportSizingOutput(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
'Design Size Maximum Heating Air Flow Rate [m3/s]', MaxHeatAirVolFlowRateDes, &
'User-Specified Maximum Heating Air Flow Rate [m3/s]', MaxHeatAirVolFlowRateUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxHeatAirVolFlowRateDes - MaxHeatAirVolFlowRateUser)/MaxHeatAirVolFlowRateUser ) &
> AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeHVACSingleDuct: Potential issue with equipment sizing for '// &
TRIM(Sys(SysNum)%SysType)//' = "'//TRIM(Sys(SysNum)%SysName)//'".')
CALL ShowContinueError('User-Specified Maximum Heating Air Flow Rate of '// &
TRIM(RoundSigDigits(MaxHeatAirVolFlowRateUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Heating Air Flow Rate of ' // &
TRIM(RoundSigDigits(MaxHeatAirVolFlowRateDes,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
IF (Sys(SysNum)%ZoneMinAirFracMethod == ScheduledMinFrac) Then
! need a value for sizing.
IF (Sys(SysNum)%ConstantMinAirFracSetByUser) THEN
Sys(SysNum)%ZoneMinAirFrac = Sys(SysNum)%DesignMinAirFrac
! if both inputs are defined, use the max
IF(Sys(SysNum)%FixedMinAirSetByUser) THEN
Sys(SysNum)%ZoneMinAirFrac = &
MIN(1.0d0,MAX(Sys(SysNum)%ZoneMinAirFrac,SafeDivide(Sys(SysNum)%DesignFixedMinAir,Sys(SysNum)%MaxAirVolFlowRate)))
ENDIF
! if only fixed is defined, use the value
ELSEIF(Sys(SysNum)%FixedMinAirSetByUser) THEN
Sys(SysNum)%ZoneMinAirFrac = &
MIN(1.0d0,SafeDivide(Sys(SysNum)%DesignFixedMinAir,Sys(SysNum)%MaxAirVolFlowRate))
ELSE
!use an average of min and max in schedule
Sys(SysNum)%ZoneMinAirFrac = (GetScheduleMinValue(Sys(SysNum)%ZoneMinAirFracSchPtr) &
+ GetScheduleMaxValue(Sys(SysNum)%ZoneMinAirFracSchPtr)) &
/ 2.0D0
ENDIF
ENDIF
IF (Sys(SysNum)%ZoneMinAirFracMethod == FixedMin) THEN
! need a value for sizing.
Sys(SysNum)%ZoneMinAirFrac = &
MIN(1.0d0,SafeDivide(Sys(SysNum)%DesignFixedMinAir,Sys(SysNum)%MaxAirVolFlowRate))
END IF
IsAutosize = .FALSE.
IF(Sys(SysNum)%MaxAirVolFlowRateDuringReheat == Autocalculate)THEN
IsAutosize = .TRUE.
END IF
MaxAirVolFlowRateDuringReheatDes = MIN(0.002032D0*Sys(SysNum)%ZoneFloorArea, &
Sys(SysNum)%MaxAirVolFlowRate)
! apply limit based on min stop
MaxAirVolFlowRateDuringReheatDes = MAX(MaxAirVolFlowRateDuringReheatDes, &
(Sys(SysNum)%MaxAirVolFlowRate * Sys(SysNum)%ZoneMinAirFrac) )
IF (IsAutosize) THEN
Sys(SysNum)%MaxAirVolFlowRateDuringReheat = MaxAirVolFlowRateDuringReheatDes
CALL ReportSizingOutput(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
'Design Size Maximum Flow per Zone Floor Area during Reheat [m3/s-m2]', &
MaxAirVolFlowRateDuringReheatDes/Sys(SysNum)%ZoneFloorArea)
ELSE ! Hard size with sizing data
IF (Sys(SysNum)%MaxAirVolFlowRateDuringReheat > 0.0d0 .AND. MaxAirVolFlowRateDuringReheatDes > 0.0d0 ) THEN
MaxAirVolFlowRateDuringReheatUser = Sys(SysNum)%MaxAirVolFlowRateDuringReheat
CALL ReportSizingOutput(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
'Design Size Maximum Flow per Zone Floor Area during Reheat [m3/s-m2]', &
MaxAirVolFlowRateDuringReheatDes/Sys(SysNum)%ZoneFloorArea, &
'User-Specified Maximum Flow per Zone Floor Area during Reheat [m3/s-m2]', &
MaxAirVolFlowRateDuringReheatUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxAirVolFlowRateDuringReheatDes - MaxAirVolFlowRateDuringReheatUser)/MaxAirVolFlowRateDuringReheatUser) &
> AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeHVACSingleDuct: Potential issue with equipment sizing for '// &
TRIM(Sys(SysNum)%SysType)//' = "'//TRIM(Sys(SysNum)%SysName)//'".')
CALL ShowContinueError('User-Specified Maximum Flow per Zone Floor Area during Reheat of '// &
TRIM(RoundSigDigits(MaxAirVolFlowRateDuringReheatUser,5))// ' [m3/s-m2]')
CALL ShowContinueError('differs from Design Size Maximum Flow per Zone Floor Area during Reheat of ' // &
TRIM(RoundSigDigits(MaxAirVolFlowRateDuringReheatDes,5))// ' [m3/s-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(Sys(SysNum)%MaxAirVolFractionDuringReheat == Autocalculate)THEN
IsAutosize = .TRUE.
END IF
IF(Sys(SysNum)%MaxAirVolFlowRate .GT. 0.0D0)THEN
MaxAirVolFractionDuringReheatDes = MIN(1.0D0,(0.002032D0*Sys(SysNum)%ZoneFloorArea/ &
Sys(SysNum)%MaxAirVolFlowRate))
! apply limit based on min stop
MaxAirVolFractionDuringReheatDes = MAX(MaxAirVolFractionDuringReheatDes, &
Sys(SysNum)%ZoneMinAirFrac )
ELSE
MaxAirVolFractionDuringReheatDes = 0.0D0
END IF
IF (IsAutosize) THEN
Sys(SysNum)%MaxAirVolFractionDuringReheat = MaxAirVolFractionDuringReheatDes
CALL ReportSizingOutput(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
'Design Size Maximum Flow Fraction during Reheat []', MaxAirVolFractionDuringReheatDes)
ELSE
IF (Sys(SysNum)%MaxAirVolFractionDuringReheat > 0.0d0 .AND. MaxAirVolFractionDuringReheatDes > 0.0d0) THEN
MaxAirVolFractionDuringReheatUser = Sys(SysNum)%MaxAirVolFractionDuringReheat
CALL ReportSizingOutput(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
'Design Size Maximum Flow Fraction during Reheat []', MaxAirVolFractionDuringReheatDes, &
'User-Specified Maximum Flow Fraction during Reheat []',MaxAirVolFractionDuringReheatUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxAirVolFractionDuringReheatDes - MaxAirVolFractionDuringReheatUser)/MaxAirVolFractionDuringReheatUser) &
> AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeHVACSingleDuct: Potential issue with equipment sizing for '// &
TRIM(Sys(SysNum)%SysType)//' = "'//TRIM(Sys(SysNum)%SysName)//'".')
CALL ShowContinueError('User-Specified Maximum Flow Fraction during Reheat of '// &
TRIM(RoundSigDigits(MaxAirVolFractionDuringReheatUser,5))// ' []')
CALL ShowContinueError('differs from Design Size Maximum Flow Fraction during Reheat of ' // &
TRIM(RoundSigDigits(MaxAirVolFractionDuringReheatDes,5))// ' []')
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
! use the larger of the two reheat flow rate methods for the simulated maximum flow during reheat
Sys(SysNum)%MaxAirVolFlowRateDuringReheat = MAX(Sys(SysNum)%MaxAirVolFlowRateDuringReheat, &
Sys(SysNum)%MaxAirVolFractionDuringReheat * Sys(SysNum)%MaxAirVolFlowRate)
Sys(SysNum)%MaxAirVolFlowRateDuringReheat = MIN(Sys(SysNum)%MaxAirVolFlowRateDuringReheat,Sys(SysNum)%MaxAirVolFlowRate)
IF (CurZoneEqNum > 0) THEN
TermUnitSizing(CurZoneEqNum)%ReheatAirFlowMult = 1.0D0
TermUnitSizing(CurZoneEqNum)%ReheatLoadMult = 1.0d0
IF (ZoneSizingRunDone) THEN
IF (Sys(SysNum)%SysType_Num == SingleDuctVAVReheatVSFan) THEN
TermUnitSizing(CurZoneEqNum)%AirVolFlow = MAX(UserInputMaxHeatAirVolFlowRate, &
CalcFinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow * &
CalcFinalZoneSizing(CurZoneEqNum)%HeatSizingFactor, &
Sys(SysNum)%MaxAirVolFlowRate * Sys(SysNum)%ZoneMinAirFrac)
ELSE
TermUnitSizing(CurZoneEqNum)%AirVolFlow = MAX(CalcFinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow * &
CalcFinalZoneSizing(CurZoneEqNum)%HeatSizingFactor, &
Sys(SysNum)%MaxAirVolFlowRate * Sys(SysNum)%ZoneMinAirFrac)
END IF
ELSE
IF (Sys(SysNum)%SysType_Num == SingleDuctVAVReheatVSFan) THEN
TermUnitSizing(CurZoneEqNum)%AirVolFlow = MAX(Sys(SysNum)%MaxHeatAirVolFlowRate, &
Sys(SysNum)%MaxAirVolFlowRate * Sys(SysNum)%ZoneMinAirFrac)
ELSE IF (Sys(SysNum)%SysType_Num == SingleDuctConstVolReheat) THEN
TermUnitSizing(CurZoneEqNum)%AirVolFlow = Sys(SysNum)%MaxAirVolFlowRate
ELSE
IF (Sys(SysNum)%DamperHeatingAction == ReverseAction) THEN
IF (Sys(SysNum)%MaxAirVolFlowRateDuringReheat > 0.0D0) THEN
TermUnitSizing(CurZoneEqNum)%AirVolFlow = MAX(Sys(SysNum)%MaxAirVolFlowRateDuringReheat, &
(Sys(SysNum)%MaxAirVolFlowRate * Sys(SysNum)%ZoneMinAirFrac) )
ELSE
TermUnitSizing(CurZoneEqNum)%AirVolFlow = Sys(SysNum)%MaxAirVolFlowRate
END IF
ELSE
TermUnitSizing(CurZoneEqNum)%AirVolFlow = Sys(SysNum)%MaxAirVolFlowRate * Sys(SysNum)%ZoneMinAirFrac
END IF
END IF
END IF
IF (TermUnitSizing(CurZoneEqNum)%AirVolFlow > SmallAirVolFlow) THEN
IF (Sys(SysNum)%DamperHeatingAction == ReverseAction .AND. Sys(SysNum)%MaxAirVolFlowRateDuringReheat > 0.0D0) THEN
TermUnitSizing(CurZoneEqNum)%ReheatAirFlowMult = MIN(Sys(SysNum)%MaxAirVolFlowRateDuringReheat, &
Sys(SysNum)%MaxAirVolFlowRate ) &
/ TermUnitSizing(CurZoneEqNum)%AirVolFlow
TermUnitSizing(CurZoneEqNum)%ReheatLoadMult = TermUnitSizing(CurZoneEqNum)%ReheatAirFlowMult
ELSEIF (Sys(SysNum)%DamperHeatingAction == ReverseAction .AND. Sys(SysNum)%MaxAirVolFlowRateDuringReheat == 0.0D0) THEN
TermUnitSizing(CurZoneEqNum)%ReheatAirFlowMult = Sys(SysNum)%MaxAirVolFlowRate / TermUnitSizing(CurZoneEqNum)%AirVolFlow
TermUnitSizing(CurZoneEqNum)%ReheatLoadMult = TermUnitSizing(CurZoneEqNum)%ReheatAirFlowMult
ELSEIF (Sys(SysNum)%DamperHeatingAction == Normal .AND. Sys(SysNum)%MaxAirVolFlowRateDuringReheat > 0.0D0) THEN
TermUnitSizing(CurZoneEqNum)%ReheatAirFlowMult = MIN(Sys(SysNum)%MaxAirVolFlowRateDuringReheat, &
(Sys(SysNum)%MaxAirVolFlowRate * Sys(SysNum)%ZoneMinAirFrac) ) &
/ TermUnitSizing(CurZoneEqNum)%AirVolFlow
TermUnitSizing(CurZoneEqNum)%ReheatLoadMult = 1.0d0
ELSEIF (Sys(SysNum)%DamperHeatingAction == Normal .AND. Sys(SysNum)%MaxAirVolFlowRateDuringReheat == 0.0D0) THEN
TermUnitSizing(CurZoneEqNum)%ReheatAirFlowMult = (Sys(SysNum)%MaxAirVolFlowRate * Sys(SysNum)%ZoneMinAirFrac) &
/ TermUnitSizing(CurZoneEqNum)%AirVolFlow
TermUnitSizing(CurZoneEqNum)%ReheatLoadMult = 1.0D0
ELSE
TermUnitSizing(CurZoneEqNum)%ReheatAirFlowMult = Sys(SysNum)%MaxAirVolFlowRate / TermUnitSizing(CurZoneEqNum)%AirVolFlow
TermUnitSizing(CurZoneEqNum)%ReheatLoadMult = TermUnitSizing(CurZoneEqNum)%ReheatAirFlowMult
END IF
TermUnitSizing(CurZoneEqNum)%ReheatAirFlowMult = MAX(1.0D0, TermUnitSizing(CurZoneEqNum)%ReheatAirFlowMult)
TermUnitSizing(CurZoneEqNum)%ReheatLoadMult = MAX(1.0D0, TermUnitSizing(CurZoneEqNum)%ReheatLoadMult )
ELSE
TermUnitSizing(CurZoneEqNum)%ReheatAirFlowMult = 1.0D0
TermUnitSizing(CurZoneEqNum)%ReheatLoadMult = 1.0D0
END IF
END IF
IsAutosize = .FALSE.
IF (Sys(SysNum)%MaxReheatWaterVolFlow == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN
IF (Sys(SysNum)%MaxReheatWaterVolFlow > 0.0d0) THEN
CALL ReportSizingOutput(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
'User-Specified Maximum Reheat Water Flow Rate [m3/s]', Sys(SysNum)%MaxReheatWaterVolFlow)
END IF
ELSE
CALL CheckZoneSizing(Sys(SysNum)%SysType, Sys(SysNum)%SysName)
IF (SameString(Sys(SysNum)%ReheatComp,'Coil:Heating:Water')) THEN
CoilWaterInletNode = GetCoilWaterInletNode('Coil:Heating:Water',Sys(SysNum)%ReheatName,ErrorsFound)
CoilWaterOutletNode = GetCoilWaterOutletNode('Coil:Heating:Water',Sys(SysNum)%ReheatName,ErrorsFound)
IF (IsAutosize) THEN
PlantSizingErrorsFound = .FALSE.
PltSizHeatNum = MyPlantSizingIndex('Coil:Heating:Water', Sys(SysNum)%ReheatName, CoilWaterInletNode, &
CoilWaterOutletNode, PlantSizingErrorsFound)
IF(PlantSizingErrorsFound)THEN
CALL ShowContinueError('...Occurs in '//TRIM(Sys(SysNum)%SysType)//':'//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.TRUE.
END IF
IF (PltSizHeatNum > 0) THEN
CoilInTemp = TermUnitFinalZoneSizing(CurZoneEqNum)%DesHeatCoilInTempTU
DesMassFlow = StdRhoAir * &
TermUnitSizing(CurZoneEqNum)%AirVolFlow
DesZoneHeatLoad = CalcFinalZoneSizing(CurZoneEqNum)%DesHeatLoad * CalcFinalZoneSizing(CurZoneEqNum)%HeatSizingFactor
ZoneDesTemp = CalcFinalZoneSizing(CurZoneEqNum)%ZoneTempAtHeatPeak
ZoneDesHumRat = CalcFinalZoneSizing(CurZoneEqNum)%ZoneHumRatAtHeatPeak
! the coil load is the zone design heating load plus (or minus!) the reheat load
DesCoilLoad = DesZoneHeatLoad + PsyCpAirFnWTdb(ZoneDesHumRat, 0.5d0*(CoilInTemp+ZoneDesTemp)) &
* DesMassFlow * (ZoneDesTemp-CoilInTemp)
IF (DesCoilLoad >= SmallLoad) THEN
rho = GetDensityGlycol(PlantLoop(Sys(SysNum)%HWLoopNum)%FluidName, &
60.d0, &
PlantLoop(Sys(SysNum)%HWLoopNum)%FluidIndex, &
'SizeSys')
Cp = GetSpecificHeatGlycol(PlantLoop(Sys(SysNum)%HWLoopNum)%FluidName, &
60.d0, &
PlantLoop(Sys(SysNum)%HWLoopNum)%FluidIndex, &
'SizeSys')
MaxReheatWaterVolFlowDes = DesCoilLoad / &
( PlantSizData(PltSizHeatNum)%DeltaT * &
Cp * rho )
ELSE
MaxReheatWaterVolFlowDes = 0.0D0
END IF
ELSE
CALL ShowSevereError('Autosizing of water flow requires a heating loop Sizing:Plant object')
CALL ShowContinueError('Occurs in AirTerminal Object='//TRIM(Sys(SysNum)%SysName))
Errorsfound = .TRUE.
END IF
END IF
IF (IsAutosize) THEN
Sys(SysNum)%MaxReheatWaterVolFlow = MaxReheatWaterVolFlowDes
CALL ReportSizingOutput(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
'Design Size Maximum Reheat Water Flow Rate [m3/s]', MaxReheatWaterVolFlowDes)
CALL ReportSizingOutput(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
'Design Size Reheat Coil Sizing Air Volume Flow Rate [m3/s]', &
TermUnitSizing(CurZoneEqNum)%AirVolFlow)
ELSE ! Hard-size with sizing data
IF (Sys(SysNum)%MaxReheatWaterVolFlow > 0.0d0 .AND. MaxReheatWaterVolFlowDes > 0.0d0) THEN
MaxReheatWaterVolFlowUser = Sys(SysNum)%MaxReheatWaterVolFlow
CALL ReportSizingOutput(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
'Design Size Maximum Reheat Water Flow Rate [m3/s]', MaxReheatWaterVolFlowDes, &
'User-Specified Maximum Reheat Water Flow Rate [m3/s]', MaxReheatWaterVolFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxReheatWaterVolFlowDes - MaxReheatWaterVolFlowUser)/MaxReheatWaterVolFlowUser) &
> AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeHVACSingleDuct: Potential issue with equipment sizing for '// &
TRIM(Sys(SysNum)%SysType)//' = "'//TRIM(Sys(SysNum)%SysName)//'".')
CALL ShowContinueError('User-Specified Maximum Reheat Water Flow Rate of '// &
TRIM(RoundSigDigits(MaxReheatWaterVolFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Reheat Water Flow Rate of ' // &
TRIM(RoundSigDigits(MaxReheatWaterVolFlowDes,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
Sys(SysNum)%MaxReheatWaterVolFlow = 0.0D0
END IF
IsAutosize = .FALSE.
IF (Sys(SysNum)%MaxReheatSteamVolFlow == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN
IF (Sys(SysNum)%MaxReheatSteamVolFlow > 0.0d0) THEN
CALL ReportSizingOutput(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
'User-Specified Maximum Reheat Steam Flow Rate [m3/s]', Sys(SysNum)%MaxReheatSteamVolFlow)
END IF
ELSE
CALL CheckZoneSizing(Sys(SysNum)%SysType, Sys(SysNum)%SysName)
IF (SameString(Sys(SysNum)%ReheatComp,'Coil:Heating:Steam')) THEN
CoilSteamInletNode = GetCoilSteamInletNode('Coil:Heating:Steam',Sys(SysNum)%ReheatName,ErrorsFound)
CoilSteamOutletNode = GetCoilSteamOutletNode('Coil:Heating:Steam',Sys(SysNum)%ReheatName,ErrorsFound)
IF (IsAutosize) THEN
PlantSizingErrorsFound = .FALSE.
PltSizHeatNum = MyPlantSizingIndex('Coil:Heating:Steam', Sys(SysNum)%ReheatName, CoilSteamInletNode, &
CoilSteamOutletNode, PlantSizingErrorsFound)
IF(PlantSizingErrorsFound)THEN
CALL ShowContinueError('...Occurs in '//TRIM(Sys(SysNum)%SysType)//':'//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.TRUE.
END IF
IF (PltSizHeatNum > 0) THEN
CoilInTemp = TermUnitFinalZoneSizing(CurZoneEqNum)%DesHeatCoilInTempTU
DesMassFlow = StdRhoAir * TermUnitSizing(CurZoneEqNum)%AirVolFlow
DesZoneHeatLoad = CalcFinalZoneSizing(CurZoneEqNum)%DesHeatLoad * CalcFinalZoneSizing(CurZoneEqNum)%HeatSizingFactor
ZoneDesTemp = CalcFinalZoneSizing(CurZoneEqNum)%ZoneTempAtHeatPeak
ZoneDesHumRat = CalcFinalZoneSizing(CurZoneEqNum)%ZoneHumRatAtHeatPeak
! the coil load is the zone design heating load plus (or minus!) the reheat load
DesCoilLoad = DesZoneHeatLoad + PsyCpAirFnWTdb(ZoneDesHumRat, 0.5d0*(CoilInTemp+ZoneDesTemp)) &
* DesMassFlow * (ZoneDesTemp-CoilInTemp)
IF (DesCoilLoad >= SmallLoad) THEN
TempSteamIn= 100.00d0
EnthSteamInDry = GetSatEnthalpyRefrig('STEAM',TempSteamIn,1.0d0,Sys(SysNum)%FluidIndex,'SizeHVACSingleDuct')
EnthSteamOutWet= GetSatEnthalpyRefrig('STEAM',TempSteamIn,0.0d0,Sys(SysNum)%FluidIndex,'SizeHVACSingleDuct')
LatentHeatSteam=EnthSteamInDry-EnthSteamOutWet
SteamDensity=GetSatDensityRefrig('STEAM',TempSteamIn,1.0d0,Sys(SysNum)%FluidIndex,'SizeHVACSingleDuct')
Cp = GetSpecificHeatGlycol('WATER', &
PlantSizData(PltSizHeatNum)%ExitTemp, &
DummyWaterIndex, &
'SizeSys')
MaxReheatSteamVolFlowDes = DesCoilLoad /(SteamDensity*(LatentHeatSteam + &
PlantSizData(PltSizHeatNum)%DeltaT * Cp ))
ELSE
MaxReheatSteamVolFlowDes = 0.0D0
END IF
ELSE
CALL ShowSevereError('Autosizing of Steam flow requires a heating loop Sizing:Plant object')
CALL ShowContinueError('Occurs in AirTerminal:SingleDuct:ConstantVolume:Reheat Object='//TRIM(Sys(SysNum)%SysName))
Errorsfound = .TRUE.
END IF
END IF
IF (IsAutosize) THEN
Sys(SysNum)%MaxReheatSteamVolFlow = MaxReheatSteamVolFlowDes
CALL ReportSizingOutput(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
'Design Size Maximum Reheat Steam Flow Rate [m3/s]', MaxReheatSteamVolFlowDes)
ELSE
IF (Sys(SysNum)%MaxReheatSteamVolFlow > 0.0d0 .AND. MaxReheatSteamVolFlowDes > 0.0d0) THEN
MaxReheatSteamVolFlowUser = Sys(SysNum)%MaxReheatSteamVolFlow
CALL ReportSizingOutput(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
'Design Size Maximum Reheat Steam Flow Rate [m3/s]', MaxReheatSteamVolFlowDes, &
'User-Specified Maximum Reheat Steam Flow Rate [m3/s]', MaxReheatSteamVolFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxReheatSteamVolFlowDes - MaxReheatSteamVolFlowUser)/MaxReheatSteamVolFlowUser) &
> AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeHVACSingleDuct: Potential issue with equipment sizing for '// &
TRIM(Sys(SysNum)%SysType)//' = "'//TRIM(Sys(SysNum)%SysName)//'".')
CALL ShowContinueError('User-Specified Maximum Reheat Steam Flow Rate of '// &
TRIM(RoundSigDigits(MaxReheatSteamVolFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Reheat Steam Flow Rate of ' // &
TRIM(RoundSigDigits(MaxReheatSteamVolFlowDes,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
Sys(SysNum)%MaxReheatSteamVolFlow = 0.0D0
END IF
IF (CurZoneEqNum > 0) THEN
TermUnitSizing(CurZoneEqNum)%MinFlowFrac = Sys(SysNum)%ZoneMinAirFrac
TermUnitSizing(CurZoneEqNum)%MaxHWVolFlow = Sys(SysNum)%MaxReheatWaterVolFlow
TermUnitSizing(CurZoneEqNum)%MaxSTVolFlow = Sys(SysNum)%MaxReheatSteamVolFlow
IF (Sys(SysNum)%ReheatComp_Num == HCoilType_SimpleHeating) THEN
IF (Sys(SysNum)%DamperHeatingAction == Normal) THEN
CALL SetCoilDesFlow(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,Sys(SysNum)%ZoneMinAirFrac*Sys(SysNum)%MaxAirVolFlowRate,&
ErrorsFound)
ELSE
CALL SetCoilDesFlow(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,TermUnitSizing(CurZoneEqNum)%AirVolFlow,&
ErrorsFound)
END IF
END IF
END IF
IF (Sys(SysNum)%MaxAirVolFlowRateDuringReheat > 0.0D0) THEN
! check for inconsistent dual max input
IF (Sys(SysNum)%MaxAirVolFlowRateDuringReheat < (Sys(SysNum)%ZoneMinAirFrac * Sys(SysNum)%MaxAirVolFlowRate) ) THEN
! Only warn when really out of bounds
IF ((Sys(SysNum)%ZoneMinAirFrac*Sys(SysNum)%MaxAirVolFlowRate)-Sys(SysNum)%MaxAirVolFlowRateDuringReheat > 1.d-8) THEN
CALL ShowWarningError('SingleDuctSystem:SizeSys: Air Terminal Unit flow limits are not consistent, '// &
'minimum flow limit is larger than reheat maximum')
CALL ShowContinueError('Air Terminal Unit name = '//TRIM(Sys(SysNum)%SysName))
CALL ShowContinueError('Maximum terminal flow during reheat = ' &
//TRIM(RoundSigDigits(Sys(SysNum)%MaxAirVolFlowRateDuringReheat, 6))//' [m3/s] or flow fraction = ' &
//TRIM(RoundSigDigits((Sys(SysNum)%MaxAirVolFlowRateDuringReheat/Sys(SysNum)%MaxAirVolFlowRate ),4)) )
CALL ShowContinueError('Minimum terminal flow = ' &
//TRIM(RoundSigDigits((Sys(SysNum)%ZoneMinAirFrac * Sys(SysNum)%MaxAirVolFlowRate), 6))// &
' [m3/s] or flow fraction = '&
//TRIM(RoundSigDigits(Sys(SysNum)%ZoneMinAirFrac,4)) )
CALL ShowContinueError('The reheat maximum flow limit will be replaced by the minimum limit, and the simulation continues')
ENDIF
Sys(SysNum)%MaxAirVolFlowRateDuringReheat = (Sys(SysNum)%ZoneMinAirFrac * Sys(SysNum)%MaxAirVolFlowRate)
ENDIF
ENDIF
IF (ErrorsFound) THEN
CALL ShowFatalError('Preceding sizing errors cause program termination')
END IF
RETURN
END SUBROUTINE SizeSys