Note that the outdoor air unit fan electric is NOT metered because this value is already metered through the fan component
SUBROUTINE GetOutdoorAirUnitInputs
! SUBROUTINE INFORMATION:
! AUTHOR Young Tae Chae, Rick Strand
! DATE WRITTEN July 2009
! MODIFIED July 2012, Chandan Sharma - FSEC: Added zone sys avail managers
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine obtains the input for the outdoor air control unit and sets
! up the appropriate derived type.
! METHODOLOGY EMPLOYED:
! Standard EnergyPlus methodology.
! REFERENCES:
! Fred Buhl's fan coil module (FanCoilUnits.f90)
! Kwang Ho Lee's Unit Ventilator Module (UnitVentilator.f90)
! Young Tae Chae's Ventilated Slab System (VentilatedSlab.f90)
! Mixed Air.f90
! USE STATEMENTS:
USE InputProcessor
USE NodeInputManager, ONLY : GetOnlySingleNode
USE BranchNodeConnections, ONLY : SetUpCompSets,TestCompSet
USE WaterCoils, ONLY : GetWaterCoilMaxFlowRate=>GetCoilMaxWaterFlowRate,CheckWaterCoilSchedule
Use SteamCoils, ONLY : GetCoilAirInletNode, GetCoilAirOutletNode, &
GetSteamCoilMaxFlowRate=>GetCoilMaxWaterFlowRate, GetSteamCoilIndex, &
GetCoilSteamInletNode
USE FluidProperties, ONLY : FindRefrigerant
USE DataGlobals, ONLY : NumOfZones, ScheduleAlwaysOn
USE DataHeatBalance, ONLY : Zone, Construct
USE DataSizing, ONLY : AutoSize
USE ScheduleManager, ONLY : GetScheduleIndex
USE DataLoopNode
USE DataSurfaceLists
USE OutAirNodeManager, ONLY : CheckAndAddAirNodeNumber
USE WaterCoils, ONLY : GetCoilWaterInletNode, GetWCoilInletNode=>GetCoilInletNode, &
GetWCoilOutletNode=>GetCoilOutletNode, GetCoilWaterOutletNode
USE DXCoils, ONLY : GetDXCoilOutletNode => GetCoilOutletNode,GetDXCoilInletNode => GetCoilInletNode
USE DataGlobals, ONLY : AnyEnergyManagementSystemInModel
USE DataInterfaces, ONLY : SetupEMSActuator
USE HeatingCoils, ONLY : GetCoilInletNode, GetCoilOutletNode, GetElecCoilInletNode=>GetCoilInletNode, &
GetElecCoilOutletNode=>GetCoilOutletNode
USE HVACHXAssistedCoolingCoil,ONLY : GetHXAssistedCoilFlowRate=>GetCoilMaxWaterFlowRate, &
GetWHXCoilInletNode=>GetCoilInletNode,GetWHXCoilOutletNode=>GetCoilOutletNode
USE DataPlant, ONLY : TypeOf_CoilWaterCooling, TypeOf_CoilWaterSimpleHeating, TypeOf_CoilSteamAirHeating, &
TypeOf_CoilWaterDetailedFlatCooling
USE Fans, ONLY : GetFanIndex, GetFanType, GetFanAvailSchPtr
USE DataHVACGlobals, ONLY : cFanTypes, ZoneComp
USE DataZoneEquipment, ONLY : OutdoorAirUnit_Num
USE HVACDXSystem, ONLY : CheckDXCoolingCoilInOASysExists
USE HVACUnitarySystem, ONLY : CheckUnitarySysCoilInOASysExists
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: Blank = ' '
CHARACTER(len=*), PARAMETER :: RoutineName ='GetOutdoorAirUnitInputs: ' ! include trailing blank space
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: NumNums ! Number of real numbers returned by GetObjectItem
INTEGER :: NumAlphas ! Number of alphanumerics returned by GetObjectItem
INTEGER :: IOSTAT
INTEGER :: OAUnitNum
INTEGER :: CompNum
INTEGER :: Item
INTEGER :: NumComponents
INTEGER :: AlphaNum
CHARACTER(len=MaxNameLength) :: ComponentListName
INTEGER :: NumInList
INTEGER :: InListNum
INTEGER :: ListNum
LOGICAL :: ErrorsFound=.false.
LOGICAL :: IsNotOK ! Flag to verify name
LOGICAL :: IsBlank ! Flag for blank name
INTEGER :: MaxNums=0 ! Maximum number of numeric input fields
INTEGER :: MaxAlphas=0 ! Maximum number of alpha input fields
INTEGER :: TotalArgs=0 ! Total number of alpha and numeric arguments (max) for a
LOGICAL :: IsValid ! Set for outside air node check
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cAlphaArgs ! Alpha input items for object
CHARACTER(len=MaxNameLength) :: CurrentModuleObject ! Object type for getting and 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.
REAL(r64), ALLOCATABLE, DIMENSION(:) :: NumArray
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: AlphArray
LOGICAL :: ErrFlag = .FALSE.
! FLOW:
! Figure out how many outdoor air units there are in the input file
IF (.not. GetOutdoorAirUnitInputFlag) RETURN
CALL GetObjectDefMaxArgs(CurrentModuleObjects(CO_OAUnit),TotalArgs,NumAlphas,NumNums)
MaxNums=MAX(MaxNums,NumNums)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
CALL GetObjectDefMaxArgs(CurrentModuleObjects(CO_OAEqList),TotalArgs,NumAlphas,NumNums)
MaxNums=MAX(MaxNums,NumNums)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
ALLOCATE(AlphArray(MaxAlphas))
AlphArray=' '
ALLOCATE(cAlphaFields(MaxAlphas))
cAlphaFields=' '
ALLOCATE(NumArray(MaxNums))
NumArray=0.0d0
ALLOCATE(cNumericFields(MaxNums))
cNumericFields=' '
ALLOCATE(lAlphaBlanks(MaxAlphas))
lAlphaBlanks=.true.
ALLOCATE(lNumericBlanks(MaxNums))
lNumericBlanks=.true.
ALLOCATE(cAlphaArgs(NumAlphas))
cAlphaArgs=' '
CurrentModuleObject = CurrentModuleObjects(CO_OAUnit)
NumofOAUnits = GetNumObjectsFound(CurrentModuleObject)
ALLOCATE(OutAirUnit(NumofOAUnits))
ALLOCATE(MyOneTimeErrorFlag(NumofOAUnits))
MyOneTimeErrorFlag = .TRUE.
ALLOCATE(CheckEquipName(NumofOAUnits))
CheckEquipName=.true.
DO OAUnitNum=1,NumofOAUnits
CALL GetObjectItem(CurrentModuleObject,OAUnitNum,cAlphaArgs,NumAlphas,NumArray,NumNums,IOSTAT, &
NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields)
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(cAlphaArgs(1),OutAirUnit%Name,OAUnitNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
IF (IsBlank) cAlphaArgs(1)='xxxxx'
ENDIF
!A1
OutAirUnit(OAUnitNum)%Name = cAlphaArgs(1)
IsNotOK=.false.
IsBlank=.false.
!A2
OutAirUnit(OAUnitNum)%SchedName = cAlphaArgs(2)
IF (lAlphaBlanks(2)) THEN
OutAirUnit(OAUnitNum)%SchedPtr = ScheduleAlwaysOn
ELSE
OutAirUnit(OAUnitNum)%SchedPtr = GetScheduleIndex(cAlphaArgs(2)) ! convert schedule name to pointer
IF (OutAirUnit(OAUnitNum)%SchedPtr== 0) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaArgs(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrorsFound = .TRUE.
END IF
END IF
!A3
OutAirUnit(OAUnitNum)%ZoneName = cAlphaArgs(3)
OutAirUnit(OAUnitNum)%ZonePtr = FindIteminList(cAlphaArgs(3),Zone%Name,NumOfZones)
IF (OutAirUnit(OAUnitNum)%ZonePtr == 0) THEN
IF (lAlphaBlanks(3)) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaArgs(3))//' is required but input is blank.')
ELSE
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaArgs(3))//'="'//trim(cAlphaArgs(3))//'" not found.')
END IF
ErrorsFound=.true.
END IF
OutAirUnit(OAUnitNum)%ZoneNodeNum =Zone(OutAirUnit(OAUnitNum)%ZonePtr)%SystemZoneNodeNumber
! Outside air information:
!N1
OutAirUnit(OAUnitNum)%OutAirVolFlow = NumArray(1)
!A4
OutAirUnit(OAUnitNum)%OutAirSchedName = cAlphaArgs(4)
! convert schedule name to pointer
OutAirUnit(OAUnitNum)%OutAirSchedPtr = GetScheduleIndex(OutAirUnit(OAUnitNum)%OutAirSchedName)
IF (OutAirUnit(OAUnitNum)%OutAirSchedPtr == 0) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFields(4))//'="'//trim(cAlphaArgs(4))//'" not found.')
ErrorsFound=.TRUE.
END IF
!A5
OutAirUnit(OAUnitNum)%SFanName = cAlphaArgs(5)
CALL VerifyName(cAlphaArgs(5), OutAirUnit%SFanName, OAUnitNum -1, IsNotOK, IsBlank, 'OA Unit Supply Fan Name')
If (IsNotOK) THEN
ErrorsFound=.TRUE.
IF (IsBlank) cAlphaArgs(5) = 'xxxxx'
ENDIF
ErrFlag = .FALSE.
CALL GetFanType(OutAirUnit(OAUnitNum)%SFanName, OutAirUnit(OAUnitNum)%SFanType, ErrFlag, &
TRIM(CurrentModuleObject), OutAirUnit(OAUnitNum)%Name)
IF (.NOT. ErrFlag) THEN
OutAirUnit(OAUnitNum)%SFanAvailSchedPtr = GetFanAvailSchPtr(cFanTypes(OutAirUnit(OAUnitNum)%SFanType), &
OutAirUnit(OAUnitNum)%SFanName, ErrFlag)
! get fan index
CALL GetFanIndex(OutAirUnit(OAUnitNum)%SFanName, OutAirUnit(OAUnitNum)%SFan_Index, ErrorsFound)
ELSE
ErrorsFound=.TRUE.
ENDIF
!A6 :Fan Place
IF (SameString(cAlphaArgs(6),'BlowThrough')) OutAirUnit(OAUnitNum)%FanPlace = BlowThru
IF (SameString(cAlphaArgs(6),'DrawThrough')) OutAirUnit(OAUnitNum)%FanPlace = DrawThru
IF (OutAirUnit(OAUnitNum)%FanPlace .EQ. 0) THEN
CALL ShowSevereError('Invalid '//TRIM(cAlphaFields(6))//' = '//TRIM(cAlphaArgs(6)))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(cAlphaArgs(1)))
ErrorsFound = .TRUE.
END IF
!A7
IF (lAlphaBlanks(7)) THEN
OutAirUnit(OAUnitNum)%ExtFan = .FALSE.
ELSE IF (.NOT. lAlphaBlanks(7)) THEN
OutAirUnit(OAUnitNum)%ExtFanName = cAlphaArgs(7)
CALL VerifyName(cAlphaArgs(7), OutAirUnit%ExtFanName, OAUnitNum -1, IsNotOK, IsBlank, 'OA Unit Exhaust Fan Name')
If (IsNotOK) THEN
ErrorsFound=.TRUE.
IF (IsBlank) cAlphaArgs(7) = 'xxxxx'
ENDIF
ErrFlag = .FALSE.
CALL GetFanType(OutAirUnit(OAUnitNum)%ExtFanName, OutAirUnit(OAUnitNum)%ExtFanType, ErrFlag, &
TRIM(CurrentModuleObject), OutAirUnit(OAUnitNum)%Name)
IF (.NOT. ErrFlag) THEN
OutAirUnit(OAUnitNum)%ExtFanAvailSchedPtr = GetFanAvailSchPtr(cFanTypes(OutAirUnit(OAUnitNum)%ExtFanType), &
OutAirUnit(OAUnitNum)%ExtFanName, ErrFlag)
! get fan index
CALL GetFanIndex(OutAirUnit(OAUnitNum)%ExtFanName, OutAirUnit(OAUnitNum)%ExtFan_Index, ErrorsFound)
ELSE
ErrorsFound=.TRUE.
ENDIF
OutAirUnit(OAUnitNum)%ExtFan = .TRUE.
END IF
!N2
OutAirUnit(OAUnitNum)%ExtAirVolFlow = NumArray(2)
!A8
OutAirUnit(OAUnitNum)%ExtAirSchedName = cAlphaArgs(8)
! convert schedule name to pointer
OutAirUnit(OAUnitNum)%ExtOutAirSchedPtr = GetScheduleIndex(OutAirUnit(OAUnitNum)%ExtAirSchedName)
IF (OutAirUnit(OAUnitNum)%ExtFan) THEN
IF ((OutAirUnit(OAUnitNum)%ExtOutAirSchedPtr==0).OR.(lNumericBlanks(2))) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFields(7))//'="'//trim(cAlphaArgs(8))//'" not found.')
ErrorsFound=.TRUE.
END IF
END IF
IF (OutAirUnit(OAUnitNum)%ExtFan) THEN
CALL SetUpCompSets(TRIM(CurrentModuleObject), OutAirUnit(OAUnitNum)%Name, &
'UNDEFINED',cAlphaArgs(7),'UNDEFINED','UNDEFINED')
END IF
! Process the unit control type
IF (.NOT. lAlphaBlanks(9)) THEN
SELECT CASE (cAlphaArgs(9))
CASE ('NEUTRALCONTROL')
OutAirUnit(OAUnitNum)%ControlType = Neutral
CASE ('TEMPERATURECONTROL')
OutAirUnit(OAUnitNum)%ControlType = Temperature
END SELECt
ELSE
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFields(9))//'="'//trim(cAlphaArgs(9))//'".')
CALL ShowContinueError('Control reset to Unconditioned Control.')
OutAirUnit(OAUnitNum)%ControlType = Neutral
END IF
!A10:High Control Temp :
OutAirUnit(OAUnitNum)%HiCtrlTempSched = cAlphaArgs(10)
OutAirUnit(OAUnitNum)%HiCtrlTempSchedPtr = GetScheduleIndex(cAlphaArgs(10))
IF ((OutAirUnit(OAUnitNum)%HiCtrlTempSchedPtr == 0).AND. (.not. lAlphaBlanks(10))) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFields(10))//'="'//trim(cAlphaArgs(9))//'" not found.')
ErrorsFound=.true.
END IF
!A11:Low Control Temp :
OutAirUnit(OAUnitNum)%LoCtrlTempSched = cAlphaArgs(11)
OutAirUnit(OAUnitNum)%LoCtrlTempSchedPtr = GetScheduleIndex(cAlphaArgs(11))
IF ((OutAirUnit(OAUnitNum)%LoCtrlTempSchedPtr == 0).AND. (.not. lAlphaBlanks(11))) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFields(11))//'="'//trim(cAlphaArgs(10))//'" not found.')
ErrorsFound=.true.
END IF
OutAirUnit(OAUnitNum)%CompOutSetTemp=0.0d0
!A12~A15 : Node Condition
! Main air nodes (except outside air node):
OutAirUnit(OAUnitNum)%AirOutletNode = &
GetOnlySingleNode(cAlphaArgs(13),ErrorsFound,TRIM(CurrentModuleObject),cAlphaArgs(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsParent)
IF (.not. lAlphaBlanks(14)) THEN
OutAirUnit(OAUnitNum)%AirInletNode = &
GetOnlySingleNode(cAlphaArgs(14),ErrorsFound,TRIM(CurrentModuleObject),cAlphaArgs(1), &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsParent)
ELSE
IF (OutAirUnit(OAUnitNum)%ExtFan) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFields(14))//' cannot be blank when there is an exhaust fan.')
ErrorsFound=.true.
ENDIF
ENDIF
OutAirUnit(OAUnitNum)%SFanOutletNode = &
GetOnlySingleNode(cAlphaArgs(15),ErrorsFound,TRIM(CurrentModuleObject),cAlphaArgs(1), &
NodeType_Air,NodeConnectionType_Internal,1,ObjectIsNotParent)
OutAirUnit(OAUnitNum)%OutsideAirNode = &
! Set connection type to 'OutdoorAir', because this is hardwired to OA conditions
GetOnlySingleNode(cAlphaArgs(12),ErrorsFound,CurrentModuleObject,cAlphaArgs(1),&
NodeType_Air,NodeConnectionType_OutsideAirReference,1,ObjectIsNotParent)
IF (.not. lAlphaBlanks(12)) THEN
CALL CheckAndAddAirNodeNumber(OutAirUnit(OAUnitNum)%OutsideAirNode,IsValid)
IF (.not. IsValid) THEN
CALL ShowWarningError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))// &
'", Adding OutdoorAir:Node='//TRIM(cAlphaArgs(12)))
ENDIF
ENDIF
! When the fan position is "BlowThru", Each node is set up
IF (OutAirUnit(OAUnitNum)%FanPlace == BlowThru) THEN
CALL SetUpCompSets(TRIM(CurrentModuleObject), OutAirUnit(OAUnitNum)%Name, &
'UNDEFINED',cAlphaArgs(5),cAlphaArgs(12),cAlphaArgs(15))
END IF
!A16 : component list
CALL VerifyName(cAlphaArgs(16),OutAirUnit%ComponentListName,OAUnitNum-1,IsNotOK,IsBlank, &
TRIM(CurrentModuleObjects(CO_OAEqList))//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
IF (IsBlank) cAlphaArgs(16)='xxxxx'
ENDIF
ComponentListName = cAlphaArgs(16)
OutAirUnit(OAUnitNum)%ComponentListName = ComponentListName
IF (.NOT. lAlphaBlanks(16)) THEN
ListNum = GetObjectItemNum(CurrentModuleObjects(CO_OAEqList),ComponentListName)
IF (ListNum > 0) THEN
CALL GetObjectItem(CurrentModuleObjects(CO_OAEqList),ListNum,AlphArray,NumAlphas,NumArray,NumNums,IOSTAT)
NumInList = (NumAlphas-1)/2 ! potential problem if puts in type but not name
IF (MOD(NumAlphas-1,2) /= 0) NumInList=NumInList+1
OutAirUnit(OAUnitNum)%NumComponents = NumInList
ALLOCATE(OutAirUnit(OAUnitNum)%OAEquip(NumInList))
! Get information of component
DO InListNum=1,NumInList
OutAirUnit(OAUnitNum)%OAEquip(InListNum)%ComponentName = AlphArray(InListNum*2+1)
OutAirUnit(OAUnitNum)%OAEquip(InListNum)%ComponentType = AlphArray(InListNum*2)
CompNum=InListNum
SELECT CASE(MakeUPPERCase(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType))
! Coil Types
CASE('COIL:COOLING:WATER')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= WaterCoil_Cooling
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilPlantTypeOfNum = TypeOf_CoilWaterCooling
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentIndex =0
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilAirInletNode = &
GetWCoilInletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilAirOutletNode = &
GetWCoilOutletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilWaterInletNode = &
GetCoilWaterInletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilWaterOutletNode= &
GetCoilWaterOutletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow= &
GetWaterCoilMaxFlowRate(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MinVolWaterFlow=0.0d0
CASE('COIL:HEATING:WATER')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= WaterCoil_SimpleHeat
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilPlantTypeOfNum = TypeOf_CoilWaterSimpleHeating
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentIndex = 0
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilAirInletNode = &
GetWCoilInletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilAirOutletNode = &
GetWCoilOutletNode('Coil:Heating:Water', &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilWaterInletNode = &
GetCoilWaterInletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilWaterOutletNode= &
GetCoilWaterOutletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow= &
GetWaterCoilMaxFlowRate('Coil:Heating:Water', &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MinVolWaterFlow=0.0d0
CASE('COIL:HEATING:STEAM')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= SteamCoil_AirHeat
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilPlantTypeOfNum = TypeOf_CoilSteamAirHeating
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentIndex= &
GetSteamCoilIndex(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilAirInletNode = &
GetCoilAirInletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentIndex, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName, ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilAirOutletNode= &
GetCoilAirOutletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentIndex, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName, ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilWaterInletNode = &
GetCoilSteamInletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentIndex, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName, ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MinVolWaterFlow=0.0d0
! below: no extra error needed if steam properties not in input
! file because getting the steam coil will have done that.
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%FluidIndex=FindRefrigerant('Steam')
CASE('COIL:COOLING:WATER:DETAILEDGEOMETRY')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= WaterCoil_DetailedCool
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilPlantTypeOfNum = TypeOf_CoilWaterDetailedFlatCooling
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilAirInletNode = &
GetWCoilInletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilAirOutletNode = &
GetWCoilOutletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilWaterInletNode = &
GetCoilWaterInletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilWaterOutletNode = &
GetCoilWaterOutletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow = &
GetWaterCoilMaxFlowRate(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MinVolWaterFlow=0.0d0
CASE('COILSYSTEM:COOLING:WATER:HEATEXCHANGERASSISTED')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= WaterCoil_CoolingHXAsst
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilAirInletNode = &
GetWHXCoilInletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilAirOutletNode = &
GetWHXCoilOutletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilWaterInletNode = &
GetCoilWaterInletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilWaterOutletNode = &
GetCoilWaterOutletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MaxVolWaterFlow = &
GetHXAssistedCoilFlowRate(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%MinVolWaterFlow=0.0d0
CASE('COIL:HEATING:ELECTRIC')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= Coil_ElectricHeat
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilAirInletNode = &
GetElecCoilInletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilAirOutletNode = &
GetElecCoilOutletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
CASE('COIL:HEATING:GAS')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= Coil_GasHeat
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilAirInletNode = &
GetCoilInletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%CoilAirOutletNode = &
GetCoilOutletNode(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName,ErrorsFound)
CASE('COILSYSTEM:COOLING:DX')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= DXSystem
! set the data for 100% DOAS DX cooling coil
CALL CheckDXCoolingCoilInOASysExists(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName)
CASE('COILSYSTEM:HEATING:DX')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= DXHeatPumpSystem
CASE('AIRLOOPHVAC:UNITARYSYSTEM')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= UnitarySystem
CALL CheckUnitarySysCoilInOASysExists(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentName)
! Heat recovery
CASE('HEATEXCHANGER:AIRTOAIR:FLATPLATE')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= HeatXchngr
CASE('HEATEXCHANGER:AIRTOAIR:SENSIBLEANDLATENT')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= HeatXchngr
! CASE('HEATEXCHANGER:DESICCANT:BALANCEDFLOW')
! OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= HeatXchngr
! Desiccant Dehumidifier
CASE('DEHUMIDIFIER:DESICCANT:NOFANS')
OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= Desiccant
! Futher Enhancement
! CASE('DEHUMIDIFIER:DESICCANT:SYSTEM')
! OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType_Num= Desiccant
CASE DEFAULT
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = "'//TRIM(AlphArray(1))//'" invalid '// &
'Outside Air Component="'//TRIM(OutAirUnit(OAUnitNum)%OAEquip(CompNum)%ComponentType)//'".')
ErrorsFound=.true.
END SELECT
! Add equipment to component sets array
! Node set up
IF (OutAirUnit(OAUnitNum)%FanPlace == BlowThru) THEN
IF (InListNum.EQ.1) THEN ! the component is the first one
CALL SetUpCompSets('ZoneHVAC:OutdoorAirUnit',OutAirUnit(OAUnitNum)%Name, &
OutAirUnit(OAUnitNum)%OAEquip(InListNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(InListNum)%ComponentName, &
cAlphaArgs(15),'UNDEFINED')
ELSE IF (.Not. InListNum.EQ.NumInList) THEN ! the component is placed in b/w components
CALL SetUpCompSets('ZoneHVAC:OutdoorAirUnit',OutAirUnit(OAUnitNum)%Name, &
OutAirUnit(OAUnitNum)%OAEquip(InListNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(InListNum)%ComponentName, &
'UNDEFINED','UNDEFINED')
ELSE IF(InListNum .EQ.NumInList) THEN ! the component is the last one
CALL SetUpCompSets('ZoneHVAC:OutdoorAirUnit',OutAirUnit(OAUnitNum)%Name, &
OutAirUnit(OAUnitNum)%OAEquip(InListNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(InListNum)%ComponentName, &
'UNDEFINED',cAlphaArgs(13))
END IF
! If fan is on the end of equipment.
ELSE IF (OutAirUnit(OAUnitNum)%FanPlace == DrawThru) THEN
IF (InListNum.EQ.1) THEN
CALL SetUpCompSets('ZoneHVAC:OutdoorAirUnit',OutAirUnit(OAUnitNum)%Name, &
OutAirUnit(OAUnitNum)%OAEquip(InListNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(InListNum)%ComponentName, &
cAlphaArgs(12),'UNDEFINED')
ELSE IF (.Not. InListNum.EQ.NumInList) THEN
CALL SetUpCompSets('ZoneHVAC:OutdoorAirUnit',OutAirUnit(OAUnitNum)%Name, &
OutAirUnit(OAUnitNum)%OAEquip(InListNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(InListNum)%ComponentName, &
'UNDEFINED','UNDEFINED')
ELSE IF(InListNum .EQ.NumInList) THEN
CALL SetUpCompSets('ZoneHVAC:OutdoorAirUnit',OutAirUnit(OAUnitNum)%Name, &
OutAirUnit(OAUnitNum)%OAEquip(InListNum)%ComponentType, &
OutAirUnit(OAUnitNum)%OAEquip(InListNum)%ComponentName, &
'UNDEFINED','UNDEFINED')
END IF
END IF
END DO ! End Inlist
! In case of draw through, the last component is linked with the zone air supply node
IF (OutAirUnit(OAUnitNum)%FanPlace == DrawThru) THEN
CALL SetUpCompSets(TRIM(CurrentModuleObject), OutAirUnit(OAUnitNum)%Name, &
'UNDEFINED',cAlphaArgs(5),'UNDEFINED',cAlphaArgs(13))
END IF
ELSE ! when ListNum<0
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = "'//TRIM(cAlphaArgs(1))//'" invalid '// &
TRIM(cAlphaFields(16))//'="'//TRIM(cAlphaArgs(16))//'" not found.')
ErrorsFound=.true.
END IF
ELSE ! when Equipment list is left blanked
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = "'//TRIM(cAlphaArgs(1))//'" invalid '// &
TRIM(cAlphaFields(16))//' is blank and must be entered.')
ErrorsFound=.true.
ENDIF
IF (.NOT. lAlphaBlanks(17)) THEN
OutAirUnit(OAUnitNum)%AvailManagerListName = cAlphaArgs(17)
ZoneComp(OutdoorAirUnit_Num)%ZoneCompAvailMgrs(OAUnitNum)%AvailManagerListName = cAlphaArgs(17)
ENDIF
END DO
IF (ErrorsFound) THEN
CALL ShowFatalError(RoutineName//'Errors found in getting '//TRIM(CurrentModuleObject)//'.')
ENDIF
DEALLOCATE(AlphArray)
DEALLOCATE(cAlphaFields)
DEALLOCATE(NumArray)
DEALLOCATE(cNumericFields)
DEALLOCATE(lAlphaBlanks)
DEALLOCATE(lNumericBlanks)
GetOutdoorAirUnitInputFlag = .FALSE.
! Setup Report variables for the zone outdoor air unit CurrentModuleObject='ZoneHVAC:OutdoorAirUnit'
DO OAUnitNum = 1, NumOfOAUnits
CALL SetupOutputVariable('Zone Outdoor Air Unit Total Heating Rate [W]', &
OutAirUnit(OAUnitNum)%TotHeatingRate,'System', &
'Average', OutAirUnit(OAUnitNum)%Name)
CALL SetupOutputVariable('Zone Outdoor Air Unit Total Heating Energy [J]', &
OutAirUnit(OAUnitNum)%TotHeatingEnergy,'System', &
'Sum', OutAirUnit(OAUnitNum)%Name)
CALL SetupOutputVariable('Zone Outdoor Air Unit Sensible Heating Rate [W]', &
OutAirUnit(OAUnitNum)%SensHeatingRate,'System', &
'Average', OutAirUnit(OAUnitNum)%Name)
CALL SetupOutputVariable('Zone Outdoor Air Unit Sensible Heating Energy [J]', &
OutAirUnit(OAUnitNum)%SensHeatingEnergy,'System', &
'Sum', OutAirUnit(OAUnitNum)%Name)
CALL SetupOutputVariable('Zone Outdoor Air Unit Latent Heating Rate [W]', &
OutAirUnit(OAUnitNum)%LatHeatingRate,'System', &
'Average', OutAirUnit(OAUnitNum)%Name)
CALL SetupOutputVariable('Zone Outdoor Air Unit Latent Heating Energy [J]', &
OutAirUnit(OAUnitNum)%LatHeatingEnergy,'System', &
'Sum', OutAirUnit(OAUnitNum)%Name)
CALL SetupOutputVariable('Zone Outdoor Air Unit Total Cooling Rate [W]', &
OutAirUnit(OAUnitNum)%TotCoolingRate,'System', &
'Average', OutAirUnit(OAUnitNum)%Name)
CALL SetupOutputVariable('Zone Outdoor Air Unit Total Cooling Energy [J]', &
OutAirUnit(OAUnitNum)%TotCoolingEnergy,'System', &
'Sum', OutAirUnit(OAUnitNum)%Name)
CALL SetupOutputVariable('Zone Outdoor Air Unit Sensible Cooling Rate [W]', &
OutAirUnit(OAUnitNum)%SensCoolingRate,'System', &
'Average', OutAirUnit(OAUnitNum)%Name)
CALL SetupOutputVariable('Zone Outdoor Air Unit Sensible Cooling Energy [J]', &
OutAirUnit(OAUnitNum)%SensCoolingEnergy,'System', &
'Sum', OutAirUnit(OAUnitNum)%Name)
CALL SetupOutputVariable('Zone Outdoor Air Unit Latent Cooling Rate [W]', &
OutAirUnit(OAUnitNum)%LatCoolingRate,'System', &
'Average', OutAirUnit(OAUnitNum)%Name)
CALL SetupOutputVariable('Zone Outdoor Air Unit Latent Cooling Energy [J]', &
OutAirUnit(OAUnitNum)%LatCoolingEnergy,'System', &
'Sum', OutAirUnit(OAUnitNum)%Name)
CALL SetupOutputVariable('Zone Outdoor Air Unit Air Mass Flow Rate [kg/s]', &
OutAirUnit(OAUnitNum)%AirMassFlow,'System','Average', &
OutAirUnit(OAUnitNum)%Name)
CALL SetupOutputVariable('Zone Outdoor Air Unit Fan Electric Power [W]', &
OutAirUnit(OAUnitNum)%ElecFanRate,'System', &
'Average', OutAirUnit(OAUnitNum)%Name)
CALL SetupOutputVariable('Zone Outdoor Air Unit Fan Electric Energy [J]', &
OutAirUnit(OAUnitNum)%ElecFanEnergy,'System','Sum', &
OutAirUnit(OAUnitNum)%Name)
CALL SetupOutputVariable('Zone Outdoor Air Unit Fan Availability Status []',OutAirUnit(OAUnitNum)%AvailStatus, &
'System','Average',OutAirUnit(OAUnitNum)%Name)
!! Note that the outdoor air unit fan electric is NOT metered because this value is already metered through the fan component
END DO
RETURN
END SUBROUTINE GetOutdoorAirUnitInputs