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 SimFuelCellGenerator(GeneratorType,GeneratorName,GeneratorIndex,RunFlag, MyLoad,FirstHVACIteration)
! SUBROUTINE INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN MArch 2005
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE: This is the Solid oxide fuel cell 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 (GetFuelCellInput) THEN
CALL GetFuelCellGeneratorInput
GetFuelCellInput = .FALSE.
END IF
IF (GeneratorIndex == 0) THEN
GenNum = FindItemInList(GeneratorName,FuelCell%Name,NumFuelCellGenerators)
IF (GenNum == 0) CALL ShowFatalError('SimFuelCellGenerator: Specified Generator not one of Valid FuelCell Generators '// &
TRIM(GeneratorName))
GeneratorIndex=GenNum
ELSE
GenNum=GeneratorIndex
IF (GenNum > NumFuelCellGenerators .or. GenNum < 1) THEN
CALL ShowFatalError('SimFuelCellGenerator: Invalid GeneratorIndex passed='//TRIM(TrimSigDigits(GenNum))// &
', Number of FuelCell Generators='//TRIM(TrimSigDigits(NumFuelCellGenerators))// &
', Generator name='//TRIM(GeneratorName))
ENDIF
IF (CheckEquipName(GenNum)) THEN
IF (GeneratorName /= FuelCell(GenNum)%Name) THEN
CALL ShowFatalError('SimFuelCellGenerator: Invalid GeneratorIndex passed='//TRIM(TrimSigDigits(GenNum))// &
', Generator name='//TRIM(GeneratorName)//', stored Generator Name for that index='// &
TRIM(FuelCell(GenNum)%Name))
ENDIF
CheckEquipName(GenNum)=.false.
ENDIF
ENDIF
Call InitFuelCellGenerators(GenNum)
CALL CalcFuelCellGeneratorModel(GenNum,RunFlag,MyLoad,FirstHVACIteration)
CALL CalcUpdateHeatRecovery(GenNum, FirstHVACIteration)
CALL UpdateFuelCellGeneratorRecords(RunFlag,GenNum)
RETURN
END SUBROUTINE SimFuelCellGenerator