SUBROUTINE SizeOutdoorAirUnit(OAUnitNum)
! SUBROUTINE INFORMATION:
! AUTHOR Young Tae Chae, Rick Strand
! DATE WRITTEN July 2009
! MODIFIED Brent Griffith, March 2010, autosize OA flow rate
! August 2013 Daeho Kang, add component sizing table entries
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for sizing zoen outdoor air control unit 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 HVACHXAssistedCoolingCoil, ONLY: GetHXDXCoilName, GetHXCoilType
! USE BranchInputManager, ONLY: MyPlantSizingIndex
USE DataEnvironment, ONLY: StdRhoAir
USE FluidProperties, ONLY: GetSpecificHeatGlycol, GetDensityGlycol
USE DataPlant, ONLY: PlantLoop, MyPlantSizingIndex
USE DataHVACGlobals, ONLY: cFanTypes
USE ReportSizingManager, ONLY: ReportSizingOutput
USE Fans, ONLY: SetFanData
USE General, ONLY: RoundSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
Integer, Intent(IN) :: OAUnitNum
! 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) :: DesCoilLoad
REAL(r64) :: TempSteamIn
REAL(r64) :: EnthSteamInDry
REAL(r64) :: EnthSteamOutWet
REAL(r64) :: LatentHeatSteam
REAL(r64) :: SteamDensity
REAL(r64) :: RhoAir
REAL(r64) :: SizeAirMassFlow
INTEGER :: CoilWaterInletNode=0
INTEGER :: CoilWaterOutletNode=0
INTEGER :: CoilSteamInletNode=0
INTEGER :: CoilSteamOutletNode=0
CHARACTER(len=MaxNameLength) :: CoolingCoilName
CHARACTER(len=MaxNameLength) :: CoolingCoilType
INTEGER :: SizeComp
INTEGER :: CompNum
INTEGER :: ComponentType_Num
REAL(r64) :: rho
REAL(r64) :: Cp
INTEGER :: DummyWaterIndex = 1
LOGICAL :: IsAutosize ! Indicator to autosize
REAL(r64) :: OutAirVolFlowDes ! Autosized outdoor air flow for reporting
REAL(r64) :: OutAirVolFlowUser ! Hardsized outdoor air flow for reporting
REAL(r64) :: ExtAirVolFlowDes ! Autosized exhaust air flow for reporting
REAL(r64) :: ExtAirVolFlowUser ! Hardsized exhaust air flow for reporting
REAL(r64) :: MaxVolWaterFlowDes ! Autosized maximum water flow for reporting
REAL(r64) :: MaxVolWaterFlowUser ! Hardsized maximum water flow for reporting
PltSizCoolNum = 0
PltSizHeatNum = 0
ErrorsFound = .FALSE.
RhoAir = StdRhoAir
IsAutosize = .FALSE.
OutAirVolFlowDes = 0.0d0
OutAirVolFlowUser = 0.0d0
ExtAirVolFlowDes = 0.0d0
ExtAirVolFlowUser = 0.0d0
MaxVolWaterFlowDes = 0.0d0
MaxVolWaterFlowUser = 0.0d0
IF (OutAirUnit(OAUnitNum)%OutAirVolFlow == AutoSize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (OutAirUnit(OAUnitNum)%OutAirVolFlow > 0.0d0) THEN
CALL ReportSizingOutput(CurrentModuleObjects(1), OutAirUnit(OAUnitNum)%Name, &
'User-Specified Outdoor Air Flow Rate [m3/s]', OutAirUnit(OAUnitNum)%OutAirVolFlow)
CALL ReportSizingOutput(TRIM(cFanTypes(OutAirUnit(OAUnitNum)%SFanType)), OutAirUnit(OAUnitNum)%SFanName, &
'User-Specified Maximum Outdoor Air Flow Rate [m3/s]', OutAirUnit(OAUnitNum)%OutAirVolFlow)
END IF
ELSE
CALL CheckZoneSizing(CurrentModuleObjects(1), OutAirUnit(OAUnitNum)%Name)
OutAirVolFlowDes = FinalZoneSizing(CurZoneEqNum)%MinOA
IF (OutAirVolFlowDes < SmallAirVolFlow) THEN
OutAirVolFlowDes = 0.0D0
ENDIF
IF (IsAutosize) THEN
OutAirUnit(OAUnitNum)%OutAirVolFlow = OutAirVolFlowDes
CALL ReportSizingOutput(CurrentModuleObjects(1), OutAirUnit(OAUnitNum)%Name, &
'Design Size Outdoor Air Flow Rate [m3/s]', OutAirVolFlowDes)
CALL SetFanData(OutAirUnit(OAUnitNum)%SFan_Index, ErrorsFound, OutAirUnit(OAUnitNum)%SFanName, &
MaxAirVolFlow = OutAirUnit(OAUnitNum)%OutAirVolFlow, &
MinAirVolFlow = 0.d0)
CALL ReportSizingOutput(cFanTypes(OutAirUnit(OAUnitNum)%SFanType), OutAirUnit(OAUnitNum)%SFanName, &
'Design Size Maximum Outdoor Air Flow Rate [m3/s]', OutAirVolFlowDes)
ELSE
IF (OutAirUnit(OAUnitNum)%OutAirVolFlow > 0.0d0 .AND. OutAirVolFlowDes > 0.0d0) THEN
OutAirVolFlowUser = OutAirUnit(OAUnitNum)%OutAirVolFlow
CALL ReportSizingOutput(CurrentModuleObjects(1), OutAirUnit(OAUnitNum)%Name, &
'Design Size Outdoor Air Flow Rate [m3/s]', OutAirVolFlowDes, &
'User-Specified Outdoor Air Flow Rate [m3/s]', OutAirVolFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(OutAirVolFlowDes - OutAirVolFlowUser)/OutAirVolFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeOutdoorAirUnit: Potential issue with equipment sizing for ZoneHVAC:OutdoorAirUnit ' &
//TRIM(OutAirUnit(OAUnitNum)%Name))
CALL ShowContinueError('User-Specified Outdoor Air Flow Rate of '// &
TRIM(RoundSigDigits(OutAirVolFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size 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
CALL ReportSizingOutput(cFanTypes(OutAirUnit(OAUnitNum)%SFanType), OutAirUnit(OAUnitNum)%SFanName, &
'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('SizeOutdoorAirUnit: Potential issue with equipment sizing for ZoneHVAC:OutdoorAirUnit ' &
//TRIM(cFanTypes(OutAirUnit(OAUnitNum)%SFanType))//' '// &
TRIM(OutAirUnit(OAUnitNum)%SFanName))
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
ENDIF
ENDIF
IsAutosize = .FALSE.
IF (OutAirUnit(OAUnitNum)%ExtAirVolFlow == Autosize) THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (OutAirUnit(OAUnitNum)%ExtAirVolFlow > 0.0d0) THEN
CALL ReportSizingOutput(CurrentModuleObjects(1), OutAirUnit(OAUnitNum)%Name, &
'User-Specified Exhaust Air Flow Rate [m3/s]', OutAirUnit(OAUnitNum)%ExtAirVolFlow)
CALL ReportSizingOutput(TRIM(cFanTypes(OutAirUnit(OAUnitNum)%ExtFanType)), OutAirUnit(OAUnitNum)%ExtFanName, &
'User-Specified Maximum Exhaust Air Flow Rate [m3/s]', OutAirUnit(OAUnitNum)%ExtAirVolFlow)
END IF
ELSE
! set exhaust flow equal to the oa inlet flow
ExtAirVolFlowDes = OutAirUnit(OAUnitNum)%OutAirVolFlow
IF (IsAutosize) THEN
OutAirUnit(OAUnitNum)%ExtAirVolFlow = ExtAirVolFlowDes
CALL ReportSizingOutput(CurrentModuleObjects(1), OutAirUnit(OAUnitNum)%Name, &
'Design Size Exhaust Air Flow Rate [m3/s]', ExtAirVolFlowDes)
CALL SetFanData(OutAirUnit(OAUnitNum)%ExtFan_Index, ErrorsFound, OutAirUnit(OAUnitNum)%ExtFanName, &
MaxAirVolFlow = ExtAirVolFlowDes, &
MinAirVolFlow = 0.d0)
CALL ReportSizingOutput(TRIM(cFanTypes(OutAirUnit(OAUnitNum)%ExtFanType)), OutAirUnit(OAUnitNum)%ExtFanName, &
'Design Size Maximum Exhaust Air Flow Rate [m3/s]', ExtAirVolFlowDes)
ELSE
IF (OutAirUnit(OAUnitNum)%ExtAirVolFlow > 0.0d0 .AND. ExtAirVolFlowDes > 0.0d0) THEN
ExtAirVolFlowUser = OutAirUnit(OAUnitNum)%ExtAirVolFlow
CALL ReportSizingOutput(CurrentModuleObjects(1), OutAirUnit(OAUnitNum)%Name, &
'Design Size Exhaust Air Flow Rate [m3/s]', ExtAirVolFlowDes, &
'User-Specified Exhaust Air Flow Rate [m3/s]', ExtAirVolFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(ExtAirVolFlowDes - ExtAirVolFlowUser)/ExtAirVolFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeOutdoorAirUnit: Potential issue with equipment sizing for ZoneHVAC:OutdoorAirUnit ' &
//TRIM(OutAirUnit(OAUnitNum)%Name))
CALL ShowContinueError('User-Specified Exhaust Air Flow Rate of '// &
TRIM(RoundSigDigits(ExtAirVolFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Exhaust Air Flow Rate of ' // &
TRIM(RoundSigDigits(ExtAirVolFlowDes,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
CALL ReportSizingOutput(TRIM(cFanTypes(OutAirUnit(OAUnitNum)%ExtFanType)), OutAirUnit(OAUnitNum)%ExtFanName, &
'Design Size Maximum Exhaust Air Flow Rate [m3/s]', ExtAirVolFlowDes, &
'User-Specified Maximum Exhaust Air Flow Rate [m3/s]', ExtAirVolFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(ExtAirVolFlowDes - ExtAirVolFlowUser)/ExtAirVolFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeOutdoorAirUnit: Potential issue with equipment sizing for ZoneHVAC:OutdoorAirUnit ' &
//TRIM(cFanTypes(OutAirUnit(OAUnitNum)%SFanType))//' '// &
TRIM(OutAirUnit(OAUnitNum)%SFanName))
CALL ShowContinueError('User-Specified Maximum Exhaust Air Flow Rate of '// &
TRIM(RoundSigDigits(ExtAirVolFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Exhaust Air Flow Rate of ' // &
TRIM(RoundSigDigits(ExtAirVolFlowDes,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
! air mass flow of unit component sizing is set by input
SizeAirMassFlow=RhoAir*OutAirUnit(OAUnitNum)%OutAirVolFlow
SizeComp=OAUnitNum
DO SizeComp=1,NumofOAUnits
DO CompNum=1,OutAirUnit(OAUnitNum)%NumComponents
IsAutosize = .FALSE.
SELECT CASE(MakeUPPERCase(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType))
! Coil Types
CASE('COIL:COOLING:WATER')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= WaterCoil_Cooling
IF ((OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow==AutoSize))THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow > 0.0d0) THEN
CALL ReportSizingOutput('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name, &
'User-Specified Maximum Cold Water Flow [m3/s]', &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow)
END IF
ELSE
CALL CheckZoneSizing('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name)
CoolingCoilName = OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName
CoolingCoilType = OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType
CoilWaterInletNode = OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilWaterInletNode
CoilWaterOutletNode = OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilWaterOutletNode
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))
DesCoilLoad = MAX(0.d0, DesCoilLoad)
rho = GetDensityGlycol(PlantLoop(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%LoopNum )%fluidName, &
5.d0, &
PlantLoop( OutAirUnit(OAUnitNum)%OAEquip(CompNum)%LoopNum )%fluidIndex, &
'SizeOutdoorAirUnit' )
Cp = GetSpecificHeatGlycol(PlantLoop(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%LoopNum )%fluidName, &
5.d0, &
PlantLoop(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%LoopNum )%fluidIndex, &
'SizeOutdoorAirUnit' )
MaxVolWaterFlowDes = DesCoilLoad / &
( PlantSizData(PltSizCoolNum)%DeltaT * &
Cp * rho )
ELSE
MaxVolWaterFlowDes = 0.0d0
END IF
ELSE
CALL ShowSevereError('Autosizing of water flow requires a Sizing:Zone object '// &
'or a cooling loop Sizing:Plant object')
CALL ShowContinueError('Occurs in ' // 'ZoneHVAC:OutdoorAirUnit' // ' Object=' &
//TRIM(OutAirUnit(OAUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
END IF
IF (IsAutosize) THEN
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow = MaxVolWaterFlowDes
CALL ReportSizingOutput('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name, &
'Design Size Maximum Cold Water Flow [m3/s]', MaxVolWaterFlowDes)
ELSE
IF (OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow > 0.0d0 .AND. MaxVolWaterFlowDes > 0.0d0) THEN
MaxVolWaterFlowUser = OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow
CALL ReportSizingOutput('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name, &
'Design Size Maximum Cold Water Flow [m3/s]', MaxVolWaterFlowDes, &
'User-Specified Maximum Cold Water Flow [m3/s]', MaxVolWaterFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxVolWaterFlowDes - MaxVolWaterFlowUser)/MaxVolWaterFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeOutdoorAirUnit: Potential issue with equipment sizing for ZoneHVAC:OutdoorAirUnit ' &
//TRIM(OutAirUnit(OAUnitNum)%Name))
CALL ShowContinueError('User-Specified Maximum Cold Water Flow of '// &
TRIM(RoundSigDigits(MaxVolWaterFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Cold Water Flow of ' // &
TRIM(RoundSigDigits(MaxVolWaterFlowDes,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
! CALL SetCoilDesFlow(CoolingCoilType,CoolingCoilName,OutAirUnit(OAUnitNum)%OutAirVolFlow,&
! ErrorsFound)
CASE('COIL:HEATING:WATER')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= WaterCoil_SimpleHeat
IF ((OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow==AutoSize))THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow > 0.0d0) THEN
CALL ReportSizingOutput('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name, &
'User-Specified Maximum Hot Water Flow [m3/s]', &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow)
END IF
ELSE
CALL CheckZoneSizing('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name)
CoilWaterInletNode = OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilWaterInletNode
CoilWaterOutletNode = OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilWaterOutletNode
IF (IsAutosize) THEN
PltSizHeatNum = MyPlantSizingIndex('Coil:Heating:Water', OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName, &
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)
DesCoilLoad = MAX(0.d0, DesCoilLoad)
rho = GetDensityGlycol(PlantLoop(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%LoopNum )%fluidName, &
60.d0, &
PlantLoop( OutAirUnit(OAUnitNum)%OAEquip(CompNum)%LoopNum )%fluidIndex, &
'SizeOutdoorAirUnit' )
Cp = GetSpecificHeatGlycol(PlantLoop(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%LoopNum )%fluidName, &
60.d0, &
PlantLoop( OutAirUnit(OAUnitNum)%OAEquip(CompNum)%LoopNum )%fluidIndex, &
'SizeOutdoorAirUnit' )
MaxVolWaterFlowDes = DesCoilLoad / &
(PlantSizData(PltSizHeatNum)%DeltaT * &
Cp * rho )
ELSE
MaxVolWaterFlowDes = 0.0d0
END IF
ELSE
CALL ShowSevereError('Autosizing of water flow requires a Sizing:Zone object '// &
'or a heating loop Sizing:Plant object')
CALL ShowContinueError('Occurs in ' // 'ZoneHVAC:OutdoorAirUnit' // ' Object=' &
//TRIM(OutAirUnit(OAUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
END IF
IF (IsAutosize) THEN
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow = MaxVolWaterFlowDes
CALL ReportSizingOutput('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name, &
'Design Size Maximum Hot Water Flow [m3/s]', MaxVolWaterFlowDes)
ELSE
IF (OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow > 0.0d0 .AND. MaxVolWaterFlowDes > 0.0d0) THEN
MaxVolWaterFlowUser = OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow
CALL ReportSizingOutput('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name, &
'Design Size Maximum Hot Water Flow [m3/s]', MaxVolWaterFlowDes, &
'User-Specified Maximum Hot Water Flow [m3/s]', MaxVolWaterFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxVolWaterFlowDes - MaxVolWaterFlowUser)/MaxVolWaterFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeOutdoorAirUnit: Potential issue with equipment sizing for ZoneHVAC:OutdoorAirUnit ' &
//TRIM(OutAirUnit(OAUnitNum)%Name))
CALL ShowContinueError('User-Specified Maximum Hot Water Flow of '// &
TRIM(RoundSigDigits(MaxVolWaterFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Hot Water Flow of ' // &
TRIM(RoundSigDigits(MaxVolWaterFlowDes,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
ENDIF
CALL SetCoilDesFlow(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName, &
OutAirUnit(OAUnitNum)%OutAirVolFlow,ErrorsFound)
CASE('COIL:HEATING:STEAM')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= SteamCoil_AirHeat
IF ((OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow==AutoSize))THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow > 0.0d0) THEN
CALL ReportSizingOutput('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name, &
'User-Specified Maximum Steam Flow [m3/s]', &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow)
END IF
ELSE
CALL CheckZoneSizing('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name)
CoilSteamInletNode = OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilWaterInletNode
CoilSteamOutletNode = &
GetCoilSteamOutletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
IF (IsAutosize) THEN
PltSizHeatNum = MyPlantSizingIndex(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName, 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)
DesCoilLoad = MAX(0.d0, DesCoilLoad)
TempSteamIn= 100.00d0
EnthSteamInDry = GetSatEnthalpyRefrig('STEAM',TempSteamIn,1.0d0, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%FluidIndex,'SizeOutdoorAirUnit')
EnthSteamOutWet= GetSatEnthalpyRefrig('STEAM',TempSteamIn,0.0d0, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%FluidIndex,'SizeOutdoorAirUnit')
LatentHeatSteam=EnthSteamInDry-EnthSteamOutWet
SteamDensity=GetSatDensityRefrig('STEAM',TempSteamIn,1.0d0, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%FluidIndex,'SizeOutdoorAirUnit')
!DSU? deal with steam properties
Cp = GetSpecificHeatGlycol('WATER', 60.d0, DummyWaterIndex, 'SizeOutdoorAirUnit')
rho = GetDensityGlycol('WATER', 60.d0, DummyWaterIndex, 'SizeOutdoorAirUnit')
MaxVolWaterFlowDes = DesCoilLoad/((PlantSizData(PltSizHeatNum)%DeltaT * &
Cp * rho )+ &
SteamDensity* LatentHeatSteam)
ELSE
MaxVolWaterFlowDes = 0.0d0
END IF
ELSE
CALL ShowSevereError('Autosizing of Steam flow requires a Sizing:Zone object '// &
'or a heating loop Sizing:Plant object')
CALL ShowContinueError('Occurs in ' // 'ZoneHVAC:OutdoorAirUnit' // ' Object=' &
//TRIM(OutAirUnit(OAUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
END IF
IF (IsAutosize) THEN
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow = MaxVolWaterFlowDes
CALL ReportSizingOutput('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name, &
'Design Size Maximum Steam Flow [m3/s]', MaxVolWaterFlowDes)
ELSE
IF (OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow > 0.0d0 .AND. MaxVolWaterFlowDes > 0.0d0) THEN
MaxVolWaterFlowUser = OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow
CALL ReportSizingOutput('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name, &
'Design Size Maximum Steam Flow [m3/s]', MaxVolWaterFlowDes, &
'User-Specified Maximum Steam Flow [m3/s]', MaxVolWaterFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxVolWaterFlowDes - MaxVolWaterFlowUser)/MaxVolWaterFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeOutdoorAirUnit: Potential issue with equipment sizing for ZoneHVAC:OutdoorAirUnit ' &
//TRIM(OutAirUnit(OAUnitNum)%Name))
CALL ShowContinueError('User-Specified Maximum Steam Flow of '// &
TRIM(RoundSigDigits(MaxVolWaterFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Steam Flow of ' // &
TRIM(RoundSigDigits(MaxVolWaterFlowDes,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
CASE('COIL:COOLING:WATER:DETAILEDGEOMETRY')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= WaterCoil_DetailedCool
IF ((OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow==AutoSize))THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow > 0.0d0) THEN
CALL ReportSizingOutput('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name, &
'User-Specified Maximum Cold Water Flow [m3/s]', &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow)
END IF
ELSE
CALL CheckZoneSizing('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name)
CoilWaterInletNode = OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilWaterInletNode
CoilWaterOutletNode =OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilWaterOutletNode
IF (IsAutosize) THEN
PltSizCoolNum = MyPlantSizingIndex(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName, CoilWaterInletNode, &
CoilWaterOutletNode, ErrorsFound)
IF (PltSizCoolNum > 0) THEN
IF (SizeAirMassFlow >= SmallAirVolFlow) THEN
CoilInTemp = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInTemp
CoilOutTemp = FinalZoneSizing(CurZoneEqNum)%CoolDesTemp
CoilOutHumRat = FinalZoneSizing(CurZoneEqNum)%CoolDesHumRat
CoilInHumRat = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInHumRat
DesCoilLoad = SizeAirMassFlow &
* (PsyHFnTdbW(CoilInTemp, CoilInHumRat)-PsyHFnTdbW(CoilOutTemp, CoilOutHumRat))
DesCoilLoad = MAX(0.d0, DesCoilLoad)
rho = GetDensityGlycol(PlantLoop(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%LoopNum )%fluidName, &
5.d0, &
PlantLoop( OutAirUnit(OAUnitNum)%OAEquip(CompNum)%LoopNum )%fluidIndex, &
'SizeOutdoorAirUnit' )
Cp = GetSpecificHeatGlycol(PlantLoop(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%LoopNum )%fluidName, &
5.d0, &
PlantLoop( OutAirUnit(OAUnitNum)%OAEquip(CompNum)%LoopNum )%fluidIndex, &
'SizeOutdoorAirUnit' )
MaxVolWaterFlowDes = DesCoilLoad / &
( PlantSizData(PltSizCoolNum)%DeltaT * &
Cp * rho )
ELSE
MaxVolWaterFlowDes = 0.0d0
END IF
ELSE
CALL ShowSevereError('Autosizing of water flow requires a Sizing:Zone object '// &
'or a cooling loop Sizing:Plant object')
CALL ShowContinueError('Occurs in ' // 'ZoneHVAC:OutdoorAirUnit' // ' Object=' &
//TRIM(OutAirUnit(OAUnitNum)%Name))
Errorsfound = .TRUE.
END IF
END IF
IF (IsAutosize) THEN
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow = MaxVolWaterFlowDes
CALL ReportSizingOutput('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name, &
'Design Size Maximum Cold Water Flow [m3/s]', MaxVolWaterFlowDes)
ELSE
IF (OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow > 0.0d0 .AND. MaxVolWaterFlowDes > 0.0d0) THEN
MaxVolWaterFlowUser = OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow
CALL ReportSizingOutput('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name, &
'Design Size Maximum Cold Water Flow [m3/s]', MaxVolWaterFlowDes, &
'User-Specified Maximum Cold Water Flow [m3/s]', MaxVolWaterFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxVolWaterFlowDes - MaxVolWaterFlowUser)/MaxVolWaterFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeOutdoorAirUnit: Potential issue with equipment sizing for ZoneHVAC:OutdoorAirUnit ' &
//TRIM(OutAirUnit(OAUnitNum)%Name))
CALL ShowContinueError('User-Specified Maximum Cold Water Flow of '// &
TRIM(RoundSigDigits(MaxVolWaterFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Cold Water Flow of ' // &
TRIM(RoundSigDigits(MaxVolWaterFlowDes,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
CALL SetCoilDesFlow(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName, &
OutAirUnit(OAUnitNum)%OutAirVolFlow,ErrorsFound)
CASE('COILSYSTEM:COOLING:WATER:HEATEXCHANGERASSISTED')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= WaterCoil_CoolingHXAsst
IF ((OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow==AutoSize))THEN
IsAutosize = .TRUE.
END IF
IF (CurZoneEqNum > 0) THEN
IF (.NOT. IsAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow > 0.0d0) THEN
CALL ReportSizingOutput('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name, &
'User-Specified Maximum Cold Water Flow [m3/s]', &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow)
END IF
ELSE
CALL CheckZoneSizing('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name)
CoolingCoilName = OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName
CoolingCoilType = OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType
CoilWaterInletNode = OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilWaterInletNode
CoilWaterOutletNode = OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilWaterOutletNode
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(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%LoopNum )%fluidName, &
5.d0, &
PlantLoop( OutAirUnit(OAUnitNum)%OAEquip(CompNum)%LoopNum )%fluidIndex, &
'SizeOutdoorAirUnit' )
Cp = GetSpecificHeatGlycol(PlantLoop(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%LoopNum )%fluidName, &
5.d0, &
PlantLoop( OutAirUnit(OAUnitNum)%OAEquip(CompNum)%LoopNum )%fluidIndex, &
'SizeOutdoorAirUnit' )
MaxVolWaterFlowDes = DesCoilLoad / &
( PlantSizData(PltSizCoolNum)%DeltaT * &
Cp * rho )
ELSE
MaxVolWaterFlowDes = 0.0d0
END IF
ELSE
CALL ShowSevereError('Autosizing of water flow requires a Sizing:Zone object '// &
'or a cooling loop Sizing:Plant object')
CALL ShowContinueError('Occurs in ' // 'ZoneHVAC:OutdoorAirUnit' // ' Object=' &
//TRIM(OutAirUnit(OAUnitNum)%Name))
Errorsfound = .TRUE.
END IF
END IF
IF (IsAutosize) THEN
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow = MaxVolWaterFlowDes
CALL ReportSizingOutput('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name, &
'Design Size Maximum Cold Water Flow [m3/s]', MaxVolWaterFlowDes)
ELSE
IF (OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow > 0.0d0 .AND. MaxVolWaterFlowDes > 0.0d0) THEN
MaxVolWaterFlowUser = OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow
CALL ReportSizingOutput('ZoneHVAC:OutdoorAirUnit', OutAirUnit(OAUnitNum)%Name, &
'Design Size Maximum Cold Water Flow [m3/s]', MaxVolWaterFlowDes, &
'User-Specified Maximum Cold Water Flow [m3/s]', MaxVolWaterFlowUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(MaxVolWaterFlowDes - MaxVolWaterFlowUser)/MaxVolWaterFlowUser) > AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeOutdoorAirUnit: Potential issue with equipment sizing for ZoneHVAC:OutdoorAirUnit ' &
//TRIM(OutAirUnit(OAUnitNum)%Name))
CALL ShowContinueError('User-Specified Maximum Cold Water Flow of '// &
TRIM(RoundSigDigits(MaxVolWaterFlowUser,5))// ' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Cold Water Flow of ' // &
TRIM(RoundSigDigits(MaxVolWaterFlowDes,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
CASE('COILSYSTEM:COOLING:DX')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= DXSystem
CASE('COILSYSTEM:HEATING:DX')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= DXHeatPumpSystem
CASE('AIRLOOPHVAC:UNITARYSYSTEM')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= UnitarySystem
! Heat recovery
CASE('HEATEXCHANGER:AIRTOAIR:FLATPLATE')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= HeatXchngr
CASE('HEATEXCHANGER:AIRTOAIR:SENSIBLEANDLATENT')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= HeatXchngr
! CASE('HEATEXCHANGER:DESICCANT:BALANCEDFLOW')
! OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= HeatXchngr
! Desiccant Dehumidifier
CASE('DEHUMIDIFIER:DESICCANT:NOFANS')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= Desiccant
! CASE('DEHUMIDIFIER:DESICCANT:SYSTEM')
! OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= Desiccant
! Electric Heat Coil
CASE('COIL:HEATING:ELECTRIC')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= Coil_ElectricHeat
! Gas Heat Coil
CASE('COIL:HEATING:GAS')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= Coil_GasHeat
CASE DEFAULT
CALL ShowSevereError('ZoneHVAC:OutdoorAirUnit:EquipmentList'//' = "'// &
'OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentListName'//'" invalid to sizing'// &
'Outside Air Component="'//TRIM(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType)//'".')
ErrorsFound=.true.
END SELECT
ENDDO
ENDDO
IF (ErrorsFound) THEN
CALL ShowFatalError('Preceding sizing errors cause program termination')
END IF
RETURN
END SUBROUTINE SizeOutdoorAirUnit