Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | GenNum |
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.
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 SetupGeneratorControlStateManager(GenNum)
! SUBROUTINE INFORMATION:
! AUTHOR B. Griffith
! DATE WRITTEN July 2006
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! sets up data structures
! METHODOLOGY EMPLOYED:
! like a get input routine but feeds from
! parent objects, could have its own input object someday
!
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: GenNum ! index of generator to setup
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
! get the number of generators that might use this module
NumGensWDynamics = NumMicroCHPs !TODO + NumFuelCellCGenerators
IF (.not. ALLOCATED(GeneratorDynamics)) Then
ALLOCATE(GeneratorDynamics(NumGensWDynamics))
ELSE
DEALLOCATE(GeneratorDynamics)
ALLOCATE(GeneratorDynamics(NumGensWDynamics))
ENDIF
!first populate with Micro CHP data
! DO GenNum = 1, NumMicroCHPs
GeneratorDynamics(GenNum)%name = MicroCHP(GenNum)%Name
GeneratorDynamics(GenNum)%PelMin = MicroCHP(GenNum)%A42Model%MinElecPower
GeneratorDynamics(GenNum)%PelMax = MicroCHP(GenNum)%A42Model%MaxElecPower
GeneratorDynamics(GenNum)%UpTranLimit = MicroCHP(GenNum)%A42Model%DeltaPelMax
GeneratorDynamics(GenNum)%DownTranLimit = MicroCHP(GenNum)%A42Model%DeltaPelMax
GeneratorDynamics(GenNum)%UpTranLimitFuel = MicroCHP(GenNum)%A42Model%DeltaFuelMdotMax
GeneratorDynamics(GenNum)%DownTranLimitFuel = MicroCHP(GenNum)%A42Model%DeltaFuelMdotMax
GeneratorDynamics(GenNum)%WarmUpByTimeDelay = MicroCHP(GenNum)%A42Model%WarmUpByTimeDelay
GeneratorDynamics(GenNum)%WarmUpByEngineTemp = MicroCHP(GenNum)%A42Model%WarmUpByEngineTemp
GeneratorDynamics(GenNum)%MandatoryFullCoolDown = MicroCHP(GenNum)%A42Model%MandatoryFullCoolDown
GeneratorDynamics(GenNum)%WarmRestartOkay = MicroCHP(GenNum)%A42Model%WarmRestartOkay
GeneratorDynamics(GenNum)%WarmUpDelay = MicroCHP(GenNum)%A42Model%WarmUpDelay
GeneratorDynamics(GenNum)%CoolDownDelay = MicroCHP(GenNum)%A42Model%CoolDownDelay / SecInHour ! seconds to hours
GeneratorDynamics(GenNum)%PcoolDown = MicroCHP(GenNum)%A42Model%PcoolDown
GeneratorDynamics(GenNum)%Pstandby = MicroCHP(GenNum)%A42Model%Pstandby
GeneratorDynamics(GenNum)%MCeng = MicroCHP(GenNum)%A42Model%MCeng
GeneratorDynamics(GenNum)%MCcw = MicroCHP(GenNum)%A42Model%MCcw
GeneratorDynamics(GenNum)%kf = MicroCHP(GenNum)%A42Model%kf
GeneratorDynamics(GenNum)%TnomEngOp = MicroCHP(GenNum)%A42Model%TnomEngOp
GeneratorDynamics(GenNum)%kp = MicroCHP(GenNum)%A42Model%kp
GeneratorDynamics(GenNum)%AvailabilitySchedID = MicroCHP(GenNum)%AvailabilitySchedID
GeneratorDynamics(GenNum)%StartUpTimeDelay = MicroCHP(GenNum)%A42Model%WarmUpDelay / SecInHour ! seconds to hours
GeneratorDynamics(GenNum)%ElectEffNom = MicroCHP(GenNum)%A42Model%ElecEff
GeneratorDynamics(GenNum)%ThermEffNom = MicroCHP(GenNum)%A42Model%ThermEff
GeneratorDynamics(GenNum)%QdotHXMax = MicroCHP(GenNum)%A42Model%ThermEff &
* MicroCHP(GenNum)%A42Model%MaxElecPower &
/ MicroCHP(GenNum)%A42Model%ElecEff
GeneratorDynamics(GenNum)%QdotHXMin = MicroCHP(GenNum)%A42Model%ThermEff &
* MicroCHP(GenNum)%A42Model%MinElecPower &
/ MicroCHP(GenNum)%A42Model%ElecEff
GeneratorDynamics(GenNum)%QdotHXOpt = GeneratorDynamics(GenNum)%QdotHXMax
MicroCHP(GenNum)%DynamicsControlID = GenNum
! ENDDO
RETURN
END SUBROUTINE SetupGeneratorControlStateManager