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 | |||
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 SimAirMixer(CompName,CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Richard Liesen
! DATE WRITTEN February 1998
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine manages Mixer component simulation.
! It is called from the SimAirLoopComponent
! at the system time step.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE General, ONLY: TrimSigDigits
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: CompName
INTEGER, INTENT(INOUT) :: CompIndex
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: MixerNum ! The Mixer that you are currently loading input into
Logical,Save :: GetInputFlag = .True. ! Flag set to make sure you get input once
! FLOW:
! Obtains and Allocates Mixer related parameters from input file
IF (GetInputFlag) THEN !First time subroutine has been entered
CALL GetMixerInput
GetInputFlag=.false.
End If
! Find the correct MixerNumber
IF (CompIndex == 0) THEN
MixerNum=FindItemInList(CompName,MixerCond%MixerName,NumMixers)
IF (MixerNum == 0) THEN
CALL ShowFatalError('SimAirLoopMixer: Mixer not found='//TRIM(CompName))
ENDIF
CompIndex=MixerNum
ELSE
MixerNum=CompIndex
IF (MixerNum > NumMixers .or. MixerNum < 1) THEN
CALL ShowFatalError('SimAirLoopMixer: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(MixerNum))// &
', Number of Mixers='//TRIM(TrimSigDigits(NumMixers))// &
', Mixer name='//TRIM(CompName))
ENDIF
IF (CheckEquipName(MixerNum)) THEN
IF (CompName /= MixerCond(MixerNum)%MixerName) THEN
CALL ShowFatalError('SimAirLoopMixer: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(MixerNum))// &
', Mixer name='//TRIM(CompName)//', stored Mixer Name for that index='// &
TRIM(MixerCond(MixerNum)%MixerName))
ENDIF
CheckEquipName(MixerNum)=.false.
ENDIF
ENDIF
! With the correct MixerNum Initialize
CALL InitAirMixer(MixerNum) ! Initialize all Mixer related parameters
CALL CalcAirMixer(MixerNum)
! Update the current Mixer to the outlet nodes
Call UpdateAirMixer(MixerNum)
! Report the current Mixer
Call ReportMixer(MixerNum)
RETURN
END SUBROUTINE SimAirMixer