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) | :: | EquipName | |||
integer, | intent(inout) | :: | EqNum | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
logical, | intent(in) | :: | InitLoopEquip |
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 SimPipingSystemCircuit(EquipName, EqNum, FirstHVACIteration, InitLoopEquip)
! SUBROUTINE INFORMATION:
! AUTHOR Edwin Lee
! DATE WRITTEN Summer 2011
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! <description>
! METHODOLOGY EMPLOYED:
! <description>
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE General, ONLY: TrimSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: EquipName ! name of the Pipe Heat Transfer.
INTEGER, INTENT(INOUT) :: EqNum ! index in local derived types for external calling
LOGICAL, INTENT(IN) :: FirstHVACIteration ! component number
LOGICAL, INTENT(IN) :: InitLoopEquip
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName = 'SimPipingSystems'
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL,SAVE :: GetInputFlag = .TRUE. ! First time, input is "gotten"
INTEGER :: CircuitNum
INTEGER :: DomainNum
INTEGER :: NumOfPipeCircuits
!Read input if necessary
IF (GetInputFlag) THEN
CALL GetPipingSystemsInput()
GetInputFlag = .FALSE.
ENDIF
!Look for circuit index
NumOfPipeCircuits = SIZE(PipingSystemCircuits)
IF (EqNum == 0) THEN
CircuitNum = FindItemInList(EquipName,PipingSystemCircuits%Name,NumOfPipeCircuits)
IF (CircuitNum == 0) THEN
! Catch any bad names before crashing
CALL ShowFatalError(RoutineName//': Piping circuit requested not found='//TRIM(EquipName))
ENDIF
EqNum=CircuitNum
ELSE
CircuitNum=EqNum
IF (CircuitNum > NumOfPipeCircuits .or. CircuitNum < 1) THEN
CALL ShowFatalError(RoutineName//': Invalid component index passed='// &
TRIM(TrimSigDigits(DomainNum))// &
', Number of Units='//TRIM(TrimSigDigits(NumOfPipeCircuits))// &
', Entered Unit name='//TRIM(EquipName))
ENDIF
IF (PipingSystemCircuits(CircuitNum)%CheckEquipName) THEN
IF (EquipName /= PipingSystemCircuits(CircuitNum)%Name) THEN
CALL ShowFatalError(RoutineName//': Invalid component name passed='// &
TRIM(TrimSigDigits(CircuitNum))// &
', Unit name='//TRIM(EquipName)//', stored Unit Name for that index='// &
TRIM(PipingSystemCircuits(CircuitNum)%Name))
ENDIF
PipingSystemCircuits(CircuitNum)%CheckEquipName=.false.
ENDIF
ENDIF
!If we are just initializing data structures, then return
IF(InitLoopEquip) RETURN
!Retrieve the parent domain index for this pipe circuit
DomainNum = PipingSystemCircuits(CircuitNum)%ParentDomainIndex
!Do any initialization here
CALL InitPipingSystems(DomainNum, CircuitNum)
!Update the temperature field
CALL PerformIterationLoop(DomainNum, CircuitNum)
!Update outlet nodes, etc.
CALL UpdatePipingSystems(DomainNum, CircuitNum)
RETURN
END SUBROUTINE SimPipingSystemCircuit