Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE GetDirectAirInput
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN Mar 1999
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE
! Input the AirLoopSplitter data and store it in the AirLoopSplitter array.
! METHODOLOGY EMPLOYED:
! Use the Get routines from the InputProcessor module.
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: GetNumObjectsFound, GetObjectItem, VerifyName
USE NodeInputManager, ONLY: GetOnlySingleNode
USE DataGlobals, ONLY: AnyEnergyManagementSystemInModel, ScheduleAlwaysOn
USE DataInterfaces, ONLY: SetupOutputVariable, SetupEMSActuator, SetupEMSInternalVariable
USE DataZoneEquipment, ONLY: ZoneEquipConfig
USE SplitterComponent, ONLY: SplitterCond, NumSplitters
USE DataLoopNode
USE DataIPShortCuts
IMPLICIT NONE
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS: INTEGER :: BaseboardNum
INTEGER :: NumNums ! Number of REAL(r64) numbers returned by GetObjectItem
INTEGER :: NumAlphas ! Number of alphanumerics returned by GetObjectItem
INTEGER :: DirectAirNum
INTEGER :: IOSTAT
CHARACTER(len=*), PARAMETER :: RoutineName='GetDirectAirInput: ' ! include trailing blank space
LOGICAL :: ErrorsFound=.false.
LOGICAL :: IsNotOK ! Flag to verify name
LOGICAL :: IsBlank ! Flag for blank name
INTEGER :: Loop !Do Loop Index
INTEGER :: CtrlZone ! controlled zome do loop index
INTEGER :: SupAirIn ! controlled zone supply air inlet index
INTEGER :: NodeNum
INTEGER :: SplitNum
cCurrentModuleObject='AirTerminal:SingleDuct:Uncontrolled'
NumDirectAir = GetNumObjectsFound(cCurrentModuleObject)
IF (NumDirectAir.GT.0) THEN
ALLOCATE(DirectAir(NumDirectAir))
ALLOCATE(CheckEquipName(NumDirectAir))
CheckEquipName=.true.
DO DirectAirNum=1,NumDirectAir
DirectAir(DirectAirNum)%cObjectName = cCurrentModuleObject ! push Object Name into data array
CALL GetObjectItem(cCurrentModuleObject,DirectAirNum,cAlphaArgs,NumAlphas,&
rNumericArgs,NumNums,IOSTAT,NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(cAlphaArgs(1),DirectAir%EquipID,DirectAirNum-1,IsNotOK,IsBlank,TRIM(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
IF (IsBlank) cAlphaArgs(1)='xxxxxxxx'
ENDIF
DirectAir(DirectAirNum)%EquipID = cAlphaArgs(1)
DirectAir(DirectAirNum)%Schedule = cAlphaArgs(2)
IF (lAlphaFieldBlanks(2)) THEN
DirectAir(DirectAirNum)%SchedPtr = ScheduleAlwaysOn
ELSE
DirectAir(DirectAirNum)%SchedPtr = GetScheduleIndex(cAlphaArgs(2))
IF (DirectAir(DirectAirNum)%SchedPtr .EQ. 0) THEN
CALL ShowSevereError(RoutineName//TRIM(cCurrentModuleObject)//'="'//TRIM(cAlphaArgs(1))//'", invalid data.')
CALL ShowContinueError('..invalid '//TRIM(cAlphaFieldNames(2))//'="'//TRIM(cAlphaArgs(2))//'".')
ErrorsFound=.true.
END IF
END IF
! Direct air is a problem for node connections since it only has a single node
! make this an outlet
DirectAir(DirectAirNum)%ZoneSupplyAirNode = &
GetOnlySingleNode(cAlphaArgs(3),ErrorsFound,TRIM(cCurrentModuleObject),cAlphaArgs(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsNotParent,cAlphaFieldNames(3))
!Load the maximum volume flow rate
DirectAir(DirectAirNum)%MaxAirVolFlowRate = rNumericArgs(1)
! Fill the Zone Equipment data with the supply air inlet node number of this unit.
DO CtrlZone = 1,NumOfZones
IF (.not. ZoneEquipConfig(CtrlZone)%IsControlled) CYCLE
DO SupAirIn = 1,ZoneEquipConfig(CtrlZone)%NumInletNodes
IF (DirectAir(DirectAirNum)%ZoneSupplyAirNode .EQ. ZoneEquipConfig(CtrlZone)%InletNode(SupAirIn)) THEN
ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%InNode = DirectAir(DirectAirNum)%ZoneSupplyAirNode
ZoneEquipConfig(CtrlZone)%AirDistUnitCool(SupAirIn)%OutNode = DirectAir(DirectAirNum)%ZoneSupplyAirNode
END IF
END DO
END DO
! Find the Zone Equipment Inlet Node from the Supply Air Path Splitter
Do SplitNum = 1, NumSplitters
DO NodeNum = 1, SplitterCond(SplitNum)%NumOutletNodes
If(DirectAir(DirectAirNum)%ZoneSupplyAirNode .eq. SplitterCond(SplitNum)%OutletNode(NodeNum)) Then
DirectAir(DirectAirNum)%ZoneEquipAirInletNode = SplitterCond(SplitNum)%InletNode
Exit
End If
END DO
End Do
! If no splitter, set Zone Equipment Inlet Node to the Zone Supply Air Node
IF (NumSplitters == 0) THEN
DirectAir(DirectAirNum)%ZoneEquipAirInletNode = DirectAir(DirectAirNum)%ZoneSupplyAirNode
END IF
END DO
END IF
IF (ErrorsFound) THEN
CALL ShowFatalError(RoutineName//'Errors found in input. Program terminates.')
ENDIF
!Setup output for the Direct Air Units. This allows a comparison with
DO Loop=1,NumDirectAir
CALL SetupOutputVariable('Zone Air Terminal Sensible Heating Energy [J]',DirectAir(Loop)%HeatEnergy,'System','Sum', &
DirectAir(Loop)%EquipID)
CALL SetupOutputVariable('Zone Air Terminal Sensible Cooling Energy [J]',DirectAir(Loop)%CoolEnergy,'System','Sum', &
DirectAir(Loop)%EquipID)
CALL SetupOutputVariable('Zone Air Terminal Sensible Heating Rate [W]',DirectAir(Loop)%HeatRate,'System','Average', &
DirectAir(Loop)%EquipID)
CALL SetupOutputVariable('Zone Air Terminal Sensible Cooling Rate [W]',DirectAir(Loop)%CoolRate,'System','Average', &
DirectAir(Loop)%EquipID)
IF ( AnyEnergyManagementSystemInModel ) THEN
CALL SetupEMSActuator('AirTerminal:SingleDuct:Uncontrolled', DirectAir(Loop)%EquipID, 'Mass Flow Rate' , '[kg/s]', &
DirectAir(Loop)%EMSOverrideAirFlow, DirectAir(Loop)%EMSMassFlowRateValue )
CALL SetupEMSInternalVariable('AirTerminal:SingleDuct:Uncontrolled Maximum Mass Flow Rate',DirectAir(Loop)%EquipID, &
'[kg/s]', DirectAir(Loop)%AirMassFlowRateMax )
ENDIF
ENDDO
RETURN
END SUBROUTINE GetDirectAirInput