SUBROUTINE SizeUnitarySystem(UnitarySysNum, FirstHVACIteration, AirLoopNum)
! SUBROUTINE INFORMATION:
! AUTHOR Richard Raustad, FSEC
! DATE WRITTEN February 2013
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for sizing unitary system components for which nominal cpacities
! and flow rates have not been specified in the input. Coil sizing is preformed in the coil module.
! Future modifications will size coils here and "push" this info to the specific coil.
! METHODOLOGY EMPLOYED:
! Obtains heating capacities and flow rates from the zone or system sizing arrays.
!
! NOTE: In UNITARYSYSTEM:HEATPUMP:AIRTOAIR we are sizing the heating capacity to be
! equal to the cooling capacity. Thus the cooling and
! and heating capacities of a DX heat pump system will be identical. In real life the ARI
! heating and cooling capacities are close but not identical.
! REFERENCES:
! na
! USE STATEMENTS:
USE BranchInputManager, ONLY: CheckSystemBranchFlow, GetAirBranchIndex, GetBranchFanTypeName, GetBranchFlow
USE DataAirSystems, ONLY: PrimaryAirSystem
USE CurveManager, ONLY: CurveValue
USE DXCoils, ONLY: SimDXCoil, SimDXCoilMultiSpeed, GetCoilCapacityByIndexType, &
GetDXCoilCapFTCurveIndex !, SetDXCoolingCoilData
USE Fans, ONLY: GetFanDesignVolumeFlowRate
USE HVACHXAssistedCoolingCoil, ONLY: SimHXAssistedCoolingCoil,GetCoilCapacity,GetHXDXCoilName,GetCoilObjectTypeNum
USE ReportSizingManager, ONLY: ReportSizingOutput
USE VariableSpeedCoils, ONLY: SimVariableSpeedCoils, VarSpeedCoil, GetCoilCapacityVariableSpeed
USE WatertoAirHeatPump, ONLY: SimWaterToAirHP,GetWAHPCoilCapacity=>GetCoilCapacity
USE WatertoAirHeatPumpSimple, ONLY: SimWatertoAirHPSimple,GetSimpleCoilCapacity=>GetCoilCapacity
USE PlantUtilities, ONLY: RegisterPlantCompDesignFlow
USE InputProcessor, ONLY: SameString, FindItemInList,MakeUPPERCase
USE General, ONLY: TrimSigDigits
USE WaterCoils, ONLY: SetCoilDesFlow,GetWaterCoilCapacity
USE Psychrometrics
USE HVACDXSystem, ONLY: GetCoolingCoilTypeNameAndIndex
USE EMSManager, ONLY: ManageEMS
USE DataGlobals, ONLY: emsCallFromUnitarySystemSizing
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: UnitarySysNum
LOGICAL, INTENT(IN) :: FirstHVACIteration
INTEGER, INTENT(IN) :: AirLoopNum ! does this need to be optional?
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName='SizeUnitarySystem'
REAL(r64), PARAMETER :: MaxRatedVolFlowPerRatedTotCap1 = 0.00006041d0 ! m3/s per watt = 450 cfm/ton
REAL(r64), PARAMETER :: MinRatedVolFlowPerRatedTotCap1 = 0.00004027d0 ! m3/s per watt = 300 cfm/ton
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: ThisCtrlZoneNum ! the controlled zone number of the control zone !!!
INTEGER :: Iter ! iteration count
REAL(r64) :: MulSpeedFlowScale ! variable speed air flow scaling factor
INTEGER :: MSHPIndex ! Index to design Specification object
INTEGER :: BranchNum ! Index to branch on air loop
INTEGER :: CompNum ! Index to component on branch
REAL(r64) :: BranchFlow ! branch flow rate [m3/s]
REAL(r64) :: BranchFanFlow ! branch fan flow rate [m3/s]
LOGICAL :: ErrFound ! logical error flag
CHARACTER(len=MaxNameLength) :: FanType ! fan type
CHARACTER(len=MaxNameLength) :: FanName ! fan name
INTEGER :: DXHeatCoilBranch ! branch where DX heating coil is located
INTEGER :: DXHeatCoilCompNum ! comp number of DX heating coil on branch
INTEGER :: CoolUnitarySystemNum ! index to unitary system with DX cooling coil
INTEGER :: CoolCoilIndex ! index to DX cooling coil
INTEGER :: CoolCoilType ! type of DX cooling coil
CHARACTER(len=MaxNameLength) :: CoolCoilName ! name of DX cooling coil
REAL(r64) :: rhoair ! air density [kg/m3]
REAL(r64) :: CpAirStd ! air specific heat [J/kg-k]
REAL(r64) :: MixTemp ! mixed air temp used for sizing [C]
REAL(r64) :: MixHumRat ! mixed air humidity ratio used for sizing [kg/kg]
REAL(r64) :: MixEnth ! mixed air enthalpy used for sizing [J/kg]
REAL(r64) :: MixWetBulb ! mixed air wet bulb temp used for sizing [C]
REAL(r64) :: SupTemp ! supply air temp used for sizing [C]
REAL(r64) :: SupHumRat ! supply air humidity ratio used for sizing [kg/kg]
REAL(r64) :: SupEnth ! supply air enthalpy used for sizing [J/kg]
REAL(r64) :: OutTemp ! outdoor air temp used for sizing [C]
REAL(r64) :: OutAirFrac ! fraction of outdoor air flow
REAL(r64) :: VolFlowRate ! volumetric flow rate [m3/s]
REAL(r64) :: CoolCapAtPeak ! cooling capacity at peak [W]
REAL(r64) :: HeatCapAtPeak ! heating capacity at peak [W]
INTEGER :: TimeStepNumAtMax ! time step at peak
INTEGER :: DDNum ! design day index at peak
REAL(r64) :: TotCapTempModFac ! capacity modifier used for sizing
REAL(r64) :: RatedVolFlowPerRatedTotCap !Rated Air Volume Flow Rate divided by Rated Total Capacity[m3/s-W)
CHARACTER(len=MaxNameLength) :: SystemType ! type of air loop equipment
REAL(r64) :: OnOffAirFlowRatio ! used to pass to cooling coil for sizing
REAL(r64) :: PartLoadRatio ! used to pass to cooling coil for sizing
INTEGER :: CapFTCurve ! index to DX coil Capacity as a function of Temperature curve
LOGICAL :: TempCoolingLoad ! size cooling coils with a cooling load, save actual load
LOGICAL :: TempHeatingLoad ! save actual load
REAL(r64) :: SysCoolingFlow ! individually sized cooling flow rate [m3/s]
REAL(r64) :: SysHeatingFlow ! individually sized heating flow rate [m3/s]
CHARACTER(len=MaxNameLength) :: HXCoilName ! cooling coil name in HXAssisted parent
INTEGER :: ActualCoolCoilType ! cooling coil type in HXAssisted parent
CALL ManageEMS(emsCallFromUnitarySystemSizing) ! calling point
ThisCtrlZoneNum = 0
DXCoolCap = 0.0d0
UnitaryHeatCap = 0.0d0
SuppHeatCap = 0.0d0
TempCoolingLoad = CoolingLoad
TempHeatingLoad = HeatingLoad
CoolingLoad = .TRUE.
HeatingLoad = .FALSE.
ZoneCoolingOnlyFan = .FALSE.
ZoneHeatingOnlyFan = .FALSE.
SysCoolingFlow = 0.0d0
SysHeatingFlow = 0.0d0
CoolCapAtPeak = 0.0d0
HeatCapAtPeak = 0.0d0
! IF(UnitarySystem(UnitarySysNum)%CoolCoilExists)THEN
! IF(
! UnitarySystem(UnitarySysNum)%DesignCoolingCapacity = &
! GetWaterHXAssistedCoilCapacity(CoolingCoilType,CoolingCoilName,ErrFlag)
! IF(UnitarySystem(UnitarySysNum)%DesignCoolingCapacity == Autosize) &
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
! IF (ErrFlag) THEN
! CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
! ErrorsFound=.TRUE.
! END IF
! END IF
IF ((CurOASysNum > 0 .OR. CurSysNum > 0) .AND. UnitarySystem(UnitarySysNum)%RequestAutosize) THEN
CALL CheckSysSizing(UnitarySystem(UnitarySysNum)%UnitarySystemType, UnitarySystem(UnitarySysNum)%Name)
ELSE IF(CurZoneEqNum > 0)THEN
CALL CheckZoneSizing(UnitarySystem(UnitarySysNum)%UnitarySystemType, UnitarySystem(UnitarySysNum)%Name)
END IF
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow /= AutoSize) &
SysCoolingFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow /= AutoSize) &
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
IF(UnitarySystem(UnitarySysNum)%RequestAutosize)THEN
IF (CurOASysNum > 0) THEN
! CALL CheckSysSizing(UnitarySystem(UnitarySysNum)%UnitarySystemType, UnitarySystem(UnitarySysNum)%Name)
IF(UnitarySystem(UnitarySysNum)%CoolCoilExists .AND. .NOT. UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
SELECT CASE(UnitarySystem(UnitarySysNum)%CoolingSAFMethod)
CASE (SupplyAirFlowRate, None)
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == Autosize)THEN
SysCoolingFlow = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
ELSE
SysCoolingFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
END IF
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
OASysEqSizing(CurOASysNum)%AirVolFlow = SysCoolingFlow
CASE (FlowPerFloorArea)
SysCoolingFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Autosize
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
OASysEqSizing(CurOASysNum)%AirVolFlow = SysCoolingFlow
CASE (FractionOfAutosizedCoolingValue)
SysCoolingFlow = FinalSysSizing(CurSysNum)%DesOutAirVolFlow * &
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Autosize
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
OASysEqSizing(CurOASysNum)%AirVolFlow = SysCoolingFlow
CASE (FlowPerCoolingCapacity)
VolFlowRate = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
MixTemp = FinalSysSizing(CurSysNum)%CoolOutTemp
MixHumRat = FinalSysSizing(CurSysNum)%CoolOutHumRat
SupTemp = FinalSysSizing(CurSysNum)%PrecoolTemp
SupHumRat = FinalSysSizing(CurSysNum)%PrecoolHumRat
OutTemp = FinalSysSizing(CurSysNum)%CoolOutTemp
rhoair = PsyRhoAirFnPbTdbW(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
IF(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingSingleSpeed .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_MultiSpeedCooling .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingTwoSpeed .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingTwoStageWHumControl)THEN
CapFTCurve = GetDXCoilCapFTCurveIndex(UnitarySystem(UnitarySysNum)%CoolingCoilIndex,ErrFound)
TotCapTempModFac = CurveValue(CapFTCurve,MixWetBulb,OutTemp)
ELSE
TotCapTempModFac = 1.0d0
END IF
CoolCapAtPeak = MAX(0.d0, (rhoair * VolFlowRate * (MixEnth-SupEnth)))
IF(TotCapTempModFac .GT. 0.d0)THEN
CoolCapAtPeak = CoolCapAtPeak / TotCapTempModFac
END IF
SysCoolingFlow = CoolCapAtPeak * UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Autosize
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
OASysEqSizing(CurOASysNum)%AirVolFlow = SysCoolingFlow
OASysEqSizing(CurOASysNum)%Capacity = .TRUE.
OASysEqSizing(CurOASysNum)%DesCoolingLoad = CoolCapAtPeak
CASE DEFAULT
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == Autosize)THEN
SysCoolingFlow = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
ELSE
SysCoolingFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
END IF
END SELECT
ELSE IF(UnitarySystem(UnitarySysNum)%HeatCoilExists .AND. .NOT. UnitarySystem(UnitarySysNum)%CoolCoilExists)THEN
SELECT CASE(UnitarySystem(UnitarySysNum)%HeatingSAFMethod)
CASE (SupplyAirFlowRate, None)
IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow == Autosize)THEN
SysHeatingFlow = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
ELSE
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
END IF
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
OASysEqSizing(CurOASysNum)%AirVolFlow = SysHeatingFlow
CASE (FlowPerFloorArea)
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
OASysEqSizing(CurOASysNum)%AirVolFlow = SysHeatingFlow
CASE (FractionOfAutosizedCoolingValue)
SysHeatingFlow = FinalSysSizing(CurSysNum)%DesOutAirVolFlow * &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
OASysEqSizing(CurOASysNum)%AirVolFlow = SysHeatingFlow
CASE (FlowPerHeatingCapacity)
VolFlowRate = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
MixTemp = FinalSysSizing(CurSysNum)%HeatOutTemp
MixHumRat = FinalSysSizing(CurSysNum)%HeatOutHumRat
SupTemp = FinalSysSizing(CurSysNum)%PrecoolTemp
SupHumRat = FinalSysSizing(CurSysNum)%PrecoolHumRat
OutTemp = FinalSysSizing(CurSysNum)%HeatOutTemp
rhoair = PsyRhoAirFnPbTdbW(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
IF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical)THEN
CapFTCurve = GetDXCoilCapFTCurveIndex(UnitarySystem(UnitarySysNum)%HeatingCoilIndex,ErrFound)
TotCapTempModFac = CurveValue(CapFTCurve,MixWetBulb,OutTemp)
ELSE
TotCapTempModFac = 1.0d0
END IF
HeatCapAtPeak = MAX(0.d0, (rhoair * VolFlowRate * (SupEnth-MixEnth)))
IF(TotCapTempModFac .GT. 0.d0)THEN
HeatCapAtPeak = HeatCapAtPeak / TotCapTempModFac
END IF
SysHeatingFlow = HeatCapAtPeak * UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
OASysEqSizing(CurOASysNum)%AirVolFlow = SysCoolingFlow
OASysEqSizing(CurOASysNum)%Capacity = .TRUE.
OASysEqSizing(CurOASysNum)%DesCoolingLoad = HeatCapAtPeak
CASE DEFAULT
IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow == Autosize)THEN
SysHeatingFlow = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
ELSE
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
END IF
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
OASysEqSizing(CurOASysNum)%AirVolFlow = SysCoolingFlow
END SELECT
ELSE ! Cooling and Heating coil are present
SELECT CASE(UnitarySystem(UnitarySysNum)%CoolingSAFMethod)
CASE (SupplyAirFlowRate, None)
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == Autosize)THEN
SysCoolingFlow = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
ELSE
SysCoolingFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
END IF
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
CASE (FlowPerFloorArea)
SysCoolingFlow = MAX(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow, &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow)
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Autosize
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
CASE (FractionOfAutosizedCoolingValue)
SysCoolingFlow = FinalSysSizing(CurSysNum)%DesOutAirVolFlow * &
MAX(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow, UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow)
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = SysCoolingFlow
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
CASE (FlowPerCoolingCapacity)
VolFlowRate = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
MixTemp = FinalSysSizing(CurSysNum)%CoolOutTemp
MixHumRat = FinalSysSizing(CurSysNum)%CoolOutHumRat
SupTemp = FinalSysSizing(CurSysNum)%PrecoolTemp
SupHumRat = FinalSysSizing(CurSysNum)%PrecoolHumRat
OutTemp = FinalSysSizing(CurSysNum)%CoolOutTemp
rhoair = PsyRhoAirFnPbTdbW(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
IF(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingSingleSpeed .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_MultiSpeedCooling .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingTwoSpeed .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingTwoStageWHumControl)THEN
CapFTCurve = GetDXCoilCapFTCurveIndex(UnitarySystem(UnitarySysNum)%CoolingCoilIndex,ErrFound)
TotCapTempModFac = CurveValue(CapFTCurve,MixWetBulb,OutTemp)
ELSE
TotCapTempModFac = 1.0d0
END IF
CoolCapAtPeak = MAX(0.d0, (rhoair * VolFlowRate * (MixEnth-SupEnth)))
IF(TotCapTempModFac .GT. 0.d0)THEN
CoolCapAtPeak = CoolCapAtPeak / TotCapTempModFac
END IF
SysCoolingFlow = CoolCapAtPeak * UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Autosize
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
OASysEqSizing(CurOASysNum)%Capacity = .TRUE.
CASE DEFAULT
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == Autosize)THEN
SysCoolingFlow = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
ELSE
SysCoolingFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
END IF
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
END SELECT
SELECT CASE(UnitarySystem(UnitarySysNum)%HeatingSAFMethod)
CASE (SupplyAirFlowRate, None)
IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow == Autosize)THEN
SysHeatingFlow = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
ELSE
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
END IF
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
CASE (FlowPerFloorArea)
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
CASE (FractionOfAutosizedCoolingValue)
SysHeatingFlow = FinalSysSizing(CurSysNum)%DesOutAirVolFlow * &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = SysHeatingFlow
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
CASE (FlowPerHeatingCapacity)
VolFlowRate = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
MixTemp = FinalSysSizing(CurSysNum)%HeatOutTemp
MixHumRat = FinalSysSizing(CurSysNum)%HeatOutHumRat
SupTemp = FinalSysSizing(CurSysNum)%PrecoolTemp
SupHumRat = FinalSysSizing(CurSysNum)%PrecoolHumRat
OutTemp = FinalSysSizing(CurSysNum)%HeatOutTemp
rhoair = PsyRhoAirFnPbTdbW(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
IF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical)THEN
CapFTCurve = GetDXCoilCapFTCurveIndex(UnitarySystem(UnitarySysNum)%HeatingCoilIndex,ErrFound)
TotCapTempModFac = CurveValue(CapFTCurve,MixWetBulb,OutTemp)
ELSE
TotCapTempModFac = 1.0d0
END IF
HeatCapAtPeak = MAX(0.d0, (rhoair * VolFlowRate * (SupEnth-MixEnth)))
IF(TotCapTempModFac .GT. 0.d0)THEN
HeatCapAtPeak = HeatCapAtPeak / TotCapTempModFac
END IF
SysHeatingFlow = HeatCapAtPeak * UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
OASysEqSizing(CurOASysNum)%Capacity = .TRUE.
CASE DEFAULT
IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow == Autosize)THEN
SysHeatingFlow = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
ELSE
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
END IF
OASysEqSizing(CurOASysNum)%AirFlow = .TRUE.
END SELECT
OASysEqSizing(CurOASysNum)%AirVolFlow = MAX(SysCoolingFlow,SysHeatingFlow)
OASysEqSizing(CurOASysNum)%DesHeatingLoad = MAX(CoolCapAtPeak,HeatCapAtPeak)
END IF
ELSE
IF (CurSysNum > 0) THEN
! CALL CheckSysSizing(UnitarySystem(UnitarySysNum)%UnitarySystemType, UnitarySystem(UnitarySysNum)%Name)
IF(UnitarySystem(UnitarySysNum)%CoolCoilExists .AND. .NOT. UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
SELECT CASE(UnitarySystem(UnitarySysNum)%CoolingSAFMethod)
CASE (SupplyAirFlowRate, None)
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == Autosize)THEN
SysCoolingFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
ELSE
SysCoolingFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
END IF
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
UnitarySysEqSizing(CurSysNum)%AirVolFlow = SysCoolingFlow
CASE (FlowPerFloorArea)
SysCoolingFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Autosize
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
UnitarySysEqSizing(CurSysNum)%AirVolFlow = SysCoolingFlow
CASE (FractionOfAutosizedCoolingValue)
SysCoolingFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow * &
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Autosize
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
UnitarySysEqSizing(CurSysNum)%AirVolFlow = SysCoolingFlow
CASE (FlowPerCoolingCapacity)
VolFlowRate = FinalSysSizing(CurSysNum)%DesMainVolFlow
SupTemp = FinalSysSizing(CurSysNum)%CoolSupTemp
SupHumRat = FinalSysSizing(CurSysNum)%CoolSupHumRat
IF (PrimaryAirSystem(CurSysNum)%NumOACoolCoils == 0) THEN ! there is no precooling of the OA stream
MixTemp = FinalSysSizing(CurSysNum)%CoolMixTemp
MixHumRat = FinalSysSizing(CurSysNum)%CoolMixHumRat
ELSE ! there is precooling of OA stream
IF (VolFlowRate > 0.0d0) THEN
OutAirFrac = FinalSysSizing(CurSysNum)%DesOutAirVolFlow / VolFlowRate
ELSE
OutAirFrac = 1.0d0
END IF
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
MixTemp = OutAirFrac*FinalSysSizing(CurSysNum)%PrecoolTemp + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%CoolRetTemp
MixHumRat = OutAirFrac*FinalSysSizing(CurSysNum)%PrecoolHumRat + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%CoolRetHumRat
END IF
OutTemp = FinalSysSizing(CurSysNum)%CoolOutTemp
rhoair = PsyRhoAirFnPbTdbW(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
IF(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingSingleSpeed .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_MultiSpeedCooling .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingTwoSpeed .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingTwoStageWHumControl)THEN
CapFTCurve = GetDXCoilCapFTCurveIndex(UnitarySystem(UnitarySysNum)%CoolingCoilIndex,ErrFound)
TotCapTempModFac = CurveValue(CapFTCurve,MixWetBulb,OutTemp)
ELSE
TotCapTempModFac = 1.0d0
END IF
CoolCapAtPeak = MAX(0.d0, (rhoair * VolFlowRate * (MixEnth-SupEnth)))
IF(TotCapTempModFac .GT. 0.d0)THEN
CoolCapAtPeak = CoolCapAtPeak / TotCapTempModFac
END IF
SysCoolingFlow = CoolCapAtPeak * UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Autosize
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
UnitarySysEqSizing(CurSysNum)%AirVolFlow = SysCoolingFlow
UnitarySysEqSizing(CurSysNum)%Capacity = .TRUE.
UnitarySysEqSizing(CurSysNum)%DesCoolingLoad = CoolCapAtPeak
CASE DEFAULT
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == Autosize)THEN
SysCoolingFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
ELSE
SysCoolingFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
END IF
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
UnitarySysEqSizing(CurSysNum)%AirVolFlow = SysCoolingFlow
END SELECT
ELSE IF(UnitarySystem(UnitarySysNum)%HeatCoilExists .AND. .NOT. UnitarySystem(UnitarySysNum)%CoolCoilExists)THEN
SELECT CASE(UnitarySystem(UnitarySysNum)%HeatingSAFMethod)
CASE (SupplyAirFlowRate)
IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow == Autosize)THEN
SysHeatingFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
ELSE
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
END IF
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
UnitarySysEqSizing(CurSysNum)%AirVolFlow = SysHeatingFlow
CASE (FlowPerFloorArea)
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
UnitarySysEqSizing(CurSysNum)%AirVolFlow = SysHeatingFlow
CASE (FractionOfAutosizedCoolingValue)
SysHeatingFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow * &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
UnitarySysEqSizing(CurSysNum)%AirVolFlow = SysHeatingFlow
CASE (FlowPerHeatingCapacity)
VolFlowRate = FinalSysSizing(CurSysNum)%DesMainVolFlow
SupTemp = FinalSysSizing(CurSysNum)%HeatSupTemp
SupHumRat = FinalSysSizing(CurSysNum)%HeatSupHumRat
IF (PrimaryAirSystem(CurSysNum)%NumOACoolCoils == 0) THEN ! there is no precooling of the OA stream
MixTemp = FinalSysSizing(CurSysNum)%HeatMixTemp
MixHumRat = FinalSysSizing(CurSysNum)%HeatMixHumRat
ELSE ! there is precooling of OA stream
IF (VolFlowRate > 0.0d0) THEN
OutAirFrac = FinalSysSizing(CurSysNum)%DesOutAirVolFlow / VolFlowRate
ELSE
OutAirFrac = 1.0d0
END IF
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
MixTemp = OutAirFrac*FinalSysSizing(CurSysNum)%PrecoolTemp + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%HeatRetTemp
MixHumRat = OutAirFrac*FinalSysSizing(CurSysNum)%PrecoolHumRat + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%HeatRetHumRat
END IF
OutTemp = FinalSysSizing(CurSysNum)%HeatOutTemp
rhoair = PsyRhoAirFnPbTdbW(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
IF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical)THEN
CapFTCurve = GetDXCoilCapFTCurveIndex(UnitarySystem(UnitarySysNum)%HeatingCoilIndex,ErrFound)
TotCapTempModFac = CurveValue(CapFTCurve,MixWetBulb,OutTemp)
ELSE
TotCapTempModFac = 1.0d0
END IF
HeatCapAtPeak = MAX(0.d0, (rhoair * VolFlowRate * (SupEnth-MixEnth)))
IF(TotCapTempModFac .GT. 0.d0)THEN
HeatCapAtPeak = HeatCapAtPeak / TotCapTempModFac
END IF
SysHeatingFlow = HeatCapAtPeak * UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Autosize
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
UnitarySysEqSizing(CurSysNum)%AirVolFlow = SysHeatingFlow
UnitarySysEqSizing(CurSysNum)%Capacity = .TRUE.
UnitarySysEqSizing(CurSysNum)%DesHeatingLoad = HeatCapAtPeak
CASE DEFAULT
IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow == Autosize)THEN
SysHeatingFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
ELSE
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
END IF
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
UnitarySysEqSizing(CurSysNum)%AirVolFlow = SysHeatingFlow
END SELECT
ELSE ! Cooling and Heating coil are present
SELECT CASE(UnitarySystem(UnitarySysNum)%CoolingSAFMethod)
CASE (SupplyAirFlowRate, None)
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == Autosize)THEN
SysCoolingFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
ELSE
SysCoolingFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
END IF
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
CASE (FlowPerFloorArea)
SysCoolingFlow = MAX(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow, &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow)
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Autosize
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
CASE (FractionOfAutosizedCoolingValue)
SysCoolingFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow * &
MAX(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow, UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow)
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Autosize
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
CASE (FlowPerCoolingCapacity)
VolFlowRate = FinalSysSizing(CurSysNum)%DesMainVolFlow
SupTemp = FinalSysSizing(CurSysNum)%CoolSupTemp
SupHumRat = FinalSysSizing(CurSysNum)%CoolSupHumRat
IF (PrimaryAirSystem(CurSysNum)%NumOACoolCoils == 0) THEN ! there is no precooling of the OA stream
MixTemp = FinalSysSizing(CurSysNum)%CoolMixTemp
MixHumRat = FinalSysSizing(CurSysNum)%CoolMixHumRat
ELSE ! there is precooling of OA stream
IF (VolFlowRate > 0.0d0) THEN
OutAirFrac = FinalSysSizing(CurSysNum)%DesMainVolFlow / VolFlowRate
ELSE
OutAirFrac = 1.0d0
END IF
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
MixTemp = OutAirFrac*FinalSysSizing(CurSysNum)%PrecoolTemp + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%CoolRetTemp
MixHumRat = OutAirFrac*FinalSysSizing(CurSysNum)%PrecoolHumRat + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%CoolRetHumRat
END IF
OutTemp = FinalSysSizing(CurSysNum)%CoolOutTemp
rhoair = PsyRhoAirFnPbTdbW(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
IF(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingSingleSpeed .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_MultiSpeedCooling .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingTwoSpeed .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingTwoStageWHumControl)THEN
CapFTCurve = GetDXCoilCapFTCurveIndex(UnitarySystem(UnitarySysNum)%CoolingCoilIndex,ErrFound)
TotCapTempModFac = CurveValue(CapFTCurve,MixWetBulb,OutTemp)
ELSE
TotCapTempModFac = 1.0d0
END IF
CoolCapAtPeak = MAX(0.d0, (rhoair * VolFlowRate * (MixEnth-SupEnth)))
IF(TotCapTempModFac .GT. 0.d0)THEN
CoolCapAtPeak = CoolCapAtPeak / TotCapTempModFac
END IF
SysCoolingFlow = CoolCapAtPeak * UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Autosize
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
UnitarySysEqSizing(CurSysNum)%Capacity = .TRUE.
CASE DEFAULT
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == Autosize)THEN
SysCoolingFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
ELSE
SysCoolingFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
END IF
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
END SELECT
SELECT CASE(UnitarySystem(UnitarySysNum)%HeatingSAFMethod)
CASE (SupplyAirFlowRate)
IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow == Autosize)THEN
SysHeatingFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
ELSE
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
END IF
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
CASE (FlowPerFloorArea)
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
CASE (FractionOfAutosizedCoolingValue)
SysHeatingFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow * &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
CASE (FlowPerHeatingCapacity)
VolFlowRate = FinalSysSizing(CurSysNum)%DesMainVolFlow
SupTemp = FinalSysSizing(CurSysNum)%HeatSupTemp
SupHumRat = FinalSysSizing(CurSysNum)%HeatSupHumRat
IF (PrimaryAirSystem(CurSysNum)%NumOACoolCoils == 0) THEN ! there is no precooling of the OA stream
MixTemp = FinalSysSizing(CurSysNum)%HeatMixTemp
MixHumRat = FinalSysSizing(CurSysNum)%HeatMixHumRat
ELSE ! there is precooling of OA stream
IF (VolFlowRate > 0.0d0) THEN
OutAirFrac = FinalSysSizing(CurSysNum)%DesMainVolFlow / VolFlowRate
ELSE
OutAirFrac = 1.0d0
END IF
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
MixTemp = OutAirFrac*FinalSysSizing(CurSysNum)%PrecoolTemp + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%HeatRetTemp
MixHumRat = OutAirFrac*FinalSysSizing(CurSysNum)%PrecoolHumRat + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%HeatRetHumRat
END IF
OutTemp = FinalSysSizing(CurSysNum)%HeatOutTemp
rhoair = PsyRhoAirFnPbTdbW(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
IF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical)THEN
CapFTCurve = GetDXCoilCapFTCurveIndex(UnitarySystem(UnitarySysNum)%HeatingCoilIndex,ErrFound)
TotCapTempModFac = CurveValue(CapFTCurve,MixWetBulb,OutTemp)
ELSE
TotCapTempModFac = 1.0d0
END IF
HeatCapAtPeak = MAX(0.d0, (rhoair * VolFlowRate * (SupEnth-MixEnth)))
IF(TotCapTempModFac .GT. 0.d0)THEN
HeatCapAtPeak = HeatCapAtPeak / TotCapTempModFac
END IF
SysHeatingFlow = HeatCapAtPeak * UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
UnitarySysEqSizing(CurSysNum)%Capacity = .TRUE.
CASE DEFAULT
IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow == Autosize)THEN
SysHeatingFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
ELSE
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
END IF
UnitarySysEqSizing(CurSysNum)%AirFlow = .TRUE.
END SELECT
UnitarySysEqSizing(CurSysNum)%AirVolFlow = MAX(SysCoolingFlow,SysHeatingFlow)
UnitarySysEqSizing(CurSysNum)%DesCoolingLoad = MAX(CoolCapAtPeak,HeatCapAtPeak)
END IF
ELSEIF (CurZoneEqNum > 0) THEN
! if we keep this (zone equipment) then we should probably check to see IF a cooling/heating coil is present
! and use just cooling if only a cooling coil, or just heating if only a heating coil
! CALL CheckZoneSizing(UnitarySystem(UnitarySysNum)%UnitarySystemType, UnitarySystem(UnitarySysNum)%Name)
IF(UnitarySystem(UnitarySysNum)%CoolCoilExists .AND. .NOT. UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
ZoneCoolingOnlyFan = .TRUE.
SELECT CASE(UnitarySystem(UnitarySysNum)%CoolingSAFMethod)
CASE (SupplyAirFlowRate)
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == Autosize)THEN
SysCoolingFlow = FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow
ELSE
SysCoolingFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
END IF
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
ZoneEqSizing(CurZoneEqNum)%AirVolFlow = SysCoolingFlow
CASE (FlowPerFloorArea)
SysCoolingFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Autosize
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
ZoneEqSizing(CurZoneEqNum)%AirVolFlow = SysCoolingFlow
CASE (FractionOfAutosizedCoolingValue)
SysCoolingFlow = FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow * &
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Autosize
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
ZoneEqSizing(CurZoneEqNum)%AirVolFlow = SysCoolingFlow
CASE (FlowPerCoolingCapacity)
VolFlowRate = FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow
IF(ZoneEqDXCoil)THEN
IF (ZoneEqSizing(CurZoneEqNum)%OAVolFlow > 0.0d0) THEN
MixTemp = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInTemp
MixHumRat = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInHumRat
ELSE
MixTemp = FinalZoneSizing(CurZoneEqNum)%ZoneRetTempAtCoolPeak
MixHumRat = FinalZoneSizing(CurZoneEqNum)%ZoneHumRatAtCoolPeak
END IF
ELSE
MixTemp = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInTemp
MixHumRat = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInHumRat
END IF
SupTemp = FinalZoneSizing(CurZoneEqNum)%CoolDesTemp
SupHumRat = FinalZoneSizing(CurZoneEqNum)%CoolDesHumRat
TimeStepNumAtMax = FinalZoneSizing(CurZoneEqNum)%TimeStepNumAtCoolMax
DDNum = FinalZoneSizing(CurZoneEqNum)%CoolDDNum
IF (DDNum > 0 .and. TimeStepNumAtMax > 0) THEN
OutTemp = DesDayWeath(DDNum)%Temp(TimeStepNumAtMax)
ELSE
OutTemp = 0.0d0
END IF
rhoair = PsyRhoAirFnPbTdbW(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
IF(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingSingleSpeed .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_MultiSpeedCooling .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingTwoSpeed .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingTwoStageWHumControl)THEN
CapFTCurve = GetDXCoilCapFTCurveIndex(UnitarySystem(UnitarySysNum)%CoolingCoilIndex,ErrFound)
TotCapTempModFac = CurveValue(CapFTCurve,MixWetBulb,OutTemp)
ELSE
TotCapTempModFac = 1.0d0
END IF
CoolCapAtPeak = MAX(0.d0, (rhoair * VolFlowRate * (MixEnth-SupEnth)))
IF(TotCapTempModFac .GT. 0.d0)THEN
CoolCapAtPeak = CoolCapAtPeak / TotCapTempModFac
END IF
SysCoolingFlow = CoolCapAtPeak * UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Autosize
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
ZoneEqSizing(CurZoneEqNum)%AirVolFlow = SysCoolingFlow
ZoneEqSizing(CurZoneEqNum)%Capacity = .TRUE.
ZoneEqSizing(CurZoneEqNum)%DesCoolingLoad = CoolCapAtPeak
CASE DEFAULT
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == Autosize)THEN
SysCoolingFlow = FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow
ELSE
SysCoolingFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
END IF
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
ZoneEqSizing(CurZoneEqNum)%AirVolFlow = SysCoolingFlow
END SELECT
ELSE IF(UnitarySystem(UnitarySysNum)%HeatCoilExists .AND. .NOT. UnitarySystem(UnitarySysNum)%CoolCoilExists)THEN
ZoneHeatingOnlyFan = .TRUE.
SELECT CASE(UnitarySystem(UnitarySysNum)%HeatingSAFMethod)
CASE (SupplyAirFlowRate)
IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow == Autosize)THEN
SysHeatingFlow = FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow
ELSE
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
END IF
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
ZoneEqSizing(CurZoneEqNum)%AirVolFlow = SysHeatingFlow
CASE (FlowPerFloorArea)
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
ZoneEqSizing(CurZoneEqNum)%AirVolFlow = SysHeatingFlow
CASE (FractionOfAutosizedCoolingValue)
SysHeatingFlow = FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow * &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
ZoneEqSizing(CurZoneEqNum)%AirVolFlow = SysHeatingFlow
CASE (FlowPerHeatingCapacity)
VolFlowRate = FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow
IF(ZoneEqDXCoil)THEN
IF (ZoneEqSizing(CurZoneEqNum)%OAVolFlow > 0.0d0) THEN
MixTemp = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInTemp
MixHumRat = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInHumRat
ELSE
MixTemp = FinalZoneSizing(CurZoneEqNum)%ZoneRetTempAtHeatPeak
MixHumRat = FinalZoneSizing(CurZoneEqNum)%ZoneHumRatAtHeatPeak
END IF
ELSE
MixTemp = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInTemp
MixHumRat = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInHumRat
END IF
SupTemp = FinalZoneSizing(CurZoneEqNum)%HeatDesTemp
SupHumRat = FinalZoneSizing(CurZoneEqNum)%HeatDesHumRat
TimeStepNumAtMax = FinalZoneSizing(CurZoneEqNum)%TimeStepNumAtHeatMax
DDNum = FinalZoneSizing(CurZoneEqNum)%HeatDDNum
IF (DDNum > 0 .and. TimeStepNumAtMax > 0) THEN
OutTemp = DesDayWeath(DDNum)%Temp(TimeStepNumAtMax)
ELSE
OutTemp = 0.0d0
END IF
rhoair = PsyRhoAirFnPbTdbW(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
IF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical)THEN
CapFTCurve = GetDXCoilCapFTCurveIndex(UnitarySystem(UnitarySysNum)%HeatingCoilIndex,ErrFound)
TotCapTempModFac = CurveValue(CapFTCurve,MixWetBulb,OutTemp)
ELSE
TotCapTempModFac = 1.0d0
END IF
HeatCapAtPeak = MAX(0.d0, (rhoair * VolFlowRate * (SupEnth-MixEnth)))
IF(TotCapTempModFac .GT. 0.d0)THEN
HeatCapAtPeak = HeatCapAtPeak / TotCapTempModFac
END IF
SysHeatingFlow = HeatCapAtPeak * UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
ZoneEqSizing(CurZoneEqNum)%AirVolFlow = SysHeatingFlow
ZoneEqSizing(CurZoneEqNum)%Capacity = .TRUE.
ZoneEqSizing(CurZoneEqNum)%DesHeatingLoad = HeatCapAtPeak
CASE DEFAULT
IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow == Autosize)THEN
SysHeatingFlow = FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow
ELSE
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
END IF
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
ZoneEqSizing(CurZoneEqNum)%AirVolFlow = SysHeatingFlow
END SELECT
ELSE
SELECT CASE(UnitarySystem(UnitarySysNum)%CoolingSAFMethod)
CASE (SupplyAirFlowRate, None)
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == Autosize)THEN
SysCoolingFlow = FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow
ELSE
SysCoolingFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
END IF
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
CASE (FlowPerFloorArea)
SysCoolingFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Autosize ! allow reporting for sizing
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
CASE (FractionOfAutosizedCoolingValue)
SysCoolingFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow * FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Autosize
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
CASE (FlowPerCoolingCapacity)
VolFlowRate = FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow
IF(ZoneEqDXCoil)THEN
IF (ZoneEqSizing(CurZoneEqNum)%OAVolFlow > 0.0d0) THEN
MixTemp = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInTemp
MixHumRat = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInHumRat
ELSE
MixTemp = FinalZoneSizing(CurZoneEqNum)%ZoneRetTempAtCoolPeak
MixHumRat = FinalZoneSizing(CurZoneEqNum)%ZoneHumRatAtCoolPeak
END IF
ELSE
MixTemp = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInTemp
MixHumRat = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInHumRat
END IF
SupTemp = FinalZoneSizing(CurZoneEqNum)%CoolDesTemp
SupHumRat = FinalZoneSizing(CurZoneEqNum)%CoolDesHumRat
TimeStepNumAtMax = FinalZoneSizing(CurZoneEqNum)%TimeStepNumAtCoolMax
DDNum = FinalZoneSizing(CurZoneEqNum)%CoolDDNum
IF (DDNum > 0 .and. TimeStepNumAtMax > 0) THEN
OutTemp = DesDayWeath(DDNum)%Temp(TimeStepNumAtMax)
ELSE
OutTemp = 0.0d0
END IF
rhoair = PsyRhoAirFnPbTdbW(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
IF(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingSingleSpeed .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_MultiSpeedCooling .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingTwoSpeed .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingTwoStageWHumControl)THEN
CapFTCurve = GetDXCoilCapFTCurveIndex(UnitarySystem(UnitarySysNum)%CoolingCoilIndex,ErrFound)
TotCapTempModFac = CurveValue(CapFTCurve,MixWetBulb,OutTemp)
ELSE
TotCapTempModFac = 1.0d0
END IF
CoolCapAtPeak = MAX(0.d0, (rhoair * VolFlowRate * (MixEnth-SupEnth)))
IF(TotCapTempModFac .GT. 0.d0)THEN
CoolCapAtPeak = CoolCapAtPeak / TotCapTempModFac
END IF
SysCoolingFlow = CoolCapAtPeak * UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Autosize
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
ZoneEqSizing(CurZoneEqNum)%Capacity = .TRUE.
CASE DEFAULT
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == Autosize)THEN
SysCoolingFlow = FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow
ELSE
SysCoolingFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
END IF
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
END SELECT
SELECT CASE(UnitarySystem(UnitarySysNum)%HeatingSAFMethod)
CASE (SupplyAirFlowRate)
IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow == Autosize)THEN
SysHeatingFlow = FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow
ELSE
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
END IF
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
CASE (FlowPerFloorArea)
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
CASE (FractionOfAutosizedCoolingValue)
SysHeatingFlow = FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow * &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
CASE (FlowPerHeatingCapacity)
VolFlowRate = FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow
IF(ZoneEqDXCoil)THEN
IF (ZoneEqSizing(CurZoneEqNum)%OAVolFlow > 0.0d0) THEN
MixTemp = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInTemp
MixHumRat = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInHumRat
ELSE
MixTemp = FinalZoneSizing(CurZoneEqNum)%ZoneRetTempAtHeatPeak
MixHumRat = FinalZoneSizing(CurZoneEqNum)%ZoneHumRatAtHeatPeak
END IF
ELSE
MixTemp = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInTemp
MixHumRat = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInHumRat
END IF
SupTemp = FinalZoneSizing(CurZoneEqNum)%HeatDesTemp
SupHumRat = FinalZoneSizing(CurZoneEqNum)%HeatDesHumRat
TimeStepNumAtMax = FinalZoneSizing(CurZoneEqNum)%TimeStepNumAtHeatMax
DDNum = FinalZoneSizing(CurZoneEqNum)%HeatDDNum
IF (DDNum > 0 .and. TimeStepNumAtMax > 0) THEN
OutTemp = DesDayWeath(DDNum)%Temp(TimeStepNumAtMax)
ELSE
OutTemp = 0.0d0
END IF
rhoair = PsyRhoAirFnPbTdbW(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
IF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical)THEN
CapFTCurve = GetDXCoilCapFTCurveIndex(UnitarySystem(UnitarySysNum)%HeatingCoilIndex,ErrFound)
TotCapTempModFac = CurveValue(CapFTCurve,MixWetBulb,OutTemp)
ELSE
TotCapTempModFac = 1.0d0
END IF
HeatCapAtPeak = MAX(0.d0, (rhoair * VolFlowRate * (SupEnth-MixEnth)))
IF(TotCapTempModFac .GT. 0.d0)THEN
HeatCapAtPeak = HeatCapAtPeak / TotCapTempModFac
END IF
SysHeatingFlow = HeatCapAtPeak * UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
ZoneEqSizing(CurZoneEqNum)%Capacity = .TRUE.
CASE DEFAULT
IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow == Autosize)THEN
SysHeatingFlow = FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow
ELSE
SysHeatingFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
END IF
ZoneEqSizing(CurZoneEqNum)%AirFlow = .TRUE.
END SELECT
ZoneEqSizing(CurZoneEqNum)%AirVolFlow = MAX(SysCoolingFlow,SysHeatingFlow)
ZoneEqSizing(CurZoneEqNum)%DesCoolingLoad = MAX(CoolCapAtPeak,HeatCapAtPeak)
END IF
END IF
END IF
END IF ! IF(UnitarySystem(UnitarySysNum)%RequestAutosize)THEN
! Not sure yet how to enforce heat pump cooling/heating air flow and capacity limits.
! Other checks are in place (e.g., DXCoolCap) to already account for heat pump DX coils but apply to all coil types.
! This method would actually size the HP to the larger of cooling or heating but not yet ready to implement.
! IF(UnitarySystem(UnitarySysNum)%HeatPump .AND. UnitarySystem(UnitarySysNum)%RequestAutosize)THEN
! IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == Autosize .AND. &
! UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow == Autosize)THEN
! IF(CurOASysNum > 0)THEN
! IF(OASysEqSizing(CurOASysNum)%AirFlow .AND. .NOT. OASysEqSizing(CurOASysNum)%Capacity)THEN
! SysCoolingFlow = MAX(SysCoolingFlow,SysHeatingFlow)
! SysHeatingFlow = SysCoolingFlow
! OASysEqSizing(CurOASysNum)%AirVolFlow = SysCoolingFlow
! ELSE IF(OASysEqSizing(CurOASysNum)%Capacity)THEN
! SysCoolingFlow = MAX(SysCoolingFlow,SysHeatingFlow)
! SysHeatingFlow = SysCoolingFlow
! OASysEqSizing(CurOASysNum)%AirVolFlow = SysCoolingFlow
! CoolCapAtPeak = MAX(CoolCapAtPeak,HeatCapAtPeak)
! HeatCapAtPeak = CoolCapAtPeak
! OASysEqSizing(CurOASysNum)%DesCoolingLoad = CoolCapAtPeak
! OASysEqSizing(CurOASysNum)%DesHeatingLoad = CoolCapAtPeak * UnitarySystem(UnitarySysNum)%HeatingSizingRatio
! END IF
! ELSE IF(CurSysNum > 0)THEN
! IF(UnitarySysEqSizing(CurSysNum)%AirFlow .AND. .NOT. UnitarySysEqSizing(CurSysNum)%Capacity)THEN
! SysCoolingFlow = MAX(SysCoolingFlow,SysHeatingFlow)
! SysHeatingFlow = SysCoolingFlow
! UnitarySysEqSizing(CurSysNum)%AirVolFlow = SysCoolingFlow
! ELSE IF(UnitarySysEqSizing(CurSysNum)%Capacity)THEN
! SysCoolingFlow = MAX(SysCoolingFlow,SysHeatingFlow)
! SysHeatingFlow = SysCoolingFlow
! UnitarySysEqSizing(CurSysNum)%AirVolFlow = SysCoolingFlow
! CoolCapAtPeak = MAX(CoolCapAtPeak,HeatCapAtPeak)
! HeatCapAtPeak = CoolCapAtPeak
! UnitarySysEqSizing(CurSysNum)%DesCoolingLoad = CoolCapAtPeak
! UnitarySysEqSizing(CurSysNum)%DesHeatingLoad = CoolCapAtPeak * UnitarySystem(UnitarySysNum)%HeatingSizingRatio
! END IF
! ELSE IF(CurZoneEqNum > 0)THEN
! IF(ZoneEqSizing(CurZoneEqNum)%AirFlow .AND. .NOT. ZoneEqSizing(CurZoneEqNum)%Capacity)THEN
! SysCoolingFlow = MAX(SysCoolingFlow,SysHeatingFlow)
! SysHeatingFlow = SysCoolingFlow
! ZoneEqSizing(CurZoneEqNum)%AirVolFlow = SysCoolingFlow
! ELSE IF(ZoneEqSizing(CurZoneEqNum)%Capacity)THEN
! SysCoolingFlow = MAX(SysCoolingFlow,SysHeatingFlow)
! SysHeatingFlow = SysCoolingFlow
! ZoneEqSizing(CurZoneEqNum)%AirVolFlow = SysCoolingFlow
! CoolCapAtPeak = MAX(CoolCapAtPeak,HeatCapAtPeak)
! HeatCapAtPeak = CoolCapAtPeak
! ZoneEqSizing(CurZoneEqNum)%DesCoolingLoad = CoolCapAtPeak
! ZoneEqSizing(CurZoneEqNum)%DesHeatingLoad = CoolCapAtPeak * UnitarySystem(UnitarySysNum)%HeatingSizingRatio
! END IF
! END IF
! END IF
! END IF
IF (UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate == AutoSize .AND. &
UnitarySystem(UnitarySysNum)%FanExists) THEN
UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate = MAX(SysCoolingFlow,SysHeatingFlow)
IF (UnitarySystem(UnitarySysNum)%DesignFanVolFlowRateEMSOverrideOn) THEN
UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate = UnitarySystem(UnitarySysNum)%DesignFanVolFlowRateEMSOverrideValue
END IF
IF(UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate < SmallAirVolFlow) THEN
UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate = 0.0d0
END IF
CALL ReportSizingOutput(UnitarySystem(UnitarySysNum)%UnitarySystemType, UnitarySystem(UnitarySysNum)%Name, &
'Supply Air Flow Rate [m3/s]', &
UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate)
END IF
! not sure what to do if UnitarySystem has only 1 coil type and flow needs to occur when present coil is off
! how does constant fan operating mode pertain here?
IF(UnitarySystem(UnitarySysNum)%HeatCoilExists .AND. .NOT. UnitarySystem(UnitarySysNum)%CoolCoilExists)THEN
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = SysHeatingFlow
ELSE IF(UnitarySystem(UnitarySysNum)%CoolCoilExists .AND. .NOT. UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = SysCoolingFlow
END IF
IF (UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow == AutoSize .AND. &
UnitarySystem(UnitarySysNum)%HeatCoilExists) THEN
IF (CurOASysNum > 0) THEN
IF(OASysEqSizing(CurOASysNum)%AirFlow)THEN
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = OASysEqSizing(CurOASysNum)%AirVolFlow
ELSE
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
END IF
IF (UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow < SmallAirVolFlow) THEN
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = 0.0d0
END IF
ELSE
IF (CurSysNum > 0) THEN
IF(UnitarySysEqSizing(CurSysNum)%AirFlow)THEN
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = UnitarySysEqSizing(CurSysNum)%AirVolFlow
ELSE
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
END IF
IF (FinalSysSizing(CurSysNum)%DesMainVolFlow < SmallAirVolFlow) THEN
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = 0.0d0
END IF
IF (UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlowEMSOverrideOn) THEN
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlowEMSOverrideValue
END IF
ELSEIF (CurZoneEqNum > 0) THEN
! if we keep this (zone equipment) then we should probably check to see if a cooling/heating coil is present
! and use just cooling if only a cooling coil, or just heating if only a heating coil
IF(ZoneEqSizing(CurZoneEqNum)%AirFlow)THEN
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = ZoneEqSizing(CurZoneEqNum)%AirVolFlow
ELSE
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = &
MAX(FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow,FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow)
END IF
IF (UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow < SmallAirVolFlow) THEN
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = 0.0d0
END IF
IF (UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlowEMSOverrideOn) THEN
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlowEMSOverrideValue
END IF
END IF
END IF
CALL ReportSizingOutput(UnitarySystem(UnitarySysNum)%UnitarySystemType, UnitarySystem(UnitarySysNum)%Name, &
'Supply Air Flow Rate During Heating Operation [m3/s]', &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow)
END IF
IF (UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == AutoSize .AND. &
UnitarySystem(UnitarySysNum)%CoolCoilExists) THEN
IF (CurOASysNum > 0) THEN
IF(OASysEqSizing(CurOASysNum)%AirFlow)THEN
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = OASysEqSizing(CurOASysNum)%AirVolFlow
ELSE
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
END IF
ELSE
IF (CurSysNum > 0) THEN
IF(UnitarySysEqSizing(CurSysNum)%AirFlow)THEN
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = UnitarySysEqSizing(CurSysNum)%AirVolFlow
ELSE
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
END IF
IF (UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow < SmallAirVolFlow) THEN
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = 0.0d0
END IF
IF (UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlowEMSOverrideOn) THEN
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlowEMSOverrideValue
END IF
ELSEIF (CurZoneEqNum > 0) THEN
! if we keep this (zone equipment) then we should probably check to see if a cooling/heating coil is present
! and use just cooling if only a cooling coil, or just heating if only a heating coil
IF(ZoneEqSizing(CurZoneEqNum)%AirFlow)THEN
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = ZoneEqSizing(CurZoneEqNum)%AirVolFlow
ELSE
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = &
MAX(FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow,FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow)
END IF
IF (UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow < SmallAirVolFlow) THEN
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = 0.0d0
END IF
IF (UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlowEMSOverrideOn) THEN
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlowEMSOverrideValue
END IF
END IF
END IF
CALL ReportSizingOutput(UnitarySystem(UnitarySysNum)%UnitarySystemType, UnitarySystem(UnitarySysNum)%Name, &
'Supply Air Flow Rate During Cooling Operation [m3/s]', &
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow)
END IF
IF (UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow == AutoSize .AND. &
(UnitarySystem(UnitarySysNum)%CoolCoilExists .OR. &
(UnitarySystem(UnitarySysNum)%HeatCoilExists .OR. UnitarySystem(UnitarySysNum)%SuppCoilExists))) THEN
IF (CurOASysNum > 0) THEN
IF(OASysEqSizing(CurOASysNum)%AirFlow)THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = OASysEqSizing(CurOASysNum)%AirVolFlow
ELSE
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
END IF
ELSE
IF (CurSysNum > 0) THEN
IF(UnitarySysEqSizing(CurSysNum)%AirFlow)THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = UnitarySysEqSizing(CurSysNum)%AirVolFlow
ELSE
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
END IF
IF (UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow < SmallAirVolFlow) THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = 0.0d0
END IF
IF (UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlowEMSOverrideOn) THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow=UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlowEMSOverrideValue
END IF
CALL ReportSizingOutput(UnitarySystem(UnitarySysNum)%UnitarySystemType, UnitarySystem(UnitarySysNum)%Name, &
'Supply Air Flow Rate When No Cooling or Heating is Needed [m3/s]', &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow)
ELSEIF (CurZoneEqNum > 0) THEN
! if we keep this (zone equipment) then we should probably check to see if a cooling/heating coil is present
! and use just cooling if only a cooling coil, or just heating if only a heating coil
! CALL CheckZoneSizing(UnitarySystem(UnitarySysNum)%UnitarySystemType, UnitarySystem(UnitarySysNum)%Name)
! would use this to size cooling or heating only systems except for the case where dual UnitarySystems are on the branch
! and each has only 1 cooling or heating coil ??? How to handle?
! Use same logic for other flow rates in this sizing module.
IF(UnitarySystem(UnitarySysNum)%CoolCoilExists .AND. UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = &
MAX(FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow,FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow)
ELSE IF(UnitarySystem(UnitarySysNum)%CoolCoilExists)THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = &
FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow
ELSE IF(UnitarySystem(UnitarySysNum)%HeatCoilExists .OR. UnitarySystem(UnitarySysNum)%SuppCoilExists)THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = &
FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow
ELSE
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = 0.0d0 ! ?
END IF
IF (UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow < SmallAirVolFlow) THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = 0.0d0
END IF
IF (UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlowEMSOverrideOn) THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow=UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlowEMSOverrideValue
END IF
CALL ReportSizingOutput(UnitarySystem(UnitarySysNum)%UnitarySystemType, UnitarySystem(UnitarySysNum)%Name, &
'Supply Air Flow Rate When No Cooling or Heating is Needed [m3/s]', &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow)
END IF
END IF
ELSE IF (UnitarySystem(UnitarySysNum)%CoolCoilExists .OR. UnitarySystem(UnitarySysNum)%HeatCoilExists) THEN
SELECT CASE(UnitarySystem(UnitarySysNum)%NoCoolHeatSAFMethod)
CASE (SupplyAirFlowRate)
IF(UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow == Autosize)THEN
IF (CurOASysNum > 0) THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
ELSE IF (CurSysNum > 0) THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
ELSE IF (CurZoneEqNum > 0) THEN
IF(UnitarySystem(UnitarySysNum)%CoolCoilExists .AND. UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = &
MAX(FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow, FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow)
ELSE IF(UnitarySystem(UnitarySysNum)%CoolCoilExists)THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow
ELSE IF(UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow
ELSE
! just guessing here what this should be
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = 0.0d0
END IF
END IF
END IF
CASE (FlowPerFloorArea)
! already calculated in GetInput
CASE (FractionOfAutosizedCoolingValue, FractionOfAutosizedHeatingValue)
IF (CurOASysNum > 0) THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow * FinalSysSizing(CurSysNum)%DesOutAirVolFlow
ELSE IF (CurSysNum > 0) THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow * FinalSysSizing(CurSysNum)%DesMainVolFlow
ELSE IF (CurZoneEqNum > 0) THEN
IF(UnitarySystem(UnitarySysNum)%NoCoolHeatSAFMethod == FractionOfAutosizedCoolingValue)THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow * FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow
ELSE
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow * FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow
END IF
END IF
CASE (FlowPerCoolingCapacity) ! these aren't going to work if the user doesn't choose the same method for all cases
IF(DXCoolCap .EQ. 0.0d0)THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow * &
ZoneEqSizing(CurZoneEqNum)%DesCoolingLoad
ELSE
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow * DXCoolCap
END IF
CASE (FlowPerHeatingCapacity)
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow * &
ZoneEqSizing(CurZoneEqNum)%DesHeatingLoad
CASE (None)
! what does this mean?
CASE DEFAULT
! wait for CR's
END SELECT
ELSE
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = 0.0d0
END IF
SELECT CASE(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num)
CASE(CoilDX_CoolingSingleSpeed)
CALL SimDXCoil(Blank,On,.TRUE.,0.0d0,UnitarySystem(UnitarySysNum)%CoolingCoilIndex, 1)
DXCoolCap = GetCoilCapacityByIndexType(UnitarySystem(UnitarySysNum)%CoolingCoilIndex, &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num,ErrFound)
CASE(CoilDX_CoolingHXAssisted,CoilWater_CoolingHXAssisted)
Node(UnitarySystem(UnitarySysNum)%CoolCoilInletNodeNum)%MassFlowRate = SysCoolingFlow
IF(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilWater_CoolingHXAssisted)THEN
HXCoilName = GetHXDXCoilName(cAllCoilTypes(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num), &
UnitarySystem(UnitarySysNum)%CoolingCoilName,ErrFound)
ActualCoolCoilType = GetCoilObjectTypeNum(cAllCoilTypes(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num), &
UnitarySystem(UnitarySysNum)%CoolingCoilName,ErrFound,.TRUE.)
CALL SetCoilDesFlow(cAllCoilTypes(ActualCoolCoilType),HXCoilName,SysCoolingFlow,ErrFound)
END IF
CALL SimHXAssistedCoolingCoil(Blank,.TRUE.,On, &
1.0d0, UnitarySystem(UnitarySysNum)%CoolingCoilIndex, 1, &
HXUnitEnable=.FALSE., OnOffAFR = 1.0d0, EconomizerFlag=.FALSE.)
IF(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilWater_CoolingHXAssisted)THEN
DXCoolCap = GetWaterCoilCapacity(MakeUPPERCase(cAllCoilTypes(ActualCoolCoilType)),HXCoilName,ErrFound)
ELSE
DXCoolCap = GetCoilCapacity(cAllCoilTypes(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num), &
UnitarySystem(UnitarySysNum)%CoolingCoilName,ErrFound)
END IF
CASE(Coil_CoolingWaterDetailed)
CALL SetCoilDesFlow(cAllCoilTypes(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num), &
UnitarySystem(UnitarySysNum)%CoolingCoilName,SysCoolingFlow,ErrFound)
CASE(Coil_CoolingWaterToAirHPSimple)
CALL SimWatertoAirHPSimple(Blank, &
UnitarySystem(UnitarySysNum)%CoolingCoilIndex, &
UnitarySystem(UnitarySysNum)%CoolingCoilSensDemand, UnitarySystem(UnitarySysNum)%CoolingCoilLatentDemand, &
0,0.0d0, UnitarySystem(UnitarySysNum)%MaxONOFFCyclesperHour, &
UnitarySystem(UnitarySysNum)%HPTimeConstant, UnitarySystem(UnitarySysNum)%FanDelayTime, &
0,0.0d0,FirstHVACIteration)
DXCoolCap = GetSimpleCoilCapacity(cAllCoilTypes(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num), &
UnitarySystem(UnitarySysNum)%CoolingCoilName,ErrFound)
CASE(Coil_CoolingWaterToAirHP)
CALL SimWatertoAirHP(Blank, UnitarySystem(UnitarySysNum)%CoolingCoilIndex, &
UnitarySystem(UnitarySysNum)%MaxCoolAirMassFlow,UnitarySystem(UnitarySysNum)%FanOpMode,&
FirstHVACIteration,0.0d0,&
UnitarySystem(UnitarySysNum)%MaxONOFFCyclesperHour, &
UnitarySystem(UnitarySysNum)%HPTimeConstant, &
UnitarySystem(UnitarySysNum)%FanDelayTime, &
UnitarySystem(UnitarySysNum)%InitHeatPump, &
0.0d0,0.0d0,0, 0.0d0)
DXCoolCap = GetWAHPCoilCapacity(cAllCoilTypes(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num), &
UnitarySystem(UnitarySysNum)%CoolingCoilName,ErrFound)
CASE(Coil_CoolingWaterToAirHPVSEquationFit, Coil_CoolingAirToAirVariableSpeed)
IF (UnitarySystem(UnitarySysNum)%NumOfSpeedCooling .GT. 0)THEN
IF(.NOT. ALLOCATED(UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate)) &
ALLOCATE(UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate(UnitarySystem(UnitarySysNum)%NumOfSpeedCooling))
IF(.NOT. ALLOCATED(UnitarySystem(UnitarySysNum)%CoolMassFlowRate)) &
ALLOCATE(UnitarySystem(UnitarySysNum)%CoolMassFlowRate(UnitarySystem(UnitarySysNum)%NumOfSpeedCooling))
IF(.NOT. ALLOCATED(UnitarySystem(UnitarySysNum)%MSCoolingSpeedRatio)) &
ALLOCATE(UnitarySystem(UnitarySysNum)%MSCoolingSpeedRatio(UnitarySystem(UnitarySysNum)%NumOfSpeedCooling))
END IF
CALL SimVariableSpeedCoils(Blank,UnitarySystem(UnitarySysNum)%CoolingCoilIndex,&
0,UnitarySystem(UnitarySysNum)%MaxONOFFCyclesperHour, &
UnitarySystem(UnitarySysNum)%HPTimeConstant,UnitarySystem(UnitarySysNum)%FanDelayTime,&
0,0.0d0,0.0d0,1,0.0d0,0.0d0,0.0d0 ) !conduct the sizing operation in the VS WSHP
UnitarySystem(UnitarySysNum)%NumOfSpeedCooling = VarSpeedCoil(UnitarySystem(UnitarySysNum)%CoolingCoilIndex)%NumOfSpeeds
DXCoolCap = GetCoilCapacityVariableSpeed(cAllCoilTypes(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num), &
UnitarySystem(UnitarySysNum)%CoolingCoilName,ErrFound)
MulSpeedFlowScale = VarSpeedCoil(UnitarySystem(UnitarySysNum)%CoolingCoilIndex)%RatedAirVolFlowRate/ &
VarSpeedCoil(UnitarySystem(UnitarySysNum)%CoolingCoilIndex)%MSRatedAirVolFlowRate( &
VarSpeedCoil(UnitarySystem(UnitarySysNum)%CoolingCoilIndex)%NormSpedLevel)
DO Iter = 1,UnitarySystem(UnitarySysNum)%NumOfSpeedCooling
UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate(Iter) = &
VarSpeedCoil(UnitarySystem(UnitarySysNum)%CoolingCoilIndex)%MSRatedAirVolFlowRate(Iter) * MulSpeedFlowScale
UnitarySystem(UnitarySysNum)%CoolMassFlowRate(Iter) = UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate(Iter)* StdRhoAir
! it seems the ratio should reference the actual flow rates, not the fan flow ???
IF(UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate .GT. 0.0d0 .AND. UnitarySystem(UnitarySysNum)%FanExists)THEN
UnitarySystem(UnitarySysNum)%MSCoolingSpeedRatio(Iter) = UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate(Iter)/ &
! UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate(UnitarySystem(UnitarySysNum)%NumOfSpeedCooling)
UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate
ELSE
UnitarySystem(UnitarySysNum)%MSCoolingSpeedRatio(Iter) = UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate(Iter)/ &
UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate(UnitarySystem(UnitarySysNum)%NumOfSpeedCooling)
END IF
END DO
UnitarySystem(UnitarySysNum)%IdleVolumeAirRate = UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate(1)
UnitarySystem(UnitarySysNum)%IdleMassFlowRate = UnitarySystem(UnitarySysNum)%CoolMassFlowRate(1)
UnitarySystem(UnitarySysNum)%IdleSpeedRatio = UnitarySystem(UnitarySysNum)%MSCoolingSpeedRatio(1)
CASE(CoilDX_MultiSpeedCooling)
IF (UnitarySystem(UnitarySysNum)%NumOfSpeedCooling .GT. 0)THEN
IF(.NOT. ALLOCATED(UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate)) &
ALLOCATE(UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate(UnitarySystem(UnitarySysNum)%NumOfSpeedCooling))
IF(.NOT. ALLOCATED(UnitarySystem(UnitarySysNum)%CoolMassFlowRate)) &
ALLOCATE(UnitarySystem(UnitarySysNum)%CoolMassFlowRate(UnitarySystem(UnitarySysNum)%NumOfSpeedCooling))
IF(.NOT. ALLOCATED(UnitarySystem(UnitarySysNum)%MSCoolingSpeedRatio)) &
ALLOCATE(UnitarySystem(UnitarySysNum)%MSCoolingSpeedRatio(UnitarySystem(UnitarySysNum)%NumOfSpeedCooling))
END IF
OnOffAirFlowRatio = 1.0d0
PartLoadRatio = 1.0d0
CALL SetOnOffMassFlowRate(UnitarySysNum, OnOffAirFlowRatio, PartLoadRatio)
CALL SimDXCoilMultiSpeed(Blank,1.0d0,1.0d0,UnitarySystem(UnitarySysNum)%CoolingCoilIndex,0,0,0)
DXCoolCap = GetCoilCapacityByIndexType(UnitarySystem(UnitarySysNum)%CoolingCoilIndex, &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num,ErrFound)
MSHPIndex = UnitarySystem(UnitarySysNum)%DesignSpecMSHPIndex
IF(MSHPIndex .GT. 0)THEN
DO Iter = DesignSpecMSHP(MSHPIndex)%NumOfSpeedCooling, 1 , -1 ! use reverse order since we divide by CoolVolumeFlowRate(max)
IF(DesignSpecMSHP(MSHPIndex)%CoolingVolFlowRatio(Iter) == Autosize) &
DesignSpecMSHP(MSHPIndex)%CoolingVolFlowRatio(Iter) = &
REAL(Iter,r64)/REAL(DesignSpecMSHP(MSHPIndex)%NumOfSpeedCooling,r64)
UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate(Iter) = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow * &
DesignSpecMSHP(MSHPIndex)%CoolingVolFlowRatio(Iter)
UnitarySystem(UnitarySysNum)%CoolMassFlowRate(Iter) = UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate(Iter)* StdRhoAir
UnitarySystem(UnitarySysNum)%MSCoolingSpeedRatio(Iter) = UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate(Iter)/ &
UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate(DesignSpecMSHP(MSHPIndex)%NumOfSpeedCooling)
END DO
UnitarySystem(UnitarySysNum)%IdleVolumeAirRate = UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate(1)
UnitarySystem(UnitarySysNum)%IdleMassFlowRate = UnitarySystem(UnitarySysNum)%CoolMassFlowRate(1)
UnitarySystem(UnitarySysNum)%IdleSpeedRatio = UnitarySystem(UnitarySysNum)%MSCoolingSpeedRatio(1)
END IF
CASE DEFAULT
END SELECT
IF (UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingElectric_MultiStage .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingGas_MultiStage) THEN
IF (UnitarySystem(UnitarySysNum)%NumOfSpeedHeating .GT. 0)THEN
IF(.NOT. ALLOCATED(UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate)) &
ALLOCATE(UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate(UnitarySystem(UnitarySysNum)%NumOfSpeedHeating))
IF(.NOT. ALLOCATED(UnitarySystem(UnitarySysNum)%HeatMassFlowRate)) &
ALLOCATE(UnitarySystem(UnitarySysNum)%HeatMassFlowRate(UnitarySystem(UnitarySysNum)%NumOfSpeedHeating))
IF(.NOT. ALLOCATED(UnitarySystem(UnitarySysNum)%MSHeatingSpeedRatio)) &
ALLOCATE(UnitarySystem(UnitarySysNum)%MSHeatingSpeedRatio(UnitarySystem(UnitarySysNum)%NumOfSpeedHeating))
END IF
MSHPIndex = UnitarySystem(UnitarySysNum)%DesignSpecMSHPIndex
IF(MSHPIndex .GT. 0)THEN
DO Iter = DesignSpecMSHP(MSHPIndex)%NumOfSpeedHeating, 1 , -1 ! use reverse order since we divide by HeatVolumeFlowRate(max)
IF(DesignSpecMSHP(MSHPIndex)%HeatingVolFlowRatio(Iter) == Autosize) &
DesignSpecMSHP(MSHPIndex)%HeatingVolFlowRatio(Iter) = &
REAL(Iter,r64)/REAL(DesignSpecMSHP(MSHPIndex)%NumOfSpeedHeating,r64)
UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate(Iter) = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow * &
DesignSpecMSHP(MSHPIndex)%HeatingVolFlowRatio(Iter)
UnitarySystem(UnitarySysNum)%HeatMassFlowRate(Iter) = UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate(Iter)* StdRhoAir
UnitarySystem(UnitarySysNum)%MSHeatingSpeedRatio(Iter) = UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate(Iter)/ &
UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate(DesignSpecMSHP(MSHPIndex)%NumOfSpeedHeating)
END DO
UnitarySystem(UnitarySysNum)%IdleVolumeAirRate = UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate(1)
UnitarySystem(UnitarySysNum)%IdleMassFlowRate = UnitarySystem(UnitarySysNum)%HeatMassFlowRate(1)
UnitarySystem(UnitarySysNum)%IdleSpeedRatio = UnitarySystem(UnitarySysNum)%MSHeatingSpeedRatio(1)
END IF
ELSEIF (UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPVSEquationFit .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingAirToAirVariableSpeed) THEN
CALL SimVariableSpeedCoils(Blank,UnitarySystem(UnitarySysNum)%HeatingCoilIndex,&
0,UnitarySystem(UnitarySysNum)%MaxONOFFCyclesperHour, &
UnitarySystem(UnitarySysNum)%HPTimeConstant,UnitarySystem(UnitarySysNum)%FanDelayTime,&
0,0.0d0,0.0d0,1,0.0d0,0.0d0,0.0d0 ) !conduct the sizing operation in the VS WSHP
UnitarySystem(UnitarySysNum)%NumOfSpeedHeating = VarSpeedCoil(UnitarySystem(UnitarySysNum)%HeatingCoilIndex)%NumOfSpeeds
IF (UnitarySystem(UnitarySysNum)%NumOfSpeedHeating .GT. 0)THEN
IF(.NOT. ALLOCATED(UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate)) &
ALLOCATE(UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate(UnitarySystem(UnitarySysNum)%NumOfSpeedHeating))
IF(.NOT. ALLOCATED(UnitarySystem(UnitarySysNum)%HeatMassFlowRate)) &
ALLOCATE(UnitarySystem(UnitarySysNum)%HeatMassFlowRate(UnitarySystem(UnitarySysNum)%NumOfSpeedHeating))
IF(.NOT. ALLOCATED(UnitarySystem(UnitarySysNum)%MSHeatingSpeedRatio)) &
ALLOCATE(UnitarySystem(UnitarySysNum)%MSHeatingSpeedRatio(UnitarySystem(UnitarySysNum)%NumOfSpeedHeating))
END IF
MulSpeedFlowScale = VarSpeedCoil(UnitarySystem(UnitarySysNum)%HeatingCoilIndex)%RatedAirVolFlowRate/ &
VarSpeedCoil(UnitarySystem(UnitarySysNum)%HeatingCoilIndex)%MSRatedAirVolFlowRate( &
VarSpeedCoil(UnitarySystem(UnitarySysNum)%HeatingCoilIndex)%NormSpedLevel)
DO Iter = 1,UnitarySystem(UnitarySysNum)%NumOfSpeedHeating
UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate(Iter) = &
VarSpeedCoil(UnitarySystem(UnitarySysNum)%HeatingCoilIndex)%MSRatedAirVolFlowRate(Iter) * MulSpeedFlowScale
UnitarySystem(UnitarySysNum)%HeatMassFlowRate(Iter) = UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate(Iter)* StdRhoAir
IF(UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate .GT. 0.0d0 .AND. UnitarySystem(UnitarySysNum)%FanExists)THEN
UnitarySystem(UnitarySysNum)%MSHeatingSpeedRatio(Iter) = UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate(Iter)/ &
UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate
ELSE
UnitarySystem(UnitarySysNum)%MSHeatingSpeedRatio(Iter) = UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate(Iter)/ &
UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate(UnitarySystem(UnitarySysNum)%NumOfSpeedHeating)
END IF
END DO
IF(UnitarySystem(UnitarySysNum)%CoolCoilExists)THEN
IF(ALLOCATED(UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate))THEN
UnitarySystem(UnitarySysNum)%IdleVolumeAirRate = &
MIN(UnitarySystem(UnitarySysNum)%IdleVolumeAirRate,UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate(1))
UnitarySystem(UnitarySysNum)%IdleMassFlowRate = &
MIN(UnitarySystem(UnitarySysNum)%IdleMassFlowRate,UnitarySystem(UnitarySysNum)%HeatMassFlowRate(1))
UnitarySystem(UnitarySysNum)%IdleSpeedRatio = &
MIN(UnitarySystem(UnitarySysNum)%IdleSpeedRatio,UnitarySystem(UnitarySysNum)%MSHeatingSpeedRatio(1))
ELSE
UnitarySystem(UnitarySysNum)%IdleVolumeAirRate = UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate(1)
UnitarySystem(UnitarySysNum)%IdleMassFlowRate = UnitarySystem(UnitarySysNum)%HeatMassFlowRate(1)
UnitarySystem(UnitarySysNum)%IdleSpeedRatio = UnitarySystem(UnitarySysNum)%MSHeatingSpeedRatio(1)
END IF
ELSE
UnitarySystem(UnitarySysNum)%IdleVolumeAirRate = UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate(1)
UnitarySystem(UnitarySysNum)%IdleMassFlowRate = UnitarySystem(UnitarySysNum)%HeatMassFlowRate(1)
UnitarySystem(UnitarySysNum)%IdleSpeedRatio = UnitarySystem(UnitarySysNum)%MSHeatingSpeedRatio(1)
END IF
END IF
IF(UnitarySystem(UnitarySysNum)%CoolCoilExists .AND. UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow < 0.0d0)THEN
IF ( .NOT. SysSizingRunDone) THEN
BranchNum = GetAirBranchIndex('AirloopHVAC:UnitarySystem',UnitarySystem(UnitarySysNum)%Name)
FanType = ' '
FanName = ' '
BranchFanFlow = 0.0d0
IF(BranchNum .GT. 0.0d0)CALL GetBranchFanTypeName(BranchNum, FanType, FanName, ErrFound)
IF(.NOT. ErrFound .AND. BranchNum .GT. 0)BranchFanFlow = GetFanDesignVolumeFlowRate(FanType,FanName,ErrFound)
IF(BranchNum .GT. 0.0d0)BranchFlow = GetBranchFlow(BranchNum)
IF(BranchFanFlow > 0.0d0)THEN
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = BranchFanFlow
ELSEIF(BranchFlow > 0.0d0)THEN
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = BranchFlow
ELSEIF(BranchFlow == Autosize)THEN
! what do I do?
END IF
END IF
END IF
!Change the Volume Flow Rates to Mass Flow Rates
UnitarySystem(UnitarySysNum)%DesignMassFlowRate = UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate * StdRhoAir
UnitarySystem(UnitarySysNum)%MaxCoolAirMassFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow * StdRhoAir
UnitarySystem(UnitarySysNum)%MaxHeatAirMassFlow = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow* StdRhoAir
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirMassFlow = UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow* StdRhoAir
UnitarySystem(UnitarySysNum)%SenLoadLoss = 0.0d0
IF (UnitarySystem(UnitarySysNum)%Humidistat) THEN
UnitarySystem(UnitarySysNum)%LatLoadLoss = 0.0d0
END IF
IF (UnitarySystem(UnitarySysNum)%DesignHeatingCapacity == AutoSize) THEN
IF (CurOASysNum > 0) THEN
IF(OASysEqSizing(CurOASysNum)%Capacity)THEN
IF(OASysEqSizing(CurOASysNum)%DesHeatingLoad .GT. 0.0d0)THEN
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = OASysEqSizing(CurOASysNum)%DesHeatingLoad
ELSE
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = OASysEqSizing(CurOASysNum)%DesCoolingLoad * &
UnitarySystem(UnitarySysNum)%HeatingSizingRatio
END IF
ELSE
IF (DXCoolCap >= SmallLoad) THEN
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = DXCoolCap * UnitarySystem(UnitarySysNum)%HeatingSizingRatio
ELSE
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = 0.0d0
END IF
END IF
ELSE IF (CurZoneEqNum > 0) THEN
IF(ZoneEqSizing(CurZoneEqNum)%Capacity)THEN
IF(ZoneEqSizing(CurZoneEqNum)%DesHeatingLoad .GT. 0.0d0)THEN
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = ZoneEqSizing(CurZoneEqNum)%DesHeatingLoad
ELSE
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = ZoneEqSizing(CurZoneEqNum)%DesCoolingLoad * &
UnitarySystem(UnitarySysNum)%HeatingSizingRatio
END IF
ELSE
IF (DXCoolCap >= SmallLoad) THEN
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = DXCoolCap * UnitarySystem(UnitarySysNum)%HeatingSizingRatio
ELSE
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = 0.0d0
END IF
END IF
ELSE IF(DXCoolCap > 0 .AND. UnitarySystem(UnitarySysNum)%HeatPump) THEN
IF (DXCoolCap >= SmallLoad) THEN
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = DXCoolCap * UnitarySystem(UnitarySysNum)%HeatingSizingRatio
ELSE
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = 0.0d0
END IF
ELSE IF (CurSysNum > 0) THEN
IF (UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingAirToAirVariableSpeed .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPSimple .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHP .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPVSEquationFit .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical) THEN
! for now, find the associated DX cooling coil to identically size heating coil
DXHeatCoilBranch = 0
DXHeatCoilCompNum = 0
IF(UnitarySystem(UnitarySysNum)%DXHeatingCoil .AND. .NOT. UnitarySystem(UnitarySysNum)%CoolCoilExists)THEN
BRANCHLoop: DO BranchNum = 1, PrimaryAirSystem(AirLoopNum)%NumBranches
DO CompNum = 1, PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%TotalComponents
IF(.NOT. SameString(PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%Comp(CompNum)%TypeOf, &
UnitarySystem(UnitarySysNum)%UnitarySystemType)) CYCLE
IF(.NOT. SameString(PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%Comp(CompNum)%Name, &
UnitarySystem(UnitarySysNum)%Name)) CYCLE
DXHeatCoilBranch = BranchNum
DXHeatCoilCompNum = CompNum
EXIT BRANCHLoop
END DO
END DO BRANCHLoop
END IF
IF(DXHeatCoilCompNum .GT. 0)THEN
DO CompNum = PrimaryAirSystem(AirLoopNum)%Branch(DXHeatCoilBranch)%TotalComponents, 1, -1
IF(SameString(PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%Comp(CompNum)%TypeOf, &
UnitarySystem(UnitarySysNum)%UnitarySystemType)) THEN
IF(SameString(PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%Comp(CompNum)%Name, &
UnitarySystem(UnitarySysNum)%Name))CYCLE
CoolCoilIndex = &
GetUnitarySystemDXCoolingCoilIndex(PrimaryAirSystem(AirLoopNum)%Branch(DXHeatCoilBranch)%Comp(CompNum)%Name)
IF(CoolCoilIndex .GT. 0)THEN
CoolUnitarySystemNum = FinditemInList(PrimaryAirSystem(AirLoopNum)%Branch(DXHeatCoilBranch)%Comp(CompNum)%Name, &
UnitarySystem%Name,NumUnitarySystem)
CoolCoilType = UnitarySystem(CoolUnitarySystemNum)%CoolingCoilType_Num
DXCoolCap = GetCoilCapacityByIndexType(CoolCoilIndex,CoolCoilType,ErrFound)
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = DXCoolCap*UnitarySystem(UnitarySysNum)%HeatingSizingRatio
EXIT
END IF
ELSE IF(SameString(PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%Comp(CompNum)%TypeOf, &
'CoilSystem:Cooling:DX'))THEN
CoolCoilType = 0
CoolCoilIndex = 0
CoolCoilName =' '
CALL GetCoolingCoilTypeNameAndIndex(PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%Comp(CompNum)%Name, &
CoolCoilType,CoolCoilIndex,CoolCoilName,ErrFound)
SELECT CASE(CoolCoilType)
CASE(CoilDX_CoolingSingleSpeed,CoilDX_CoolingTwoSpeed,CoilDX_CoolingTwoStageWHumControl)
DXCoolCap = GetCoilCapacityByIndexType(CoolCoilIndex,CoolCoilType,ErrFound)
CASE(CoilDX_CoolingHXAssisted)
DXCoolCap = GetCoilCapacity(cAllCoilTypes(CoolCoilType), CoolCoilName,ErrFound)
CASE(Coil_CoolingAirToAirVariableSpeed)
DXCoolCap = GetCoilCapacityByIndexType(CoolCoilIndex,CoolCoilType,ErrFound)
! the following CASE's are not allowed in CoilSystem:Cooling:DX
CASE(Coil_CoolingWaterToAirHPSimple)
DXCoolCap = GetSimpleCoilCapacity(cAllCoilTypes(CoolCoilType), CoolCoilName,ErrFound)
CASE(Coil_CoolingWaterToAirHP)
DXCoolCap = GetWAHPCoilCapacity(cAllCoilTypes(CoolCoilType), CoolCoilName,ErrFound)
CASE(Coil_CoolingWaterToAirHPVSEquationFit)
DXCoolCap = GetCoilCapacityVariableSpeed(cAllCoilTypes(CoolCoilType), CoolCoilName,ErrFound)
CASE(CoilDX_MultiSpeedCooling)
DXCoolCap = GetCoilCapacityByIndexType(CoolCoilIndex,CoolCoilType,ErrFound)
CASE DEFAULT
END SELECT
UnitarySystem(UnitarySysNum)%CoolingCoilIndex = CoolCoilIndex
IF(UnitarySystem(UnitarySysNum)%CoolingCoilIndex .GT. 0)THEN
IF (DXCoolCap > 0.0d0) UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = &
DXCoolCap*UnitarySystem(UnitarySysNum)%HeatingSizingRatio
! EXIT - don't exit, see if there is a UnitarySystem on the branch more upstream of the CoilSystem
END IF
END IF
END DO
IF(DXCoolCap == 0.0d0)THEN
IF(UnitarySystem(UnitarySysNum)%DesignHeatingCapacity == Autosize)THEN
VolFlowRate = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
IF (VolFlowRate >= SmallAirVolFlow) THEN
IF (CurOASysNum > 0) THEN ! coil is in the OA stream
MixTemp = FinalSysSizing(CurSysNum)%HeatOutTemp
MixHumRat = FinalSysSizing(CurSysNum)%HeatOutHumRat
SupTemp = FinalSysSizing(CurSysNum)%PrecoolTemp
SupHumRat = FinalSysSizing(CurSysNum)%PrecoolHumRat
OutTemp = FinalSysSizing(CurSysNum)%HeatOutTemp
ELSE IF(CurSysNum > 0)THEN ! coil is on the main air loop
SupTemp = FinalSysSizing(CurSysNum)%HeatSupTemp
SupHumRat = FinalSysSizing(CurSysNum)%HeatSupHumRat
MixTemp = FinalSysSizing(CurSysNum)%HeatMixTemp
MixHumRat = FinalSysSizing(CurSysNum)%HeatMixHumRat
OutTemp = FinalSysSizing(CurSysNum)%HeatOutTemp
ELSE ! coil is zone equipment
IF (ZoneEqSizing(CurZoneEqNum)%OAVolFlow > 0.0d0) THEN
MixTemp = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInTemp
MixHumRat = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInHumRat
ELSE
MixTemp = FinalZoneSizing(CurZoneEqNum)%ZoneRetTempAtCoolPeak
MixHumRat = FinalZoneSizing(CurZoneEqNum)%ZoneHumRatAtCoolPeak
END IF
SupTemp = FinalZoneSizing(CurZoneEqNum)%HeatDesTemp
SupHumRat = FinalZoneSizing(CurZoneEqNum)%HeatDesHumRat
TimeStepNumAtMax = FinalZoneSizing(CurZoneEqNum)%TimeStepNumAtCoolMax
DDNum = FinalZoneSizing(CurZoneEqNum)%CoolDDNum
IF (DDNum > 0 .and. TimeStepNumAtMax > 0) THEN
OutTemp = DesDayWeath(DDNum)%Temp(TimeStepNumAtMax)
ELSE
OutTemp = 0.0d0
ENDIF
END IF
rhoair = PsyRhoAirFnPbTdbW(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
IF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical)THEN
CapFTCurve = GetDXCoilCapFTCurveIndex(UnitarySystem(UnitarySysNum)%HeatingCoilIndex,ErrFound)
TotCapTempModFac = CurveValue(CapFTCurve,MixWetBulb,OutTemp)
ELSE
TotCapTempModFac = 1.0d0
END IF
HeatCapAtPeak = MAX(0.0d0, (rhoair * VolFlowRate * (SupEnth-MixEnth)))
IF(TotCapTempModFac .GT. 0.0d0)THEN
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = HeatCapAtPeak / TotCapTempModFac
ELSE
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = HeatCapAtPeak
END IF
IF(UnitarySystem(UnitarySysNum)%DesignHeatingCapacity .GT. 0.d0)THEN
RatedVolFlowPerRatedTotCap = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow / &
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity
ELSE
RatedVolFlowPerRatedTotCap = 0.0d0
END IF
! check capacity to make sure design volume flow per total capacity is within range
IF (RatedVolFlowPerRatedTotCap .LT. MinRatedVolFlowPerRatedTotCap1) THEN
HeatCapAtPeak = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow &
/ MinRatedVolFlowPerRatedTotCap1
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = HeatCapAtPeak
DXCoolCap = HeatCapAtPeak
ELSEIF (RatedVolFlowPerRatedTotCap .GT. MaxRatedVolFlowPerRatedTotCap1) THEN
HeatCapAtPeak = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow &
/ MaxRatedVolFlowPerRatedTotCap1
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = HeatCapAtPeak
DXCoolCap = HeatCapAtPeak
END IF
END IF ! IF (VolFlowRate >= SmallAirVolFlow) THEN
END IF ! IF(UnitarySystem(UnitarySysNum)%DesignHeatingCapacity == Autosize)THEN
END IF ! IF(DXCoolCap == 0.0d0)THEN
ELSE
IF(UnitarySystem(UnitarySysNum)%DesignHeatingCapacity == Autosize)THEN
VolFlowRate = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow
IF (VolFlowRate >= SmallAirVolFlow) THEN
IF (CurOASysNum > 0) THEN ! coil is in the OA stream
MixTemp = FinalSysSizing(CurSysNum)%HeatOutTemp
MixHumRat = FinalSysSizing(CurSysNum)%HeatOutHumRat
SupTemp = FinalSysSizing(CurSysNum)%PrecoolTemp
SupHumRat = FinalSysSizing(CurSysNum)%PrecoolHumRat
OutTemp = FinalSysSizing(CurSysNum)%HeatOutTemp
ELSE IF(CurSysNum > 0)THEN ! coil is on the main air loop
SupTemp = FinalSysSizing(CurSysNum)%HeatSupTemp
SupHumRat = FinalSysSizing(CurSysNum)%HeatSupHumRat
MixTemp = FinalSysSizing(CurSysNum)%HeatMixTemp
MixHumRat = FinalSysSizing(CurSysNum)%HeatMixHumRat
OutTemp = FinalSysSizing(CurSysNum)%HeatOutTemp
ELSE ! coil is zone equipment
IF (ZoneEqSizing(CurZoneEqNum)%OAVolFlow > 0.0d0) THEN
MixTemp = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInTemp
MixHumRat = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInHumRat
ELSE
MixTemp = FinalZoneSizing(CurZoneEqNum)%ZoneRetTempAtCoolPeak
MixHumRat = FinalZoneSizing(CurZoneEqNum)%ZoneHumRatAtCoolPeak
END IF
SupTemp = FinalZoneSizing(CurZoneEqNum)%HeatDesTemp
SupHumRat = FinalZoneSizing(CurZoneEqNum)%HeatDesHumRat
TimeStepNumAtMax = FinalZoneSizing(CurZoneEqNum)%TimeStepNumAtHeatMax
DDNum = FinalZoneSizing(CurZoneEqNum)%HeatDDNum
IF (DDNum > 0 .and. TimeStepNumAtMax > 0) THEN
OutTemp = DesDayWeath(DDNum)%Temp(TimeStepNumAtMax)
ELSE
OutTemp = 0.0d0
ENDIF
END IF
rhoair = PsyRhoAirFnPbTdbW(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
IF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical)THEN
CapFTCurve = GetDXCoilCapFTCurveIndex(UnitarySystem(UnitarySysNum)%HeatingCoilIndex,ErrFound)
TotCapTempModFac = CurveValue(CapFTCurve,MixWetBulb,OutTemp)
ELSE
TotCapTempModFac = 1.0d0
END IF
HeatCapAtPeak = MAX(0.0d0, (rhoair * VolFlowRate * (SupEnth-MixEnth)))
IF(TotCapTempModFac .GT. 0.0d0)THEN
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = HeatCapAtPeak / TotCapTempModFac
ELSE
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = HeatCapAtPeak
END IF
DXCoolCap = UnitarySystem(UnitarySysNum)%DesignHeatingCapacity
IF(UnitarySystem(UnitarySysNum)%DesignHeatingCapacity .GT. 0.d0)THEN
RatedVolFlowPerRatedTotCap = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow / &
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity
ELSE
RatedVolFlowPerRatedTotCap = 0.0d0
END IF
! check capacity to make sure design volume flow per total capacity is within range
IF (RatedVolFlowPerRatedTotCap .LT. MinRatedVolFlowPerRatedTotCap1) THEN
HeatCapAtPeak = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow &
/ MinRatedVolFlowPerRatedTotCap1
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = HeatCapAtPeak
DXCoolCap = HeatCapAtPeak
ELSEIF (RatedVolFlowPerRatedTotCap .GT. MaxRatedVolFlowPerRatedTotCap1) THEN
HeatCapAtPeak = UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow &
/ MaxRatedVolFlowPerRatedTotCap1
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = HeatCapAtPeak
DXCoolCap = HeatCapAtPeak
END IF
END IF ! IF (VolFlowRate >= SmallAirVolFlow) THEN
END IF ! IF(UnitarySystem(UnitarySysNum)%DesignHeatingCapacity == Autosize)THEN
END IF ! IF(DXHeatCoilCompNum .GT. 0)THEN
ELSE ! else not a HP heating coil
IF (CurOASysNum > 0) THEN
IF(OASysEqSizing(CurOASysNum)%Capacity) &
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = OASysEqSizing(CurOASysNum)%DesHeatingLoad
ELSE IF (CurSysNum > 0) THEN
IF(UnitarySysEqSizing(CurSysNum)%Capacity) &
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = UnitarySysEqSizing(CurSysNum)%DesHeatingLoad
ELSE IF (CurZoneEqNum > 0) THEN
IF(ZoneEqSizing(CurZoneEqNum)%Capacity) &
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = ZoneEqSizing(CurZoneEqNum)%DesHeatingLoad
END IF
IF (UnitarySystem(UnitarySysNum)%DesignHeatingCapacity == Autosize) THEN
IF (CurOASysNum > 0) THEN
IF(OASysEqSizing(CurOASysNum)%AirFlow)THEN
VolFlowRate = OASysEqSizing(CurOASysNum)%AirVolFlow
ELSE
VolFlowRate = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
END IF
ELSE
IF(CurZoneEqNum > 0)THEN
IF(ZoneEqSizing(CurZoneEqNum)%AirFlow)THEN
VolFlowRate = ZoneEqSizing(CurZoneEqNum)%AirVolFlow
ELSE
VolFlowRate = FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow
END IF
ELSE
IF(UnitarySysEqSizing(CurSysNum)%AirFlow)THEN
VolFlowRate = UnitarySysEqSizing(CurSysNum)%AirVolFlow
ELSE
SELECT CASE(CurDuctType)
CASE(Main)
VolFlowRate = FinalSysSizing(CurSysNum)%SysAirMinFlowRat*FinalSysSizing(CurSysNum)%DesMainVolFlow
CASE(Cooling)
VolFlowRate = FinalSysSizing(CurSysNum)%SysAirMinFlowRat*FinalSysSizing(CurSysNum)%DesCoolVolFlow
CASE(Heating)
VolFlowRate = FinalSysSizing(CurSysNum)%DesHeatVolFlow
CASE(Other)
VolFlowRate = FinalSysSizing(CurSysNum)%DesMainVolFlow
CASE DEFAULT
VolFlowRate = FinalSysSizing(CurSysNum)%DesMainVolFlow
END SELECT
END IF
END IF
END IF
! get the outside air fraction
IF (CurOASysNum > 0) THEN
OutAirFrac = 1.0d0
ELSE IF (CurSysNum > 0) THEN
IF (FinalSysSizing(CurSysNum)%HeatOAOption == MinOA) THEN
IF (VolFlowRate > 0.0d0) THEN
OutAirFrac = FinalSysSizing(CurSysNum)%DesOutAirVolFlow / VolFlowRate
ELSE
OutAirFrac = 1.0d0
END IF
ELSE
OutAirFrac = 1.0d0
END IF
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
ELSE
OutAirFrac = 1.0d0
END IF
! coil inlet temperature
IF (CurZoneEqNum > 0) THEN
MixTemp = FinalZoneSizing(CurZoneEqNum)%DesHeatCoilInTemp
CpAirStd = PsyCpAirFnWTdb(0.0d0,20.0d0)
HeatCapAtPeak = CpAirStd*StdRhoAir*VolFlowRate*(FinalZoneSizing(CurZoneEqNum)%HeatDesTemp - MixTemp)
ZoneEqSizing(CurZoneEqNum)%Capacity = .TRUE.
ZoneEqSizing(CurZoneEqNum)%DesHeatingLoad = HeatCapAtPeak
ELSE
IF (CurOASysNum == 0 .AND. PrimaryAirSystem(CurSysNum)%NumOAHeatCoils > 0) THEN
MixTemp = OutAirFrac*FinalSysSizing(CurSysNum)%PreheatTemp + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%HeatRetTemp
ELSE
MixTemp = OutAirFrac*FinalSysSizing(CurSysNum)%HeatOutTemp + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%HeatRetTemp
END IF
! coil load
IF (CurOASysNum > 0) THEN
IF(OASysEqSizing(CurOASysNum)%Capacity)THEN
HeatCapAtPeak = OASysEqSizing(CurOASysNum)%DesHeatingLoad
ELSE
CpAirStd = PsyCpAirFnWTdb(0.0d0,20.0d0)
HeatCapAtPeak = CpAirStd*StdRhoAir*VolFlowRate*(FinalSysSizing(CurSysNum)%PreheatTemp - MixTemp)
END IF
ELSE
IF(UnitarySysEqSizing(CurSysNum)%Capacity)THEN
HeatCapAtPeak = UnitarySysEqSizing(CurSysNum)%DesHeatingLoad
ELSE
CpAirStd = PsyCpAirFnWTdb(0.0d0,20.0d0)
HeatCapAtPeak = CpAirStd*StdRhoAir*VolFlowRate*(FinalSysSizing(CurSysNum)%HeatSupTemp - MixTemp)
END IF
END IF
UnitaryHeatCap = HeatCapAtPeak
END IF
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = HeatCapAtPeak
END IF
END IF
IF (UnitarySystem(UnitarySysNum)%DesignHeatingCapacity < SmallLoad) THEN
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = 0.0d0
END IF
END IF
CALL ReportSizingOutput(UnitarySystem(UnitarySysNum)%UnitarySystemType, UnitarySystem(UnitarySysNum)%Name, &
'Nominal Heating Capacity [W]', &
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity)
END IF
UnitaryHeatCap = UnitarySystem(UnitarySysNum)%DesignHeatingCapacity
IF (UnitarySystem(UnitarySysNum)%DesignCoolingCapacity == AutoSize) THEN
IF (CurOASysNum > 0) THEN
IF (DXCoolCap >= SmallLoad) THEN
UnitarySystem(UnitarySysNum)%DesignCoolingCapacity = DXCoolCap
ELSE
UnitarySystem(UnitarySysNum)%DesignCoolingCapacity = 0.0d0
END IF
ELSE IF (CurZoneEqNum > 0) THEN
IF (DXCoolCap >= SmallLoad) THEN
UnitarySystem(UnitarySysNum)%DesignCoolingCapacity = DXCoolCap
ELSE
UnitarySystem(UnitarySysNum)%DesignCoolingCapacity = 0.0d0
END IF
ELSE IF (CurSysNum > 0) THEN
IF (DXCoolCap >= SmallLoad) THEN
UnitarySystem(UnitarySysNum)%DesignCoolingCapacity = DXCoolCap
ELSE
UnitarySystem(UnitarySysNum)%DesignCoolingCapacity = 0.0d0
END IF
END IF
CALL ReportSizingOutput(UnitarySystem(UnitarySysNum)%UnitarySystemType, UnitarySystem(UnitarySysNum)%Name, &
'Nominal Cooling Capacity [W]', &
UnitarySystem(UnitarySysNum)%DesigncoolingCapacity)
END IF
IF (UnitarySystem(UnitarySysNum)%DesignMaxOutletTemp == AutoSize .AND. &
(UnitarySystem(UnitarySysNum)%HeatCoilExists .OR. UnitarySystem(UnitarySysNum)%SuppCoilExists)) THEN
IF (CurOASysNum > 0) THEN
UnitarySystem(UnitarySysNum)%DesignMaxOutletTemp = FinalSysSizing(CurSysNum)%HeatSupTemp
ELSE IF (CurZoneEqNum > 0) THEN
UnitarySystem(UnitarySysNum)%DesignMaxOutletTemp = FinalZoneSizing(CurZoneEqNum)%HeatDesTemp
ELSE IF (CurSysNum > 0) THEN
UnitarySystem(UnitarySysNum)%DesignMaxOutletTemp = FinalSysSizing(CurSysNum)%HeatSupTemp
END IF
CALL ReportSizingOutput(UnitarySystem(UnitarySysNum)%UnitarySystemType, UnitarySystem(UnitarySysNum)%Name, &
'Maximum Supply Air Temperature from Unitary Heater [C]', &
UnitarySystem(UnitarySysNum)%DesignMaxOutletTemp)
END IF
IF (UnitarySystem(UnitarySysNum)%DesignSuppHeatingCapacity == AutoSize) THEN
IF (CurOASysNum > 0) THEN
UnitarySystem(UnitarySysNum)%DesignSuppHeatingCapacity = FinalSysSizing(CurSysNum)%HeatCap
ELSE IF (CurZoneEqNum > 0) THEN
UnitarySystem(UnitarySysNum)%DesignSuppHeatingCapacity = FinalZoneSizing(CurZoneEqNum)%DesHeatLoad
ELSE IF (CurSysNum > 0) THEN
! set the supplemental heating capacity to the actual heating load
UnitarySystem(UnitarySysNum)%DesignSuppHeatingCapacity = FinalSysSizing(CurSysNum)%HeatCap
! If reheat needed for humidity control, make sure supplemental heating is at least as big
! as the cooling capacity
IF (UnitarySystem(UnitarySysNum)%Humidistat .AND. &
UnitarySystem(UnitarySysNum)%DehumidControlType_Num == DehumidControl_CoolReheat) THEN
UnitarySystem(UnitarySysNum)%DesignSuppHeatingCapacity = MAX(UnitarySystem(UnitarySysNum)%DesignSuppHeatingCapacity, &
UnitarySystem(UnitarySysNum)%DesignCoolingCapacity)
IF (UnitarySystem(UnitarySysNum)%DesignSuppHeatingCapacity < SmallLoad) THEN
UnitarySystem(UnitarySysNum)%DesignSuppHeatingCapacity = 0.0d0
END IF
END IF
END IF
CALL ReportSizingOutput(UnitarySystem(UnitarySysNum)%UnitarySystemType, UnitarySystem(UnitarySysNum)%Name, &
'Supplemental Heating Coil Nominal Capacity [W]', &
UnitarySystem(UnitarySysNum)%DesignSuppHeatingCapacity)
END IF
SuppHeatCap = UnitarySystem(UnitarySysNum)%DesignSuppHeatingCapacity
IF (UnitarySystem(UnitarySysNum)%HeatRecActive) THEN
CALL RegisterPlantCompDesignFlow(UnitarySystem(UnitarySysNum)%HeatRecoveryInletNodeNum, &
UnitarySystem(UnitarySysNum)%DesignHRWaterVolumeFlow )
END IF
IF(CurOASysNum .EQ. 0 .AND. CurZoneEqNum .EQ. 0)THEN
BranchFlow = 0.0d0
SystemType = cFurnaceTypes(UnitarySystem(UnitarySysNum)%UnitarySystemType_Num)
ErrFound = .FALSE.
! check branch flow rate vs system flow rate. Branch must match system of OA system is present
CALL CheckSystemBranchFlow(TRIM(SystemType),UnitarySystem(UnitarySysNum)%Name, &
BranchFlow,UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate,ErrFound)
IF(ErrFound)CALL ShowContinueError('...occurs in '//TRIM(SystemType)//' "'//TRIM(UnitarySystem(UnitarySysNum)%Name))
IF(UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate .LE. 0.0d0)THEN
IF(BranchFlow .NE. Autosize)THEN
UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate = BranchFlow
ELSE
UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate = MAX(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow, &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow)
END IF
UnitarySystem(UnitarySysNum)%DesignMassFlowRate = UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate * StdRhoAir
END IF
END IF
CoolingLoad = TempCoolingLoad
HeatingLoad = TempHeatingLoad
RETURN
END SUBROUTINE SizeUnitarySystem