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 | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | GeneratorType | |||
character(len=*), | intent(in) | :: | GeneratorName | |||
integer, | intent(inout) | :: | GeneratorIndex | |||
logical, | intent(in) | :: | RunFlag | |||
real(kind=r64), | intent(in) | :: | MyLoad | |||
logical, | intent(in) | :: | FirstHVACIteration |
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 SimICEngineGenerator(GeneratorType,GeneratorName,GeneratorIndex,RunFlag, MyLoad,FirstHVACIteration)
! SUBROUTINE INFORMATION:
! AUTHOR Dan Fisher
! DATE WRITTEN Sept. 2000
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE: This is the IC ENGINE Generator model driver. It
! gets the input for the models, initializes simulation variables, call
! the appropriate model and sets up reporting variables.
! METHODOLOGY EMPLOYED: na
! REFERENCES: na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE General, ONLY: TrimSigDigits
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: GeneratorType ! type of Generator
CHARACTER(len=*), INTENT(IN) :: GeneratorName ! user specified name of Generator
INTEGER, INTENT(INOUT) :: GeneratorIndex
LOGICAL , INTENT(IN) :: RunFlag ! simulate Generator when TRUE
REAL(r64), INTENT(IN) :: MyLoad ! demand on electric generator
LOGICAL, INTENT (IN) :: FirstHVACIteration
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: GenNum ! Generator number counter
!Get Generator data from input file
IF (GetICEInput) THEN
CALL GetICEngineGeneratorInput
GetICEInput = .FALSE.
END IF
!SELECT and CALL MODELS
IF (GeneratorIndex == 0) THEN
GenNum = FindItemInList(GeneratorName,ICEngineGenerator%Name,NumICEngineGenerators)
IF (GenNum == 0) CALL ShowFatalError('SimICEngineGenerator: Specified Generator not one of Valid ICEngine Generators '// &
TRIM(GeneratorName))
GeneratorIndex=GenNum
ELSE
GenNum=GeneratorIndex
IF (GenNum > NumICEngineGenerators .or. GenNum < 1) THEN
CALL ShowFatalError('SimICEngineGenerator: Invalid GeneratorIndex passed='//TRIM(TrimSigDigits(GenNum))// &
', Number of IC Engine Generators='//TRIM(TrimSigDigits(NumICEngineGenerators))// &
', Generator name='//TRIM(GeneratorName))
ENDIF
IF (CheckEquipName(GenNum)) THEN
IF (GeneratorName /= ICEngineGenerator(GenNum)%Name) THEN
CALL ShowFatalError('SimICEngineGenerator: Invalid GeneratorIndex passed='//TRIM(TrimSigDigits(GenNum))// &
', Generator name='//TRIM(GeneratorName)//', stored Generator Name for that index='// &
TRIM(ICEngineGenerator(GenNum)%Name))
ENDIF
CheckEquipName(GenNum)=.false.
ENDIF
ENDIF
CALL InitICEngineGenerators(GenNum,RunFlag,MyLoad,FirstHVACIteration)
CALL CalcICEngineGeneratorModel(GenNum,RunFlag,MyLoad,FirstHVACIteration)
CALL UpdateICEngineGeneratorRecords(RunFlag,GenNum)
RETURN
END SUBROUTINE SimICEngineGenerator