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 SimMTGenerator(GeneratorType,GeneratorName,GeneratorIndex,RunFlag,MyLoad,FirstHVACIteration)
! SUBROUTINE INFORMATION:
! AUTHOR R. Raustad/D. Shirey
! DATE WRITTEN Mar 2008
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE: This is the MT Generator driver subroutine. It gets the input
! for the model, initializes simulation variables, calls
! the appropriate model and updates reporting variables.
! METHODOLOGY EMPLOYED: Uses empirical models based on manufacturers data
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE General, ONLY: TrimSigDigits
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: GeneratorType ! Type of generator !unused1208
CHARACTER(len=*), INTENT(IN) :: GeneratorName ! User-specified name of generator
INTEGER, INTENT(INOUT) :: GeneratorIndex ! Index to microturbine generator
LOGICAL, INTENT(IN) :: RunFlag ! Simulate generator when TRUE
REAL(r64), INTENT(IN) :: MyLoad ! Generator demand (W)
LOGICAL, INTENT (IN) :: FirstHVACIteration ! Simulation flag for First HVAC (system) iteration
! 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 (GetMTInput) THEN
CALL GetMTGeneratorInput
GetMTInput = .FALSE.
END IF
! SELECT and CALL GENERATOR MODEL
IF (GeneratorIndex == 0) THEN
GenNum = FindItemInList(GeneratorName,MTGenerator%Name,NumMTGenerators)
IF (GenNum == 0) CALL ShowFatalError('SimMTGenerator: Specified Generator not a valid COMBUSTION Turbine Generator '// &
TRIM(GeneratorName))
GeneratorIndex = GenNum
ELSE
GenNum = GeneratorIndex
IF (GenNum > NumMTGenerators .or. GenNum < 1) THEN
CALL ShowFatalError('SimMTGenerator: Invalid GeneratorIndex passed = '//TRIM(TrimSigDigits(GenNum))// &
', Number of CT Engine Generators = '//TRIM(TrimSigDigits(NumMTGenerators))// &
', Generator name = '//TRIM(GeneratorName))
END IF
IF (CheckEquipName(GenNum)) THEN
IF (GeneratorName /= MTGenerator(GenNum)%Name) THEN
CALL ShowFatalError('SimMTGenerator: Invalid GeneratorIndex passed = '//TRIM(TrimSigDigits(GenNum))// &
', Generator name = '//TRIM(GeneratorName)//', stored Generator Name for that index = '// &
TRIM(MTGenerator(GenNum)%Name))
END IF
CheckEquipName(GenNum)=.false.
ENDIF
END IF
CALL InitMTGenerators(GenNum, Runflag, MyLoad, FirstHVACIteration)
CALL CalcMTGeneratorModel(GenNum,Runflag,MyLoad,FirstHVACIteration)
CALL UpdateMTGeneratorRecords(GenNum)
RETURN
END SUBROUTINE SimMTGenerator