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) | :: | RunFlagElectCenter | |||
logical, | intent(in) | :: | RunFlagPlant | |||
real(kind=r64), | intent(in) | :: | MyElectricLoad | |||
real(kind=r64), | intent(in) | :: | MyThermalLoad | |||
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 SimMicroCHPGenerator(GeneratorType,GeneratorName,GeneratorIndex,RunFlagElectCenter, RunFlagPlant,&
MyElectricLoad,MyThermalLoad, FirstHVACIteration)
! SUBROUTINE INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN July 2006
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE: This is the main driver for the model for
! internal combustion engine and
! Stirling cycle engine model from IEA/ECBCS Annex 42 r. 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
USE DataPlant, ONLY: PlantSizeNotComplete
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) :: RunFlagElectCenter ! simulate Generator when TRUE
LOGICAL , INTENT(IN) :: RunFlagPlant ! simulate generator when true.
REAL(r64), INTENT(IN) :: MyElectricLoad ! demand on electric generator
REAL(r64), INTENT(IN) :: MyThermalLoad ! thermal demand on cogenerator
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 (GetMicroCHPInput) THEN
CALL GetMicroCHPGeneratorInput
GetMicroCHPInput = .FALSE.
END IF
! Call InitMicroCHPNoNormalizeGenerators
IF (GeneratorIndex == 0) THEN
GenNum = FindItemInList(GeneratorName,MicroCHP%Name,NumMicroCHPs)
IF (GenNum == 0) CALL ShowFatalError('SimMicroCHPGenerator: Specified Generator not one of Valid Micro CHP Generators '// &
TRIM(GeneratorName))
GeneratorIndex=GenNum
ELSE
GenNum=GeneratorIndex
IF (GenNum > NumMicroCHPs .or. GenNum < 1) THEN
CALL ShowFatalError('SimMicroCHPGenerator: Invalid GeneratorIndex passed='//TRIM(TrimSigDigits(GenNum))// &
', Number of Micro CHP Generators='//TRIM(TrimSigDigits(NumMicroCHPs))// &
', Generator name='//TRIM(GeneratorName))
ENDIF
IF (CheckEquipName(GenNum)) THEN
IF (GeneratorName /= MicroCHP(GenNum)%Name) THEN
CALL ShowFatalError('SimMicroCHPNoNormalizeGenerator: Invalid GeneratorIndex passed='//TRIM(TrimSigDigits(GenNum))// &
', Generator name='//TRIM(GeneratorName)//', stored Generator Name for that index='// &
TRIM(MicroCHP(GenNum)%Name))
ENDIF
CheckEquipName(GenNum)=.false.
ENDIF
ENDIF
If (MicroCHP(GenNum)%ModelTypeAnnex42) Then ! call the non normalize calc routines (set for future extension to normalize ones)
CALL InitMicroCHPNoNormalizeGenerators(GenNum, FirstHVACIteration)
IF (PlantSizeNotComplete) RETURN
CALL CalcMicroCHPNoNormalizeGeneratorModel(GenNum,RunFlagElectCenter, RunFlagPlant,MyElectricLoad, &
MyThermalLoad, FirstHVACIteration)
CALL CalcUpdateHeatRecovery(GenNum, FirstHVACIteration)
CALL UpdateMicroCHPGeneratorRecords(GenNum)
ENDIF
RETURN
END SUBROUTINE SimMicroCHPGenerator