SUBROUTINE UpdateSysSizing(CallIndicator)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN February 2001
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Update the result variables of the zone sizing calculation
! METHODOLOGY EMPLOYED:
! CallIndicator = 1 (BeginDay) zero the result arrays
! CallIndicator = 2 (DuringDay) fill arrays, averaging over 1 zone time step
! CallIndicator = 3 (EndDay) calculate daily maxima
! CallIndicator = 5 (EndSysSizingCalc) write out results
! REFERENCES:
! na
! USE STATEMENTS:
USE General, ONLY: FindNumberinList
USE DataEnvironment, ONLY: StdBaroPress, OutDryBulbTemp, OutHumRat, StdRhoAir
USE Psychrometrics, ONLY:PsyRhoAirFnPbTdbW,PsyCpAirFnWTdb
USE EMSManager, ONLY: ManageEMS
USE OutputReportPredefined
USE DataHeatBalance, ONLY: Zone
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER :: CallIndicator
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: fmta="(A)"
CHARACTER(len=*), PARAMETER :: SSizeFmt10="('Time')"
CHARACTER(len=*), PARAMETER :: SSizeFmt11="(A1,A,A,A1,A,A,A1,A,A,A1,A,A)"
CHARACTER(len=*), PARAMETER :: SSizeFmt20="(I2.2,':',I2.2,':00')"
CHARACTER(len=*), PARAMETER :: SSizeFmt21="(A1,ES12.6,A1,ES12.6,A1,ES12.6,A1,ES12.6)"
CHARACTER(len=*), PARAMETER :: SSizeFmt30="('Coinc Peak ')"
CHARACTER(len=*), PARAMETER :: SSizeFmt31="(A1,ES12.6,A1,ES12.6,A1,ES12.6,A1,ES12.6)"
CHARACTER(len=*), PARAMETER :: SSizeFmt40="('NonCoinc Peak')"
CHARACTER(len=*), PARAMETER :: SSizeFmt41="(A1,ES12.6,A1,ES12.6,A1,ES12.6,A1,ES12.6 )"
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: AirLoopNum ! primary air system index
INTEGER :: TimeStepInDay ! zone time step in day
INTEGER :: TimeStepIndex ! zone time step index
INTEGER :: NumZonesHeated ! number of zones heated by a system
INTEGER :: NumZonesCooled ! numberof zones cooled by a system
INTEGER :: ZonesHeatedNum ! loop index of zones heated in a system
INTEGER :: ZonesCooledNum ! loop index of zones cooled in a system
INTEGER :: CtrlZoneNum ! controlled zone number of a zone
INTEGER :: I ! write statement index
! REAL(r64) :: HourFrac ! fractional hour
INTEGER :: NumOfTimeStepInDay ! number of zone time steps in a day
REAL(r64) :: SysCoolRetTemp ! system cooling return temperature for a time step [C]
REAL(r64) :: SysHeatRetTemp ! system heating return temperature for a time step [C]
REAL(r64) :: RhoAir ! density of air kg/m3
REAL(r64) :: OutAirFrac ! outside air fraction
REAL(r64) :: SysCoolMixTemp ! system cooling mixed air temperature [C]
REAL(r64) :: SysHeatMixTemp ! system heating mixed air temperature [C]
REAL(r64) :: SysSensCoolCap ! system sensible cooling capacity [W]
REAL(r64) :: SysHeatCap ! system heating capacity [W]
INTEGER :: HourCounter ! Hour Counter
INTEGER :: TimeStepCounter ! Time Step Counter
INTEGER :: Minutes ! Current Minutes Counter
INTEGER :: HourPrint ! Hour to print (timestamp)
INTEGER :: DDNum ! design day index
INTEGER :: CoolDDNum ! design day index of a peak cooling day
INTEGER :: HeatDDNum ! design day index of a peak cooling day
INTEGER :: CoolTimeStepNum ! time step index (in day) of a cooling peak
INTEGER :: HeatTimeStepNum ! time step index (in day) of a cooling peak
REAL(r64) :: OutAirTemp ! outside air temperature
REAL(r64) :: OutAirHumRat ! outside air humifity ratio
REAL(r64) :: SysCoolMixHumRat ! system cooling mixed air humidity ratio [kg water/kg dry air]
REAL(r64) :: SysCoolRetHumRat ! system coolingreturn air humifity ratio [kg water/kg dry air]
REAL(r64) :: SysHeatMixHumRat ! system heating mixed air humidity ratio [kg water/kg dry air]
REAL(r64) :: SysHeatRetHumRat ! system heatingreturn air humifity ratio [kg water/kg dry air]
REAL(r64) :: SysCoolOutTemp ! system cooling outside air temperature [C]
REAL(r64) :: SysCoolOutHumRat ! system cooling outside air humidity ratio [kg water/kg dry air]
REAL(r64) :: SysHeatOutTemp ! system heating outside air temperature [C]
REAL(r64) :: SysHeatOutHumRat ! system heating outside air humidity ratio [kg water/kg dry air]
REAL(r64) :: SysCoolSizingRat ! ratio of user input design flow for cooling divided by calculated design cooling flow
REAL(r64) :: SysHeatSizingRat ! ratio of user input design flow for heating divided by calculated design heating flow
REAL(r64) :: ZoneOARatio ! ratio of zone OA flow to zone design cooling or heating flow
REAL(r64) :: RetTempRise ! difference between zone return temperature and zone temperature [delta K]
REAL(r64) :: SysCoolingEv ! System level ventilation effectiveness for cooling mode
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: EvBySysCool !saved value of SysCoolingEv used in 62.1 tabular report
REAL(r64) :: SysHeatingEv ! System level ventilation effectiveness for heating mode
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: EvBySysHeat !saved value of SysHeatingEv used in 62.1 tabular report
REAL(r64) :: Ep = 1.0d0 ! zone primary air fraction
REAL(r64) :: Er = 0.0d0 ! zone secondary recirculation fraction
REAL(r64) :: Fa = 1.0d0 ! temporary variable used in multi-path VRP calc
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: FaByZoneCool !saved value of Fa used in 62.1 tabular report
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: FaByZoneHeat !saved value of Fa used in 62.1 tabular report
REAL(r64) :: Fb = 1.0d0 ! temporary variable used in multi-path VRP calc
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: FbByZoneCool !saved value of Fb used in 62.1 tabular report
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: FbByZoneHeat !saved value of Fb used in 62.1 tabular report
REAL(r64) :: Fc = 1.0d0 ! temporary variable used in multi-path VRP calc
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: FcByZoneCool !saved value of Fc used in 62.1 tabular report
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: FcByZoneHeat !saved value of Fc used in 62.1 tabular report
REAL(r64) :: Xs = 1.0d0 ! uncorrected system outdoor air fraction
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: XsBySysCool !saved value of Xs used in 62.1 tabular report
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: XsBySysHeat !saved value of Xs used in 62.1 tabular report
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: EvzByZoneCool !saved value of Evz (zone vent effy) used in 62.1 tabular report
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: EvzByZoneHeat !saved value of Evz (zone vent effy) used in 62.1 tabular report
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: EvzByZoneCoolPrev !saved value of Evz (zone vent effy) used in 62.1 tabular report
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: EvzByZoneHeatPrev !saved value of Evz (zone vent effy) used in 62.1 tabular report
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: VotClgBySys !saved value of cooling ventilation required at primary AHU, used in 62.1 tabular report
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: VotHtgBySys !saved value of heating ventilation required at primary AHU, used in 62.1 tabular report
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: VozSumClgBySys !saved value of cooling ventilation required at clg zones
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: VozSumHtgBySys !saved value of cooling ventilation required at htg zones
REAL(r64) :: Evz = 1.0d0 ! zone ventilation efficiency
REAL(r64) :: MinHeatingEvz = 1.0d0 ! minimum zone ventilation efficiency for heating (to be used as system efficiency)
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: EvzMinBySysHeat !saved value of EvzMin used in 62.1 tabular report
REAL(r64) :: MinCoolingEvz = 1.0d0 ! minimum zone ventilation efficiency for cooling (to be used as system efficiency)
REAL(r64), ALLOCATABLE, DIMENSION(:),SAVE :: EvzMinBySysCool !saved value of EvzMin used in 62.1 tabular report
REAL(r64) :: ZoneOAFrac = 0.0d0 ! zone OA fraction
REAL(r64) :: ZoneEz = 1.0d0 ! zone air distribution effectiveness
REAL(r64) :: Vou = 0.0D0 ! Uncorrected outdoor air intake for all zones per ASHRAE std 62.1
REAL(r64) :: Vot = 0.0D0 ! Required outdoor air intake at primary AHU per ASHRAE std 62.1
REAL(r64) :: VotMax = 0.0D0 ! Max of required cooling/heating outdoor air intake at primary AHU per ASHRAE std 62.1
REAL(r64) :: VozBySys = 0.0D0 ! Sum of zone required outdoor air intake per ASHRAE std 62.1
REAL(r64) :: Ratio = 1D0 ! Ratio of VozBySys / VotMax
! not changing this for the unitary system check in
! REAL(r64) :: Ratio = 1.0d0 ! Ratio of VozBySys / VotMax
REAL(r64) :: SysHtgPeakAirflow ! Peak heating airflow
INTEGER :: NumZonesForHtg ! Number of heating zones for given primary system
INTEGER :: MatchingCooledZoneNum ! temporary variable
real(r64) :: termunitsizingtempfrac ! 1.0/(1.0+termunitsizing(ctrlzone)%inducrat)
real(r64) :: termunitsizingtemp ! (1.0+termunitsizing(ctrlzone)%inducrat)
NumOfTimeStepInDay = NumOfTimeStepInHour * 24
! NumZonesCooled=0
! NumZonesHeated=0
! allocate arrays used to store values for standard 62.1 tabular report
IF (.NOT. ALLOCATED(FaByZoneCool)) THEN
ALLOCATE (FaByZoneCool(NumOfZones))
FaByZoneCool = 0.0d0
ALLOCATE (FaByZoneHeat(NumOfZones))
FaByZoneHeat = 0.0d0
ALLOCATE (FbByZoneCool(NumOfZones))
FbByZoneCool = 0.0d0
ALLOCATE (FbByZoneHeat(NumOfZones))
FbByZoneHeat = 0.0d0
ALLOCATE (FcByZoneCool(NumOfZones))
FcByZoneCool = 0.0d0
ALLOCATE (FcByZoneHeat(NumOfZones))
FcByZoneHeat = 0.0d0
ALLOCATE (EvBySysCool(NumPrimaryAirSys))
EvBySysCool = 1.0d0
ALLOCATE (EvBySysHeat(NumPrimaryAirSys))
EvBySysHeat = 1.0d0
ALLOCATE (XsBySysCool(NumPrimaryAirSys))
XsBySysCool = 1.0d0
ALLOCATE (XsBySysHeat(NumPrimaryAirSys))
XsBySysHeat = 1.0d0
ALLOCATE (EvzByZoneCool(NumOfZones))
EvzByZoneCool = 1.0d0
ALLOCATE (EvzByZoneCoolPrev(NumOfZones))
EvzByZoneCoolPrev = 1.0d0
ALLOCATE (EvzByZoneHeat(NumOfZones))
EvzByZoneHeat = 1.0d0
ALLOCATE (EvzByZoneHeatPrev(NumOfZones))
EvzByZoneHeatPrev = 1.0d0
ALLOCATE (EvzMinBySysCool(NumPrimaryAirSys))
EvzMinBySysCool = 1.0d0
ALLOCATE (EvzMinBySysHeat(NumPrimaryAirSys))
EvzMinBySysHeat = 1.0d0
ALLOCATE (VotClgBySys(NumPrimaryAirSys))
VotClgBySys = 0.0d0
ALLOCATE (VotHtgBySys(NumPrimaryAirSys))
VotHtgBySys = 0.0d0
ALLOCATE (VozSumClgBySys(NumPrimaryAirSys))
VozSumClgBySys = 0.0d0
ALLOCATE (VozSumHtgBySys(NumPrimaryAirSys))
VozSumHtgBySys = 0.0d0
END IF
SELECT CASE (CallIndicator)
CASE (BeginDay)
! Correct the zone return temperature in ZoneSizing for the case of induction units. The calc in
! ZoneEquipmentManager assumes all the air entering the zone goes into the return node.
DO CtrlZoneNum=1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZoneNum)%IsControlled) CYCLE
termunitsizingtemp=(1.d0+TermUnitSizing(CtrlZoneNum)%InducRat)
termunitsizingtempfrac=(1.0d0/termunitsizingtemp)
RetTempRise = ZoneSizing(CtrlZoneNum,CurOverallSimDay)%ZoneRetTempAtCoolPeak - &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%ZoneTempAtCoolPeak
IF (RetTempRise > 0.01d0) THEN
!avoid possible compiler bug
! ZoneSizing(CtrlZoneNum,CurOverallSimDay)%ZoneRetTempAtCoolPeak = &
! ZoneSizing(CtrlZoneNum,CurOverallSimDay)%ZoneTempAtCoolPeak + RetTempRise * &
! (1.d0/(1.d0+TermUnitSizing(CtrlZoneNum)%InducRat))
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%ZoneRetTempAtCoolPeak = &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%ZoneTempAtCoolPeak + &
RetTempRise * termunitsizingtempfrac
END IF
RetTempRise = ZoneSizing(CtrlZoneNum,CurOverallSimDay)%ZoneRetTempAtHeatPeak - &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%ZoneTempAtHeatPeak
IF (RetTempRise > 0.01d0) THEN
!avoid possible compiler bug
! ZoneSizing(CtrlZoneNum,CurOverallSimDay)%ZoneRetTempAtHeatPeak = &
! ZoneSizing(CtrlZoneNum,CurOverallSimDay)%ZoneTempAtHeatPeak + RetTempRise * &
! (1./(1.+TermUnitSizing(CtrlZoneNum)%InducRat))
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%ZoneRetTempAtHeatPeak = &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%ZoneTempAtHeatPeak + &
RetTempRise * termunitsizingtempfrac
END IF
END DO
DO AirLoopNum=1,NumPrimaryAirSys ! start of begin day loop over primary air systems
NumZonesCooled = AirToZoneNodeInfo(AirLoopNum)%NumZonesCooled
NumZonesHeated = AirToZoneNodeInfo(AirLoopNum)%NumZonesHeated
SysSizing(AirLoopNum,CurOverallSimDay)%CoolDesDay = EnvironmentName
SysSizing(AirLoopNum,CurOverallSimDay)%HeatDesDay = EnvironmentName
DO ZonesCooledNum=1,NumZonesCooled ! loop over cooled zones
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesCooledNum)
SysSizing(AirLoopNum,CurOverallSimDay)%NonCoinCoolMassFlow = &
SysSizing(AirLoopNum,CurOverallSimDay)%NonCoinCoolMassFlow + &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%DesCoolMassFlow / (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
END DO ! end of loop over cooled zones
IF (NumZonesHeated.GT.0) THEN ! if there are zones supplied with central hot air
DO ZonesHeatedNum=1,NumZonesHeated ! loop over heated zones
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%HeatCtrlZoneNums(ZonesHeatedNum)
SysSizing(AirLoopNum,CurOverallSimDay)%NonCoinHeatMassFlow = &
SysSizing(AirLoopNum,CurOverallSimDay)%NonCoinHeatMassFlow + &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%DesHeatMassFlow / (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
END DO ! end of loop over heated zones
ELSE ! otherwise use cool supply zones
DO ZonesCooledNum=1,NumZonesCooled !loop over cooled zones
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesCooledNum)
SysSizing(AirLoopNum,CurOverallSimDay)%NonCoinHeatMassFlow = &
SysSizing(AirLoopNum,CurOverallSimDay)%NonCoinHeatMassFlow + &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%DesHeatMassFlow / (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
END DO ! end of loop over cooled zones
END IF ! End of heat / cool zone if - else
END DO ! End of begin day loop over primary air systems
CASE (DuringDay)
TimeStepInDay = (HourOfDay-1)*NumOfTimeStepInHour + TimeStep ! calculate current zone time step index
! Correct the zone return temperature in ZoneSizing for the case of induction units. The calc in
! ZoneEquipmentManager assumes all the air entering the zone goes into the return node.
DO CtrlZoneNum=1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZoneNum)%IsControlled) CYCLE
termunitsizingtemp=(1.d0+TermUnitSizing(CtrlZoneNum)%InducRat)
termunitsizingtempfrac=(1.0d0/termunitsizingtemp)
RetTempRise = ZoneSizing(CtrlZoneNum,CurOverallSimDay)%CoolZoneRetTempSeq(TimeStepInDay) - &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%CoolZoneTempSeq(TimeStepInDay)
IF (RetTempRise > 0.01d0) THEN
!avoid possible compiler bug
! ZoneSizing(CtrlZoneNum,CurOverallSimDay)%CoolZoneRetTempSeq(TimeStepInDay) = &
! ZoneSizing(CtrlZoneNum,CurOverallSimDay)%CoolZoneTempSeq(TimeStepInDay) + RetTempRise * &
! (1.d0/(1.d0+TermUnitSizing(CtrlZoneNum)%InducRat))
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%CoolZoneRetTempSeq(TimeStepInDay) = &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%CoolZoneTempSeq(TimeStepInDay) + &
RetTempRise * termunitsizingtempfrac
END IF
RetTempRise = ZoneSizing(CtrlZoneNum,CurOverallSimDay)%HeatZoneRetTempSeq(TimeStepInDay) - &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%HeatZoneTempSeq(TimeStepInDay)
IF (RetTempRise > 0.01d0) THEN
!avoid possible compiler bug
! ZoneSizing(CtrlZoneNum,CurOverallSimDay)%HeatZoneRetTempSeq(TimeStepInDay) = &
! ZoneSizing(CtrlZoneNum,CurOverallSimDay)%HeatZoneTempSeq(TimeStepInDay) + RetTempRise * &
! (1.d0/(1.d0+TermUnitSizing(CtrlZoneNum)%InducRat))
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%HeatZoneRetTempSeq(TimeStepInDay) = &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%HeatZoneTempSeq(TimeStepInDay) + &
RetTempRise * termunitsizingtempfrac
END IF
END DO
DO AirLoopNum=1,NumPrimaryAirSys ! start of zone time step loop over primary air systems
NumZonesCooled = AirToZoneNodeInfo(AirLoopNum)%NumZonesCooled
NumZonesHeated = AirToZoneNodeInfo(AirLoopNum)%NumZonesHeated
SysCoolRetTemp = 0.0d0
OutAirFrac = 0.0d0
SysCoolMixTemp = 0.0d0
SysSensCoolCap = 0.0d0
SysCoolRetHumRat = 0.0d0
SysCoolMixHumRat = 0.0d0
DO ZonesCooledNum=1,NumZonesCooled ! loop over zones cooled by central system
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesCooledNum)
! sum up the system mass flow rate for this time step
SysSizing(AirLoopNum,CurOverallSimDay)%CoolFlowSeq(TimeStepInDay) = &
SysSizing(AirLoopNum,CurOverallSimDay)%CoolFlowSeq(TimeStepInDay) + &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%CoolFlowSeq(TimeStepInDay) / (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
! calculate the return air temperature for this time step
SysCoolRetTemp = SysCoolRetTemp + ZoneSizing(CtrlZoneNum,CurOverallSimDay)%CoolZoneRetTempSeq(TimeStepInDay) * &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%CoolFlowSeq(TimeStepInDay) &
/ (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
SysCoolRetHumRat = SysCoolRetHumRat + ZoneSizing(CtrlZoneNum,CurOverallSimDay)%CoolZoneHumRatSeq(TimeStepInDay) * &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%CoolFlowSeq(TimeStepInDay) &
/ (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
END DO ! end of loop over zones cooled by central system
! check that there is system mass flow
IF (SysSizing(AirLoopNum,CurOverallSimDay)%CoolFlowSeq(TimeStepInDay) > 0.0d0) THEN
! complete return air temp calc
SysCoolRetTemp = SysCoolRetTemp / SysSizing(AirLoopNum,CurOverallSimDay)%CoolFlowSeq(TimeStepInDay)
SysCoolRetHumRat = SysCoolRetHumRat / SysSizing(AirLoopNum,CurOverallSimDay)%CoolFlowSeq(TimeStepInDay)
SysSizing(AirLoopNum,CurOverallSimDay)%SysCoolRetTempSeq(TimeStepInDay) = SysCoolRetTemp
SysSizing(AirLoopNum,CurOverallSimDay)%SysCoolRetHumRatSeq(TimeStepInDay) = SysCoolRetHumRat
! calculate the outside air fraction for this time step
RhoAir = StdRhoAir
IF (SysSizing(AirLoopNum,CurOverallSimDay)%CoolOAOption == MinOA) THEN
OutAirFrac = RhoAir*SysSizing(AirLoopNum,CurOverallSimDay)%DesOutAirVolFlow / &
SysSizing(AirLoopNum,CurOverallSimDay)%CoolFlowSeq(TimeStepInDay)
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
ELSE
OutAirFrac = 1.0d0
END IF
! now calculate the mixed air temperature
SysCoolMixTemp = OutDryBulbTemp*OutAirFrac + SysCoolRetTemp*(1.0d0-OutAirFrac)
SysCoolMixHumRat = OutHumRat*OutAirFrac + SysCoolRetHumRat*(1.0d0-OutAirFrac)
SysSizing(AirLoopNum,CurOverallSimDay)%SysCoolOutTempSeq(TimeStepInDay) = OutDryBulbTemp
SysSizing(AirLoopNum,CurOverallSimDay)%SysCoolOutHumRatSeq(TimeStepInDay) = OutHumRat
! From the mixed air temp, system design supply air temp, and the mass flow rate
! calculate the system sensible cooling capacity
SysSensCoolCap = PsyCpAirFnWTdb(constant_zero,constant_twenty) * &
SysSizing(AirLoopNum,CurOverallSimDay)%CoolFlowSeq(TimeStepInDay) * &
(SysCoolMixTemp - SysSizing(AirLoopNum,CurOverallSimDay)%CoolSupTemp)
SysSensCoolCap = MAX(0.0d0,SysSensCoolCap)
! Save the sens cool cap for this time step
SysSizing(AirLoopNum,CurOverallSimDay)%SensCoolCapSeq(TimeStepInDay) = SysSensCoolCap
END IF ! end of system mass flow check
! get the maximum system sensible cooling capacity
IF (SysSensCoolCap > SysSizing(AirLoopNum,CurOverallSimDay)%SensCoolCap) THEN
SysSizing(AirLoopNum,CurOverallSimDay)%SensCoolCap = SysSensCoolCap
SysSizing(AirLoopNum,CurOverallSimDay)%CoolMixTemp = SysCoolMixTemp
SysSizing(AirLoopNum,CurOverallSimDay)%CoolMixHumRat = SysCoolMixHumRat
SysSizing(AirLoopNum,CurOverallSimDay)%CoolRetTemp = SysCoolRetTemp
SysSizing(AirLoopNum,CurOverallSimDay)%CoolRetHumRat = SysCoolRetHumRat
SysSizing(AirLoopNum,CurOverallSimDay)%CoolOutTemp = OutDryBulbTemp
SysSizing(AirLoopNum,CurOverallSimDay)%CoolOutHumRat = OutHumRat
END IF
! get the maximum cooling mass flow rate
SysSizing(AirLoopNum,CurOverallSimDay)%CoinCoolMassFlow = MAX(SysSizing(AirLoopNum,CurOverallSimDay)%CoinCoolMassFlow, &
SysSizing(AirLoopNum,CurOverallSimDay)%CoolFlowSeq(TimeStepInDay))
SysHeatRetTemp = 0.0d0
OutAirFrac = 0.0d0
SysHeatMixTemp = 0.0d0
SysHeatCap = 0.0d0
SysHeatRetHumRat = 0.0d0
SysHeatMixHumRat = 0.0d0
IF (NumZonesHeated.GT.0) THEN ! IF there are centrally heated zones
DO ZonesHeatedNum=1,NumZonesHeated ! loop over the heated zones
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%HeatCtrlZoneNums(ZonesHeatedNum)
! sum up the heating mass flow rate for this time step
SysSizing(AirLoopNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay) = &
SysSizing(AirLoopNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay) + &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay) / (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
! calculate the return air temperature for this time step
SysHeatRetTemp = SysHeatRetTemp + ZoneSizing(CtrlZoneNum,CurOverallSimDay)%HeatZoneRetTempSeq(TimeStepInDay) * &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay) &
/ (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
SysHeatRetHumRat = SysHeatRetHumRat + ZoneSizing(CtrlZoneNum,CurOverallSimDay)%HeatZoneHumRatSeq(TimeStepInDay) * &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay) &
/ (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
END DO ! end heated zones loop
! check that the system flow rate is nonzero
IF (SysSizing(AirLoopNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay) > 0.0d0) THEN
! complete return air temp calc
SysHeatRetTemp = SysHeatRetTemp / SysSizing(AirLoopNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay)
SysHeatRetHumRat = SysHeatRetHumRat / SysSizing(AirLoopNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay)
SysSizing(AirLoopNum,CurOverallSimDay)%SysHeatRetTempSeq(TimeStepInDay) = SysHeatRetTemp
SysSizing(AirLoopNum,CurOverallSimDay)%SysHeatRetHumRatSeq(TimeStepInDay) = SysHeatRetHumRat
! calculate the outside air fraction for this time step
RhoAir = StdRhoAir
IF (SysSizing(AirLoopNum,CurOverallSimDay)%HeatOAOption == MinOA) THEN
OutAirFrac = RhoAir*SysSizing(AirLoopNum,CurOverallSimDay)%DesOutAirVolFlow / &
SysSizing(AirLoopNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay)
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
ELSE
OutAirFrac = 1.0d0
END IF
! calculate the mixed air temperature
SysHeatMixTemp = OutDryBulbTemp*OutAirFrac + SysHeatRetTemp*(1.0d0-OutAirFrac)
SysHeatMixHumRat = OutHumRat*OutAirFrac + SysHeatRetHumRat*(1.0d0-OutAirFrac)
SysSizing(AirLoopNum,CurOverallSimDay)%SysHeatOutTempSeq(TimeStepInDay) = OutDryBulbTemp
SysSizing(AirLoopNum,CurOverallSimDay)%SysHeatOutHumRatSeq(TimeStepInDay) = OutHumRat
! From the mixed air temp, heating supply air temp, and mass flow rate calculate the system heating capacity
SysHeatCap = PsyCpAirFnWTdb(constant_zero,constant_twenty) * &
SysSizing(AirLoopNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay) * &
( SysSizing(AirLoopNum,CurOverallSimDay)%HeatSupTemp - SysHeatMixTemp )
SysHeatCap = MAX(0.0d0,SysHeatCap)
! save the system heating capacity for the time step
SysSizing(AirLoopNum,CurOverallSimDay)%HeatCapSeq(TimeStepInDay) = SysHeatCap
END IF ! end system flow rate IF
! Get the maximum system heating capacity
IF (SysHeatCap > SysSizing(AirLoopNum,CurOverallSimDay)%HeatCap) THEN
SysSizing(AirLoopNum,CurOverallSimDay)%HeatCap = SysHeatCap
SysSizing(AirLoopNum,CurOverallSimDay)%HeatMixTemp = SysHeatMixTemp
SysSizing(AirLoopNum,CurOverallSimDay)%HeatMixHumRat = SysHeatMixHumRat
SysSizing(AirLoopNum,CurOverallSimDay)%HeatRetTemp = SysHeatRetTemp
SysSizing(AirLoopNum,CurOverallSimDay)%HeatRetHumRat = SysHeatRetHumRat
SysSizing(AirLoopNum,CurOverallSimDay)%HeatOutTemp = OutDryBulbTemp
SysSizing(AirLoopNum,CurOverallSimDay)%HeatOutHumRat = OutHumRat
END IF
! Get the maximum system heating flow rate
SysSizing(AirLoopNum,CurOverallSimDay)%CoinHeatMassFlow = &
MAX(SysSizing(AirLoopNum,CurOverallSimDay)%CoinHeatMassFlow, &
SysSizing(AirLoopNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay))
ELSE ! No centrally heated zones: use cooled zones
DO ZonesCooledNum=1,NumZonesCooled ! loop over the cooled zones
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesCooledNum)
! sum up the heating mass flow rate for this time step
SysSizing(AirLoopNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay) = &
SysSizing(AirLoopNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay) + &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay) / (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
! calculate the return air temperature for this time step
SysHeatRetTemp = SysHeatRetTemp + ZoneSizing(CtrlZoneNum,CurOverallSimDay)%HeatZoneRetTempSeq(TimeStepInDay) * &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay) &
/ (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
SysHeatRetHumRat = SysHeatRetHumRat + ZoneSizing(CtrlZoneNum,CurOverallSimDay)%HeatZoneHumRatSeq(TimeStepInDay) * &
ZoneSizing(CtrlZoneNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay) &
/ (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
END DO ! end of cooled zones loop
IF (SysSizing(AirLoopNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay) > 0.0d0) THEN
! complete return air temp calc
SysHeatRetTemp = SysHeatRetTemp / SysSizing(AirLoopNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay)
SysHeatRetHumRat = SysHeatRetHumRat / SysSizing(AirLoopNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay)
SysSizing(AirLoopNum,CurOverallSimDay)%SysHeatRetTempSeq(TimeStepInDay) = SysHeatRetTemp
SysSizing(AirLoopNum,CurOverallSimDay)%SysHeatRetHumRatSeq(TimeStepInDay) = SysHeatRetHumRat
! calculate the outside air fraction for this time step
RhoAir = StdRhoAir
IF (SysSizing(AirLoopNum,CurOverallSimDay)%HeatOAOption == MinOA) THEN
OutAirFrac = RhoAir*SysSizing(AirLoopNum,CurOverallSimDay)%DesOutAirVolFlow / &
SysSizing(AirLoopNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay)
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
ELSE
OutAirFrac = 1.0d0
END IF
! calculate the mixed air temperature
SysHeatMixTemp = OutDryBulbTemp*OutAirFrac + SysHeatRetTemp*(1.0d0-OutAirFrac)
SysHeatMixHumRat = OutHumRat*OutAirFrac + SysHeatRetHumRat*(1.0d0-OutAirFrac)
SysSizing(AirLoopNum,CurOverallSimDay)%SysHeatOutTempSeq(TimeStepInDay) = OutDryBulbTemp
SysSizing(AirLoopNum,CurOverallSimDay)%SysHeatOutHumRatSeq(TimeStepInDay) = OutHumRat
! From the mixed air temp, heating supply air temp, and mass flow rate calculate the system heating capacity
SysHeatCap = PsyCpAirFnWTdb(constant_zero,constant_twenty) * &
SysSizing(AirLoopNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay) * &
( SysSizing(AirLoopNum,CurOverallSimDay)%HeatSupTemp - SysHeatMixTemp )
SysHeatCap = MAX(0.0d0,SysHeatCap)
! save the system heating capacity for the time step
SysSizing(AirLoopNum,CurOverallSimDay)%HeatCapSeq(TimeStepInDay) = SysHeatCap
END IF ! end system flow rate IF
! Get the maximum system heating capacity
IF (SysHeatCap > SysSizing(AirLoopNum,CurOverallSimDay)%HeatCap) THEN
SysSizing(AirLoopNum,CurOverallSimDay)%HeatCap = SysHeatCap
SysSizing(AirLoopNum,CurOverallSimDay)%HeatMixTemp = SysHeatMixTemp
SysSizing(AirLoopNum,CurOverallSimDay)%HeatMixHumRat = SysHeatMixHumRat
SysSizing(AirLoopNum,CurOverallSimDay)%HeatRetTemp = SysHeatRetTemp
SysSizing(AirLoopNum,CurOverallSimDay)%HeatRetHumRat = SysHeatRetHumRat
SysSizing(AirLoopNum,CurOverallSimDay)%HeatOutTemp = OutDryBulbTemp
SysSizing(AirLoopNum,CurOverallSimDay)%HeatOutHumRat = OutHumRat
END IF ! Get the maximum system heating flow rate
SysSizing(AirLoopNum,CurOverallSimDay)%CoinHeatMassFlow = &
MAX(SysSizing(AirLoopNum,CurOverallSimDay)%CoinHeatMassFlow, &
SysSizing(AirLoopNum,CurOverallSimDay)%HeatFlowSeq(TimeStepInDay))
END IF
END DO ! end of loop over primary air systems
CASE (EndDay)
! Get design flows
SysCoolingEv = 1.0d0
SysHeatingEv = 1.0d0
DO AirLoopNum=1,NumPrimaryAirSys
NumZonesCooled = AirToZoneNodeInfo(AirLoopNum)%NumZonesCooled
NumZonesHeated = AirToZoneNodeInfo(AirLoopNum)%NumZonesHeated
SELECT CASE(SysSizing(AirLoopNum,CurOverallSimDay)%SizingOption)
CASE(Coincident)
IF (FinalSysSizing(AirLoopNum)%SystemOAMethod == SOAM_ZoneSum) THEN
SysSizing(AirLoopNum,CurOverallSimDay)%DesCoolVolFlow = SysSizing(AirLoopNum,CurOverallSimDay)%CoinCoolMassFlow / &
StdRhoAir
SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow = SysSizing(AirLoopNum,CurOverallSimDay)%CoinHeatMassFlow / &
StdRhoAir
ELSEIF (FinalSysSizing(AirLoopNum)%SystemOAMethod == SOAM_VRP) THEN ! Ventilation Rate Procedure
! cooling
SysSizing(AirLoopNum,CurOverallSimDay)%DesCoolVolFlow = SysSizing(AirLoopNum,CurOverallSimDay)%CoinCoolMassFlow / &
StdRhoAir
IF (SysSizing(AirLoopNum,CurOverallSimDay)%DesCoolVolFlow > 0) THEN
OutAirFrac = SysSizing(AirLoopNum,CurOverallSimDay)%DesOutAirVolFlow / &
SysSizing(AirLoopNum,CurOverallSimDay)%DesCoolVolFlow
ELSE
OutAirFrac = 0.0d0
ENDIF
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
IF (SysSizing(AirLoopNum,CurOverallSimDay)%DesCoolVolFlow > 0) THEN
Xs = MIN(1.0d0,FinalSysSizing(AirLoopNum)%SysUncOA / SysSizing(AirLoopNum,CurOverallSimDay)%DesCoolVolFlow)
ELSE
Xs = 0.0d0
ENDIF
IF (FinalSysSizing(AirLoopNum)%OAAutosized .AND. SysSizing(AirLoopNum,CurOverallSimDay)%DesCoolVolFlow > 0) THEN
NumZonesCooled = AirToZoneNodeInfo(AirLoopNum)%NumZonesCooled
MinCoolingEvz = 1.0d0
VozSumClgBySys(AirLoopNum) = 0.0d0
DO ZonesCooledNum=1,NumZonesCooled
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesCooledNum)
! Zone air secondary recirculation fraction
Er = FinalZoneSizing(CtrlZoneNum)%ZoneSecondaryRecirculation
Ep = FinalZoneSizing(CtrlZoneNum)%ZonePrimaryAirFraction
ZoneOAFrac = FinalZoneSizing(CtrlZoneNum)%ZpzClgByZone
ZoneEz = FinalZoneSizing(CtrlZoneNum)%ZoneADEffCooling
IF (Er > 0.0d0) THEN
! multi-path ventilation system using VRP
Fa = Ep + (1.0d0 - Ep) * Er
Fb = Ep
Fc = 1.0d0 - (1.0d0 - ZoneEz)*(1.0d0 - Er)*(1.0d0 - Ep)
!save Fa Fb and Fc for standard 62.1 report
FaByZoneCool(CtrlZoneNum) = Fa
FbByZoneCool(CtrlZoneNum) = Fb
FcByZoneCool(CtrlZoneNum) = Fc
! Calc zone ventilation efficiency
IF (Fa > 0.0d0) THEN
SysCoolingEv = 1.0d0 + Xs * Fb / Fa - ZoneOAFrac * Ep * Fc / Fa
ELSE
SysCoolingEv = 1.0d0
ENDIF
ELSE
! single-path ventilation system
SysCoolingEv = 1.0d0 + Xs - ZoneOAFrac
ENDIF
IF (SysCoolingEv < MinCoolingEvz) MinCoolingEvz = SysCoolingEv
EvzByZoneCoolPrev(CtrlZoneNum) = EvzByZoneCool(CtrlZoneNum) ! Save previous EvzByZoneCool
EvzByZoneCool(CtrlZoneNum) = SysCoolingEv
VozSumClgBySys(AirLoopNum) = VozSumClgBySys(AirLoopNum) + FinalZoneSizing(CtrlZoneNum)%VozClgByZone
END DO
IF (MinCoolingEvz > 0) THEN
! (However, I don't think people diversity can be done correctly in E+ Sizing so assuming D=1 in this equation
!Vou = Diversity*(Rp*Pz) + Ra*Az
Vou = FinalSysSizing(AirLoopNum)%SysUncOA
Vot = Vou / MinCoolingEvz
IF (Vot > VotClgBySys(AirLoopNum)) THEN
!This might be the cooling design day so only update if Vot is larger than the previous
VotClgBySys(AirLoopNum) = Vot
XsBySysCool(AirLoopNum) = Xs
EvzMinBySysCool(AirLoopNum) = MinCoolingEvz
ELSE
!Restore EvzByZoneCool() since it was reset by the current (but not highest Vot) design day
DO ZonesCooledNum=1,NumZonesCooled
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesCooledNum)
EvzByZoneCool(CtrlZoneNum)= EvzByZoneCoolPrev(CtrlZoneNum)
ENDDO
ENDIF
END IF
ENDIF
! heating
SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow = &
SysSizing(AirLoopNum,CurOverallSimDay)%CoinHeatMassFlow / StdRhoAir
IF (SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow > 0) THEN
OutAirFrac = SysSizing(AirLoopNum,CurOverallSimDay)%DesOutAirVolFlow / &
SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow
ELSE
OutAirFrac = 0.0d0
END IF
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
! This is a bit of a cludge. If the design zone heating airflows were increased due to
! the MaxZoneOaFraction, then the SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow
! variable will be out of sync with the
IF (FinalSysSizing(AirLoopNum)%MaxZoneOAFraction > 0 .AND. &
FinalSysSizing(AirLoopNum)%HeatAirDesMethod == FromDDCalc) THEN
SysHtgPeakAirflow = 0.0d0
IF (NumZonesHeated > 0) THEN
DO ZonesHeatedNum=1,NumZonesHeated
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%HeatCtrlZoneNums(ZonesHeatedNum)
SysHtgPeakAirflow = SysHtgPeakAirflow + FinalZoneSizing(CtrlZoneNum)%DesHeatVolFlow
ENDDO
ELSE
DO ZonesHeatedNum=1,NumZonesCooled
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesHeatedNum)
SysHtgPeakAirflow = SysHtgPeakAirflow + FinalZoneSizing(CtrlZoneNum)%DesHeatVolFlow
ENDDO
ENDIF
ELSE
SysHtgPeakAirflow = SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow
ENDIF
IF (SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow > 0) THEN
! SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow may be out of sync with FinalZoneSizing(CtrlZoneNum)%DesHeatVolFlow
Xs = MIN(1.0d0,FinalSysSizing(AirLoopNum)%SysUncOA / &
MAX(SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow, SysHtgPeakAirflow))
ELSE
Xs = 0.0d0
END IF
IF (FinalSysSizing(AirLoopNum)%OAAutosized .AND. SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow > 0) THEN
NumZonesHeated = AirToZoneNodeInfo(AirLoopNum)%NumZonesHeated
MinHeatingEvz = 1.0d0
VozSumHtgBySys(AirLoopNum) = 0.0d0
IF (NumZonesHeated > 0) THEN
DO ZonesHeatedNum=1,NumZonesHeated
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%HeatCtrlZoneNums(ZonesHeatedNum)
MatchingCooledZoneNum = FindNumberinList(CtrlZoneNum,AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums, &
NumZonesCooled)
IF (MatchingCooledZoneNum == 0) THEN
! Zone air secondary recirculation fraction
Er = FinalZoneSizing(CtrlZoneNum)%ZoneSecondaryRecirculation
Ep = FinalZoneSizing(CtrlZoneNum)%ZonePrimaryAirFractionHtg
ZoneOAFrac = FinalZoneSizing(CtrlZoneNum)%ZpzHtgByZone
ZoneEz = FinalZoneSizing(CtrlZoneNum)%ZoneADEffHeating
IF (Er > 0.0d0) THEN
! multi-path ventilation system using VRP
Fa = Ep + (1.0d0 - Ep) * Er
Fb = Ep
Fc = 1.0d0 - (1.0d0 - ZoneEz)*(1.0d0 - Er)*(1.0d0 - Ep)
!save Fa Fb and Fc for standard 62.1 report
FaByZoneHeat(CtrlZoneNum) = Fa
FbByZoneHeat(CtrlZoneNum) = Fb
FcByZoneHeat(CtrlZoneNum) = Fc
! Calc zone ventilation efficiency
IF (Fa > 0.0d0) THEN
SysHeatingEv = 1.0d0 + Xs * Fb / Fa - ZoneOAFrac * Ep * Fc / Fa
ELSE
SysHeatingEv = 1.0d0
ENDIF
ELSE
! single-path ventilation system
SysHeatingEv = 1.0d0 + Xs - ZoneOAFrac
ENDIF
IF (SysHeatingEv < MinHeatingEvz) MinHeatingEvz = SysHeatingEv
EvzByZoneHeatPrev(CtrlZoneNum) = EvzByZoneHeat(CtrlZoneNum) ! Save previous EvzByZoneHeat
EvzByZoneHeat(CtrlZoneNum) = SysHeatingEv
VozSumHtgBySys(AirLoopNum) = VozSumHtgBySys(AirLoopNum) + FinalZoneSizing(CtrlZoneNum)%VozHtgByZone
END IF
END DO
ELSE
DO ZonesHeatedNum=1,NumZonesCooled
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesHeatedNum)
! Zone air secondary recirculation fraction
Er = FinalZoneSizing(CtrlZoneNum)%ZoneSecondaryRecirculation
Ep = FinalZoneSizing(CtrlZoneNum)%ZonePrimaryAirFractionHtg
ZoneOAFrac = FinalZoneSizing(CtrlZoneNum)%ZpzHtgByZone
ZoneEz = FinalZoneSizing(CtrlZoneNum)%ZoneADEffHeating
IF (Er > 0.0d0) THEN
! multi-path ventilation system using VRP
Fa = Ep + (1.0d0 - Ep) * Er
Fb = Ep
Fc = 1.0d0 - (1.0d0 - ZoneEz)*(1.0d0 - Er)*(1.0d0 - Ep)
!save Fa Fb and Fc for standard 62.1 report
FaByZoneHeat(CtrlZoneNum) = Fa
FbByZoneHeat(CtrlZoneNum) = Fb
FcByZoneHeat(CtrlZoneNum) = Fc
! Calc zone ventilation efficiency
IF (Fa > 0.0d0) THEN
SysHeatingEv = 1.0d0 + Xs * Fb / Fa - ZoneOAFrac * Ep * Fc / Fa
ELSE
SysHeatingEv = 1.0d0
ENDIF
ELSE
! single-path ventilation system
SysHeatingEv = 1.0d0 + Xs - ZoneOAFrac
ENDIF
IF (SysHeatingEv < MinHeatingEvz) MinHeatingEvz = SysHeatingEv
EvzByZoneHeatPrev(CtrlZoneNum) = EvzByZoneHeat(CtrlZoneNum) ! Save previous EvzByZoneHeat
EvzByZoneHeat(CtrlZoneNum) = SysHeatingEv
VozSumHtgBySys(AirLoopNum) = VozSumHtgBySys(AirLoopNum) + FinalZoneSizing(CtrlZoneNum)%VozHtgByZone
END DO
END IF
IF (MinHeatingEvz > 0) THEN
! Std 62.1-2010, section 6.2.5.4: Eq. 6.6
! (However, I don't think people diversity can be done correctly in E+ Sizing so assuming D=1 in this equation
!Vou = Diversity*(Rp*Pz) + Ra*Az
Vou = FinalSysSizing(AirLoopNum)%SysUncOA
Vot = Vou / MinHeatingEvz
IF (Vot > VotHtgBySys(AirLoopNum)) THEN
!This might be the cooling design day so only update if Vot is larger than the previous
VotHtgBySys(AirLoopNum) = Vot
XsBySysHeat(AirLoopNum) = Xs
EvzMinBySysHeat(AirLoopNum) = MinHeatingEvz
ELSE
!Restore EvzByZoneHeat() since it was reset by the current (but not highest Vot) design day
IF (NumZonesHeated > 0) THEN
DO ZonesHeatedNum=1,NumZonesHeated
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%HeatCtrlZoneNums(ZonesHeatedNum)
EvzByZoneHeat(CtrlZoneNum)= EvzByZoneHeatPrev(CtrlZoneNum)
ENDDO
ELSE
DO ZonesHeatedNum=1,NumZonesCooled
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesHeatedNum)
EvzByZoneHeat(CtrlZoneNum)= EvzByZoneHeatPrev(CtrlZoneNum)
ENDDO
ENDIF
ENDIF
END IF
ENDIF
ELSE ! error
END IF
SysSizing(AirLoopNum,CurOverallSimDay)%DesMainVolFlow = &
MAX(SysSizing(AirLoopNum,CurOverallSimDay)%DesCoolVolFlow, SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow)
CASE(NonCoincident)
IF (FinalSysSizing(AirLoopNum)%SystemOAMethod == SOAM_ZoneSum) THEN
SysSizing(AirLoopNum,CurOverallSimDay)%DesCoolVolFlow = &
SysSizing(AirLoopNum,CurOverallSimDay)%NonCoinCoolMassFlow / StdRhoAir
SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow = &
SysSizing(AirLoopNum,CurOverallSimDay)%NonCoinHeatMassFlow / StdRhoAir
ELSEIF (FinalSysSizing(AirLoopNum)%SystemOAMethod == SOAM_VRP) THEN ! Ventilation Rate Procedure
! cooling
SysSizing(AirLoopNum,CurOverallSimDay)%DesCoolVolFlow = &
SysSizing(AirLoopNum,CurOverallSimDay)%NonCoinCoolMassFlow / StdRhoAir
IF (SysSizing(AirLoopNum,CurOverallSimDay)%DesCoolVolFlow > 0) THEN
OutAirFrac = SysSizing(AirLoopNum,CurOverallSimDay)%DesOutAirVolFlow / &
SysSizing(AirLoopNum,CurOverallSimDay)%DesCoolVolFlow
ELSE
OutAirFrac = 0.0d0
END IF
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
IF (SysSizing(AirLoopNum,CurOverallSimDay)%DesCoolVolFlow > 0) THEN
Xs = MIN(1.0d0,FinalSysSizing(AirLoopNum)%SysUncOA / SysSizing(AirLoopNum,CurOverallSimDay)%DesCoolVolFlow)
ELSE
Xs = 0.0d0
ENDIF
IF (FinalSysSizing(AirLoopNum)%OAAutosized .AND. SysSizing(AirLoopNum,CurOverallSimDay)%DesCoolVolFlow > 0) THEN
NumZonesCooled = AirToZoneNodeInfo(AirLoopNum)%NumZonesCooled
MinCoolingEvz = 1.0d0
VozSumClgBySys(AirLoopNum) = 0.0d0
DO ZonesCooledNum=1,NumZonesCooled
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesCooledNum)
! Zone air secondary recirculation fraction
Er = FinalZoneSizing(CtrlZoneNum)%ZoneSecondaryRecirculation
Ep = FinalZoneSizing(CtrlZoneNum)%ZonePrimaryAirFraction
ZoneOAFrac = FinalZoneSizing(CtrlZoneNum)%ZpzClgByZone
ZoneEz = FinalZoneSizing(CtrlZoneNum)%ZoneADEffCooling
IF (Er > 0.0d0) THEN
! multi-path ventilation system using VRP
Fa = Ep + (1.0d0 - Ep) * Er
Fb = Ep
Fc = 1.0d0 - (1.0d0 - ZoneEz)*(1.0d0 - Er)*(1.0d0 - Ep)
!save Fa Fb and Fc for standard 62.1 report
FaByZoneCool(CtrlZoneNum) = Fa
FbByZoneCool(CtrlZoneNum) = Fb
FcByZoneCool(CtrlZoneNum) = Fc
! Calc zone ventilation efficiency
IF (Fa > 0.0d0) THEN
SysCoolingEv = 1.0d0 + Xs * Fb / Fa - ZoneOAFrac * Ep * Fc / Fa
ELSE
SysCoolingEv = 1.0d0
ENDIF
ELSE
! single-path ventilation system
SysCoolingEv = 1.0d0 + Xs - ZoneOAFrac
END IF
IF (SysCoolingEv < MinCoolingEvz) MinCoolingEvz = SysCoolingEv
EvzByZoneCoolPrev(CtrlZoneNum) = EvzByZoneCool(CtrlZoneNum)
EvzByZoneCool(CtrlZoneNum) = SysCoolingEv
VozSumClgBySys(AirLoopNum) = VozSumClgBySys(AirLoopNum) + FinalZoneSizing(CtrlZoneNum)%VozClgByZone
END DO
IF (MinCoolingEvz > 0) THEN
! Std 62.1-2010, section 6.2.5.4: Eq. 6.6
! (However, I don't think people diversity can be done correctly in E+ Sizing so assuming D=1 in this equation
!Vou = Diversity*(Rp*Pz) + Ra*Az
Vou = FinalSysSizing(AirLoopNum)%SysUncOA
Vot = Vou / MinCoolingEvz
IF (Vot > VotClgBySys(AirLoopNum)) THEN
!This might be the cooling design day so only update if Vot is larger than the previous
VotClgBySys(AirLoopNum) = Vot
XsBySysCool(AirLoopNum) = Xs
EvzMinBySysCool(AirLoopNum) = MinCoolingEvz
ELSE
!Restore EvzByZoneCool() since it was reset by the current (but not highest Vot) design day
DO ZonesCooledNum=1,NumZonesCooled
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesCooledNum)
EvzByZoneCool(CtrlZoneNum)= EvzByZoneCoolPrev(CtrlZoneNum)
ENDDO
ENDIF
END IF
END IF
! heating
SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow = &
SysSizing(AirLoopNum,CurOverallSimDay)%NonCoinHeatMassFlow / StdRhoAir
IF (SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow > 0) THEN
OutAirFrac = SysSizing(AirLoopNum,CurOverallSimDay)%DesOutAirVolFlow / &
SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow
ELSE
OutAirFrac = 0.0d0
END IF
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
IF (SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow > 0) THEN
Xs = MIN(1.0d0,FinalSysSizing(AirLoopNum)%SysUncOA / SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow)
ELSE
Xs = 0.0d0
END IF
IF (FinalSysSizing(AirLoopNum)%OAAutosized .AND. SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow > 0) THEN
NumZonesHeated = AirToZoneNodeInfo(AirLoopNum)%NumZonesHeated
MinHeatingEvz = 1.0d0
VozSumHtgBySys(AirLoopNum) = 0.0d0
IF (NumZonesHeated > 0) THEN
DO ZonesHeatedNum=1,NumZonesHeated
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%HeatCtrlZoneNums(ZonesHeatedNum)
MatchingCooledZoneNum = FindNumberinList(CtrlZoneNum,AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums, &
NumZonesCooled)
IF (MatchingCooledZoneNum == 0) THEN
! Zone air secondary recirculation fraction
Er = FinalZoneSizing(CtrlZoneNum)%ZoneSecondaryRecirculation
Ep = FinalZoneSizing(CtrlZoneNum)%ZonePrimaryAirFractionHtg
ZoneOAFrac = FinalZoneSizing(CtrlZoneNum)%ZpzHtgByZone
ZoneEz = FinalZoneSizing(CtrlZoneNum)%ZoneADEffHeating
IF (Er > 0.0d0) THEN
! multi-path ventilation system using VRP
Fa = Ep + (1.0d0 - Ep) * Er
Fb = Ep
Fc = 1.0d0 - (1.0d0 - ZoneEz)*(1.0d0 - Er)*(1.0d0 - Ep)
! Calc zone ventilation efficiency
IF (Fa > 0.0d0) THEN
SysHeatingEv = 1.0d0 + Xs * Fb / Fa - ZoneOAFrac * Ep * Fc / Fa
ELSE
SysHeatingEv = 1.0d0
END IF
ELSE
! single-path ventilation system
SysHeatingEv = 1.0d0 + Xs - ZoneOAFrac
END IF
END IF
IF (SysHeatingEv < MinHeatingEvz) MinHeatingEvz = SysHeatingEv
EvzByZoneHeatPrev(CtrlZoneNum) = EvzByZoneHeat(CtrlZoneNum) ! Save previous EvzByZoneHeat
EvzByZoneHeat(CtrlZoneNum) = SysHeatingEv
VozSumHtgBySys(AirLoopNum) = VozSumHtgBySys(AirLoopNum) + FinalZoneSizing(CtrlZoneNum)%VozHtgByZone
END DO
ELSE
NumZonesCooled = AirToZoneNodeInfo(AirLoopNum)%NumZonesCooled
DO ZonesHeatedNum=1,NumZonesCooled
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesHeatedNum)
! Zone air secondary recirculation fraction
Er = FinalZoneSizing(CtrlZoneNum)%ZoneSecondaryRecirculation
Ep = FinalZoneSizing(CtrlZoneNum)%ZonePrimaryAirFractionHtg
ZoneOAFrac = FinalZoneSizing(CtrlZoneNum)%ZpzHtgByZone
ZoneEz = FinalZoneSizing(CtrlZoneNum)%ZoneADEffHeating
IF (Er > 0.0d0) THEN
! multi-path ventilation system using VRP
Fa = Ep + (1.0d0 - Ep) * Er
Fb = Ep
Fc = 1.0d0 - (1.0d0 - ZoneEz)*(1.0d0 - Er)*(1.0d0 - Ep)
! Calc zone ventilation efficiency
IF (Fa > 0.0d0) THEN
SysHeatingEv = 1.0d0 + Xs * Fb / Fa - ZoneOAFrac * Ep * Fc / Fa
ELSE
SysHeatingEv = 1.0d0
END IF
ELSE
! single-path ventilation system
SysHeatingEv = 1.0d0 + Xs - ZoneOAFrac
END IF
IF (SysHeatingEv < MinHeatingEvz) MinHeatingEvz = SysHeatingEv
EvzByZoneHeatPrev(CtrlZoneNum) = EvzByZoneHeat(CtrlZoneNum) ! Save previous EvzByZoneHeat
EvzByZoneHeat(CtrlZoneNum) = SysHeatingEv
VozSumHtgBySys(AirLoopNum) = VozSumHtgBySys(AirLoopNum) + FinalZoneSizing(CtrlZoneNum)%VozHtgByZone
END DO
END IF
IF (MinHeatingEvz > 0) THEN
! Std 62.1-2010, section 6.2.5.4: Eq. 6.6
! (However, I don't think people diversity can be done correctly in E+ Sizing so assuming D=1 in this equation
!Vou = Diversity*(Rp*Pz) + Ra*Az
Vou = FinalSysSizing(AirLoopNum)%SysUncOA
Vot = Vou / MinHeatingEvz
IF (Vot > VotHtgBySys(AirLoopNum)) THEN
!This might be the cooling design day so only update if Vot is larger than the previous
VotHtgBySys(AirLoopNum) = Vot
XsBySysHeat(AirLoopNum) = Xs
EvzMinBySysHeat(AirLoopNum) = MinHeatingEvz
ELSE
!Restore EvzByZoneHeat() since it was just reset by the current (but not highest Vot) design day
IF (NumZonesHeated > 0) THEN
DO ZonesHeatedNum=1,NumZonesHeated
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%HeatCtrlZoneNums(ZonesHeatedNum)
EvzByZoneHeat(CtrlZoneNum)= EvzByZoneHeatPrev(CtrlZoneNum)
ENDDO
ELSE
DO ZonesHeatedNum=1,NumZonesCooled
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesHeatedNum)
EvzByZoneHeat(CtrlZoneNum)= EvzByZoneHeatPrev(CtrlZoneNum)
ENDDO
ENDIF
ENDIF
END IF
END IF
ELSE ! error
END IF
SysSizing(AirLoopNum,CurOverallSimDay)%DesMainVolFlow = MAX(SysSizing(AirLoopNum,CurOverallSimDay)%DesCoolVolFlow, &
SysSizing(AirLoopNum,CurOverallSimDay)%DesHeatVolFlow)
END SELECT
! If the ventilation was autosized using the ASHRAE VRP method, then the design zone ventilation value
! must be based on the larger of the system-level cooling Vot and/or heating Vot
IF (FinalSysSizing(AirLoopNum)%OAAutosized .AND. FinalSysSizing(AirLoopNum)%SystemOAMethod == SOAM_VRP) THEN
VotMax = MAX(VotClgBySys(AirLoopNum), VotHtgBySys(AirLoopNum))
!Reset the system level ventilation
FinalSysSizing(AirLoopNum)%DesOutAirVolFlow = VotMax
CalcSysSizing(AirLoopNum)%DesOutAirVolFlow = VotMax
IF (VotClgBySys(AirLoopNum) >= VotHtgBySys(AirLoopNum)) THEN
!**Reset zone min ventilation based on max cooling Vot
!The system-level Vot will always be larger than the sum of the zone Voz
! and so the zone-level Voz must be prorated so their sum equals the system level Vot
Ratio = 1.0d0
IF (VozSumClgBySys(AirLoopNum) > 0) Ratio = VotClgBySys(AirLoopNum)/ VozSumClgBySys(AirLoopNum)
DO ZonesCooledNum=1,NumZonesCooled
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesCooledNum)
FinalZoneSizing(CtrlZoneNum)%MinOA = Ratio*FinalZoneSizing(CtrlZoneNum)%VozClgByZone
ENDDO
ELSE
!**Reset zone min ventilation based on max heating Vot
!What are number of zones attached to this ventilation-fed AHU
NumZonesHeated = AirToZoneNodeInfo(AirLoopNum)%NumZonesHeated
NumZonesForHtg = NumZonesHeated
IF (NumZonesHeated == 0) NumZonesHeated = NumZonesCooled
!The system-level Vot will always be larger than the sum of the zone Voz
! and so the zone-level Voz must be prorated so their sum equals the system level Vot
Ratio = 1.0d0
IF (VozSumHtgBySys(AirLoopNum) > 0) Ratio = VotHtgBySys(AirLoopNum)/VozSumHtgBySys(AirLoopNum)
DO ZonesHeatedNum=1,NumZonesForHtg
IF (NumZonesHeated == 0) THEN
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesHeatedNum)
ELSE
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%HeatCtrlZoneNums(ZonesHeatedNum)
ENDIF
FinalZoneSizing(CtrlZoneNum)%MinOA = Ratio*FinalZoneSizing(CtrlZoneNum)%VozHtgByZone
ENDDO
ENDIF
ENDIF
END DO
CASE (EndSysSizingCalc)
! Correct the zone return temperature in FinalZoneSizing for the case of induction units. The calc in
! ZoneEquipmentManager assumes all the air entering the zone goes into the return node.
DO CtrlZoneNum=1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZoneNum)%IsControlled) CYCLE
termunitsizingtemp=(1.d0+TermUnitSizing(CtrlZoneNum)%InducRat)
termunitsizingtempfrac=(1.0d0/termunitsizingtemp)
RetTempRise = FinalZoneSizing(CtrlZoneNum)%ZoneRetTempAtCoolPeak - &
FinalZoneSizing(CtrlZoneNum)%ZoneTempAtCoolPeak
IF (RetTempRise > 0.01d0) THEN
!avoid possible compiler bug
! FinalZoneSizing(CtrlZoneNum)%ZoneRetTempAtCoolPeak = &
! FinalZoneSizing(CtrlZoneNum)%ZoneTempAtCoolPeak + RetTempRise * &
! (1.d0/(1.d0+TermUnitSizing(CtrlZoneNum)%InducRat))
FinalZoneSizing(CtrlZoneNum)%ZoneRetTempAtCoolPeak = &
FinalZoneSizing(CtrlZoneNum)%ZoneTempAtCoolPeak + &
RetTempRise * termunitsizingtempfrac
END IF
RetTempRise = FinalZoneSizing(CtrlZoneNum)%ZoneRetTempAtHeatPeak - &
FinalZoneSizing(CtrlZoneNum)%ZoneTempAtHeatPeak
IF (RetTempRise > 0.01d0) THEN
!avoid possible compiler bug
! FinalZoneSizing(CtrlZoneNum)%ZoneRetTempAtHeatPeak = &
! FinalZoneSizing(CtrlZoneNum)%ZoneTempAtHeatPeak + RetTempRise * &
! (1.d0/(1.d0+TermUnitSizing(CtrlZoneNum)%InducRat))
FinalZoneSizing(CtrlZoneNum)%ZoneRetTempAtHeatPeak = &
FinalZoneSizing(CtrlZoneNum)%ZoneTempAtHeatPeak + &
RetTempRise * termunitsizingtempfrac
END IF
DO TimeStepIndex=1,NumOfTimeStepInDay
RetTempRise = FinalZoneSizing(CtrlZoneNum)%CoolZoneRetTempSeq(TimeStepIndex) - &
FinalZoneSizing(CtrlZoneNum)%CoolZoneTempSeq(TimeStepIndex)
IF (RetTempRise > 0.01d0) THEN
!avoid possible compiler bug
! FinalZoneSizing(CtrlZoneNum)%CoolZoneRetTempSeq(TimeStepIndex) = &
! FinalZoneSizing(CtrlZoneNum)%CoolZoneTempSeq(TimeStepIndex) + RetTempRise * &
! (1.d0/(1.d0+TermUnitSizing(CtrlZoneNum)%InducRat))
FinalZoneSizing(CtrlZoneNum)%CoolZoneRetTempSeq(TimeStepIndex) = &
FinalZoneSizing(CtrlZoneNum)%CoolZoneTempSeq(TimeStepIndex) + &
RetTempRise * termunitsizingtempfrac
END IF
RetTempRise = FinalZoneSizing(CtrlZoneNum)%HeatZoneRetTempSeq(TimeStepIndex) - &
FinalZoneSizing(CtrlZoneNum)%HeatZoneTempSeq(TimeStepIndex)
IF (RetTempRise > 0.01d0) THEN
!avoid possible compiler bug
! FinalZoneSizing(CtrlZoneNum)%HeatZoneRetTempSeq(TimeStepIndex) = &
! FinalZoneSizing(CtrlZoneNum)%HeatZoneTempSeq(TimeStepIndex) + RetTempRise * &
! (1.d0/(1.d0+TermUnitSizing(CtrlZoneNum)%InducRat))
FinalZoneSizing(CtrlZoneNum)%HeatZoneRetTempSeq(TimeStepIndex) = &
FinalZoneSizing(CtrlZoneNum)%HeatZoneTempSeq(TimeStepIndex) + &
RetTempRise * termunitsizingtempfrac
END IF
END DO
END DO
! Get final design flows
DO AirLoopNum=1,NumPrimaryAirSys
! For coincident sizing, loop over design days and pick out the largest central heating amd
! cooling flow rates and associated data
DO DDNum=1,TotDesDays+TotRunDesPersDays
IF ( SysSizing(AirLoopNum,DDNum)%SensCoolCap > CalcSysSizing(AirLoopNum)%SensCoolCap ) THEN
CalcSysSizing(AirLoopNum)%DesCoolVolFlow = SysSizing(AirLoopNum,DDNum)%DesCoolVolFlow
CalcSysSizing(AirLoopNum)%CoolDesDay = SysSizing(AirLoopNum,DDNum)%CoolDesDay
CalcSysSizing(AirLoopNum)%CoinCoolMassFlow = SysSizing(AirLoopNum,DDNum)%CoinCoolMassFlow
CalcSysSizing(AirLoopNum)%SensCoolCap = SysSizing(AirLoopNum,DDNum)%SensCoolCap
CalcSysSizing(AirLoopNum)%CoolFlowSeq = SysSizing(AirLoopNum,DDNum)%CoolFlowSeq
CalcSysSizing(AirLoopNum)%SensCoolCapSeq = SysSizing(AirLoopNum,DDNum)%SensCoolCapSeq
CalcSysSizing(AirLoopNum)%CoolMixTemp = SysSizing(AirLoopNum,DDNum)%CoolMixTemp
CalcSysSizing(AirLoopNum)%CoolRetTemp = SysSizing(AirLoopNum,DDNum)%CoolRetTemp
CalcSysSizing(AirLoopNum)%CoolMixHumRat = SysSizing(AirLoopNum,DDNum)%CoolMixHumRat
CalcSysSizing(AirLoopNum)%CoolRetHumRat = SysSizing(AirLoopNum,DDNum)%CoolRetHumRat
CalcSysSizing(AirLoopNum)%CoolOutTemp = SysSizing(AirLoopNum,DDNum)%CoolOutTemp
CalcSysSizing(AirLoopNum)%CoolOutHumRat = SysSizing(AirLoopNum,DDNum)%CoolOutHumRat
CalcSysSizing(AirLoopNum)%SysCoolRetTempSeq = SysSizing(AirLoopNum,DDNum)%SysCoolRetTempSeq
CalcSysSizing(AirLoopNum)%SysCoolRetHumRatSeq = SysSizing(AirLoopNum,DDNum)%SysCoolRetHumRatSeq
CalcSysSizing(AirLoopNum)%SysCoolOutTempSeq = SysSizing(AirLoopNum,DDNum)%SysCoolOutTempSeq
CalcSysSizing(AirLoopNum)%SysCoolOutHumRatSeq = SysSizing(AirLoopNum,DDNum)%SysCoolOutHumRatSeq
END IF
IF ( SysSizing(AirLoopNum,DDNum)%HeatCap > CalcSysSizing(AirLoopNum)%HeatCap ) THEN
CalcSysSizing(AirLoopNum)%DesHeatVolFlow = SysSizing(AirLoopNum,DDNum)%DesHeatVolFlow
CalcSysSizing(AirLoopNum)%HeatDesDay = SysSizing(AirLoopNum,DDNum)%HeatDesDay
CalcSysSizing(AirLoopNum)%CoinHeatMassFlow = SysSizing(AirLoopNum,DDNum)%CoinHeatMassFlow
CalcSysSizing(AirLoopNum)%HeatCap = SysSizing(AirLoopNum,DDNum)%HeatCap
CalcSysSizing(AirLoopNum)%PreHeatCap = SysSizing(AirLoopNum,DDNum)%PreHeatCap
CalcSysSizing(AirLoopNum)%HeatFlowSeq = SysSizing(AirLoopNum,DDNum)%HeatFlowSeq
CalcSysSizing(AirLoopNum)%HeatCapSeq = SysSizing(AirLoopNum,DDNum)%HeatCapSeq
CalcSysSizing(AirLoopNum)%PreHeatCapSeq = SysSizing(AirLoopNum,DDNum)%PreHeatCapSeq
CalcSysSizing(AirLoopNum)%HeatMixTemp = SysSizing(AirLoopNum,DDNum)%HeatMixTemp
CalcSysSizing(AirLoopNum)%HeatRetTemp = SysSizing(AirLoopNum,DDNum)%HeatRetTemp
CalcSysSizing(AirLoopNum)%HeatMixHumRat = SysSizing(AirLoopNum,DDNum)%HeatMixHumRat
CalcSysSizing(AirLoopNum)%HeatRetHumRat = SysSizing(AirLoopNum,DDNum)%HeatRetHumRat
CalcSysSizing(AirLoopNum)%HeatOutTemp = SysSizing(AirLoopNum,DDNum)%HeatOutTemp
CalcSysSizing(AirLoopNum)%HeatOutHumRat = SysSizing(AirLoopNum,DDNum)%HeatOutHumRat
CalcSysSizing(AirLoopNum)%SysHeatRetTempSeq = SysSizing(AirLoopNum,DDNum)%SysHeatRetTempSeq
CalcSysSizing(AirLoopNum)%SysHeatRetHumRatSeq = SysSizing(AirLoopNum,DDNum)%SysHeatRetHumRatSeq
CalcSysSizing(AirLoopNum)%SysHeatOutTempSeq = SysSizing(AirLoopNum,DDNum)%SysHeatOutTempSeq
CalcSysSizing(AirLoopNum)%SysHeatOutHumRatSeq = SysSizing(AirLoopNum,DDNum)%SysHeatOutHumRatSeq
END IF
END DO
CalcSysSizing(AirLoopNum)%DesMainVolFlow = MAX(CalcSysSizing(AirLoopNum)%DesCoolVolFlow, &
CalcSysSizing(AirLoopNum)%DesHeatVolFlow)
! For noncoincident sizing, find the max heat and cool mass flow for each zone over all the
! design days. Then calculate the associated heating and cooling capacities.
NumZonesCooled = AirToZoneNodeInfo(AirLoopNum)%NumZonesCooled
NumZonesHeated = AirToZoneNodeInfo(AirLoopNum)%NumZonesHeated
SysCoolRetTemp = 0.0d0
OutAirFrac = 0.0d0
SysCoolMixTemp = 0.0d0
SysSensCoolCap = 0.0d0
CoolTimeStepNum = 0
CoolDDNum = 0
OutAirTemp = 0.0d0
OutAirHumRat = 0.0d0
SysCoolMixHumRat = 0.0d0
SysCoolRetHumRat = 0.0d0
SysCoolOutTemp = 0.0d0
SysCoolOutHumRat = 0.0d0
DO ZonesCooledNum=1,NumZonesCooled ! loop over cooled zones
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesCooledNum)
! save the system cooling supply air temp
FinalZoneSizing(CtrlZoneNum)%DesCoolCoilInTempTU = CalcSysSizing(AirLoopNum)%CoolSupTemp
! save the system cooling supply air hum rat
FinalZoneSizing(CtrlZoneNum)%DesCoolCoilInHumRatTU = CalcSysSizing(AirLoopNum)%CoolSupHumRat
IF (FinalZoneSizing(CtrlZoneNum)%DesCoolMassFlow <= 0.0d0) CYCLE
CalcSysSizing(AirLoopNum)%NonCoinCoolMassFlow = &
CalcSysSizing(AirLoopNum)%NonCoinCoolMassFlow + &
FinalZoneSizing(CtrlZoneNum)%DesCoolMassFlow / (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
SysCoolRetTemp = SysCoolRetTemp + FinalZoneSizing(CtrlZoneNum)%ZoneRetTempAtCoolPeak * &
FinalZoneSizing(CtrlZoneNum)%DesCoolMassFlow &
/ (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
SysCoolRetHumRat = SysCoolRetHumRat + FinalZoneSizing(CtrlZoneNum)%ZoneHumRatAtCoolPeak * &
FinalZoneSizing(CtrlZoneNum)%DesCoolMassFlow &
/ (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
CoolDDNum = FinalZoneSizing(CtrlZoneNum)%CoolDDNum
CoolTimeStepNum = FinalZoneSizing(CtrlZoneNum)%TimeStepNumAtCoolMax
OutAirTemp = OutAirTemp + DesDayWeath(CoolDDNum)%Temp(CoolTimeStepNum)* &
FinalZoneSizing(CtrlZoneNum)%DesCoolMassFlow / (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
OutAirHumRat = OutAirHumRat + DesDayWeath(CoolDDNum)%HumRat(CoolTimeStepNum)* &
FinalZoneSizing(CtrlZoneNum)%DesCoolMassFlow / (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
END DO
IF ( CalcSysSizing(AirLoopNum)%NonCoinCoolMassFlow > 0.0 ) THEN
SysCoolRetTemp = SysCoolRetTemp / CalcSysSizing(AirLoopNum)%NonCoinCoolMassFlow
SysCoolRetHumRat = SysCoolRetHumRat / CalcSysSizing(AirLoopNum)%NonCoinCoolMassFlow
OutAirTemp = OutAirTemp / CalcSysSizing(AirLoopNum)%NonCoinCoolMassFlow
OutAirHumRat = OutAirHumRat / CalcSysSizing(AirLoopNum)%NonCoinCoolMassFlow
SysCoolOutTemp = OutAirTemp
SysCoolOutHumRat = OutAirHumRat
RhoAir = StdRhoAir
IF (CalcSysSizing(AirLoopNum)%CoolOAOption == MinOA) THEN
OutAirFrac = RhoAir*CalcSysSizing(AirLoopNum)%DesOutAirVolFlow / &
CalcSysSizing(AirLoopNum)%NonCoinCoolMassFlow
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
ELSE
OutAirFrac = 1.0d0
END IF
SysCoolMixTemp = OutAirTemp*OutAirFrac + SysCoolRetTemp*(1.d0-OutAirFrac)
SysCoolMixHumRat = OutAirHumRat*OutAirFrac + SysCoolRetHumRat*(1.d0-OutAirFrac)
SysSensCoolCap = PsyCpAirFnWTdb(constant_zero,constant_twenty) * CalcSysSizing(AirLoopNum)%NonCoinCoolMassFlow * &
(SysCoolMixTemp - CalcSysSizing(AirLoopNum)%CoolSupTemp)
SysSensCoolCap = MAX(0.0d0,SysSensCoolCap)
END IF
SysHeatRetTemp = 0.0d0
OutAirFrac = 0.0d0
SysHeatMixTemp = 0.0d0
SysHeatCap = 0.0d0
HeatTimeStepNum = 0
HeatDDNum = 0
OutAirTemp = 0.0d0
OutAirHumRat = 0.0d0
SysHeatMixHumRat = 0.0d0
SysHeatRetHumRat = 0.0d0
SysHeatOutTemp = 0.0d0
SysHeatOutHumRat = 0.0d0
IF (NumZonesHeated.GT.0) THEN ! IF there are centrally heated zones
DO ZonesHeatedNum=1,NumZonesHeated ! loop over the heated zones
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%HeatCtrlZoneNums(ZonesHeatedNum)
! save the system heating supply air temp
FinalZoneSizing(CtrlZoneNum)%DesHeatCoilInTempTU = CalcSysSizing(AirLoopNum)%HeatSupTemp
! save the system heating supply air hum rat
FinalZoneSizing(CtrlZoneNum)%DesHeatCoilInHumRatTU= CalcSysSizing(AirLoopNum)%HeatSupHumRat
IF (FinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow <= 0.0d0) CYCLE
CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow = &
CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow + &
FinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow / (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
SysHeatRetTemp = SysHeatRetTemp + FinalZoneSizing(CtrlZoneNum)%ZoneRetTempAtHeatPeak * &
FinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow &
/ (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
SysHeatRetHumRat = SysHeatRetHumRat + FinalZoneSizing(CtrlZoneNum)%ZoneHumRatAtHeatPeak * &
FinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow &
/ (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
HeatDDNum = FinalZoneSizing(CtrlZoneNum)%HeatDDNum
HeatTimeStepNum = FinalZoneSizing(CtrlZoneNum)%TimeStepNumAtHeatMax
OutAirTemp = OutAirTemp + DesDayWeath(HeatDDNum)%Temp(HeatTimeStepNum) * &
FinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow / (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
OutAirHumRat = OutAirHumRat + DesDayWeath(HeatDDNum)%HumRat(HeatTimeStepNum) * &
FinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow / (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
END DO
IF ( CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow > 0.0d0 ) THEN
SysHeatRetTemp = SysHeatRetTemp / CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow
SysHeatRetHumRat = SysHeatRetHumRat / CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow
OutAirTemp = OutAirTemp / CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow
OutAirHumRat = OutAirHumRat / CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow
SysHeatOutTemp = OutAirTemp
SysHeatOutHumRat = OutAirHumRat
RhoAir = StdRhoAir
IF (CalcSysSizing(AirLoopNum)%HeatOAOption == MinOA) THEN
OutAirFrac = RhoAir*CalcSysSizing(AirLoopNum)%DesOutAirVolFlow / &
CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
ELSE
OutAirFrac = 1.0d0
END IF
SysHeatMixTemp = OutAirTemp*OutAirFrac + SysHeatRetTemp*(1.0d0-OutAirFrac)
SysHeatMixHumRat = OutAirHumRat*OutAirFrac + SysHeatRetHumRat*(1.0d0-OutAirFrac)
SysHeatCap = PsyCpAirFnWTdb(constant_zero,constant_twenty) * CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow * &
(CalcSysSizing(AirLoopNum)%HeatSupTemp - SysHeatMixTemp)
SysHeatCap = MAX(0.0d0,SysHeatCap)
END IF
ELSE ! No centrally heated zones: use cooled zones
DO ZonesCooledNum=1,NumZonesCooled ! loop over the cooled zones
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesCooledNum)
! save the system heating supply air temp
FinalZoneSizing(CtrlZoneNum)%DesHeatCoilInTempTU = CalcSysSizing(AirLoopNum)%HeatSupTemp
! save the system heating supply air hum rat
FinalZoneSizing(CtrlZoneNum)%DesHeatCoilInHumRatTU = CalcSysSizing(AirLoopNum)%HeatSupHumRat
IF (FinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow <= 0.0d0) CYCLE
CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow = &
CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow + &
FinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow / (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
SysHeatRetTemp = SysHeatRetTemp + FinalZoneSizing(CtrlZoneNum)%ZoneRetTempAtHeatPeak * &
FinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow &
/ (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
SysHeatRetHumRat = SysHeatRetHumRat + FinalZoneSizing(CtrlZoneNum)%ZoneHumRatAtHeatPeak * &
FinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow &
/ (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
HeatDDNum = FinalZoneSizing(CtrlZoneNum)%HeatDDNum
HeatTimeStepNum = FinalZoneSizing(CtrlZoneNum)%TimeStepNumAtHeatMax
OutAirTemp = OutAirTemp + DesDayWeath(HeatDDNum)%Temp(HeatTimeStepNum) * &
FinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow / (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
OutAirHumRat = OutAirHumRat + DesDayWeath(HeatDDNum)%HumRat(HeatTimeStepNum) * &
FinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow / (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
END DO
IF ( CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow > 0.0d0 ) THEN
SysHeatRetTemp = SysHeatRetTemp / CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow
SysHeatRetHumRat = SysHeatRetHumRat / CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow
OutAirTemp = OutAirTemp / CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow
OutAirHumRat = OutAirHumRat / CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow
SysHeatOutTemp = OutAirTemp
SysHeatOutHumRat = OutAirHumRat
RhoAir = StdRhoAir
IF (CalcSysSizing(AirLoopNum)%HeatOAOption == MinOA) THEN
OutAirFrac = RhoAir*CalcSysSizing(AirLoopNum)%DesOutAirVolFlow / &
CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
ELSE
OutAirFrac = 1.0d0
END IF
SysHeatMixTemp = OutAirTemp*OutAirFrac + SysHeatRetTemp*(1.d0-OutAirFrac)
SysHeatMixHumRat = OutAirHumRat*OutAirFrac + SysHeatRetHumRat*(1.d0-OutAirFrac)
SysHeatCap = PsyCpAirFnWTdb(constant_zero,constant_twenty) * CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow * &
(CalcSysSizing(AirLoopNum)%HeatSupTemp - SysHeatMixTemp)
SysHeatCap = MAX(0.0d0,SysHeatCap)
END IF
END IF
! move the noncoincident results into the system sizing array
IF (CalcSysSizing(AirLoopNum)%SizingOption == NonCoincident) THEN
! But first check to see if the noncoincident result is actually bigger than the coincident (for 100% outside air)
IF ( .not. (FinalSysSizing(AirLoopNum)%CoolOAOption == 1 .and. SysSensCoolCap <= 0.0d0)) THEN
CalcSysSizing(AirLoopNum)%SensCoolCap = SysSensCoolCap
CalcSysSizing(AirLoopNum)%CoolMixTemp = SysCoolMixTemp
CalcSysSizing(AirLoopNum)%CoolRetTemp = SysCoolRetTemp
CalcSysSizing(AirLoopNum)%CoolMixHumRat = SysCoolMixHumRat
CalcSysSizing(AirLoopNum)%CoolRetHumRat = SysCoolRetHumRat
CalcSysSizing(AirLoopNum)%CoolOutTemp = SysCoolOutTemp
CalcSysSizing(AirLoopNum)%CoolOutHumRat = SysCoolOutHumRat
END IF
! check to see is the noncoincident result is actually bigger than the coincident (for 100% outside air)
IF ( .not. (FinalSysSizing(AirLoopNum)%HeatOAOption == 1 .and. SysHeatCap < 0.0d0)) THEN
CalcSysSizing(AirLoopNum)%HeatCap = SysHeatCap
CalcSysSizing(AirLoopNum)%HeatMixTemp = SysHeatMixTemp
CalcSysSizing(AirLoopNum)%HeatRetTemp = SysHeatRetTemp
CalcSysSizing(AirLoopNum)%HeatMixHumRat = SysHeatMixHumRat
CalcSysSizing(AirLoopNum)%HeatRetHumRat = SysHeatRetHumRat
CalcSysSizing(AirLoopNum)%HeatOutTemp = SysHeatOutTemp
CalcSysSizing(AirLoopNum)%HeatOutHumRat = SysHeatOutHumRat
END IF
CalcSysSizing(AirLoopNum)%DesCoolVolFlow = CalcSysSizing(AirLoopNum)%NonCoinCoolMassFlow / &
StdRhoAir
CalcSysSizing(AirLoopNum)%DesHeatVolFlow = CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow / &
StdRhoAir
CalcSysSizing(AirLoopNum)%DesMainVolFlow = MAX(CalcSysSizing(AirLoopNum)%DesCoolVolFlow, &
CalcSysSizing(AirLoopNum)%DesHeatVolFlow)
END IF
END DO
! Move final system design data (calculated from zone data) to user design array
FinalSysSizing%CoolDesDay = CalcSysSizing%CoolDesDay
FinalSysSizing%HeatDesDay = CalcSysSizing%HeatDesDay
FinalSysSizing%CoinCoolMassFlow = CalcSysSizing%CoinCoolMassFlow
FinalSysSizing%CoinHeatMassFlow = CalcSysSizing%CoinHeatMassFlow
FinalSysSizing%NonCoinCoolMassFlow = CalcSysSizing%NonCoinCoolMassFlow
FinalSysSizing%NonCoinHeatMassFlow = CalcSysSizing%NonCoinHeatMassFlow
FinalSysSizing%DesMainVolFlow = CalcSysSizing%DesMainVolFlow
FinalSysSizing%DesHeatVolFlow = CalcSysSizing%DesHeatVolFlow
FinalSysSizing%DesCoolVolFlow = CalcSysSizing%DesCoolVolFlow
FinalSysSizing%SensCoolCap = CalcSysSizing%SensCoolCap
FinalSysSizing%HeatCap = CalcSysSizing%HeatCap
FinalSysSizing%PreheatCap = CalcSysSizing%PreheatCap
FinalSysSizing%CoolMixTemp = CalcSysSizing%CoolMixTemp
FinalSysSizing%CoolMixHumRat = CalcSysSizing%CoolMixHumRat
FinalSysSizing%CoolRetTemp = CalcSysSizing%CoolRetTemp
FinalSysSizing%CoolRetHumRat = CalcSysSizing%CoolRetHumRat
FinalSysSizing%CoolOutTemp = CalcSysSizing%CoolOutTemp
FinalSysSizing%CoolOutHumRat = CalcSysSizing%CoolOutHumRat
FinalSysSizing%HeatMixTemp = CalcSysSizing%HeatMixTemp
FinalSysSizing%HeatMixHumRat = CalcSysSizing%HeatMixHumRat
FinalSysSizing%HeatRetTemp = CalcSysSizing%HeatRetTemp
FinalSysSizing%HeatRetHumRat = CalcSysSizing%HeatRetHumRat
FinalSysSizing%HeatOutTemp = CalcSysSizing%HeatOutTemp
FinalSysSizing%HeatOutHumRat = CalcSysSizing%HeatOutHumRat
DO AirLoopNum=1,NumPrimaryAirSys
DO TimeStepIndex=1,NumOfTimeStepInDay
FinalSysSizing(AirLoopNum)%HeatFlowSeq(TimeStepIndex) = CalcSysSizing(AirLoopNum)%HeatFlowSeq(TimeStepIndex)
FinalSysSizing(AirLoopNum)%CoolFlowSeq(TimeStepIndex) = CalcSysSizing(AirLoopNum)%CoolFlowSeq(TimeStepIndex)
FinalSysSizing(AirLoopNum)%SensCoolCapSeq(TimeStepIndex) = &
CalcSysSizing(AirLoopNum)%SensCoolCapSeq(TimeStepIndex)
FinalSysSizing(AirLoopNum)%HeatCapSeq(TimeStepIndex) = CalcSysSizing(AirLoopNum)%HeatCapSeq(TimeStepIndex)
FinalSysSizing(AirLoopNum)%PreheatCapSeq(TimeStepIndex) = CalcSysSizing(AirLoopNum)%PreheatCapSeq(TimeStepIndex)
FinalSysSizing(AirLoopNum)%SysCoolRetTempSeq(TimeStepIndex) = &
CalcSysSizing(AirLoopNum)%SysCoolRetTempSeq(TimeStepIndex)
FinalSysSizing(AirLoopNum)%SysCoolRetHumRatSeq(TimeStepIndex) = &
CalcSysSizing(AirLoopNum)%SysCoolRetHumRatSeq(TimeStepIndex)
FinalSysSizing(AirLoopNum)%SysHeatRetTempSeq(TimeStepIndex) = &
CalcSysSizing(AirLoopNum)%SysHeatRetTempSeq(TimeStepIndex)
FinalSysSizing(AirLoopNum)%SysHeatRetHumRatSeq(TimeStepIndex) = &
CalcSysSizing(AirLoopNum)%SysHeatRetHumRatSeq(TimeStepIndex)
FinalSysSizing(AirLoopNum)%SysCoolOutTempSeq(TimeStepIndex) = &
CalcSysSizing(AirLoopNum)%SysCoolOutTempSeq(TimeStepIndex)
FinalSysSizing(AirLoopNum)%SysCoolOutHumRatSeq(TimeStepIndex) = &
CalcSysSizing(AirLoopNum)%SysCoolOutHumRatSeq(TimeStepIndex)
FinalSysSizing(AirLoopNum)%SysHeatOutTempSeq(TimeStepIndex) = &
CalcSysSizing(AirLoopNum)%SysHeatOutTempSeq(TimeStepIndex)
FinalSysSizing(AirLoopNum)%SysHeatOutHumRatSeq(TimeStepIndex) = &
CalcSysSizing(AirLoopNum)%SysHeatOutHumRatSeq(TimeStepIndex)
END DO
END DO
! Capture the changes to FinalZoneSizing in TermUnitFinalZoneSizing
TermUnitFinalZoneSizing = FinalZoneSizing
! Check for user input design system flow rates. Set the sizing ratios.
DO AirLoopNum=1,NumPrimaryAirSys
NumZonesCooled = AirToZoneNodeInfo(AirLoopNum)%NumZonesCooled
NumZonesHeated = AirToZoneNodeInfo(AirLoopNum)%NumZonesHeated
RhoAir = StdRhoAir
SysCoolSizingRat = 0.0d0
IF (CalcSysSizing(AirLoopNum)%InpDesCoolAirFlow > 0.0 .AND. &
CalcSysSizing(AirLoopNum)%DesCoolVolFlow > 0.0 .AND. &
CalcSysSizing(AirLoopNum)%CoolAirDesMethod == InpDesAirFlow) THEN
SysCoolSizingRat = CalcSysSizing(AirLoopNum)%InpDesCoolAirFlow / &
CalcSysSizing(AirLoopNum)%DesCoolVolFlow
ELSE
SysCoolSizingRat = 1.0d0
END IF
SysHeatSizingRat = 0.0d0
IF (CalcSysSizing(AirLoopNum)%InpDesHeatAirFlow > 0.0 .AND. &
CalcSysSizing(AirLoopNum)%DesHeatVolFlow > 0.0 .AND. &
CalcSysSizing(AirLoopNum)%HeatAirDesMethod == InpDesAirFlow) THEN
SysHeatSizingRat = CalcSysSizing(AirLoopNum)%InpDesHeatAirFlow / &
CalcSysSizing(AirLoopNum)%DesHeatVolFlow
ELSE
SysHeatSizingRat = 1.0d0
END IF
IF (CalcSysSizing(AirLoopNum)%LoadSizeType == Ventilation .AND. SysCoolSizingRat == 1.0d0) THEN
IF (CalcSysSizing(AirLoopNum)%DesCoolVolFlow > 0.d0) THEN
SysCoolSizingRat = CalcSysSizing(AirLoopNum)%DesOutAirVolFlow / CalcSysSizing(AirLoopNum)%DesCoolVolFlow
ELSE
SysCoolSizingRat = 1.d0
ENDIF
END IF
IF (CalcSysSizing(AirLoopNum)%LoadSizeType == Ventilation .AND. SysHeatSizingRat == 1.0d0) THEN
IF ( CalcSysSizing(AirLoopNum)%DesHeatVolFlow > 0.d0 ) THEN
SysHeatSizingRat = CalcSysSizing(AirLoopNum)%DesOutAirVolFlow / CalcSysSizing(AirLoopNum)%DesHeatVolFlow
ELSE
SysHeatSizingRat = 1.d0
ENDIF
END IF
! Calculate the new user modified system design quantities
IF (ABS(SysCoolSizingRat-1.0d0) > .00001d0) THEN
FinalSysSizing(AirLoopNum)%CoinCoolMassFlow = SysCoolSizingRat*CalcSysSizing(AirLoopNum)%CoinCoolMassFlow
FinalSysSizing(AirLoopNum)%NonCoinCoolMassFlow = SysCoolSizingRat*CalcSysSizing(AirLoopNum)%NonCoinCoolMassFlow
FinalSysSizing(AirLoopNum)%DesCoolVolFlow = SysCoolSizingRat*CalcSysSizing(AirLoopNum)%DesCoolVolFlow
IF (FinalSysSizing(AirLoopNum)%DesCoolVolFlow > 0.0d0) THEN
DO TimeStepIndex=1,NumOfTimeStepInDay
IF (CalcSysSizing(AirLoopNum)%CoolFlowSeq(TimeStepIndex) > 0.0d0) THEN
FinalSysSizing(AirLoopNum)%CoolFlowSeq(TimeStepIndex) = &
SysCoolSizingRat*CalcSysSizing(AirLoopNum)%CoolFlowSeq(TimeStepIndex)
IF (FinalSysSizing(AirLoopNum)%CoolOAOption == MinOA) THEN
OutAirFrac = RhoAir*FinalSysSizing(AirLoopNum)%DesOutAirVolFlow / &
FinalSysSizing(AirLoopNum)%CoolFlowSeq(TimeStepIndex)
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
ELSE
OutAirFrac = 1.0d0
END IF
SysCoolMixTemp = FinalSysSizing(AirLoopNum)%SysCoolOutTempSeq(TimeStepIndex)*OutAirFrac + &
FinalSysSizing(AirLoopNum)%SysCoolRetTempSeq(TimeStepIndex)*(1.d0-OutAirFrac)
SysCoolMixHumRat = FinalSysSizing(AirLoopNum)%SysCoolOutHumRatSeq(TimeStepIndex)*OutAirFrac + &
FinalSysSizing(AirLoopNum)%SysCoolRetHumRatSeq(TimeStepIndex)*(1.d0-OutAirFrac)
SysSensCoolCap = PsyCpAirFnWTdb(constant_zero,constant_twenty) * &
FinalSysSizing(AirLoopNum)%CoolFlowSeq(TimeStepIndex) * &
(SysCoolMixTemp - FinalSysSizing(AirLoopNum)%CoolSupTemp)
SysSensCoolCap = MAX(0.0d0,SysSensCoolCap)
FinalSysSizing(AirLoopNum)%SensCoolCapSeq(TimeStepIndex) = SysSensCoolCap
END IF
END DO
IF (FinalSysSizing(AirLoopNum)%CoolOAOption == MinOA) THEN
OutAirFrac = FinalSysSizing(AirLoopNum)%DesOutAirVolFlow / FinalSysSizing(AirLoopNum)%DesCoolVolFlow
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
ELSE
OutAirFrac = 1.0d0
END IF
FinalSysSizing(AirLoopNum)%CoolMixTemp = FinalSysSizing(AirLoopNum)%CoolOutTemp*OutAirFrac + &
FinalSysSizing(AirLoopNum)%CoolRetTemp*(1.d0-OutAirFrac)
FinalSysSizing(AirLoopNum)%CoolMixHumRat = FinalSysSizing(AirLoopNum)%CoolOutHumRat*OutAirFrac + &
FinalSysSizing(AirLoopNum)%CoolRetHumRat*(1.d0-OutAirFrac)
FinalSysSizing(AirLoopNum)%SensCoolCap = PsyCpAirFnWTdb(constant_zero,constant_twenty) * RhoAir * &
FinalSysSizing(AirLoopNum)%DesCoolVolFlow * &
(FinalSysSizing(AirLoopNum)%CoolMixTemp - FinalSysSizing(AirLoopNum)%CoolSupTemp)
FinalSysSizing(AirLoopNum)%SensCoolCap = MAX(0.0d0,FinalSysSizing(AirLoopNum)%SensCoolCap)
END IF
! take account of the user input system flow rates and alter the zone flow rates to match
DO ZonesCooledNum=1,NumZonesCooled
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesCooledNum)
IF ((SysCoolSizingRat .NE. 1.0d0) .AND. (FinalSysSizing(AirLoopNum)%LoadSizeType == Ventilation) .AND. &
(FinalZoneSizing(CtrlZoneNum)%MinOA > 0.0d0)) THEN
! size on ventilation load
ZoneOARatio = FinalZoneSizing(CtrlZoneNum)%MinOA / &
MAX(FinalZoneSizing(CtrlZoneNum)%DesCoolVolFlow,FinalZoneSizing(CtrlZoneNum)%MinOA)
TermUnitFinalZoneSizing(CtrlZoneNum)%DesCoolVolFlow = FinalZoneSizing(CtrlZoneNum)%DesCoolVolFlow * ZoneOARatio &
* (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
TermUnitFinalZoneSizing(CtrlZoneNum)%DesCoolMassFlow = FinalZoneSizing(CtrlZoneNum)%DesCoolMassFlow &
* ZoneOARatio * (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
TermUnitFinalZoneSizing(CtrlZoneNum)%DesCoolLoad = FinalZoneSizing(CtrlZoneNum)%DesCoolLoad * ZoneOARatio &
* (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
TermUnitFinalZoneSizing(CtrlZoneNum)%CoolFlowSeq = FinalZoneSizing(CtrlZoneNum)%CoolFlowSeq * ZoneOARatio &
* (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
TermUnitFinalZoneSizing(CtrlZoneNum)%CoolLoadSeq = FinalZoneSizing(CtrlZoneNum)%CoolLoadSeq * ZoneOARatio &
* (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
ELSE IF ( (SysCoolSizingRat > 1.0d0) .OR. &
(SysCoolSizingRat < 1.0d0 .AND. FinalSysSizing(AirLoopNum)%SizingOption == NonCoincident) ) THEN
! size on user input system design flows
TermUnitFinalZoneSizing(CtrlZoneNum)%DesCoolVolFlow = &
FinalZoneSizing(CtrlZoneNum)%DesCoolVolFlow * SysCoolSizingRat
TermUnitFinalZoneSizing(CtrlZoneNum)%DesCoolMassFlow = &
FinalZoneSizing(CtrlZoneNum)%DesCoolMassFlow * SysCoolSizingRat
TermUnitFinalZoneSizing(CtrlZoneNum)%DesCoolLoad = FinalZoneSizing(CtrlZoneNum)%DesCoolLoad * SysCoolSizingRat
TermUnitFinalZoneSizing(CtrlZoneNum)%CoolFlowSeq = FinalZoneSizing(CtrlZoneNum)%CoolFlowSeq * SysCoolSizingRat
TermUnitFinalZoneSizing(CtrlZoneNum)%CoolLoadSeq = FinalZoneSizing(CtrlZoneNum)%CoolLoadSeq * SysCoolSizingRat
END IF
END DO
END IF
IF (ABS(SysHeatSizingRat-1.0) > .00001d0) THEN
FinalSysSizing(AirLoopNum)%CoinHeatMassFlow = SysHeatSizingRat*CalcSysSizing(AirLoopNum)%CoinHeatMassFlow
FinalSysSizing(AirLoopNum)%NonCoinHeatMassFlow = SysHeatSizingRat*CalcSysSizing(AirLoopNum)%NonCoinHeatMassFlow
FinalSysSizing(AirLoopNum)%DesHeatVolFlow = SysHeatSizingRat*CalcSysSizing(AirLoopNum)%DesHeatVolFlow
IF (FinalSysSizing(AirLoopNum)%DesHeatVolFlow > 0.0d0) THEN
DO TimeStepIndex=1,NumOfTimeStepInDay
IF (CalcSysSizing(AirLoopNum)%HeatFlowSeq(TimeStepIndex) > 0.0d0) THEN
FinalSysSizing(AirLoopNum)%HeatFlowSeq(TimeStepIndex) = &
SysHeatSizingRat*CalcSysSizing(AirLoopNum)%HeatFlowSeq(TimeStepIndex)
IF (FinalSysSizing(AirLoopNum)%HeatOAOption == MinOA) THEN
OutAirFrac = RhoAir*FinalSysSizing(AirLoopNum)%DesOutAirVolFlow / &
FinalSysSizing(AirLoopNum)%HeatFlowSeq(TimeStepIndex)
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
ELSE
OutAirFrac = 1.0d0
END IF
SysHeatMixTemp = FinalSysSizing(AirLoopNum)%SysHeatOutTempSeq(TimeStepIndex)*OutAirFrac + &
FinalSysSizing(AirLoopNum)%SysHeatRetTempSeq(TimeStepIndex)*(1.0d0-OutAirFrac)
SysHeatMixHumRat = FinalSysSizing(AirLoopNum)%SysHeatOutHumRatSeq(TimeStepIndex)*OutAirFrac + &
FinalSysSizing(AirLoopNum)%SysHeatRetHumRatSeq(TimeStepIndex)*(1.0d0-OutAirFrac)
SysHeatCap = PsyCpAirFnWTdb(constant_zero,constant_twenty) * &
FinalSysSizing(AirLoopNum)%HeatFlowSeq(TimeStepIndex) * &
(FinalSysSizing(AirLoopNum)%HeatSupTemp - SysHeatMixTemp)
SysHeatCap = MAX(0.0d0,SysHeatCap)
FinalSysSizing(AirLoopNum)%HeatCapSeq(TimeStepIndex) = SysHeatCap
END IF
END DO
IF (FinalSysSizing(AirLoopNum)%HeatOAOption == MinOA) THEN
OutAirFrac = FinalSysSizing(AirLoopNum)%DesOutAirVolFlow / FinalSysSizing(AirLoopNum)%DesHeatVolFlow
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
ELSE
OutAirFrac = 1.0d0
END IF
FinalSysSizing(AirLoopNum)%HeatMixTemp = FinalSysSizing(AirLoopNum)%HeatOutTemp*OutAirFrac + &
FinalSysSizing(AirLoopNum)%HeatRetTemp*(1.d0-OutAirFrac)
FinalSysSizing(AirLoopNum)%HeatMixHumRat = FinalSysSizing(AirLoopNum)%HeatOutHumRat*OutAirFrac + &
FinalSysSizing(AirLoopNum)%HeatRetHumRat*(1.d0-OutAirFrac)
FinalSysSizing(AirLoopNum)%HeatCap = PsyCpAirFnWTdb(constant_zero,constant_twenty) * RhoAir * &
FinalSysSizing(AirLoopNum)%DesHeatVolFlow * &
(FinalSysSizing(AirLoopNum)%HeatSupTemp - FinalSysSizing(AirLoopNum)%HeatMixTemp)
FinalSysSizing(AirLoopNum)%HeatCap = MAX(0.0d0,FinalSysSizing(AirLoopNum)%HeatCap)
END IF
! take account of the user input system flow rates and alter the zone flow rates to match (for terminal unit sizing)
IF (NumZonesHeated.GT.0) THEN ! IF there are centrally heated zones
DO ZonesHeatedNum=1,NumZonesHeated ! loop over the heated zones
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%HeatCtrlZoneNums(ZonesHeatedNum)
IF ((SysHeatSizingRat .NE. 1.0d0) .AND. (FinalSysSizing(AirLoopNum)%LoadSizeType == Ventilation) .AND. &
(FinalZoneSizing(CtrlZoneNum)%MinOA > 0.0d0)) THEN
ZoneOARatio = FinalZoneSizing(CtrlZoneNum)%MinOA / &
MAX(FinalZoneSizing(CtrlZoneNum)%DesHeatVolFlow,FinalZoneSizing(CtrlZoneNum)%MinOA)
TermUnitFinalZoneSizing(CtrlZoneNum)%DesHeatVolFlow = FinalZoneSizing(CtrlZoneNum)%DesHeatVolFlow &
* ZoneOARatio * (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
TermUnitFinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow = FinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow &
* ZoneOARatio * (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
TermUnitFinalZoneSizing(CtrlZoneNum)%DesHeatLoad = FinalZoneSizing(CtrlZoneNum)%DesHeatLoad * ZoneOARatio &
* (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
TermUnitFinalZoneSizing(CtrlZoneNum)%HeatFlowSeq = FinalZoneSizing(CtrlZoneNum)%HeatFlowSeq * ZoneOARatio &
* (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
TermUnitFinalZoneSizing(CtrlZoneNum)%HeatLoadSeq = FinalZoneSizing(CtrlZoneNum)%HeatLoadSeq * ZoneOARatio &
* (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
ELSE IF ( (SysHeatSizingRat > 1.0d0) .OR. &
(SysHeatSizingRat < 1.0d0 .AND. FinalSysSizing(AirLoopNum)%SizingOption == NonCoincident) ) THEN
TermUnitFinalZoneSizing(CtrlZoneNum)%DesHeatVolFlow = &
FinalZoneSizing(CtrlZoneNum)%DesHeatVolFlow * SysHeatSizingRat
TermUnitFinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow = &
FinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow * SysHeatSizingRat
TermUnitFinalZoneSizing(CtrlZoneNum)%DesHeatLoad = FinalZoneSizing(CtrlZoneNum)%DesHeatLoad * SysHeatSizingRat
TermUnitFinalZoneSizing(CtrlZoneNum)%HeatFlowSeq = FinalZoneSizing(CtrlZoneNum)%HeatFlowSeq * SysHeatSizingRat
TermUnitFinalZoneSizing(CtrlZoneNum)%HeatLoadSeq = FinalZoneSizing(CtrlZoneNum)%HeatLoadSeq * SysHeatSizingRat
END IF
END DO
ELSE ! No centrally heated zones: use cooled zones
DO ZonesCooledNum=1,NumZonesCooled ! loop over the cooled zones
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesCooledNum)
IF ((SysHeatSizingRat .NE. 1.0d0) .AND. (FinalSysSizing(AirLoopNum)%LoadSizeType == Ventilation) .AND. &
(FinalZoneSizing(CtrlZoneNum)%MinOA <= 0.0d0)) THEN
CALL ShowWarningError('FinalSystemSizing: AirLoop="'//trim(AirToZoneNodeInfo(AirLoopNum)%AirLoopName)// &
'", Requested sizing on Ventilation,')
CALL ShowContinueError('but Zone has no design OA Flow. Zone="'// &
trim(ZoneEquipConfig(CtrlZoneNum)%ZoneName)//'".')
ENDIF
IF ((SysHeatSizingRat .NE. 1.0d0) .AND. (FinalSysSizing(AirLoopNum)%LoadSizeType == Ventilation) .AND. &
(FinalZoneSizing(CtrlZoneNum)%MinOA > 0.0d0)) THEN
ZoneOARatio = FinalZoneSizing(CtrlZoneNum)%MinOA / &
MAX(FinalZoneSizing(CtrlZoneNum)%DesHeatVolFlow,FinalZoneSizing(CtrlZoneNum)%MinOA)
TermUnitFinalZoneSizing(CtrlZoneNum)%DesHeatVolFlow = FinalZoneSizing(CtrlZoneNum)%DesHeatVolFlow * ZoneOARatio &
* (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
TermUnitFinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow = FinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow * ZoneOARatio &
* (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
TermUnitFinalZoneSizing(CtrlZoneNum)%DesHeatLoad = FinalZoneSizing(CtrlZoneNum)%DesHeatLoad * ZoneOARatio &
* (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
TermUnitFinalZoneSizing(CtrlZoneNum)%HeatFlowSeq = FinalZoneSizing(CtrlZoneNum)%HeatFlowSeq * ZoneOARatio &
* (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
TermUnitFinalZoneSizing(CtrlZoneNum)%HeatLoadSeq = FinalZoneSizing(CtrlZoneNum)%HeatLoadSeq * ZoneOARatio &
* (1.d0 + TermUnitSizing(CtrlZoneNum)%InducRat)
ELSE IF ((SysHeatSizingRat .NE. 1.0d0) .AND. (FinalSysSizing(AirLoopNum)%LoadSizeType == Ventilation) .AND. &
(FinalZoneSizing(CtrlZoneNum)%MinOA > 0.0d0)) THEN
TermUnitFinalZoneSizing(CtrlZoneNum)%DesHeatVolFlow = &
FinalZoneSizing(CtrlZoneNum)%DesHeatVolFlow * SysHeatSizingRat
TermUnitFinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow = &
FinalZoneSizing(CtrlZoneNum)%DesHeatMassFlow * SysHeatSizingRat
TermUnitFinalZoneSizing(CtrlZoneNum)%DesHeatLoad = FinalZoneSizing(CtrlZoneNum)%DesHeatLoad * SysHeatSizingRat
TermUnitFinalZoneSizing(CtrlZoneNum)%HeatFlowSeq = FinalZoneSizing(CtrlZoneNum)%HeatFlowSeq * SysHeatSizingRat
TermUnitFinalZoneSizing(CtrlZoneNum)%HeatLoadSeq = FinalZoneSizing(CtrlZoneNum)%HeatLoadSeq * SysHeatSizingRat
END IF
END DO
END IF
END IF
FinalSysSizing(AirLoopNum)%DesMainVolFlow = MAX(FinalSysSizing(AirLoopNum)%DesCoolVolFlow, &
FinalSysSizing(AirLoopNum)%DesHeatVolFlow)
! loop over the zones cooled by this system and sum up the min cooling flow rates to get the
! min system cooling flow rate
DO ZonesCooledNum=1,NumZonesCooled
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesCooledNum)
FinalSysSizing(AirLoopNum)%DesCoolVolFlowMin = FinalSysSizing(AirLoopNum)%DesCoolVolFlowMin + &
FinalZoneSizing(CtrlZoneNum)%DesCoolVolFlowMin
END DO
IF (FinalSysSizing(AirLoopNum)%DesCoolVolFlowMin <= 0.0d0) THEN
FinalSysSizing(AirLoopNum)%DesCoolVolFlowMin = FinalSysSizing(AirLoopNum)%DesOutAirVolFlow
END IF
END DO
! EMS calling point to customize zone sizing results
CALL ManageEMS(emsCallFromSystemSizing)
!EMS override point
IF (AnyEnergyManagementSystemInModel) THEN
DO AirLoopNum=1,NumPrimaryAirSys
IF (FinalSysSizing(AirLoopNum)%EMSOverrideCoinCoolMassFlowOn) &
FinalSysSizing(AirLoopNum)%CoinCoolMassFlow = FinalSysSizing(AirLoopNum)%EMSValueCoinCoolMassFlow
IF (FinalSysSizing(AirLoopNum)%EMSOverrideCoinHeatMassFlowOn) &
FinalSysSizing(AirLoopNum)%CoinHeatMassFlow = FinalSysSizing(AirLoopNum)%EMSValueCoinHeatMassFlow
IF (FinalSysSizing(AirLoopNum)%EMSOverrideNonCoinCoolMassFlowOn) &
FinalSysSizing(AirLoopNum)%NonCoinCoolMassFlow = FinalSysSizing(AirLoopNum)%EMSValueNonCoinCoolMassFlow
IF (FinalSysSizing(AirLoopNum)%EMSOverrideNonCoinHeatMassFlowOn) &
FinalSysSizing(AirLoopNum)%NonCoinHeatMassFlow = FinalSysSizing(AirLoopNum)%EMSValueNonCoinHeatMassFlow
IF (FinalSysSizing(AirLoopNum)%EMSOverrideDesMainVolFlowOn) &
FinalSysSizing(AirLoopNum)%DesMainVolFlow = FinalSysSizing(AirLoopNum)%EMSValueDesMainVolFlow
IF (FinalSysSizing(AirLoopNum)%EMSOverrideDesHeatVolFlowOn) &
FinalSysSizing(AirLoopNum)%DesHeatVolFlow = FinalSysSizing(AirLoopNum)%EMSValueDesHeatVolFlow
IF (FinalSysSizing(AirLoopNum)%EMSOverrideDesCoolVolFlowOn) &
FinalSysSizing(AirLoopNum)%DesCoolVolFlow = FinalSysSizing(AirLoopNum)%EMSValueDesCoolVolFlow
ENDDO ! over NumPrimaryAirSys
ENDIF
! write out the sys design calc results
WRITE(OutputFileSysSizing,SSizeFmt10,ADVANCE='No')
DO I=1,NumPrimaryAirSys
WRITE(OutputFileSysSizing,SSizeFmt11,ADVANCE='No') SizingFileColSep, &
TRIM(CalcSysSizing(I)%AirPriLoopName),':Des Heat Mass Flow [kg/s]', &
SizingFileColSep,TRIM(CalcSysSizing(I)%AirPriLoopName),':Des Cool Mass Flow [kg/s]', &
SizingFileColSep,TRIM(CalcSysSizing(I)%AirPriLoopName),':Des Heat Cap [W]', &
SizingFileColSep,TRIM(CalcSysSizing(I)%AirPriLoopName),':Des Sens Cool Cap [W]'
ENDDO
WRITE(OutputFileSysSizing,fmta) ' '
! HourFrac = 0.0
Minutes=0
TimeStepIndex=0
DO HourCounter=1,24
DO TimeStepCounter=1,NumOfTimeStepInHour
TimeStepIndex=TimeStepIndex+1
Minutes=Minutes+MinutesPerTimeStep
IF (Minutes == 60) THEN
Minutes=0
HourPrint=HourCounter
ELSE
HourPrint=HourCounter-1
ENDIF
! DO TimeStepIndex=1,NumOfTimeStepInDay
! HourFrac = HourFrac + TimeStepZone
WRITE(OutputFileSysSizing,SSizeFmt20,ADVANCE='No') HourPrint,Minutes
DO I=1,NumPrimaryAirSys
WRITE(OutputFileSysSizing,SSizeFmt21,ADVANCE='No') &
SizingFileColSep,CalcSysSizing(I)%HeatFlowSeq(TimeStepIndex), &
SizingFileColSep,CalcSysSizing(I)%CoolFlowSeq(TimeStepIndex), &
SizingFileColSep,CalcSysSizing(I)%HeatCapSeq(TimeStepIndex), &
SizingFileColSep,CalcSysSizing(I)%SensCoolCapSeq(TimeStepIndex)
END DO
WRITE(OutputFileSysSizing,fmta) ' '
END DO
END DO
WRITE(OutputFileSysSizing,SSizeFmt30,ADVANCE='No')
DO I=1,NumPrimaryAirSys
WRITE(OutputFileSysSizing,SSizeFmt31,ADVANCE='No') &
SizingFileColSep,CalcSysSizing(I)%CoinHeatMassFlow, &
SizingFileColSep,CalcSysSizing(I)%CoinCoolMassFlow, &
SizingFileColSep,CalcSysSizing(I)%HeatCap, &
SizingFileColSep,CalcSysSizing(I)%SensCoolCap
END DO
WRITE(OutputFileSysSizing,fmta) ' '
WRITE(OutputFileSysSizing,SSizeFmt40,ADVANCE='No')
DO I=1,NumPrimaryAirSys
WRITE(OutputFileSysSizing,SSizeFmt41,ADVANCE='No') &
SizingFileColSep,CalcSysSizing(I)%NonCoinHeatMassFlow, &
SizingFileColSep,CalcSysSizing(I)%NonCoinCoolMassFlow, &
SizingFileColSep,CalcSysSizing(I)%HeatCap, &
SizingFileColSep,CalcSysSizing(I)%SensCoolCap
END DO
WRITE(OutputFileSysSizing,fmta) ' '
! write predefined standard 62.1 report data
DO AirLoopNum=1,NumPrimaryAirSys
IF (FinalSysSizing(AirLoopNum)%SystemOAMethod == SOAM_VRP) THEN
!system ventilation requirements for cooling table
CALL PreDefTableEntry(pdchS62svrClVps,FinalSysSizing(AirLoopNum)%AirPriLoopName, &
FinalSysSizing(AirLoopNum)%DesCoolVolFlow,3) !Vps
CALL PreDefTableEntry(pdchS62svrClXs,FinalSysSizing(AirLoopNum)%AirPriLoopName, &
XsBySysCool(AirLoopNum),3) !Xs
CALL PreDefTableEntry(pdchS62svrClEv,FinalSysSizing(AirLoopNum)%AirPriLoopName, &
EvzMinBySysCool(AirLoopNum),3) !Ev
!system ventilation requirements for heating table
CALL PreDefTableEntry(pdchS62svrHtVps,FinalSysSizing(AirLoopNum)%AirPriLoopName, &
FinalSysSizing(AirLoopNum)%DesHeatVolFlow,3) !Vps
CALL PreDefTableEntry(pdchS62svrHtXs,FinalSysSizing(AirLoopNum)%AirPriLoopName, &
XsBySysHeat(AirLoopNum),3) !Xs
CALL PreDefTableEntry(pdchS62svrHtEv,FinalSysSizing(AirLoopNum)%AirPriLoopName, &
EvzMinBySysHeat(AirLoopNum),3) !Ev
CALL PreDefTableEntry(pdchS62svrHtVot,FinalSysSizing(AirLoopNum)%AirPriLoopName, &
VotHtgBySys(AirLoopNum),4) !Vot
IF (FinalSysSizing(AirLoopNum)%DesHeatVolFlow .NE. 0.0d0) THEN ! Move here from other routine
CALL PreDefTableEntry(pdchS62svrHtPercOA,FinalSysSizing(AirLoopNum)%AirPriLoopName, &
VotHtgBySys(AirLoopNum) / FinalSysSizing(AirLoopNum)%DesHeatVolFlow) !%OA
END IF
!system ventilation calculations for cooling table
CALL PreDefTableEntry(pdchS62scdVps,FinalSysSizing(AirLoopNum)%AirPriLoopName, &
FinalSysSizing(AirLoopNum)%DesCoolVolFlow,3) !Vps
CALL PreDefTableEntry(pdchS62scdEvz,FinalSysSizing(AirLoopNum)%AirPriLoopName, &
EvzMinBySysCool(AirLoopNum),3) !Evz-min
CALL PreDefTableEntry(pdchS62svrClVot,FinalSysSizing(AirLoopNum)%AirPriLoopName, &
VotClgBySys(AirLoopNum),4) !Vot
IF (FinalSysSizing(AirLoopNum)%DesCoolVolFlow .NE. 0.0d0) THEN ! Move here
CALL PreDefTableEntry(pdchS62svrClPercOA,FinalSysSizing(AirLoopNum)%AirPriLoopName, &
VotClgBySys(AirLoopNum) / FinalSysSizing(AirLoopNum)%DesCoolVolFlow) !%OA
END IF
!system ventilation calculations for heating table
CALL PreDefTableEntry(pdchS62shdVps,FinalSysSizing(AirLoopNum)%AirPriLoopName, &
FinalSysSizing(AirLoopNum)%DesHeatVolFlow,3) !Vps
CALL PreDefTableEntry(pdchS62shdEvz,FinalSysSizing(AirLoopNum)%AirPriLoopName, &
EvzMinBySysHeat(AirLoopNum),3) !Evz-min
!zone cooling design table
NumZonesCooled = AirToZoneNodeInfo(AirLoopNum)%NumZonesCooled
DO ZonesCooledNum=1,NumZonesCooled ! loop over cooled zones
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesCooledNum)
CALL PreDefTableEntry(pdchS62zcdAlN,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
AirToZoneNodeInfo(AirLoopNum)%AirLoopName) !Air loop name
CALL PreDefTableEntry(pdchS62zcdEvz,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
EvzByZoneCool(CtrlZoneNum),3) !Evz
CALL PreDefTableEntry(pdchS62zcdEr,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
FinalZoneSizing(CtrlZoneNum)%ZoneSecondaryRecirculation,3) !Er
CALL PreDefTableEntry(pdchS62zcdFa,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
FaByZoneCool(CtrlZoneNum),3) !Fa
CALL PreDefTableEntry(pdchS62zcdFb,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
FbByZoneCool(CtrlZoneNum),3) !Fb
CALL PreDefTableEntry(pdchS62zcdFc,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
FcByZoneCool(CtrlZoneNum),3) !Fc
CALL PreDefTableEntry(pdchS62zcdEp,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
FinalZoneSizing(CtrlZoneNum)%ZonePrimaryAirFraction,3) !Ep
END DO
!zone heating design table
NumZonesHeated = AirToZoneNodeInfo(AirLoopNum)%NumZonesHeated
IF (NumZonesHeated > 0) THEN
DO ZonesHeatedNum=1,NumZonesHeated ! loop over the heated zones
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%HeatCtrlZoneNums(ZonesHeatedNum)
CALL PreDefTableEntry(pdchS62zhdAlN,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
AirToZoneNodeInfo(AirLoopNum)%AirLoopName) !Air loop name
CALL PreDefTableEntry(pdchS62zhdEvz,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
EvzByZoneHeat(CtrlZoneNum),3) !Evz
CALL PreDefTableEntry(pdchS62zhdEr,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
FinalZoneSizing(CtrlZoneNum)%ZoneSecondaryRecirculation,3) !Er
CALL PreDefTableEntry(pdchS62zhdFa,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
FaByZoneHeat(CtrlZoneNum),3) !Fa
CALL PreDefTableEntry(pdchS62zhdFb,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
FbByZoneHeat(CtrlZoneNum),3) !Fb
CALL PreDefTableEntry(pdchS62zhdFc,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
FcByZoneHeat(CtrlZoneNum),3) !Fc
CALL PreDefTableEntry(pdchS62zhdEp,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
FinalZoneSizing(CtrlZoneNum)%ZonePrimaryAirFractionHtg,3) !Ep
END DO
ELSE
DO ZonesHeatedNum=1,NumZonesCooled ! loop over the heated zones
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesHeatedNum)
CALL PreDefTableEntry(pdchS62zhdAlN,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
AirToZoneNodeInfo(AirLoopNum)%AirLoopName) !Air loop name
CALL PreDefTableEntry(pdchS62zhdEvz,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
EvzByZoneHeat(CtrlZoneNum),3) !Evz
CALL PreDefTableEntry(pdchS62zhdEr,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
FinalZoneSizing(CtrlZoneNum)%ZoneSecondaryRecirculation,3) !Er
CALL PreDefTableEntry(pdchS62zhdFa,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
FaByZoneHeat(CtrlZoneNum),3) !Fa
CALL PreDefTableEntry(pdchS62zhdFb,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
FbByZoneHeat(CtrlZoneNum),3) !Fb
CALL PreDefTableEntry(pdchS62zhdFc,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
FcByZoneHeat(CtrlZoneNum),3) !Fc
CALL PreDefTableEntry(pdchS62zhdEp,FinalZoneSizing(CtrlZoneNum)%ZoneName, &
FinalZoneSizing(CtrlZoneNum)%ZonePrimaryAirFractionHtg,3) !Ep
END DO
END IF
END IF
END DO
END SELECT
RETURN
END SUBROUTINE UpdateSysSizing