SUBROUTINE GetZoneEquipmentData1
! SUBROUTINE INFORMATION:
! AUTHOR Russ Taylor
! DATE WRITTEN June 1997
! MODIFIED Aug 2003, FCW: set ZoneEquipConfig number for each zone
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Get all the system related equipment which may be attached to
! a zone
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: GetNumObjectsFound, GetObjectItem, FindIteminList, GetObjectItemNum, VerifyName, &
GetObjectDefMaxArgs, MakeUPPERCase, SameString
USE DataHeatBalance, ONLY: Zone
USE NodeInputManager, ONLY: GetOnlySingleNode, GetNodeNums, InitUniqueNodeCheck, CheckUniqueNodes, EndUniqueNodeCheck
USE DataHVACGlobals
USE BranchNodeConnections, ONLY: SetUpCompSets
USE DataLoopNode
USE General, ONLY: TrimSigDigits, RoundSigDigits
USE DataGlobals, ONLY: NumOfZones
USE DataInterfaces, ONLY: ShowSevereError, ShowContinueError, ShowFatalError, ShowWarningError
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName='GetZoneEquipmentData1: ' ! include trailing blank space
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
TYPE EquipListAudit
CHARACTER(len=MaxNameLength) :: ObjectType=' '
CHARACTER(len=MaxNameLength) :: ObjectName=' '
INTEGER :: OnListNum=0
END TYPE
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: NumAlphas
INTEGER :: NumNums
INTEGER :: NodeNum
INTEGER :: PathNum
INTEGER :: CompNum
INTEGER :: ControlledZoneNum
INTEGER :: ControlledZoneLoop
INTEGER :: ZoneEquipTypeNum
INTEGER :: ZoneEquipListNum
INTEGER :: IOSTAT
CHARACTER(len=MaxNameLength) :: InletNodeListName
CHARACTER(len=MaxNameLength) :: ExhaustNodeListName
CHARACTER(len=MaxNameLength), DIMENSION(:), ALLOCATABLE :: AlphArray
REAL(r64), DIMENSION(:), ALLOCATABLE :: NumArray
INTEGER MaxAlphas
INTEGER MaxNums
INTEGER NumParams
INTEGER :: NumNodes
INTEGER, ALLOCATABLE, DIMENSION(:) :: NodeNums
INTEGER :: Counter
LOGICAL :: ErrorsFound = .false. ! If errors detected in input
LOGICAL :: IsNotOK ! Flag to verify name
LOGICAL :: IsBlank ! Flag for blank name
LOGICAL :: NodeListError
LOGICAL :: UniqueNodeError
INTEGER :: NumOfControlledZones ! The number of Controlled Zone Equip Configuration objects
CHARACTER(len=MaxNameLength) :: CurrentModuleObject ! Object type for getting and error messages
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.
LOGICAL :: IdealLoadsOnEquipmentList
INTEGER :: found = 0
INTEGER :: maxEquipCount
INTEGER :: numEquipCount
TYPE (EquipListAudit), ALLOCATABLE, DIMENSION(:) :: ZoneEquipListAcct
INTEGER :: overallEquipCount
INTEGER :: Loop1
INTEGER :: Loop2
ExhaustNodeListName = ' '
InletNodeListName = ' '
! Look in the input file for zones with air loop and zone equipment attached
NumOfControlledZones = GetNumObjectsFound('ZoneHVAC:EquipmentConnections')
NumOfZoneEquipLists = GetNumObjectsFound('ZoneHVAC:EquipmentList') ! Look for lists of equipment data - there should
! be as many of these as there are controlled zones
CALL GetObjectDefMaxArgs('NodeList',NumParams,NumAlphas,NumNums)
ALLOCATE(NodeNums(NumParams))
NodeNums=0
CALL GetObjectDefMaxArgs('ZoneHVAC:EquipmentList',NumParams,NumAlphas,NumNums)
MaxAlphas=NumAlphas
MaxNums=NumNums
CALL GetObjectDefMaxArgs('ZoneHVAC:EquipmentConnections',NumParams,NumAlphas,NumNums)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
MaxNums=MAX(MaxNums,NumNums)
CALL GetObjectDefMaxArgs('AirLoopHVAC:SupplyPath',NumParams,NumAlphas,NumNums)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
MaxNums=MAX(MaxNums,NumNums)
CALL GetObjectDefMaxArgs('AirLoopHVAC:ReturnPath',NumParams,NumAlphas,NumNums)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
MaxNums=MAX(MaxNums,NumNums)
ALLOCATE(AlphArray(MaxAlphas))
AlphArray=' '
ALLOCATE(NumArray(MaxNums))
NumArray=0.0d0
ALLOCATE(cAlphaFields(MaxAlphas))
cAlphaFields=' '
ALLOCATE(cNumericFields(MaxNums))
cNumericFields=' '
ALLOCATE(lAlphaBlanks(MaxAlphas))
lAlphaBlanks=.true.
ALLOCATE(lNumericBlanks(MaxNums))
lNumericBlanks=.true.
IF (.not. ALLOCATED(SupplyAirPath)) THEN
! Look for and read in the air supply path
! component (splitters) information for each zone
NumSupplyAirPaths = GetNumObjectsFound('AirLoopHVAC:SupplyPath')
ALLOCATE (SupplyAirPath(NumSupplyAirPaths))
ENDIF
IF (.not. ALLOCATED(ReturnAirPath)) THEN
! Look for and read in the air return path
! component (mixers & plenums) information for each zone
NumReturnAirPaths = GetNumObjectsFound('AirLoopHVAC:ReturnPath')
ALLOCATE (ReturnAirPath(NumReturnAirPaths))
ENDIF
ALLOCATE (ZoneEquipConfig(NumOfZones)) ! Allocate the array containing the configuration
! data for each zone to the number of controlled zones
! found in the input file. This may or may not
! be the same as the number of zones in the building
ALLOCATE (ZoneEquipList(NumOfZones))
ALLOCATE (ZoneEquipAvail(NumOfZones))
ZoneEquipAvail = NoAction
IF (NumOfZoneEquipLists /= NumOfControlledZones) THEN
CALL ShowSevereError(RoutineName//'Number of Zone Equipment lists ['//TRIM(TrimSigDigits(NumOfZoneEquipLists))// &
'] not equal Number of Controlled Zones ['//TRIM(TrimSigDigits(NumOfControlledZones))//']')
CALL ShowContinueError('..Each Controlled Zone [ZoneHVAC:EquipmentConnections] must have a corresponding'// &
'(unique) ZoneHVAC:EquipmentList')
CALL ShowFatalError('GetZoneEquipment: Incorrect number of zone equipment lists')
END IF
IF (NumOfControlledZones > NumOfZones) THEN
CALL ShowSevereError(RoutineName//'Number of Controlled Zone objects ['//TRIM(TrimSigDigits(NumOfControlledZones))// &
'] greater than Number of Zones ['//TRIM(TrimSigDigits(NumOfZones))//']')
CALL ShowFatalError(RoutineName//'Too many ZoneHVAC:EquipmentConnections objects.')
ENDIF
CALL InitUniqueNodeCheck('ZoneHVAC:EquipmentConnections')
overallEquipCount=0
DO ControlledZoneLoop = 1,NumOfControlledZones
CurrentModuleObject = 'ZoneHVAC:EquipmentConnections'
CALL GetObjectItem(CurrentModuleObject,ControlledZoneLoop,AlphArray,NumAlphas, & ! Get Equipment
NumArray,NumNums,IOSTAT,NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields) ! data for one zone
ControlledZoneNum = FindItemInList(AlphArray(1),Zone%Name,NumOfZones)
IF (ControlledZoneNum == 0) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//': '// &
TRIM(cAlphaFields(1))//'="'//TRIM(AlphArray(1))//'"')
CALL ShowContinueError('..Requested Controlled Zone not among Zones, remaining items for this object not processed.')
ErrorsFound=.true.
CYCLE
ELSE
! Zone(ZoneEquipConfig(ControlledZoneNum)%ActualZoneNum)%ZoneEquipConfigNum = ControlledZoneNum
IF (Zone(ControlledZoneNum)%IsControlled) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//': '// &
TRIM(cAlphaFields(1))//'="'//TRIM(AlphArray(1))//'"')
CALL ShowContinueError('..Duplicate Controlled Zone entered, only one '//TRIM(CurrentModuleObject)//' per zone is allowed.')
ErrorsFound=.true.
CYCLE
ENDIF
Zone(ControlledZoneNum)%IsControlled = .true.
ZoneEquipConfig(ControlledZoneNum)%IsControlled=.true.
ZoneEquipConfig(ControlledZoneNum)%ActualZoneNum=ControlledZoneNum
ENDIF
ZoneEquipConfig(ControlledZoneNum)%ZoneName = AlphArray(1) ! for x-referencing with the geometry data
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(AlphArray(2),ZoneEquipConfig%EquipListName,ControlledZoneLoop-1,IsNotOK,IsBlank, &
TRIM(CurrentModuleObject)//TRIM(cAlphaFields(2)))
IF (IsNotOK) THEN
CALL ShowContinueError('..another Controlled Zone has been assigned that '//TRIM(cAlphaFields(2))//'.')
ErrorsFound=.true.
IF (IsBlank) AlphArray(2)='xxxxx'
ENDIF
ZoneEquipConfig(ControlledZoneNum)%EquipListName = AlphArray(2) ! the name of the list containing all the zone eq.
InletNodeListName = AlphArray(3)
ExhaustNodeListName = AlphArray(4)
ZoneEquipConfig(ControlledZoneNum)%ZoneNode = & ! all zone air state variables are
GetOnlySingleNode(AlphArray(5),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1), &
NodeType_Air,NodeConnectionType_ZoneNode,1,ObjectIsNotParent)
IF (ZoneEquipConfig(ControlledZoneNum)%ZoneNode == 0) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//': '// &
TRIM(cAlphaFields(1))//'="'//TRIM(AlphArray(1))//'", invalid')
CALL ShowContinueError(TRIM(cAlphaFields(5))//' must be present.')
ErrorsFound=.true.
ELSE
UniqueNodeError=.false.
CALL CheckUniqueNodes(cAlphaFields(5),'NodeName',UniqueNodeError,CheckName=AlphArray(5),ObjectName=AlphArray(1))
IF (UniqueNodeError) THEN
! CALL ShowContinueError('Occurs for '//TRIM(cAlphaFields(1))//' = '//TRIM(AlphArray(1)))
ErrorsFound=.true.
ENDIF
ENDIF
! assigned to this node
IF (ZoneEquipConfig(ControlledZoneNum)%ActualZoneNum > 0) THEN
Zone(ZoneEquipConfig(ControlledZoneNum)%ActualZoneNum)%SystemZoneNodeNumber = ZoneEquipConfig(ControlledZoneNum)%ZoneNode
ENDIF ! This error already detected and program will be terminated.
ZoneEquipConfig(ControlledZoneNum)%ReturnAirNode = & ! all return air state variables are
GetOnlySingleNode(AlphArray(6),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1), &
NodeType_Air,NodeConnectionType_ZoneReturn,1,ObjectIsNotParent)
! assigned to this node
IF (ZoneEquipConfig(ControlledZoneNum)%ReturnAirNode /= 0) THEN
UniqueNodeError=.false.
CALL CheckUniqueNodes(cAlphaFields(6),'NodeName',UniqueNodeError,CheckName=AlphArray(6),ObjectName=AlphArray(1))
IF (UniqueNodeError) THEN
! CALL ShowContinueError('Occurs for '//TRIM(cAlphaFields(1))//' = '//TRIM(AlphArray(1)))
ErrorsFound=.true.
ENDIF
ENDIF
! Read in the equipment type, name and sequence information
! for each equipment list
CurrentModuleObject = 'ZoneHVAC:EquipmentList'
ZoneEquipListNum = GetObjectItemNum(TRIM(CurrentModuleObject),ZoneEquipConfig(ControlledZoneNum)%EquipListName)
IF (ZoneEquipListNum > 0) THEN
CALL GetObjectItem(CurrentModuleObject,ZoneEquipListNum,AlphArray,NumAlphas, &
NumArray,NumNums,IOSTAT,NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields) ! data for one zone
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(AlphArray(1),ZoneEquipList%Name,ControlledZoneNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
CALL ShowContinueError('Bad Zone Equipment name in '//trim(CurrentModuleObject)//'="'// &
TRIM(ZoneEquipConfig(ControlledZoneNum)%EquipListName)//'"')
CALL ShowContinueError('For Zone="'//TRIM(ZoneEquipConfig(ControlledZoneNum)%ZoneName)//'".')
ErrorsFound=.true.
IF (IsBlank) AlphArray(1)='xxxxx'
ENDIF
ZoneEquipList(ControlledZoneNum)%Name =AlphArray(1)
maxEquipCount=0
numEquipCount=(NumAlphas-1)/2
if (numEquipCount*2 /= (NumAlphas-1)) numEquipCount=numEquipCount+1
DO ZoneEquipTypeNum = 1,numEquipCount
IF (.not. lAlphaBlanks(2*ZoneEquipTypeNum) .and. .not. lAlphaBlanks(2*ZoneEquipTypeNum + 1)) THEN
maxEquipCount=maxEquipCount+1
CYCLE
ENDIF
CALL ShowWarningError(RoutineName//trim(CurrentModuleObject)//'="'//trim(ZoneEquipList(ControlledZoneNum)%Name)// &
'", truncated list at blank field; object count='//trim(RoundSigDigits(maxEquipCount)))
EXIT
ENDDO
overallEquipCount=overallEquipCount+maxEquipCount
ZoneEquipList(ControlledZoneNum)%NumOfEquipTypes = maxEquipCount
ALLOCATE(ZoneEquipList(ControlledZoneNum)%EquipType(ZoneEquipList(ControlledZoneNum)%NumOfEquipTypes))
ALLOCATE(ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipList(ControlledZoneNum)%NumOfEquipTypes))
ALLOCATE(ZoneEquipList(ControlledZoneNum)%EquipName(ZoneEquipList(ControlledZoneNum)%NumOfEquipTypes))
ALLOCATE(ZoneEquipList(ControlledZoneNum)%EquipIndex(ZoneEquipList(ControlledZoneNum)%NumOfEquipTypes))
ALLOCATE(ZoneEquipList(ControlledZoneNum)%EquipData(ZoneEquipList(ControlledZoneNum)%NumOfEquipTypes))
ALLOCATE(ZoneEquipList(ControlledZoneNum)%CoolingPriority(ZoneEquipList(ControlledZoneNum)%NumOfEquipTypes))
ALLOCATE(ZoneEquipList(ControlledZoneNum)%HeatingPriority(ZoneEquipList(ControlledZoneNum)%NumOfEquipTypes))
ZoneEquipList(ControlledZoneNum)%EquipType=' '
ZoneEquipList(ControlledZoneNum)%EquipType_Num=0
ZoneEquipList(ControlledZoneNum)%EquipName=' '
ZoneEquipList(ControlledZoneNum)%EquipIndex=0
ZoneEquipList(ControlledZoneNum)%CoolingPriority=0
ZoneEquipList(ControlledZoneNum)%HeatingPriority=0
IdealLoadsOnEquipmentList=.false.
DO ZoneEquipTypeNum = 1, ZoneEquipList(ControlledZoneNum)%NumOfEquipTypes
ZoneEquipList(ControlledZoneNum)%EquipType(ZoneEquipTypeNum) = &
AlphArray(2*ZoneEquipTypeNum)
ZoneEquipList(ControlledZoneNum)%EquipName(ZoneEquipTypeNum) = &
AlphArray(2*ZoneEquipTypeNum + 1)
CALL ValidateComponent(ZoneEquipList(ControlledZoneNum)%EquipType(ZoneEquipTypeNum), &
ZoneEquipList(ControlledZoneNum)%EquipName(ZoneEquipTypeNum), &
IsNotOK,TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('In '//TRIM(CurrentModuleObject)//'='//TRIM(ZoneEquipList(ControlledZoneNum)%Name))
ErrorsFound=.true.
ENDIF
ZoneEquipList(ControlledZoneNum)%CoolingPriority(ZoneEquipTypeNum) = &
NINT(NumArray(2*ZoneEquipTypeNum-1))
IF ((ZoneEquipList(ControlledZoneNum)%CoolingPriority(ZoneEquipTypeNum) <= 0) .OR. &
(ZoneEquipList(ControlledZoneNum)%CoolingPriority(ZoneEquipTypeNum) > &
ZoneEquipList(ControlledZoneNum)%NumOfEquipTypes)) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(AlphArray(1))//'".')
CALL ShowContinueError('invalid '//TRIM(cNumericFields(2*ZoneEquipTypeNum-1))//'=['&
//TRIM(RoundSigDigits(ZoneEquipList(ControlledZoneNum)%CoolingPriority(ZoneEquipTypeNum)))//'].')
CALL ShowContinueError('equipment sequence must be > 0 and <= number of equipments in the list.')
IF (ZoneEquipList(ControlledZoneNum)%CoolingPriority(ZoneEquipTypeNum) > 0) &
CALL ShowContinueError('only '//trim(RoundSigDigits(ZoneEquipList(ControlledZoneNum)%NumOfEquipTypes))//' in the list.')
ErrorsFound=.true.
ENDIF
ZoneEquipList(ControlledZoneNum)%HeatingPriority(ZoneEquipTypeNum) = &
NINT(NumArray(2*ZoneEquipTypeNum))
IF ((ZoneEquipList(ControlledZoneNum)%HeatingPriority(ZoneEquipTypeNum) <= 0) .OR. &
(ZoneEquipList(ControlledZoneNum)%HeatingPriority(ZoneEquipTypeNum) > &
ZoneEquipList(ControlledZoneNum)%NumOfEquipTypes)) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(AlphArray(1))//'".')
CALL ShowContinueError('invalid '//TRIM(cNumericFields(2*ZoneEquipTypeNum))//'=['&
//TRIM(RoundSigDigits(ZoneEquipList(ControlledZoneNum)%HeatingPriority(ZoneEquipTypeNum)))//'].')
CALL ShowContinueError('equipment sequence must be > 0 and <= number of equipments in the list.')
IF (ZoneEquipList(ControlledZoneNum)%HeatingPriority(ZoneEquipTypeNum) > 0) &
CALL ShowContinueError('only '//trim(RoundSigDigits(ZoneEquipList(ControlledZoneNum)%NumOfEquipTypes))//' in the list.')
ErrorsFound=.true.
ENDIF
SELECT CASE(TRIM(MakeUPPERCase(ZoneEquipList(ControlledZoneNum)%EquipType(ZoneEquipTypeNum))))
CASE('ZONEHVAC:AIRDISTRIBUTIONUNIT')
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=AirDistUnit_Num
CASE('AIRTERMINAL:SINGLEDUCT:UNCONTROLLED')
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=DirectAir_Num
CASE ('ZONEHVAC:WINDOWAIRCONDITIONER') ! Window Air Conditioner
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=WindowAC_Num
CASE ('ZONEHVAC:PACKAGEDTERMINALHEATPUMP') ! Packaged Terminal Heat Pump
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=PkgTermHPAirToAir_Num
CASE ('ZONEHVAC:PACKAGEDTERMINALAIRCONDITIONER') ! Packaged Terminal Air Conditioner
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=PkgTermACAirToAir_Num
CASE ('AIRLOOPHVAC:UNITARYSYSTEM') ! Unitary System
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=ZoneUnitarySystem_Num
CASE ('ZONEHVAC:DEHUMIDIFIER:DX') ! Zone dehumidifier
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=ZoneDXDehumidifier_Num
CASE ('ZONEHVAC:WATERTOAIRHEATPUMP') ! Zone Water to Air Heat Pump
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=PkgTermHPWaterToAir_Num
CASE ('ZONEHVAC:FOURPIPEFANCOIL')! 4-Pipe Fan Coil
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=FanCoil4Pipe_Num
CASE ('ZONEHVAC:UNITVENTILATOR') ! Unit Ventilator
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=UnitVentilator_Num
CASE ('ZONEHVAC:UNITHEATER') ! Unit Heater
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=UnitHeater_Num
CASE('ZONEHVAC:IDEALLOADSAIRSYSTEM')
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=PurchasedAir_Num
CASE('ZONEHVAC:BASEBOARD:RADIANTCONVECTIVE:WATER') ! Hot Water Baseboard
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=BBWater_Num
CASE('ZONEHVAC:BASEBOARD:CONVECTIVE:WATER') ! Baseboard
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=BBWaterConvective_Num
CASE('ZONEHVAC:BASEBOARD:CONVECTIVE:ELECTRIC') ! Electric Baseboard
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=BBElectricConvective_Num
CASE('ZONEHVAC:HIGHTEMPERATURERADIANT') ! High Temperature Radiators
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=HiTempRadiant_Num
CASE ('ZONEHVAC:LOWTEMPERATURERADIANT:VARIABLEFLOW') ! Low temperature radiant system (hydronic)
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=LoTempRadiant_Num
CASE ('ZONEHVAC:LOWTEMPERATURERADIANT:CONSTANTFLOW') ! Low temperature radiant system (hydronic, constant flow)
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=LoTempRadiant_Num
CASE ('ZONEHVAC:LOWTEMPERATURERADIANT:ELECTRIC') ! Low temperature radiant system (electric)
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=LoTempRadiant_Num
CASE('FAN:ZONEEXHAUST')
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=ZoneExhaustFan_Num
CASE ('HEATEXCHANGER:AIRTOAIR:FLATPLATE')
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=HeatXchngr_Num
CASE ('ZONEHVAC:ENERGYRECOVERYVENTILATOR')
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=ERVStandAlone_Num
CASE ('WATERHEATER:HEATPUMP')
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=HPWaterHeater_Num
CASE ('ZONEHVAC:VENTILATEDSLAB') ! Ventilated Slab
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=VentilatedSlab_Num
CASE('ZONEHVAC:BASEBOARD:RADIANTCONVECTIVE:STEAM') ! Steam Baseboard
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=BBSteam_Num
CASE ('ZONEHVAC:OUTDOORAIRUNIT') ! Outdoor Air Unit
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=OutdoorAirUnit_Num
CASE('ZONEHVAC:BASEBOARD:RADIANTCONVECTIVE:ELECTRIC') ! Radiant electric Baseboard
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=BBElectric_Num
CASE('ZONEHVAC:TERMINALUNIT:VARIABLEREFRIGERANTFLOW') ! VRF AC System
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=VRFTerminalUnit_Num
CASE('ZONEHVAC:REFRIGERATIONCHILLERSET') ! Refrigeration chiller designed for warehouse applications
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=RefrigerationAirChillerSet_Num
CASE('ZONEHVAC:FORCEDAIR:USERDEFINED')
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=UserDefinedZoneHVACForcedAir_Num
CASE('ZONEHVAC:EVAPORATIVECOOLERUNIT')
ZoneEquipList(ControlledZoneNum)%EquipType_Num(ZoneEquipTypeNum)=ZoneEvaporativeCoolerUnit_Num
CASE DEFAULT
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//' = '//TRIM(ZoneEquipList(ControlledZoneNum)%Name))
CALL ShowContinueError('..Invalid Equipment Type = '//TRIM(ZoneEquipList(ControlledZoneNum)%EquipType(ZoneEquipTypeNum)))
ErrorsFound=.true.
END SELECT
END DO
DO ZoneEquipTypeNum = 1, ZoneEquipList(ControlledZoneNum)%NumOfEquipTypes
IF (COUNT(ZoneEquipList(ControlledZoneNum)%CoolingPriority==ZoneEquipTypeNum) > 1) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//' = '//TRIM(ZoneEquipList(ControlledZoneNum)%Name))
CALL ShowContinueError('...multiple assignments for Zone Equipment Cooling Sequence='// &
trim(RoundSigDigits(ZoneEquipTypeNum))// &
', must be 1-1 correspondence between sequence assignments and number of equipments.')
ErrorsFound=.true.
ELSEIF (COUNT(ZoneEquipList(ControlledZoneNum)%CoolingPriority==ZoneEquipTypeNum) == 0) THEN
CALL ShowWarningError(RoutineName//TRIM(CurrentModuleObject)//' = '//TRIM(ZoneEquipList(ControlledZoneNum)%Name))
CALL ShowContinueError('...zero assignments for Zone Equipment Cooling Sequence='// &
trim(RoundSigDigits(ZoneEquipTypeNum))//', apparent gap in sequence assignments in this equipment list.')
ENDIF
IF (COUNT(ZoneEquipList(ControlledZoneNum)%HeatingPriority==ZoneEquipTypeNum) > 1) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//' = '//TRIM(ZoneEquipList(ControlledZoneNum)%Name))
CALL ShowContinueError('...multiple assignments for Zone Equipment Heating or No-Load Sequence='// &
trim(RoundSigDigits(ZoneEquipTypeNum))// &
', must be 1-1 correspondence between sequence assignments and number of equipments.')
ErrorsFound=.true.
ELSEIF (COUNT(ZoneEquipList(ControlledZoneNum)%HeatingPriority==ZoneEquipTypeNum) == 0) THEN
CALL ShowWarningError(RoutineName//TRIM(CurrentModuleObject)//' = '//TRIM(ZoneEquipList(ControlledZoneNum)%Name))
CALL ShowContinueError('...zero assignments for Zone Equipment Heating or No-Load Sequence='// &
trim(RoundSigDigits(ZoneEquipTypeNum))//', apparent gap in sequence assignments in this equipment list.')
ENDIF
ENDDO
ELSE
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//' not found = '// &
TRIM(ZoneEquipConfig(ControlledZoneNum)%EquipListName))
CALL ShowContinueError('In ZoneHVAC:EquipmentConnections object, for Zone = '// &
TRIM(ZoneEquipConfig(ControlledZoneNum)%ZoneName))
ErrorsFound=.true.
END IF
! End ZoneHVAC:EquipmentList
NodeListError=.false.
CALL GetNodeNums(InletNodeListName,NumNodes,NodeNums,NodeListError,NodeType_Air,'ZoneHVAC:EquipmentConnections', &
ZoneEquipConfig(ControlledZoneNum)%ZoneName,NodeConnectionType_ZoneInlet,1,ObjectIsNotParent)
IF (.not. NodeListError) THEN
ZoneEquipConfig(ControlledZoneNum)%NumInletNodes = NumNodes
ALLOCATE(ZoneEquipConfig(ControlledZoneNum)%InletNode(NumNodes))
ALLOCATE(ZoneEquipConfig(ControlledZoneNum)%AirDistUnitCool(NumNodes))
ALLOCATE(ZoneEquipConfig(ControlledZoneNum)%AirDistUnitHeat(NumNodes))
DO NodeNum = 1, NumNodes
ZoneEquipConfig(ControlledZoneNum)%InletNode(NodeNum) = NodeNums(NodeNum)
UniqueNodeError=.false.
CALL CheckUniqueNodes('Zone Air Inlet Nodes','NodeNumber',UniqueNodeError,CheckNumber=NodeNums(NodeNum), &
ObjectName=ZoneEquipConfig(ControlledZoneNum)%ZoneName)
IF (UniqueNodeError) THEN
! CALL ShowContinueError('Occurs for Zone = '//TRIM(AlphArray(1)))
ErrorsFound=.true.
ENDIF
ZoneEquipConfig(ControlledZoneNum)%AirDistUnitCool(NodeNum)%InNode = 0
ZoneEquipConfig(ControlledZoneNum)%AirDistUnitHeat(NodeNum)%InNode = 0
ZoneEquipConfig(ControlledZoneNum)%AirDistUnitCool(NodeNum)%OutNode = 0
ZoneEquipConfig(ControlledZoneNum)%AirDistUnitHeat(NodeNum)%OutNode = 0
END DO
ELSE
CALL ShowContinueError('Invalid inlet node or NodeList name in ZoneHVAC:EquipmentConnections object, for Zone = '// &
TRIM(ZoneEquipConfig(ControlledZoneNum)%ZoneName))
ErrorsFound=.true.
ENDIF
NodeListError=.false.
CALL GetNodeNums(ExhaustNodeListName,NumNodes,NodeNums,NodeListError,NodeType_Air,'ZoneHVAC:EquipmentConnections', &
ZoneEquipConfig(ControlledZoneNum)%ZoneName,NodeConnectionType_ZoneExhaust,1,ObjectIsNotParent)
IF (.not. NodeListError) THEN
ZoneEquipConfig(ControlledZoneNum)%NumExhaustNodes = NumNodes
ALLOCATE(ZoneEquipConfig(ControlledZoneNum)%ExhaustNode(NumNodes))
DO NodeNum = 1, NumNodes
ZoneEquipConfig(ControlledZoneNum)%ExhaustNode(NodeNum) = NodeNums(NodeNum)
UniqueNodeError=.false.
CALL CheckUniqueNodes('Zone Air Exhaust Nodes','NodeNumber',UniqueNodeError,CheckNumber=NodeNums(NodeNum), &
ObjectName=ZoneEquipConfig(ControlledZoneNum)%ZoneName)
IF (UniqueNodeError) THEN
! CALL ShowContinueError('Occurs for Zone = '//TRIM(AlphArray(1)))
ErrorsFound=.true.
ENDIF
END DO
ELSE
CALL ShowContinueError('Invalid exhaust node or NodeList name in ZoneHVAC:EquipmentConnections object, for Zone='// &
TRIM(ZoneEquipConfig(ControlledZoneNum)%ZoneName))
ErrorsFound=.true.
ENDIF
END DO ! end loop over controlled zones
IF (ErrorsFound) THEN
CALL ShowWarningError(RoutineName//TRIM(CurrentModuleObject)//', duplicate items NOT CHECKED due to previous errors.')
overallEquipCount=0
ENDIF
IF (overallEquipCount > 0) THEN
ALLOCATE(ZoneEquipListAcct(overallEquipCount))
overallEquipCount=0
DO Loop1 = 1,NumOfControlledZones
DO Loop2=1,ZoneEquipList(Loop1)%NumOfEquipTypes
overallEquipCount=overallEquipCount+1
ZoneEquipListAcct(overallEquipCount)%ObjectType=ZoneEquipList(Loop1)%EquipType(Loop2)
ZoneEquipListAcct(overallEquipCount)%ObjectName=ZoneEquipList(Loop1)%EquipName(Loop2)
ZoneEquipListAcct(overallEquipCount)%OnListNum=Loop1
ENDDO
ENDDO
! Now check for uniqueness
DO Loop1=1,overallEquipCount
DO Loop2=Loop1+1,overallEquipCount
IF (ZoneEquipListAcct(Loop1)%ObjectType /= ZoneEquipListAcct(Loop2)%ObjectType .or. &
ZoneEquipListAcct(Loop1)%ObjectName /= ZoneEquipListAcct(Loop2)%ObjectName) CYCLE
! Duplicated -- not allowed
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//', duplicate items in ZoneHVAC:EquipmentList.')
CALL ShowContinueError('Equipment: Type='//trim(ZoneEquipListAcct(Loop1)%ObjectType)//', Name='// &
trim(ZoneEquipListAcct(Loop1)%ObjectName))
CALL ShowContinueError('Found on List="'//trim(ZoneEquipList(ZoneEquipListAcct(Loop1)%OnListNum)%Name)//'".')
CALL ShowContinueError('Equipment Duplicated on List="'// &
trim(ZoneEquipList(ZoneEquipListAcct(Loop2)%OnListNum)%Name)//'".')
ErrorsFound=.true.
ENDDO
ENDDO
DEALLOCATE(ZoneEquipListAcct)
ENDIF
!map ZoneEquipConfig%EquipListIndex to ZoneEquipList%Name
DO ControlledZoneLoop = 1,NumOfZones
found = FindItemInList(ZoneEquipList(ControlledZoneLoop)%Name, ZoneEquipConfig%EquipListName, NumOfZones)
IF (Found > 0) ZoneEquipConfig(found)%EquipListIndex = ControlledZoneLoop
END DO ! end loop over controlled zones
CALL EndUniqueNodeCheck('ZoneHVAC:EquipmentConnections')
CurrentModuleObject = 'AirLoopHVAC:SupplyPath'
DO PathNum = 1, NumSupplyAirPaths
CALL GetObjectItem(CurrentModuleObject,PathNum,AlphArray,NumAlphas, &
NumArray,NumNums,IOSTAT,NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields) ! data for one zone
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(AlphArray(1),SupplyAirPath%Name,PathNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
IF (IsBlank) AlphArray(1)='xxxxx'
ENDIF
SupplyAirPath(PathNum)%Name = AlphArray(1)
SupplyAirPath(PathNum)%NumOfComponents = NINT((REAL(NumAlphas,r64) - 2.0d0) / 2.0d0)
SupplyAirPath(PathNum)%InletNodeNum = &
GetOnlySingleNode(AlphArray(2),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1), &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsParent)
ALLOCATE(SupplyAirPath(PathNum)%ComponentType(SupplyAirPath(PathNum)%NumOfComponents))
ALLOCATE(SupplyAirPath(PathNum)%ComponentType_Num(SupplyAirPath(PathNum)%NumOfComponents))
SupplyAirPath(PathNum)%ComponentType_Num=0
ALLOCATE(SupplyAirPath(PathNum)%ComponentName(SupplyAirPath(PathNum)%NumOfComponents))
ALLOCATE(SupplyAirPath(PathNum)%ComponentIndex(SupplyAirPath(PathNum)%NumOfComponents))
ALLOCATE(SupplyAirPath(PathNum)%SplitterIndex(SupplyAirPath(PathNum)%NumOfComponents))
ALLOCATE(SupplyAirPath(PathNum)%PlenumIndex(SupplyAirPath(PathNum)%NumOfComponents))
Counter=3
DO CompNum = 1, SupplyAirPath(PathNum)%NumOfComponents
IF ((AlphArray(Counter) .EQ. 'AIRLOOPHVAC:ZONESPLITTER') .OR. &
(AlphArray(Counter) .EQ. 'AIRLOOPHVAC:SUPPLYPLENUM')) THEN
SupplyAirPath(PathNum)%ComponentType(CompNum) = AlphArray(Counter)
SupplyAirPath(PathNum)%ComponentName(CompNum) = AlphArray(Counter+1)
CALL ValidateComponent(SupplyAirPath(PathNum)%ComponentType(CompNum), &
SupplyAirPath(PathNum)%ComponentName(CompNum), &
IsNotOK,TRIM(CurrentModuleObject))
SupplyAirPath(PathNum)%ComponentIndex(CompNum) = 0
SupplyAirPath(PathNum)%SplitterIndex(CompNum) = 0
SupplyAirPath(PathNum)%PlenumIndex(CompNum) = 0
IF (AlphArray(Counter) == 'AIRLOOPHVAC:ZONESPLITTER') SupplyAirPath(PathNum)%ComponentType_Num(CompNum)=ZoneSplitter_Type
IF (AlphArray(Counter) == 'AIRLOOPHVAC:SUPPLYPLENUM') SupplyAirPath(PathNum)%ComponentType_Num(CompNum)=ZoneSupplyPlenum_Type
ELSE
CALL ShowSevereError(RoutineName//TRIM(cAlphaFields(1))//'="'//TRIM(SupplyAirPath(PathNum)%Name)//'"')
CALL ShowContinueError('Unhandled component type ="'//AlphArray(Counter)//'".')
CALL ShowContinueError('Must be "AirLoopHVAC:ZoneSplitter" or "AirLoopHVAC:SupplyPlenum"')
ErrorsFound = .TRUE.
ENDIF
Counter=Counter+2
END DO
SupplyAirPath(PathNum)%NumOutletNodes = 0
SupplyAirPath(PathNum)%NumNodes = 0
END DO ! end loop over supply air paths
CurrentModuleObject = 'AirLoopHVAC:ReturnPath'
DO PathNum = 1, NumReturnAirPaths
CALL GetObjectItem(CurrentModuleObject,PathNum,AlphArray,NumAlphas, &
NumArray,NumNums,IOSTAT,NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields) ! data for one zone
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(AlphArray(1),ReturnAirPath%Name,PathNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
IF (IsBlank) AlphArray(1)='xxxxx'
ENDIF
ReturnAirPath(PathNum)%Name = AlphArray(1)
ReturnAirPath(PathNum)%NumOfComponents = NINT((REAL(NumAlphas,r64) - 2.0d0) / 2.0d0)
ReturnAirPath(PathNum)%OutletNodeNum = &
GetOnlySingleNode(AlphArray(2),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsParent)
ALLOCATE(ReturnAirPath(PathNum)%ComponentType(ReturnAirPath(PathNum)%NumOfComponents))
ALLOCATE(ReturnAirPath(PathNum)%ComponentType_Num(ReturnAirPath(PathNum)%NumOfComponents))
ReturnAirPath(PathNum)%ComponentType_Num=0
ALLOCATE(ReturnAirPath(PathNum)%ComponentName(ReturnAirPath(PathNum)%NumOfComponents))
ALLOCATE(ReturnAirPath(PathNum)%ComponentIndex(ReturnAirPath(PathNum)%NumOfComponents))
Counter=3
DO CompNum = 1, ReturnAirPath(PathNum)%NumOfComponents
IF ((AlphArray(Counter) .EQ. 'AIRLOOPHVAC:ZONEMIXER') .OR. &
(AlphArray(Counter) .EQ. 'AIRLOOPHVAC:RETURNPLENUM')) THEN
ReturnAirPath(PathNum)%ComponentType(CompNum) = AlphArray(Counter)
ReturnAirPath(PathNum)%ComponentName(CompNum) = AlphArray(Counter+1)
ReturnAirPath(PathNum)%ComponentIndex(CompNum)=0
CALL ValidateComponent(ReturnAirPath(PathNum)%ComponentType(CompNum), &
ReturnAirPath(PathNum)%ComponentName(CompNum), &
IsNotOK,TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('In '//TRIM(CurrentModuleObject)//' = '//TRIM(ReturnAirPath(PathNum)%Name))
ErrorsFound=.true.
ENDIF
IF (AlphArray(Counter) == 'AIRLOOPHVAC:ZONEMIXER') ReturnAirPath(PathNum)%ComponentType_Num(CompNum)=ZoneMixer_Type
IF (AlphArray(Counter) == 'AIRLOOPHVAC:RETURNPLENUM') ReturnAirPath(PathNum)%ComponentType_Num(CompNum)=ZoneReturnPlenum_Type
ELSE
CALL ShowSevereError(RoutineName//TRIM(cAlphaFields(1))//'="'//TRIM(ReturnAirPath(PathNum)%Name)//'"')
CALL ShowContinueError('Unhandled component type ="'//AlphArray(Counter)//'".')
CALL ShowContinueError('Must be "AirLoopHVAC:ZoneMixer" or "AirLoopHVAC:ReturnPlenum"')
ErrorsFound = .TRUE.
ENDIF
Counter=Counter+2
END DO
END DO ! end loop over return air paths
DEALLOCATE(AlphArray)
DEALLOCATE(NumArray)
DEALLOCATE(cAlphaFields)
DEALLOCATE(cNumericFields)
DEALLOCATE(lAlphaBlanks)
DEALLOCATE(lNumericBlanks)
!setup zone equipment info for convection correlations
CALL SetupZoneEquipmentForConvectionFlowRegime
IF (ErrorsFound) THEN
CALL ShowFatalError(RoutineName//'Errors found in getting Zone Equipment input.')
ENDIF
RETURN
END SUBROUTINE GetZoneEquipmentData1