SUBROUTINE GetUnitarySystemInput
! SUBROUTINE INFORMATION:
! AUTHOR Richard Raustad
! DATE WRITTEN February 2013
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Obtains input data for system and stores it in System data structures
! METHODOLOGY EMPLOYED:
! Uses "Get" routines to read in data.
! REFERENCES:
! USE STATEMENTS:
USE InputProcessor
USE NodeInputManager, ONLY: GetOnlySingleNode
USE DataHeatBalance, ONLY: Zone
USE BranchNodeConnections, ONLY: SetUpCompSets, TestCompSet
USE HVACHXAssistedCoolingCoil, ONLY: GetHXDXCoilName
USE DataIPShortCuts
USE General, ONLY: TrimSigDigits
USE DataHVACControllers, ONLY: ControllerTypes, ControllerSimple_Type
USE DXCoils, ONLY: SetCoilSystemCoolingData, GetDXCoilAvailSchPtr,SetDXCoolingCoilData
USE DataAirSystems, ONLY: PrimaryAirSystem
USE DataZoneControls, ONLY: TempControlledZone, NumTempControlledZones, HumidityControlZone, &
NumHumidityControlZones, ComfortControlledZone, NumComfortControlledZones
USE WaterToAirHeatPumpSimple, ONLY: GetWtoAHPSimpleCoilCapacity=>GetCoilCapacity, &
GetWtoAHPSimpleCoilInletNode=>GetCoilInletNode, &
GetWtoAHPSimpleCoilOutletNode=>GetCoilOutletNode, &
GetWtoAHPSimpleCoilIndex=>GetCoilIndex, &
SetSimpleWSHPData, GetWtoAHPSimpleCoilAirFlow=>GetCoilAirFlowRate
USE VariableSpeedCoils, ONLY: GetCoilCapacityVariableSpeed, &
GetCoilInletNodeVariableSpeed, &
GetCoilOutletNodeVariableSpeed, &
GetCoilIndexVariableSpeed, &
GetCoilAirFlowRateVariableSpeed,&
SetVarSpeedCoilData, GetVSCoilCondenserInletNode, &
GetVSCoilMinOATCompressor, GetVSCoilNumOfSpeeds
USE WaterToAirHeatPump, ONLY: GetWtoAHPCoilCapacity=>GetCoilCapacity, &
GetWtoAHPCoilInletNode=>GetCoilInletNode, &
GetWtoAHPCoilOutletNode=>GetCoilOutletNode,GetWtoAHPCoilIndex=>GetCoilIndex
USE HeatingCoils, ONLY: GetHeatingCoilCapacity=>GetCoilCapacity,GetHeatingCoilInletNode=>GetCoilInletNode, &
GetHeatingCoilOutletNode=>GetCoilOutletNode, GetHeatingCoilIndex=>GetCoilIndex, &
GetHeatingCoilTypeNum, GetHeatingCoilPLFCurveIndex, GetCoilAvailScheduleIndex
USE DXCoils, ONLY: GetDXCoilCapacity=>GetCoilCapacity,GetMinOATDXCoilCompressor=>GetMinOATCompressor, &
GetDXCoilInletNode=>GetCoilInletNode, GetDXCoilOutletNode=>GetCoilOutletNode, &
GetDXCoilCondenserInletNode=>GetCoilCondenserInletNode,GetDXCoilIndex, &
GetDXCoilTypeNum=>GetCoilTypeNum,SetDXCoolingCoilData,GetDXCoilAirFlow,SetDXCoilTypeData
USE HVACHXAssistedCoolingCoil, ONLY: GetDXHXAsstdCoilCapacity=>GetCoilCapacity,GetDXHXAsstdCoilInletNode=>GetCoilInletNode, &
GetDXHXAsstdCoilOutletNode=>GetCoilOutletNode,GetHXDXCoilName,GetHXDXCoilIndex, &
GetHXAssistedCoilTypeNum=>GetCoilGroupTypeNum, GetActualDXCoilIndex, &
GetWaterHXAssistedCoilCapacity=>GetCoilCapacity, GetHXCoilAirFlowRate, &
GetCoilObjectTypeNum
USE WaterCoils, ONLY: GetCoilWaterInletNode, GetCoilWaterOutletNode, GetCoilMaxWaterFlowRate, &
GetWaterCoilInletNode=>GetCoilInletNode,GetWaterCoilOutletNode=>GetCoilOutletNode, &
GetWaterCoilAvailScheduleIndex, GetWaterCoilIndex
USE SteamCoils, ONLY: GetSteamCoilAirInletNode=>GetCoilAirInletNode, GetSteamCoilIndex, &
GetSteamCoilAirOutletNode=>GetCoilAirOutletNode, &
GetSteamCoilSteamInletNode=>GetCoilSteamInletNode, &
GetCoilMaxSteamFlowRate=>GetCoilMaxSteamFlowRate, ZoneLoadControl, &
GetSteamCoilAvailScheduleIndex
USE Fans, ONLY: GetFanDesignVolumeFlowRate,GetFanInletNode,GetFanOutletNode,GetFanIndex, &
GetFanAvailSchPtr, GetFanType, GetFanIndex
USE FluidProperties, ONLY: GetSatDensityRefrig
USE EMSManager, ONLY: ManageEMS
USE SetPointManager, ONLY: NodeHasSPMCtrlVarType, iCtrlVarType_Temp, iCtrlVarType_HumRat
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName='GetUnitarySystemInput: ' ! include trailing blank space
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: Alphas ! Alpha input items for object
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cAlphaFields ! Alpha field names
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cNumericFields ! Numeric field names
CHARACTER(len=MaxNameLength) :: CurrentModuleObject ! for ease in getting objects
CHARACTER(len=MaxNameLength) :: CoolingCoilType ! Used in mining function calls
CHARACTER(len=MaxNameLength) :: CoolingCoilName ! Used in mining function calls
CHARACTER(len=MaxNameLength) :: HeatingCoilType ! Used in mining function calls
CHARACTER(len=MaxNameLength) :: HeatingCoilName ! Used in mining function calls
REAL(r64) :: HeatingSizingRatio ! Used to size DX heating coil wrt DX cooling coil
CHARACTER(len=MaxNameLength) :: SuppHeatCoilType ! Used in mining function calls
CHARACTER(len=MaxNameLength) :: SuppHeatCoilName ! Used in mining function calls
CHARACTER(len=MaxNameLength) :: FanType ! Used in mining function calls
CHARACTER(len=MaxNameLength) :: FanName ! Used in mining function calls
INTEGER :: FanIndex ! Used in mining function calls
LOGICAL, ALLOCATABLE, DIMENSION(:) :: lAlphaBlanks ! Logical array, alpha field input BLANK = .true.
LOGICAL, ALLOCATABLE, DIMENSION(:) :: lNumericBlanks ! Logical array, numeric field input BLANK = .true.
REAL(r64), ALLOCATABLE, DIMENSION(:) :: Numbers ! Numeric input items for object
REAL(r64) :: FanVolFlowRate ! Fan Max Flow Rate from Fan object (for comparisons to validity)
REAL(r64) :: SteamDensity ! steam density
REAL(r64) :: TotalFloorAreaOnAirLoop ! AirloopHVAC total floor area served
LOGICAL :: ErrorsFound = .FALSE. ! If errors detected in input
LOGICAL :: IsNotOK ! Flag to verify name
LOGICAL :: IsBlank ! Flag for blank name
LOGICAL :: AirNodeFound ! used in error checking
LOGICAL :: AirLoopFound ! used in error checking
LOGICAL :: ErrFlag ! Mining function error flag
LOGICAL :: PrintMessage ! flag to print or not print message
LOGICAL :: InletNodeNotControlled ! True if using controller on water coil
INTEGER :: UnitarySysNum ! The Unitary System object currently loading
INTEGER :: DesignSpecNum ! The design Specification object (multispeed coils) currently loading
INTEGER :: NumAlphas ! The number of alpha arguments in each object
INTEGER :: NumNumbers ! The number of numeric arguments in each object
INTEGER :: IOStatus ! The status of the GetObjectItem call
INTEGER :: TotalArgs=0 ! Total number of alpha and numeric arguments (max) for a
! certain object in the input file
INTEGER :: FanInletNode ! Used for node checking warning messages
INTEGER :: FanOutletNode ! Used for node checking warning messages
INTEGER :: CoolingCoilInletNode ! Used for node checking warning messages
INTEGER :: CoolingCoilOutletNode ! Used for node checking warning messages
INTEGER :: HeatingCoilInletNode ! Used for node checking warning messages
INTEGER :: HeatingCoilOutletNode ! Used for node checking warning messages
INTEGER :: SupHeatCoilInletNode ! Used for node checking warning messages
INTEGER :: SupHeatCoilOutletNode ! Used for node checking warning messages
INTEGER :: TotalZonesOnAirLoop ! number of zones connected to air loop
LOGICAL :: ZoneEquipmentFound ! TRUE if Unitary System found connected to zone exhaust node
INTEGER :: ActualCoolCoilType ! Coil type number for HX assisted coils
INTEGER :: ControlledZoneNum ! loop counter
INTEGER :: ZoneExhNum ! loop counter
INTEGER :: EquipNum ! loop counter
INTEGER :: ZoneInletNum ! loop counter
INTEGER :: AirLoopNumber ! loop counter
INTEGER :: BranchNum ! loop counter
INTEGER :: CompNum ! loop counter
INTEGER :: OACompNum ! loop counter
INTEGER :: TstatZoneNum ! loop counter
INTEGER :: HeatingCoilPLFCurveIndex ! index of heating coil PLF curve
INTEGER :: SteamIndex ! steam index
INTEGER :: DXCoilIndex ! index to DX coil
INTEGER :: HSTATZoneNum ! zone index where humidistat is located
INTEGER :: TempAlphas ! temp alpha array
INTEGER :: TempNumbers ! temp number array
INTEGER :: Index ! index to multispeed coil speed data
INTEGER :: SpeedNum ! multispeed coil speed
INTEGER :: NumOfSpeedCooling ! number of cooling speeds for multispeed coil
INTEGER :: NumOfSpeedHeating ! number of heating speeds for multispeed coil
INTEGER :: StartingSpeedRatioInput ! field where speed ratio inputs start
INTEGER :: MaxSpeedNum ! maximum number of numeric inputs in design specification object
INTEGER :: OASysNum ! loop counter index to outside air system
INTEGER :: AirLoopNum ! loop counter index to primary air system
CHARACTER(len=MaxNameLength) :: HXCoilName ! Cooling coil name within HX assembly
! local integer representation of input field numbers (i.e., alpha=A1 or numeric=N1)
INTEGER :: iNameAlphaNum ! get input index to unitary system name
INTEGER :: iControlTypeAlphaNum ! get input index to unitary system control type
INTEGER :: iControlZoneAlphaNum ! get input index to unitary system control zone
INTEGER :: iDehumidControlAlphaNum ! get input index to unitary system dehumidification control
INTEGER :: iSysAvailSchedAlphaNum ! get input index to unitary system avail schedule
INTEGER :: iFanTypeAlphaNum ! get input index to unitary system fan type
INTEGER :: iFanNameAlphaNum ! get input index to unitary system fan name
INTEGER :: iFanPlaceAlphaNum ! get input index to unitary system fan placement
INTEGER :: iFanSchedAlphaNum ! get input index to unitary system fan mode op schedule
INTEGER :: iHeatingCoilTypeAlphaNum ! get input index to unitary system heating coil type
INTEGER :: iHeatingCoilNameAlphaNum ! get input index to unitary system heating coil name
INTEGER :: iHeatingCoilSizeRatioNumericNum ! get input index to unitary system heating coil sizing ratio
INTEGER :: iCoolingCoilTypeAlphaNum ! get input index to unitary system cooling coil type
INTEGER :: iCoolingCoilNameAlphaNum ! get input index to unitary system cooling coil name
INTEGER :: iDOASDXCoilAlphaNum ! get input index to unitary system DX coil DOAS specified
INTEGER :: iRunOnLatentLoadAlphaNum ! get input index to unitary system run on latent load
INTEGER :: iSuppHeatCoilTypeAlphaNum ! get input index to unitary system supp heat coil type
INTEGER :: iSuppHeatCoilNameAlphaNum ! get input index to unitary system supp heat coil name
INTEGER :: iHeatSAFMAlphaNum ! get input index to unitary system heat supp air flow method
INTEGER :: iCoolSAFMAlphaNum ! get input index to unitary system cool supp air flow method
INTEGER :: iMaxCoolAirVolFlowNumericNum ! get input index to unitary system cool supply air flow
INTEGER :: iMaxHeatAirVolFlowNumericNum ! get input index to unitary system heat supply air flow
INTEGER :: iNoCoolHeatSAFMAlphaNum ! get input index to unitary system no cool/heat supply air flow
INTEGER :: iMaxNoCoolHeatAirVolFlowNumericNum ! get input index to unitary system no cool/heat supply air flow
INTEGER :: iDesignSpecMSHPTypeAlphaNum ! get input index to unitary system MSHP coil type
INTEGER :: iDesignSpecMSHPNameAlphaNum ! get input index to unitary system MSHP coil name
INTEGER :: iAirInletNodeNameAlphaNum ! get input index to unitary system air inlet node
INTEGER :: iAirOutletNodeNameAlphaNum ! get input index to unitary system air outlet node
INTEGER :: iDOASDXMinTempNumericNum ! get input index to unitary system DOAS DX coil min outlet temp
INTEGER :: iCoolFlowPerFloorAreaNumericNum ! get input index to unitary system cool flow per floor area
INTEGER :: iCoolFlowPerFracCoolNumericNum ! get input index to unitary system cool flow per fraction cool
INTEGER :: iCoolFlowPerCoolCapNumericNum ! get input index to unitary system cool flow per cooling cap
INTEGER :: iHeatFlowPerFloorAreaNumericNum ! get input index to unitary system heat flow per floor area
INTEGER :: iHeatFlowPerFracCoolNumericNum ! get input index to unitary system heat flow per fraction heat
INTEGER :: iHeatFlowPerHeatCapNumericNum ! get input index to unitary system heat flow per heating cap
INTEGER :: iNoCoolHeatFlowPerFloorAreaNumericNum ! get input index to unitary system no cool/heat FPA
INTEGER :: iNoCoolHeatFlowPerFracCoolNumericNum ! get input index to unitary system no cool/heat FPFC
INTEGER :: iNoCoolHeatFlowPerFracHeatNumericNum ! get input index to unitary system no cool/heat FPFH
INTEGER :: iNoCoolHeatFlowPerCoolCapNumericNum ! get input index to unitary system no cool/heat FPCC
INTEGER :: iNoCoolHeatFlowPerHeatCapNumericNum ! get input index to unitary system no cool/heat FPHC
INTEGER :: iDesignMaxOutletTempNumericNum ! get input index to unitary system design max outlet temp
INTEGER :: iMaxOATSuppHeatNumericNum ! get input index to unitary system maximum OAT for supp operation
INTEGER :: iCondenserNodeAlphaNum ! get input index to unitary system condenser node
INTEGER :: iMaxONOFFCycPerHourNumericNum ! get input index to unitary system WSHP max cycle per hour
INTEGER :: iHPTimeConstantNumericNum ! get input index to unitary system WSHP time constant
INTEGER :: iOnCyclePowerFracNumericNum ! get input index to unitary system WSHP on cycle power
INTEGER :: iFanDelayTimeNumericNum ! get input index to unitary system WSHP off cycle power
INTEGER :: iAncillaryOnPowerNumericNum ! get input index to unitary system ancillary on power
INTEGER :: iAncillaryOffPowerNumericNum ! get input index to unitary system ancillary off power
INTEGER :: iDesignHRWaterVolFlowNumericNum ! get input index to unitary system design HR water flow
INTEGER :: iMaxHROutletWaterTempNumericNum ! get input index to unitary system max HR outlet temp
INTEGER :: iHRWaterInletNodeAlphaNum ! get input index to unitary system HR water inlet node
INTEGER :: iHRWaterOutletNodeAlphaNum ! get input index to unitary system HR water outlet node
CurrentModuleObject='AirloopHVAC:UnitarySystem'
NumUnitarySystem = GetNumObjectsFound(TRIM(CurrentModuleObject))
ALLOCATE(UnitarySystem(NumUnitarySystem))
ALLOCATE(CheckEquipName(NumUnitarySystem))
ALLOCATE(MultiOrVarSpeedHeatCoil(NumUnitarySystem))
ALLOCATE(MultiOrVarSpeedCoolCoil(NumUnitarySystem))
CheckEquipName = .TRUE.
MultiOrVarSpeedHeatCoil = .FALSE.
MultiOrVarSpeedCoolCoil = .FALSE.
CALL GetObjectDefMaxArgs(TRIM(CurrentModuleObject),TotalArgs,NumAlphas,NumNumbers)
TempAlphas = NumAlphas
TempNumbers = NumNumbers
CurrentModuleObject='UnitarySystemPerformance:HeatPump:Multispeed'
NumDesignSpecMultiSpeedHP = GetNumObjectsFound(TRIM(CurrentModuleObject))
CALL GetObjectDefMaxArgs(TRIM(CurrentModuleObject),TotalArgs,NumAlphas,NumNumbers)
NumAlphas = MAX(TempAlphas, NumAlphas)
NumNumbers = MAX(TempNumbers, NumNumbers)
ALLOCATE(Alphas(NumAlphas))
Alphas=' '
ALLOCATE(cAlphaFields(NumAlphas))
cAlphaFields=' '
ALLOCATE(cNumericFields(NumNumbers))
cNumericFields=' '
ALLOCATE(Numbers(NumNumbers))
Numbers=0.0d0
ALLOCATE(lAlphaBlanks(NumAlphas))
lAlphaBlanks=.TRUE.
ALLOCATE(lNumericBlanks(NumNumbers))
lNumericBlanks=.TRUE.
! Get the data for the DesignSpecification object
CurrentModuleObject='UnitarySystemPerformance:HeatPump:Multispeed'
ALLOCATE(DesignSpecMSHP(NumDesignSpecMultiSpeedHP))
DO DesignSpecNum = 1, NumDesignSpecMultiSpeedHP
CALL GetObjectItem(TRIM(CurrentModuleObject),DesignSpecNum,Alphas,NumAlphas,Numbers,NumNumbers,IOStatus, &
NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields)
IsNotOK=.FALSE.
IsBlank=.FALSE.
CALL VerifyName(Alphas(1),DesignSpecMSHP%Name,DesignSpecNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.TRUE.
IF (IsBlank) Alphas(1)='xxxxx'
END IF
DesignSpecMSHP(DesignSpecNum)%Name = Alphas(1)
DesignSpecMSHP(DesignSpecNum)%NumOfSpeedHeating = Numbers(1)
NumOfSpeedHeating = DesignSpecMSHP(DesignSpecNum)%NumOfSpeedHeating
DesignSpecMSHP(DesignSpecNum)%NumOfSpeedCooling = Numbers(2)
NumOfSpeedCooling = DesignSpecMSHP(DesignSpecNum)%NumOfSpeedCooling
! initialize number of speeds (MIN = 4 or greater of cooling and heating speeds x 2)
MaxSpeedNum = 0 ! set to 0 so we know if the inputs are valid
IF(MOD(REAL(NumNumbers-2,r64),2.0d0) .GT. 0.0d0)THEN
! check that the number of numeric speed input fields match the number of speeds
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(DesignSpecMSHP(DesignSpecNum)%Name))
CALL ShowContinueError('Illegal number of entries in Supply Air Flow Rate fields.')
CALL ShowContinueError('..number of required Supply Air Flow Rate fields = '// &
TRIM(TrimSigDigits(2*(MAX(NumOfSpeedCooling,NumOfSpeedHeating)),0)))
CALL ShowContinueError('..number of actual Supply Air Flow Rate fields = '//TRIM(TrimSigDigits((NumNumbers-2),0)))
ErrorsFound=.TRUE.
ELSE
MaxSpeedNum = (NumNumbers-2)/2 ! Extensible fields included (>4) for cooling and heating
END IF
IF(MaxSpeedNum .LT. MAX(NumOfSpeedHeating,NumOfSpeedCooling))THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(DesignSpecMSHP(DesignSpecNum)%Name))
CALL ShowContinueError('Illegal number of entries in Supply Air Flow Rate fields.')
CALL ShowContinueError('..number of required Supply Air Flow Rate fields = '// &
TRIM(TrimSigDigits(2*(MAX(NumOfSpeedCooling,NumOfSpeedHeating)),0)))
CALL ShowContinueError('..number of actual Supply Air Flow Rate fields = '//TRIM(TrimSigDigits((NumNumbers-2),0)))
ErrorsFound=.TRUE.
END IF
StartingSpeedRatioInput = 3 ! start the index counter at the first input for heating (e.g. 3+0*2)
IF(NumOfSpeedHeating .GT. 0 .AND. MaxSpeedNum > 0) THEN
ALLOCATE(DesignSpecMSHP(DesignSpecNum)%HeatingVolFlowRatio(MaxSpeedNum))
DO SpeedNum = 1, NumOfSpeedHeating
DesignSpecMSHP(DesignSpecNum)%HeatingVolFlowRatio(SpeedNum) = Numbers(StartingSpeedRatioInput+((SpeedNum-1)*2))
END DO
END IF
StartingSpeedRatioInput = 4 ! start the index counter at the first input for heating (e.g. 4+0*2)
IF(NumOfSpeedCooling .GT. 0 .AND. MaxSpeedNum > 0) THEN
ALLOCATE(DesignSpecMSHP(DesignSpecNum)%CoolingVolFlowRatio(MaxSpeedNum))
DO SpeedNum = 1, NumOfSpeedCooling
DesignSpecMSHP(DesignSpecNum)%CoolingVolFlowRatio(SpeedNum) = Numbers(StartingSpeedRatioInput+((SpeedNum-1)*2))
END DO
END IF
END DO
! AirLoopHVAC:UnitarySystem,
iNameAlphaNum = 1 ! A1, \field Name - \required-field
iControlTypeAlphaNum = 2 ! A2, \field Control Type
iControlZoneAlphaNum = 3 ! A3, \field Controlling Zone or Thermostat Location
iDehumidControlAlphaNum = 4 ! A4, \field dehumidification Control Type
iSysAvailSchedAlphaNum = 5 ! A5, \field Availability Schedule Name
iAirInletNodeNameAlphaNum = 6 ! A6, \field Air Inlet Node Name - \required-field
iAirOutletNodeNameAlphaNum = 7 ! A7, \field Air Outlet Node Name - \required-field
iFanTypeAlphaNum = 8 ! A8, \field Supply Fan Object Type
iFanNameAlphaNum = 9 ! A9, \field Supply Fan Name
iFanPlaceAlphaNum = 10 ! A10, \field Fan Placement
iFanSchedAlphaNum = 11 ! A11, \field Supply Air Fan Operating Mode Schedule Name
iHeatingCoilTypeAlphaNum = 12 ! A12, \field Heating Coil Object Type
iHeatingCoilNameAlphaNum = 13 ! A13, \field Heating Coil Name
iHeatingCoilSizeRatioNumericNum = 1 ! N1, \field DX Heating Coil Sizing Ratio
iCoolingCoilTypeAlphaNum = 14 ! A14, \field Cooling Coil Object Type
iCoolingCoilNameAlphaNum = 15 ! A15, \field Cooling Coil Name
iDOASDXCoilAlphaNum = 16 ! A16, \field Use DOAS DX Cooling Coil
iDOASDXMinTempNumericNum = 2 ! N2 , \field DOAS DX Cooling Coil Leaving Minimum Air Temperature
iRunOnLatentLoadAlphaNum = 17 ! A17, \field Run on Latent Load
iSuppHeatCoilTypeAlphaNum = 18 ! A18, \field Supplemental Heating Coil Object Type
iSuppHeatCoilNameAlphaNum = 19 ! A19, \field Supplemental Heating Coil Name
iCoolSAFMAlphaNum = 20 ! A20, \field Supply air Flow Rate Method During Cooling Operation
iMaxCoolAirVolFlowNumericNum = 3 ! N3, \field Supply Air Flow Rate During Cooling Operation
iCoolFlowPerFloorAreaNumericNum = 4 ! N4, \field Supply Air Flow Rate Per Floor Area During Cooling Operation
iCoolFlowPerFracCoolNumericNum = 5 ! N5, \field Fraction of Autosized Design Cooling Supply Air Flow Rate
iCoolFlowPerCoolCapNumericNum = 6 ! N6, \field Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation
iHeatSAFMAlphaNum = 21 ! A21, \field Supply air Flow Rate Method During Heating Operation
iMaxHeatAirVolFlowNumericNum = 7 ! N7, \field Supply Air Flow Rate During Heating Operation
iHeatFlowPerFloorAreaNumericNum = 8 ! N8, \field Supply Air Flow Rate Per Floor Area during Heating Operation
iHeatFlowPerFracCoolNumericNum = 9 ! N9, \field Fraction of Autosized Design Heating Supply Air Flow Rate
iHeatFlowPerHeatCapNumericNum = 10 ! N10, \field Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation
iNoCoolHeatSAFMAlphaNum = 22 ! A22, \field Supply air Flow Rate Method When No Cooling or Heating is Required
iMaxNoCoolHeatAirVolFlowNumericNum = 11 ! N11, \field Supply Air Flow Rate When No Cooling or Heating is Required
iNoCoolHeatFlowPerFloorAreaNumericNum = 12 ! N12, \field Supply Air Flow Rate Per Floor Area When No Cooling/Heating is Req
iNoCoolHeatFlowPerFracCoolNumericNum = 13 ! N13, \field Fraction of Autosized Design Cooling Supply Air Flow Rate
iNoCoolHeatFlowPerFracHeatNumericNum = 14 ! N14, \field Fraction of Autosized Design Heating Supply Air Flow Rate
iNoCoolHeatFlowPerCoolCapNumericNum = 15 ! N15, \field Design Supply Air Flow Rate Per Unit of Capacity During Cooling Op
iNoCoolHeatFlowPerHeatCapNumericNum = 16 ! N16, \field Design Supply Air Flow Rate Per Unit of Capacity During Heating Op
iDesignMaxOutletTempNumericNum = 17 ! N17, \field Maximum Supply Air Temperature
iMaxOATSuppHeatNumericNum = 18 ! N18, \field Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Op
iCondenserNodeAlphaNum = 23 ! A23, \field Outdoor Dry-Bulb Temperature Sensor Node Name
iMaxONOFFCycPerHourNumericNum = 19 ! N19, \field Maximum Cycling Rate
iHPTimeConstantNumericNum = 20 ! N20, \field Heat Pump Time Constant
iOnCyclePowerFracNumericNum = 21 ! N21, \field Fraction of On-Cycle Power Use
iFanDelayTimeNumericNum = 22 ! N22, \field Heat Pump Fan Delay Time
iAncillaryOnPowerNumericNum = 23 ! N23, \field Ancilliary On-Cycle Electric Power
iAncillaryOffPowerNumericNum = 24 ! N24, \field Ancilliary Off-Cycle Electric Power
iDesignHRWaterVolFlowNumericNum = 25 ! N25, \field Design Heat Recovery Water Flow Rate
iMaxHROutletWaterTempNumericNum = 26 ! N26, \field Maximum Temperature for Heat Recovery
iHRWaterInletNodeAlphaNum = 24 ! A24, \field Heat Recovery Water Inlet Node Name
iHRWaterOutletNodeAlphaNum = 25 ! A25, \field Heat Recovery Water Outlet Node Name
iDesignSpecMSHPTypeAlphaNum = 26 ! A26, \field design Specification Multispeed Heat Pump Object Type
iDesignSpecMSHPNameAlphaNum = 27 ! A27; \field design Specification Multispeed Heat Pump Object Name
! Get the data for the Unitary System
CurrentModuleObject='AirloopHVAC:UnitarySystem'
DO UnitarySysNum = 1, NumUnitarySystem
FanInletNode = 0
FanOutletNode = 0
FanVolFlowRate = 0.0d0
CoolingCoilInletNode = 0
CoolingCoilOutletNode = 0
HeatingCoilInletNode = 0
HeatingCoilOutletNode = 0
SupHeatCoilInletNode = 0
SupHeatCoilOutletNode = 0
CurrentModuleObject = 'AirLoopHVAC:UnitarySystem'
UnitarySystem(UnitarySysNum)%UnitarySystemType = CurrentModuleObject
UnitarySystem(UnitarySysNum)%UnitarySystemType_Num = UnitarySystem_AnyCoilType
CALL GetObjectItem(TRIM(CurrentModuleObject),UnitarySysNum,Alphas,NumAlphas,Numbers,NumNumbers,IOStatus, &
NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields)
IsNotOK=.FALSE.
IsBlank=.FALSE.
CALL VerifyName(Alphas(iNameAlphaNum),UnitarySystem%Name,UnitarySysNum-1, &
IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.TRUE.
IF (IsBlank) Alphas(iNameAlphaNum)='xxxxx'
END IF
UnitarySystem(UnitarySysNum)%Name = Alphas(iNameAlphaNum)
IF(SameString(Alphas(iControlTypeAlphaNum),'Load'))THEN
UnitarySystem(UnitarySysNum)%ControlType = LoadBased
ELSEIF(SameString(Alphas(iControlTypeAlphaNum),'SetPoint'))THEN
UnitarySystem(UnitarySysNum)%ControlType = SetPointBased
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iControlTypeAlphaNum))//' = '//TRIM(Alphas(iControlTypeAlphaNum)))
ErrorsFound=.TRUE.
END IF
!Get the Controlling Zone or Location of the Thermostat
UnitarySystem(UnitarySysNum)%ControlZoneNum = FindItemInList(Alphas(iControlZoneAlphaNum),Zone%Name,NumOfZones)
IF(.NOT. lAlphaBlanks(iDehumidControlAlphaNum))THEN
IF (SameString(Alphas(iDehumidControlAlphaNum),'None') .OR. &
SameString(Alphas(iDehumidControlAlphaNum),'Multimode') .OR. &
SameString(Alphas(iDehumidControlAlphaNum),'CoolReheat'))THEN
AirNodeFound=.FALSE.
IF(SameString(Alphas(iDehumidControlAlphaNum),'Multimode'))THEN
UnitarySystem(UnitarySysNum)%DehumidControlType_Num = DehumidControl_Multimode
UnitarySystem(UnitarySysNum)%Humidistat = .TRUE.
END IF
IF(SameString(Alphas(iDehumidControlAlphaNum),'CoolReheat'))THEN
UnitarySystem(UnitarySysNum)%DehumidControlType_Num = DehumidControl_CoolReheat
UnitarySystem(UnitarySysNum)%Humidistat = .TRUE.
IF(lAlphaBlanks(iSuppHeatCoilNameAlphaNum))THEN
END IF
END IF
IF(SameString(Alphas(iDehumidControlAlphaNum),'None'))THEN
UnitarySystem(UnitarySysNum)%DehumidControlType_Num = DehumidControl_None
UnitarySystem(UnitarySysNum)%Humidistat = .FALSE.
END IF
IF(UnitarySystem(UnitarySysNum)%Humidistat .AND. &
UnitarySystem(UnitarySysNum)%ControlType == LoadBased)THEN
DO HstatZoneNum = 1, NumHumidityControlZones
IF(HumidityControlZone(HstatZoneNum)%ActualZoneNum .NE. UnitarySystem(UnitarySysNum)%ControlZoneNum)CYCLE
AirNodeFound=.TRUE.
END DO
IF (.not. AirNodeFound) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Did not find Air Node (Zone with Humidistat).')
CALL ShowContinueError('specified '//TRIM(cAlphaFields(iControlZoneAlphaNum))//' = '// &
TRIM(Alphas(iControlZoneAlphaNum)))
ErrorsFound=.TRUE.
END IF
END IF
ELSE ! invalid input
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iDehumidControlAlphaNum))//' = '// &
TRIM(Alphas(iDehumidControlAlphaNum)))
UnitarySystem(UnitarySysNum)%Humidistat = .FALSE.
ErrorsFound=.TRUE.
END IF
END IF
IF (lAlphaBlanks(iSysAvailSchedAlphaNum)) THEN
UnitarySystem(UnitarySysNum)%SysAvailSchedPtr = ScheduleAlwaysOn
ELSE
UnitarySystem(UnitarySysNum)%SysAvailSchedPtr = GetScheduleIndex(Alphas(iSysAvailSchedAlphaNum))
IF (UnitarySystem(UnitarySysNum)%SysAvailSchedPtr == 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iSysAvailSchedAlphaNum))//' = '// &
TRIM(Alphas(iSysAvailSchedAlphaNum)))
ErrorsFound=.TRUE.
END IF
END IF
UnitarySystem(UnitarySysNum)%UnitarySystemInletNodeNum = &
GetOnlySingleNode(Alphas(iAirInletNodeNameAlphaNum),ErrorsFound,CurrentModuleObject,Alphas(iNameAlphaNum), &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsParent)
UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum = &
GetOnlySingleNode(Alphas(iAirOutletNodeNameAlphaNum),ErrorsFound,CurrentModuleObject,Alphas(iNameAlphaNum), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsParent)
!Get fan data
FanType = Alphas(iFanTypeAlphaNum)
FanName = Alphas(iFanNameAlphaNum)
IF(.NOT. lAlphaBlanks(iFanTypeAlphaNum))THEN
IsNotOK=.FALSE.
CALL GetFanType(FanName, UnitarySystem(UnitarySysNum)%FanType_Num, IsNotOK, &
CurrentModuleObject,Alphas(iNameAlphaNum))
IF (IsNotOK) THEN
ErrorsFound=.TRUE.
END IF
UnitarySystem(UnitarySysNum)%FanExists = .TRUE.
END IF
IF (UnitarySystem(UnitarySysNum)%FanType_Num == FanType_SimpleOnOff .OR. &
UnitarySystem(UnitarySysNum)%FanType_Num == FanType_SimpleConstVolume .OR. &
UnitarySystem(UnitarySysNum)%FanType_Num == FanType_SimpleVAV)THEN
IsNotOK=.FALSE.
CALL ValidateComponent(FanType,FanName,IsNotOK,TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE ! mine data from fan object
! Get the fan index
ErrFlag=.FALSE.
CALL GetFanIndex(FanName, UnitarySystem(UnitarySysNum)%FanIndex, ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
! Get the Design Fan Volume Flow Rate
ErrFlag=.FALSE.
FanVolFlowRate = GetFanDesignVolumeFlowRate(FanType,FanName,ErrFlag)
IF(FanVolFlowRate == Autosize)UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
UnitarySystem(UnitarySysNum)%ActualFanVolFlowRate = FanVolFlowRate
UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate = FanVolFlowRate
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
! Get the Fan Inlet Node
ErrFlag=.FALSE.
FanInletNode = GetFanInletNode(FanType,FanName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
! Get the Fan Outlet Node
ErrFlag=.FALSE.
FanOutletNode = GetFanOutletNode(FanType,FanName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
! Get the fan's availability schedule
ErrFlag=.FALSE.
UnitarySystem(UnitarySysNum)%FanAvailSchedPtr = GetFanAvailSchPtr(FanType,FanName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
END IF ! IF (IsNotOK) THEN
ELSEIF(UnitarySystem(UnitarySysNum)%FanExists)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iFanTypeAlphaNum))//' = '//TRIM(Alphas(iFanTypeAlphaNum)))
ErrorsFound=.TRUE.
END IF ! IF (UnitarySystem(UnitarySysNum)%FanType_Num...
! Add fan to component sets array
IF(UnitarySystem(UnitarySysNum)%FanExists)CALL SetUpCompSets(CurrentModuleObject, Alphas(iNameAlphaNum), &
Alphas(iFanTypeAlphaNum),Alphas(iFanNameAlphaNum),NodeID(FanInletNode),NodeID(FanOutletNode))
IF (SameString(Alphas(iFanPlaceAlphaNum),'BlowThrough') ) &
UnitarySystem(UnitarySysNum)%FanPlace = BlowThru
IF (SameString(Alphas(iFanPlaceAlphaNum),'DrawThrough') ) &
UnitarySystem(UnitarySysNum)%FanPlace = DrawThru
IF (UnitarySystem(UnitarySysNum)%FanPlace .EQ.0 .AND. UnitarySystem(UnitarySysNum)%FanExists) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iFanPlaceAlphaNum))//' = '//TRIM(Alphas(iFanPlaceAlphaNum)))
ErrorsFound = .TRUE.
END IF
UnitarySystem(UnitarySysNum)%FanOpModeSchedPtr = GetScheduleIndex(Alphas(iFanSchedAlphaNum))
IF (.NOT. lAlphaBlanks(iFanSchedAlphaNum) .AND. UnitarySystem(UnitarySysNum)%FanOpModeSchedPtr == 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iFanSchedAlphaNum))//' = '//TRIM(Alphas(iFanSchedAlphaNum)))
ErrorsFound=.TRUE.
ELSEIF (lAlphaBlanks(iFanSchedAlphaNum)) THEN
IF(UnitarySystem(UnitarySysNum)%ControlType == SetPointBased)THEN
! Fan operating mode must be constant fan so that the coil outlet temp is proportional to PLR
! Cycling fan always outputs the full load outlet air temp so should not be used with set point based control
UnitarySystem(UnitarySysNum)%FanOpMode = ContFanCycCoil
ELSE
UnitarySystem(UnitarySysNum)%FanOpMode = CycFanCycCoil
IF(UnitarySystem(UnitarySysNum)%FanType_Num /= FanType_SimpleOnOff)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError(TRIM(cAlphaFields(iFanTypeAlphaNum))//' = '//TRIM(Alphas(iFanTypeAlphaNum)))
CALL ShowContinueError('Fan type must be Fan:OnOff when '// &
TRIM(cAlphaFields(iFanSchedAlphaNum))//' = Blank.')
ErrorsFound=.TRUE.
END IF
END IF
ELSE IF(.NOT. lAlphaBlanks(iFanSchedAlphaNum) .AND. UnitarySystem(UnitarySysNum)%FanOpModeSchedPtr .GT. 0 .AND. &
UnitarySystem(UnitarySysNum)%ControlType == SetPointBased)THEN
IF (.NOT. CheckScheduleValueMinMax(UnitarySystem(UnitarySysNum)%FanOpModeSchedPtr,'>',0.0d0,'<=',1.0d0)) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('For '//TRIM(cAlphaFields(iFanTypeAlphaNum))//' = '//TRIM(Alphas(iFanTypeAlphaNum)))
CALL ShowContinueError('Fan operating mode must be continuous (fan operating mode schedule values > 0).')
CALL ShowContinueError('Error found in '//TRIM(cAlphaFields(iFanSchedAlphaNum))//' = '//TRIM(Alphas(iFanSchedAlphaNum)))
CALL ShowContinueError('...schedule values must be (>0., <=1.)')
ErrorsFound=.TRUE.
END IF
END IF
! Check fan's schedule for cycling fan operation IF constant volume fan is used
IF(UnitarySystem(UnitarySysNum)%FanOpModeSchedPtr .GT. 0 .AND. &
UnitarySystem(UnitarySysNum)%FanType_Num == FanType_SimpleConstVolume)THEN
IF (.NOT. CheckScheduleValueMinMax(UnitarySystem(UnitarySysNum)%FanOpModeSchedPtr,'>',0.0d0,'<=',1.0d0)) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('For '//TRIM(cAlphaFields(iFanTypeAlphaNum))//' = '//TRIM(Alphas(iFanTypeAlphaNum)))
CALL ShowContinueError('Fan operating mode must be continuous (fan operating mode schedule values > 0).')
CALL ShowContinueError('Error found in '//TRIM(cAlphaFields(iFanSchedAlphaNum))//' = '// &
TRIM(Alphas(iFanSchedAlphaNum)))
CALL ShowContinueError('...schedule values must be (>0., <=1.)')
ErrorsFound=.TRUE.
END IF
END IF
!Get coil data
HeatingCoilType = Alphas(iHeatingCoilTypeAlphaNum)
HeatingCoilName = Alphas(iHeatingCoilNameAlphaNum)
IF(NumNumbers .GT. (iHeatingCoilSizeRatioNumericNum-1))THEN
HeatingSizingRatio = Numbers(iHeatingCoilSizeRatioNumericNum)
UnitarySystem(UnitarySysNum)%HeatingSizingRatio = HeatingSizingRatio
ELSE
HeatingSizingRatio = 1.0d0
END IF
HeatingCoilPLFCurveIndex = 0
UnitarySystem(UnitarySysNum)%HeatingCoilName = HeatingCoilName
IF(.NOT. lAlphaBlanks(iHeatingCoilTypeAlphaNum))THEN
UnitarySystem(UnitarySysNum)%HeatCoilExists = .TRUE.
PrintMessage = .FALSE.
END IF
IF (SameString(HeatingCoilType, 'Coil:Heating:DX:VariableSpeed') )THEN
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num = Coil_HeatingAirToAirVariableSpeed
ELSEIF (SameString(HeatingCoilType,'Coil:Heating:DX:MultiSpeed')) THEN
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num = CoilDX_MultiSpeedHeating
ELSEIF (SameString(HeatingCoilType,'Coil:Heating:Water')) THEN
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num = Coil_HeatingWater
ELSEIF (SameString(HeatingCoilType,'Coil:Heating:Steam')) THEN
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num = Coil_HeatingSteam
ELSEIF (SameString(HeatingCoilType,'Coil:Heating:WaterToAirHeatPump:EquationFit')) THEN
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num = Coil_HeatingWaterToAirHPSimple
ELSEIF (SameString(HeatingCoilType,'Coil:Heating:WaterToAirHeatPump:ParameterEstimation')) THEN
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num = Coil_HeatingWaterToAirHP
ELSEIF (SameString(HeatingCoilType,'Coil:Heating:WaterToAirHeatPump:VariableSpeedEquationFit')) THEN
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num = Coil_HeatingWaterToAirHPVSEquationFit
ELSEIF (SameString(HeatingCoilType,'Coil:Heating:Electric:MultiStage')) THEN
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num = Coil_HeatingElectric_MultiStage
ELSEIF (SameString(HeatingCoilType,'Coil:Heating:Gas:MultiStage')) THEN
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num = Coil_HeatingGas_MultiStage
ELSEIF (SameString(HeatingCoilType,'Coil:Heating:Gas') .OR. &
SameString(HeatingCoilType,'Coil:Heating:Electric') .OR. &
SameString(HeatingCoilType,'Coil:Heating:Desuperheater')) THEN
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num = GetHeatingCoilTypeNum(HeatingCoilType,HeatingCoilName,ErrFlag)
ELSE IF(UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num = &
GetDXCoilTypeNum(HeatingCoilType,HeatingCoilName,ErrFlag,PrintMessage)
END IF
IF (UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical) THEN
UnitarySystem(UnitarySysNum)%DXHeatingCoil = .TRUE.
ErrFlag = .FALSE.
CALL ValidateComponent(HeatingCoilType,HeatingCoilName,IsNotOK, &
TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE ! mine data from DX heating coil
! Get DX heating coil index
CALL GetDXCoilIndex(HeatingCoilName,UnitarySystem(UnitarySysNum)%HeatingCoilIndex,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag = .FALSE.
END IF
UnitarySystem(UnitarySysNum)%HeatingCoilAvailSchPtr = GetDXCoilAvailSchPtr(HeatingCoilType,HeatingCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag = .FALSE.
END IF
! Get DX heating coil capacity
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = &
GetDXCoilCapacity(HeatingCoilType,HeatingCoilName,ErrFlag)
IF(UnitarySystem(UnitarySysNum)%DesignHeatingCapacity == Autosize) &
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag = .FALSE.
END IF
! Get DX coil air flow rate.
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = GetDXCoilAirFlow(HeatingCoilType,HeatingCoilName,ErrFlag)
IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow == Autosize) &
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
! Get the Heating Coil Nodes
HeatingCoilInletNode = GetDXCoilInletNode(HeatingCoilType,HeatingCoilName,ErrFlag)
HeatingCoilOutletNode = GetDXCoilOutletNode(HeatingCoilType,HeatingCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag = .FALSE.
END IF
CALL SetDXCoolingCoilData(UnitarySystem(UnitarySysNum)%HeatingCoilIndex,ErrorsFound, &
HeatSizeRatio=HeatingSizingRatio)
END IF
ELSEIF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingAirToAirVariableSpeed .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPVSEquationFit) THEN
UnitarySystem(UnitarySysNum)%DXHeatingCoil = .TRUE.
CALL ValidateComponent(HeatingCoilType,HeatingCoilName,IsNotOK, &
TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE
UnitarySystem(UnitarySysNum)%HeatingCoilIndex = GetCoilIndexVariableSpeed(HeatingCoilType, HeatingCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag = .FALSE.
END IF
UnitarySystem(UnitarySysNum)%NumOfSpeedHeating = GetVSCoilNumOfSpeeds(HeatingCoilName,ErrFlag)
UnitarySystem(UnitarySysNum)%HeatingCoilAvailSchPtr = ScheduleAlwaysOn
HeatingCoilInletNode=GetCoilInletNodeVariableSpeed(HeatingCoilType, HeatingCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag = .FALSE.
END IF
HeatingCoilOutletNode=GetCoilOutletNodeVariableSpeed(HeatingCoilType, HeatingCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag = .FALSE.
END IF
END IF
ELSEIF (UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating) THEN
UnitarySystem(UnitarySysNum)%DXHeatingCoil = .TRUE.
ErrFlag = .FALSE.
CALL GetDXCoilIndex(HeatingCoilName,UnitarySystem(UnitarySysNum)%HeatingCoilIndex, &
ErrFlag, TRIM(HeatingCoilType))
IF(ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.true.
ErrFlag = .FALSE.
END IF
UnitarySystem(UnitarySysNum)%HeatingCoilAvailSchPtr = GetDXCoilAvailSchPtr(HeatingCoilType,HeatingCoilName,ErrFlag)
HeatingCoilInletNode = GetDXCoilInletNode(HeatingCoilType,HeatingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
HeatingCoilOutletNode = GetDXCoilOutletNode(HeatingCoilType,HeatingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow == Autosize) &
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
! IF(UnitarySystem(UnitarySysNum)%DesignHeatingCapacity == Autosize) &
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
ELSEIF (UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingElectric_MultiStage .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingGas_MultiStage ) THEN
ErrFlag = .FALSE.
CALL GetHeatingCoilIndex(HeatingCoilName,UnitarySystem(UnitarySysNum)%HeatingCoilIndex, ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag = .FALSE.
END IF
HeatingCoilInletNode = GetHeatingCoilInletNode(HeatingCoilType,HeatingCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag = .FALSE.
END IF
HeatingCoilOutletNode = GetHeatingCoilOutletNode(HeatingCoilType,HeatingCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag = .FALSE.
END IF
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = &
GetHeatingCoilCapacity(HeatingCoilType,HeatingCoilName,ErrFlag)
! IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow == Autosize) &
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
IF(UnitarySystem(UnitarySysNum)%DesignHeatingCapacity == Autosize) &
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
ELSEIF (UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingGas .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingElectric .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingDesuperheater) THEN
ErrFlag = .FALSE.
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag = .FALSE.
ELSE
CALL ValidateComponent(HeatingCoilType,HeatingCoilName,IsNotOK, &
TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE ! mine data from heating coil
! Get heating coil index
ErrFlag=.FALSE.
CALL GetHeatingCoilIndex(HeatingCoilName,UnitarySystem(UnitarySysNum)%HeatingCoilIndex,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag=.FALSE.
END IF
! Get the design heating capacity
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity = &
GetHeatingCoilCapacity(HeatingCoilType,HeatingCoilName,ErrFlag)
IF(UnitarySystem(UnitarySysNum)%DesignHeatingCapacity == Autosize) &
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag=.FALSE.
END IF
UnitarySystem(UnitarySysNum)%HeatingCoilAvailSchPtr = &
GetCoilAvailScheduleIndex(HeatingCoilType,HeatingCoilName,ErrFlag)
! Get the Heating Coil Inlet Node
HeatingCoilInletNode = &
GetHeatingCoilInletNode(HeatingCoilType,HeatingCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag=.FALSE.
END IF
! Get the Heating Coil Outlet Node
HeatingCoilOutletNode = &
GetHeatingCoilOutletNode(HeatingCoilType,HeatingCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag=.FALSE.
END IF
! Get the Heating Coil PLF Curve Index
HeatingCoilPLFCurveIndex = &
GetHeatingCoilPLFCurveIndex(HeatingCoilType,HeatingCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag=.FALSE.
END IF
! These heating coil types do not have an air flow input field
IF(NumNumbers < iMaxHeatAirVolFlowNumericNum)THEN
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
END IF ! IF (IsNotOK) THEN
END IF
ELSEIF (UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWater) THEN
CALL ValidateComponent(HeatingCoilType,HeatingCoilName,IsNotOK,TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE ! mine data from heating coil object
ErrFlag = .FALSE.
UnitarySystem(UnitarySysNum)%HeatingCoilAvailSchPtr = &
GetWaterCoilAvailScheduleIndex(HeatingCoilType,HeatingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
UnitarySystem(UnitarySysNum)%HeatingCoilIndex = GetWaterCoilIndex('COIL:HEATING:WATER',HeatingCoilName,ErrFlag)
IF (UnitarySystem(UnitarySysNum)%HeatingCoilIndex .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iHeatingCoilNameAlphaNum))//' = ' &
//TRIM(HeatingCoilName))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! Get the Heating Coil water Inlet or control Node number
UnitarySystem(UnitarySysNum)%HeatCoilFluidInletNode = &
GetCoilWaterInletNode('Coil:Heating:Water',HeatingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! Get the Heating Coil hot water max volume flow rate
UnitarySystem(UnitarySysNum)%MaxHeatCoilFluidFlow = GetCoilMaxWaterFlowRate('Coil:Heating:Water', &
HeatingCoilName,ErrFlag)
IF(UnitarySystem(UnitarySysNum)%MaxHeatCoilFluidFlow == Autosize) &
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! Get the Heating Coil Inlet Node
HeatingCoilInletNode = GetWaterCoilInletNode('Coil:Heating:Water',HeatingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! Get the Heating Coil Outlet Node
HeatingCoilOutletNode = GetWaterCoilOutletNode('Coil:Heating:Water',HeatingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
END IF
ELSEIF (UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingSteam) THEN
CALL ValidateComponent(HeatingCoilType,HeatingCoilName,IsNotOK,TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE ! mine data from heating coil object
ErrFlag = .FALSE.
UnitarySystem(UnitarySysNum)%HeatingCoilAvailSchPtr = &
GetSteamCoilAvailScheduleIndex(HeatingCoilType,HeatingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
UnitarySystem(UnitarySysNum)%HeatingCoilIndex = GetSteamCoilIndex('COIL:HEATING:STEAM',HeatingCoilName,ErrFlag)
IF (UnitarySystem(UnitarySysNum)%HeatingCoilIndex .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iHeatingCoilNameAlphaNum))//' = ' &
//TRIM(HeatingCoilName))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! Get the Heating Coil steam inlet node number
ErrFlag = .FALSE.
UnitarySystem(UnitarySysNum)%HeatCoilFluidInletNode = &
GetSteamCoilSteamInletNode('Coil:Heating:Steam',HeatingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! Get the Heating Coil steam max volume flow rate
UnitarySystem(UnitarySysNum)%MaxHeatCoilFluidFlow = &
GetCoilMaxSteamFlowRate(UnitarySystem(UnitarySysNum)%HeatingCoilIndex,ErrFlag)
IF(UnitarySystem(UnitarySysNum)%MaxHeatCoilFluidFlow == Autosize) &
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
IF (UnitarySystem(UnitarySysNum)%MaxHeatCoilFluidFlow .GT. 0.0d0)THEN
SteamIndex = 0 ! Function GetSatDensityRefrig will look up steam index if 0 is passed
SteamDensity=GetSatDensityRefrig("STEAM",TempSteamIn,1.0d0,SteamIndex,'GetAirLoopHVACHeatCoolInput')
UnitarySystem(UnitarySysNum)%MaxHeatCoilFluidFlow = &
UnitarySystem(UnitarySysNum)%MaxHeatCoilFluidFlow * SteamDensity
ErrFlag = .FALSE.
END IF
! Get the Heating Coil Inlet Node
ErrFlag = .FALSE.
HeatingCoilInletNode = &
GetSteamCoilAirInletNode(UnitarySystem(UnitarySysNum)%HeatingCoilIndex,HeatingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! Get the Heating Coil Outlet Node
HeatingCoilOutletNode = &
GetSteamCoilAirOutletNode(UnitarySystem(UnitarySysNum)%HeatingCoilIndex,HeatingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
IF(NumNumbers < iMaxHeatAirVolFlowNumericNum)THEN
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Autosize
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
END IF
ELSEIF (UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPSimple) THEN
UnitarySystem(UnitarySysNum)%DXHeatingCoil = .TRUE.
CALL ValidateComponent(HeatingCoilType,HeatingCoilName,IsNotOK,TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE ! mine data from heating coil object
ErrFlag = .FALSE.
UnitarySystem(UnitarySysNum)%HeatingCoilAvailSchPtr = ScheduleAlwaysOn
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
UnitarySystem(UnitarySysNum)%HeatingCoilIndex = GetWtoAHPSimpleCoilIndex(HeatingCoilType,HeatingCoilName,ErrFlag)
IF (UnitarySystem(UnitarySysNum)%HeatingCoilIndex .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iHeatingCoilNameAlphaNum))//' = ' &
//TRIM(HeatingCoilName))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! Get the Heating Coil Inlet Node
ErrFlag = .FALSE.
HeatingCoilInletNode = GetWtoAHPSimpleCoilInletNode(HeatingCoilType, HeatingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! Get the Heating Coil Outlet Node
HeatingCoilOutletNode = GetWtoAHPSimpleCoilOutletNode(HeatingCoilType, HeatingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! IF(UnitarySystem(UnitarySysNum)%MaxHeatCoilFluidFlow == Autosize) &
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
! IF(UnitarySystem(UnitarySysNum)%DesignHeatingCapacity == Autosize) &
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
! IF(UnitarySystem(UnitarySysNum)%MaxHeatCoilFluidFlow == Autosize) &
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
ELSEIF (UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHP) THEN
UnitarySystem(UnitarySysNum)%DXHeatingCoil = .TRUE.
CALL ValidateComponent(HeatingCoilType,HeatingCoilName,IsNotOK,TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE ! mine data from heating coil object
ErrFlag = .FALSE.
UnitarySystem(UnitarySysNum)%HeatingCoilAvailSchPtr = ScheduleAlwaysOn
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
UnitarySystem(UnitarySysNum)%HeatingCoilIndex = GetWtoAHPCoilIndex(HeatingCoilType, HeatingCoilName,ErrFlag)
IF (UnitarySystem(UnitarySysNum)%HeatingCoilIndex .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iHeatingCoilNameAlphaNum))//' = ' &
//TRIM(HeatingCoilName))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! Get the Heating Coil Inlet Node
ErrFlag = .FALSE.
HeatingCoilInletNode = GetWtoAHPCoilInletNode(HeatingCoilType, HeatingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! Get the Heating Coil Outlet Node
HeatingCoilOutletNode = GetWtoAHPCoilOutletNode(HeatingCoilType, HeatingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! IF(UnitarySystem(UnitarySysNum)%MaxHeatCoilFluidFlow == Autosize) &
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
! IF(UnitarySystem(UnitarySysNum)%DesignHeatingCapacity == Autosize) &
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
! IF(UnitarySystem(UnitarySysNum)%MaxHeatCoilFluidFlow == Autosize) &
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
ELSEIF(UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iHeatingCoilTypeAlphaNum))//' = '// &
TRIM(Alphas(iHeatingCoilTypeAlphaNum)))
ErrorsFound=.TRUE.
END IF ! IF (UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingGas .OR. &, etc.
IF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingElectric_MultiStage .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingGas_MultiStage) THEN
UnitarySystem(UnitarySysNum)%MultiSpeedHeatingCoil = .TRUE.
ELSEIF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPVSEquationFit .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingAirToAirVariableSpeed ) THEN
UnitarySystem(UnitarySysNum)%VarSpeedHeatingCoil = .TRUE.
END IF
! coil outlet node set point has priority, IF not exist, then use system outlet node
IF(NodeHasSPMCtrlVarType(UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum, iCtrlVarType_Temp)) &
UnitarySystem(UnitarySysNum)%SystemHeatControlNodeNum = UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum
IF(NodeHasSPMCtrlVarType(HeatingCoilOutletNode, iCtrlVarType_Temp)) &
UnitarySystem(UnitarySysNum)%SystemHeatControlNodeNum = HeatingCoilOutletNode
UnitarySystem(UnitarySysNum)%HeatCoilInletNodeNum = HeatingCoilInletNode
UnitarySystem(UnitarySysNum)%HeatCoilOutletNodeNum = HeatingCoilOutletNode
UnitarySystem(UnitarySysNum)%HeatingCoilName = HeatingCoilName
! Add heating coil to component sets array
IF(UnitarySystem(UnitarySysNum)%HeatCoilExists) THEN
IF (UnitarySystem(UnitarySysNum)%HeatingCoilType_Num .NE. CoilDX_MultiSpeedHeating) THEN
CALL SetUpCompSets(CurrentModuleObject, Alphas(iNameAlphaNum), &
Alphas(iHeatingCoilTypeAlphaNum),Alphas(iHeatingCoilNameAlphaNum), &
NodeID(HeatingCoilInletNode), NodeID(HeatingCoilOutletNode))
ELSE
CALL SetUpCompSets(CurrentModuleObject, Alphas(iNameAlphaNum), &
Alphas(iHeatingCoilTypeAlphaNum),Alphas(iHeatingCoilNameAlphaNum), &
'UNDEFINED', 'UNDEFINED')
END IF
END IF
! Get Cooling Coil Information IF available
CoolingCoilType = Alphas(iCoolingCoilTypeAlphaNum)
CoolingCoilName = Alphas(iCoolingCoilNameAlphaNum)
IF(.NOT. lAlphaBlanks(iCoolingCoilTypeAlphaNum))THEN
UnitarySystem(UnitarySysNum)%CoolCoilExists = .TRUE.
! Find the type of coil. do not print message since this may not be the correct coil type.
ErrFlag = .FALSE.
IF (SameString(CoolingCoilType, 'Coil:Cooling:DX:VariableSpeed') )THEN
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num = Coil_CoolingAirToAirVariableSpeed
ELSEIF (SameString(CoolingCoilType,'Coil:Cooling:DX:MultiSpeed')) THEN
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num = CoilDX_MultiSpeedCooling
ELSEIF (SameString(CoolingCoilType,'Coil:Cooling:Water')) THEN
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num = Coil_CoolingWater
ELSEIF (SameString(CoolingCoilType,'Coil:Cooling:Water:DetailedGeometry')) THEN
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num = Coil_CoolingWaterDetailed
ELSEIF (SameString(CoolingCoilType,'Coil:Cooling:DX:TwoStageWithHumidityControlMode')) THEN
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num = CoilDX_CoolingTwoStageWHumControl
ELSEIF (SameString(CoolingCoilType,'CoilSystem:Cooling:DX:HeatExchangerAssisted')) THEN
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num = &
GetHXAssistedCoilTypeNum(CoolingCoilType,CoolingCoilName,ErrFlag,PrintMessage)
ELSEIF (SameString(CoolingCoilType,'CoilSystem:Cooling:Water:HeatExchangerAssisted')) THEN
! why use a mining function, why not just set it using the integer representation?
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num = &
GetHXAssistedCoilTypeNum(CoolingCoilType,CoolingCoilName,ErrFlag,PrintMessage)
ELSEIF (SameString(CoolingCoilType,'Coil:Cooling:WaterToAirHeatPump:EquationFit')) THEN
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num = Coil_CoolingWaterToAirHPSimple
ELSEIF (SameString(CoolingCoilType,'Coil:Cooling:WaterToAirHeatPump:ParameterEstimation')) THEN
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num = Coil_CoolingWaterToAirHP
ELSEIF (SameString(CoolingCoilType,'Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit')) THEN
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num = Coil_CoolingWaterToAirHPVSEquationFit
ELSEIF (SameString(CoolingCoilType,'Coil:Cooling:DX:SingleSpeed')) THEN
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num = &
GetDXCoilTypeNum(CoolingCoilType,CoolingCoilName,ErrFlag,PrintMessage)
ELSEIF (SameString(CoolingCoilType,'Coil:Cooling:DX:TwoSpeed')) THEN
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num = &
GetDXCoilTypeNum(CoolingCoilType,CoolingCoilName,ErrFlag,PrintMessage)
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iCoolingCoilTypeAlphaNum))//' = '// &
TRIM(Alphas(iCoolingCoilTypeAlphaNum)))
END IF
IF (UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingSingleSpeed .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingTwoSpeed)THEN
CALL ValidateComponent(CoolingCoilType,CoolingCoilName,IsNotOK, &
TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE ! mine data from DX cooling coil
IF(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingTwoSpeed) &
UnitarySystem(UnitarySysNum)%NumOfSpeedCooling = 2
! Get DX cooling coil index
CALL GetDXCoilIndex(CoolingCoilName,UnitarySystem(UnitarySysNum)%CoolingCoilIndex,IsNotOK)
IF(IsNotOK)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
UnitarySystem(UnitarySysNum)%CoolingCoilAvailSchPtr = GetDXCoilAvailSchPtr(CoolingCoilType,CoolingCoilName,ErrFlag)
! Get DX cooling coil capacity
ErrFlag = .FALSE.
UnitarySystem(UnitarySysNum)%DesignCoolingCapacity = &
GetDXCoilCapacity(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
! Get DX coil air flow rate. Latter fields will overwrite this IF input field is present
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = GetDXCoilAirFlow(CoolingCoilType,CoolingCoilName,ErrFlag)
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == Autosize) &
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
! Get the Cooling Coil Nodes
ErrFlag=.FALSE.
CoolingCoilInletNode = GetDXCoilInletNode(CoolingCoilType,CoolingCoilName,ErrFlag)
CoolingCoilOutletNode = GetDXCoilOutletNode(CoolingCoilType,CoolingCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
! Get Outdoor condenser node from DX coil object
ErrFlag=.FALSE.
UnitarySystem(UnitarySysNum)%CondenserNodeNum = &
GetDXCoilCondenserInletNode(CoolingCoilType,CoolingCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
IF(UnitarySystem(UnitarySysNum)%FanExists)THEN
ErrFlag = .FALSE.
CALL GetFanIndex(FanName,FanIndex,ErrFlag,CurrentModuleObject)
CALL SetDXCoolingCoilData(UnitarySystem(UnitarySysNum)%CoolingCoilIndex,ErrFlag, &
SupplyFanName=FanName)
CALL SetDXCoolingCoilData(UnitarySystem(UnitarySysNum)%CoolingCoilIndex,ErrFlag, &
SupplyFanIndex=FanIndex)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
END IF
IF(UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
IF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingAirToAirVariableSpeed .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPVSEquationFit .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPSimple .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical)THEN
UnitarySystem(UnitarySysNum)%HeatPump = .TRUE.
END IF
END IF
END IF ! IF (IsNotOK) THEN
! Push heating coil PLF curve index to DX coil
IF(HeatingCoilPLFCurveIndex .GT. 0)THEN
CALL SetDXCoolingCoilData(UnitarySystem(UnitarySysNum)%CoolingCoilIndex,ErrorsFound, &
HeatingCoilPLFCurvePTR=HeatingCoilPLFCurveIndex)
END IF
ELSEIF (UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingTwoStageWHumControl)THEN
CALL ValidateComponent(CoolingCoilType,CoolingCoilName,IsNotOK, &
TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE ! mine data from DX cooling coil
! Get DX cooling coil index
CALL GetDXCoilIndex(CoolingCoilName,UnitarySystem(UnitarySysNum)%CoolingCoilIndex,IsNotOK)
IF(IsNotOK)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
UnitarySystem(UnitarySysNum)%CoolingCoilAvailSchPtr = GetDXCoilAvailSchPtr(CoolingCoilType,CoolingCoilName,ErrFlag)
! Get DX cooling coil capacity
ErrFlag = .FALSE.
UnitarySystem(UnitarySysNum)%DesignCoolingCapacity = &
GetDXCoilCapacity(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
! Get DX coil air flow rate. Later fields will overwrite this IF input field is present
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = GetDXCoilAirFlow(CoolingCoilType,CoolingCoilName,ErrFlag)
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == Autosize) &
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
! Get the Cooling Coil Nodes
ErrFlag=.FALSE.
CoolingCoilInletNode = GetDXCoilInletNode(CoolingCoilType,CoolingCoilName,ErrFlag)
CoolingCoilOutletNode = GetDXCoilOutletNode(CoolingCoilType,CoolingCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
! Get Outdoor condenser node from DX coil object
ErrFlag=.FALSE.
UnitarySystem(UnitarySysNum)%CondenserNodeNum = &
GetDXCoilCondenserInletNode(CoolingCoilType,CoolingCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
END IF ! IF (IsNotOK) THEN
! Push heating coil PLF curve index to DX coil
IF(HeatingCoilPLFCurveIndex .GT. 0)THEN
CALL SetDXCoolingCoilData(UnitarySystem(UnitarySysNum)%CoolingCoilIndex,ErrorsFound, &
HeatingCoilPLFCurvePTR=HeatingCoilPLFCurveIndex)
END IF
IF(UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
IF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingAirToAirVariableSpeed .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPVSEquationFit .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPSimple .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical)THEN
UnitarySystem(UnitarySysNum)%HeatPump = .TRUE.
END IF
END IF
ELSEIF (UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingHXAssisted)THEN
CALL ValidateComponent(CoolingCoilType,CoolingCoilName,IsNotOK, &
TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE ! mine data from heat exchanger assisted cooling coil
! Get DX heat exchanger assisted cooling coil index
CALL GetHXDXCoilIndex(CoolingCoilName,UnitarySystem(UnitarySysNum)%CoolingCoilIndex,IsNotOK)
IF(IsNotOK)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
UnitarySystem(UnitarySysNum)%CoolingCoilAvailSchPtr = &
GetDXCoilAvailSchPtr(CALLCoilTypes(UnitarySystem(UnitarySysNum)%CoolingCoilIndex), &
GetHXDXCoilName(CoolingCoilType,CoolingCoilName,IsNotOK),ErrFlag)
! Get DX cooling coil capacity
ErrFlag = .FALSE.
UnitarySystem(UnitarySysNum)%DesignCoolingCapacity = &
GetDXHXAsstdCoilCapacity(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
! Get the Cooling Coil Nodes
ErrFlag=.FALSE.
CoolingCoilInletNode = GetDXHXAsstdCoilInletNode(CoolingCoilType,CoolingCoilName,ErrFlag)
CoolingCoilOutletNode = GetDXHXAsstdCoilOutletNode(CoolingCoilType,CoolingCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
! Get Outdoor condenser node from heat exchanger assisted DX coil object
ErrFlag=.FALSE.
UnitarySystem(UnitarySysNum)%CondenserNodeNum = &
GetDXCoilCondenserInletNode('COIL:COOLING:DX:SINGLESPEED', &
GetHXDXCoilName(CoolingCoilType,CoolingCoilName,ErrFlag), ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
! Push heating coil PLF curve index to DX coil
IF(HeatingCoilPLFCurveIndex .GT. 0)THEN
! get the actual index to the DX cooling coil object
DXCoilIndex = GetActualDXCoilIndex(CoolingCoilType,CoolingCoilName,ErrorsFound)
UnitarySystem(UnitarySysNum)%ActualDXCoilIndexforHXAssisted = DXCoilIndex
CALL SetDXCoolingCoilData(DXCoilIndex,ErrorsFound, &
HeatingCoilPLFCurvePTR=HeatingCoilPLFCurveIndex)
END IF
IF(UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
IF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingAirToAirVariableSpeed .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPVSEquationFit .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPSimple .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical)THEN
UnitarySystem(UnitarySysNum)%HeatPump = .TRUE.
END IF
END IF
END IF ! IF (IsNotOK) THEN
ELSEIF (UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilWater_CoolingHXAssisted)THEN
CALL ValidateComponent(CoolingCoilType,CoolingCoilName,IsNotOK, &
TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE ! mine data from heat exchanger assisted cooling coil
ErrFlag = .FALSE.
ActualCoolCoilType = GetCoilObjectTypeNum(CoolingCoilType,CoolingCoilName,ErrFlag,.TRUE.)
HXCoilName = GetHXDXCoilName(CoolingCoilType,CoolingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
! Get DX heat exchanger assisted cooling coil index
ErrFlag = .FALSE.
CALL GetHXDXCoilIndex(CoolingCoilName,UnitarySystem(UnitarySysNum)%CoolingCoilIndex,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
ErrFlag = .FALSE.
UnitarySystem(UnitarySysNum)%CoolingCoilAvailSchPtr = &
GetWaterCoilAvailScheduleIndex(cAllCoilTypes(ActualCoolCoilType),HXCoilName,ErrFlag)
UnitarySystem(UnitarySysNum)%MaxCoolCoilFluidFlow = &
GetCoilMaxWaterFlowRate(cAllCoilTypes(ActualCoolCoilType),HXCoilName,ErrFlag)
! Get the Cooling Coil water Inlet Node number
UnitarySystem(UnitarySysNum)%CoolCoilFluidInletNode = &
GetCoilWaterInletNode(cAllCoilTypes(ActualCoolCoilType),HXCoilName,ErrFlag)
! UnitarySystem(UnitarySysNum)%CoolCoilFluidOutletNodeNum = &
! GetCoilWaterOutletNode(cAllCoilTypes(ActualCoolCoilType),HXCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
! this needs to be the coil index, not the parent
! CAN't do this here, we need to know the air flow rate first
! UnitarySystem(UnitarySysNum)%DesignCoolingCapacity = &
! GetDXHXAsstdCoilCapacity(CoolingCoilType,CoolingCoilName,ErrFlag)
! UnitarySystem(UnitarySysNum)%CoolingCoilAvailSchPtr = GetDXCoilAvailSchPtr(CoolingCoilType,CoolingCoilName,ErrFlag)
! Get the Cooling Coil Nodes
ErrFlag=.FALSE.
CoolingCoilInletNode = GetDXHXAsstdCoilInletNode(CoolingCoilType,CoolingCoilName,ErrFlag)
CoolingCoilOutletNode = GetDXHXAsstdCoilOutletNode(CoolingCoilType,CoolingCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = GetHXCoilAirFlowRate(CoolingCoilType,CoolingCoilName,ErrFlag)
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == Autosize) &
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
UnitarySystem(UnitarySysNum)%CondenserNodeNum = 0
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
! Push heating coil PLF curve index to DX coil
IF(HeatingCoilPLFCurveIndex .GT. 0)THEN
! get the actual index to the DX cooling coil object
DXCoilIndex = GetActualDXCoilIndex(CoolingCoilType,CoolingCoilName,ErrorsFound)
UnitarySystem(UnitarySysNum)%ActualDXCoilIndexforHXAssisted = DXCoilIndex
CALL SetDXCoolingCoilData(DXCoilIndex,ErrorsFound, &
HeatingCoilPLFCurvePTR=HeatingCoilPLFCurveIndex)
END IF
IF(UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
IF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingAirToAirVariableSpeed .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPVSEquationFit .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPSimple .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical)THEN
UnitarySystem(UnitarySysNum)%HeatPump = .TRUE.
END IF
END IF
END IF ! IF (IsNotOK) THEN
ELSEIF (UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == Coil_CoolingAirToAirVariableSpeed .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == Coil_CoolingWaterToAirHPVSEquationFit)THEN
CALL ValidateComponent(CoolingCoilType,CoolingCoilName,IsNotOK, &
TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE
ErrFlag = .FALSE.
UnitarySystem(UnitarySysNum)%CoolingCoilIndex = GetCoilIndexVariableSpeed(CoolingCoilType, &
CoolingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag = .FALSE.
END IF
CoolingCoilInletNode =GetCoilInletNodeVariableSpeed(CoolingCoilType,CoolingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag = .FALSE.
END IF
CoolingCoilOutletNode =GetCoilOutletNodeVariableSpeed(CoolingCoilType,CoolingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag = .FALSE.
END IF
UnitarySystem(UnitarySysNum)%CondenserNodeNum = GetVSCoilCondenserInletNode(CoolingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag = .FALSE.
END IF
UnitarySystem(UnitarySysNum)%CoolingCoilAvailSchPtr = ScheduleAlwaysOn
UnitarySystem(UnitarySysNum)%NumOfSpeedCooling = GetVSCoilNumOfSpeeds(CoolingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ErrFlag = .FALSE.
END IF
ErrFlag=.FALSE.
UnitarySystem(UnitarySysNum)%DesignCoolingCapacity = &
GetCoilCapacityVariableSpeed(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
! why was this done?
IF (UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == Coil_CoolingAirToAirVariableSpeed) THEN
ErrFlag=.FALSE.
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow &
= GetCoilAirFlowRateVariableSpeed(CoolingCoilType,CoolingCoilName,ErrFlag)
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == Autosize) &
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
! UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = &
! MIN(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow,UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow)
! IF(UnitarySystem(UnitarySysNum)%FanExists)THEN
! IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow /= Autosize .AND. &
! UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow /= Autosize .AND. &
! .NOT. UnitarySystem(UnitarySysNum)%RequestAutosize)THEN
! UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate = &
! MAX(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow,UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow)
! ELSE
! UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate = Autosize
! END IF
! END IF
END IF
IF(UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
IF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingAirToAirVariableSpeed .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPVSEquationFit .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPSimple .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical)THEN
UnitarySystem(UnitarySysNum)%HeatPump = .TRUE.
END IF
END IF
ELSEIF (UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_MultiSpeedCooling) THEN
ErrFlag = .FALSE.
CALL GetDXCoilIndex(CoolingCoilName,UnitarySystem(UnitarySysNum)%CoolingCoilIndex, &
ErrFlag, TRIM(CoolingCoilType))
IF(ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.true.
ErrFlag = .FALSE.
END IF
UnitarySystem(UnitarySysNum)%CoolingCoilAvailSchPtr = GetDXCoilAvailSchPtr(CoolingCoilType,CoolingCoilName,ErrFlag)
CoolingCoilInletNode = GetDXCoilInletNode(CoolingCoilType,CoolingCoilName,ErrFlag)
IF(ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.true.
ErrFlag = .FALSE.
END IF
CoolingCoilOutletNode = GetDXCoilOutletNode(CoolingCoilType,CoolingCoilName,ErrFlag)
IF(ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.true.
ErrFlag = .FALSE.
END IF
! IF(UnitarySystem(UnitarySysNum)%DesignCoolingCapacity == Autosize) &
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
IF(UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
IF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingAirToAirVariableSpeed .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPVSEquationFit .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPSimple .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical)THEN
UnitarySystem(UnitarySysNum)%HeatPump = .TRUE.
END IF
END IF
ELSEIF (UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == Coil_CoolingWater .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == Coil_CoolingWaterDetailed) THEN
CALL ValidateComponent(CoolingCoilType,CoolingCoilName,IsNotOK,TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE ! mine data from Cooling coil object
ErrFlag = .FALSE.
UnitarySystem(UnitarySysNum)%CoolingCoilAvailSchPtr = &
GetWaterCoilAvailScheduleIndex(CoolingCoilType,CoolingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
UnitarySystem(UnitarySysNum)%CoolingCoilIndex = GetWaterCoilIndex(CoolingCoilType,CoolingCoilName,ErrFlag)
IF (UnitarySystem(UnitarySysNum)%CoolingCoilIndex .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cAlphaFields(iCoolingCoilNameAlphaNum))//' = ' &
//TRIM(HeatingCoilName))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! Get the Cooling Coil water Inlet Node number
UnitarySystem(UnitarySysNum)%CoolCoilFluidInletNode = GetCoilWaterInletNode(CoolingCoilType,CoolingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
InletNodeNotControlled = .TRUE.
! CALL CheckCoilWaterInletNode(UnitarySystem(UnitarySysNum)%CoolCoilFluidInletNode,InletNodeNotControlled)
IF(.NOT. InletNodeNotControlled)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError(TRIM(ControllerTypes(ControllerSimple_Type))//' found for '// &
TRIM(CoolingCoilType)//' = "'//TRIM(CoolingCoilName)//'."')
CALL ShowContinueError('...water coil controllers are not used with '// &
TRIM(UnitarySystem(UnitarySysNum)%UnitarySystemType))
ErrorsFound = .TRUE.
END IF
! Get the Cooling Coil chilled water max volume flow rate
ErrFlag = .FALSE.
UnitarySystem(UnitarySysNum)%MaxCoolCoilFluidFlow = GetCoilMaxWaterFlowRate(CoolingCoilType, &
CoolingCoilName,ErrFlag)
IF(UnitarySystem(UnitarySysNum)%MaxCoolCoilFluidFlow == Autosize) &
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! Get the Cooling Coil Inlet Node
CoolingCoilInletNode = GetWaterCoilInletNode(CoolingCoilType,CoolingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! Get the Cooling Coil Outlet Node
CoolingCoilOutletNode = GetWaterCoilOutletNode(CoolingCoilType,CoolingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
END IF
ELSEIF (UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == Coil_CoolingWaterToAirHPSimple) THEN
CALL ValidateComponent(CoolingCoilType,CoolingCoilName,IsNotOK,TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE ! mine data from Cooling coil object
ErrFlag = .FALSE.
UnitarySystem(UnitarySysNum)%CoolingCoilAvailSchPtr = ScheduleAlwaysOn
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
UnitarySystem(UnitarySysNum)%CoolingCoilIndex = GetWtoAHPSimpleCoilIndex(CoolingCoilType,CoolingCoilName,ErrFlag)
IF (UnitarySystem(UnitarySysNum)%CoolingCoilIndex .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iCoolingCoilNameAlphaNum))//' = ' &
//TRIM(CoolingCoilName))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! Get the Cooling Coil Inlet Node
ErrFlag = .FALSE.
CoolingCoilInletNode = GetWtoAHPSimpleCoilInletNode(CoolingCoilType, CoolingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! Get the Cooling Coil Outlet Node
CoolingCoilOutletNode = GetWtoAHPSimpleCoilOutletNode(CoolingCoilType, CoolingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! IF(UnitarySystem(UnitarySysNum)%MaxCoolCoilFluidFlow == Autosize) &
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
IF(UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
IF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingAirToAirVariableSpeed .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPVSEquationFit .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPSimple .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical)THEN
UnitarySystem(UnitarySysNum)%HeatPump = .TRUE.
END IF
END IF
ELSEIF (UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == Coil_CoolingWaterToAirHP) THEN
CALL ValidateComponent(CoolingCoilType,CoolingCoilName,IsNotOK,TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE ! mine data from Cooling coil object
ErrFlag = .FALSE.
UnitarySystem(UnitarySysNum)%CoolingCoilAvailSchPtr = ScheduleAlwaysOn
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
UnitarySystem(UnitarySysNum)%CoolingCoilIndex = GetWtoAHPCoilIndex(CoolingCoilType, CoolingCoilName,ErrFlag)
IF (UnitarySystem(UnitarySysNum)%CoolingCoilIndex .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iCoolingCoilNameAlphaNum))//' = ' &
//TRIM(CoolingCoilName))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! Get the Cooling Coil Inlet Node
ErrFlag = .FALSE.
CoolingCoilInletNode = GetWtoAHPCoilInletNode(CoolingCoilType, CoolingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! Get the Cooling Coil Outlet Node
CoolingCoilOutletNode = GetWtoAHPCoilOutletNode(CoolingCoilType, CoolingCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
ErrFlag = .FALSE.
END IF
! IF(UnitarySystem(UnitarySysNum)%MaxCoolCoilFluidFlow == Autosize) &
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
IF(UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
IF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingAirToAirVariableSpeed .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPVSEquationFit .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPSimple .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical)THEN
UnitarySystem(UnitarySysNum)%HeatPump = .TRUE.
END IF
END IF
ELSE ! IF(.NOT. lAlphaBlanks(16))THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iCoolingCoilTypeAlphaNum))//' = '// &
TRIM(Alphas(iCoolingCoilTypeAlphaNum)))
ErrorsFound=.TRUE.
END IF
IF(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_MultiSpeedCooling) THEN
UnitarySystem(UnitarySysNum)%MultiSpeedCoolingCoil = .TRUE.
ELSEIF(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == Coil_CoolingWaterToAirHPVSEquationFit .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == Coil_CoolingAirToAirVariableSpeed) THEN
UnitarySystem(UnitarySysNum)%VarSpeedCoolingCoil = .TRUE.
END IF
IF(NodeHasSPMCtrlVarType(UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum, iCtrlVarType_Temp)) &
UnitarySystem(UnitarySysNum)%SystemCoolControlNodeNum = UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum
IF(NodeHasSPMCtrlVarType(CoolingCoilOutletNode, iCtrlVarType_Temp)) &
UnitarySystem(UnitarySysNum)%SystemCoolControlNodeNum = CoolingCoilOutletNode
UnitarySystem(UnitarySysNum)%CoolCoilInletNodeNum = CoolingCoilInletNode
UnitarySystem(UnitarySysNum)%CoolCoilOutletNodeNum = CoolingCoilOutletNode
UnitarySystem(UnitarySysNum)%CoolingCoilName = CoolingCoilName
END IF
IF (UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPSimple .AND. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == Coil_CoolingWaterToAirHPSimple) THEN
UnitarySystem(UnitarySysNum)%WaterCyclingMode = WaterCycling
CALL SetSimpleWSHPData(UnitarySystem(UnitarySysNum)%CoolingCoilIndex,ErrorsFound, &
UnitarySystem(UnitarySysNum)%WaterCyclingMode, &
CompanionHeatingCoilNum=UnitarySystem(UnitarySysNum)%HeatingCoilIndex)
END IF
IF (UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPVSEquationFit .AND. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == Coil_CoolingWaterToAirHPVSEquationFit) THEN
CALL SetVarSpeedCoilData(UnitarySystem(UnitarySysNum)%CoolingCoilIndex,ErrorsFound, &
CompanionHeatingCoilNum=UnitarySystem(UnitarySysNum)%HeatingCoilIndex)
END IF
! Add cooling coil to component sets array
IF(UnitarySystem(UnitarySysNum)%CoolCoilExists) THEN
IF(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num .NE. CoilDX_MultiSpeedCooling) THEN
CALL SetUpCompSets(CurrentModuleObject, Alphas(iNameAlphaNum), &
Alphas(iCoolingCoilTypeAlphaNum), Alphas(iCoolingCoilNameAlphaNum), &
NodeID(CoolingCoilInletNode), NodeID(CoolingCoilOutletNode))
ELSE
CALL SetUpCompSets(CurrentModuleObject, Alphas(iNameAlphaNum), &
Alphas(iCoolingCoilTypeAlphaNum), Alphas(iCoolingCoilNameAlphaNum), &
'UNDEFINED', 'UNDEFINED')
END IF
END IF
! Run as 100% DOAS DX coil
IF (lAlphaBlanks(iDOASDXCoilAlphaNum) .AND. NumAlphas < iDOASDXCoilAlphaNum)THEN
UnitarySystem(UnitarySysNum)%ISHundredPercentDOASDXCoil= .FALSE.
ELSE
IF (SameString(Alphas(iDOASDXCoilAlphaNum),'Yes')) THEN
UnitarySystem(UnitarySysNum)%ISHundredPercentDOASDXCoil= .TRUE.
ELSEIF (SameString(Alphas(iDOASDXCoilAlphaNum),' ')) THEN
UnitarySystem(UnitarySysNum)%ISHundredPercentDOASDXCoil= .FALSE.
ELSEIF (SameString(Alphas(iDOASDXCoilAlphaNum),'No')) THEN
UnitarySystem(UnitarySysNum)%ISHundredPercentDOASDXCoil= .FALSE.
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Invalid entry for '//TRIM(cAlphaFields(iDOASDXCoilAlphaNum))//' :'// &
TRIM(Alphas(iDOASDXCoilAlphaNum)))
CALL ShowContinueError('Must be Yes or No.')
END IF
END IF
! considered as as 100% DOAS DX cooling coil
IF (UnitarySystem(UnitarySysNum)%ISHundredPercentDOASDXCoil) THEN
! set the system DX Coil application type to the child DX coil
CALL SetDXCoilTypeData(UnitarySystem(UnitarySysNum)%CoolingCoilName)
END IF
! DOAS DX Cooling Coil Leaving Minimum Air Temperature
IF (NumNumbers > 0)THEN
IF (.NOT. lNumericBlanks(iDOASDXMinTempNumericNum))THEN
UnitarySystem(UnitarySysNum)%DOASDXCoolingCoilMinTout = Numbers(iDOASDXMinTempNumericNum)
END IF
END IF
!Get Latent Load Control flag
IF(.NOT. lAlphaBlanks(iRunOnLatentLoadAlphaNum))THEN
IF(SameString(Alphas(iRunOnLatentLoadAlphaNum),'SensibleOnlyLoadControl')) THEN
UnitarySystem(UnitarySysNum)%RunOnSensibleLoad = .TRUE.
UnitarySystem(UnitarySysNum)%RunOnLatentLoad = .FALSE.
ELSE IF(SameString(Alphas(iRunOnLatentLoadAlphaNum),'LatentOnlyLoadControl'))THEN
UnitarySystem(UnitarySysNum)%RunOnSensibleLoad = .FALSE.
UnitarySystem(UnitarySysNum)%RunOnLatentLoad = .TRUE.
ELSE IF(SameString(Alphas(iRunOnLatentLoadAlphaNum),'LatentOrSensibleLoadControl'))THEN
UnitarySystem(UnitarySysNum)%RunOnSensibleLoad = .TRUE.
UnitarySystem(UnitarySysNum)%RunOnLatentLoad = .TRUE.
ELSE IF(SameString(Alphas(iRunOnLatentLoadAlphaNum),'LatentWithSensibleLoadControl'))THEN
UnitarySystem(UnitarySysNum)%RunOnSensibleLoad = .TRUE.
UnitarySystem(UnitarySysNum)%RunOnLatentLoad = .TRUE.
UnitarySystem(UnitarySysNum)%RunOnLatentOnlyWithSensible = .TRUE.
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Invalid entry for '//TRIM(cAlphaFields(iRunOnLatentLoadAlphaNum))//' :'// &
TRIM(Alphas(iRunOnLatentLoadAlphaNum)))
CALL ShowContinueError('Must be SensibleOnlyLoadControl, LatentOnlyLoadControl,'// &
' LatentOrSensibleLoadControl, or LatentWithSensibleLoadControl.')
END IF
END IF
!Get reheat coil data if humidistat is used
SuppHeatCoilType = Alphas(iSuppHeatCoilTypeAlphaNum)
SuppHeatCoilName = Alphas(iSuppHeatCoilNameAlphaNum)
UnitarySystem(UnitarySysNum)%SuppHeatCoilName = SuppHeatCoilName
ErrFlag = .FALSE.
IF (SameString(SuppHeatCoilType,'Coil:Heating:Water')) THEN
UnitarySystem(UnitarySysNum)%SuppHeatCoilType_Num = Coil_HeatingWater
ELSEIF (SameString(SuppHeatCoilType,'Coil:Heating:Steam')) THEN
UnitarySystem(UnitarySysNum)%SuppHeatCoilType_Num = Coil_HeatingSteam
ELSEIF (SameString(SuppHeatCoilType,'Coil:Heating:Gas') .OR. &
SameString(SuppHeatCoilType,'Coil:Heating:Electric') .OR. &
SameString(SuppHeatCoilType,'Coil:Heating:DesuperHeater')) THEN
UnitarySystem(UnitarySysNum)%SuppHeatCoilType_Num = GetHeatingCoilTypeNum(SuppHeatCoilType,SuppHeatCoilName,ErrFlag)
END IF
IF(.NOT. lAlphaBlanks(iSuppHeatCoilTypeAlphaNum))THEN
UnitarySystem(UnitarySysNum)%SuppCoilExists = .TRUE.
IF (UnitarySystem(UnitarySysNum)%SuppHeatCoilType_Num == Coil_HeatingGas .OR. &
UnitarySystem(UnitarySysNum)%SuppHeatCoilType_Num == Coil_HeatingElectric .OR. &
UnitarySystem(UnitarySysNum)%SuppHeatCoilType_Num == Coil_HeatingDesuperheater) THEN
UnitarySystem(UnitarySysNum)%SuppHeatCoilType_Num = GetHeatingCoilTypeNum(SuppHeatCoilType,SuppHeatCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE
CALL ValidateComponent(SuppHeatCoilType,SuppHeatCoilName,IsNotOK, &
TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE ! mine data from reheat coil
! Get the heating coil index
CALL GetHeatingCoilIndex(SuppHeatCoilName,UnitarySystem(UnitarySysNum)%SuppHeatCoilIndex,IsNotOK)
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
! Get the design supplemental heating capacity
ErrFlag=.FALSE.
UnitarySystem(UnitarySysNum)%DesignSuppHeatingCapacity = &
GetHeatingCoilCapacity(SuppHeatCoilType,SuppHeatCoilName,ErrFlag)
IF(UnitarySystem(UnitarySysNum)%DesignSuppHeatingCapacity == Autosize) &
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
! Get the Reheat Coil Inlet Node
ErrFlag=.FALSE.
SupHeatCoilInletNode = GetHeatingCoilInletNode(SuppHeatCoilType,SuppHeatCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
! Get the Reheat Coil Outlet Node
ErrFlag=.FALSE.
SupHeatCoilOutletNode = GetHeatingCoilOutletNode(SuppHeatCoilType,SuppHeatCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
END IF ! IF (IsNotOK) THEN
END IF
UnitarySystem(UnitarySysNum)%SuppCoilAirInletNode = SupHeatCoilInletNode
UnitarySystem(UnitarySysNum)%SuppCoilAirOutletNode = SupHeatCoilOutletNode
ELSEIF (UnitarySystem(UnitarySysNum)%SuppHeatCoilType_Num == Coil_HeatingWater) THEN
CALL ValidateComponent(SuppHeatCoilType,SuppHeatCoilName,IsNotOK,TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE ! mine data from heating coil object
! Get the Heating Coil water Inlet or control Node number
ErrFlag = .FALSE.
UnitarySystem(UnitarySysNum)%SuppCoilFluidInletNode = &
GetCoilWaterInletNode('Coil:Heating:Water',SuppHeatCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
END IF
! Get the ReHeat Coil hot water max volume flow rate
ErrFlag = .FALSE.
UnitarySystem(UnitarySysNum)%MaxSuppCoilFluidFlow = GetCoilMaxWaterFlowRate('Coil:Heating:Water', &
SuppHeatCoilName,ErrFlag)
IF(UnitarySystem(UnitarySysNum)%MaxSuppCoilFluidFlow == Autosize) &
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
END IF
! Get the ReHeat Coil Inlet Node
ErrFlag = .FALSE.
SupHeatCoilInletNode = GetWaterCoilInletNode('Coil:Heating:Water',SuppHeatCoilName,ErrFlag)
UnitarySystem(UnitarySysNum)%SuppCoilAirInletNode = SupHeatCoilInletNode
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
END IF
! Get the ReHeat Coil Outlet Node
ErrFlag = .FALSE.
SupHeatCoilOutletNode = GetWaterCoilOutletNode('Coil:Heating:Water',SuppHeatCoilName,ErrFlag)
UnitarySystem(UnitarySysNum)%SuppCoilAirOutletNode = SupHeatCoilOutletNode
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
END IF
! IF(UnitarySystem(UnitarySysNum)%MaxSuppCoilFluidFlow == Autosize) &
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
! IF(UnitarySystem(UnitarySysNum)%DesignSuppHeatingCapacity == Autosize) &
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
ELSEIF (UnitarySystem(UnitarySysNum)%SuppHeatCoilType_Num == Coil_HeatingSteam) THEN
CALL ValidateComponent(SuppHeatCoilType,SuppHeatCoilName,IsNotOK,TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
ELSE ! mine data from heating coil object
ErrFlag = .FALSE.
UnitarySystem(UnitarySysNum)%SuppHeatCoilIndex = GetSTeamCoilIndex('COIL:HEATING:STEAM',SuppHeatCoilName,ErrFlag)
IF (UnitarySystem(UnitarySysNum)%SuppHeatCoilIndex .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowSevereError('Illegal '//TRIM(cAlphaFields(iSuppHeatCoilNameAlphaNum))//' = ' &
//TRIM(SuppHeatCoilName))
ErrorsFound = .TRUE.
END IF
! Get the Heating Coil steam inlet node number
ErrFlag = .FALSE.
UnitarySystem(UnitarySysNum)%SuppCoilFluidInletNode = &
GetSteamCoilSteamInletNode('Coil:Heating:Steam',SuppHeatCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
END IF
! Get the Heating Coil steam max volume flow rate
UnitarySystem(UnitarySysNum)%MaxSuppCoilFluidFlow = &
GetCoilMaxSteamFlowRate(UnitarySystem(UnitarySysNum)%SuppHeatCoilIndex,ErrFlag)
IF(UnitarySystem(UnitarySysNum)%MaxSuppCoilFluidFlow == Autosize) &
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
IF (UnitarySystem(UnitarySysNum)%MaxSuppCoilFluidFlow .GT. 0.0d0)THEN
SteamIndex = 0 ! Function GetSatDensityRefrig will look up steam index if 0 is passed
SteamDensity=GetSatDensityRefrig("STEAM",TempSteamIn,1.0d0,SteamIndex,'GetAirLoopHVACHeatCoolInput')
UnitarySystem(UnitarySysNum)%MaxSuppCoilFluidFlow = &
GetCoilMaxSteamFlowRate(UnitarySystem(UnitarySysNum)%SuppHeatCoilIndex,ErrFlag) * SteamDensity
END IF
! Get the Heating Coil Inlet Node
ErrFlag = .FALSE.
SupHeatCoilInletNode = &
GetSteamCoilAirInletNode(UnitarySystem(UnitarySysNum)%SuppHeatCoilIndex,SuppHeatCoilName,ErrFlag)
UnitarySystem(UnitarySysNum)%SuppCoilAirInletNode = SupHeatCoilInletNode
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
END IF
! Get the Heating Coil Outlet Node
ErrFlag = .FALSE.
SupHeatCoilOutletNode = &
GetSteamCoilAirOutletNode(UnitarySystem(UnitarySysNum)%SuppHeatCoilIndex,SuppHeatCoilName,ErrFlag)
UnitarySystem(UnitarySysNum)%SuppCoilAirOutletNode = SupHeatCoilOutletNode
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound = .TRUE.
END IF
! IF(UnitarySystem(UnitarySysNum)%DesignSuppHeatingCapacity == Autosize) &
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
ELSE ! Illegal reheating coil type
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iSuppHeatCoilTypeAlphaNum))//' = '// &
TRIM(Alphas(iSuppHeatCoilTypeAlphaNum)))
ErrorsFound=.TRUE.
END IF ! IF (UnitarySystem(UnitarySysNum)%SuppHeatCoilType_Num == Coil_HeatingGas .OR. &, etc.
END IF ! IF(.NOT. lAlphaBlanks(iSuppHeatCoilTypeAlphaNum))THEN
IF(NodeHasSPMCtrlVarType(UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum, iCtrlVarType_Temp)) &
UnitarySystem(UnitarySysNum)%SuppHeatControlNodeNum = UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum
IF(NodeHasSPMCtrlVarType(SupHeatCoilOutletNode, iCtrlVarType_Temp)) &
UnitarySystem(UnitarySysNum)%SuppHeatControlNodeNum = SupHeatCoilOutletNode
! Add supplemental heating coil to component sets array
IF(UnitarySystem(UnitarySysNum)%SuppCoilExists)CALL SetUpCompSets(CurrentModuleObject, Alphas(iNameAlphaNum), &
Alphas(iSuppHeatCoilTypeAlphaNum),Alphas(iSuppHeatCoilNameAlphaNum), &
NodeID(SupHeatCoilInletNode),NodeID(SupHeatCoilOutletNode))
TotalZonesOnAirLoop = 0
TotalFloorAreaOnAirLoop = 0.0d0
AirLoopNumber = 0
!***... only need to do this for load based control?
! Get the node number for the zone with the thermostat ! what if ControlZoneNum does = 0 if it's an OA sys?
IF (UnitarySystem(UnitarySysNum)%ControlZoneNum > 0) THEN
AirNodeFound=.FALSE.
AirLoopFound=.FALSE.
DO ControlledZoneNum = 1,NumOfZones
IF (ZoneEquipConfig(ControlledZoneNum)%ActualZoneNum /= UnitarySystem(UnitarySysNum)%ControlZoneNum) CYCLE
! Find the controlled zone number for the specified thermostat location
UnitarySystem(UnitarySysNum)%NodeNumofControlledZone=ZoneEquipConfig(ControlledZoneNum)%ZoneNode
! Determine if system is on air loop served by the thermostat location specified
AirLoopNumber = ZoneEquipConfig(ControlledZoneNum)%AirLoopNum
IF(AirLoopNumber .GT. 0)THEN
DO BranchNum = 1, PrimaryAirSystem(AirLoopNumber)%NumBranches
DO CompNum = 1, PrimaryAirSystem(AirLoopNumber)%Branch(BranchNum)%TotalComponents
IF(.NOT. SameString(PrimaryAirSystem(AirLoopNumber)%Branch(BranchNum)%Comp(CompNum)%Name, &
Alphas(iNameAlphaNum)) .OR. &
.NOT. SameString(PrimaryAirSystem(AirLoopNumber)%Branch(BranchNum)%Comp(CompNum)%TypeOf, &
CurrentModuleObject))CYCLE
AirLoopFound=.TRUE.
EXIT
END DO
IF(AirLoopFound)EXIT
END DO
DO TstatZoneNum = 1, NumTempControlledZones
IF(TempControlledZone(TstatZoneNum)%ActualZoneNum .NE. UnitarySystem(UnitarySysNum)%ControlZoneNum)CYCLE
AirNodeFound=.TRUE.
END DO
DO TstatZoneNum = 1, NumComfortControlledZones
IF(ComfortControlledZone(TstatZoneNum)%ActualZoneNum .NE. UnitarySystem(UnitarySysNum)%ControlZoneNum)CYCLE
AirNodeFound=.TRUE.
END DO
END IF
EXIT
END DO
IF(AirLoopNumber .GT. 0)THEN
DO ControlledZoneNum = 1,NumOfZones
IF (ZoneEquipConfig(ControlledZoneNum)%AirLoopNum == AirLoopNumber) THEN
TotalZonesOnAirLoop = TotalZonesOnAirLoop + 1
TotalFloorAreaOnAirLoop = TotalFloorAreaOnAirLoop+Zone(ZoneEquipConfig(ControlledZoneNum)%ActualZoneNum)%FloorArea
END IF
END DO
ELSE
IF (CurOASysNum > 0) THEN
! IF(ALLOCATED(OutsideAirSys))THEN
DO OASysNum = 1, NumOASystems
DO OACompNum = 1, OutsideAirSys(OASysNum)%NumComponents
IF(.NOT. SameString(OutsideAirSys(OASysNum)%ComponentName(OACompNum), &
Alphas(iNameAlphaNum)) .OR. &
.NOT. SameString(OutsideAirSys(OASysNum)%ComponentType(OACompNum), &
CurrentModuleObject))CYCLE
AirLoopFound=.TRUE.
AirLoopNumber = OASysNum
UnitarySystem(UnitarySysNum)%AirLoopEquipment = .FALSE.
EXIT
END DO
IF(AirLoopFound)EXIT
END DO
END IF
END IF
ELSE ! this works IF it's zone equipment, but what IF it's air loop equipment?
AirLoopScan: DO AirLoopNum = 1, NumPrimaryAirSys
BranchScan: DO BranchNum = 1, PrimaryAirSystem(AirLoopNum)%NumBranches
CompScan: DO CompNum = 1, PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%TotalComponents
IF(SameString(PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%Comp(CompNum)%Name, Alphas(iNameAlphaNum)) .OR. &
SameString(PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%Comp(CompNum)%TypeOf, CurrentModuleObject))THEN
AirLoopNumber = AirLoopNum
AirLoopFound=.TRUE.
ELSE IF(PrimaryAirSystem(AirLoopNum)%OASysExists)THEN
IF(ALLOCATED(OutsideAirSys))THEN
OASysScan: DO OASysNum = 1, NumOASystems
IF(.NOT. SameString(OutsideAirSys(OASysNum)%Name, &
PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%Comp(CompNum)%Name) .OR. &
.NOT. SameString('AirloopHVAC:OutdoorAirSystem', &
PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%Comp(CompNum)%TypeOf))CYCLE
DO OACompNum = 1, OutsideAirSys(OASysNum)%NumComponents
IF(.NOT. SameString(OutsideAirSys(OASysNum)%ComponentName(OACompNum), &
Alphas(iNameAlphaNum)) .OR. &
.NOT. SameString(OutsideAirSys(OASysNum)%ComponentType(OACompNum), &
CurrentModuleObject))CYCLE
AirLoopFound=.TRUE.
AirLoopNumber = AirLoopNum
UnitarySystem(UnitarySysNum)%AirLoopEquipment = .FALSE.
EXIT
END DO
! IF(AirLoopFound)EXIT OASysScan WHY aren't these working? I get a break here in the debugger
END DO OASysScan
END IF
END IF
! IF(AirLoopFound)EXIT CompScan
END DO CompScan
! IF(AirLoopFound)EXIT BranchScan
END DO BranchScan
! IF(AirLoopFound)EXIT AirLoopScan
END DO AirLoopScan
IF(.NOT. AirLoopFound)THEN
DO ControlledZoneNum = 1,NumOfZones
DO ZoneExhNum = 1, ZoneEquipConfig(ControlledZoneNum)%NumExhaustNodes
IF (ZoneEquipConfig(ControlledZoneNum)%ExhaustNode(ZoneExhNum) /= &
UnitarySystem(UnitarySysNum)%UnitarySystemInletNodeNum) CYCLE
! Find the controlled zone number for the specified thermostat location
UnitarySystem(UnitarySysNum)%NodeNumofControlledZone=ZoneEquipConfig(ControlledZoneNum)%ZoneNode
UnitarySystem(UnitarySysNum)%ControlZoneNum = ControlledZoneNum
TotalFloorAreaOnAirLoop = Zone(ZoneEquipConfig(ControlledZoneNum)%ActualZoneNum)%FloorArea
UnitarySystem(UnitarySysNum)%AirLoopEquipment = .FALSE.
UnitarySystem(UnitarySysNum)%ZoneInletNode = ZoneEquipConfig(ControlledZoneNum)%ExhaustNode(ZoneExhNum)
IF (ZoneEquipConfig(ControlledZoneNum)%EquipListIndex > 0) THEN
DO EquipNum = 1, ZoneEquipList(ZoneEquipConfig(ControlledZoneNum)%EquipListIndex)%NumOfEquipTypes
IF ((ZoneEquipList(ZoneEquipConfig(ControlledZoneNum)%EquipListIndex)%EquipType_Num(EquipNum) /= &
ZoneUnitarySystem_Num).OR. &
ZoneEquipList(ZoneEquipConfig(ControlledZoneNum)%EquipListIndex)%EquipName(EquipNum) /= &
UnitarySystem(UnitarySysNum)%Name)CYCLE
UnitarySystem(UnitarySysNum)%ZoneSequenceCoolingNum = &
ZoneEquipList(ZoneEquipConfig(ControlledZoneNum)%EquipListIndex)%CoolingPriority(EquipNum)
UnitarySystem(UnitarySysNum)%ZoneSequenceHeatingNum = &
ZoneEquipList(ZoneEquipConfig(ControlledZoneNum)%EquipListIndex)%HeatingPriority(EquipNum)
END DO
END IF
EXIT
END DO
DO ZoneInletNum = 1, ZoneEquipConfig(ControlledZoneNum)%NumInletNodes
IF (ZoneEquipConfig(ControlledZoneNum)%InletNode(ZoneInletNum) /= &
UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum) CYCLE
UnitarySystem(UnitarySysNum)%AirLoopEquipment = .FALSE.
EXIT
END DO
END DO
ELSE
DO ControlledZoneNum = 1,NumOfZones
IF (ZoneEquipConfig(ControlledZoneNum)%AirLoopNum == AirLoopNumber) THEN
TotalZonesOnAirLoop = TotalZonesOnAirLoop + 1
TotalFloorAreaOnAirLoop = TotalFloorAreaOnAirLoop+Zone(ZoneEquipConfig(ControlledZoneNum)%ActualZoneNum)%FloorArea
END IF
END DO
END IF
END IF
IF (UnitarySystem(UnitarySysNum)%ControlZoneNum == 0 .AND. &
UnitarySystem(UnitarySysNum)%ControlType == LoadBased) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iControlZoneAlphaNum))//' = '//TRIM(Alphas(iControlZoneAlphaNum)))
ErrorsFound=.TRUE.
END IF
! if a user connects the Unitary System as zone equipment, try to find the connection
ZoneEquipmentFound=.FALSE.
IF(UnitarySystem(UnitarySysNum)%AirLoopEquipment .AND. .NOT. AirLoopFound)THEN
IF(UnitarySystem(UnitarySysNum)%ControlZoneNum > 0)THEN
DO ControlledZoneNum = 1,NumOfZones
DO ZoneExhNum = 1, ZoneEquipConfig(ControlledZoneNum)%NumExhaustNodes
IF (ZoneEquipConfig(ControlledZoneNum)%ExhaustNode(ZoneExhNum) /= &
UnitarySystem(UnitarySysNum)%UnitarySystemInletNodeNum) CYCLE
IF(UnitarySystem(UnitarySysNum)%ControlZoneNum /= ControlledZoneNum)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Did not find Air Node (Zone with Thermostat).')
CALL ShowContinueError('specified '//TRIM(cAlphaFields(iControlZoneAlphaNum))//' = '// &
TRIM(Alphas(iControlZoneAlphaNum)))
ErrorsFound=.TRUE.
END IF
IF(UnitarySystem(UnitarySysNum)%ControlZoneNum == ControlledZoneNum)THEN
ZoneEquipmentFound = .TRUE.
UnitarySystem(UnitarySysNum)%AirLoopEquipment = .FALSE.
UnitarySystem(UnitarySysNum)%ZoneInletNode = ZoneEquipConfig(ControlledZoneNum)%ExhaustNode(ZoneExhNum)
END IF
END DO
END DO
END IF
IF(AirLoopNumber == 0 .AND. .NOT. ZoneEquipmentFound .AND. UnitarySystem(UnitarySysNum)%ControlType == LoadBased)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
CALL ShowContinueError('Did not find an AirLoopHVAC.')
CALL ShowContinueError('specified '//TRIM(cAlphaFields(iControlZoneAlphaNum))//' = '// &
TRIM(Alphas(iControlZoneAlphaNum)))
IF (.not. AirNodeFound .AND. .NOT. ZoneEquipmentFound .AND. UnitarySystem(UnitarySysNum)%ControlType == LoadBased)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
CALL ShowContinueError('Did not find air node (zone with thermostat).')
CALL ShowContinueError('specified '//TRIM(cAlphaFields(iControlZoneAlphaNum))//' = '// &
TRIM(Alphas(iControlZoneAlphaNum)))
CALL ShowContinueError('Both a ZoneHVAC:EquipmentConnections object and a ZoneControl:Thermostat object' &
//' must be specified for this zone.')
END IF
IF (.not. AirLoopFound .AND. .NOT. ZoneEquipmentFound .AND. UnitarySystem(UnitarySysNum)%ControlType == LoadBased)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
CALL ShowSevereError('Did not find correct AirLoopHVAC.')
CALL ShowContinueError('specified '//TRIM(cAlphaFields(iControlZoneAlphaNum))//' = '// &
TRIM(Alphas(iControlZoneAlphaNum)))
END IF
IF(UnitarySystem(UnitarySysNum)%ControlType == LoadBased)ErrorsFound=.TRUE.
END IF
END IF
IF(.NOT. ZoneEquipmentFound)CALL TestCompSet(CurrentModuleObject,Alphas(iNameAlphaNum), &
Alphas(iAirInletNodeNameAlphaNum),Alphas(iAirOutletNodeNameAlphaNum),'Air Nodes')
! Determine supply air flow rate sizing method for cooling mode
IF(SameString(Alphas(iCoolSAFMAlphaNum),'SupplyAirFlowRate'))THEN
UnitarySystem(UnitarySysNum)%CoolingSAFMethod = SupplyAirFlowRate
IF (.NOT. lNumericBlanks(iMaxCoolAirVolFlowNumericNum)) THEN
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Numbers(iMaxCoolAirVolFlowNumericNum)
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == Autosize) &
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
IF (UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow .LE. 0.0d0 .AND. &
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iMaxCoolAirVolFlowNumericNum))//' = '// &
TRIM(TrimSigDigits(Numbers(iMaxCoolAirVolFlowNumericNum),7)))
ErrorsFound = .TRUE.
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iCoolSAFMAlphaNum))//' = '//TRIM(Alphas(iCoolSAFMAlphaNum)))
CALL ShowContinueError('Blank field not allowed for '//TRIM(cNumericFields(iMaxCoolAirVolFlowNumericNum)))
ErrorsFound = .TRUE.
END IF
ELSEIF(SameString(Alphas(iCoolSAFMAlphaNum),'FlowPerFloorArea'))THEN
UnitarySystem(UnitarySysNum)%CoolingSAFMethod = FlowPerFloorArea
IF (.NOT. lNumericBlanks(iCoolFlowPerFloorAreaNumericNum)) THEN
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Numbers(iCoolFlowPerFloorAreaNumericNum)
IF (UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow .LE. 0.0d0 .AND. &
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iCoolSAFMAlphaNum))//' = '//TRIM(Alphas(iCoolSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iCoolFlowPerFloorAreaNumericNum))//' = '// &
TRIM(TrimSigDigits(Numbers(iCoolFlowPerFloorAreaNumericNum),7)))
ErrorsFound = .TRUE.
! Autosized input is not allowed
ELSEIF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow .EQ. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iCoolSAFMAlphaNum))//' = '//TRIM(Alphas(iCoolSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iCoolFlowPerFloorAreaNumericNum))//' = Autosize')
ErrorsFound = .TRUE.
ELSE
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = &
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow * TotalFloorAreaOnAirLoop
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iCoolSAFMAlphaNum))//' = '//TRIM(Alphas(iCoolSAFMAlphaNum)))
CALL ShowContinueError('Blank field not allowed for '//TRIM(cNumericFields(iCoolFlowPerFloorAreaNumericNum)))
ErrorsFound = .TRUE.
END IF
ELSEIF(SameString(Alphas(iCoolSAFMAlphaNum),'FractionOfAutosizedCoolingValue'))THEN
UnitarySystem(UnitarySysNum)%CoolingSAFMethod = FractionOfAutosizedCoolingValue
IF (.NOT. lNumericBlanks(iCoolFlowPerFracCoolNumericNum)) THEN
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Numbers(iCoolFlowPerFracCoolNumericNum)
IF (UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow .LE. 0.0d0 .AND. &
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iCoolSAFMAlphaNum))//' = '//TRIM(Alphas(iCoolSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iCoolFlowPerFracCoolNumericNum))//' = '// &
TRIM(TrimSigDigits(Numbers(iCoolFlowPerFracCoolNumericNum),7)))
ErrorsFound = .TRUE.
! Autosized input is not allowed
ELSEIF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow .EQ. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iCoolSAFMAlphaNum))//' = '//TRIM(Alphas(iCoolSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iCoolFlowPerFracCoolNumericNum))//' = Autosize')
ErrorsFound = .TRUE.
ELSE
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iCoolSAFMAlphaNum))//' = '//TRIM(Alphas(iCoolSAFMAlphaNum)))
CALL ShowContinueError('Blank field not allowed for '//TRIM(cNumericFields(iCoolFlowPerFracCoolNumericNum)))
ErrorsFound = .TRUE.
END IF
ELSEIF(SameString(Alphas(iCoolSAFMAlphaNum),'FlowPerCoolingCapacity'))THEN
UnitarySystem(UnitarySysNum)%CoolingSAFMethod = FlowPerCoolingCapacity
IF (.NOT. lNumericBlanks(iCoolFlowPerCoolCapNumericNum)) THEN
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = Numbers(iCoolFlowPerCoolCapNumericNum)
IF (UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow .LE. 0.d0 .AND. &
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iCoolSAFMAlphaNum))//' = '//TRIM(Alphas(iCoolSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iCoolFlowPerCoolCapNumericNum))//' = '// &
TRIM(TrimSigDigits(Numbers(iCoolFlowPerCoolCapNumericNum),7)))
ErrorsFound = .TRUE.
! Autosized input is not allowed
ELSEIF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow .EQ. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iCoolSAFMAlphaNum))//' = '//TRIM(Alphas(iCoolSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iCoolFlowPerCoolCapNumericNum))//' = Autosize')
ErrorsFound = .TRUE.
ELSE
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iCoolSAFMAlphaNum))//' = '//TRIM(Alphas(iCoolSAFMAlphaNum)))
CALL ShowContinueError('Blank field not allowed for '//TRIM(cNumericFields(iCoolFlowPerCoolCapNumericNum)))
ErrorsFound = .TRUE.
END IF
ELSEIF(SameString(Alphas(iCoolSAFMAlphaNum),'None') .OR. lAlphaBlanks(iCoolSAFMAlphaNum))THEN
UnitarySystem(UnitarySysNum)%CoolingSAFMethod = None
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE. ! ??
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iCoolSAFMAlphaNum))//' = '//TRIM(Alphas(iCoolSAFMAlphaNum)))
ErrorsFound=.TRUE.
END IF
! Determine supply air flow rate sizing method for heating mode
IF(SameString(Alphas(iHeatSAFMAlphaNum),'SupplyAirFlowRate'))THEN
UnitarySystem(UnitarySysNum)%HeatingSAFMethod = SupplyAirFlowRate
IF (.NOT. lNumericBlanks(iMaxHeatAirVolFlowNumericNum)) THEN
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Numbers(iMaxHeatAirVolFlowNumericNum)
IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow == Autosize) &
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
IF (UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow .LE. 0.0d0 .AND. &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iMaxHeatAirVolFlowNumericNum))//' = '// &
TRIM(TrimSigDigits(Numbers(iMaxHeatAirVolFlowNumericNum),7)))
ErrorsFound = .TRUE.
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iHeatSAFMAlphaNum))//' = '//TRIM(Alphas(iHeatSAFMAlphaNum)))
CALL ShowContinueError('Blank field not allowed for '//TRIM(cNumericFields(iMaxHeatAirVolFlowNumericNum)))
ErrorsFound = .TRUE.
END IF
ELSEIF(SameString(Alphas(iHeatSAFMAlphaNum),'FlowPerFloorArea'))THEN
UnitarySystem(UnitarySysNum)%HeatingSAFMethod = FlowPerFloorArea
IF (.NOT. lNumericBlanks(iHeatFlowPerFloorAreaNumericNum)) THEN
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Numbers(iHeatFlowPerFloorAreaNumericNum)
IF (UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow .LE. 0.0d0 .AND. &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iHeatSAFMAlphaNum))//' = '//TRIM(Alphas(iHeatSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iHeatFlowPerFloorAreaNumericNum))//' = '// &
TRIM(TrimSigDigits(Numbers(iHeatFlowPerFloorAreaNumericNum),7)))
ErrorsFound = .TRUE.
! Autosized input is not allowed
ELSEIF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow .EQ. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iHeatSAFMAlphaNum))//' = '//TRIM(Alphas(iHeatSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iHeatFlowPerFloorAreaNumericNum))//' = Autosize')
ErrorsFound = .TRUE.
ELSE
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow * TotalFloorAreaOnAirLoop
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iHeatSAFMAlphaNum))//' = '//TRIM(Alphas(iHeatSAFMAlphaNum)))
CALL ShowContinueError('Blank field not allowed for '//TRIM(cNumericFields(iHeatFlowPerFloorAreaNumericNum)))
ErrorsFound = .TRUE.
END IF
ELSEIF(SameString(Alphas(iHeatSAFMAlphaNum),'FractionOfAutosizedHeatingValue'))THEN
UnitarySystem(UnitarySysNum)%HeatingSAFMethod = FractionOfAutosizedHeatingValue
IF (.NOT. lNumericBlanks(iHeatFlowPerFracCoolNumericNum)) THEN
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Numbers(iHeatFlowPerFracCoolNumericNum)
IF (UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow .LE. 0.0d0 .AND. &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iHeatSAFMAlphaNum))//' = '//TRIM(Alphas(iHeatSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iHeatFlowPerFracCoolNumericNum))//' = '// &
TRIM(TrimSigDigits(Numbers(iHeatFlowPerFracCoolNumericNum),7)))
ErrorsFound = .TRUE.
! Autosized input is not allowed
ELSEIF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow .EQ. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iHeatSAFMAlphaNum))//' = '//TRIM(Alphas(iHeatSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iHeatFlowPerFracCoolNumericNum))//' = Autosize')
ErrorsFound = .TRUE.
ELSE
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iHeatSAFMAlphaNum))//' = '//TRIM(Alphas(iHeatSAFMAlphaNum)))
CALL ShowContinueError('Blank field not allowed for '//TRIM(cNumericFields(iHeatFlowPerFracCoolNumericNum)))
ErrorsFound = .TRUE.
END IF
ELSEIF(SameString(Alphas(iHeatSAFMAlphaNum),'FlowPerHeatingCapacity'))THEN
UnitarySystem(UnitarySysNum)%HeatingSAFMethod = FlowPerHeatingCapacity
IF (.NOT. lNumericBlanks(iHeatFlowPerHeatCapNumericNum)) THEN
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = Numbers(iHeatFlowPerHeatCapNumericNum)
IF (UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow .LE. 0.0d0 .AND. &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iHeatSAFMAlphaNum))//' = '//TRIM(Alphas(iHeatSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iHeatFlowPerHeatCapNumericNum))//' = '// &
TRIM(TrimSigDigits(Numbers(iHeatFlowPerHeatCapNumericNum),7)))
ErrorsFound = .TRUE.
! Autosized input is not allowed
ELSEIF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow .EQ. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iHeatSAFMAlphaNum))//' = '//TRIM(Alphas(iHeatSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iHeatFlowPerHeatCapNumericNum))//' = Autosize')
ErrorsFound = .TRUE.
ELSE
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iHeatSAFMAlphaNum))//' = '//TRIM(Alphas(iHeatSAFMAlphaNum)))
CALL ShowContinueError('Blank field not allowed for '//TRIM(cNumericFields(iHeatFlowPerHeatCapNumericNum)))
ErrorsFound = .TRUE.
END IF
ELSEIF(SameString(Alphas(iHeatSAFMAlphaNum),'None') .OR. lAlphaBlanks(iHeatSAFMAlphaNum))THEN
UnitarySystem(UnitarySysNum)%HeatingSAFMethod = None
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE. ! ??
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iHeatSAFMAlphaNum))//' = '//TRIM(Alphas(iHeatSAFMAlphaNum)))
ErrorsFound=.TRUE.
END IF
! Determine supply air flow rate sizing method when cooling or heating is not needed
IF(SameString(Alphas(iNoCoolHeatSAFMAlphaNum),'SupplyAirFlowRate'))THEN
UnitarySystem(UnitarySysNum)%NoCoolHeatSAFMethod = SupplyAirFlowRate
IF (.NOT. lNumericBlanks(iMaxNoCoolHeatAirVolFlowNumericNum)) THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = Numbers(iMaxNoCoolHeatAirVolFlowNumericNum)
IF(UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow == Autosize) &
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
IF (UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .LT. 0.0d0 .AND. &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iMaxNoCoolHeatAirVolFlowNumericNum))//' = '// &
TRIM(TrimSigDigits(Numbers(iMaxNoCoolHeatAirVolFlowNumericNum),7)))
ErrorsFound = .TRUE.
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iNoCoolHeatSAFMAlphaNum))//' = '// &
TRIM(Alphas(iNoCoolHeatSAFMAlphaNum)))
CALL ShowContinueError('Blank field not allowed for '//TRIM(cNumericFields(iMaxNoCoolHeatAirVolFlowNumericNum)))
ErrorsFound = .TRUE.
END IF
ELSEIF(SameString(Alphas(iNoCoolHeatSAFMAlphaNum),'FlowPerFloorArea'))THEN
UnitarySystem(UnitarySysNum)%NoCoolHeatSAFMethod = FlowPerFloorArea
IF (.NOT. lNumericBlanks(iNoCoolHeatFlowPerFloorAreaNumericNum)) THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = Numbers(iNoCoolHeatFlowPerFloorAreaNumericNum)
IF (UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .LT. 0.0d0 .AND. &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iNoCoolHeatSAFMAlphaNum))//' = '// &
TRIM(Alphas(iNoCoolHeatSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iNoCoolHeatFlowPerFloorAreaNumericNum))//' = '// &
TRIM(TrimSigDigits(Numbers(iNoCoolHeatFlowPerFloorAreaNumericNum),7)))
ErrorsFound = .TRUE.
! Autosized input is not allowed
ELSEIF(UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .EQ. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iNoCoolHeatSAFMAlphaNum))//' = '// &
TRIM(Alphas(iNoCoolHeatSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iNoCoolHeatFlowPerFloorAreaNumericNum))//' = Autosize')
ErrorsFound = .TRUE.
ELSE
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow * TotalFloorAreaOnAirLoop
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iNoCoolHeatSAFMAlphaNum))//' = '// &
TRIM(Alphas(iNoCoolHeatSAFMAlphaNum)))
CALL ShowContinueError('Blank field not allowed for '//TRIM(cNumericFields(iNoCoolHeatFlowPerFloorAreaNumericNum)))
ErrorsFound = .TRUE.
END IF
ELSEIF(SameString(Alphas(iNoCoolHeatSAFMAlphaNum),'FractionOfAutosizedCoolingValue'))THEN
UnitarySystem(UnitarySysNum)%NoCoolHeatSAFMethod = FractionOfAutosizedCoolingValue
IF (.NOT. lNumericBlanks(iNoCoolHeatFlowPerFracCoolNumericNum)) THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = Numbers(iNoCoolHeatFlowPerFracCoolNumericNum)
IF (UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .LT. 0.0d0 .AND. &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iNoCoolHeatSAFMAlphaNum))//' = '// &
TRIM(Alphas(iNoCoolHeatSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iNoCoolHeatFlowPerFracCoolNumericNum))//' = '// &
TRIM(TrimSigDigits(Numbers(iNoCoolHeatFlowPerFracCoolNumericNum),7)))
ErrorsFound = .TRUE.
! Autosized input is not allowed
ELSEIF(UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .EQ. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iNoCoolHeatSAFMAlphaNum))//' = '// &
TRIM(Alphas(iNoCoolHeatSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iNoCoolHeatFlowPerFracCoolNumericNum))//' = Autosize')
ErrorsFound = .TRUE.
ELSE
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iNoCoolHeatSAFMAlphaNum))//' = '// &
TRIM(Alphas(iNoCoolHeatSAFMAlphaNum)))
CALL ShowContinueError('Blank field not allowed for '//TRIM(cNumericFields(iNoCoolHeatFlowPerFracCoolNumericNum)))
ErrorsFound = .TRUE.
END IF
ELSEIF(SameString(Alphas(iNoCoolHeatSAFMAlphaNum),'FractionOfAutosizedHeatingValue'))THEN
UnitarySystem(UnitarySysNum)%NoCoolHeatSAFMethod = FractionOfAutosizedHeatingValue
IF (.NOT. lNumericBlanks(iNoCoolHeatFlowPerFracHeatNumericNum)) THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = Numbers(iNoCoolHeatFlowPerFracHeatNumericNum)
IF (UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .LT. 0.0d0 .AND. &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iNoCoolHeatSAFMAlphaNum))//' = '// &
TRIM(Alphas(iNoCoolHeatSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iNoCoolHeatFlowPerFracHeatNumericNum))//' = '// &
TRIM(TrimSigDigits(Numbers(iNoCoolHeatFlowPerFracHeatNumericNum),7)))
ErrorsFound = .TRUE.
! Autosized input is not allowed
ELSEIF(UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .EQ. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iNoCoolHeatSAFMAlphaNum))//' = '// &
TRIM(Alphas(iNoCoolHeatSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iNoCoolHeatFlowPerFracHeatNumericNum))//' = Autosize')
ErrorsFound = .TRUE.
ELSE
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iNoCoolHeatSAFMAlphaNum))//' = '// &
TRIM(Alphas(iNoCoolHeatSAFMAlphaNum)))
CALL ShowContinueError('Blank field not allowed for '//TRIM(cNumericFields(iNoCoolHeatFlowPerFracHeatNumericNum)))
ErrorsFound = .TRUE.
END IF
ELSEIF(SameString(Alphas(iNoCoolHeatSAFMAlphaNum),'FlowPerCoolingCapacity'))THEN
UnitarySystem(UnitarySysNum)%NoCoolHeatSAFMethod = FlowPerCoolingCapacity
IF (.NOT. lNumericBlanks(iNoCoolHeatFlowPerCoolCapNumericNum)) THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = Numbers(iNoCoolHeatFlowPerCoolCapNumericNum)
IF (UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .LT. 0.0d0 .AND. &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iNoCoolHeatSAFMAlphaNum))//' = '// &
TRIM(Alphas(iNoCoolHeatSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iNoCoolHeatFlowPerCoolCapNumericNum))//' = '// &
TRIM(TrimSigDigits(Numbers(iNoCoolHeatFlowPerCoolCapNumericNum),7)))
ErrorsFound = .TRUE.
! Autosized input is not allowed
ELSEIF(UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .EQ. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iNoCoolHeatSAFMAlphaNum))//' = '// &
TRIM(Alphas(iNoCoolHeatSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iNoCoolHeatFlowPerCoolCapNumericNum))//' = Autosize')
ErrorsFound = .TRUE.
ELSE
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iNoCoolHeatSAFMAlphaNum))//' = '// &
TRIM(Alphas(iNoCoolHeatSAFMAlphaNum)))
CALL ShowContinueError('Blank field not allowed for '//TRIM(cNumericFields(iNoCoolHeatFlowPerCoolCapNumericNum)))
ErrorsFound = .TRUE.
END IF
ELSEIF(SameString(Alphas(iNoCoolHeatSAFMAlphaNum),'FlowPerHeatingCapacity'))THEN
UnitarySystem(UnitarySysNum)%NoCoolHeatSAFMethod = FlowPerHeatingCapacity
IF (.NOT. lNumericBlanks(iNoCoolHeatFlowPerHeatCapNumericNum)) THEN
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow = Numbers(iNoCoolHeatFlowPerHeatCapNumericNum)
IF (UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .LT. 0.0d0 .AND. &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iNoCoolHeatSAFMAlphaNum))//' = '// &
TRIM(Alphas(iNoCoolHeatSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iNoCoolHeatFlowPerHeatCapNumericNum))//' = '// &
TRIM(TrimSigDigits(Numbers(iNoCoolHeatFlowPerHeatCapNumericNum),7)))
ErrorsFound = .TRUE.
! Autosized input is not allowed
ELSEIF(UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .EQ. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iNoCoolHeatSAFMAlphaNum))//' = '// &
TRIM(Alphas(iNoCoolHeatSAFMAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cNumericFields(iNoCoolHeatFlowPerHeatCapNumericNum))//' = Autosize')
ErrorsFound = .TRUE.
ELSE
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Input for '//TRIM(cAlphaFields(iNoCoolHeatSAFMAlphaNum))//' = '// &
TRIM(Alphas(iNoCoolHeatSAFMAlphaNum)))
CALL ShowContinueError('Blank field not allowed for '//TRIM(cNumericFields(iNoCoolHeatFlowPerHeatCapNumericNum)))
ErrorsFound = .TRUE.
END IF
ELSEIF(SameString(Alphas(iNoCoolHeatSAFMAlphaNum),'None') .OR. lAlphaBlanks(iNoCoolHeatSAFMAlphaNum))THEN
UnitarySystem(UnitarySysNum)%NoCoolHeatSAFMethod = None
! UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE. ! ??
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iNoCoolHeatSAFMAlphaNum))//' = '// &
TRIM(Alphas(iNoCoolHeatSAFMAlphaNum)))
ErrorsFound=.TRUE.
END IF
!! Check that the same air flow method is used if cooling and heating coil present
! IF(UnitarySystem(UnitarySysNum)%CoolCoilExists .AND. UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
! IF(UnitarySystem(UnitarySysNum)%CoolingSAFMethod /= UnitarySystem(UnitarySysNum)%HeatingSAFMethod .OR. &
! UnitarySystem(UnitarySysNum)%CoolingSAFMethod /= UnitarySystem(UnitarySysNum)%NoCoolHeatSAFMethod)THEN
! CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
! CALL ShowContinueError('Illegal supply air flow method.')
! CALL ShowContinueError(TRIM(cAlphaFields(iCoolSAFMAlphaNum))//' = '//TRIM(Alphas(iCoolSAFMAlphaNum)))
! CALL ShowContinueError(TRIM(cAlphaFields(iHeatSAFMAlphaNum))//' = '//TRIM(Alphas(iHeatSAFMAlphaNum)))
! CALL ShowContinueError(TRIM(cAlphaFields(iNoCoolHeatSAFMAlphaNum))//' = '//TRIM(Alphas(iNoCoolHeatSAFMAlphaNum)))
! CALL ShowContinueError('...Supply air flow methods must be the same when both a cooling and heating coil are present.')
! ErrorsFound=.TRUE.
! END IF
! END IF
! Fan operating mode (cycling or constant) schedule. IF constant fan, then set AirFlowControl
IF(UnitarySystem(UnitarySysNum)%FanOpModeSchedPtr .GT. 0)THEN
IF (.NOT. CheckScheduleValueMinMax(UnitarySystem(UnitarySysNum)%FanOpModeSchedPtr,'>=',0.0d0,'<=',0.0d0)) THEN
! set fan operating mode to continuous so sizing can set VS coil data
UnitarySystem(UnitarySysNum)%FanOpMode = ContFanCycCoil
! set air flow control mode:
! UseCompressorOnFlow = operate at last cooling or heating air flow requested when compressor is off
! UseCompressorOffFlow = operate at value specified by user
! AirFlowControl only valid if fan opmode = ContFanCycComp
IF (UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .EQ. 0.0d0) THEN
UnitarySystem(UnitarySysNum)%AirFlowControl = UseCompressorOnFlow
ELSE
UnitarySystem(UnitarySysNum)%AirFlowControl = UseCompressorOffFlow
END IF
END IF
END IF
IF(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num /= CoilDX_CoolingHXAssisted .AND. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num /= CoilDX_CoolingTwoStageWHumControl .AND. &
UnitarySystem(UnitarySysNum)%DehumidControlType_Num == DehumidControl_Multimode) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iDehumidControlAlphaNum))//' = '// &
TRIM(Alphas(iDehumidControlAlphaNum)))
CALL ShowContinueError('Multimode control must be used with a Heat Exchanger Assisted or Multimode Cooling Coil.')
IF(lAlphaBlanks(iSuppHeatCoilNameAlphaNum))THEN
ELSE
CALL ShowContinueError('Dehumidification control type is assumed to be CoolReheat'// &
' and the simulation continues.')
UnitarySystem(UnitarySysNum)%DehumidControlType_Num = DehumidControl_CoolReheat
END IF
END IF
! Check placement of cooling coil with respect to fan placement and dehumidification control type
IF (UnitarySystem(UnitarySysNum)%FanExists) THEN
IF(UnitarySystem(UnitarySysNum)%FanPlace == BlowThru)THEN
IF(FanOutletNode == HeatingCoilInletNode .AND. &
UnitarySystem(UnitarySysNum)%DehumidControlType_Num /= DehumidControl_CoolReheat)THEN
UnitarySystem(UnitarySysNum)%CoolingCoilUpstream = .FALSE.
END IF
ELSEIF(UnitarySystem(UnitarySysNum)%FanPlace == DrawThru)THEN
IF(HeatingCoilOutletNode == CoolingCoilInletNode .AND. &
UnitarySystem(UnitarySysNum)%DehumidControlType_Num /= DehumidControl_CoolReheat)THEN
UnitarySystem(UnitarySysNum)%CoolingCoilUpstream = .FALSE.
END IF
END IF
ELSE
IF(HeatingCoilOutletNode == CoolingCoilInletNode .AND. &
UnitarySystem(UnitarySysNum)%DehumidControlType_Num /= DehumidControl_CoolReheat)THEN
UnitarySystem(UnitarySysNum)%CoolingCoilUpstream = .FALSE.
END IF
END IF
! check node connections
IF(UnitarySystem(UnitarySysNum)%FanPlace .EQ. BlowThru)THEN
IF(FanInletNode /= UnitarySystem(UnitarySysNum)%UnitarySystemInletNodeNum) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('When a blow through fan is specified, the fan inlet node name must be '// &
'the same as the unitary system inlet node name.')
CALL ShowContinueError('...Fan inlet node name = '//TRIM(NodeID(FanInletNode)))
CALL ShowContinueError('...UnitarySystem inlet node name = ' &
//TRIM(NodeID(UnitarySystem(UnitarySysNum)%UnitarySystemInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF(UnitarySystem(UnitarySysNum)%CoolingCoilUpstream)THEN
IF(FanOutletNode /= CoolingCoilInletNode .AND. &
UnitarySystem(UnitarySysNum)%CoolCoilExists .AND. UnitarySystem(UnitarySysNum)%FanExists) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('When a blow through fan is specified, the fan outlet node name must be '// &
'the same as the cooling coil inlet node name.')
CALL ShowContinueError('...Fan outlet node name = '//TRIM(NodeID(FanOutletNode)))
CALL ShowContinueError('...Cooling coil inlet node name = '//TRIM(NodeID(CoolingCoilInletNode)))
ErrorsFound=.TRUE.
END IF
IF(CoolingCoilOutletNode /= HeatingCoilInletNode .AND. &
UnitarySystem(UnitarySysNum)%CoolCoilExists .AND. UnitarySystem(UnitarySysNum)%HeatCoilExists) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('The cooling coil outlet node name must be '// &
'the same as the heating coil inlet node name.')
CALL ShowContinueError('...Cooling coil outlet node name = '//TRIM(NodeID(CoolingCoilOutletNode)))
CALL ShowContinueError('...Heating coil inlet node name = '//TRIM(NodeID(HeatingCoilInletNode)))
ErrorsFound=.TRUE.
END IF
IF(UnitarySystem(UnitarySysNum)%SuppCoilExists)THEN
IF(SupHeatCoilOutletNode /= UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('The reheat coil outlet node name must be '// &
'the same as the unitary system outlet node name.')
CALL ShowContinueError('...Reheat coil outlet node name = '//TRIM(NodeID(SupHeatCoilOutletNode)))
CALL ShowContinueError('...UnitarySystem outlet node name = ' &
//TRIM(NodeID(UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum)))
! ErrorsFound=.TRUE.
END IF
ELSE ! IF((UnitarySystem(UnitarySysNum)%Humidistat ...
! Heating coil outlet node name must be the same as the Unitary system outlet node name
IF (UnitarySystem(UnitarySysNum)%HeatCoilExists .AND. &
HeatingCoilOutletNode /= UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('When a blow through fan is specified, '//&
'the heating coil outlet node name must be the same as the unitary system outlet node name.')
CALL ShowContinueError('...Heating coil outlet node name = '//TRIM(NodeID(HeatingCoilOutletNode)))
CALL ShowContinueError('...Unitary system outlet node name = ' &
//TRIM(NodeID(UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum)))
ErrorsFound=.TRUE.
END IF
END IF
ELSE ! IF(UnitarySystem(UnitarySysNum)%CoolingCoilUpstream)THEN
IF(FanOutletNode /= HeatingCoilInletNode .AND. UnitarySystem(UnitarySysNum)%FanExists .AND. &
UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('When a blow through fan is specified, the fan outlet node name must be '// &
'the same as the heating coil inlet node name.')
CALL ShowContinueError('...Fan outlet node name = '//TRIM(NodeID(FanOutletNode)))
CALL ShowContinueError('...Heating coil inlet node name = '//TRIM(NodeID(HeatingCoilInletNode)))
ErrorsFound=.TRUE.
END IF
IF(HeatingCoilOutletNode /= CoolingCoilInletNode .AND. UnitarySystem(UnitarySysNum)%CoolCoilExists .AND. &
UnitarySystem(UnitarySysNum)%HeatCoilExists) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('The heating coil outlet node name must be '// &
'the same as the cooling coil inlet node name.')
CALL ShowContinueError('...Heating coil outlet node name = '//TRIM(NodeID(HeatingCoilOutletNode)))
CALL ShowContinueError('...Cooling coil inlet node name = '//TRIM(NodeID(CoolingCoilInletNode)))
ErrorsFound=.TRUE.
END IF
IF(CoolingCoilOutletNode /= UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum .AND. &
UnitarySystem(UnitarySysNum)%CoolCoilExists) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('When a blow through fan is specified, the cooling coil outlet node name must be '// &
'the same as the unitary system outlet node name.')
CALL ShowContinueError('...Cooling coil outlet node name = '//TRIM(NodeID(CoolingCoilOutletNode)))
CALL ShowContinueError('...UnitarySystem outlet node name = ' &
//TRIM(NodeID(UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum)))
ErrorsFound=.TRUE.
END IF
END IF
ELSE ! ELSE from IF(UnitarySystem(UnitarySysNum)%FanPlace .EQ. BlowThru)THEN
IF(UnitarySystem(UnitarySysNum)%CoolingCoilUpstream)THEN
IF(CoolingCoilInletNode /= UnitarySystem(UnitarySysNum)%UnitarySystemInletNodeNum .AND. &
CoolingCoilInletNode /= 0 .AND. UnitarySystem(UnitarySysNum)%FanExists) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('When a draw through fan is specified, the cooling coil inlet node name must be '// &
'the same as the unitary system inlet node name.')
CALL ShowContinueError('...Cooling coil inlet node name = '//TRIM(NodeID(CoolingCoilInletNode)))
CALL ShowContinueError('...UnitarySystem inlet node name = ' &
//TRIM(NodeID(UnitarySystem(UnitarySysNum)%UnitarySystemInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF(CoolingCoilOutletNode /= HeatingCoilInletNode .AND. &
UnitarySystem(UnitarySysNum)%CoolCoilExists .AND. UnitarySystem(UnitarySysNum)%HeatCoilExists) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('The cooling coil outlet node name must be '// &
'the same as the heating coil inlet node name.')
CALL ShowContinueError('...Cooling coil outlet node name = '//TRIM(NodeID(CoolingCoilOutletNode)))
CALL ShowContinueError('...Heating coil inlet node name = '//TRIM(NodeID(HeatingCoilInletNode)))
ErrorsFound=.TRUE.
END IF
IF(HeatingCoilOutletNode /= FanInletNode .AND. &
UnitarySystem(UnitarySysNum)%HeatCoilExists .AND. UnitarySystem(UnitarySysNum)%FanExists) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('When a draw through fan is specified, the heating coil outlet node name must be '// &
'the same as the fan inlet node name.')
CALL ShowContinueError('...Heating coil outlet node name = '//TRIM(NodeID(HeatingCoilOutletNode)))
CALL ShowContinueError('...Fan inlet node name = '//TRIM(NodeID(FanInletNode)))
ErrorsFound=.TRUE.
END IF
IF(UnitarySystem(UnitarySysNum)%SuppCoilExists)THEN
IF(FanOutletNode /= SupHeatCoilInletNode .AND. UnitarySystem(UnitarySysNum)%FanExists) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('When a draw through fan is specified, the fan outlet node name must be '// &
'the same as the reheat coil inlet node name.')
CALL ShowContinueError('...Fan outlet node name = '//TRIM(NodeID(FanOutletNode)))
CALL ShowContinueError('...Reheat coil inlet node name = '//TRIM(NodeID(SupHeatCoilInletNode)))
! ErrorsFound=.TRUE.
END IF
IF(SupHeatCoilOutletNode /= UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('The reheat coil outlet node name must be '// &
'the same as the unitary system outlet node name.')
CALL ShowContinueError('...Reheat coil outlet node name = '//TRIM(NodeID(SupHeatCoilOutletNode)))
CALL ShowContinueError('...UnitarySystem outlet node name = ' &
//TRIM(NodeID(UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum)))
END IF
ELSE
IF(FanOutletNode /= UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum .AND. &
UnitarySystem(UnitarySysNum)%FanExists) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('When a draw through fan is specified, the fan outlet node name must be '// &
'the same as the unitary system outlet node name.')
CALL ShowContinueError('...Fan outlet node name = '//TRIM(NodeID(FanOutletNode)))
CALL ShowContinueError('...Unitary system outlet node name = '// &
TRIM(NodeID(UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum)))
ErrorsFound=.TRUE.
END IF
END IF
ELSE ! IF(UnitarySystem(UnitarySysNum)%CoolingCoilUpstream)THEN
IF(HeatingCoilInletNode /= UnitarySystem(UnitarySysNum)%UnitarySystemInletNodeNum .AND. &
HeatingCoilInletNode /= 0 .AND. UnitarySystem(UnitarySysNum)%FanExists) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('When a draw through fan is specified, the heating coil inlet node name must be '// &
'the same as the unitary system inlet node name.')
CALL ShowContinueError('...Heating coil inlet node name = '//TRIM(NodeID(HeatingCoilInletNode)))
CALL ShowContinueError('...UnitarySystem inlet node name = ' &
//TRIM(NodeID(UnitarySystem(UnitarySysNum)%UnitarySystemInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF(HeatingCoilOutletNode /= CoolingCoilInletNode .AND. &
UnitarySystem(UnitarySysNum)%HeatCoilExists .AND. UnitarySystem(UnitarySysNum)%CoolCoilExists) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('The heating coil outlet node name must be '// &
'the same as the cooling coil inlet node name.')
CALL ShowContinueError('...Heating coil outlet node name = '//TRIM(NodeID(HeatingCoilOutletNode)))
CALL ShowContinueError('...Cooling coil inlet node name = '//TRIM(NodeID(CoolingCoilInletNode)))
ErrorsFound=.TRUE.
END IF
IF(CoolingCoilOutletNode /= FanInletNode .AND. &
UnitarySystem(UnitarySysNum)%CoolCoilExists .AND. UnitarySystem(UnitarySysNum)%FanExists) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('When a draw through fan is specified, the cooling coil outlet node name must be '// &
'the same as the fan inlet node name.')
CALL ShowContinueError('...Cooling coil outlet node name = '//TRIM(NodeID(CoolingCoilOutletNode)))
CALL ShowContinueError('...Fan inlet node name = '//TRIM(NodeID(FanInletNode)))
ErrorsFound=.TRUE.
END IF
IF(FanOutletNode /= UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum .AND. &
UnitarySystem(UnitarySysNum)%FanExists) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('When a draw through fan is specified, the fan outlet node name must be '// &
'the same as the unitary system outlet node name.')
CALL ShowContinueError('...Fan outlet node name = '//TRIM(NodeID(FanOutletNode)))
CALL ShowContinueError('...UnitarySystem outlet node name = ' &
//TRIM(NodeID(UnitarySystem(UnitarySysNum)%UnitarySystemOutletNodeNum)))
ErrorsFound=.TRUE.
END IF
END IF
END IF ! ELSE from IF(UnitarySystem(UnitarySysNum)%FanPlace .EQ. BlowThru)THEN
!Set the unitary system supplemental heater max outlet temperature
! this field will be 0 if the input is not specified (included) in the input file
! someone may use a default other than what we intended, allow it to be used
! so if this field is blank, and the input field is included, read the default, otherwise use 80
IF (.NOT. lNumericBlanks(iDesignMaxOutletTempNumericNum) .AND. NumNumbers .GT. (iDesignMaxOutletTempNumericNum-1)) THEN
UnitarySystem(UnitarySysNum)%DesignMaxOutletTemp = Numbers(iDesignMaxOutletTempNumericNum)
IF(UnitarySystem(UnitarySysNum)%DesignMaxOutletTemp == Autosize) &
UnitarySystem(UnitarySysNum)%RequestAutosize = .TRUE.
END IF
!Set maximum Outdoor air temperature for supplemental heating coil operation
! this field will be 0 if the input is not specified (included) in the input file
! someone may use a default other than what we intended, allow it to be used
! so if this field is blank, and the input field is included, read the default, otherwise use 9999
IF (.NOT. lNumericBlanks(iMaxOATSuppHeatNumericNum) .AND. NumNumbers .GT. (iMaxOATSuppHeatNumericNum-1)) THEN
UnitarySystem(UnitarySysNum)%MaxOATSuppHeat = Numbers(iMaxOATSuppHeatNumericNum)
! Can't let MaxOATSuppHeat default to 21C if using cool reheat since it would shut off supp heater when dehumidifying
! this may also allow supplemental heater to operate when in heating mode when it should not
ELSE IF(NumNumbers .LT. iMaxOATSuppHeatNumericNum .AND. &
UnitarySystem(UnitarySysNum)%DehumidControlType_Num == DehumidControl_CoolReheat)THEN
UnitarySystem(UnitarySysNum)%MaxOATSuppHeat = 999.0d0
END IF
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow .NE. Autosize .AND. &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow .NE. Autosize .AND. &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .NE. Autosize .AND. &
.NOT. UnitarySystem(UnitarySysNum)%RequestAutosize)THEN
! (UnitarySystem(UnitarySysNum)%CoolingSAFMethod .LE. SupplyAirFlowRate .OR. &
! UnitarySystem(UnitarySysNum)%HeatingSAFMethod .LE. SupplyAirFlowRate))THEN
UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate = MAX(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow, &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow, &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow)
ELSE
IF(UnitarySystem(UnitarySysNum)%FanExists)THEN
UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate = Autosize
END IF
! need more of this type of warning when flow cannot be determined
IF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow .EQ. 0.0d0 .AND. &
UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
IF(UnitarySystem(UnitarySysNum)%FanExists)THEN
IF(UnitarySystem(UnitarySysNum)%CoolCoilExists .AND. &
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow /= Autosize)THEN
IF(UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow == 0.0d0)THEN
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate
END IF
END IF
ELSEIF(UnitarySystem(UnitarySysNum)%CoolCoilExists)THEN
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow
ELSE
IF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num /= CoilDX_HeatingEmpirical .AND. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num /= CoilDX_MultiSpeedHeating .AND. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num /= Coil_HeatingAirToAirVariableSpeed)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('When non-DX heating coils are specified, the heating air flow rate must be '// &
'entered in '//TRIM(cAlphaFields(iHeatSAFMAlphaNum)))
ErrorsFound=.TRUE.
END IF
END IF
ELSEIF(UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow .EQ. 0.0d0 .AND. &
.NOT. UnitarySystem(UnitarySysNum)%FanExists .AND. &
.NOT. UnitarySystem(UnitarySysNum)%CoolCoilExists)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('When non-DX heating coils are specified, the heating air flow rate must be '// &
'entered in '//TRIM(cAlphaFields(iHeatSAFMAlphaNum)))
END IF
END IF
IF(FanVolFlowRate .NE. AutoSize .AND. UnitarySystem(UnitarySysNum)%FanExists)THEN
IF(FanVolFlowRate .LT. UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow .AND. &
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow .NE. AutoSize .AND. &
UnitarySystem(UnitarySysNum)%CoolCoilExists)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('... air flow rate = '//TRIM(TrimSigDigits(FanVolFlowRate,7))//' in fan object '// &
TRIM(FanName)//' is less than the maximum HVAC system air flow rate in cooling mode.')
CALL ShowContinueError(' The '//TRIM(cNumericFields(iMaxCoolAirVolFlowNumericNum))//' is reset to the' &
//' fan flow rate and the simulation continues.')
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlow = FanVolFlowRate
UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate = FanVolFlowRate
END IF
IF(FanVolFlowRate .LT. UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow .AND. &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow .NE. AutoSize .AND. &
UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('... air flow rate = '//TRIM(TrimSigDigits(FanVolFlowRate,7))//' in fan object '// &
TRIM(FanName)//' is less than the maximum HVAC system air flow rate in heating mode.')
CALL ShowContinueError(' The '//TRIM(cNumericFields(3))//' is reset to the' &
//' fan flow rate and the simulation continues.')
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlow = FanVolFlowRate
UnitarySystem(UnitarySysNum)%DesignFanVolFlowRate = FanVolFlowRate
END IF
END IF
IF(UnitarySystem(UnitarySysNum)%FanOpModeSchedPtr .GT. 0)THEN
IF (.NOT. CheckScheduleValueMinMax(UnitarySystem(UnitarySysNum)%FanOpModeSchedPtr,'>=',0.0d0,'<=',0.0d0)) THEN
! set air flow control mode:
! UseCompressorOnFlow = operate at last cooling or heating air flow requested when compressor is off
! UseCompressorOffFlow = operate at value specified by user
! AirFlowControl only valid IF fan opmode = ContFanCycComp
IF (UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlow .EQ. 0.0d0) THEN
UnitarySystem(UnitarySysNum)%AirFlowControl = UseCompressorOnFlow
ELSE
UnitarySystem(UnitarySysNum)%AirFlowControl = UseCompressorOffFlow
END IF
END IF
END IF
!Set minimum OAT for heat pump compressor operation
! get from coil module
ErrFlag=.FALSE.
IF (UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingAirToAirVariableSpeed) THEN
UnitarySystem(UnitarySysNum)%MinOATCompressor = GetVSCoilMinOATCompressor(HeatingCoilName,ErrFlag)
ELSEIF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_HeatingEmpirical .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating) THEN
UnitarySystem(UnitarySysNum)%MinOATCompressor = &
GetMinOATDXCoilCompressor(HeatingCoilType,HeatingCoilName,ErrFlag)
! ELSEIF ***... make sure we catch all possbile coil types here ...***
ELSE
UnitarySystem(UnitarySysNum)%MinOATCompressor = -1000.0d0
END IF
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
! Mine heatpump Outdoor condenser node from DX coil object
ErrFlag=.FALSE.
IF (UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingSingleSpeed) THEN
UnitarySystem(UnitarySysNum)%CondenserNodeNum = &
GetDXCoilCondenserInletNode(CoolingCoilType,CoolingCoilName,ErrFlag)
ELSEIF (UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == Coil_CoolingAirToAirVariableSpeed) THEN
UnitarySystem(UnitarySysNum)%CondenserNodeNum = GetVSCoilCondenserInletNode(CoolingCoilName,ErrFlag)
ELSEIF (UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingHXAssisted) THEN
UnitarySystem(UnitarySysNum)%CondenserNodeNum = &
GetDXCoilCondenserInletNode('Coil:Cooling:DX:SingleSpeed', &
GetHXDXCoilName(CoolingCoilType,CoolingCoilName,ErrFlag), &
ErrFlag)
ELSE
IF(.NOT. lAlphaBlanks(iCondenserNodeAlphaNum))THEN
UnitarySystem(UnitarySysNum)%CondenserNodeNum = &
GetOnlySingleNode(Alphas(iCondenserNodeAlphaNum),ErrFlag,CurrentModuleObject,Alphas(1), &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsParent)
ELSE
! do nothing?
END IF
END IF
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
!Set the heatpump cycling rate
UnitarySystem(UnitarySysNum)%MaxONOFFCyclesperHour = Numbers(iMaxONOFFCycPerHourNumericNum)
IF(NumNumbers .LT. iMaxONOFFCycPerHourNumericNum)THEN
UnitarySystem(UnitarySysNum)%MaxONOFFCyclesperHour = 2.5d0
END IF
!Set the heat pump time constant
UnitarySystem(UnitarySysNum)%HPTimeConstant = Numbers(iHPTimeConstantNumericNum)
IF(NumNumbers .LT. iHPTimeConstantNumericNum)THEN
UnitarySystem(UnitarySysNum)%HPTimeConstant = 60.0d0
END IF
!Set the heat pump on-cycle power use fraction
UnitarySystem(UnitarySysNum)%OnCyclePowerFraction = Numbers (iOnCyclePowerFracNumericNum)
IF(NumNumbers .LT. iOnCyclePowerFracNumericNum)THEN
UnitarySystem(UnitarySysNum)%OnCyclePowerFraction = 0.01d0
END IF
!Set the heat pump fan delay time
UnitarySystem(UnitarySysNum)%FanDelayTime = Numbers(iFanDelayTimeNumericNum)
IF(NumNumbers .LT. iFanDelayTimeNumericNum)THEN
UnitarySystem(UnitarySysNum)%FanDelayTime = 60.0d0
END IF
UnitarySystem(UnitarySysNum)%AncillaryOnPower = Numbers(iAncillaryOnPowerNumericNum)
UnitarySystem(UnitarySysNum)%AncillaryOffPower = Numbers(iAncillaryOffPowerNumericNum)
UnitarySystem(UnitarySysNum)%DesignHRWaterVolumeFlow = Numbers(iDesignHRWaterVolFlowNumericNum)
UnitarySystem(UnitarySysNum)%MaxHROutletWaterTemp = Numbers(iMaxHROutletWaterTempNumericNum)
IF(UnitarySystem(UnitarySysNum)%DesignHRWaterVolumeFlow .GT. 0.0d0)THEN
UnitarySystem(UnitarySysNum)%HeatRecActive = .TRUE.
ErrFlag=.FALSE.
IF(.NOT. lAlphaBlanks(iHRWaterInletNodeAlphaNum) .AND. .NOT. lAlphaBlanks(iHRWaterOutletNodeAlphaNum))THEN
UnitarySystem(UnitarySysNum)%HeatRecoveryInletNodeNum = &
GetOnlySingleNode(Alphas(iHRWaterInletNodeAlphaNum),ErrFlag,'Unitary System Heat receovery',Alphas(iNameAlphaNum), &
NodeType_Water,NodeConnectionType_Inlet,3,ObjectIsParent)
UnitarySystem(UnitarySysNum)%HeatRecoveryOutletNodeNum = &
GetOnlySingleNode(Alphas(iHRWaterOutletNodeAlphaNum),ErrFlag,'Unitary System Heat receovery',Alphas(iNameAlphaNum), &
NodeType_Water,NodeConnectionType_Inlet,3,ObjectIsParent)
CALL TestCompSet(CurrentModuleObject,Alphas(iNameAlphaNum),Alphas(iHRWaterInletNodeAlphaNum), &
Alphas(iHRWaterOutletNodeAlphaNum), 'Unitary System Heat receovery Nodes')
IF (ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
ErrorsFound=.TRUE.
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iHRWaterInletNodeAlphaNum))//' = '// &
TRIM(Alphas(iHRWaterInletNodeAlphaNum)))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(iHRWaterOutletNodeAlphaNum))//' = '// &
TRIM(Alphas(iHRWaterOutletNodeAlphaNum)))
CALL ShowContinueError('... heat recovery nodes must be specified when ' &
//TRIM(cNumericFields(iDesignHRWaterVolFlowNumericNum))//' is greater than 0.')
CALL ShowContinueError('... '//TRIM(cNumericFields(iDesignHRWaterVolFlowNumericNum))//' = '// &
TRIM(TrimSigDigits(UnitarySystem(UnitarySysNum)%DesignHRWaterVolumeFlow,7)))
ErrorsFound=.TRUE.
END IF
END IF
IF(.NOT. lAlphaBlanks(iDesignSpecMSHPTypeAlphaNum) .AND. .NOT. lAlphaBlanks(iDesignSpecMSHPNameAlphaNum))THEN
UnitarySystem(UnitarySysNum)%DesignSpecMultispeedHPType = Alphas(iDesignSpecMSHPTypeAlphaNum)
UnitarySystem(UnitarySysNum)%DesignSpecMultispeedHPName = Alphas(iDesignSpecMSHPNameAlphaNum)
UnitarySystem(UnitarySysNum)%DesignSpecMSHPIndex = &
FindItemInList(UnitarySystem(UnitarySysNum)%DesignSpecMultispeedHPName,DesignSpecMSHP%Name,NumDesignSpecMultiSpeedHP)
DesignSpecNum = UnitarySystem(UnitarySysNum)%DesignSpecMSHPIndex
IF(DesignSpecNum .GT. 0)THEN
IF (UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingElectric_MultiStage .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingGas_MultiStage) THEN
UnitarySystem(UnitarySysNum)%NumOfSpeedHeating = DesignSpecMSHP(DesignSpecNum)%NumOfSpeedHeating
ALLOCATE(UnitarySystem(UnitarySysNum)%HeatMassFlowRate(DesignSpecMSHP(DesignSpecNum)%NumOfSpeedHeating))
ALLOCATE(UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate(DesignSpecMSHP(DesignSpecNum)%NumOfSpeedHeating))
ALLOCATE(UnitarySystem(UnitarySysNum)%MSHeatingSpeedRatio(DesignSpecMSHP(DesignSpecNum)%NumOfSpeedHeating))
UnitarySystem(UnitarySysNum)%MSHeatingSpeedRatio = 1.0d0
END IF
IF (UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_MultiSpeedCooling) THEN
UnitarySystem(UnitarySysNum)%NumOfSpeedCooling = DesignSpecMSHP(DesignSpecNum)%NumOfSpeedCooling
ALLOCATE(UnitarySystem(UnitarySysNum)%CoolMassFlowRate(DesignSpecMSHP(DesignSpecNum)%NumOfSpeedCooling))
ALLOCATE(UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate(DesignSpecMSHP(DesignSpecNum)%NumOfSpeedCooling))
ALLOCATE(UnitarySystem(UnitarySysNum)%MSCoolingSpeedRatio(DesignSpecMSHP(DesignSpecNum)%NumOfSpeedCooling))
UnitarySystem(UnitarySysNum)%MSCoolingSpeedRatio = 1.0d0
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('... one or both of the following inputs are invalid.')
CALL ShowContinueError('Field '//TRIM(cAlphaFields(iDesignSpecMSHPTypeAlphaNum))//' = '// &
TRIM(Alphas(iDesignSpecMSHPTypeAlphaNum)))
CALL ShowContinueError('Field '//TRIM(cAlphaFields(iDesignSpecMSHPNameAlphaNum))//' = '// &
TRIM(Alphas(iDesignSpecMSHPNameAlphaNum)))
ErrorsFound = .TRUE.
END IF
ELSEIF(lAlphaBlanks(iDesignSpecMSHPTypeAlphaNum) .AND. .NOT. lAlphaBlanks(iDesignSpecMSHPNameAlphaNum) .OR. &
.NOT. lAlphaBlanks(iDesignSpecMSHPTypeAlphaNum) .AND. lAlphaBlanks(iDesignSpecMSHPNameAlphaNum))THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('... one or both of the following inputs are invalid.')
CALL ShowContinueError('Field '//TRIM(cAlphaFields(iDesignSpecMSHPTypeAlphaNum))//' = '// &
TRIM(Alphas(iDesignSpecMSHPTypeAlphaNum)))
CALL ShowContinueError('Field '//TRIM(cAlphaFields(iDesignSpecMSHPNameAlphaNum))//' = '// &
TRIM(Alphas(iDesignSpecMSHPNameAlphaNum)))
ErrorsFound = .TRUE.
ELSEIF(UnitarySystem(UnitarySysNum)%NumOfSpeedHeating .GT. 0)THEN
NumOfSpeedHeating = UnitarySystem(UnitarySysNum)%NumOfSpeedHeating
ALLOCATE(UnitarySystem(UnitarySysNum)%HeatMassFlowRate(NumOfSpeedHeating))
ALLOCATE(UnitarySystem(UnitarySysNum)%HeatVolumeFlowRate(NumOfSpeedHeating))
ALLOCATE(UnitarySystem(UnitarySysNum)%MSHeatingSpeedRatio(NumOfSpeedHeating))
UnitarySystem(UnitarySysNum)%MSHeatingSpeedRatio = 1.0d0
ELSEIF(UnitarySystem(UnitarySysNum)%NumOfSpeedCooling .GT. 0)THEN
NumOfSpeedCooling = UnitarySystem(UnitarySysNum)%NumOfSpeedCooling
ALLOCATE(UnitarySystem(UnitarySysNum)%CoolMassFlowRate(NumOfSpeedCooling))
ALLOCATE(UnitarySystem(UnitarySysNum)%CoolVolumeFlowRate(NumOfSpeedCooling))
ALLOCATE(UnitarySystem(UnitarySysNum)%MSCoolingSpeedRatio(NumOfSpeedCooling))
UnitarySystem(UnitarySysNum)%MSCoolingSpeedRatio = 1.0d0
END IF
IF(UnitarySystem(UnitarySysNum)%MultiSpeedCoolingCoil) THEN
Index = UnitarySystem(UnitarySysNum)%DesignSpecMSHPIndex
IF(Index .GT. 0) &
UnitarySystem(UnitarySysNum)%NumOfSpeedCooling = DesignSpecMSHP(Index)%NumOfSpeedCooling
IF (UnitarySystem(UnitarySysNum)%NumOfSpeedCooling == 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('... Cooling coil object type requires valid number of speeds for cooling to be specified')
ErrorsFound = .TRUE.
END IF
END IF
IF(UnitarySystem(UnitarySysNum)%MultiSpeedHeatingCoil) THEN
Index = UnitarySystem(UnitarySysNum)%DesignSpecMSHPIndex
IF(Index .GT. 0) &
UnitarySystem(UnitarySysNum)%NumOfSpeedHeating = DesignSpecMSHP(Index)%NumOfSpeedHeating
IF (UnitarySystem(UnitarySysNum)%NumOfSpeedHeating == 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(UnitarySystem(UnitarySysNum)%Name))
CALL ShowContinueError('... Heating coil object type requires valid number of speeds for heating to be specified')
ErrorsFound = .TRUE.
END IF
END IF
! set global logicals that denote coil type
IF (UnitarySystem(UnitarySysNum)%MultiSpeedHeatingCoil .OR. UnitarySystem(UnitarySysNum)%VarSpeedHeatingCoil) THEN
MultiOrVarSpeedHeatCoil(UnitarySysNum) = .TRUE.
END IF
IF (UnitarySystem(UnitarySysNum)%MultiSpeedCoolingCoil .OR. UnitarySystem(UnitarySysNum)%VarSpeedCoolingCoil) THEN
MultiOrVarSpeedCoolCoil(UnitarySysNum) = .TRUE.
END IF
END DO !End of the Unitary System Loop
IF (ErrorsFound) THEN
CALL ShowFatalError(RoutineName//'Errors found in input. Program terminates.')
END IF
! Setup Report variables for the Unitary System that are not reported in the components themselves
DO UnitarySysNum=1,NumUnitarySystem
CALL SetupOutputVariable('Unitary System Part Load Ratio []',UnitarySystem(UnitarySysNum)%PartLoadFrac, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
CALL SetupOutputVariable('Unitary System Total Cooling Rate [W]',UnitarySystem(UnitarySysNum)%TotCoolEnergyRate, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
CALL SetupOutputVariable('Unitary System Sensible Cooling Rate [W]',UnitarySystem(UnitarySysNum)%SensCoolEnergyRate, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
CALL SetupOutputVariable('Unitary System Latent Cooling Rate [W]',UnitarySystem(UnitarySysNum)%LatCoolEnergyRate, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
CALL SetupOutputVariable('Unitary System Total Heating Rate [W]',UnitarySystem(UnitarySysNum)%TotHeatEnergyRate, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
CALL SetupOutputVariable('Unitary System Sensible Heating Rate [W]',UnitarySystem(UnitarySysNum)%SensHeatEnergyRate, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
CALL SetupOutputVariable('Unitary System Latent Heating Rate [W]',UnitarySystem(UnitarySysNum)%LatHeatEnergyRate, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
CALL SetupOutputVariable('Unitary System Ancillary Electric Power [W]', &
UnitarySystem(UnitarySysNum)%TotalAuxElecPower, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
! IF(UnitarySystem(UnitarySysNum)%DehumidControlType_Num .EQ. DehumidControl_CoolReheat)THEN
CALL SetupOutputVariable('Unitary System Dehumidification Induced Heating Demand Rate [W]', &
UnitarySystem(UnitarySysNum)%DehumidInducedHeatingDemandRate, 'System','Average', &
UnitarySystem(UnitarySysNum)%Name)
! END IF
IF(UnitarySystem(UnitarySysNum)%FanExists)THEN
CALL SetupOutputVariable('Unitary System Fan Part Load Ratio []',UnitarySystem(UnitarySysNum)%FanPartLoadRatio, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
END IF
CALL SetupOutputVariable('Unitary System Compressor Part Load Ratio []', &
UnitarySystem(UnitarySysNum)%CompPartLoadRatio, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
CALL SetupOutputVariable('Unitary System Frost Control Status []',UnitarySystem(UnitarySysNum)%FrostControlStatus, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
IF(UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
CALL SetupOutputVariable('Unitary System Heating Ancillary Electric Energy [J]', &
UnitarySystem(UnitarySysNum)%HeatingAuxElecConsumption,'System','Sum',UnitarySystem(UnitarySysNum)%Name, &
ResourceTypeKey='Electric',EndUseKey='Heating',GroupKey='System')
END IF
SELECT CASE(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num)
CASE(CoilDX_CoolingTwoSpeed)
CALL SetupOutputVariable('Unitary System Cycling Ratio []',UnitarySystem(UnitarySysNum)%CycRatio, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
CALL SetupOutputVariable('Unitary System Compressor Speed Ratio []',UnitarySystem(UnitarySysNum)%SpeedRatio, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
CASE(CoilDX_MultiSpeedCooling)
CALL SetupOutputVariable('Unitary System Cooling Ancillary Electric Energy [J]', &
UnitarySystem(UnitarySysNum)%CoolingAuxElecConsumption,'System','Sum',UnitarySystem(UnitarySysNum)%Name, &
ResourceTypeKey='Electric',EndUseKey='Cooling',GroupKey='System')
CALL SetupOutputVariable('Unitary System Electric Power [W]',UnitarySystem(UnitarySysNum)%ElecPower,&
'System','Average',UnitarySystem(UnitarySysNum)%Name)
CALL SetupOutputVariable('Unitary System Electric Energy [J]',UnitarySystem(UnitarySysNum)%ElecPowerConsumption, &
'System','Sum',UnitarySystem(UnitarySysNum)%Name)
! CALL SetupOutputVariable('Unitary System Cooling Coil Cycling Ratio []',UnitarySystem(UnitarySysNum)%CoolingCycRatio, &
! 'System','Average',UnitarySystem(UnitarySysNum)%Name)
! CALL SetupOutputVariable('Unitary System Cooling Coil Speed Ratio []',UnitarySystem(UnitarySysNum)%CoolingSpeedRatio, &
! 'System','Average',UnitarySystem(UnitarySysNum)%Name)
! CALL SetupOutputVariable('Unitary System Cooling Coil Speed Level []',UnitarySystem(UnitarySysNum)%CoolingSpeedNum, &
! 'System','Average',UnitarySystem(UnitarySysNum)%Name)
IF (UnitarySystem(UnitarySysNum)%HeatRecActive) THEN
CALL SetupOutputVariable('Unitary System Heat Recovery Rate [W]',UnitarySystem(UnitarySysNum)%HeatRecoveryRate, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
CALL SetupOutputVariable('Unitary System Heat Recovery Inlet Temperature [C]', &
UnitarySystem(UnitarySysNum)%HeatRecoveryInletTemp,'System','Average',UnitarySystem(UnitarySysNum)%Name)
CALL SetupOutputVariable('Unitary System Heat Recovery Outlet Temperature [C]', &
UnitarySystem(UnitarySysNum)%HeatRecoveryOutletTemp,'System','Average',UnitarySystem(UnitarySysNum)%Name)
CALL SetupOutputVariable('Unitary System Heat Recovery Fluid Mass Flow Rate [kg/s]', &
UnitarySystem(UnitarySysNum)%HeatRecoveryMassFlowRate,'System','Average',UnitarySystem(UnitarySysNum)%Name)
CALL SetupOutputVariable('Unitary System Heat Recovery Energy [J]', &
UnitarySystem(UnitarySysNum)%HeatRecoveryEnergy,'System','Sum',UnitarySystem(UnitarySysNum)%Name)
END IF
CASE (Coil_CoolingAirToAirVariableSpeed, Coil_CoolingWaterToAirHPVSEquationFit, &
Coil_CoolingWaterToAirHPSimple, Coil_CoolingWaterToAirHP)
CALL SetupOutputVariable('Unitary System Requested Sensible Cooling Rate [W]', &
UnitarySystem(UnitarySysNum)%CoolingCoilSensDemand, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
CALL SetupOutputVariable('Unitary System Requested Latent Cooling Rate [W]', &
UnitarySystem(UnitarySysNum)%CoolingCoilLatentDemand, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
CASE DEFAULT
END SELECT
SELECT CASE(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num)
CASE(CoilDX_MultiSpeedHeating, Coil_HeatingElectric_MultiStage, Coil_HeatingGas_MultiStage)
! CALL SetupOutputVariable('Unitary System Heating Coil Cycling Ratio []', &
! UnitarySystem(UnitarySysNum)%HeatingCycRatio, &
! 'System','Average',UnitarySystem(UnitarySysNum)%Name)
! CALL SetupOutputVariable('Unitary System Heating Coil Speed Ratio []', &
! UnitarySystem(UnitarySysNum)%HeatingSpeedRatio, &
! 'System','Average',UnitarySystem(UnitarySysNum)%Name)
! CALL SetupOutputVariable('Unitary System Heating Coil Speed Level []', &
! UnitarySystem(UnitarySysNum)%HeatingSpeedNum, &
! 'System','Average',UnitarySystem(UnitarySysNum)%Name)
CASE (Coil_HeatingAirToAirVariableSpeed, Coil_HeatingWaterToAirHPVSEquationFit, &
Coil_HeatingWaterToAirHPSimple, Coil_HeatingWaterToAirHP)
CALL SetupOutputVariable('Unitary System Requested Heating Rate [W]', &
UnitarySystem(UnitarySysNum)%HeatingCoilSensDemand, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
CASE DEFAULT
END SELECT
IF(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_MultiSpeedCooling .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == CoilDX_MultiSpeedHeating .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingElectric_MultiStage .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingGas_MultiStage) THEN
CALL SetupOutputVariable('Unitary System DX Coil Cycling Ratio []',UnitarySystem(UnitarySysNum)%CycRatio, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
CALL SetupOutputVariable('Unitary System DX Coil Speed Ratio []',UnitarySystem(UnitarySysNum)%SpeedRatio, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
CALL SetupOutputVariable('Unitary System DX Coil Speed Level []',UnitarySystem(UnitarySysNum)%SpeedNum, &
'System','Average',UnitarySystem(UnitarySysNum)%Name)
END IF
IF (AnyEnergyManagementSystemInModel) THEN
CALL SetupEMSActuator('AirLoopHVAC:UnitarySystem', UnitarySystem(UnitarySysNum)%Name, &
'Autosized Supply Air Flow Rate', '[m3/s]', &
UnitarySystem(UnitarySysNum)%DesignFanVolFlowRateEMSOverrideOn, &
UnitarySystem(UnitarySysNum)%DesignFanVolFlowRateEMSOverrideValue )
CALL SetupEMSActuator('AirLoopHVAC:UnitarySystem', UnitarySystem(UnitarySysNum)%Name, &
'Autosized Supply Air Flow Rate During Cooling Operation', '[m3/s]', &
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlowEMSOverrideOn, &
UnitarySystem(UnitarySysNum)%MaxCoolAirVolFlowEMSOverrideValue )
CALL SetupEMSActuator('AirLoopHVAC:UnitarySystem', UnitarySystem(UnitarySysNum)%Name, &
'Autosized Supply Air Flow Rate During Heating Operation', '[m3/s]', &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlowEMSOverrideOn, &
UnitarySystem(UnitarySysNum)%MaxHeatAirVolFlowEMSOverrideValue )
CALL SetupEMSActuator('AirLoopHVAC:UnitarySystem', UnitarySystem(UnitarySysNum)%Name, &
'Autosized Supply Air Flow Rate During No Heating or Cooling Operation', '[m3/s]', &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlowEMSOverrideOn, &
UnitarySystem(UnitarySysNum)%MaxNoCoolHeatAirVolFlowEMSOverrideValue )
END IF
END DO
DEALLOCATE(Alphas)
DEALLOCATE(cAlphaFields)
DEALLOCATE(cNumericFields)
DEALLOCATE(Numbers)
DEALLOCATE(lAlphaBlanks)
DEALLOCATE(lNumericBlanks)
IF (AnyEnergyManagementSystemInModel) THEN
DO UnitarySysNum = 1, NumUnitarySystem
CALL SetupEMSInternalVariable('Unitary HVAC Design Heating Capacity', UnitarySystem(UnitarySysNum)%Name, '[W]', &
UnitarySystem(UnitarySysNum)%DesignHeatingCapacity )
CALL SetupEMSInternalVariable('Unitary HVAC Design Cooling Capacity', UnitarySystem(UnitarySysNum)%Name, '[W]', &
UnitarySystem(UnitarySysNum)%DesignCoolingCapacity )
CALL SetupEMSActuator('Unitary HVAC', UnitarySystem(UnitarySysNum)%Name, 'Sensible Load Request' , '[W]', &
UnitarySystem(UnitarySysNum)%EMSOverrideSensZoneLoadRequest, &
UnitarySystem(UnitarySysNum)%EMSSensibleZoneLoadValue )
CALL SetupEMSActuator('Unitary HVAC', UnitarySystem(UnitarySysNum)%Name, 'Moisture Load Request' , '[W]', &
UnitarySystem(UnitarySysNum)%EMSOverrideMoistZoneLoadRequest, &
UnitarySystem(UnitarySysNum)%EMSMoistureZoneLoadValue )
END DO
END IF
CALL ManageEMS(emsCALLFromComponentGetInput)
RETURN
END SUBROUTINE GetUnitarySystemInput