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) | :: | UnitVentNum |
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 SizeUnitVentilator(UnitVentNum)
! 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 Ventilator 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 General, ONLY: TrimSigDigits, RoundSigDigits
USE WaterCoils, ONLY: SetCoilDesFlow, GetCoilWaterInletNode, GetCoilWaterOutletNode
USE SteamCoils, ONLY: GetCoilSteamInletNode, GetCoilSteamOutletNode
USE HVACHXAssistedCoolingCoil, ONLY: GetHXDXCoilName, GetHXCoilType
! USE BranchInputManager, ONLY: MyPlantSizingIndex
USE FluidProperties, ONLY: GetSpecificHeatGlycol, GetDensityGlycol
USE DataPlant, ONLY: PlantLoop, MyPlantSizingIndex
USE ReportSizingManager, ONLY: ReportSizingOutput
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
Integer, Intent(IN) :: UnitVentNum
! 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
INTEGER :: PltSizCoolNum ! index of plant sizing object for 1st cooling loop
LOGICAL :: ErrorsFound
REAL(r64) :: CoilInTemp
REAL(r64) :: CoilOutTemp
REAL(r64) :: CoilOutHumRat
REAL(r64) :: CoilInHumRat
REAL(r64) :: CoilInEnthalpy
REAL(r64) :: CoilOutEnthalpy
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
CHARACTER(len=MaxNameLength) :: CoolingCoilName
CHARACTER(len=MaxNameLength) :: CoolingCoilType
REAL(r64) :: rho
REAL(r64) :: Cp
INTEGER :: DummyWaterIndex = 1
LOGICAL :: IsAutosize ! Index to autosize
REAL(r64) :: MaxAirVolFlowDes ! Autosized maximum air flow for reporting
REAL(r64) :: MaxAirVolFlowUser ! Hardsized maximum air flow for reporting
REAL(r64) :: OutAirVolFlowDes ! Autosized outdoor air flow for reporting
REAL(r64) :: OutAirVolFlowUser ! Hardsized outdoor air flow for reporting
REAL(r64) :: MinOutAirVolFlowDes ! Autosized minimum outdoor air flow for reporting
REAL(r64) :: MinOutAirVolFlowUser ! Hardsized minimum outdoor air flow for reporting
REAL(r64) :: MaxVolHotWaterFlowDes ! Autosized maximum water flow for reporting
REAL(r64) :: MaxVolHotWaterFlowUser ! Hardsized maximum water flow for reporting
REAL(r64) :: MaxVolHotSteamFlowDes ! Autosized maximum steam flow for reporting
REAL(r64) :: MaxVolHotSteamFlowUser ! Hardsized maximum steam flow for reporting
REAL(r64) :: MaxVolColdWaterFlowDes ! Autosized maximum chilled water flow for reporting
REAL(r64) :: MaxVolColdWaterFlowUser ! Hardsized maximum chilled water flow for reporting
PltSizHeatNum = 0
ErrorsFound = .FALSE.
IsAutosize = .FALSE.
MaxAirVolFlowDes = 0.0d0
MaxAirVolFlowUser = 0.0d0
OutAirVolFlowDes = 0.0d0
OutAirVolFlowUser = 0.0d0
MinOutAirVolFlowDes = 0.0d0
MinOutAirVolFlowUser = 0.0d0
MaxVolHotWaterFlowDes = 0.0d0
MaxVolHotWaterFlowUser = 0.0d0
MaxVolHotSteamFlowDes = 0.0d0
MaxVolHotSteamFlowUser = 0.0d0
MaxVolColdWaterFlowDes = 0.0d0
MaxVolColdWaterFlowUser = 0.0d0
IF (UnitVent(UnitVentNum)%MaxAirVolFlow == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (UnitVent(UnitVentNum)%MaxAirVolFlow > 0.0d0) THEN
CALL ReportSizingOutput(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name, &
'User-Specified Maximum Supply Air Flow Rate [m3/s]', UnitVent(UnitVentNum)%MaxAirVolFlow)
END IF
ELSE
CALL CheckZoneSizing(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name)
IF (UnitVent(UnitVentNum)%CoilOption == BothOption) THEN
MaxAirVolFlowDes = MAX(FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow, &
FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow)
ELSEIF (UnitVent(UnitVentNum)%CoilOption == HeatingOption) THEN
MaxAirVolFlowDes = FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow
ELSEIF (UnitVent(UnitVentNum)%CoilOption == CoolingOption) THEN
MaxAirVolFlowDes = FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow
ELSEIF (UnitVent(UnitVentNum)%CoilOption == NoneOption) THEN
MaxAirVolFlowDes = FinalZoneSizing(CurZoneEqNum)%MinOA
END IF
IF (MaxAirVolFlowDes < SmallAirVolFlow) THEN
MaxAirVolFlowDes = 0.0d0
END IF
IF (IsAutosize) THEN
UnitVent(UnitVentNum)%MaxAirVolFlow = MaxAirVolFlowDes
CALL ReportSizingOutput(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name, &
'Design Size Maximum Supply Air Flow Rate [m3/s]', MaxAirVolFlowDes)
ELSE
IF (UnitVent(UnitVentNum)%MaxAirVolFlow > 0.0d0 .AND. MaxAirVolFlowDes > 0.0d0 ) THEN
MaxAirVolFlowUser = UnitVent(UnitVentNum)%MaxAirVolFlow
CALL ReportSizingOutput(cMO_UnitVentilator, UnitVent(UnitVentNum)%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('SizeUnitVentilator: Potential issue with equipment sizing for ' &
//TRIM(cMO_UnitVentilator)//' '//TRIM(UnitVent(UnitVentNum)%Name))
CALL ShowContinueError('User-Specified Maximum Supply Air Flow Rate of '// &
TRIM(RoundSigDigits(MaxAirVolFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Supply Air 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
END IF
IsAutosize = .FALSE.
IF (UnitVent(UnitVentNum)%OutAirVolFlow == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (UnitVent(UnitVentNum)%OutAirVolFlow > 0.0d0) THEN
CALL ReportSizingOutput(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name, &
'User-Specified Maximum Outdoor Air Flow Rate [m3/s]', UnitVent(UnitVentNum)%OutAirVolFlow)
END IF
ELSE
CALL CheckZoneSizing(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name)
OutAirVolFlowDes = UnitVent(UnitVentNum)%MaxAirVolFlow
IF (IsAutosize) THEN
UnitVent(UnitVentNum)%OutAirVolFlow = OutAirVolFlowDes
CALL ReportSizingOutput(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name, &
'Design Size Maximum Outdoor Air Flow Rate [m3/s]', OutAirVolFlowDes)
ELSE
IF (UnitVent(UnitVentNum)%OutAirVolFlow > 0.0d0 .AND. OutAirVolFlowDes > 0.0d0) THEN
OutAirVolFlowUser = UnitVent(UnitVentNum)%OutAirVolFlow
CALL ReportSizingOutput(cMO_UnitVentilator, UnitVent(UnitVentNum)%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('SizeUnitVentilator: Potential issue with equipment sizing for ' &
//TRIM(cMO_UnitVentilator)//' '//TRIM(UnitVent(UnitVentNum)%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 (UnitVent(UnitVentNum)%MinOutAirVolFlow == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (UnitVent(UnitVentNum)%MinOutAirVolFlow > 0.0d0) THEN
CALL ReportSizingOutput(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name, &
'User-Specified Minimum Outdoor Air Flow Rate [m3/s]', UnitVent(UnitVentNum)%MinOutAirVolFlow)
END IF
ELSE
CALL CheckZoneSizing(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name)
MinOutAirVolFlowDes = MIN(FinalZoneSizing(CurZoneEqNum)%MinOA, &
UnitVent(UnitVentNum)%MaxAirVolFlow)
IF (MinOutAirVolFlowDes < SmallAirVolFlow) THEN
MinOutAirVolFlowDes = 0.0d0
END IF
IF (IsAutosize) THEN
UnitVent(UnitVentNum)%MinOutAirVolFlow = MinOutAirVolFlowDes
CALL ReportSizingOutput(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name, &
'Design Size Minimum Outdoor Air Flow Rate [m3/s]', MinOutAirVolFlowDes)
ELSE
IF (UnitVent(UnitVentNum)%MinOutAirVolFlow > 0.0d0 .AND. MinOutAirVolFlowDes > 0.0d0) THEN
MinOutAirVolFlowUser = UnitVent(UnitVentNum)%MinOutAirVolFlow
CALL ReportSizingOutput(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name, &
'Design Size Minimum Outdoor Air Flow Rate [m3/s]', MinOutAirVolFlowDes, &
'User-Specified Minimum Outdoor Air Flow Rate [m3/s]', MinOutAirVolFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MinOutAirVolFlowDes - MinOutAirVolFlowUser)/MinOutAirVolFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeUnitVentilator: Potential issue with equipment sizing for ' &
//TRIM(cMO_UnitVentilator)//' '//TRIM(UnitVent(UnitVentNum)%Name))
CALL ShowContinueError('User-Specified Minimum Outdoor Air Flow Rate of '// &
TRIM(RoundSigDigits(MinOutAirVolFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Minimum Outdoor Air Flow Rate of ' // &
TRIM(RoundSigDigits(MinOutAirVolFlowDes,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 (UnitVent(UnitVentNum)%MaxVolHotWaterFlow==AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (UnitVent(UnitVentNum)%HCoilType == Heating_WaterCoilType) THEN
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (UnitVent(UnitVentNum)%MaxVolHotWaterFlow > 0.0d0) THEN
CALL ReportSizingOutput(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name, &
'User-Specified Maximum Hot Water Flow [m3/s]', UnitVent(UnitVentNum)%MaxVolHotWaterFlow)
END IF
ELSE
CALL CheckZoneSizing(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name)
CoilWaterInletNode = GetCoilWaterInletNode('Coil:Heating:Water',UnitVent(UnitVentNum)%HCoilName,ErrorsFound)
CoilWaterOutletNode = GetCoilWaterOutletNode('Coil:Heating:Water',UnitVent(UnitVentNum)%HCoilName,ErrorsFound)
IF (IsAutosize) THEN
PltSizHeatNum = MyPlantSizingIndex('Coil:Heating:Water', UnitVent(UnitVentNum)%HCoilName, CoilWaterInletNode, &
CoilWaterOutletNode, ErrorsFound)
IF (PltSizHeatNum > 0) THEN
IF (FinalZoneSizing(CurZoneEqNum)%DesHeatMassFlow >= SmallAirVolFlow) THEN
CoilInTemp = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInTemp
CoilOutTemp = FinalZoneSizing(CurZoneEqNum)%HeatDesTemp
CoilOutHumRat = FinalZoneSizing(CurZoneEqNum)%HeatDesHumRat
DesCoilLoad = PsyCpAirFnWTdb(CoilOutHumRat, 0.5d0*(CoilInTemp+CoilOutTemp)) &
* FinalZoneSizing(CurZoneEqNum)%DesHeatMassFlow &
* (CoilOutTemp-CoilInTemp)
rho = GetDensityGlycol(PlantLoop(UnitVent(UnitVentNum)%HWLoopNum)%FluidName, &
60.d0, &
PlantLoop(UnitVent(UnitVentNum)%HWLoopNum)%FluidIndex, &
'SizeUnitVentilator')
Cp = GetSpecificHeatGlycol(PlantLoop(UnitVent(UnitVentNum)%HWLoopNum)%FluidName, &
60.d0, &
PlantLoop(UnitVent(UnitVentNum)%HWLoopNum)%FluidIndex, &
'SizeUnitVentilator')
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 ' // cMO_UnitVentilator // ' Object=' &
//TRIM(UnitVent(UnitVentNum)%Name))
ErrorsFound = .TRUE.
END IF
END IF
IF (IsAutosize) THEN
UnitVent(UnitVentNum)%MaxVolHotWaterFlow = MaxVolHotWaterFlowDes
CALL ReportSizingOutput(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name, &
'Design Size Maximum Hot Water Flow [m3/s]', MaxVolHotWaterFlowDes)
ELSE
IF (UnitVent(UnitVentNum)%MaxVolHotWaterFlow > 0.0d0 .AND. MaxVolHotWaterFlowDes > 0.0d0) THEN
MaxVolHotWaterFlowUser = UnitVent(UnitVentNum)%MaxVolHotWaterFlow
CALL ReportSizingOutput(cMO_UnitVentilator, UnitVent(UnitVentNum)%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('SizeUnitVentilator: Potential issue with equipment sizing for ' &
//TRIM(cMO_UnitVentilator)//' '//TRIM(UnitVent(UnitVentNum)%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
UnitVent(UnitVentNum)%MaxVolHotWaterFlow = 0.0d0
END IF
IsAutosize = .FALSE.
IF (UnitVent(UnitVentNum)%MaxVolHotSteamFlow==AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF(UnitVent(UnitVentNum)%HCoilType == Heating_SteamCoilType) THEN
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (UnitVent(UnitVentNum)%MaxVolHotSteamFlow > 0.0d0) THEN
CALL ReportSizingOutput(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name, &
'User-Specified Maximum Steam Flow [m3/s]', UnitVent(UnitVentNum)%MaxVolHotSteamFlow)
END IF
ELSE
CALL CheckZoneSizing(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name)
CoilSteamInletNode = GetCoilSteamInletNode('Coil:Heating:Steam',UnitVent(UnitVentNum)%HCoilName,ErrorsFound)
CoilSteamOutletNode = GetCoilSteamInletNode('Coil:Heating:Steam',UnitVent(UnitVentNum)%HCoilName,ErrorsFound)
IF (IsAutosize) THEN
PltSizHeatNum = MyPlantSizingIndex('Coil:Heating:Steam', UnitVent(UnitVentNum)%HCoilName, CoilSteamInletNode, &
CoilSteamOutletNode, ErrorsFound)
IF (PltSizHeatNum > 0) THEN
IF (FinalZoneSizing(CurZoneEqNum)%DesHeatMassFlow >= SmallAirVolFlow) THEN
CoilInTemp = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInTemp
CoilOutTemp = FinalZoneSizing(CurZoneEqNum)%HeatDesTemp
CoilOutHumRat = FinalZoneSizing(CurZoneEqNum)%HeatDesHumRat
DesCoilLoad = PsyCpAirFnWTdb(CoilOutHumRat, 0.5d0*(CoilInTemp+CoilOutTemp)) &
* FinalZoneSizing(CurZoneEqNum)%DesHeatMassFlow &
* (CoilOutTemp-CoilInTemp)
TempSteamIn= 100.00d0
EnthSteamInDry = GetSatEnthalpyRefrig('STEAM',TempSteamIn,1.0d0,RefrigIndex,'SizeUnitVentilator')
EnthSteamOutWet= GetSatEnthalpyRefrig('STEAM',TempSteamIn,0.0d0,RefrigIndex,'SizeUnitVentilator')
LatentHeatSteam=EnthSteamInDry-EnthSteamOutWet
SteamDensity=GetSatDensityRefrig('STEAM',TempSteamIn,1.0d0,RefrigIndex,'SizeUnitVentilator')
Cp = GetSpecificHeatGlycol('WATER', PlantSizData(PltSizHeatNum)%ExitTemp, DummyWaterIndex, 'SizeUnitVentilator')
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 ' // cMO_UnitVentilator // ' Object=' &
//TRIM(UnitVent(UnitVentNum)%Name))
ErrorsFound = .TRUE.
END IF
END IF
IF (IsAutosize) THEN
UnitVent(UnitVentNum)%MaxVolHotSteamFlow = MaxVolHotSteamFlowDes
CALL ReportSizingOutput(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name, &
'Design Size Maximum Steam Flow [m3/s]', MaxVolHotSteamFlowDes)
ELSE
IF (UnitVent(UnitVentNum)%MaxVolHotSteamFlow > 0.0d0 .AND. MaxVolHotSteamFlowDes > 0.0d0) THEN
MaxVolHotSteamFlowUser = UnitVent(UnitVentNum)%MaxVolHotSteamFlow
CALL ReportSizingOutput(cMO_UnitVentilator, UnitVent(UnitVentNum)%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('SizeUnitVentilator: Potential issue with equipment sizing for ' &
//TRIM(cMO_UnitVentilator)//' '//TRIM(UnitVent(UnitVentNum)%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
UnitVent(UnitVentNum)%MaxVolHotSteamFlow = 0.0d0
END IF
IsAutosize = .FALSE.
IF (UnitVent(UnitVentNum)%MaxVolColdWaterFlow == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (UnitVent(UnitVentNum)%CCoilType == Cooling_CoilWaterCooling .OR. &
UnitVent(UnitVentNum)%CCoilType == Cooling_CoilDetailedCooling .OR. &
UnitVent(UnitVentNum)%CCoilType == Cooling_CoilHXAssisted) THEN
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (UnitVent(UnitVentNum)%MaxVolColdWaterFlow > 0.0d0) THEN
CALL ReportSizingOutput(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name, &
'User-Specified Maximum Cold Water Flow [m3/s]', UnitVent(UnitVentNum)%MaxVolColdWaterFlow)
END IF
ELSE
CALL CheckZoneSizing(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name)
IF (UnitVent(UnitVentNum)%CCoilType == Cooling_CoilHXAssisted) THEN
CoolingCoilName = GetHXDXCoilName(UnitVent(UnitVentNum)%CCoilTypeCh,UnitVent(UnitVentNum)%CCoilName,ErrorsFound)
CoolingCoilType = GetHXCoilType(UnitVent(UnitVentNum)%CCoilTypeCh,UnitVent(UnitVentNum)%CCoilName,ErrorsFound)
ELSE
CoolingCoilName = UnitVent(UnitVentNum)%CCoilName
CoolingCoilType = UnitVent(UnitVentNum)%CCoilTypeCh
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
IF (FinalZoneSizing(CurZoneEqNum)%DesCoolMassFlow >= SmallAirVolFlow) THEN
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))
rho = GetDensityGlycol(PlantLoop(UnitVent(UnitVentNum)%CWLoopNum)%FluidName, &
5.d0, &
PlantLoop(UnitVent(UnitVentNum)%CWLoopNum)%FluidIndex, &
'SizeUnitVentilator')
Cp = GetSpecificHeatGlycol(PlantLoop(UnitVent(UnitVentNum)%CWLoopNum)%FluidName, &
5.d0, &
PlantLoop(UnitVent(UnitVentNum)%CWLoopNum)%FluidIndex, &
'SizeUnitVentilator')
MaxVolColdWaterFlowDes = DesCoilLoad / &
( PlantSizData(PltSizCoolNum)%DeltaT * &
Cp * rho )
IF(MaxVolColdWaterFlowDes .LT. 0.d0)THEN
CALL ShowWarningError('Autosizing of water flow resulted in negative value.')
CALL ShowContinueError('Occurs in ' // cMO_UnitVentilator // ' Object=' &
//TRIM(UnitVent(UnitVentNum)%Name))
CALL ShowContinueError('...Sizing information found during sizing simulation:')
CALL ShowContinueError('...Coil inlet temperature = '//TRIM(TrimSigDigits(CoilInTemp,3))//' C')
CALL ShowContinueError('...Coil inlet humidity ratio = '//TRIM(TrimSigDigits(CoilInHumRat,6))//' kg/kg')
CoilInEnthalpy = PsyHFnTdbW(CoilInTemp, CoilInHumRat)
CALL ShowContinueError('...Coil inlet enthalpy = '//TRIM(TrimSigDigits(CoilInEnthalpy,3))//' J/kg')
CALL ShowContinueError('...Sizing information from sizing object:')
CALL ShowContinueError('...Coil outlet temperature = '//TRIM(TrimSigDigits(CoilOutTemp,3))//' C')
CALL ShowContinueError('...Coil outlet humidity ratio = '//TRIM(TrimSigDigits(CoilOutHumRat,6))//' kg/kg')
CoilOutEnthalpy = PsyHFnTdbW(CoilOutTemp, CoilOutHumRat)
CALL ShowContinueError('...Coil outlet enthalpy = '//TRIM(TrimSigDigits(CoilOutEnthalpy,3))//' J/kg')
IF(CoilOutEnthalpy .GT. CoilInEnthalpy)THEN
CALL ShowContinueError('...Coil outlet air enthalpy is greater than coil inlet air enthalpy.')
END IF
CALL ShowContinueError('...Calculated coil design load = '//TRIM(TrimSigDigits(DesCoilLoad,3))//' W')
CALL ShowContinueError('...Calculated water flow rate = '// &
TRIM(TrimSigDigits(MaxVolColdWaterFlowDes,3))//' m3/s')
CALL ShowContinueError('...Water flow rate will be set to 0. Check sizing inputs for zone and plant,'// &
' inputs for water cooling coil object, and design day specifications.')
CALL ShowContinueError('...Consider autosizing all inputs if not already doing so.')
MaxVolColdWaterFlowDes = 0.0d0
END IF
ELSE
MaxVolColdWaterFlowDes = 0.0d0
END IF
ELSE
CALL ShowSevereError('Autosizing of water flow requires a cooling loop Sizing:Plant object')
CALL ShowContinueError('Occurs in ' // cMO_UnitVentilator // ' Object=' &
//TRIM(UnitVent(UnitVentNum)%Name))
Errorsfound = .TRUE.
END IF
END IF
IF (IsAutosize) THEN
UnitVent(UnitVentNum)%MaxVolColdWaterFlow = MaxVolColdWaterFlowDes
CALL ReportSizingOutput(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name, &
'Design Size Maximum Cold Water Flow [m3/s]', MaxVolColdWaterFlowDes)
ELSE
IF (UnitVent(UnitVentNum)%MaxVolColdWaterFlow > 0.0d0 .AND. MaxVolColdWaterFlowDes > 0.0d0) THEN
MaxVolColdWaterFlowUser = UnitVent(UnitVentNum)%MaxVolColdWaterFlow
CALL ReportSizingOutput(cMO_UnitVentilator, UnitVent(UnitVentNum)%Name, &
'Design Size Maximum Cold Water Flow [m3/s]', MaxVolColdWaterFlowDes, &
'User-Specified Maximum Cold Water Flow [m3/s]', MaxVolColdWaterFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxVolColdWaterFlowDes - MaxVolColdWaterFlowUser)/MaxVolColdWaterFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeUnitVentilator: Potential issue with equipment sizing for ' &
//TRIM(cMO_UnitVentilator)//' '//TRIM(UnitVent(UnitVentNum)%Name))
CALL ShowContinueError('User-Specified Maximum Cold Water Flow of '// &
TRIM(RoundSigDigits(MaxVolColdWaterFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Cold Water Flow of ' // &
TRIM(RoundSigDigits(MaxVolColdWaterFlowDes,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
END IF
! set the design air flow rates for the heating and cooling coils
IF (UnitVent(UnitVentNum)%CCoilType == Cooling_CoilHXAssisted) THEN
CoolingCoilName = GetHXDXCoilName(UnitVent(UnitVentNum)%CCoilTypeCh,UnitVent(UnitVentNum)%CCoilName,ErrorsFound)
CoolingCoilType = GetHXCoilType(UnitVent(UnitVentNum)%CCoilTypeCh,UnitVent(UnitVentNum)%CCoilName,ErrorsFound)
ELSE
CoolingCoilName = UnitVent(UnitVentNum)%CCoilName
CoolingCoilType = UnitVent(UnitVentNum)%CCoilTypeCh
END IF
CALL SetCoilDesFlow(CoolingCoilType,CoolingCoilName,UnitVent(UnitVentNum)%MaxAirVolFlow,&
ErrorsFound)
CALL SetCoilDesFlow(UnitVent(UnitVentNum)%HCoilTypeCh,UnitVent(UnitVentNum)%HCoilName,UnitVent(UnitVentNum)%MaxAirVolFlow,&
ErrorsFound)
IF (ErrorsFound) THEN
CALL ShowFatalError('Preceding sizing errors cause program termination')
END IF
RETURN
END SUBROUTINE SizeUnitVentilator