SUBROUTINE GetPTUnit
! SUBROUTINE INFORMATION:
! AUTHOR Richard Raustad
! DATE WRITTEN July 2005
! MODIFIED Chandan Sharma, FSEC, March 2011: Added ZoneHVAC sys avail manager
! Bereket Nigusse, FSEC, April 2011: added OA Mixer object type
! MODIFIED Bo Shen, ORNL, March 2012, added variable-speed water-source heat pump
! MODIFIED Bo Shen, July 2012, added variable-speed air-source heat pump
!
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Obtains input data for packaged terminal units and stores it in PTUnit data structures
! METHODOLOGY EMPLOYED:
! Uses "Get" routines to read in data.
! REFERENCES:
! na
! USE STATEMENTS:
USE Fans, ONLY: GetFanType, GetFanIndex, GetFanVolFlow, GetFanInletNode, GetFanOutletNode, GetFanAvailSchPtr
USE MixedAir, ONLY: GetOAMixerNodeNumbers
USE General, ONLY: TrimSigDigits, RoundSigDigits
USE DXCoils, ONLY: GetDXCoolCoilIndex=>GetDXCoilIndex, &
GetDXCoilInletNode=>GetCoilInletNode, GetDXCoilOutletNode=>GetCoilOutletNode, &
GetCoilCondenserInletNode
USE HVACHXAssistedCoolingCoil, ONLY: GetHXDXCoilName, GetHXDXCoilInletNode=>GetCoilInletNode, &
GetHXDXCoilOutletNode=>GetCoilOutletNode
USE HeatingCoils, ONLY: GetHeatingCoilIndex=>GetCoilIndex, HeatingCoil, SimulateHeatingCoilComponents, &
GetHeatingCoilInletNode=>GetCoilInletNode, GetHeatingCoilOutletNode=>GetCoilOutletNode, &
GetHeatingCoilCapacity=>GetCoilCapacity, GetHeatingCoilTypeNum
USE SteamCoils, ONLY: GetSteamCoilAirInletNode=>GetCoilAirInletNode, GetSteamCoilIndex, &
GetSteamCoilAirOutletNode=>GetCoilAirOutletNode, &
GetSteamCoilSteamInletNode=>GetCoilSteamInletNode, &
GetCoilMaxSteamFlowRate=>GetCoilMaxSteamFlowRate, GetTypeOfCoil, ZoneLoadControl
USE WaterCoils, ONLY: GetCoilWaterInletNode, GetCoilMaxWaterFlowRate, &
GetWaterCoilInletNode=>GetCoilInletNode,GetWaterCoilOutletNode=>GetCoilOutletNode
USE InputProcessor, ONLY: GetNumObjectsFound, GetObjectItem, VerifyName, SameString, GetObjectDefMaxArgs
USE NodeInputManager, ONLY: GetOnlySingleNode
USE BranchNodeConnections, ONLY: SetUpCompSets
USE FluidProperties, ONLY: GetSatDensityRefrig
USE WaterToAirHeatPump, ONLY: GetWtoAHPCoilCapacity=>GetCoilCapacity, &
GetWtoAHPCoilInletNode=>GetCoilInletNode, &
GetWtoAHPCoilOutletNode=>GetCoilOutletNode,GetWtoAHPCoilIndex=>GetCoilIndex
USE WaterToAirHeatPumpSimple, ONLY: GetWtoAHPSimpleCoilCapacity=>GetCoilCapacity, &
GetWtoAHPSimpleCoilInletNode=>GetCoilInletNode, &
GetWtoAHPSimpleCoilOutletNode=>GetCoilOutletNode,GetWtoAHPSimpleCoilIndex=>GetCoilIndex, &
SetSimpleWSHPData
USE VariableSpeedCoils, ONLY: GetCoilCapacityVariableSpeed, &
GetCoilInletNodeVariableSpeed, &
GetCoilOutletNodeVariableSpeed, &
GetCoilIndexVariableSpeed, &
SetVarSpeedCoilData, GetVSCoilCondenserInletNode
USE OutAirNodeManager, ONLY: CheckOutAirNodeNumber
USE DataZoneEquipment, ONLY: ZoneEquipConfig, PkgTermHPAirToAir_Num, PkgTermHPWaterToAir_Num, PkgTermACAirToAir_Num
USE DataHVACGlobals, ONLY: WaterCycling, WaterConstant, WaterConstantOnDemand
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName='GetPTUnit: ' ! include trailing blank space
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: PTUnitIndex ! loop index
INTEGER :: PTUnitNum ! current packaged terminal unit number
CHARACTER(len=MaxNameLength), &
ALLOCATABLE, DIMENSION(:) :: Alphas ! Alpha items for object
REAL(r64), ALLOCATABLE, DIMENSION(:) :: Numbers ! Numeric items for object
INTEGER, DIMENSION(4) :: OANodeNums ! Node numbers of OA mixer (OA, EA, RA, MA)
INTEGER :: FanInletNodeNum ! Fan inlet node number
INTEGER :: FanOutletNodeNum ! Fan outlet node number
INTEGER :: SuppHeatInletNodeNum !Supplemental heating coil inlet node number
INTEGER :: SuppHeatOutletNodeNum !Supplemental heating coil outlet node number
INTEGER :: CoolCoilInletNodeNum ! cooling coil inlet node number
INTEGER :: CoolCoilOutletNodeNum ! cooling coil outlet node number
CHARACTER(len=MaxNameLength) :: ACHeatCoilName ! name of heating coil
INTEGER :: HeatCoilInletNodeNum ! heating coil inlet node number
INTEGER :: HeatCoilOutletNodeNum ! heating coil outlet node number
INTEGER :: SuppHeatHWInletNodeNum !Supplemental heating coil Hot Water inlet node number
INTEGER :: SuppHeatHWOutletNodeNum !Supplemental heating coil Hot Water outlet node number
CHARACTER(len=MaxNameLength) :: CompSetFanInlet, CompSetCoolInlet, CompSetFanOutlet, CompSetCoolOutlet
CHARACTER(len=MaxNameLength) :: CompSetHeatInlet, CompSetHeatOutlet, CompSetSupHeatInlet, CompSetSupHeatOutlet
INTEGER :: NumAlphas ! Number of Alphas for each GetObjectItem call
INTEGER :: NumNumbers ! Number of Numbers for each GetObjectItem call
INTEGER :: MaxAlphas ! Maximum number of alpha fields in all objects
INTEGER :: MaxNumbers ! Maximum number of numeric fields in all objects
INTEGER :: NumFields ! Total number of fields in object
INTEGER :: IOStatus ! Used in GetObjectItem
LOGICAL :: ErrorsFound=.FALSE. ! Set to true if errors in input, fatal at end of routine
LOGICAL :: IsNotOK ! Flag to verify name
LOGICAL :: IsBlank ! Flag for blank name
CHARACTER(len=MaxNameLength) :: CurrentModuleObject ! Object type for getting and error messages
LOGICAL :: ErrFlag = .FALSE. ! Error flag returned during CALL to mining functions
REAL(r64) :: FanVolFlow ! maximum supply air volumetric flow rate of fan
INTEGER :: TempNodeNum ! dummy variable to set up HW coil water inlet node
INTEGER :: SteamIndex ! dummy variable to set up steam coil steam inlet density
CHARACTER(len=MaxNameLength) :: SuppHeatCoilType ! type of supplemental heating coil
CHARACTER(len=MaxNameLength) :: SuppHeatCoilName ! name of supplemental heating coil
INTEGER :: CtrlZone ! index to loop counter
INTEGER :: NodeNum ! index to loop counter
LOGICAL :: ZoneNodeNotFound ! used in error checking
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cAlphaFields ! Alpha field names
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cNumericFields ! Numeric field names
LOGICAL, ALLOCATABLE, DIMENSION(:) :: lAlphaBlanks ! Logical array, alpha field input BLANK = .true.
LOGICAL, ALLOCATABLE, DIMENSION(:) :: lNumericBlanks ! Logical array, numeric field input BLANK = .true.
MaxNumbers = 0
MaxAlphas = 0
! find the number of each type of packaged terminal unit
CurrentModuleObject = 'ZoneHVAC:PackagedTerminalHeatPump'
NumPTHP = GetNumObjectsFound(CurrentModuleObject)
CALL GetObjectDefMaxArgs(CurrentModuleObject,NumFields,NumAlphas,NumNumbers)
MaxNumbers=MAX(MaxNumbers,NumNumbers)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
CurrentModuleObject = 'ZoneHVAC:PackagedTerminalAirConditioner'
NumPTAC = GetNumObjectsFound(CurrentModuleObject)
CALL GetObjectDefMaxArgs(CurrentModuleObject,NumFields,NumAlphas,NumNumbers)
MaxNumbers=MAX(MaxNumbers,NumNumbers)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
CurrentModuleObject = 'ZoneHVAC:WaterToAirHeatPump'
NumPTWSHP = GetNumObjectsFound(CurrentModuleObject)
CALL GetObjectDefMaxArgs(CurrentModuleObject,NumFields,NumAlphas,NumNumbers)
MaxNumbers=MAX(MaxNumbers,NumNumbers)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
ALLOCATE(Alphas(MaxAlphas))
Alphas=' '
ALLOCATE(Numbers(MaxNumbers))
Numbers=0.0d0
ALLOCATE(cAlphaFields(MaxAlphas))
cAlphaFields=' '
ALLOCATE(cNumericFields(MaxNumbers))
cNumericFields=' '
ALLOCATE(lAlphaBlanks(MaxAlphas))
lAlphaBlanks=.TRUE.
ALLOCATE(lNumericBlanks(MaxNumbers))
lNumericBlanks=.TRUE.
NumPTUs = NumPTHP + NumPTAC + NumPTWSHP
! allocate the data structures
IF (NumPTUs .GT. 0) THEN
ALLOCATE(PTUnit(NumPTUs))
ALLOCATE(CheckEquipName(NumPTUs))
ENDIF
CheckEquipName=.true.
! loop over PTHP units; get and load the input data
DO PTUnitIndex = 1,NumPTHP
FanInletNodeNum = 0
FanOutletNodeNum = 0
SuppHeatInletNodeNum = 0
SuppHeatOutletNodeNum = 0
CoolCoilInletNodeNum = 0
CoolCoilOutletNodeNum = 0
HeatCoilInletNodeNum = 0
HeatCoilOutletNodeNum = 0
SuppHeatHWInletNodeNum = 0
SuppHeatHWOutletNodeNum = 0
OANodeNums = 0
CurrentModuleObject = 'ZoneHVAC:PackagedTerminalHeatPump'
CALL GetObjectItem(CurrentModuleObject,PTUnitIndex,Alphas,NumAlphas,Numbers,NumNumbers,IOStatus, &
NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields)
PTUnitNum = PTUnitIndex
IsNotOK=.FALSE.
IsBlank=.FALSE.
CALL VerifyName(Alphas(1),PTUnit%Name,PTUnitNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
PTUnit(PTUnitNum)%PTObjectIndex = PTUnitIndex
IF (IsNotOK) THEN
ErrorsFound=.TRUE.
IF (IsBlank) Alphas(1)='xxxxx'
ENDIF
PTUnit(PTUnitNum)%Name = Alphas(1)
PTUnit(PTUnitNum)%UnitType = CurrentModuleObject
PTUnit(PTUnitNum)%UnitType_Num = PTHPUnit
PTUnit(PTUnitNum)%ZoneEquipType = PkgTermHPAirToAir_Num
IF (lAlphaBlanks(2)) THEN
PTUnit(PTUnitNum)%SchedPtr = ScheduleAlwaysOn
ELSE
PTUnit(PTUnitNum)%SchedPtr = GetScheduleIndex(Alphas(2)) ! convert schedule name to pointer (index number)
IF (PTUnit(PTUnitNum)%SchedPtr .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'" invalid data.')
CALL ShowContinueError('invalid-not found '//TRIM(cAlphaFields(2))//'="'//TRIM(Alphas(2))//'".')
ErrorsFound=.TRUE.
ENDIF
END IF
PTUnit(PTUnitNum)%AirInNode = &
GetOnlySingleNode(Alphas(3),ErrorsFound,TRIM(CurrentModuleObject),Alphas(1), &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsParent)
PTUnit(PTUnitNum)%AirOutNode = &
GetOnlySingleNode(Alphas(4),ErrorsFound,TRIM(CurrentModuleObject),Alphas(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsParent)
PTUnit(PTUnitNum)%OAMixType = Alphas(5)
PTUnit(PTUnitNum)%OAMixName = Alphas(6)
ErrFlag = .false.
CALL ValidateComponent(PTUnit(PTUnitNum)%OAMixType,PTUnit(PTUnitNum)%OAMixName,ErrFlag,TRIM(CurrentModuleObject))
IF (ErrFlag) THEN
CALL ShowContinueError('specified in '//TRIM(CurrentModuleObject)//' = "'//TRIM(PTUnit(PTUnitNum)%Name)//'".')
ErrorsFound = .TRUE.
ELSE
! OANodeNums = outside air mixer node numbers, OANodeNums(4) = outside air mixer mixed air node
OANodeNums = GetOAMixerNodeNumbers(PTUnit(PTUnitNum)%OAMixName, ErrFlag)
IF(ErrFlag) THEN
CALL ShowContinueError('that was specified in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
CALL ShowContinueError('..OutdoorAir:Mixer is required. Enter an OutdoorAir:Mixer object with this name.')
ErrorsFound=.true.
ELSE
! Set connection type to 'Inlet', because this is not necessarily directly come from
! outside air. Outside Air Inlet Node List will set the connection to outside air
PTUnit(PTUnitNum)%OutsideAirNode = OANodeNums(1)
PTUnit(PTUnitNum)%AirReliefNode = OANodeNums(2)
ENDIF
ENDIF
PTUnit(PTUnitNum)%MaxCoolAirVolFlow = Numbers(1)
IF (PTUnit(PTUnitNum)%MaxCoolAirVolFlow .LE. 0 .AND. PTUnit(PTUnitNum)%MaxCoolAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cNumericFields(1))//' = ' &
//TRIM(TrimSigDigits(Numbers(1),7)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%MaxHeatAirVolFlow = Numbers(2)
IF (PTUnit(PTUnitNum)%MaxHeatAirVolFlow .LE. 0 .AND. PTUnit(PTUnitNum)%MaxHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cNumericFields(2))//' = ' &
//TRIM(TrimSigDigits(Numbers(2),7)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow = Numbers(3)
IF (PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow .LT. 0 .AND. PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cNumericFields(3))//' = ' &
//TRIM(TrimSigDigits(Numbers(3),7)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%CoolOutAirVolFlow = Numbers(4)
IF (PTUnit(PTUnitNum)%CoolOutAirVolFlow .LT. 0 .AND. PTUnit(PTUnitNum)%CoolOutAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cNumericFields(4))//' = ' &
//TRIM(TrimSigDigits(Numbers(4),7)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
! only check that SA flow in cooling is >= OA flow in cooling when either or both are not autosized
IF (PTUnit(PTUnitNum)%CoolOutAirVolFlow .GT. PTUnit(PTUnitNum)%MaxCoolAirVolFlow .AND. &
PTUnit(PTUnitNum)%CoolOutAirVolFlow .NE. AutoSize .AND. PTUnit(PTUnitNum)%MaxCoolAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' '//TRIM(cNumericFields(4))//' cannot be greater than '// &
TRIM(cNumericFields(1)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%HeatOutAirVolFlow = Numbers(5)
IF (PTUnit(PTUnitNum)%HeatOutAirVolFlow .LT. 0 .AND. PTUnit(PTUnitNum)%HeatOutAirVolFlow.NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cNumericFields(5))//' = ' &
//TRIM(TrimSigDigits(Numbers(5),7)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
! only check that SA flow in heating is >= OA flow in heating when either or both are not autosized
IF (PTUnit(PTUnitNum)%HeatOutAirVolFlow .GT. PTUnit(PTUnitNum)%MaxHeatAirVolFlow .AND. &
PTUnit(PTUnitNum)%HeatOutAirVolFlow .NE. AutoSize .AND. PTUnit(PTUnitNum)%MaxHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' '//TRIM(cNumericFields(5))//' cannot be greater than '// &
TRIM(cNumericFields(2)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%NoCoolHeatOutAirVolFlow = Numbers(6)
IF (PTUnit(PTUnitNum)%NoCoolHeatOutAirVolFlow .LT. 0 .AND. PTUnit(PTUnitNum)%NoCoolHeatOutAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cNumericFields(6))//' = ' &
//TRIM(TrimSigDigits(Numbers(6),7)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
! only check that SA flow when compressor is OFF is >= OA flow when compressor is OFF after fan mode is read in
PTUnit(PTUnitNum)%FanType = Alphas(7)
PTUnit(PTUnitNum)%FanName = Alphas(8)
ErrFlag = .FALSE.
CALL GetFanType(PTUnit(PTUnitNum)%FanName,PTUnit(PTUnitNum)%FanType_Num,ErrFlag,CurrentModuleObject,PTUnit(PTUnitNum)%Name)
FanVolFlow = 0.d0
IF(ErrFlag)THEN
CALL ShowContinueError('specified in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
ELSE
CALL GetFanIndex(PTUnit(PTUnitNum)%FanName,PTUnit(PTUnitNum)%FanIndex,ErrFlag,CurrentModuleObject)
FanInletNodeNum = GetFanInletNode(PTUnit(PTUnitNum)%FanType,PTUnit(PTUnitNum)%FanName,ErrFlag)
FanOutletNodeNum = GetFanOutletNode(PTUnit(PTUnitNum)%FanType,PTUnit(PTUnitNum)%FanName,ErrFlag)
CALL GetFanVolFlow(PTUnit(PTUnitNum)%FanIndex,FanVolFlow)
PTUnit(PTUnitNum)%ActualFanVolFlowRate = FanVolFlow
! Get the fan's availability schedule
PTUnit(PTUnitNum)%FanAvailSchedPtr = GetFanAvailSchPtr(PTUnit(PTUnitNum)%FanType,PTUnit(PTUnitNum)%FanName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound=.TRUE.
ENDIF
ENDIF
IF(FanVolFlow .NE. AutoSize)THEN
IF(FanVolFlow .LT. MAX(PTUnit(PTUnitNum)%MaxCoolAirVolFlow, &
PTUnit(PTUnitNum)%MaxHeatAirVolFlow, &
PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow))THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'", invalid air flow rate')
CALL ShowContinueError('air flow rate = '//TRIM(TrimSigDigits(FanVolFlow,7))// &
' in fan object '//TRIM(PTUnit(PTUnitNum)%FanName)//' is less than the maximum PTHP supply air flow rate.')
CALL ShowContinueError(' The fan flow rate must be greater than the PTHP maximum supply air flow rate.')
ErrorsFound = .TRUE.
END IF
END IF
PTUnit(PTUnitNum)%DXHeatCoilName = Alphas(10)
IF(SameString(Alphas(9),'Coil:Heating:DX:SingleSpeed')) THEN
PTUnit(PTUnitNum)%DXHeatCoilType = Alphas(9)
! PTUnit(PTUnitNum)%DXHeatCoilType_Num = CoilDX_HeatingEmpirical
ErrFlag = .FALSE.
CALL GetDXCoolCoilIndex(PTUnit(PTUnitNum)%DXHeatCoilName,PTUnit(PTUnitNum)%DXHeatCoilIndexNum, &
ErrFlag, PTUnit(PTUnitNum)%DXHeatCoilType)
HeatCoilInletNodeNum = GetDXCoilInletNode(PTUnit(PTUnitNum)%DXHeatCoilType,PTUnit(PTUnitNum)%DXHeatCoilName,ErrFlag)
HeatCoilOutletNodeNum = GetDXCoilOutletNode(PTUnit(PTUnitNum)%DXHeatCoilType,PTUnit(PTUnitNum)%DXHeatCoilName,ErrFlag)
IF(ErrFlag)CALL ShowContinueError('...occurs in '//TRIM(PTUnit(PTUnitNum)%UnitType)// &
' "'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
ELSE IF (SameString(Alphas(9),'COIL:HEATING:DX:VARIABLESPEED' ))THEN
PTUnit(PTUnitNum)%DXHeatCoilType = Alphas(9)
PTUnit(PTUnitNum)%DXHeatCoilType_Num = Coil_HeatingAirToAirVariableSpeed
PTUnit(PTUnitNum)%DXHeatCoilName = Alphas(10)
CALL ValidateComponent(PTUnit(PTUnitNum)%DXHeatCoilType,PTUnit(PTUnitNum)%DXHeatCoilName,IsNotOK, &
TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
ELSE
ErrFlag = .FALSE.
PTUnit(PTUnitNum)%DXHeatCoilIndex = GetCoilIndexVariableSpeed(PTUnit(PTUnitNum)%DXHeatCoilType, &
PTUnit(PTUnitNum)%DXHeatCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
END IF
HeatCoilInletNodeNum=GetCoilInletNodeVariableSpeed(PTUnit(PTUnitNum)%DXHeatCoilType, &
PTUnit(PTUnitNum)%DXHeatCoilName,ErrFlag)
HeatCoilOutletNodeNum=GetCoilOutletNodeVariableSpeed(PTUnit(PTUnitNum)%DXHeatCoilType, &
PTUnit(PTUnitNum)%DXHeatCoilName,ErrFlag)
ENDIF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'", invalid field')
CALL ShowContinueError(' illegal '//TRIM(cAlphaFields(9))//' = '//TRIM(Alphas(9)))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%HeatConvergenceTol = Numbers(7)
PTUnit(PTUnitNum)%MinOATCompressor = Numbers(8)
PTUnit(PTUnitNum)%DXCoolCoilName = Alphas(12)
PTUnit(PTUnitNum)%CoolConvergenceTol = Numbers(9)
IF(SameString(Alphas(11),'Coil:Cooling:DX:SingleSpeed') .OR. &
SameString(Alphas(11),'CoilSystem:Cooling:DX:HeatExchangerAssisted')) THEN
PTUnit(PTUnitNum)%DXCoolCoilType = Alphas(11)
IF (SameString(Alphas(11),'Coil:Cooling:DX:SingleSpeed')) THEN
PTUnit(PTUnitNum)%DXCoolCoilType_Num = CoilDX_CoolingSingleSpeed
ErrFlag = .FALSE.
CALL GetDXCoolCoilIndex(PTUnit(PTUnitNum)%DXCoolCoilName,PTUnit(PTUnitNum)%DXCoolCoilIndexNum, &
ErrFlag, PTUnit(PTUnitNum)%DXCoolCoilType)
CoolCoilInletNodeNum = GetDXCoilInletNode(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
CoolCoilOutletNodeNum = GetDXCoilOutletNode(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
PTUnit(PTUnitNum)%CondenserNodeNum = &
GetCoilCondenserInletNode(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
IF(ErrFlag)CALL ShowContinueError('...occurs in '//TRIM(PTUnit(PTUnitNum)%UnitType)// &
' "'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
ELSEIF (SameString(Alphas(11),'CoilSystem:Cooling:DX:HeatExchangerAssisted')) THEN
PTUnit(PTUnitNum)%DXCoolCoilType_Num = CoilDX_CoolingHXAssisted
ErrFlag = .FALSE.
CALL GetDXCoolCoilIndex( &
GetHXDXCoilName(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag), &
PTUnit(PTUnitNum)%DXCoolCoilIndexNum, ErrFlag, 'Coil:Cooling:DX:SingleSpeed')
CoolCoilInletNodeNum = GetHXDXCoilInletNode(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
CoolCoilOutletNodeNum = GetHXDXCoilOutletNode(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
PTUnit(PTUnitNum)%CondenserNodeNum = GetCoilCondenserInletNode('Coil:Cooling:DX:SingleSpeed', &
GetHXDXCoilName(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag),ErrFlag)
IF(ErrFlag)CALL ShowContinueError('...occurs in '//TRIM(PTUnit(PTUnitNum)%UnitType)// &
' "'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
END IF
ELSE IF (SameString(Alphas(11), 'COIL:COOLING:DX:VARIABLESPEED') )THEN
PTUnit(PTUnitNum)%DXCoolCoilType = Alphas(11)
PTUnit(PTUnitNum)%DXCoolCoilType_Num = Coil_CoolingAirToAirVariableSpeed
PTUnit(PTUnitNum)%DXCoolCoilName = Alphas(12)
CALL ValidateComponent(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,IsNotOK, &
TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
ELSE
ErrFlag = .FALSE.
PTUnit(PTUnitNum)%DXCoolCoilIndexNum = GetCoilIndexVariableSpeed(PTUnit(PTUnitNum)%DXCoolCoilType, &
PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
END IF
CoolCoilInletNodeNum=GetCoilInletNodeVariableSpeed(PTUnit(PTUnitNum)%DXCoolCoilType, &
PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
CoolCoilOutletNodeNum=GetCoilOutletNodeVariableSpeed(PTUnit(PTUnitNum)%DXCoolCoilType, &
PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
PTUnit(PTUnitNum)%CondenserNodeNum = GetVSCoilCondenserInletNode(PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
IF(ErrFlag)CALL ShowContinueError('...occurs in '//TRIM(PTUnit(PTUnitNum)%UnitType)// &
' "'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
ENDIF
ELSE
CALL ShowWarningError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cAlphaFields(11))//' = '//TRIM(Alphas(11)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
IF (Alphas(9) == 'COIL:HEATING:DX:VARIABLESPEED' .AND. &
Alphas(11) == 'COIL:COOLING:DX:VARIABLESPEED') THEN
IF(PTUnit(PTUnitNum)%DXHeatCoilIndex .GT. 0 .AND. PTUnit(PTUnitNum)%DXCoolCoilIndexNum .GT. 0)THEN
CALL SetVarSpeedCoilData(PTUnit(PTUnitNum)%DXCoolCoilIndexNum,ErrorsFound, &
CompanionHeatingCoilNum=PTUnit(PTUnitNum)%DXHeatCoilIndex)
END IF
END IF
SuppHeatCoilType = Alphas(13)
SuppHeatCoilName = Alphas(14)
PTUnit(PTUnitNum)%SuppHeatCoilName = SuppHeatCoilName
IF (SameString(Alphas(13),'Coil:Heating:Gas') .OR. &
SameString(Alphas(13),'Coil:Heating:Electric') .OR. &
SameString(Alphas(13),'Coil:Heating:Water') .OR. &
SameString(Alphas(13),'Coil:Heating:Steam')) THEN
PTUnit(PTUnitNum)%SuppHeatCoilType=SuppHeatCoilType
IF (SameString(Alphas(13),'Coil:Heating:Gas') .OR. SameString(Alphas(13),'Coil:Heating:Electric')) THEN
IF (SameString(Alphas(13),'Coil:Heating:Gas')) THEN
PTUnit(PTUnitNum)%SuppHeatCoilType_Num = Coil_HeatingGas
ELSEIF (SameString(Alphas(13),'Coil:Heating:Electric')) THEN
PTUnit(PTUnitNum)%SuppHeatCoilType_Num = Coil_HeatingElectric
ENDIF
ErrFlag = .FALSE.
CALL ValidateComponent(SuppHeatCoilType,SuppHeatCoilName,ErrFlag, &
TRIM(CurrentModuleObject))
IF (ErrFlag) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'".')
ErrorsFound=.TRUE.
ELSE
CALL GetHeatingCoilIndex(SuppHeatCoilName,PTUnit(PTUnitNum)%SuppHeatCoilIndex,ErrFlag)
! Get the Supplemental Heating Coil Node Numbers
SuppHeatInletNodeNum = &
GetHeatingCoilInletNode(SuppHeatCoilType,SuppHeatCoilName,ErrFlag)
SuppHeatOutletNodeNum = &
GetHeatingCoilOutletNode(SuppHeatCoilType,SuppHeatCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'".')
ErrorsFound=.TRUE.
ENDIF
ENDIF
ELSEIF (SameString(Alphas(13),'Coil:Heating:Water')) THEN
PTUnit(PTUnitNum)%SuppHeatCoilType_Num = Coil_HeatingWater
ErrFlag = .FALSE.
SuppHeatHWInletNodeNum = GetCoilWaterInletNode(SuppHeatCoilType,PTUnit(PTUnitNum)%SuppHeatCoilName,ErrFlag)
PTUnit(PTUnitNum)%HotWaterControlNode = SuppHeatHWInletNodeNum
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%MaxSuppCoilFluidFlow = GetCoilMaxWaterFlowRate(SuppHeatCoilType, &
PTUnit(PTUnitNum)%SuppHeatCoilName,ErrFlag)
IF(PTUnit(PTUnitNum)%MaxSuppCoilFluidFlow .GT. 0.0d0)THEN
PTUnit(PTUnitNum)%MaxSuppCoilFluidFlow = GetCoilMaxWaterFlowRate(SuppHeatCoilType, &
PTUnit(PTUnitNum)%SuppHeatCoilName,ErrFlag)
END IF
ErrFlag = .FALSE.
SuppHeatInletNodeNum = GetWaterCoilInletNode('Coil:Heating:Water',PTUnit(PTUnitNum)%SuppHeatCoilName,ErrFlag)
PTUnit(PTUnitNum)%SupCoilAirInletNode = SuppHeatInletNodeNum
SuppHeatOutletNodeNum = GetWaterCoilOutletNode('Coil:Heating:Water', &
PTUnit(PTUnitNum)%SuppHeatCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
ELSEIF (SameString(Alphas(13),'Coil:Heating:Steam')) THEN
PTUnit(PTUnitNum)%SuppHeatCoilType_Num = Coil_HeatingSteam
ErrFlag = .FALSE.
PTUnit(PTUnitNum)%SuppHeatCoilIndex = GetSTeamCoilIndex(SuppHeatCoilType,PTUnit(PTUnitNum)%SuppHeatCoilName,ErrFlag)
IF (PTUnit(PTUnitNum)%SuppHeatCoilIndex .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cAlphaFields(14))//' = ' &
//TRIM(PTUnit(PTUnitNum)%SuppHeatCoilName))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
!IF(ErrFlag)CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrFlag = .FALSE.
SuppHeatHWInletNodeNum = GetSteamCoilSteamInletNode(SuppHeatCoilType,PTUnit(PTUnitNum)%SuppHeatCoilName,ErrFlag)
PTUnit(PTUnitNum)%HWCoilSteamInletNode = SuppHeatHWInletNodeNum
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%MaxSuppCoilFluidFlow = GetCoilMaxSteamFlowRate(PTUnit(PTUnitNum)%SuppHeatCoilIndex,ErrFlag)
IF(PTUnit(PTUnitNum)%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,'GetPackagedTerminalHeatPumpInput')
PTUnit(PTUnitNum)%MaxSuppCoilFluidFlow = &
GetCoilMaxSteamFlowRate(PTUnit(PTUnitNum)%SuppHeatCoilIndex,ErrFlag) * SteamDensity
END IF
ErrFlag = .FALSE.
SuppHeatInletNodeNum = &
GetSteamCoilAirInletNode(PTUnit(PTUnitNum)%SuppHeatCoilIndex,PTUnit(PTUnitNum)%SuppHeatCoilName,ErrFlag)
PTUnit(PTUnitNum)%SupCoilAirInletNode = SuppHeatInletNodeNum
SuppHeatOutletNodeNum = GetSteamCoilAirOutletNode(SuppHeatCoilType,PTUnit(PTUnitNum)%SuppHeatCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cAlphaFields(13))//' = '//TRIM(Alphas(13)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%MaxSATSupHeat = Numbers(10)
PTUnit(PTUnitNum)%MaxOATSupHeat = Numbers(11)
IF(PTUnit(PTUnitNum)%MaxOATSupHeat .GT. 21.0d0) THEN
CALL ShowWarningError(TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name)//&
': '//TRIM(cNumericFields(11))//' should be <= to 21.')
CALL ShowContinueError('...'//TRIM(cNumericFields(11))//' = '//TRIM(TrimSigDigits(Numbers(11),1)))
END IF
IF (SameString(Alphas(15),'BlowThrough')) PTUnit(PTUnitNum)%FanPlace = BlowThru
IF (SameString(Alphas(15),'DrawThrough')) PTUnit(PTUnitNum)%FanPlace = DrawThru
IF (PTUnit(PTUnitNum)%FanPlace .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cAlphaFields(15))//' = '//TRIM(Alphas(15)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
! Check component placement
IF (PTUnit(PTUnitNum)%FanPlace == BlowThru) THEN
! PTUnit inlet node must be the same as a zone exhaust node and the OA Mixer return node
! check that PTUnit inlet node is a zone exhaust node.
ZoneNodeNotFound = .TRUE.
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO NodeNum = 1,ZoneEquipConfig(CtrlZone)%NumExhaustNodes
IF (PTUnit(PTUnitNum)%AirInNode .EQ. ZoneEquipConfig(CtrlZone)%ExhaustNode(NodeNum)) THEN
ZoneNodeNotFound = .FALSE.
EXIT
END IF
END DO
END DO
IF(ZoneNodeNotFound)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Heat Pumps air inlet node name must be the same as a zone exhaust node name.')
CALL ShowContinueError('..Zone exhaust node name is specified in ZoneHVAC:EquipmentConnections object.')
CALL ShowContinueError('..Heat pumps inlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirInNode)))
ErrorsFound=.TRUE.
END IF
! check OA Mixer return node
IF(PTUnit(PTUnitNum)%AirInNode /= OANodeNums(3))THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" PTUnit air inlet node name must be the same as the OutdoorAir:Mixer return air node name.')
CALL ShowContinueError('..PTUnit air inlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirInNode)))
CALL ShowContinueError('..OutdoorAir:Mixer return air node name = '//TRIM(NodeID(OANodeNums(3))))
ErrorsFound=.TRUE.
END IF
! Fan inlet node name must be the same as the heat pump's OA mixer mixed air node name
IF (OANodeNums(4) /= FanInletNodeNum) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Fan inlet node name must be the same as the heat pumps')
CALL ShowContinueError('OutdoorAir:Mixer mixed air node name when blow through '// &
TRIM(cAlphaFields(15))//' is specified.')
CALL ShowContinueError('..Fan inlet node name = '//TRIM(NodeID(FanInletNodeNum)))
CALL ShowContinueError('..OutdoorAir:Mixer mixed air node name = '//TRIM(NodeID(OANodeNums(4))))
ErrorsFound=.TRUE.
END IF
IF(CoolCoilInletNodeNum /= FanOutletNodeNum)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Fan outlet node name must be the same as the cooling coil')
CALL ShowContinueError(' inlet node name when blow through '//TRIM(cAlphaFields(15))//' is specified.')
CALL ShowContinueError('..Fan outlet node name = '//TRIM(NodeID(FanOutletNodeNum)))
CALL ShowContinueError('..Cooling coil inlet node name = '//TRIM(NodeID(CoolCoilInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF(CoolCoilOutletNodeNum /= HeatCoilInletNodeNum)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" 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(CoolCoilOutletNodeNum)))
CALL ShowContinueError('..Heating coil inlet node name = '//TRIM(NodeID(HeatCoilInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF(HeatCoilOutletNodeNum /= SuppHeatInletNodeNum)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Heating coil outlet node name must be the same as the supplemental heating coil inlet')
CALL ShowContinueError(' node name when blow through '//TRIM(cAlphaFields(14))//' is specified.')
CALL ShowContinueError('..Heating coil outlet node name = '//TRIM(NodeID(HeatCoilOutletNodeNum)))
CALL ShowContinueError('..Supplemental heating coil inlet node name = '//TRIM(NodeID(SuppHeatInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF(SuppHeatOutletNodeNum /= PTUnit(PTUnitNum)%AirOutNode)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Supplemental heating coil outlet node name must be the same as the heat pumps outlet node name.')
CALL ShowContinueError('..Supplemental heating coil outlet node name = '//TRIM(NodeID(SuppHeatOutletNodeNum)))
CALL ShowContinueError('..Heat pumps outlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirOutNode)))
ErrorsFound=.TRUE.
END IF
! check that PTUnit outlet node is a zone inlet node.
ZoneNodeNotFound = .TRUE.
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO NodeNum = 1,ZoneEquipConfig(CtrlZone)%NumInletNodes
IF (PTUnit(PTUnitNum)%AirOutNode .EQ. ZoneEquipConfig(CtrlZone)%InletNode(NodeNum)) THEN
ZoneNodeNotFound = .FALSE.
EXIT
END IF
END DO
END DO
IF(ZoneNodeNotFound)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Heat Pumps air outlet node name must be the same as a zone inlet node name.')
CALL ShowContinueError('..Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object.')
CALL ShowContinueError('..Heat pumps outlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirOutNode)))
ErrorsFound=.TRUE.
END IF
ELSE ! draw through fan from IF (PTUnit(PTUnitNum)%FanPlace == BlowThru) THEN
! check that PTUnit inlet node is a zone exhaust node.
ZoneNodeNotFound = .TRUE.
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO NodeNum = 1,ZoneEquipConfig(CtrlZone)%NumExhaustNodes
IF (PTUnit(PTUnitNum)%AirInNode .EQ. ZoneEquipConfig(CtrlZone)%ExhaustNode(NodeNum)) THEN
ZoneNodeNotFound = .FALSE.
EXIT
END IF
END DO
END DO
IF(ZoneNodeNotFound)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Heat Pumps air inlet node name must be the same as a zone exhaust node name.')
CALL ShowContinueError('..Zone exhaust node name is specified in ZoneHVAC:EquipmentConnections object.')
CALL ShowContinueError('..Heat pumps inlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirInNode)))
ErrorsFound=.TRUE.
END IF
! check OA Mixer return node
IF(PTUnit(PTUnitNum)%AirInNode /= OANodeNums(3))THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" PTUnit air inlet node name must be the same as the OutdoorAir:Mixer return air node name.')
CALL ShowContinueError('..PTUnit air inlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirInNode)))
CALL ShowContinueError('..OutdoorAir:Mixer return air node name = '//TRIM(NodeID(OANodeNums(3))))
ErrorsFound=.TRUE.
END IF
! Fan outlet node name must be the same as the supplemental heating coil inlet node name
IF(CoolCoilInletNodeNum /= OANodeNums(4))THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" OutdoorAir:Mixer mixed air node name must be the same as the cooling coil')
CALL ShowContinueError(' inlet node name when draw through '//TRIM(cAlphaFields(15))//' is specified.')
CALL ShowContinueError('..OutdoorAir:Mixer mixed air name = '//TRIM(NodeID(OANodeNums(4))))
CALL ShowContinueError('..Cooling coil inlet node name = '//TRIM(NodeID(CoolCoilInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF(CoolCoilOutletNodeNum /= HeatCoilInletNodeNum)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" 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(CoolCoilOutletNodeNum)))
CALL ShowContinueError('..Heating coil inlet node name = '//TRIM(NodeID(HeatCoilInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF(HeatCoilOutletNodeNum /= FanInletNodeNum)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Heating coil outlet node name must be the same as the fan inlet node name')
CALL ShowContinueError(' when draw through '//TRIM(cAlphaFields(15))//' is specified.')
CALL ShowContinueError('..Heating coil outlet node name = '//TRIM(NodeID(HeatCoilOutletNodeNum)))
CALL ShowContinueError('..Fan inlet node name = '//TRIM(NodeID(FanInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF (SuppHeatInletNodeNum /= FanOutletNodeNum) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Fan outlet node name must be the same')
CALL ShowContinueError('as the supplemental heating coil inlet node name when draw through '// &
TRIM(cAlphaFields(15))//' is specified.')
CALL ShowContinueError('..Fan outlet node = '//TRIM(NodeID(FanOutletNodeNum)))
CALL ShowContinueError('..Supplemental heating coil inlet node = '//TRIM(NodeID(SuppHeatInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF(SuppHeatOutletNodeNum /= PTUnit(PTUnitNum)%AirOutNode)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Supplemental heating coil outlet node name must be the same as the heat pumps outlet node name.')
CALL ShowContinueError('..Supplemental heating coil outlet node name = '//TRIM(NodeID(SuppHeatOutletNodeNum)))
CALL ShowContinueError('..Heat pumps outlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirOutNode)))
ErrorsFound=.TRUE.
END IF
! check that PTUnit outlet node is a zone inlet node.
ZoneNodeNotFound = .TRUE.
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO NodeNum = 1,ZoneEquipConfig(CtrlZone)%NumInletNodes
IF (PTUnit(PTUnitNum)%AirOutNode .EQ. ZoneEquipConfig(CtrlZone)%InletNode(NodeNum)) THEN
ZoneNodeNotFound = .FALSE.
EXIT
END IF
END DO
END DO
IF(ZoneNodeNotFound)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Heat Pumps air outlet node name must be the same as a zone inlet node name.')
CALL ShowContinueError('..Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object.')
CALL ShowContinueError('..Heat pumps outlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirOutNode)))
ErrorsFound=.TRUE.
END IF
ENDIF ! IF (PTUnit(PTUnitNum)%FanPlace == BlowThru) THEN
PTUnit(PTUnitNum)%FanSchedPtr = GetScheduleIndex(Alphas(16))
IF (.NOT. lAlphaBlanks(16) .AND. PTUnit(PTUnitNum)%FanSchedPtr == 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" '//TRIM(cAlphaFields(16))//' not found: '//TRIM(Alphas(16)))
ErrorsFound=.TRUE.
ELSEIF (lAlphaBlanks(16)) THEN
! default to cycling fan if not specified in input
PTUnit(PTUnitNum)%OpMode = CycFanCycCoil
ENDIF
IF (.NOT. lAlphaBlanks(17)) THEN
PTUnit(PTUnitNum)%AvailManagerListName = Alphas(17)
ZoneComp(PkgTermHPAirToAir_Num)%ZoneCompAvailMgrs(PTUnitNum)%AvailManagerListName = Alphas(17)
ENDIF
! 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 = ContFanCycCoil
IF (PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow .EQ. 0.0d0) THEN
PTUnit(PTUnitNum)%AirFlowControl = UseCompressorOnFlow
ELSE
PTUnit(PTUnitNum)%AirFlowControl = UseCompressorOffFlow
END IF
! Initialize last mode of compressor operation
PTUnit(PTUnitNum)%LastMode = HeatingMode
IF (SameString(PTUnit(PTUnitNum)%FanType, 'Fan:OnOff') .OR. &
SameString(PTUnit(PTUnitNum)%FanType, 'Fan:ConstantVolume'))THEN
IF(PTUnit(PTUnitNum)%FanSchedPtr .GT. 0 .AND. SameString(PTUnit(PTUnitNum)%FanType,'Fan:ConstantVolume'))THEN
IF (.NOT. CheckScheduleValueMinMax(PTUnit(PTUnitNum)%FanSchedPtr,'>',0.0d0,'<=',1.0d0)) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('Fan operating mode must be continuous (fan operating mode schedule values > 0)'//&
' for supply fan type Fan:ConstantVolume.')
CALL ShowContinueError('Error found in '//TRIM(cAlphaFields(16))//' = '//TRIM(Alphas(16)))
CALL ShowContinueError('schedule values must be (>0., <=1.)')
ErrorsFound=.TRUE.
ELSEIF(PTUnit(PTUnitNum)%NoCoolHeatOutAirVolFlow .GT. PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow .AND. &
PTUnit(PTUnitNum)%NoCoolHeatOutAirVolFlow .NE. AutoSize .AND. &
PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow .NE. AutoSize .AND. &
PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow .NE. 0.0d0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('Outdoor air flow rate when compressor is off cannot be greater than ' &
//'supply air flow rate when compressor is off')
ErrorsFound = .TRUE.
END IF
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError(TRIM(cAlphaFields(8))//' "'//TRIM(PTUnit(PTUnitNum)%FanName)//&
'" must be type Fan:OnOff or Fan:ConstantVolume.')
ErrorsFound=.TRUE.
END IF
IF (PTUnit(PTUnitNum)%DXHeatCoilType_Num == Coil_HeatingAirToAirVariableSpeed) THEN
ErrFlag=.FALSE.
PTUnit(PTUnitNum)%DesignHeatingCapacity = &
GetCoilCapacityVariableSpeed(PTUnit(PTUnitNum)%DXHeatCoilType, &
PTUnit(PTUnitNum)%DXHeatCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('...occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
ErrorsFound=.TRUE.
ENDIF
ENDIF
IF (PTUnit(PTUnitNum)%DXCoolCoilType_Num == Coil_CoolingAirToAirVariableSpeed) THEN
ErrFlag=.FALSE.
PTUnit(PTUnitNum)%DesignCoolingCapacity = &
GetCoilCapacityVariableSpeed(PTUnit(PTUnitNum)%DXCoolCoilType, &
PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('...occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
ErrorsFound=.TRUE.
ENDIF
ENDIF
CompSetFanInlet = NodeID(FanInletNodeNum)
CompSetFanOutlet = NodeID(FanOutletNodeNum)
CompSetCoolInlet = NodeID(CoolCoilInletNodeNum)
CompSetCoolOutlet = NodeID(CoolCoilOutletNodeNum)
CompSetHeatInlet = NodeID(HeatCoilInletNodeNum)
CompSetHeatOutlet = NodeID(HeatCoilOutletNodeNum)
CompSetSupHeatInlet = NodeID(SuppHeatInletNodeNum)
CompSetSupHeatOutlet = NodeID(SuppHeatOutletNodeNum)
! Add fan to component sets array
CALL SetUpCompSets(PTUnit(PTUnitNum)%UnitType, PTUnit(PTUnitNum)%Name, &
PTUnit(PTUnitNum)%FanType,PTUnit(PTUnitNum)%FanName,CompSetFanInlet,CompSetFanOutlet)
! Add cooling coil to component sets array
CALL SetUpCompSets(PTUnit(PTUnitNum)%UnitType, PTUnit(PTUnitNum)%Name, &
PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,CompSetCoolInlet,CompSetCoolOutlet)
! Add heating coil to component sets array
CALL SetUpCompSets(PTUnit(PTUnitNum)%UnitType, PTUnit(PTUnitNum)%Name, &
PTUnit(PTUnitNum)%DXHeatCoilType,PTUnit(PTUnitNum)%DXHeatCoilName,CompSetHeatInlet,CompSetHeatOutlet)
! Add supplemental heating coil to component sets array
CALL SetUpCompSets(PTUnit(PTUnitNum)%UnitType, PTUnit(PTUnitNum)%Name, &
SuppHeatCoilType,PTUnit(PTUnitNum)%SuppHeatCoilName,CompSetSupHeatInlet,CompSetSupHeatOutlet)
IF(PTUnit(PTUnitNum)%UnitType_Num .EQ. PTHPUnit)THEN
IF (PTUnit(PTUnitNum)%SuppHeatCoilType_Num == Coil_HeatingWater) THEN
! Add heating coil water inlet node as actuator node for coil
TempNodeNum = GetOnlySingleNode(NodeID(PTUnit(PTUnitNum)%HotWaterControlNode),ErrorsFound,PTUnit(PTUnitNum)%UnitType, &
PTUnit(PTUnitNum)%Name,NodeType_Water,NodeConnectionType_Actuator,1,ObjectIsParent)
ELSEIF (PTUnit(PTUnitNum)%SuppHeatCoilType_Num == Coil_HeatingSteam) THEN
! Add heating coil steam inlet node as actualtor node for coil
TempNodeNum = GetOnlySingleNode(NodeID(PTUnit(PTUnitNum)%HWCoilSteamInletNode),ErrorsFound,PTUnit(PTUnitNum)%UnitType, &
PTUnit(PTUnitNum)%Name, NodeType_Steam,NodeConnectionType_Actuator,1,ObjectIsParent)
END IF
END IF
! Set up component set for OA mixer - use OA node and Mixed air node
CALL SetUpCompSets(PTUnit(PTUnitNum)%UnitType, PTUnit(PTUnitNum)%Name, &
PTUnit(PTUnitNum)%OAMixType, PTUnit(PTUnitNum)%OAMixName,NodeID(OANodeNums(1)),NodeID(OANodeNums(4)))
END DO
! loop over PTAC units; get and load the input data
DO PTUnitIndex = 1,NumPTAC
FanInletNodeNum = 0
FanOutletNodeNum = 0
CoolCoilInletNodeNum = 0
CoolCoilOutletNodeNum = 0
HeatCoilInletNodeNum = 0
HeatCoilOutletNodeNum = 0
SuppHeatInletNodeNum = 0
CurrentModuleObject = 'ZoneHVAC:PackagedTerminalAirConditioner'
CALL GetObjectItem(CurrentModuleObject,PTUnitIndex,Alphas,NumAlphas,Numbers,NumNumbers,IOStatus, &
NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields)
PTUnitNum = PTUnitIndex + NumPTHP
IsNotOK=.FALSE.
IsBlank=.FALSE.
CALL VerifyName(Alphas(1),PTUnit%Name,PTUnitNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
PTUnit(PTUnitNum)%PTObjectIndex = PTUnitIndex
IF (IsNotOK) THEN
ErrorsFound=.TRUE.
IF (IsBlank) Alphas(1)='xxxxx'
ENDIF
PTUnit(PTUnitNum)%Name = Alphas(1)
PTUnit(PTUnitNum)%UnitType = CurrentModuleObject
PTUnit(PTUnitNum)%UnitType_Num = PTACUnit
PTUnit(PTUnitNum)%ZoneEquipType = PkgTermACAirToAir_Num
IF (lAlphaBlanks(2)) THEN
PTUnit(PTUnitNum)%SchedPtr = ScheduleAlwaysOn
ELSE
PTUnit(PTUnitNum)%SchedPtr = GetScheduleIndex(Alphas(2)) ! convert schedule name to pointer (index number)
IF (PTUnit(PTUnitNum)%SchedPtr .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'" invalid data.')
CALL ShowContinueError('invalid-not found '//TRIM(cAlphaFields(2))//'="'//TRIM(Alphas(2))//'".')
ErrorsFound=.TRUE.
ENDIF
END IF
PTUnit(PTUnitNum)%AirInNode = &
GetOnlySingleNode(Alphas(3),ErrorsFound,TRIM(CurrentModuleObject),Alphas(1), &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsParent)
PTUnit(PTUnitNum)%AirOutNode = &
GetOnlySingleNode(Alphas(4),ErrorsFound,TRIM(CurrentModuleObject),Alphas(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsParent)
PTUnit(PTUnitNum)%OAMixType = Alphas(5)
PTUnit(PTUnitNum)%OAMixName = Alphas(6)
ErrFlag = .false.
CALL ValidateComponent(PTUnit(PTUnitNum)%OAMixType,PTUnit(PTUnitNum)%OAMixName,ErrFlag,TRIM(CurrentModuleObject))
IF (ErrFlag) THEN
CALL ShowContinueError('specified in '//TRIM(CurrentModuleObject)//' = "'//TRIM(PTUnit(PTUnitNum)%Name)//'".')
ErrorsFound = .TRUE.
ELSE
! OANodeNums = outside air mixer node numbers, OANodeNums(4) = outside air mixer mixed air node
OANodeNums = GetOAMixerNodeNumbers(PTUnit(PTUnitNum)%OAMixName, ErrFlag)
IF(ErrFlag) THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
CALL ShowContinueError('..OutdoorAir:Mixer is required. Enter an OutdoorAir:Mixer object with this name.')
ErrorsFound=.true.
ELSE
! Set connection type to 'Inlet', because this is not necessarily directly come from
! outside air. Outside Air Inlet Node List will set the connection to outside air
PTUnit(PTUnitNum)%OutsideAirNode = OANodeNums(1)
PTUnit(PTUnitNum)%AirReliefNode = OANodeNums(2)
ENDIF
ENDIF
PTUnit(PTUnitNum)%MaxCoolAirVolFlow = Numbers(1)
IF (PTUnit(PTUnitNum)%MaxCoolAirVolFlow .LE. 0 .AND. PTUnit(PTUnitNum)%MaxCoolAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cNumericFields(1))//' = ' &
//TRIM(TrimSigDigits(Numbers(1),7)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%MaxHeatAirVolFlow = Numbers(2)
IF (PTUnit(PTUnitNum)%MaxHeatAirVolFlow .LE. 0 .AND. PTUnit(PTUnitNum)%MaxHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cNumericFields(2))//' = ' &
//TRIM(TrimSigDigits(Numbers(2),7)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow = Numbers(3)
IF (PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow .LT. 0 .AND. PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cNumericFields(3))//' = ' &
//TRIM(TrimSigDigits(Numbers(3),7)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%CoolOutAirVolFlow = Numbers(4)
IF (PTUnit(PTUnitNum)%CoolOutAirVolFlow .LT. 0 .AND. PTUnit(PTUnitNum)%CoolOutAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cNumericFields(4))//' = ' &
//TRIM(TrimSigDigits(Numbers(4),7)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
! only check that SA flow in cooling is >= OA flow in cooling when either or both are not autosized
IF (PTUnit(PTUnitNum)%CoolOutAirVolFlow .GT. PTUnit(PTUnitNum)%MaxCoolAirVolFlow .AND. &
PTUnit(PTUnitNum)%CoolOutAirVolFlow .NE. AutoSize .AND. PTUnit(PTUnitNum)%MaxCoolAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' '//TRIM(cNumericFields(4))//' cannot be greater than '// &
TRIM(cNumericFields(1)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%HeatOutAirVolFlow = Numbers(5)
IF (PTUnit(PTUnitNum)%HeatOutAirVolFlow .LT. 0 .AND. PTUnit(PTUnitNum)%HeatOutAirVolFlow.NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cNumericFields(5))//' = ' &
//TRIM(TrimSigDigits(Numbers(5),7)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
! only check that SA flow in heating is >= OA flow in heating when either or both are not autosized
IF (PTUnit(PTUnitNum)%HeatOutAirVolFlow .GT. PTUnit(PTUnitNum)%MaxHeatAirVolFlow .AND. &
PTUnit(PTUnitNum)%HeatOutAirVolFlow .NE. AutoSize .AND. PTUnit(PTUnitNum)%MaxHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' '//TRIM(cNumericFields(5))//' cannot be greater than '// &
TRIM(cNumericFields(2)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%NoCoolHeatOutAirVolFlow = Numbers(6)
IF (PTUnit(PTUnitNum)%NoCoolHeatOutAirVolFlow .LT. 0 .AND. PTUnit(PTUnitNum)%NoCoolHeatOutAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cNumericFields(6))//' = ' &
//TRIM(TrimSigDigits(Numbers(6),7)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
!set minimum OA to something low because its not an input for PTACs
PTUnit(PTUnitNum)%MinOATCompressor = -100.0D0
! only check that SA flow when compressor is OFF is >= OA flow when compressor is OFF after fan mode is read in
PTUnit(PTUnitNum)%FanType = Alphas(7)
PTUnit(PTUnitNum)%FanName = Alphas(8)
! Get the fan's availabitlity schedule
ErrFlag=.FALSE.
PTUnit(PTUnitNum)%FanAvailSchedPtr = GetFanAvailSchPtr(PTUnit(PTUnitNum)%FanType,PTUnit(PTUnitNum)%FanName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound=.TRUE.
ENDIF
CALL ValidateComponent(PTUnit(PTUnitNum)%FanType,PTUnit(PTUnitNum)%FanName,IsNotOK,TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('In '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound=.TRUE.
ENDIF
ErrFlag = .FALSE.
CALL GetFanType(PTUnit(PTUnitNum)%FanName,PTUnit(PTUnitNum)%FanType_Num,ErrFlag,CurrentModuleObject,PTUnit(PTUnitNum)%Name)
FanVolFlow = 0.d0
IF(ErrFlag)THEN
CALL ShowContinueError('...specified in '//TRIM(PTUnit(PTUnitNum)%UnitType)// &
' "'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
ErrorsFound = .TRUE.
ELSE
CALL GetFanIndex(PTUnit(PTUnitNum)%FanName,PTUnit(PTUnitNum)%FanIndex,ErrFlag,CurrentModuleObject)
FanInletNodeNum = GetFanInletNode(PTUnit(PTUnitNum)%FanType,PTUnit(PTUnitNum)%FanName,ErrFlag)
FanOutletNodeNum = GetFanOutletNode(PTUnit(PTUnitNum)%FanType,PTUnit(PTUnitNum)%FanName,ErrFlag)
CALL GetFanVolFlow(PTUnit(PTUnitNum)%FanIndex,FanVolFlow)
PTUnit(PTUnitNum)%ActualFanVolFlowRate = FanVolFlow
END IF
IF(FanVolFlow .NE. AutoSize)THEN
IF(FanVolFlow .LT. MAX(PTUnit(PTUnitNum)%MaxCoolAirVolFlow, &
PTUnit(PTUnitNum)%MaxHeatAirVolFlow, &
PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow))THEN
CALL ShowWarningError(TRIM(CurrentModuleObject)//' - air flow rate = '//TRIM(TrimSigDigits(FanVolFlow,7))// &
' in fan object '//TRIM(PTUnit(PTUnitNum)%FanName)//' is less than the maximum PTHP supply air flow rate.')
CALL ShowContinueError(' The fan flow rate must be greater than the PTHP maximum supply air flow rate.')
CALL ShowContinueError(' Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
END IF
! Name is currently used in CALL to Sim routines, can't get rid of the character string at this time.
PTUnit(PTUnitNum)%ACHeatCoilName = Alphas(10)
ACHeatCoilName = Alphas(10)
IF (SameString(Alphas(9),'Coil:Heating:Gas') .OR. &
SameString(Alphas(9),'Coil:Heating:Electric') .OR. &
SameString(Alphas(9),'Coil:Heating:Water') .OR. &
SameString(Alphas(9),'Coil:Heating:Steam') ) THEN
PTUnit(PTUnitNum)%ACHeatCoilType = Alphas(9)
IF (SameString(Alphas(9),'Coil:Heating:Gas') .OR. SameString(Alphas(9),'Coil:Heating:Electric')) THEN
IF(SameString(Alphas(9),'Coil:Heating:Gas'))PTUnit(PTUnitNum)%ACHeatCoilType_Num = Coil_HeatingGas
IF(SameString(Alphas(9),'Coil:Heating:Electric'))PTUnit(PTUnitNum)%ACHeatCoilType_Num = Coil_HeatingElectric
PTUnit(PTUnitNum)%ACHeatCoilCap = GetHeatingCoilCapacity(PTUnit(PTUnitNum)%ACHeatCoilType,ACHeatCoilName,ErrorsFound)
ErrFlag = .FALSE.
HeatCoilInletNodeNum = GetHeatingCoilInletNode(PTUnit(PTUnitNum)%ACHeatCoilType,ACHeatCoilName,ErrFlag)
HeatCoilOutletNodeNum = GetHeatingCoilOutletNode(PTUnit(PTUnitNum)%ACHeatCoilType,ACHeatCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('...occurs in '//TRIM(PTUnit(PTUnitNum)%UnitType)// &
' "'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
ErrorsFound = .TRUE.
END IF
ELSEIF (SameString(Alphas(9),'Coil:Heating:Water')) THEN
PTUnit(PTUnitNum)%ACHeatCoilType_Num = Coil_HeatingWater
ErrFlag = .FALSE.
PTUnit(PTUnitNum)%HotWaterControlNode = GetCoilWaterInletNode('Coil:Heating:Water', &
ACHeatCoilName,ErrFlag)
PTUnit(PTUnitNum)%MaxHeatCoilFluidFlow = GetCoilMaxWaterFlowRate('Coil:Heating:Water', &
ACHeatCoilName,ErrFlag)
IF(PTUnit(PTUnitNum)%MaxHeatCoilFluidFlow .GT. 0.0d0)THEN
PTUnit(PTUnitNum)%MaxHeatCoilFluidFlow = GetCoilMaxWaterFlowRate('Coil:Heating:Water', &
ACHeatCoilName,ErrFlag)
END IF
HeatCoilInletNodeNum = GetWaterCoilInletNode('Coil:Heating:Water',ACHeatCoilName,ErrFlag)
PTUnit(PTUnitNum)%HWCoilAirInletNode = HeatCoilInletNodeNum
HeatCoilOutletNodeNum = GetWaterCoilOutletNode('Coil:Heating:Water', &
PTUnit(PTUnitNum)%ACHeatCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('...occurs in '//TRIM(PTUnit(PTUnitNum)%UnitType)// &
' "'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
ErrorsFound = .TRUE.
END IF
ELSEIF (SameString(Alphas(9),'Coil:Heating:Steam')) THEN
PTUnit(PTUnitNum)%ACHeatCoilType_Num = Coil_HeatingSteam
ErrFlag = .FALSE.
PTUnit(PTUnitNum)%ACHeatCoilIndex = GetSTeamCoilIndex(Alphas(9),ACHeatCoilName,ErrFlag)
PTUnit(PTUnitNum)%HWCoilAirInletNode = GetSteamCoilAirInletNode(PTUnit(PTUnitNum)%ACHeatCoilIndex,ACHeatCoilName,ErrFlag)
PTUnit(PTUnitNum)%HWCoilSteamInletNode = GetSteamCoilSteamInletNode(PTUnit(PTUnitNum)%ACHeatCoilIndex,ACHeatCoilName, &
ErrFlag)
PTUnit(PTUnitNum)%MaxHeatCoilFluidFlow = GetCoilMaxSteamFlowRate(PTUnit(PTUnitNum)%ACHeatCoilIndex,ErrFlag)
SteamIndex = 0 ! Function GetSatDensityRefrig will look up steam index if 0 is passed
SteamDensity=GetSatDensityRefrig("STEAM",TempSteamIn,1.0d0,SteamIndex,'GetPackagedTerminalHeatPumpInput')
IF(PTUnit(PTUnitNum)%MaxHeatCoilFluidFlow .GT. 0.0d0)THEN
PTUnit(PTUnitNum)%MaxHeatCoilFluidFlow = &
GetCoilMaxSteamFlowRate(PTUnit(PTUnitNum)%ACHeatCoilIndex,ErrFlag) * SteamDensity
END IF
HeatCoilInletNodeNum = PTUnit(PTUnitNum)%HWCoilAirInletNode
HeatCoilOutletNodeNum = GetSteamCoilAirOutletNode(PTUnit(PTUnitNum)%ACHeatCoilIndex,ACHeatCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('...occurs in '//TRIM(PTUnit(PTUnitNum)%UnitType)// &
' "'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
ErrorsFound = .TRUE.
END IF
IF(GetTypeOfCoil(PTUnit(PTUnitNum)%ACHeatCoilIndex,ACHeatCoilName,ErrFlag) /= ZoneLoadControl)THEN
IF(ErrFlag)THEN
CALL ShowContinueError('...occurs in '//TRIM(PTUnit(PTUnitNum)%UnitType)// &
' "'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
ErrorsFound = .TRUE.
END IF
CALL ShowSevereError(TRIM(CurrentModuleObject)//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Steam coil type of control must be set to ZoneLoadControl in the heating coil = ' &
//'Coil:Heating:Steam "'//TRIM(ACHeatCoilName)//'"')
ErrorsFound=.TRUE.
END IF
END IF
ELSE
CALL ShowWarningError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cAlphaFields(9))//' = '//TRIM(Alphas(9)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%HeatConvergenceTol = 0.001d0
PTUnit(PTUnitNum)%DXCoolCoilName = Alphas(12)
IF(SameString(Alphas(11),'Coil:Cooling:DX:SingleSpeed') .OR. &
SameString(Alphas(11),'CoilSystem:Cooling:DX:HeatExchangerAssisted')) THEN
PTUnit(PTUnitNum)%DXCoolCoilType = Alphas(11)
IF (SameString(Alphas(11),'Coil:Cooling:DX:SingleSpeed')) THEN
PTUnit(PTUnitNum)%DXCoolCoilType_Num = CoilDX_CoolingSingleSpeed
ErrFlag = .FALSE.
CALL GetDXCoolCoilIndex(PTUnit(PTUnitNum)%DXCoolCoilName,PTUnit(PTUnitNum)%DXCoolCoilIndexNum, &
ErrFlag, PTUnit(PTUnitNum)%DXCoolCoilType)
CoolCoilInletNodeNum = GetDXCoilInletNode(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
CoolCoilOutletNodeNum = GetDXCoilOutletNode(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
PTUnit(PTUnitNum)%CondenserNodeNum = &
GetCoilCondenserInletNode(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('...occurs in '//TRIM(PTUnit(PTUnitNum)%UnitType)// &
' "'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
ErrorsFound = .TRUE.
END IF
ELSEIF (SameString(Alphas(11),'CoilSystem:Cooling:DX:HeatExchangerAssisted')) THEN
PTUnit(PTUnitNum)%DXCoolCoilType_Num = CoilDX_CoolingHXAssisted
ErrFlag = .FALSE.
CALL GetDXCoolCoilIndex( &
GetHXDXCoilName(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag), &
PTUnit(PTUnitNum)%DXCoolCoilIndexNum, ErrFlag, 'Coil:Cooling:DX:SingleSpeed')
CoolCoilInletNodeNum = GetHXDXCoilInletNode(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
CoolCoilOutletNodeNum = GetHXDXCoilOutletNode(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
PTUnit(PTUnitNum)%CondenserNodeNum = GetCoilCondenserInletNode('Coil:Cooling:DX:SingleSpeed', &
GetHXDXCoilName(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag),ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('...occurs in '//TRIM(PTUnit(PTUnitNum)%UnitType)// &
' "'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
ErrorsFound = .TRUE.
END IF
END IF
ELSE IF (SameString(Alphas(11), 'COIL:COOLING:DX:VARIABLESPEED') )THEN
PTUnit(PTUnitNum)%DXCoolCoilType = Alphas(11)
PTUnit(PTUnitNum)%DXCoolCoilType_Num = Coil_CoolingAirToAirVariableSpeed
PTUnit(PTUnitNum)%DXCoolCoilName = Alphas(12)
CALL ValidateComponent(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,IsNotOK, &
TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
ELSE
ErrFlag = .FALSE.
PTUnit(PTUnitNum)%DXCoolCoilIndexNum = GetCoilIndexVariableSpeed(PTUnit(PTUnitNum)%DXCoolCoilType, &
PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
END IF
CoolCoilInletNodeNum=GetCoilInletNodeVariableSpeed(PTUnit(PTUnitNum)%DXCoolCoilType, &
PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
CoolCoilOutletNodeNum=GetCoilOutletNodeVariableSpeed(PTUnit(PTUnitNum)%DXCoolCoilType, &
PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
PTUnit(PTUnitNum)%CondenserNodeNum = GetVSCoilCondenserInletNode(PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
IF(ErrFlag)CALL ShowContinueError('...occurs in '//TRIM(PTUnit(PTUnitNum)%UnitType)// &
' "'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
ENDIF
ELSE
CALL ShowWarningError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cAlphaFields(11))//' = '//TRIM(Alphas(11)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
IF (SameString(Alphas(13),'BlowThrough')) PTUnit(PTUnitNum)%FanPlace = BlowThru
IF (SameString(Alphas(13),'DrawThrough')) PTUnit(PTUnitNum)%FanPlace = DrawThru
! default to draw through if not specified in input
IF (lAlphaBlanks(13)) PTUnit(PTUnitNum)%FanPlace = DrawThru
IF (PTUnit(PTUnitNum)%FanPlace .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cAlphaFields(13))//' = '//TRIM(Alphas(13)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
! Check component placement
IF (PTUnit(PTUnitNum)%FanPlace == BlowThru) THEN
! PTUnit inlet node must be the same as a zone exhaust node and the OA Mixer return node
! check that PTUnit inlet node is a zone exhaust node.
ZoneNodeNotFound = .TRUE.
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO NodeNum = 1,ZoneEquipConfig(CtrlZone)%NumExhaustNodes
IF (PTUnit(PTUnitNum)%AirInNode .EQ. ZoneEquipConfig(CtrlZone)%ExhaustNode(NodeNum)) THEN
ZoneNodeNotFound = .FALSE.
EXIT
END IF
END DO
END DO
IF(ZoneNodeNotFound)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Air Conditioners air inlet node name must be the same as a zone exhaust node name.')
CALL ShowContinueError('..Zone exhaust node name is specified in ZoneHVAC:EquipmentConnections object.')
CALL ShowContinueError('..Air Conditioners inlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirInNode)))
ErrorsFound=.TRUE.
END IF
! check OA Mixer return node
IF(PTUnit(PTUnitNum)%AirInNode /= OANodeNums(3))THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Air Conditioners air inlet node name must be the same as the OutdoorAir:Mixer return air node name.')
CALL ShowContinueError('..PTUnit air inlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirInNode)))
CALL ShowContinueError('..OutdoorAir:Mixer return air node name = '//TRIM(NodeID(OANodeNums(3))))
ErrorsFound=.TRUE.
END IF
! Fan inlet node name must be the same as the heat pump's OA mixer mixed air node name
IF (OANodeNums(4) /= FanInletNodeNum) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Fan inlet node name must be the same as the air conditioners')
CALL ShowContinueError('OutdoorAir:Mixer mixed air node name when blow through '// &
TRIM(cAlphaFields(13))//' is specified.')
CALL ShowContinueError('..Fan inlet node name = '//TRIM(NodeID(FanInletNodeNum)))
CALL ShowContinueError('..OutdoorAir:Mixer mixed air node name = '//TRIM(NodeID(OANodeNums(4))))
ErrorsFound=.TRUE.
END IF
IF(CoolCoilInletNodeNum /= FanOutletNodeNum)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Fan outlet node name must be the same as the cooling coil')
CALL ShowContinueError(' inlet node name when blow through '//TRIM(cAlphaFields(12))//' is specified.')
CALL ShowContinueError('..Fan outlet node name = '//TRIM(NodeID(FanOutletNodeNum)))
CALL ShowContinueError('..Cooling coil inlet node name = '//TRIM(NodeID(CoolCoilInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF(CoolCoilOutletNodeNum /= HeatCoilInletNodeNum)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" 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(CoolCoilOutletNodeNum)))
CALL ShowContinueError('..Heating coil inlet node name = '//TRIM(NodeID(HeatCoilInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF(HeatCoilOutletNodeNum /= PTUnit(PTUnitNum)%AirOutNode)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Heating coil outlet node name must be the same as the air conditioners outlet')
CALL ShowContinueError(' node name when blow through '//TRIM(cAlphaFields(12))//' is specified.')
CALL ShowContinueError('..Heating coil outlet node name = '//TRIM(NodeID(HeatCoilOutletNodeNum)))
CALL ShowContinueError('..Air conditioners outlet node name = '//TRIM(NodeID(SuppHeatInletNodeNum)))
ErrorsFound=.TRUE.
END IF
! check that PTUnit outlet node is a zone inlet node.
ZoneNodeNotFound = .TRUE.
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO NodeNum = 1,ZoneEquipConfig(CtrlZone)%NumInletNodes
IF (PTUnit(PTUnitNum)%AirOutNode .EQ. ZoneEquipConfig(CtrlZone)%InletNode(NodeNum)) THEN
ZoneNodeNotFound = .FALSE.
EXIT
END IF
END DO
END DO
IF(ZoneNodeNotFound)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Air Conditioners air outlet node name must be the same as a zone inlet node name.')
CALL ShowContinueError('..Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object.')
CALL ShowContinueError('..Air Conditioners outlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirOutNode)))
ErrorsFound=.TRUE.
END IF
ELSE ! draw through fan from IF (PTUnit(PTUnitNum)%FanPlace == BlowThru) THEN
! PTUnit inlet node must be the same as a zone exhaust node and the OA Mixer return node
! check that PTUnit inlet node is a zone exhaust node.
ZoneNodeNotFound = .TRUE.
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO NodeNum = 1,ZoneEquipConfig(CtrlZone)%NumExhaustNodes
IF (PTUnit(PTUnitNum)%AirInNode .EQ. ZoneEquipConfig(CtrlZone)%ExhaustNode(NodeNum)) THEN
ZoneNodeNotFound = .FALSE.
EXIT
END IF
END DO
END DO
IF(ZoneNodeNotFound)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Air Conditioners air inlet node name must be the same as a zone exhaust node name.')
CALL ShowContinueError('..Zone exhaust node name is specified in ZoneHVAC:EquipmentConnections object.')
CALL ShowContinueError('..Air Conditioners inlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirInNode)))
ErrorsFound=.TRUE.
END IF
! check OA Mixer return node
IF(PTUnit(PTUnitNum)%AirInNode /= OANodeNums(3))THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Air Conditioners air inlet node name must be the same as the OutdoorAir:Mixer return air node name.')
CALL ShowContinueError('..Air Conditioner air inlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirInNode)))
CALL ShowContinueError('..OutdoorAir:Mixer return air node name = '//TRIM(NodeID(OANodeNums(3))))
ErrorsFound=.TRUE.
END IF
! cooling coil inlet node name must be the same as the OA mixers mixed air node name
IF(CoolCoilInletNodeNum /= OANodeNums(4))THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" OutdoorAir:Mixer mixed air node name must be the same as the cooling coil')
CALL ShowContinueError(' inlet node name when draw through '//TRIM(cAlphaFields(13))//' is specified.')
CALL ShowContinueError('..OutdoorAir:Mixer mixed air name = '//TRIM(NodeID(OANodeNums(4))))
CALL ShowContinueError('..Cooling coil inlet node name = '//TRIM(NodeID(CoolCoilInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF(CoolCoilOutletNodeNum /= HeatCoilInletNodeNum)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" 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(CoolCoilOutletNodeNum)))
CALL ShowContinueError('..Heating coil inlet node name = '//TRIM(NodeID(HeatCoilInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF(HeatCoilOutletNodeNum /= FanInletNodeNum)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Heating coil outlet node name must be the same as the fan inlet node name')
CALL ShowContinueError(' when blow through '//TRIM(cAlphaFields(13))//' is specified.')
CALL ShowContinueError('..Heating coil outlet node name = '//TRIM(NodeID(HeatCoilOutletNodeNum)))
CALL ShowContinueError('..Fan inlet node name = '//TRIM(NodeID(FanInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF (FanOutletNodeNum /= PTUnit(PTUnitNum)%AirOutNode) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Fan outlet node name must be the same')
CALL ShowContinueError('as the air conditioners outlet node name when draw through '// &
TRIM(cAlphaFields(13))//' is specified.')
CALL ShowContinueError('..Fan outlet node name = '//TRIM(NodeID(FanOutletNodeNum)))
CALL ShowContinueError('..Air conditioners outlet node name = '//TRIM(NodeID(SuppHeatInletNodeNum)))
ErrorsFound=.TRUE.
END IF
! check that PTUnit outlet node is a zone inlet node.
ZoneNodeNotFound = .TRUE.
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO NodeNum = 1,ZoneEquipConfig(CtrlZone)%NumInletNodes
IF (PTUnit(PTUnitNum)%AirOutNode .EQ. ZoneEquipConfig(CtrlZone)%InletNode(NodeNum)) THEN
ZoneNodeNotFound = .FALSE.
EXIT
END IF
END DO
END DO
IF(ZoneNodeNotFound)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" Air Conditionerss air outlet node name must be the same as a zone inlet node name.')
CALL ShowContinueError('..Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object.')
CALL ShowContinueError('..Air Conditioners outlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirOutNode)))
ErrorsFound=.TRUE.
END IF
ENDIF ! IF (PTUnit(PTUnitNum)%FanPlace == BlowThru) THEN
PTUnit(PTUnitNum)%FanSchedPtr = GetScheduleIndex(Alphas(14))
IF (.NOT. lAlphaBlanks(14) .AND. PTUnit(PTUnitNum)%FanSchedPtr == 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" '//TRIM(cAlphaFields(14))//' not found: '//TRIM(Alphas(14)))
ErrorsFound=.TRUE.
ELSEIF (lAlphaBlanks(14)) THEN
! default to cycling fan if not specified in input
PTUnit(PTUnitNum)%OpMode = CycFanCycCoil
ENDIF
IF (.NOT. lAlphaBlanks(15)) THEN
PTUnit(PTUnitNum)%AvailManagerListName = Alphas(15)
ZoneComp(PkgTermACAirToAir_Num)%ZoneCompAvailMgrs(PTUnitNum)%AvailManagerListName = Alphas(15)
ENDIF
! 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 = ContFanCycCoil
IF (PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow .EQ. 0.0d0) THEN
PTUnit(PTUnitNum)%AirFlowControl = UseCompressorOnFlow
ELSE
PTUnit(PTUnitNum)%AirFlowControl = UseCompressorOffFlow
END IF
! Initialize last mode of compressor operation
PTUnit(PTUnitNum)%LastMode = HeatingMode
IF (SameString(PTUnit(PTUnitNum)%FanType, 'Fan:OnOff') .OR. &
SameString(PTUnit(PTUnitNum)%FanType, 'Fan:ConstantVolume'))THEN
IF(PTUnit(PTUnitNum)%FanSchedPtr .GT. 0 .AND. SameString(PTUnit(PTUnitNum)%FanType,'Fan:ConstantVolume'))THEN
IF (.NOT. CheckScheduleValueMinMax(PTUnit(PTUnitNum)%FanSchedPtr,'>',0.0d0,'<=',1.0d0)) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('Fan operating mode must be continuous (fan operating mode schedule values > 0)'//&
' for supply fan type Fan:ConstantVolume.')
CALL ShowContinueError('Error found in '//TRIM(cAlphaFields(14))//' = '//TRIM(Alphas(14)))
CALL ShowContinueError('schedule values must be (>0., <=1.)')
ErrorsFound=.TRUE.
ELSEIF(PTUnit(PTUnitNum)%NoCoolHeatOutAirVolFlow .GT. PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow .AND. &
PTUnit(PTUnitNum)%NoCoolHeatOutAirVolFlow .NE. AutoSize .AND. &
PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow .NE. AutoSize .AND. &
PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow .NE. 0.0d0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('Outdoor air flow rate when compressor is off cannot be greater than ' &
//'supply air flow rate when compressor is off')
ErrorsFound = .TRUE.
END IF
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError(TRIM(cAlphaFields(8))//' "'//TRIM(PTUnit(PTUnitNum)%FanName)//&
'" must be type Fan:OnOff or Fan:ConstantVolume.')
ErrorsFound=.TRUE.
END IF
IF (PTUnit(PTUnitNum)%DXCoolCoilType_Num == Coil_CoolingAirToAirVariableSpeed) THEN
ErrFlag=.FALSE.
PTUnit(PTUnitNum)%DesignCoolingCapacity = &
GetCoilCapacityVariableSpeed(PTUnit(PTUnitNum)%DXCoolCoilType, &
PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('...occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
ErrorsFound=.TRUE.
ENDIF
ENDIF
CompSetFanInlet = NodeID(FanInletNodeNum)
CompSetFanOutlet = NodeID(FanOutletNodeNum)
CompSetCoolInlet = NodeID(CoolCoilInletNodeNum)
CompSetCoolOutlet = NodeID(CoolCoilOutletNodeNum)
CompSetHeatInlet = NodeID(HeatCoilInletNodeNum)
CompSetHeatOutlet = NodeID(HeatCoilOutletNodeNum)
! Add fan to component sets array
CALL SetUpCompSets(PTUnit(PTUnitNum)%UnitType, PTUnit(PTUnitNum)%Name, &
PTUnit(PTUnitNum)%FanType,PTUnit(PTUnitNum)%FanName, &
NodeID(FanInletNodeNum),NodeID(FanOutletNodeNum))
! Add cooling coil to component sets array
CALL SetUpCompSets(PTUnit(PTUnitNum)%UnitType, PTUnit(PTUnitNum)%Name, &
PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName, &
NodeID(CoolCoilInletNodeNum),NodeID(CoolCoilOutletNodeNum))
! Add heating coil to component sets array
CALL SetUpCompSets(PTUnit(PTUnitNum)%UnitType, PTUnit(PTUnitNum)%Name, &
PTUnit(PTUnitNum)%ACHeatCoilType,ACHeatCoilName, &
NodeID(HeatCoilInletNodeNum),NodeID(HeatCoilOutletNodeNum))
IF(PTUnit(PTUnitNum)%UnitType_Num .EQ. PTACUnit)THEN
IF (PTUnit(PTUnitNum)%ACHeatCoilType_Num == Coil_HeatingWater) THEN
! Add heating coil water inlet node as actuator node for coil
TempNodeNum = GetOnlySingleNode(NodeID(PTUnit(PTUnitNum)%HotWaterControlNode),ErrorsFound,PTUnit(PTUnitNum)%UnitType, &
PTUnit(PTUnitNum)%Name,NodeType_Water,NodeConnectionType_Actuator,1,ObjectIsParent)
ELSEIF (PTUnit(PTUnitNum)%ACHeatCoilType_Num == Coil_HeatingSteam) THEN
! Add heating coil steam inlet node as actualtor node for coil
TempNodeNum = GetOnlySingleNode(NodeID(PTUnit(PTUnitNum)%HWCoilSteamInletNode),ErrorsFound,PTUnit(PTUnitNum)%UnitType, &
PTUnit(PTUnitNum)%Name, NodeType_Steam,NodeConnectionType_Actuator,1,ObjectIsParent)
END IF
END IF
! Set up component set for OA mixer - use OA node and Mixed air node
CALL SetUpCompSets(PTUnit(PTUnitNum)%UnitType, PTUnit(PTUnitNum)%Name, &
PTUnit(PTUnitNum)%OAMixType,PTUnit(PTUnitNum)%OAMixName,NodeID(OANodeNums(1)),NodeID(OANodeNums(4)))
END DO
!***********************************************************************************
DO PTUnitIndex = 1,NumPTWSHP
FanInletNodeNum = 0
FanOutletNodeNum = 0
CoolCoilInletNodeNum = 0
CoolCoilOutletNodeNum = 0
HeatCoilInletNodeNum = 0
HeatCoilOutletNodeNum = 0
SuppHeatInletNodeNum = 0
SuppHeatOutletNodeNum = 0
SuppHeatHWInletNodeNum = 0
SuppHeatHWOutletNodeNum = 0
OANodeNums = 0
CurrentModuleObject = 'ZoneHVAC:WaterToAirHeatPump'
CALL GetObjectItem(CurrentModuleObject,PTUnitIndex,Alphas,NumAlphas,Numbers,NumNumbers,IOStatus, &
NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields)
PTUnitNum = PTUnitIndex + NumPTHP + NumPTAC
IsNotOK=.FALSE.
IsBlank=.FALSE.
CALL VerifyName(Alphas(1),PTUnit%Name,PTUnitNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
PTUnit(PTUnitNum)%PTObjectIndex = PTUnitIndex
IF (IsNotOK) THEN
ErrorsFound=.TRUE.
IF (IsBlank) Alphas(1)='xxxxx'
ENDIF
PTUnit(PTUnitNum)%Name = Alphas(1)
PTUnit(PTUnitNum)%UnitType = CurrentModuleObject
PTUnit(PTUnitNum)%UnitType_Num = PTWSHPUnit
PTUnit(PTUnitNum)%ZoneEquipType = PkgTermHPWaterToAir_Num
IF (lAlphaBlanks(2)) THEN
PTUnit(PTUnitNum)%SchedPtr = ScheduleAlwaysOn
ELSE
PTUnit(PTUnitNum)%SchedPtr = GetScheduleIndex(Alphas(2))
IF (PTUnit(PTUnitNum)%SchedPtr == 0) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'" invalid data.')
CALL ShowContinueError('invalid-not found '//TRIM(cAlphaFields(2))//'="'//TRIM(Alphas(2))//'".')
ErrorsFound=.TRUE.
ENDIF
ENDIF
PTUnit(PTUnitNum)%AirInNode = &
GetOnlySingleNode(Alphas(3),ErrorsFound,TRIM(CurrentModuleObject),Alphas(1), &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsParent)
PTUnit(PTUnitNum)%AirOutNode = &
GetOnlySingleNode(Alphas(4),ErrorsFound,TRIM(CurrentModuleObject),Alphas(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsParent)
PTUnit(PTUnitNum)%OAMixType = Alphas(5)
PTUnit(PTUnitNum)%OAMixName = Alphas(6)
ErrFlag = .false.
CALL ValidateComponent(PTUnit(PTUnitNum)%OAMixType,PTUnit(PTUnitNum)%OAMixName,ErrFlag,TRIM(CurrentModuleObject))
IF (ErrFlag) THEN
CALL ShowContinueError('specified in '//TRIM(CurrentModuleObject)//' = "'//TRIM(PTUnit(PTUnitNum)%Name)//'".')
ErrorsFound = .TRUE.
ELSE
! OANodeNums = outside air mixer node numbers, OANodeNums(4) = outside air mixer mixed air node
OANodeNums = GetOAMixerNodeNumbers(PTUnit(PTUnitNum)%OAMixName, ErrFlag)
IF(ErrFlag) THEN
CALL ShowContinueError('that was specified in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
CALL ShowContinueError('..OutdoorAir:Mixer is required. Enter an OutdoorAir:Mixer object with this name.')
ErrorsFound=.true.
ELSE
! Set connection type to 'Inlet', because this is not necessarily directly come from
! outside air. Outside Air Inlet Node List will set the connection to outside air
PTUnit(PTUnitNum)%OutsideAirNode = OANodeNums(1)
PTUnit(PTUnitNum)%AirReliefNode = OANodeNums(2)
ENDIF
END IF
!Get fan data
PTUnit(PTUnitNum)%FanType = Alphas(7)
PTUnit(PTUnitNum)%FanName = Alphas(8)
ErrFlag=.FALSE.
CALL GetFanType(TRIM(PTUnit(PTUnitNum)%FanName), PTUnit(PTUnitNum)%FanType_Num, ErrFlag, CurrentModuleObject,Alphas(1))
FanVolFlow = 0.d0
IF (ErrFlag) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'".')
ErrorsFound=.TRUE.
END IF
IF (PTUnit(PTUnitNum)%FanType_Num == FanType_SimpleOnOff)THEN
CALL ValidateComponent(PTUnit(PTUnitNum)%FanType,PTUnit(PTUnitNum)%FanName,IsNotOK, TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
ELSE
ErrFlag=.FALSE.
CALL GetFanIndex(PTUnit(PTUnitNum)%FanName, PTUnit(PTUnitNum)%FanIndex, ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
ENDIF
ErrFlag=.FALSE.
FanInletNodeNum = GetFanInletNode(PTUnit(PTUnitNum)%FanType,PTUnit(PTUnitNum)%FanName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
ENDIF
ErrFlag=.FALSE.
FanOutletNodeNum = GetFanOutletNode(PTUnit(PTUnitNum)%FanType,PTUnit(PTUnitNum)%FanName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
ELSE
CALL GetFanVolFlow(PTUnit(PTUnitNum)%FanIndex,FanVolFlow)
PTUnit(PTUnitNum)%ActualFanVolFlowRate = FanVolFlow
ENDIF
ErrFlag=.FALSE.
PTUnit(PTUnitNum)%FanAvailSchedPtr = GetFanAvailSchPtr(PTUnit(PTUnitNum)%FanType,PTUnit(PTUnitNum)%FanName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
ENDIF
ENDIF
ELSE
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'"')
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(7))//'="'//TRIM(Alphas(7))//'".')
ErrorsFound=.TRUE.
END IF
!Get heating coil type and name data
IF (Alphas(9) == 'COIL:HEATING:WATERTOAIRHEATPUMP:EQUATIONFIT' )THEN
PTUnit(PTUnitNum)%DXHeatCoilType = Alphas(9)
PTUnit(PTUnitNum)%DXHeatCoilType_Num = Coil_HeatingWaterToAirHPSimple
PTUnit(PTUnitNum)%DXHeatCoilName = Alphas(10)
CALL ValidateComponent(PTUnit(PTUnitNum)%DXHeatCoilType,PTUnit(PTUnitNum)%DXHeatCoilName,IsNotOK, &
TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
ELSE
ErrFlag = .FALSE.
PTUnit(PTUnitNum)%DXHeatCoilIndex = GetWtoAHPSimpleCoilIndex(PTUnit(PTUnitNum)%DXHeatCoilType, &
PTUnit(PTUnitNum)%DXHeatCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
END IF
HeatCoilInletNodeNum=GetWtoAHPSimpleCoilInletNode(PTUnit(PTUnitNum)%DXHeatCoilType, &
PTUnit(PTUnitNum)%DXHeatCoilName,ErrFlag)
HeatCoilOutletNodeNum=GetWtoAHPSimpleCoilOutletNode(PTUnit(PTUnitNum)%DXHeatCoilType, &
PTUnit(PTUnitNum)%DXHeatCoilName,ErrFlag)
ENDIF
ELSE IF (Alphas(9) == 'COIL:HEATING:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT' )THEN
PTUnit(PTUnitNum)%DXHeatCoilType = Alphas(9)
PTUnit(PTUnitNum)%DXHeatCoilType_Num = Coil_HeatingWaterToAirHPVSEquationFit
PTUnit(PTUnitNum)%DXHeatCoilName = Alphas(10)
CALL ValidateComponent(PTUnit(PTUnitNum)%DXHeatCoilType,PTUnit(PTUnitNum)%DXHeatCoilName,IsNotOK, &
TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
ELSE
ErrFlag = .FALSE.
PTUnit(PTUnitNum)%DXHeatCoilIndex = GetCoilIndexVariableSpeed(PTUnit(PTUnitNum)%DXHeatCoilType, &
PTUnit(PTUnitNum)%DXHeatCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
END IF
HeatCoilInletNodeNum=GetCoilInletNodeVariableSpeed(PTUnit(PTUnitNum)%DXHeatCoilType, &
PTUnit(PTUnitNum)%DXHeatCoilName,ErrFlag)
HeatCoilOutletNodeNum=GetCoilOutletNodeVariableSpeed(PTUnit(PTUnitNum)%DXHeatCoilType, &
PTUnit(PTUnitNum)%DXHeatCoilName,ErrFlag)
ENDIF
ELSE
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'"')
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(9))//' = '//TRIM(Alphas(9)))
ErrorsFound=.TRUE.
END IF
! Get Cooling Coil Information if available
IF (Alphas(11) == 'COIL:COOLING:WATERTOAIRHEATPUMP:EQUATIONFIT' )THEN
PTUnit(PTUnitNum)%DXCoolCoilType = Alphas(11)
PTUnit(PTUnitNum)%DXCoolCoilType_Num = Coil_CoolingWaterToAirHPSimple
PTUnit(PTUnitNum)%DXCoolCoilName = Alphas(12)
CALL ValidateComponent(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,IsNotOK, &
TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
ELSE
ErrFlag = .FALSE.
PTUnit(PTUnitNum)%DXCoolCoilIndexNum = GetWtoAHPSimpleCoilIndex(PTUnit(PTUnitNum)%DXCoolCoilType, &
PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
END IF
CoolCoilInletNodeNum=GetWtoAHPSimpleCoilInletNode(PTUnit(PTUnitNum)%DXCoolCoilType, &
PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
CoolCoilOutletNodeNum=GetWtoAHPSimpleCoilOutletNode(PTUnit(PTUnitNum)%DXCoolCoilType, &
PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
ENDIF
ELSE IF (Alphas(11) == 'COIL:COOLING:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT' )THEN
PTUnit(PTUnitNum)%DXCoolCoilType = Alphas(11)
PTUnit(PTUnitNum)%DXCoolCoilType_Num = Coil_CoolingWaterToAirHPVSEquationFit
PTUnit(PTUnitNum)%DXCoolCoilName = Alphas(12)
CALL ValidateComponent(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,IsNotOK, &
TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
ELSE
ErrFlag = .FALSE.
PTUnit(PTUnitNum)%DXCoolCoilIndexNum = GetCoilIndexVariableSpeed(PTUnit(PTUnitNum)%DXCoolCoilType, &
PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'".')
ErrorsFound=.TRUE.
END IF
CoolCoilInletNodeNum=GetCoilInletNodeVariableSpeed(PTUnit(PTUnitNum)%DXCoolCoilType, &
PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
CoolCoilOutletNodeNum=GetCoilOutletNodeVariableSpeed(PTUnit(PTUnitNum)%DXCoolCoilType, &
PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
ENDIF
ELSE
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'"')
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(11))//'="'//TRIM(Alphas(11))//'".')
ErrorsFound=.TRUE.
END IF
IF (NumAlphas >= 19) THEN
! get water flow mode info before calling SetSimpleWSHPData
IF (SameString(Alphas(19),'Constant')) PTUnit(PTUnitNum)%WaterCyclingMode = WaterConstant
IF (SameString(Alphas(19),'Cycling')) PTUnit(PTUnitNum)%WaterCyclingMode = WaterCycling
IF (SameString(Alphas(19),'ConstantOnDemand')) PTUnit(PTUnitNum)%WaterCyclingMode = WaterConstantOnDemand
!default to draw through if not specified in input
IF (lAlphaBlanks(19)) PTUnit(PTUnitNum)%WaterCyclingMode = WaterCycling
IF (PTUnit(PTUnitNum)%WaterCyclingMode .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cAlphaFields(19))//' = '//TRIM(Alphas(19)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
ELSE
PTUnit(PTUnitNum)%WaterCyclingMode = WaterCycling
ENDIF
! end get water flow mode info
IF (Alphas(9) == 'COIL:HEATING:WATERTOAIRHEATPUMP:EQUATIONFIT' .AND. &
Alphas(11) == 'COIL:COOLING:WATERTOAIRHEATPUMP:EQUATIONFIT') THEN
IF(PTUnit(PTUnitNum)%DXHeatCoilIndex .GT. 0 .AND. PTUnit(PTUnitNum)%DXCoolCoilIndexNum .GT. 0)THEN
CALL SetSimpleWSHPData(PTUnit(PTUnitNum)%DXCoolCoilIndexNum,ErrorsFound,PTUnit(PTUnitNum)%WaterCyclingMode, &
CompanionHeatingCoilNum=PTUnit(PTUnitNum)%DXHeatCoilIndex)
! CALL SetSimpleWSHPData(PTUnit(PTUnitNum)%WaterCyclingMode, PTUnit(PTUnitNum)%DXHeatCoilIndex,ErrorsFound, &
! CompanionCoolingCoilNum=PTUnit(PTUnitNum)%DXCoolCoilIndexNum)
END IF
ELSE IF (Alphas(9) == 'COIL:HEATING:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT' .AND. &
Alphas(11) == 'COIL:COOLING:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT') THEN
IF(PTUnit(PTUnitNum)%DXHeatCoilIndex .GT. 0 .AND. PTUnit(PTUnitNum)%DXCoolCoilIndexNum .GT. 0)THEN
CALL SetVarSpeedCoilData(PTUnit(PTUnitNum)%DXCoolCoilIndexNum,ErrorsFound, &
CompanionHeatingCoilNum=PTUnit(PTUnitNum)%DXHeatCoilIndex)
END IF
ELSE
CALL ShowContinueError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'"')
CALL ShowContinueError('Cooling coil and heating coil should use the equation fit model and be of same general type')
ErrorsFound = .TRUE.
END IF
! Get supplemental heating coil information
SuppHeatCoilType = Alphas(13)
SuppHeatCoilName = Alphas(14)
PTUnit(PTUnitNum)%SuppHeatCoilName = SuppHeatCoilName
IF (SameString(Alphas(13),'Coil:Heating:Gas') .OR. &
SameString(Alphas(13),'Coil:Heating:Electric') .OR. &
SameString(Alphas(13),'Coil:Heating:Water') .OR. &
SameString(Alphas(13),'Coil:Heating:Steam')) THEN
PTUnit(PTUnitNum)%SuppHeatCoilType=SuppHeatCoilType
IF (SameString(Alphas(13),'Coil:Heating:Gas') .OR. SameString(Alphas(13),'Coil:Heating:Electric')) THEN
IF (SameString(Alphas(13),'Coil:Heating:Gas')) THEN
PTUnit(PTUnitNum)%SuppHeatCoilType_Num = Coil_HeatingGas
ELSEIF (SameString(Alphas(13),'Coil:Heating:Electric')) THEN
PTUnit(PTUnitNum)%SuppHeatCoilType_Num = Coil_HeatingElectric
ENDIF
ErrFlag = .FALSE.
CALL ValidateComponent(SuppHeatCoilType,SuppHeatCoilName,ErrFlag, &
TRIM(CurrentModuleObject))
IF (ErrFlag) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'".')
ErrorsFound=.TRUE.
ELSE
CALL GetHeatingCoilIndex(SuppHeatCoilName,PTUnit(PTUnitNum)%SuppHeatCoilIndex,ErrFlag)
! Get the Supplemental Heating Coil Node Numbers
SuppHeatInletNodeNum = &
GetHeatingCoilInletNode(SuppHeatCoilType,SuppHeatCoilName,ErrFlag)
SuppHeatOutletNodeNum = &
GetHeatingCoilOutletNode(SuppHeatCoilType,SuppHeatCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('...specified in '//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'".')
ErrorsFound=.TRUE.
ENDIF
ENDIF
ELSEIF (SameString(Alphas(13),'Coil:Heating:Water')) THEN
PTUnit(PTUnitNum)%SuppHeatCoilType_Num = Coil_HeatingWater
ErrFlag = .FALSE.
SuppHeatHWInletNodeNum = GetCoilWaterInletNode(SuppHeatCoilType,PTUnit(PTUnitNum)%SuppHeatCoilName,ErrFlag)
PTUnit(PTUnitNum)%HotWaterControlNode = SuppHeatHWInletNodeNum
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%MaxSuppCoilFluidFlow = GetCoilMaxWaterFlowRate(SuppHeatCoilType, &
PTUnit(PTUnitNum)%SuppHeatCoilName,ErrFlag)
IF(PTUnit(PTUnitNum)%MaxSuppCoilFluidFlow .GT. 0.0d0)THEN
PTUnit(PTUnitNum)%MaxSuppCoilFluidFlow = GetCoilMaxWaterFlowRate(SuppHeatCoilType, &
PTUnit(PTUnitNum)%SuppHeatCoilName,ErrFlag)
END IF
ErrFlag = .FALSE.
SuppHeatInletNodeNum = GetWaterCoilInletNode('Coil:Heating:Water',PTUnit(PTUnitNum)%SuppHeatCoilName,ErrFlag)
PTUnit(PTUnitNum)%SupCoilAirInletNode = SuppHeatInletNodeNum
SuppHeatOutletNodeNum = GetWaterCoilOutletNode('Coil:Heating:Water', &
PTUnit(PTUnitNum)%SuppHeatCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
ELSEIF (SameString(Alphas(13),'Coil:Heating:Steam')) THEN
PTUnit(PTUnitNum)%SuppHeatCoilType_Num = Coil_HeatingSteam
ErrFlag = .FALSE.
PTUnit(PTUnitNum)%SuppHeatCoilIndex = GetSTeamCoilIndex(SuppHeatCoilType,PTUnit(PTUnitNum)%SuppHeatCoilName,ErrFlag)
IF (PTUnit(PTUnitNum)%SuppHeatCoilIndex .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cAlphaFields(14))//' = ' &
//TRIM(PTUnit(PTUnitNum)%SuppHeatCoilName))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
ErrFlag = .FALSE.
SuppHeatHWInletNodeNum = GetSteamCoilSteamInletNode(SuppHeatCoilType,PTUnit(PTUnitNum)%SuppHeatCoilName,ErrFlag)
PTUnit(PTUnitNum)%HWCoilSteamInletNode = SuppHeatHWInletNodeNum
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%MaxSuppCoilFluidFlow = GetCoilMaxSteamFlowRate(PTUnit(PTUnitNum)%SuppHeatCoilIndex,ErrFlag)
IF(PTUnit(PTUnitNum)%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,'GetPackagedTerminalHeatPumpInput')
PTUnit(PTUnitNum)%MaxSuppCoilFluidFlow = &
GetCoilMaxSteamFlowRate(PTUnit(PTUnitNum)%SuppHeatCoilIndex,ErrFlag) * SteamDensity
END IF
ErrFlag = .FALSE.
SuppHeatInletNodeNum = &
GetSteamCoilAirInletNode(PTUnit(PTUnitNum)%SuppHeatCoilIndex,PTUnit(PTUnitNum)%SuppHeatCoilName,ErrFlag)
PTUnit(PTUnitNum)%SupCoilAirInletNode = SuppHeatInletNodeNum
SuppHeatOutletNodeNum = GetSteamCoilAirOutletNode(SuppHeatCoilType,PTUnit(PTUnitNum)%SuppHeatCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(PTUnit(PTUnitNum)%Name))
ErrorsFound = .TRUE.
END IF
END IF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(13))//' = '//TRIM(Alphas(13)))
ErrorsFound=.TRUE.
END IF
IF (lAlphaBlanks(15)) THEN
PTUnit(PTUnitNum)%CondenserNodeNum = 0
ELSE
PTUnit(PTUnitNum)%CondenserNodeNum = &
GetOnlySingleNode(Alphas(15),ErrorsFound,TRIM(CurrentModuleObject),Alphas(1), &
NodeType_Air,NodeConnectionType_OutsideAirReference,1,ObjectIsNotParent)
! need better verification.
IF (.not. CheckOutAirNodeNumber(PTUnit(PTUnitNum)%CondenserNodeNum)) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'"')
CALL ShowContinueError(' Node name of outdoor dry-bulb temperature sensor not valid outdoor air node="'// &
TRIM(Alphas(15))//'"')
CALL ShowContinueError('...does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.')
ErrorsFound=.TRUE.
END IF
ENDIF
IF (SameString(Alphas(16),'BlowThrough')) PTUnit(PTUnitNum)%FanPlace = BlowThru
IF (SameString(Alphas(16),'DrawThrough')) PTUnit(PTUnitNum)%FanPlace = DrawThru
IF (PTUnit(PTUnitNum)%FanPlace .EQ.0) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(Alphas(1))//'"')
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(16))//'="'//TRIM(Alphas(16))//'".')
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%FanSchedPtr = GetScheduleIndex(Alphas(17))
IF (.NOT. lAlphaBlanks(17) .AND. PTUnit(PTUnitNum)%FanSchedPtr == 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(17))//' = '//TRIM(Alphas(17)))
ErrorsFound=.TRUE.
ELSEIF (lAlphaBlanks(17)) THEN
PTUnit(PTUnitNum)%OpMode = CycFanCycCoil
ENDIF
IF (.NOT. lAlphaBlanks(18)) THEN
PTUnit(PTUnitNum)%AvailManagerListName = Alphas(18)
ZoneComp(PkgTermHPWaterToAir_Num)%ZoneCompAvailMgrs(PTUnitNum)%AvailManagerListName = Alphas(18)
ENDIF
! Check component placement
IF (PTUnit(PTUnitNum)%FanPlace == BlowThru) THEN
! check that PTUnit inlet node is a zone exhaust node.
ZoneNodeNotFound = .TRUE.
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO NodeNum = 1,ZoneEquipConfig(CtrlZone)%NumExhaustNodes
IF (PTUnit(PTUnitNum)%AirInNode .EQ. ZoneEquipConfig(CtrlZone)%ExhaustNode(NodeNum)) THEN
ZoneNodeNotFound = .FALSE.
EXIT
END IF
END DO
END DO
IF(ZoneNodeNotFound)THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('..Heat Pumps air inlet node name must be the same as a zone exhaust node name.')
CALL ShowContinueError('..Zone exhaust node name is specified in ZoneHVAC:EquipmentConnections object.')
CALL ShowContinueError('..Heat pumps inlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirInNode)))
ErrorsFound=.TRUE.
END IF
IF(OANodeNums(4) == 0)THEN
! Fan inlet node name must be the same as the heat pump's inlet air node name
IF (PTUnit(PTUnitNum)%AirInNode /= FanInletNodeNum) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('..Fan inlet node name must be the same as the heat pumps inlet air node name')
CALL ShowContinueError('..when blow through '// &
TRIM(cAlphaFields(16))//' is specified and an outdoor air mixer is not used.')
CALL ShowContinueError('..Fan inlet node name = '//TRIM(NodeID(FanInletNodeNum)))
CALL ShowContinueError('..Heat pump air inlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirInNode)))
ErrorsFound=.TRUE.
END IF
ELSE
! Fan inlet node name must be the same as the heat pump's OA mixer mixed air node name
IF (OANodeNums(4) /= FanInletNodeNum) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('..Fan inlet node name must be the same as the heat pumps OutdoorAir:Mixer mixed air node name')
CALL ShowContinueError('..when blow through '// &
TRIM(cAlphaFields(16))//' is specified.')
CALL ShowContinueError('..Fan inlet node name = '//TRIM(NodeID(FanInletNodeNum)))
CALL ShowContinueError('..OutdoorAir:Mixer mixed air node name = '//TRIM(NodeID(OANodeNums(4))))
ErrorsFound=.TRUE.
END IF
! check OA Mixer return node
IF(PTUnit(PTUnitNum)%AirInNode /= OANodeNums(3))THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('..Heat Pump air inlet node name must be the same as the OutdoorAir:Mixer return air node name.')
CALL ShowContinueError('..Heat Pump air inlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirInNode)))
CALL ShowContinueError('..OutdoorAir:Mixer return air node name = '//TRIM(NodeID(OANodeNums(3))))
ErrorsFound=.TRUE.
END IF
END IF
IF(CoolCoilInletNodeNum /= FanOutletNodeNum)THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('..Fan outlet node name must be the same as the cooling coil inlet node name')
CALL ShowContinueError('..when blow through '//TRIM(cAlphaFields(16))//' is specified.')
CALL ShowContinueError('..Fan outlet node name = '//TRIM(NodeID(FanOutletNodeNum)))
CALL ShowContinueError('..Cooling coil inlet node name = '//TRIM(NodeID(CoolCoilInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF(CoolCoilOutletNodeNum /= HeatCoilInletNodeNum)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" 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(CoolCoilOutletNodeNum)))
CALL ShowContinueError('..Heating coil inlet node name = '//TRIM(NodeID(HeatCoilInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF(HeatCoilOutletNodeNum /= SuppHeatInletNodeNum)THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('..Heating coil outlet node name must be the same as the supplemental heating coil inlet node name')
CALL ShowContinueError('..when blow through '//TRIM(cAlphaFields(16))//' is specified.')
CALL ShowContinueError('..Heating coil outlet node name = '//TRIM(NodeID(HeatCoilOutletNodeNum)))
CALL ShowContinueError('..Supplemental heating coil inlet node name = '//TRIM(NodeID(SuppHeatInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF(SuppHeatOutletNodeNum /= PTUnit(PTUnitNum)%AirOutNode)THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('..Supplemental heating coil outlet node name must be the same as the heat pumps outlet node name.')
CALL ShowContinueError('..Supplemental heating coil outlet node name = '//TRIM(NodeID(SuppHeatOutletNodeNum)))
CALL ShowContinueError('..Heat pumps outlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirOutNode)))
ErrorsFound=.TRUE.
END IF
! check that PTUnit outlet node is a zone inlet node.
ZoneNodeNotFound = .TRUE.
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO NodeNum = 1,ZoneEquipConfig(CtrlZone)%NumInletNodes
IF (PTUnit(PTUnitNum)%AirOutNode .EQ. ZoneEquipConfig(CtrlZone)%InletNode(NodeNum)) THEN
ZoneNodeNotFound = .FALSE.
EXIT
END IF
END DO
END DO
IF(ZoneNodeNotFound)THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('..Heat Pumps air outlet node name must be the same as a zone inlet node name.')
CALL ShowContinueError('..Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object.')
CALL ShowContinueError('..Heat pumps outlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirOutNode)))
ErrorsFound=.TRUE.
END IF
ELSE ! draw through fan from IF (PTUnit(PTUnitNum)%FanPlace == BlowThru) THEN
! check that PTUnit inlet node is a zone exhaust node.
ZoneNodeNotFound = .TRUE.
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO NodeNum = 1,ZoneEquipConfig(CtrlZone)%NumExhaustNodes
IF (PTUnit(PTUnitNum)%AirInNode .EQ. ZoneEquipConfig(CtrlZone)%ExhaustNode(NodeNum)) THEN
ZoneNodeNotFound = .FALSE.
EXIT
END IF
END DO
END DO
IF(ZoneNodeNotFound)THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('..Heat Pumps air inlet node name must be the same as a zone exhaust node name.')
CALL ShowContinueError('..Zone exhaust node name is specified in ZoneHVAC:EquipmentConnections object.')
CALL ShowContinueError('..Heat pumps inlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirInNode)))
ErrorsFound=.TRUE.
END IF
IF(OANodeNums(4) == 0)THEN
! Cooling coil inlet node name must be the same as heat pump's air inlet node name
IF(CoolCoilInletNodeNum /= PTUnit(PTUnitNum)%AirInNode)THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('..Heat pump air inlet node name must be the same as the cooling coil inlet node name')
CALL ShowContinueError('..when draw through '//TRIM(cAlphaFields(16))// &
' is specified and an outdoor air mixer is not used.')
CALL ShowContinueError('..Heat pump air inlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirInNode)))
CALL ShowContinueError('..Cooling coil inlet node name = '//TRIM(NodeID(CoolCoilInletNodeNum)))
ErrorsFound=.TRUE.
END IF
ELSE
! Cooling coil inlet node name must be the same as the OA mixers mixed air node name
IF(CoolCoilInletNodeNum /= OANodeNums(4))THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(PTUnit(PTUnitNum)%Name)//&
'" OutdoorAir:Mixer mixed air node name must be the same as the cooling coil')
CALL ShowContinueError(' inlet node name when draw through '//TRIM(cAlphaFields(16))//' is specified.')
CALL ShowContinueError('..OutdoorAir:Mixer mixed air name = '//TRIM(NodeID(OANodeNums(4))))
CALL ShowContinueError('..Cooling coil inlet node name = '//TRIM(NodeID(CoolCoilInletNodeNum)))
ErrorsFound=.TRUE.
END IF
! check OA Mixer return node
IF(PTUnit(PTUnitNum)%AirInNode /= OANodeNums(3))THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('..Heat Pump air inlet node name must be the same as the OutdoorAir:Mixer return air node name.')
CALL ShowContinueError('..Heat Pump air inlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirInNode)))
CALL ShowContinueError('..OutdoorAir:Mixer return air node name = '//TRIM(NodeID(OANodeNums(3))))
ErrorsFound=.TRUE.
END IF
END IF
IF(CoolCoilOutletNodeNum /= HeatCoilInletNodeNum)THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('..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(CoolCoilOutletNodeNum)))
CALL ShowContinueError('..Heating coil inlet node name = '//TRIM(NodeID(HeatCoilInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF(HeatCoilOutletNodeNum /= FanInletNodeNum)THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('..Heating coil outlet node name must be the same as the fan inlet node name')
CALL ShowContinueError('..when draw through '//TRIM(cAlphaFields(16))//' is specified.')
CALL ShowContinueError('..Heating coil outlet node name = '//TRIM(NodeID(HeatCoilOutletNodeNum)))
CALL ShowContinueError('..Fan inlet node name = '//TRIM(NodeID(FanInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF (SuppHeatInletNodeNum /= FanOutletNodeNum) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('..Fan outlet node name must be the same as the supplemental heating coil inlet node name ')
CALL ShowContinueError('..when draw through '//TRIM(cAlphaFields(16))//' is specified.')
CALL ShowContinueError('..Fan outlet node = '//TRIM(NodeID(FanOutletNodeNum)))
CALL ShowContinueError('..Supplemental heating coil inlet node = '//TRIM(NodeID(SuppHeatInletNodeNum)))
ErrorsFound=.TRUE.
END IF
IF(SuppHeatOutletNodeNum /= PTUnit(PTUnitNum)%AirOutNode)THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('..Supplemental heating coil outlet node name must be the same as the heat pumps outlet node name.')
CALL ShowContinueError('..Supplemental heating coil outlet node name = '//TRIM(NodeID(SuppHeatOutletNodeNum)))
CALL ShowContinueError('..Heat pumps outlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirOutNode)))
ErrorsFound=.TRUE.
END IF
! check that PTUnit outlet node is a zone inlet node.
ZoneNodeNotFound = .TRUE.
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO NodeNum = 1,ZoneEquipConfig(CtrlZone)%NumInletNodes
IF (PTUnit(PTUnitNum)%AirOutNode .EQ. ZoneEquipConfig(CtrlZone)%InletNode(NodeNum)) THEN
ZoneNodeNotFound = .FALSE.
EXIT
END IF
END DO
END DO
IF(ZoneNodeNotFound)THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('..Heat Pumps air outlet node name must be the same as a zone inlet node name.')
CALL ShowContinueError('..Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object.')
CALL ShowContinueError('..Heat pumps outlet node name = '//TRIM(NodeID(PTUnit(PTUnitNum)%AirOutNode)))
ErrorsFound=.TRUE.
END IF
ENDIF ! IF (PTUnit(PTUnitNum)%FanPlace == BlowThru) THEN
CompSetFanInlet = NodeID(FanInletNodeNum)
CompSetFanOutlet = NodeID(FanOutletNodeNum)
CompSetCoolInlet = NodeID(CoolCoilInletNodeNum)
CompSetCoolOutlet = NodeID(CoolCoilOutletNodeNum)
CompSetHeatInlet = NodeID(HeatCoilInletNodeNum)
CompSetHeatOutlet = NodeID(HeatCoilOutletNodeNum)
CompSetSupHeatInlet = NodeID(SuppHeatInletNodeNum)
CompSetSupHeatOutlet = NodeID(SuppHeatOutletNodeNum)
! Add fan to component sets array
CALL SetUpCompSets(PTUnit(PTUnitNum)%UnitType, PTUnit(PTUnitNum)%Name, &
PTUnit(PTUnitNum)%FanType,PTUnit(PTUnitNum)%FanName,CompSetFanInlet,CompSetFanOutlet)
! Add cooling coil to component sets array
CALL SetUpCompSets(PTUnit(PTUnitNum)%UnitType, PTUnit(PTUnitNum)%Name, &
PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,CompSetCoolInlet,CompSetCoolOutlet)
! Add heating coil to component sets array
CALL SetUpCompSets(PTUnit(PTUnitNum)%UnitType, PTUnit(PTUnitNum)%Name, &
PTUnit(PTUnitNum)%DXHeatCoilType,PTUnit(PTUnitNum)%DXHeatCoilName,CompSetHeatInlet,CompSetHeatOutlet)
! Add supplemental heating coil to component sets array
CALL SetUpCompSets(PTUnit(PTUnitNum)%UnitType, PTUnit(PTUnitNum)%Name, &
SuppHeatCoilType,SuppHeatCoilName,CompSetSupHeatInlet,CompSetSupHeatOutlet)
IF(PTUnit(PTUnitNum)%UnitType_Num .EQ. PTWSHPUnit)THEN
IF (PTUnit(PTUnitNum)%SuppHeatCoilType_Num == Coil_HeatingWater) THEN
! Add heating coil water inlet node as actuator node for coil
TempNodeNum = GetOnlySingleNode(NodeID(PTUnit(PTUnitNum)%HotWaterControlNode),ErrorsFound,PTUnit(PTUnitNum)%UnitType, &
PTUnit(PTUnitNum)%Name,NodeType_Water,NodeConnectionType_Actuator,1,ObjectIsParent)
ELSEIF (PTUnit(PTUnitNum)%SuppHeatCoilType_Num == Coil_HeatingSteam) THEN
! Add heating coil steam inlet node as actualtor node for coil
TempNodeNum = GetOnlySingleNode(NodeID(PTUnit(PTUnitNum)%HWCoilSteamInletNode),ErrorsFound,PTUnit(PTUnitNum)%UnitType, &
PTUnit(PTUnitNum)%Name, NodeType_Steam,NodeConnectionType_Actuator,1,ObjectIsParent)
END IF
END IF
IF(OANodeNums(1) .GT. 0)THEN
! Set up component set for OA mixer - use OA node and Mixed air node
CALL SetUpCompSets(PTUnit(PTUnitNum)%UnitType, PTUnit(PTUnitNum)%Name, &
PTUnit(PTUnitNum)%OAMixType,PTUnit(PTUnitNum)%OAMixName,NodeID(OANodeNums(1)),NodeID(OANodeNums(4)))
END IF
!Set the Design Fan Volume Flow Rate
ErrFlag=.FALSE.
CALL GetFanVolFlow(PTUnit(PTUnitNum)%FanIndex,FanVolFlow)
PTUnit(PTUnitNum)%ActualFanVolFlowRate = FanVolFlow
IF (ErrFlag) THEN
CALL ShowContinueError('...occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
ErrorsFound=.TRUE.
ENDIF
! PTUnit(PTUnitNum)%ActualFanVolFlowRate = MAX(Numbers(1),Numbers(2),Numbers(3))
IF (FanVolFlow /= AutoSize .and. PTUnit(PTUnitNum)%ActualFanVolFlowRate /= AutoSize) THEN
IF (PTUnit(PTUnitNum)%ActualFanVolFlowRate > FanVolFlow) THEN
CALL ShowContinueError('...occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
CALL ShowContinueError('... has a Design Fan Flow Rate > Max Fan Volume Flow Rate, should be <=.')
CALL ShowContinueError('... Entered value='//TRIM(RoundSigDigits(PTUnit(PTUnitNum)%ActualFanVolFlowRate,2))// &
'... Fan ['//TRIM(PTUnit(PTUnitNum)%FanType)//':'//TRIM(PTUnit(PTUnitNum)%FanName)// &
'] Max Value='//TRIM(RoundSigDigits(FanVolFlow,2)))
ENDIF
IF (PTUnit(PTUnitNum)%ActualFanVolFlowRate <= 0.0d0) THEN
CALL ShowContinueError('...occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
CALL ShowContinueError('... has a Design Fan Flow Rate <= 0.0, it must be >0.0')
CALL ShowContinueError('... Entered value='//TRIM(RoundSigDigits(PTUnit(PTUnitNum)%ActualFanVolFlowRate,2)))
ErrorsFound=.TRUE.
ENDIF
ENDIF
PTUnit(PTUnitNum)%MaxCoolAirVolFlow = Numbers(1)
IF (PTUnit(PTUnitNum)%MaxCoolAirVolFlow .LE. 0 .AND. PTUnit(PTUnitNum)%MaxCoolAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError(' illegal value '//TRIM(cNumericFields(1))//' = ' &
//TRIM(TrimSigDigits(Numbers(1),7)))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%MaxHeatAirVolFlow = Numbers(2)
IF (PTUnit(PTUnitNum)%MaxHeatAirVolFlow .LE. 0 .AND. PTUnit(PTUnitNum)%MaxHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError(' illegal '//TRIM(cNumericFields(2))//' = ' &
//TRIM(TrimSigDigits(Numbers(2),7)))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow = Numbers(3)
IF (PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow .LT. 0 .AND. PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError(' illegal '//TRIM(cNumericFields(3))//' = ' &
//TRIM(TrimSigDigits(Numbers(3),7)))
ErrorsFound = .TRUE.
END IF
! AirFlowControl only valid if fan opmode = ContFanCycCoil
IF (PTUnit(PTUnitNum)%MaxNoCoolHeatAirVolFlow .EQ. 0.0d0) THEN
PTUnit(PTUnitNum)%AirFlowControl = UseCompressorOnFlow
ELSE
PTUnit(PTUnitNum)%AirFlowControl = UseCompressorOffFlow
END IF
IF(OANodeNums(1) .GT. 0)THEN
PTUnit(PTUnitNum)%CoolOutAirVolFlow = Numbers(4)
IF (PTUnit(PTUnitNum)%CoolOutAirVolFlow .LT. 0 .AND. PTUnit(PTUnitNum)%CoolOutAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError(' illegal '//TRIM(cNumericFields(4))//' = ' &
//TRIM(TrimSigDigits(Numbers(4),7)))
ErrorsFound = .TRUE.
END IF
! only check that SA flow in cooling is >= OA flow in cooling when either or both are not autosized
IF (PTUnit(PTUnitNum)%CoolOutAirVolFlow .GT. PTUnit(PTUnitNum)%MaxCoolAirVolFlow .AND. &
PTUnit(PTUnitNum)%CoolOutAirVolFlow .NE. AutoSize .AND. PTUnit(PTUnitNum)%MaxCoolAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('..'//TRIM(cNumericFields(4))//' cannot be greater than '// &
TRIM(cNumericFields(1)))
CALL ShowContinueError('..'//TRIM(cNumericFields(1))//' = ' &
//TRIM(TrimSigDigits(Numbers(1),7)))
CALL ShowContinueError('..'//TRIM(cNumericFields(4))//' = ' &
//TRIM(TrimSigDigits(Numbers(4),7)))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%HeatOutAirVolFlow = Numbers(5)
IF (PTUnit(PTUnitNum)%HeatOutAirVolFlow .LT. 0 .AND. PTUnit(PTUnitNum)%HeatOutAirVolFlow.NE. AutoSize) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError(' illegal '//TRIM(cNumericFields(5))//' = ' &
//TRIM(TrimSigDigits(Numbers(5),7)))
ErrorsFound = .TRUE.
END IF
! only check that SA flow in heating is >= OA flow in heating when either or both are not autosized
IF (PTUnit(PTUnitNum)%HeatOutAirVolFlow .GT. PTUnit(PTUnitNum)%MaxHeatAirVolFlow .AND. &
PTUnit(PTUnitNum)%HeatOutAirVolFlow .NE. AutoSize .AND. PTUnit(PTUnitNum)%MaxHeatAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError('..'//TRIM(cNumericFields(5))//' cannot be greater than '// &
TRIM(cNumericFields(2)))
CALL ShowContinueError('..'//TRIM(cNumericFields(2))//' = ' &
//TRIM(TrimSigDigits(Numbers(2),7)))
CALL ShowContinueError('..'//TRIM(cNumericFields(5))//' = ' &
//TRIM(TrimSigDigits(Numbers(5),7)))
ErrorsFound = .TRUE.
END IF
PTUnit(PTUnitNum)%NoCoolHeatOutAirVolFlow = Numbers(6)
IF (PTUnit(PTUnitNum)%NoCoolHeatOutAirVolFlow .LT. 0 .AND. PTUnit(PTUnitNum)%NoCoolHeatOutAirVolFlow .NE. AutoSize) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(PTUnit(PTUnitNum)%Name)//'"')
CALL ShowContinueError(' illegal '//TRIM(cNumericFields(6))//' = ' &
//TRIM(TrimSigDigits(Numbers(6),7)))
ErrorsFound = .TRUE.
END IF
ELSE
PTUnit(PTUnitNum)%CoolOutAirVolFlow = 0.0d0
PTUnit(PTUnitNum)%HeatOutAirVolFlow = 0.0d0
PTUnit(PTUnitNum)%NoCoolHeatOutAirVolFlow = 0.0d0
IF(.NOT. lNumericBlanks(4) .OR. .NOT. lNumericBlanks(5) .OR. .NOT. lNumericBlanks(6))THEN
! user entered values for OA with no outdoor air mixer name specified
PTUnit(PTUnitNum)%CoolOutAirVolFlow = 0.0d0
END IF
END IF
!Set the heat pump heating coil capacity
! Get from coil module.
IF (PTUnit(PTUnitNum)%DXHeatCoilType_Num == Coil_HeatingWaterToAirHP) THEN
ErrFlag=.FALSE.
PTUnit(PTUnitNum)%DesignHeatingCapacity = &
GetWtoAHPCoilCapacity(PTUnit(PTUnitNum)%DXHeatCoilType,PTUnit(PTUnitNum)%DXHeatCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('...occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
ErrorsFound=.TRUE.
ENDIF
ELSEIF (PTUnit(PTUnitNum)%DXHeatCoilType_Num == Coil_HeatingWaterToAirHPSimple) THEN
ErrFlag=.FALSE.
PTUnit(PTUnitNum)%DesignHeatingCapacity = &
GetWtoAHPSimpleCoilCapacity(PTUnit(PTUnitNum)%DXHeatCoilType,PTUnit(PTUnitNum)%DXHeatCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('...occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
ErrorsFound=.TRUE.
ENDIF
ELSEIF (PTUnit(PTUnitNum)%DXHeatCoilType_Num == Coil_HeatingWaterToAirHPVSEquationFit) THEN
ErrFlag=.FALSE.
PTUnit(PTUnitNum)%DesignHeatingCapacity = &
GetCoilCapacityVariableSpeed(PTUnit(PTUnitNum)%DXHeatCoilType,PTUnit(PTUnitNum)%DXHeatCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('...occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
ErrorsFound=.TRUE.
ENDIF
ENDIF
!Set the heat pump heating coil convergence
PTUnit(PTUnitNum)%HeatConvergenceTol = 0.001d0
!Set the heat pump cooling coil capacity (Total capacity)
! Get from coil module.
IF (PTUnit(PTUnitNum)%DXCoolCoilType_Num == Coil_CoolingWaterToAirHP) THEN
ErrFlag=.FALSE.
PTUnit(PTUnitNum)%DesignCoolingCapacity = &
GetWtoAHPCoilCapacity(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('...occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
ErrorsFound=.TRUE.
ENDIF
ELSEIF (PTUnit(PTUnitNum)%DXCoolCoilType_Num == Coil_CoolingWaterToAirHPSimple) THEN
ErrFlag=.FALSE.
PTUnit(PTUnitNum)%DesignCoolingCapacity = &
GetWtoAHPSimpleCoilCapacity(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('...occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
ErrorsFound=.TRUE.
ENDIF
ELSEIF (PTUnit(PTUnitNum)%DXCoolCoilType_Num == Coil_CoolingWaterToAirHPVSEquationFit) THEN
ErrFlag=.FALSE.
PTUnit(PTUnitNum)%DesignCoolingCapacity = &
GetCoilCapacityVariableSpeed(PTUnit(PTUnitNum)%DXCoolCoilType,PTUnit(PTUnitNum)%DXCoolCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('...occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
ErrorsFound=.TRUE.
ENDIF
ENDIF
!Set the heat pump cooling coil convergence
PTUnit(PTUnitNum)%CoolConvergenceTol = 0.001d0
!Set the heatpump cycling rate
PTUnit(PTUnitNum)%MaxONOFFCyclesperHour = Numbers(7)
!Set the heat pump time constant
PTUnit(PTUnitNum)%HPTimeConstant = Numbers(8)
!Set the heat pump on-cycle power use fraction
PTUnit(PTUnitNum)%OnCyclePowerFraction = Numbers (9)
!Set the heat pump fan delay time
PTUnit(PTUnitNum)%FanDelayTime = Numbers(10)
!Set the heatpump design supplemental heating capacity
! Get from coil module.
IF(PTUnit(PTUnitNum)%SuppHeatCoilType_Num == Coil_HeatingGas .OR. &
PTUnit(PTUnitNum)%SuppHeatCoilType_Num == Coil_HeatingElectric)THEN
ErrFlag=.FALSE.
PTUnit(PTUnitNum)%DesignSuppHeatingCapacity = &
GetHeatingCoilCapacity(SuppHeatCoilType,SuppHeatCoilName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('...occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
ErrorsFound=.TRUE.
ENDIF
ENDIF
!Set the max outlet temperature for supplemental heating coil
PTUnit(PTUnitNum)%MaxSATSupHeat = Numbers(11)
!Set maximum supply air temperature for supplemental heating coil
PTUnit(PTUnitNum)%MaxOATSupHeat = Numbers(12)
!set minimum OA temp for WSHP compressor to large negative number (field not used for a WSHP)
PTUnit(PTUnitNum)%MinOATCompressor = -99999.0d0
END DO !End of the WatertoAirHeatPump Loop
!***********************************************************************************
DEALLOCATE(Alphas)
DEALLOCATE(Numbers)
DEALLOCATE(cAlphaFields)
DEALLOCATE(cNumericFields)
DEALLOCATE(lAlphaBlanks)
DEALLOCATE(lNumericBlanks)
IF (ErrorsFound) THEN
CALL ShowFatalError(RoutineName//'Errors found in getting input.')
CALL ShowContinueError('... Preceding condition causes termination.')
END IF
DO PTUnitNum=1,NumPTHP
! Setup Report variables for the Packaged Terminal Heat Psmps, CurrentModuleObject = 'ZoneHVAC:PackagedTerminalHeatPump'
CALL SetupOutputVariable('Zone Packaged Terminal Heat Pump Total Heating Rate [W]',PTUnit(PTUnitNum)%TotHeatEnergyRate,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Heat Pump Total Heating Energy [J]',PTUnit(PTUnitNum)%TotHeatEnergy,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Heat Pump Total Cooling Rate [W]',PTUnit(PTUnitNum)%TotCoolEnergyRate,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Heat Pump Total Cooling Energy [J]',PTUnit(PTUnitNum)%TotCoolEnergy,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Heat Pump Sensible Heating Rate [W]',PTUnit(PTUnitNum)%SensHeatEnergyRate,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Heat Pump Sensible Heating Energy [J]',PTUnit(PTUnitNum)%SensHeatEnergy,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Heat Pump Sensible Cooling Rate [W]',PTUnit(PTUnitNum)%SensCoolEnergyRate,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Heat Pump Sensible Cooling Energy [J]',PTUnit(PTUnitNum)%SensCoolEnergy,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Heat Pump Latent Heating Rate [W]',PTUnit(PTUnitNum)%LatHeatEnergyRate,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Heat Pump Latent Heating Energy [J]',PTUnit(PTUnitNum)%LatHeatEnergy,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Heat Pump Latent Cooling Rate [W]',PTUnit(PTUnitNum)%LatCoolEnergyRate,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Heat Pump Latent Cooling Energy [J]',PTUnit(PTUnitNum)%LatCoolEnergy,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Heat Pump Electric Power [W]',PTUnit(PTUnitNum)%ElecPower,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Heat Pump Electric Energy [J]',PTUnit(PTUnitNum)%ElecConsumption,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Heat Pump Fan Part Load Ratio []',PTUnit(PTUnitNum)%FanPartLoadRatio,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Heat Pump Compressor Part Load Ratio []',PTUnit(PTUnitNum)%CompPartLoadRatio,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Heat Pump Fan Availability Status []',PTUnit(PTUnitNum)%AvailStatus,&
'System','Average',PTUnit(PTUnitNum)%Name)
END DO
DO PTUnitNum=1+NumPTHP,NumPTHP+NumPTAC
! Setup Report variables for the Packaged Terminal Air Conditioners,
! CurrentModuleObject = 'ZoneHVAC:PackagedTerminalAirConditioner'
CALL SetupOutputVariable('Zone Packaged Terminal Air Conditioner Total Heating Rate [W]',PTUnit(PTUnitNum)%TotHeatEnergyRate,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Air Conditioner Total Heating Energy [J]',PTUnit(PTUnitNum)%TotHeatEnergy,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Air Conditioner Total Cooling Rate [W]',PTUnit(PTUnitNum)%TotCoolEnergyRate,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Air Conditioner Total Cooling Energy [J]',PTUnit(PTUnitNum)%TotCoolEnergy,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Air Conditioner Sensible Heating Rate [W]', &
PTUnit(PTUnitNum)%SensHeatEnergyRate,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Air Conditioner Sensible Heating Energy [J]',PTUnit(PTUnitNum)%SensHeatEnergy,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Air Conditioner Sensible Cooling Rate [W]', &
PTUnit(PTUnitNum)%SensCoolEnergyRate,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Air Conditioner Sensible Cooling Energy [J]',PTUnit(PTUnitNum)%SensCoolEnergy,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Air Conditioner Latent Heating Rate [W]',PTUnit(PTUnitNum)%LatHeatEnergyRate,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Air Conditioner Latent Heating Energy [J]',PTUnit(PTUnitNum)%LatHeatEnergy,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Air Conditioner Latent Cooling Rate [W]',PTUnit(PTUnitNum)%LatCoolEnergyRate,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Air Conditioner Latent Cooling Energy [J]',PTUnit(PTUnitNum)%LatCoolEnergy,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Air Conditioner Electric Power [W]',PTUnit(PTUnitNum)%ElecPower,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Air Conditioner Electric Energy [J]',PTUnit(PTUnitNum)%ElecConsumption,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Air Conditioner Fan Part Load Ratio []',PTUnit(PTUnitNum)%FanPartLoadRatio,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Air Conditioner Compressor Part Load Ratio []',&
PTUnit(PTUnitNum)%CompPartLoadRatio,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Packaged Terminal Air Conditioner Fan Availability Status []',PTUnit(PTUnitNum)%AvailStatus,&
'System','Average',PTUnit(PTUnitNum)%Name)
END DO
DO PTUnitNum=1+NumPTHP+NumPTAC,NumPTUs
! Setup Report variables for the Zone Water Source Heat Pumps, CurrentModuleObject='ZoneHVAC:WaterToAirHeatPump'
CALL SetupOutputVariable('Zone Water to Air Heat Pump Total Heating Rate [W]',PTUnit(PTUnitNum)%TotHeatEnergyRate,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Water to Air Heat Pump Total Heating Energy [J]',PTUnit(PTUnitNum)%TotHeatEnergy,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Water to Air Heat Pump Total Cooling Rate [W]',PTUnit(PTUnitNum)%TotCoolEnergyRate,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Water to Air Heat Pump Total Cooling Energy [J]',PTUnit(PTUnitNum)%TotCoolEnergy,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Water to Air Heat Pump Sensible Heating Rate [W]',PTUnit(PTUnitNum)%SensHeatEnergyRate,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Water to Air Heat Pump Sensible Heating Energy [J]',PTUnit(PTUnitNum)%SensHeatEnergy,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Water to Air Heat Pump Sensible Cooling Rate [W]',PTUnit(PTUnitNum)%SensCoolEnergyRate,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Water to Air Heat Pump Sensible Cooling Energy [J]',PTUnit(PTUnitNum)%SensCoolEnergy,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Water to Air Heat Pump Latent Heating Rate [W]',PTUnit(PTUnitNum)%LatHeatEnergyRate,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Water to Air Heat Pump Latent Heating Energy [J]',PTUnit(PTUnitNum)%LatHeatEnergy,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Water to Air Heat Pump Latent Cooling Rate [W]',PTUnit(PTUnitNum)%LatCoolEnergyRate,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Water to Air Heat Pump Latent Cooling Energy [J]',PTUnit(PTUnitNum)%LatCoolEnergy,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Water to Air Heat Pump Electric Power [W]',PTUnit(PTUnitNum)%ElecPower,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Water to Air Heat Pump Electric Energy [J]',PTUnit(PTUnitNum)%ElecConsumption,&
'System','Sum',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Water to Air Heat Pump Fan Part Load Ratio []',PTUnit(PTUnitNum)%FanPartLoadRatio,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Water to Air Heat Pump Compressor Part Load Ratio []',PTUnit(PTUnitNum)%CompPartLoadRatio,&
'System','Average',PTUnit(PTUnitNum)%Name)
CALL SetupOutputVariable('Zone Water to Air Heat Pump Fan Availability Status []',PTUnit(PTUnitNum)%AvailStatus,&
'System','Average',PTUnit(PTUnitNum)%Name)
END DO
RETURN
END SUBROUTINE GetPTUnit