SUBROUTINE GetSysInput
! SUBROUTINE INFORMATION:
! AUTHOR Richard Liesen
! DATE WRITTEN April 1998
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is the main routine to call other input routines and Get routines
! METHODOLOGY EMPLOYED:
! Uses the status flags to trigger events.
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor
USE NodeInputManager, ONLY: GetOnlySingleNode
USE DataZoneEquipment, ONLY: ZoneEquipConfig
USE DataDefineEquip, ONLY: AirDistUnit, NumAirDistUnits
USE WaterCoils, ONLY: GetCoilWaterInletNode,GetCoilOutletNode
USE SteamCoils, ONLY: GetCoilSteamInletNode,GetSteamCoilIndex,GetCoilAirOutletNode
USE HeatingCoils, ONLY: GetHeatingCoilCapacity=>GetCoilCapacity, GetHeatingCoilOutletNode=>GetCoilOutletNode
USE Fans, ONLY: GetFanInletNode,GetFanOutletNode
USE DataIPShortCuts
USE DataHeatBalance
USE DataSizing, ONLY: OARequirements, NumOARequirements
USE DataPlant, ONLY: TypeOf_CoilWaterSimpleHeating, TypeOf_CoilSteamAirHeating
USE DataGlobals, ONLY: DoZoneSizing, ScheduleAlwaysOn
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName='GetSysInput: ' ! include trailing blank
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: SysNum = 0 ! The Sys that you are currently loading input into
INTEGER :: SysIndex = 0 ! The Sys that you are currently loading input into
INTEGER :: NumVAVSys = 0
INTEGER :: NumNoRHVAVSys = 0
INTEGER :: NumVAVVS = 0
INTEGER :: NumCBVAVSys = 0
INTEGER :: NumNoRHCBVAVSys = 0
INTEGER :: NumAlphas = 0
INTEGER :: NumNums = 0
INTEGER :: NumZoneSiz
INTEGER :: ZoneSizIndex
INTEGER :: IOSTAT
INTEGER :: ZoneNum ! Index to actual zone number
LOGICAL :: ErrorsFound = .false. ! If errors detected in input
LOGICAL :: IsNotOK ! Flag to verify name
LOGICAL :: IsBlank ! Flag for blank name
INTEGER :: CtrlZone ! controlled zone do loop index
INTEGER :: SupAirIn ! controlled zone supply air inlet index
INTEGER :: ADUNum ! air distribution unit index
CHARACTER(Len=MaxNameLength) :: CurrentModuleObject ! for ease in getting objects
CHARACTER(Len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: Alphas ! Alpha input items for object
CHARACTER(Len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cAlphaFields ! Alpha field names
CHARACTER(Len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cNumericFields ! Numeric field names
REAL(r64), ALLOCATABLE, DIMENSION(:) :: Numbers ! Numeric input items for object
LOGICAL, ALLOCATABLE, DIMENSION(:) :: lAlphaBlanks ! Logical array, alpha field input BLANK = .true.
LOGICAL, ALLOCATABLE, DIMENSION(:) :: lNumericBlanks ! Logical array, numeric field input BLANK = .true.
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
! certain object in the input file
! Flow
NumVAVSys = GetNumObjectsFound('AirTerminal:SingleDuct:VAV:Reheat')
NumNoRHVAVSys = GetNumObjectsFound('AirTerminal:SingleDuct:VAV:NoReheat')
NumConstVolSys = GetNumObjectsFound('AirTerminal:SingleDuct:ConstantVolume:Reheat')
NumVAVVS = GetNumObjectsFound('AirTerminal:SingleDuct:VAV:Reheat:VariableSpeedFan')
NumCBVAVSys = GetNumObjectsFound('AirTerminal:SingleDuct:VAV:HeatAndCool:Reheat')
NumNoRHCBVAVSys = GetNumObjectsFound('AirTerminal:SingleDuct:VAV:HeatAndCool:NoReheat')
NumSys = NumVAVSys + NumConstVolSys + NumNoRHVAVSys + NumVAVVS + NumCBVAVSys + NumNoRHCBVAVSys
ALLOCATE(Sys(NumSys))
ALLOCATE(SysInlet(NumSys))
ALLOCATE(SysOutlet(NumSys))
ALLOCATE(CheckEquipName(NumSys))
CheckEquipName=.true.
ALLOCATE(MassFlow1(NumSys))
ALLOCATE(MassFlow2(NumSys))
ALLOCATE(MassFlow3(NumSys))
ALLOCATE(MassFlowDiff(NumSys))
MassFlow1 = 0.0D0
MassFlow2 = 0.0D0
MassFlow3 = 0.0D0
MassFlowDiff = 0.0D0
CALL GetObjectDefMaxArgs('AirTerminal:SingleDuct:VAV:Reheat',TotalArgs,NumAlphas,NumNums)
MaxNums=MAX(MaxNums,NumNums)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
CALL GetObjectDefMaxArgs('AirTerminal:SingleDuct:VAV:NoReheat',TotalArgs,NumAlphas,NumNums)
MaxNums=MAX(MaxNums,NumNums)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
CALL GetObjectDefMaxArgs('AirTerminal:SingleDuct:ConstantVolume:Reheat',TotalArgs,NumAlphas,NumNums)
MaxNums=MAX(MaxNums,NumNums)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
CALL GetObjectDefMaxArgs('AirTerminal:SingleDuct:VAV:Reheat:VariableSpeedFan',TotalArgs,NumAlphas,NumNums)
MaxNums=MAX(MaxNums,NumNums)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
CALL GetObjectDefMaxArgs('AirTerminal:SingleDuct:VAV:HeatAndCool:Reheat',TotalArgs,NumAlphas,NumNums)
MaxNums=MAX(MaxNums,NumNums)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
CALL GetObjectDefMaxArgs('AirTerminal:SingleDuct:VAV:HeatAndCool:NoReheat',TotalArgs,NumAlphas,NumNums)
MaxNums=MAX(MaxNums,NumNums)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
ALLOCATE(Alphas(MaxAlphas))
Alphas=' '
ALLOCATE(cAlphaFields(MaxAlphas))
cAlphaFields=' '
ALLOCATE(cNumericFields(MaxNums))
cNumericFields=' '
ALLOCATE(Numbers(MaxNums))
Numbers=0.0D0
ALLOCATE(lAlphaBlanks(MaxAlphas))
lAlphaBlanks=.true.
ALLOCATE(lNumericBlanks(MaxNums))
lNumericBlanks=.true.
!Start Loading the System Input
DO SysIndex = 1, NumVAVSys
CurrentModuleObject='AirTerminal:SingleDuct:VAV:Reheat'
CALL GetObjectItem(CurrentModuleObject,SysIndex,Alphas,NumAlphas,Numbers,NumNums,IOSTAT, &
AlphaBlank=lAlphaBlanks,NumBlank=lNumericBlanks, &
AlphaFieldnames=cAlphaFields,NumericFieldNames=cNumericFields)
SysNum = SysIndex
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(Alphas(1),Sys%SysName,SysNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
IF (IsBlank) Alphas(1)='xxxxx'
ENDIF
Sys(SysNum)%SysName = Alphas(1)
Sys(SysNum)%SysType = TRIM(CurrentModuleObject)
Sys(SysNum)%SysType_Num = SingleDuctVAVReheat
Sys(SysNum)%ReheatComp = Alphas(7)
IF (SameString(Sys(SysNum)%ReheatComp,'Coil:Heating:Gas')) THEN
Sys(SysNum)%ReheatComp_Num=HCoilType_Gas
ELSEIF (SameString(Sys(SysNum)%ReheatComp,'Coil:Heating:Electric')) THEN
Sys(SysNum)%ReheatComp_Num=HCoilType_Electric
ELSEIF (SameString(Sys(SysNum)%ReheatComp,'Coil:Heating:Water')) THEN
Sys(SysNum)%ReheatComp_Num=HCoilType_SimpleHeating
Sys(SysNum)%ReheatComp_PlantType = TypeOf_CoilWaterSimpleHeating
ELSEIF (SameString(Sys(SysNum)%ReheatComp,'Coil:Heating:Steam')) THEN
Sys(SysNum)%ReheatComp_Num=HCoilType_SteamAirHeating
Sys(SysNum)%ReheatComp_PlantType = TypeOf_CoilSteamAirHeating
ELSEIF (Sys(SysNum)%ReheatComp /= ' ') THEN
CALL ShowSevereError('Illegal '//TRIM(cAlphaFields(8))//' = '//TRIM(Sys(SysNum)%ReheatComp)//'.')
CALL ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
Sys(SysNum)%ReheatName = Alphas(8)
CALL ValidateComponent(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,IsNotOK,trim(Sys(SysNum)%SysType))
IF (IsNotOK) THEN
CALL ShowContinueError('In '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
Sys(SysNum)%Schedule = Alphas(2)
IF (lAlphaBlanks(2)) THEN
Sys(SysNum)%SchedPtr = ScheduleAlwaysOn
ELSE
Sys(SysNum)%SchedPtr = GetScheduleIndex(Alphas(2))
IF (Sys(SysNum)%SchedPtr == 0) THEN
CALL ShowSevereError(TRIM(cAlphaFields(2))//' = '//TRIM(Alphas(2))//' not found.')
CALL ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
ENDIF
! For node connections, this object is both a parent and a non-parent, because the
! VAV damper is not called out as a separate component, its nodes must be connected
! as ObjectIsNotParent. But for the reheat coil, the nodes are connected as ObjectIsParent
Sys(SysNum)%OutletNodeNum = &
GetOnlySingleNode(Alphas(3),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsNotParent,cAlphaFields(3))
Sys(SysNum)%InletNodeNum = &
GetOnlySingleNode(Alphas(4),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsNotParent,cAlphaFields(4))
Sys(SysNum)%MaxAirVolFlowRate = Numbers(1)
IF (SameString(Alphas(5) , 'Constant')) THEN
Sys(SysNum)%ZoneMinAirFracMethod = ConstantMinFrac
ELSEIF (SameString(Alphas(5), 'FixedFlowRate')) THEN
Sys(SysNum)%ZoneMinAirFracMethod = FixedMin
ELSEIF (SameString(Alphas(5), 'Scheduled')) THEN
Sys(SysNum)%ZoneMinAirFracMethod = ScheduledMinFrac
ELSE
CALL ShowSevereError(TRIM(cAlphaFields(5))//' = '//TRIM(Alphas(5))//' not found.')
CALL ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
IF (.NOT. lNumericBlanks(2)) THEN
Sys(SysNum)%ZoneMinAirFrac = Numbers(2)
Sys(SysNum)%ConstantMinAirFracSetByUser = .TRUE.
Sys(SysNum)%DesignMinAirFrac = Numbers(2)
ENDIF
IF (.NOT. lNumericBlanks(3)) THEN
Sys(SysNum)%ZoneFixedMinAir = Numbers(3)
Sys(SysNum)%FixedMinAirSetByUser = .TRUE.
Sys(SysNum)%DesignFixedMinAir = Numbers(3)
ENDIF
Sys(SysNum)%ZoneMinAirFracSchPtr = GetScheduleIndex(Alphas(6))
IF ((Sys(SysNum)%ZoneMinAirFracSchPtr == 0) .and. &
( Sys(SysNum)%ZoneMinAirFracMethod == ScheduledMinFrac) ) THEN
CALL ShowSevereError(TRIM(cAlphaFields(6))//' = '//TRIM(Alphas(6))//' not found.')
CALL ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
Call ShowContinueError('A valid schedule is required')
ErrorsFound=.true.
ELSEIf ((Sys(SysNum)%ZoneMinAirFracSchPtr > 0) .and. &
( Sys(SysNum)%ZoneMinAirFracMethod == ScheduledMinFrac) ) THEN
! check range of values in schedule
IF (.NOT. CheckScheduleValueMinMax(Sys(SysNum)%ZoneMinAirFracSchPtr,'>=',0.0d0,'<=',1.0d0)) Then
CALL ShowSevereError('Error found in '//TRIM(cAlphaFields(6))//' = '//TRIM(Alphas(6)) )
CAll ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
CALL ShowContinueError('Schedule values must be (>=0., <=1.)')
ENDIF
ENDIF
! The reheat coil control node is necessary for hot water and steam reheat, but not necessary for
! electric or gas reheat.
IF (Sys(SysNum)%ReheatComp_Num .NE. HCoilType_Gas .AND. Sys(SysNum)%ReheatComp_Num .NE. HCoilType_Electric) THEN
IF (Sys(SysNum)%ReheatComp_Num .EQ. HCoilType_SteamAirHeating)THEN
IsNotOK=.false.
Sys(SysNum)%ReheatControlNode = GetCoilSteamInletNode(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,IsNotOK)
IF (IsNotOK) THEN
CALL ShowContinueError('..Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
ELSE
IsNotOK=.false.
Sys(SysNum)%ReheatControlNode = GetCoilWaterInletNode(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,IsNotOK)
IF (IsNotOK) THEN
CALL ShowContinueError('..Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
END IF
END IF
Sys(SysNum)%ReheatAirOutletNode = &
GetOnlySingleNode(Alphas(9),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsParent,cAlphaFields(9))
IF (Sys(SysNum)%ReheatComp_Num .EQ. HCoilType_SteamAirHeating)THEN
Sys(SysNum)%MaxReheatSteamVolFlow = Numbers(4)
Sys(SysNum)%MinReheatSteamVolFlow = Numbers(5)
ELSE
Sys(SysNum)%MaxReheatWaterVolFlow = Numbers(4)
Sys(SysNum)%MinReheatWaterVolFlow = Numbers(5)
END IF
Sys(SysNum)%ControllerOffset = Numbers(6)
! Set default convergence tolerance
IF (Sys(SysNum)%ControllerOffset .LE. 0.0d0) THEN
Sys(SysNum)%ControllerOffset = 0.001d0
END IF
IF (SameString(Alphas(10),'Reverse')) THEN
Sys(SysNum)%DamperHeatingAction = ReverseAction
ELSE
Sys(SysNum)%DamperHeatingAction = Normal
END IF
! Register component set data
CALL TestCompSet(Sys(SysNum)%SysType,Sys(SysNum)%SysName, &
NodeID(Sys(SysNum)%InletNodeNum),NodeID(Sys(SysNum)%ReheatAirOutletNode),'Air Nodes')
! Fill the Zone Equipment data with the inlet node number of this unit.
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO SupAirIn = 1,ZoneEquipConfig(CtrlZone)%NumInletNodes
IF (Sys(SysNum)%ReheatAirOutletNode .EQ. ZoneEquipConfig(CtrlZone)%InletNode(SupAirIn)) THEN
IF (ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%OutNode > 0) THEN
CALL ShowSevereError('Error in connecting a terminal unit to a zone')
CALL ShowContinueError(TRIM(NodeID(Sys(SysNum)%ReheatAirOutletNode))//' already connects to another zone')
CALL ShowContinueError('Occurs for terminal unit '//TRIM(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
CALL ShowContinueError('Check terminal unit node names for errors')
ErrorsFound = .true.
ELSE
ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%InNode = Sys(SysNum)%InletNodeNum
ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%OutNode = Sys(SysNum)%ReheatAirOutletNode
END IF
Sys(SysNum)%CtrlZoneNum = CtrlZone
Sys(SysNum)%ActualZoneNum = ZoneEquipConfig(CtrlZone)%ActualZoneNum
Sys(SysNum)%ZoneFloorArea = Zone(Sys(SysNum)%ActualZoneNum)%FloorArea* &
Zone(Sys(SysNum)%ActualZoneNum)%Multiplier*Zone(Sys(SysNum)%ActualZoneNum)%ListMultiplier
END IF
END DO
END DO
IF (.NOT. lNumericBlanks(7)) THEN
IF(Numbers(7) .EQ. Autocalculate)THEN
Sys(SysNum)%MaxAirVolFlowRateDuringReheat = Numbers(7)
ELSE
Sys(SysNum)%MaxAirVolFlowRateDuringReheat = Numbers(7)*Sys(SysNum)%ZoneFloorArea
END IF
END IF
IF (.NOT. lNumericBlanks(8)) THEN
Sys(SysNum)%MaxAirVolFractionDuringReheat = Numbers(8)
END IF
! Maximum reheat air temperature, i.e. the maximum supply air temperature leaving the reheat coil
IF (.NOT. lNumericBlanks(9)) THEN
Sys(SysNum)%MaxReheatTemp = Numbers(9)
Sys(SysNum)%MaxReheatTempSetByUser = .TRUE.
ELSE
! user does not specify maximum supply air temperature
! Sys(SysNum)%MaxReheatTemp = 35.0D0 !C
Sys(SysNum)%MaxReheatTempSetByUser = .FALSE.
ENDIF
IF(.NOT. lAlphaBlanks(11))THEN
Sys(SysNum)%OARequirementsPtr = FindItemInList(Alphas(11),OARequirements%Name,NumOARequirements)
IF(Sys(SysNum)%OARequirementsPtr .EQ. 0)THEN
CALL ShowSevereError(TRIM(cAlphaFields(11))//' = '//TRIM(Alphas(11))//' not found.')
CALL ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ELSE
Sys(SysNum)%NoOAFlowInputFromUser = .FALSE.
END IF
END IF
CALL ValidateComponent(Alphas(7),Alphas(8),IsNotOK,Sys(SysNum)%SysType)
IF (IsNotOK) THEN
CALL ShowContinueError('In '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
! Add reheat coil to component sets array
CALL SetUpCompSets(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
Alphas(7),Alphas(8),Alphas(3),Alphas(9))
!Setup the Average damper Position output variable
CALL SetupOutputVariable('Zone Air Terminal VAV Damper Position []', Sys(Sysnum)%DamperPosition, &
'System','Average',Sys(Sysnum)%SysName)
CALL SetupOutputVariable('Zone Air Terminal Minimum Air Flow Fraction []', Sys(Sysnum)%ZoneMinAirFrac, &
'System','Average',Sys(Sysnum)%SysName)
CALL SetupOutputVariable('Zone Air Terminal Outdoor Air Volume Flow Rate [m3/s]', Sys(Sysnum)%OutdoorAirFlowRate, &
'System','Average',Sys(Sysnum)%SysName)
END DO ! end Number of Sys Loop
DO SysIndex = 1, NumCBVAVSys
CurrentModuleObject='AirTerminal:SingleDuct:VAV:HeatAndCool:Reheat'
CALL GetObjectItem(CurrentModuleObject,SysIndex,Alphas,NumAlphas,Numbers,NumNums,IOSTAT, &
AlphaBlank=lAlphaBlanks,NumBlank=lNumericBlanks, &
AlphaFieldnames=cAlphaFields,NumericFieldNames=cNumericFields)
SysNum = SysIndex + NumVAVSys
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(Alphas(1),Sys%SysName,SysNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
IF (IsBlank) Alphas(1)='xxxxx'
ENDIF
Sys(SysNum)%SysName = Alphas(1)
Sys(SysNum)%SysType = TRIM(CurrentModuleObject)
Sys(SysNum)%SysType_Num = SingleDuctCBVAVReheat
Sys(SysNum)%ReheatComp = Alphas(6)
IF (SameString(Sys(SysNum)%ReheatComp,'Coil:Heating:Gas')) THEN
Sys(SysNum)%ReheatComp_Num=HCoilType_Gas
ELSEIF (SameString(Sys(SysNum)%ReheatComp,'Coil:Heating:Electric')) THEN
Sys(SysNum)%ReheatComp_Num=HCoilType_Electric
ELSEIF (SameString(Sys(SysNum)%ReheatComp,'Coil:Heating:Water')) THEN
Sys(SysNum)%ReheatComp_Num=HCoilType_SimpleHeating
Sys(SysNum)%ReheatComp_PlantType = TypeOf_CoilWaterSimpleHeating
ELSEIF (SameString(Sys(SysNum)%ReheatComp,'Coil:Heating:Steam')) THEN
Sys(SysNum)%ReheatComp_Num=HCoilType_SteamAirHeating
Sys(SysNum)%ReheatComp_PlantType = TypeOf_CoilSteamAirHeating
ELSEIF (Sys(SysNum)%ReheatComp /= ' ') THEN
CALL ShowSevereError('Illegal '//TRIM(cAlphaFields(6))//' = '//TRIM(Sys(SysNum)%ReheatComp)//'.')
CALL ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
Sys(SysNum)%ReheatName = Alphas(7)
CALL ValidateComponent(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,IsNotOK,Sys(SysNum)%SysType)
IF (IsNotOK) THEN
CALL ShowContinueError('In '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
Sys(SysNum)%Schedule = Alphas(2)
IF (lAlphaBlanks(2)) THEN
Sys(SysNum)%SchedPtr = ScheduleAlwaysOn
ELSE
Sys(SysNum)%SchedPtr = GetScheduleIndex(Alphas(2))
IF (Sys(SysNum)%SchedPtr == 0) THEN
CALL ShowSevereError(TRIM(cAlphaFields(2))//' = '//TRIM(Alphas(2))//' not found.')
CALL ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
ENDIF
! For node connections, this object is both a parent and a non-parent, because the
! VAV damper is not called out as a separate component, its nodes must be connected
! as ObjectIsNotParent. But for the reheat coil, the nodes are connected as ObjectIsParent
Sys(SysNum)%OutletNodeNum = &
GetOnlySingleNode(Alphas(3),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsNotParent,cAlphaFields(3))
Sys(SysNum)%InletNodeNum = &
GetOnlySingleNode(Alphas(4),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsNotParent,cAlphaFields(4))
Sys(SysNum)%MaxAirVolFlowRate = Numbers(1)
Sys(SysNum)%ZoneMinAirFrac = Numbers(2)
IF (Sys(SysNum)%ZoneMinAirFrac .LT. 0.0d0) THEN
CALL ShowWarningError(trim(Sys(SysNum)%SysType)//' "'//TRIM(Sys(SysNum)%SysName)//'"')
CALL ShowContinueError(TRIM(cNumericFields(2))//' must be greater than or equal to 0. Resetting to 0 and' &
//' the simulation continues.')
Sys(SysNum)%ZoneMinAirFrac = 0.0d0
END IF
IF (Sys(SysNum)%ZoneMinAirFrac .GT. 1.0d0) THEN
CALL ShowWarningError(trim(Sys(SysNum)%SysType)//' "'//TRIM(Sys(SysNum)%SysName)//'"')
CALL ShowContinueError(TRIM(cNumericFields(2))//' must be less than or equal to 1. Resetting to 1 and' &
//' the simulation continues.')
Sys(SysNum)%ZoneMinAirFrac = 1.0d0
END IF
! The reheat coil control node is necessary for hot water and steam reheat, but not necessary for
! electric or gas reheat.
IF (Sys(SysNum)%ReheatComp_Num .EQ. HCoilType_Gas .OR. Sys(SysNum)%ReheatComp_Num .EQ. HCoilType_Electric) THEN
! IF(.NOT. lAlphaBlanks(5)) THEN
! CALL ShowWarningError('In '//trim(Sys(SysNum)%SysType)//' = ' //TRIM(Sys(SysNum)%SysName) &
! // ' the '//TRIM(cAlphaFields(5))//' is not needed and will be ignored.')
! CALL ShowContinueError(' It is used for hot water and steam reheat coils only.')
! END IF
ELSE
! IF(lAlphaBlanks(5)) THEN
! CALL ShowSevereError('In '//trim(Sys(SysNum)%SysType)//' = ' //TRIM(Sys(SysNum)%SysName) &
! // ' the '//TRIM(cAlphaFields(5))//' is undefined.')
! ErrorsFound=.true.
! ELSE
IF (Sys(SysNum)%ReheatComp_Num .EQ. HCoilType_SteamAirHeating)THEN
IsNotOK=.false.
Sys(SysNum)%ReheatControlNode = GetCoilSteamInletNode(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,IsNotOK)
IF (IsNotOK) THEN
CALL ShowContinueError('..Occurs in '//trim(Sys(SysNum)%SysType)//' = ' // TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
! GetOnlySingleNode(Alphas(5),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
! NodeType_Steam,NodeConnectionType_Actuator,1,ObjectIsParent)
ELSE
IsNotOK=.false.
Sys(SysNum)%ReheatControlNode = GetCoilWaterInletNode(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,IsNotOK)
IF (IsNotOK) THEN
CALL ShowContinueError('..Occurs in '//trim(Sys(SysNum)%SysType)//' = ' // TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
! GetOnlySingleNode(Alphas(5),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
! NodeType_Water,NodeConnectionType_Actuator,1,ObjectIsParent)
END IF
! END IF
END IF
Sys(SysNum)%ReheatAirOutletNode = &
GetOnlySingleNode(Alphas(8),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsParent,cAlphaFields(8))
IF (Sys(SysNum)%ReheatComp_Num .EQ. HCoilType_SteamAirHeating)THEN
Sys(SysNum)%MaxReheatSteamVolFlow = Numbers(3)
Sys(SysNum)%MinReheatSteamVolFlow = Numbers(4)
ELSE
Sys(SysNum)%MaxReheatWaterVolFlow = Numbers(3)
Sys(SysNum)%MinReheatWaterVolFlow = Numbers(4)
END IF
Sys(SysNum)%ControllerOffset = Numbers(5)
! Set default convergence tolerance
IF (Sys(SysNum)%ControllerOffset .LE. 0.0d0) THEN
Sys(SysNum)%ControllerOffset = 0.001d0
END IF
Sys(SysNum)%DamperHeatingAction = ReverseAction
! Register component set data
CALL TestCompSet(Sys(SysNum)%SysType,Sys(SysNum)%SysName, &
NodeID(Sys(SysNum)%InletNodeNum),NodeID(Sys(SysNum)%ReheatAirOutletNode),'Air Nodes')
! Fill the Zone Equipment data with the inlet node number of this unit
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO SupAirIn = 1,ZoneEquipConfig(CtrlZone)%NumInletNodes
IF (Sys(SysNum)%ReheatAirOutletNode .EQ. ZoneEquipConfig(CtrlZone)%InletNode(SupAirIn)) THEN
IF (ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%OutNode > 0) THEN
CALL ShowSevereError('Error in connecting a terminal unit to a zone')
CALL ShowContinueError(TRIM(NodeID(Sys(SysNum)%ReheatAirOutletNode))//' already connects to another zone')
CALL ShowContinueError('Occurs for terminal unit '//TRIM(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
CALL ShowContinueError('Check terminal unit node names for errors')
ErrorsFound = .true.
ELSE
ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%InNode = Sys(SysNum)%InletNodeNum
ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%OutNode = Sys(SysNum)%ReheatAirOutletNode
END IF
END IF
END DO
END DO
IF (.NOT. lNumericBlanks(6)) THEN
Sys(SysNum)%MaxReheatTemp = Numbers(6)
Sys(SysNum)%MaxReheatTempSetByUser = .TRUE.
ELSE
! user does not specify maximum supply air temperature
! Sys(SysNum)%MaxReheatTemp = 35.0D0 !C
Sys(SysNum)%MaxReheatTempSetByUser = .FALSE.
ENDIF
CALL ValidateComponent(Alphas(6),Alphas(7),IsNotOK,Sys(SysNum)%SysType)
IF (IsNotOK) THEN
CALL ShowContinueError('In '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
! Add reheat coil to component sets array
CALL SetUpCompSets(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
Alphas(6),Alphas(7),Alphas(3),Alphas(8))
!Setup the Average damper Position output variable
CALL SetupOutputVariable('Zone Air Terminal VAV Damper Position []', Sys(Sysnum)%DamperPosition, &
'System','Average',Sys(Sysnum)%SysName)
END DO ! end Number of VAVHeatandCool Sys Loop
CurrentModuleObject='AirTerminal:SingleDuct:ConstantVolume:Reheat'
DO SysIndex = 1, NumConstVolSys
CALL GetObjectItem(CurrentModuleObject,SysIndex,Alphas,NumAlphas,Numbers,NumNums,IOSTAT, &
AlphaBlank=lAlphaBlanks,NumBlank=lNumericBlanks, &
AlphaFieldnames=cAlphaFields,NumericFieldNames=cNumericFields)
SysNum = SysIndex + NumVAVSys + NumCBVAVSys
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(Alphas(1),Sys%SysName,SysNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
IF (IsBlank) Alphas(1)='xxxxx'
ENDIF
Sys(SysNum)%SysName = Alphas(1)
Sys(SysNum)%SysType = CurrentModuleObject
Sys(SysNum)%SysType_Num = SingleDuctConstVolReheat
Sys(SysNum)%ReheatComp = Alphas(6)
IF (SameString(Sys(SysNum)%ReheatComp,'Coil:Heating:Gas')) THEN
Sys(SysNum)%ReheatComp_Num=HCoilType_Gas
ELSEIF (SameString(Sys(SysNum)%ReheatComp,'Coil:Heating:Electric')) THEN
Sys(SysNum)%ReheatComp_Num=HCoilType_Electric
ELSEIF (SameString(Sys(SysNum)%ReheatComp,'Coil:Heating:Water')) THEN
Sys(SysNum)%ReheatComp_Num=HCoilType_SimpleHeating
Sys(SysNum)%ReheatComp_PlantType = TypeOf_CoilWaterSimpleHeating
ELSEIF (SameString(Sys(SysNum)%ReheatComp,'Coil:Heating:Steam')) THEN
Sys(SysNum)%ReheatComp_Num=HCoilType_SteamAirHeating
Sys(SysNum)%ReheatComp_PlantType = TypeOf_CoilSteamAirHeating
ELSE
CALL ShowSevereError('Illegal '//TRIM(cAlphaFields(6))//' = '//TRIM(Sys(SysNum)%ReheatComp)//'.')
CALL ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
Sys(SysNum)%ReheatName = Alphas(7)
CALL ValidateComponent(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,IsNotOK,Sys(SysNum)%SysType)
IF (IsNotOK) THEN
CALL ShowContinueError('In '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
Sys(SysNum)%Schedule = Alphas(2)
IF (lAlphaBlanks(2)) THEN
Sys(SysNum)%SchedPtr = ScheduleAlwaysOn
ELSE
Sys(SysNum)%SchedPtr = GetScheduleIndex(Alphas(2))
IF (Sys(SysNum)%SchedPtr == 0) THEN
CALL ShowSevereError(TRIM(cAlphaFields(2))//' = '//TRIM(Alphas(2))//' not found.')
CALL ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
ENDIF
Sys(SysNum)%OutletNodeNum = &
GetOnlySingleNode(Alphas(3),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsParent,cAlphaFields(3))
Sys(SysNum)%InletNodeNum = &
GetOnlySingleNode(Alphas(4),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsParent,cAlphaFields(4))
! The reheat coil control node is necessary for hot water reheat, but not necessary for
! electric or gas reheat.
IF (Sys(SysNum)%ReheatComp_Num .EQ. HCoilType_Gas .OR. Sys(SysNum)%ReheatComp_Num .EQ. HCoilType_Electric) THEN
! IF(.NOT. lAlphaBlanks(5)) THEN
! CALL ShowWarningError('In '//trim(Sys(SysNum)%SysType)//' = ' // TRIM(Sys(SysNum)%SysName) &
! // ' the '//TRIM(cAlphaFields(5))//' is not needed and will be ignored.')
! CALL ShowContinueError(' It is used for hot water reheat coils only.')
! END IF
ELSE
! IF(lAlphaBlanks(5)) THEN
! CALL ShowSevereError('In '//trim(Sys(SysNum)%SysType)//' = ' // TRIM(Sys(SysNum)%SysName) &
! // ' the '//TRIM(cAlphaFields(5))//' is undefined.')
! ErrorsFound=.true.
! END IF
IF (Sys(SysNum)%ReheatComp_Num .EQ. HCoilType_SteamAirHeating)THEN
IsNotOK=.false.
Sys(SysNum)%ReheatControlNode = GetCoilSteamInletNode(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,IsNotOK)
IF (IsNotOK) THEN
CALL ShowContinueError('..Occurs in '//trim(Sys(SysNum)%SysType)//' = ' // TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
! GetOnlySingleNode(Alphas(5),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
! NodeType_Steam,NodeConnectionType_Actuator,1,ObjectIsParent)
Else
IsNotOK=.false.
Sys(SysNum)%ReheatControlNode = GetCoilWaterInletNode(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,IsNotOK)
IF (IsNotOK) THEN
CALL ShowContinueError('..Occurs in '//trim(Sys(SysNum)%SysType)//' = ' // TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
! GetOnlySingleNode(Alphas(5),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
! NodeType_Water,NodeConnectionType_Actuator,1,ObjectIsParent)
EndIF
END IF
Sys(SysNum)%ReheatAirOutletNode= Sys(SysNum)%OutletNodeNum
Sys(SysNum)%MaxAirVolFlowRate = Numbers(1)
Sys(SysNum)%ZoneMinAirFrac = 0.0D0
IF (Sys(SysNum)%ReheatComp_Num .EQ. HCoilType_SteamAirHeating)THEN
Sys(SysNum)%MaxReheatSteamVolFlow = Numbers(2)
Sys(SysNum)%MinReheatSteamVolFlow = Numbers(3)
Else
Sys(SysNum)%MaxReheatWaterVolFlow = Numbers(2)
Sys(SysNum)%MinReheatWaterVolFlow = Numbers(3)
END IF
Sys(SysNum)%ControllerOffset = Numbers(4)
! Set default convergence tolerance
IF (Sys(SysNum)%ControllerOffset .LE. 0.0d0) THEN
Sys(SysNum)%ControllerOffset = 0.001d0
END IF
! Maximum reheat air temperature, i.e. the maximum supply air temperature leaving the reheat coil
IF (.NOT. lNumericBlanks(5)) THEN
Sys(SysNum)%MaxReheatTemp = Numbers(5)
Sys(SysNum)%MaxReheatTempSetByUser = .TRUE.
ELSE
! user does not specify maximum supply air temperature
! Sys(SysNum)%MaxReheatTemp = 35.0D0 !C
Sys(SysNum)%MaxReheatTempSetByUser = .FALSE.
ENDIF
! Register component set data
CALL TestCompSet(Sys(SysNum)%SysType,Sys(SysNum)%SysName, &
NodeID(Sys(SysNum)%InletNodeNum),NodeID(Sys(SysNum)%OutletNodeNum),'Air Nodes')
! Fill the Zone Equipment data with the inlet node number of this unit.
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO SupAirIn = 1,ZoneEquipConfig(CtrlZone)%NumInletNodes
IF (Sys(SysNum)%OutletNodeNum .EQ. ZoneEquipConfig(CtrlZone)%InletNode(SupAirIn)) THEN
IF (ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%OutNode > 0) THEN
CALL ShowSevereError('Error in connecting a terminal unit to a zone')
CALL ShowContinueError(TRIM(NodeID(Sys(SysNum)%OutletNodeNum))//' already connects to another zone')
CALL ShowContinueError('Occurs for terminal unit '//TRIM(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
CALL ShowContinueError('Check terminal unit node names for errors')
ErrorsFound = .true.
ELSE
ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%InNode = Sys(SysNum)%InletNodeNum
ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%OutNode = Sys(SysNum)%OutletNodeNum
END IF
END IF
END DO
END DO
CALL ValidateComponent(Alphas(6),Alphas(7),IsNotOK,Sys(SysNum)%SysType)
IF (IsNotOK) THEN
CALL ShowContinueError('In '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
! Add reheat coil to component sets array
CALL SetUpCompSets(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
Alphas(6),Alphas(7),Alphas(4),Alphas(3))
!Setup the Average damper Position output variable
! BG removed 9-10-2009 during work on CR 7770, constant volume has no damper
! CALL SetupOutputVariable('Damper Position', Sys(Sysnum)%DamperPosition, &
! 'System','Average',Sys(Sysnum)%SysName)
END DO ! End Number of Sys Loop
DO SysIndex = 1, NumNoRHVAVSys
CurrentModuleObject='AirTerminal:SingleDuct:VAV:NoReheat'
CALL GetObjectItem(CurrentModuleObject,SysIndex,Alphas,NumAlphas,Numbers,NumNums,IOSTAT, &
AlphaBlank=lAlphaBlanks,NumBlank=lNumericBlanks, &
AlphaFieldnames=cAlphaFields,NumericFieldNames=cNumericFields)
SysNum = SysIndex + NumVAVSys + NumCBVAVSys + NumConstVolSys
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(Alphas(1),Sys%SysName,SysNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
IF (IsBlank) Alphas(1)='xxxxx'
ENDIF
Sys(SysNum)%SysName = Alphas(1)
Sys(SysNum)%SysType = CurrentModuleObject
Sys(SysNum)%SysType_Num = SingleDuctVAVNoReheat
Sys(SysNum)%ReheatComp = ' '
Sys(SysNum)%ReheatName = ' '
Sys(SysNum)%Schedule = Alphas(2)
IF (lAlphaBlanks(2)) THEN
Sys(SysNum)%SchedPtr = ScheduleAlwaysOn
ELSE
Sys(SysNum)%SchedPtr = GetScheduleIndex(Alphas(2))
IF (Sys(SysNum)%SchedPtr == 0) THEN
CALL ShowSevereError(TRIM(cAlphaFields(2))//' = '//TRIM(Alphas(2))//' not found.')
CALL ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
ENDIF
Sys(SysNum)%OutletNodeNum = &
GetOnlySingleNode(Alphas(3),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsNotParent,cAlphaFields(3))
Sys(SysNum)%InletNodeNum = &
GetOnlySingleNode(Alphas(4),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsNotParent,cAlphaFields(4))
Sys(SysNum)%MaxAirVolFlowRate = Numbers(1)
IF (SameString(Alphas(5) , 'Constant')) THEN
Sys(SysNum)%ZoneMinAirFracMethod = ConstantMinFrac
ELSEIF (SameString(Alphas(5), 'FixedFlowRate')) THEN
Sys(SysNum)%ZoneMinAirFracMethod = FixedMin
ELSEIF (SameString(Alphas(5), 'Scheduled')) THEN
Sys(SysNum)%ZoneMinAirFracMethod = ScheduledMinFrac
ELSE
CALL ShowSevereError(TRIM(cAlphaFields(5))//' = '//TRIM(Alphas(5))//' not found.')
CALL ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
IF (.NOT. lNumericBlanks(2)) THEN
Sys(SysNum)%ZoneMinAirFrac = Numbers(2)
Sys(SysNum)%ConstantMinAirFracSetByUser = .TRUE.
Sys(SysNum)%DesignMinAirFrac = Numbers(2)
ENDIF
IF (.NOT. lNumericBlanks(3)) THEN
Sys(SysNum)%ZoneFixedMinAir = Numbers(3)
Sys(SysNum)%FixedMinAirSetByUser = .TRUE.
Sys(SysNum)%DesignFixedMinAir = Numbers(3)
ENDIF
Sys(SysNum)%ZoneMinAirFracSchPtr = GetScheduleIndex(Alphas(6))
IF ((Sys(SysNum)%ZoneMinAirFracSchPtr == 0) .and. &
( Sys(SysNum)%ZoneMinAirFracMethod == ScheduledMinFrac) ) THEN
CALL ShowSevereError(TRIM(cAlphaFields(6))//' = '//TRIM(Alphas(6))//' not found.')
CALL ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
Call ShowContinueError('A valid schedule is required')
ErrorsFound=.true.
ELSEIf ((Sys(SysNum)%ZoneMinAirFracSchPtr > 0) .and. &
( Sys(SysNum)%ZoneMinAirFracMethod == ScheduledMinFrac) ) THEN
! check range of values in schedule
IF (.NOT. CheckScheduleValueMinMax(Sys(SysNum)%ZoneMinAirFracSchPtr,'>=',0.0d0,'<=',1.0d0)) Then
CALL ShowSevereError('Error found in '//TRIM(cAlphaFields(6))//' = '//TRIM(Alphas(6)) )
CAll ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
CALL ShowContinueError('Schedule values must be (>=0., <=1.)')
ENDIF
ENDIF
Sys(SysNum)%ReheatControlNode = 0
Sys(SysNum)%ReheatAirOutletNode = Sys(SysNum)%OutletNodeNum
Sys(SysNum)%MaxReheatWaterVolFlow = 0.0d0
Sys(SysNum)%MaxReheatSteamVolFlow = 0.0d0
Sys(SysNum)%MinReheatWaterVolFlow = 0.0d0
Sys(SysNum)%MinReheatSteamVolFlow = 0.0d0
Sys(SysNum)%ControllerOffset = 0.000001d0
Sys(SysNum)%DamperHeatingAction = Normal
! Register component set data
CALL TestCompSet(Sys(SysNum)%SysType,Sys(SysNum)%SysName, &
NodeID(Sys(SysNum)%InletNodeNum),NodeID(Sys(SysNum)%OutletNodeNum),'Air Nodes')
! Fill the Zone Equipment data with the inlet node number of this unit.
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO SupAirIn = 1,ZoneEquipConfig(CtrlZone)%NumInletNodes
IF (Sys(SysNum)%ReheatAirOutletNode .EQ. ZoneEquipConfig(CtrlZone)%InletNode(SupAirIn)) THEN
IF (ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%OutNode > 0) THEN
CALL ShowSevereError('Error in connecting a terminal unit to a zone')
CALL ShowContinueError(TRIM(NodeID(Sys(SysNum)%ReheatAirOutletNode))//' already connects to another zone')
CALL ShowContinueError('Occurs for terminal unit '//TRIM(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
CALL ShowContinueError('Check terminal unit node names for errors')
ErrorsFound = .true.
ELSE
ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%InNode = Sys(SysNum)%InletNodeNum
ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%OutNode = Sys(SysNum)%ReheatAirOutletNode
END IF
Sys(SysNum)%CtrlZoneNum = CtrlZone
Sys(SysNum)%ActualZoneNum = ZoneEquipConfig(CtrlZone)%ActualZoneNum
Sys(SysNum)%ZoneFloorArea = Zone(Sys(SysNum)%ActualZoneNum)%FloorArea* &
Zone(Sys(SysNum)%ActualZoneNum)%Multiplier*Zone(Sys(SysNum)%ActualZoneNum)%ListMultiplier
END IF
END DO
END DO
IF(.NOT. lAlphaBlanks(7))THEN
Sys(SysNum)%OARequirementsPtr = FindItemInList(Alphas(7),OARequirements%Name,NumOARequirements)
IF(Sys(SysNum)%OARequirementsPtr .EQ. 0)THEN
CALL ShowSevereError(TRIM(cAlphaFields(7))//' = '//TRIM(Alphas(7))//' not found.')
CALL ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ELSE
Sys(SysNum)%NoOAFlowInputFromUser = .FALSE.
END IF
END IF
!Setup the Average damper Position output variable
CALL SetupOutputVariable('Zone Air Terminal VAV Damper Position []', Sys(Sysnum)%DamperPosition, &
'System','Average',Sys(Sysnum)%SysName)
CALL SetupOutputVariable('Zone Air Terminal Outdoor Air Volume Flow Rate [m3/s]', Sys(Sysnum)%OutdoorAirFlowRate, &
'System','Average',Sys(Sysnum)%SysName)
END DO ! end Number of Sys Loop
DO SysIndex = 1, NumNoRHCBVAVSys
CurrentModuleObject='AirTerminal:SingleDuct:VAV:HeatAndCool:NoReheat'
CALL GetObjectItem(CurrentModuleObject,SysIndex,Alphas,NumAlphas,Numbers,NumNums,IOSTAT, &
AlphaBlank=lAlphaBlanks,NumBlank=lNumericBlanks, &
AlphaFieldnames=cAlphaFields,NumericFieldNames=cNumericFields)
SysNum = SysIndex + NumVAVSys + NumCBVAVSys + NumConstVolSys + NumNoRHVAVSys
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(Alphas(1),Sys%SysName,SysNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
IF (IsBlank) Alphas(1)='xxxxx'
ENDIF
Sys(SysNum)%SysName = Alphas(1)
Sys(SysNum)%SysType = TRIM(CurrentModuleObject)
Sys(SysNum)%SysType_Num = SingleDuctCBVAVNoReheat
Sys(SysNum)%ReheatComp = ' '
Sys(SysNum)%ReheatName = ' '
Sys(SysNum)%Schedule = Alphas(2)
IF (lAlphaBlanks(2)) THEN
Sys(SysNum)%SchedPtr = ScheduleAlwaysOn
ELSE
Sys(SysNum)%SchedPtr = GetScheduleIndex(Alphas(2))
IF (Sys(SysNum)%SchedPtr == 0) THEN
CALL ShowSevereError(TRIM(cAlphaFields(2))//' = '//TRIM(Alphas(2))//' not found.')
CALL ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
ENDIF
Sys(SysNum)%OutletNodeNum = &
GetOnlySingleNode(Alphas(3),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsNotParent,cAlphaFields(3))
Sys(SysNum)%InletNodeNum = &
GetOnlySingleNode(Alphas(4),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsNotParent,cAlphaFields(4))
Sys(SysNum)%MaxAirVolFlowRate = Numbers(1)
Sys(SysNum)%ZoneMinAirFrac = Numbers(2)
IF (Sys(SysNum)%ZoneMinAirFrac .LT. 0.0d0) THEN
CALL ShowWarningError(trim(Sys(SysNum)%SysType)//' = "'//TRIM(Sys(SysNum)%SysName))
CALL ShowContinueError(TRIM(cNumericFields(2))//' must be greater than or equal to 0. Resetting to 0 and' &
//' the simulation continues.')
Sys(SysNum)%ZoneMinAirFrac = 0.0d0
END IF
IF (Sys(SysNum)%ZoneMinAirFrac .GT. 1.0d0) THEN
CALL ShowWarningError(trim(Sys(SysNum)%SysType)//' = "'//TRIM(Sys(SysNum)%SysName))
CALL ShowContinueError(TRIM(cNumericFields(2))//' must be less than or equal to 1. Resetting to 1 and' &
//' the simulation continues.')
Sys(SysNum)%ZoneMinAirFrac = 1.0d0
END IF
Sys(SysNum)%ReheatControlNode = 0
Sys(SysNum)%ReheatAirOutletNode = Sys(SysNum)%OutletNodeNum
Sys(SysNum)%MaxReheatWaterVolFlow = 0.0d0
Sys(SysNum)%MaxReheatSteamVolFlow = 0.0d0
Sys(SysNum)%MinReheatWaterVolFlow = 0.0d0
Sys(SysNum)%MinReheatSteamVolFlow = 0.0d0
Sys(SysNum)%ControllerOffset = 0.000001d0
Sys(SysNum)%DamperHeatingAction = ReverseAction
! Register component set data
CALL TestCompSet(Sys(SysNum)%SysType,Sys(SysNum)%SysName, &
NodeID(Sys(SysNum)%InletNodeNum),NodeID(Sys(SysNum)%OutletNodeNum),'Air Nodes')
! Fill the Zone Equipment data with the inlet node number of this unit.
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO SupAirIn = 1,ZoneEquipConfig(CtrlZone)%NumInletNodes
IF (Sys(SysNum)%ReheatAirOutletNode .EQ. ZoneEquipConfig(CtrlZone)%InletNode(SupAirIn)) THEN
IF (ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%OutNode > 0) THEN
CALL ShowSevereError('Error in connecting a terminal unit to a zone')
CALL ShowContinueError(TRIM(NodeID(Sys(SysNum)%ReheatAirOutletNode))//' already connects to another zone')
CALL ShowContinueError('Occurs for terminal unit '//TRIM(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
CALL ShowContinueError('Check terminal unit node names for errors')
ErrorsFound = .true.
ELSE
ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%InNode = Sys(SysNum)%InletNodeNum
ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%OutNode = Sys(SysNum)%ReheatAirOutletNode
END IF
END IF
END DO
END DO
!Setup the Average damper Position output variable
CALL SetupOutputVariable('Zone Air Terminal VAV Damper Position []', Sys(Sysnum)%DamperPosition, &
'System','Average',Sys(Sysnum)%SysName)
END DO ! end Number of VAVHeatandCool:NoReheat Sys Loop
! read in the SINGLE DUCT:VAV:REHEAT:VS FAN data
DO SysIndex = 1, NumVAVVS
CurrentModuleObject='AirTerminal:SingleDuct:VAV:Reheat:VariableSpeedFan'
CALL GetObjectItem(CurrentModuleObject,SysIndex,Alphas,NumAlphas,Numbers,NumNums,IOSTAT, &
AlphaBlank=lAlphaBlanks,NumBlank=lNumericBlanks, &
AlphaFieldnames=cAlphaFields,NumericFieldNames=cNumericFields)
SysNum = SysIndex + NumVAVSys + NumCBVAVSys + NumConstVolSys + NumNoRHVAVSys + NumNoRHCBVAVSys
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(Alphas(1),Sys%SysName,SysNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
IF (IsBlank) Alphas(1)='xxxxx'
ENDIF
Sys(SysNum)%SysName = Alphas(1)
Sys(SysNum)%SysType = TRIM(CurrentModuleObject)
Sys(SysNum)%SysType_Num = SingleDuctVAVReheatVSFan
Sys(SysNum)%ReheatComp = Alphas(9)
Sys(SysNum)%ReheatName = Alphas(10)
IsNotOK = .FALSE.
IF (SameString(Sys(SysNum)%ReheatComp,'Coil:Heating:Gas')) THEN
Sys(SysNum)%ReheatComp_Num=HCoilType_Gas
Sys(SysNum)%ReheatAirOutletNode = &
GetHeatingCoilOutletNode(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,IsNotOK)
Sys(SysNum)%ReheatCoilMaxCapacity = &
GetHeatingCoilCapacity(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,IsNotOK)
IF(IsNotOK) CALL ShowContinueError('Occurs for terminal unit '// &
TRIM(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ELSEIF (SameString(Sys(SysNum)%ReheatComp,'Coil:Heating:Electric')) THEN
Sys(SysNum)%ReheatComp_Num=HCoilType_Electric
Sys(SysNum)%ReheatAirOutletNode = &
GetHeatingCoilOutletNode(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,IsNotOK)
Sys(SysNum)%ReheatCoilMaxCapacity = &
GetHeatingCoilCapacity(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,IsNotOK)
IF(IsNotOK) CALL ShowContinueError('Occurs for terminal unit '// &
TRIM(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ELSEIF (SameString(Sys(SysNum)%ReheatComp,'Coil:Heating:Water')) THEN
Sys(SysNum)%ReheatComp_Num=HCoilType_SimpleHeating
Sys(SysNum)%ReheatComp_PlantType = TypeOf_CoilWaterSimpleHeating
ELSEIF (SameString(Sys(SysNum)%ReheatComp,'Coil:Heating:Steam')) THEN
Sys(SysNum)%ReheatComp_Num=HCoilType_SteamAirHeating
Sys(SysNum)%ReheatComp_PlantType = TypeOf_CoilSteamAirHeating
ELSEIF (Sys(SysNum)%ReheatComp /= ' ') THEN
CALL ShowSevereError('Illegal '//TRIM(cAlphaFields(9))//' = '//TRIM(Sys(SysNum)%ReheatComp)//'.')
CALL ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
CALL ValidateComponent(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,IsNotOK,Sys(SysNum)%SysType)
IF (IsNotOK) THEN
CALL ShowContinueError('In '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
Sys(SysNum)%FanType = Alphas(7)
IF (SameString(Sys(SysNum)%FanType,'Fan:VariableVolume')) THEN
Sys(SysNum)%Fan_Num=FanType_VS
ELSEIF (Sys(SysNum)%FanType /= ' ') THEN
CALL ShowSevereError('Illegal '//TRIM(cAlphaFields(7))//' = '//TRIM(Sys(SysNum)%FanType)//'.')
CALL ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
Sys(SysNum)%FanName = Alphas(8)
CALL ValidateComponent(Sys(SysNum)%FanType,Sys(SysNum)%FanName,IsNotOK,Sys(SysNum)%SysType)
IF (IsNotOK) THEN
CALL ShowContinueError('In '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
Sys(SysNum)%Schedule = Alphas(2)
IF (lAlphaBlanks(2)) THEN
Sys(SysNum)%SchedPtr = ScheduleAlwaysOn
ELSE
Sys(SysNum)%SchedPtr = GetScheduleIndex(Alphas(2))
IF (Sys(SysNum)%SchedPtr == 0) THEN
CALL ShowSevereError(TRIM(cAlphaFields(2))//' = '//TRIM(Alphas(2))//' not found.')
CALL ShowContinueError('Occurs in '//trim(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
ENDIF
! A5, \field heating coil air inlet node
! \note same as fan outlet node
! \type alpha
! \required-field
IsNotOK=.false.
Sys(SysNum)%OutletNodeNum = GetFanOutLetNode(Sys(SysNum)%FanType,Sys(SysNum)%FanName,IsNotOK)
IF (IsNotOK) THEN
CALL ShowContinueError('..Occurs in '//trim(Sys(SysNum)%SysType)//' = ' // TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
! GetOnlySingleNode(Alphas(5),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
! NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsParent)
! A3, \field Unit supply air inlet node
! \note same as fan inlet node
! \type alpha
IsNotOK=.false.
Sys(SysNum)%InletNodeNum = GetFanInletNode(Sys(SysNum)%FanType,Sys(SysNum)%FanName,IsNotOK)
IF (IsNotOK) THEN
CALL ShowContinueError('..Occurs in '//trim(Sys(SysNum)%SysType)//' = ' // TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
! GetOnlySingleNode(Alphas(3),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
! NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsParent)
Sys(SysNum)%MaxAirVolFlowRate = Numbers(1)
Sys(SysNum)%MaxHeatAirVolFlowRate = Numbers(2)
Sys(SysNum)%ZoneMinAirFrac = Numbers(3)
! The reheat coil control node is necessary for hot water reheat, but not necessary for
! electric or gas reheat.
IF (Sys(SysNum)%ReheatComp_Num .EQ. HCoilType_Gas .OR. Sys(SysNum)%ReheatComp_Num .EQ. HCoilType_Electric) THEN
! IF(.NOT. lAlphaBlanks(6)) THEN
! CALL ShowWarningError('In '//trim(Sys(SysNum)%SysType)//' = ' // TRIM(Sys(SysNum)%SysName) &
! // ' the '//TRIM(cAlphaFields(6))//' is not needed and will be ignored.')
! CALL ShowContinueError(' It is used for hot water reheat coils only.')
! END IF
ELSE
! IF(lAlphaBlanks(6)) THEN
! CALL ShowSevereError('In '//trim(Sys(SysNum)%SysType)//' = ' // TRIM(Sys(SysNum)%SysName) &
! // ' the '//TRIM(cAlphaFields(6))//' is undefined')
! ErrorsFound=.true.
! END IF
IF (Sys(SysNum)%ReheatComp_Num .EQ. HCoilType_SteamAirHeating)THEN
IsNotOK=.false.
Sys(SysNum)%ReheatControlNode = GetCoilSteamInletNode(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,IsNotOK)
IF (IsNotOK) THEN
CALL ShowContinueError('..Occurs in '//trim(Sys(SysNum)%SysType)//' = ' // TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ELSE
! A4, \field Unit supply air outlet node
! \note same as heating coil air outlet node
! \note same as zone inlet node
! \type alpha
IsNotOK=.false.
Sys(SysNum)%ReheatAirOutletNode = GetCoilAirOutletNode(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,IsNotOK)
IF (IsNotOK) THEN
CALL ShowContinueError('..Occurs in '//trim(Sys(SysNum)%SysType)//' = ' // TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
ENDIF
! GetOnlySingleNode(Alphas(6),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
! NodeType_Steam,NodeConnectionType_Actuator,1,ObjectIsParent)
Else
IsNotOK=.false.
Sys(SysNum)%ReheatControlNode = GetCoilWaterInletNode(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,IsNotOK)
IF (IsNotOK) THEN
CALL ShowContinueError('..Occurs in '//trim(Sys(SysNum)%SysType)//' = ' // TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ELSE
! A4, \field Unit supply air outlet node
! \note same as heating coil air outlet node
! \note same as zone inlet node
! \type alpha
IsNotOK=.false.
Sys(SysNum)%ReheatAirOutletNode = GetCoilOutletNode(Sys(SysNum)%ReheatComp,Sys(SysNum)%ReheatName,IsNotOK)
IF (IsNotOK) THEN
CALL ShowContinueError('..Occurs in '//trim(Sys(SysNum)%SysType)//' = ' // TRIM(Sys(SysNum)%SysName))
ErrorsFound=.true.
ENDIF
ENDIF
! GetOnlySingleNode(Alphas(6),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
! NodeType_Water,NodeConnectionType_Actuator,1,ObjectIsParent)
End If
END IF
! A4, \field Unit supply air outlet node
! \note same as heating coil air outlet node
! \note same as zone inlet node
! \type alpha
! Sys(SysNum)%ReheatAirOutletNode = &
! GetOnlySingleNode(Alphas(4),ErrorsFound,Sys(SysNum)%SysType,Alphas(1), &
! NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsParent)
IF (Sys(SysNum)%ReheatComp_Num .EQ. HCoilType_SteamAirHeating)THEN
Sys(SysNum)%MaxReheatSteamVolFlow = Numbers(4)
Sys(SysNum)%MinReheatSteamVolFlow = Numbers(5)
Else
Sys(SysNum)%MaxReheatWaterVolFlow = Numbers(4)
Sys(SysNum)%MinReheatWaterVolFlow = Numbers(5)
END IF
Sys(SysNum)%ControllerOffset = Numbers(6)
! Set default convergence tolerance
IF (Sys(SysNum)%ControllerOffset .LE. 0.0d0) THEN
Sys(SysNum)%ControllerOffset = 0.001d0
END IF
Sys(SysNum)%DamperHeatingAction = ReverseAction
! Register component set data
CALL TestCompSet(Sys(SysNum)%SysType,Sys(SysNum)%SysName, &
NodeID(Sys(SysNum)%InletNodeNum),NodeID(Sys(SysNum)%ReheatAirOutletNode),'Air Nodes')
! Fill the Zone Equipment data with the inlet node number of this unit.
! what if not found? error?
IsNotOK=.true.
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO SupAirIn = 1,ZoneEquipConfig(CtrlZone)%NumInletNodes
IF (Sys(SysNum)%ReheatAirOutletNode .EQ. ZoneEquipConfig(CtrlZone)%InletNode(SupAirIn)) THEN
IsNotOK=.false.
IF (ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%OutNode > 0) THEN
CALL ShowSevereError('Error in connecting a terminal unit to a zone')
CALL ShowContinueError(TRIM(NodeID(Sys(SysNum)%ReheatAirOutletNode))//' already connects to another zone')
CALL ShowContinueError('Occurs for terminal unit '//TRIM(Sys(SysNum)%SysType)//' = '//TRIM(Sys(SysNum)%SysName))
CALL ShowContinueError('Check terminal unit node names for errors')
ErrorsFound = .true.
ELSE
ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%InNode = Sys(SysNum)%InletNodeNum
ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%OutNode = Sys(SysNum)%ReheatAirOutletNode
END IF
END IF
END DO
END DO
IF (IsNotOK) THEN
CALL ShowWarningError('Did not Match Supply Air Outlet Node to any Zone Node')
CALL ShowContinueError('..Occurs in '//trim(Sys(SysNum)%SysType)//' = ' // TRIM(Sys(SysNum)%SysName))
ENDIF
! Add reheat coil to component sets array
CALL SetUpCompSets(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
Alphas(9),Alphas(10),Alphas(5),Alphas(4))
! Add fan to component sets array
CALL SetUpCompSets(Sys(SysNum)%SysType, Sys(SysNum)%SysName, &
Alphas(7),Alphas(8),Alphas(3),Alphas(5))
!Setup the Average damper Position output variable
CALL SetupOutputVariable('Zone Air Terminal VAV Damper Position []', Sys(Sysnum)%DamperPosition, &
'System','Average',Sys(Sysnum)%SysName)
END DO
DO SysIndex=1,NumSys
DO ADUNum = 1,NumAirDistUnits
IF (Sys(SysIndex)%ReheatAirOutletNode == AirDistUnit(ADUNum)%OutletNodeNum) THEN
AirDistUnit(ADUNum)%InletNodeNum = Sys(SysIndex)%InletNodeNum
Sys(SysIndex)%ADUNum = ADUNum
END IF
END DO
! one assumes if there isn't one assigned, it's an error?
IF (Sys(SysIndex)%ADUNum == 0) THEN
CALL ShowSevereError(RoutineName//'No matching Air Distribution Unit, for System = ['// &
TRIM(Sys(SysIndex)%SysType)//','//TRIM(Sys(SysIndex)%SysName)//'].')
CALL ShowContinueError('...should have outlet node = '//TRIM(NodeID(Sys(SysIndex)%ReheatAirOutletNode)))
! ErrorsFound=.true.
ENDIF
END DO
! Error check to see if a single duct air terminal is assigned to zone that has zone secondary recirculation
! specified in the Sizing:Zone object
NumZoneSiz = GetNumObjectsFound("Sizing:Zone")
IF (NumZoneSiz > 0) THEN
DO SysIndex=1,NumSys
SizLoop: DO ZoneSizIndex = 1, NumZoneSiz
IF (DoZoneSizing) THEN
IF (FinalZoneSizing(ZoneSizIndex)%ActualZoneNum == Sys(SysIndex)%ActualZoneNum) THEN
IF (FinalZoneSizing(ZoneSizIndex)%ZoneSecondaryRecirculation > 0.0d0) THEN
CALL ShowWarningError(RoutineName//'A zone secondary recirculation fraction is specified for zone served by ')
CALL ShowContinueError('...terminal unit "'//TRIM(Sys(SysIndex)%SysName)// &
'" , that indicates a single path system')
CALL ShowContinueError('...The zone secondary recirculation for that zone was set to 0.0')
FinalZoneSizing(ZoneSizIndex)%ZoneSecondaryRecirculation = 0.0D0
EXIT SizLoop
END IF
END IF
END IF
END DO SizLoop
END DO
END IF
DEALLOCATE(Alphas)
DEALLOCATE(cAlphaFields)
DEALLOCATE(cNumericFields)
DEALLOCATE(Numbers)
DEALLOCATE(lAlphaBlanks)
DEALLOCATE(lNumericBlanks)
IF (ErrorsFound) THEN
CALL ShowFatalError(RoutineName//'Errors found in input. Preceding condition(s) cause termination.')
ENDIF
RETURN
END SUBROUTINE GetSysInput