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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | CompName | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
integer, | intent(in) | :: | ZoneNum | |||
integer, | intent(in) | :: | ZoneNodeNum | |||
integer, | intent(inout) | :: | CompIndex |
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 SimAirTerminalUserDefined(CompName,FirstHVACIteration, ZoneNum, ZoneNodeNum, CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR B. Griffith
! DATE WRITTEN March 2012
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! simulation call for generic air terminal
! METHODOLOGY EMPLOYED:
! <description>
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE General, ONLY: TrimSigDigits
USE EMSManager, ONLY: ManageEMS
USE PlantUtilities, ONLY: SetComponentFlowRate, InitComponentNodes, RegisterPlantCompDesignFlow
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: CompName
LOGICAL, INTENT (IN):: FirstHVACIteration
INTEGER, INTENT (IN):: ZoneNum
INTEGER, INTENT (IN):: ZoneNodeNum
INTEGER, INTENT (INOUT):: CompIndex
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: CompNum
INTEGER :: Loop
IF (GetInput) THEN
CALL GetUserDefinedComponents
GetInput=.FALSE.
END IF
! Find the correct Equipment
IF (CompIndex == 0) THEN
CompNum = FindItemInList(CompName, UserAirTerminal%Name, NumUserAirTerminals)
IF (CompNum == 0) THEN
CALL ShowFatalError('SimUserDefinedPlantComponent: User Defined Coil not found')
ENDIF
CompIndex = CompNum
ELSE
CompNum = CompIndex
IF (CompNum < 1 .OR. CompNum > NumUserAirTerminals) THEN
CALL ShowFatalError('SimUserDefinedPlantComponent: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(CompNum))// &
', Number of units ='//TRIM(TrimSigDigits(NumUserAirTerminals))// &
', Entered Unit name = '//TRIM(CompName) )
ENDIF
IF(CheckUserAirTerminal(CompNum)) THEN
IF (CompName /= UserAirTerminal(CompNum)%Name) THEN
CALL ShowFatalError('SimUserDefinedPlantComponent: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(CompNum))// &
', Unit name='//TRIM(CompName)//', stored unit name for that index='// &
TRIM(UserAirTerminal(CompNum)%Name) )
ENDIF
CheckUserAirTerminal(CompNum) = .FALSE.
ENDIF
ENDIF
IF (BeginEnvrnFlag) THEN
CALL InitAirTerminalUserDefined(CompNum, ZoneNum)
IF (UserAirTerminal(CompNum)%ErlInitProgramMngr > 0) THEN
CALL ManageEMS(emsCallFromUserDefinedComponentModel, &
ProgramManagerToRun = UserAirTerminal(CompNum)%ErlInitProgramMngr )
ENDIF
IF (UserAirTerminal(CompNum)%NumPlantConnections > 0) THEN
DO Loop = 1, UserAirTerminal(CompNum)%NumPlantConnections
CALL InitComponentNodes(UserAirTerminal(CompNum)%Loop(Loop)%MassFlowRateMin, &
UserAirTerminal(CompNum)%Loop(Loop)%MassFlowRateMax, &
UserAirTerminal(CompNum)%Loop(Loop)%InletNodeNum, &
UserAirTerminal(CompNum)%Loop(Loop)%OutletNodeNum, &
UserAirTerminal(CompNum)%Loop(Loop)%LoopNum, &
UserAirTerminal(CompNum)%Loop(Loop)%LoopSideNum, &
UserAirTerminal(CompNum)%Loop(Loop)%BranchNum, &
UserAirTerminal(CompNum)%Loop(Loop)%CompNum )
CALL RegisterPlantCompDesignFlow(UserAirTerminal(CompNum)%Loop(Loop)%InletNodeNum, &
UserAirTerminal(CompNum)%Loop(Loop)%DesignVolumeFlowRate)
ENDDO
ENDIF
ENDIF ! BeginEnvrnFlag
CALL InitAirTerminalUserDefined(CompNum, ZoneNum)
IF (UserAirTerminal(CompNum)%ErlSimProgramMngr > 0) THEN
CALL ManageEMS(emsCallFromUserDefinedComponentModel, &
ProgramManagerToRun = UserAirTerminal(CompNum)%ErlSimProgramMngr)
ENDIF
CALL ReportAirTerminalUserDefined(CompNum)
RETURN
END SUBROUTINE SimAirTerminalUserDefined