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(in) | :: | GeneratorNum | |||
logical, | intent(in) | :: | RunFlag | |||
real(kind=r64), | intent(in) | :: | FuelFlowRequest | |||
real(kind=r64), | intent(out) | :: | FuelFlowProvided | |||
logical, | intent(out) | :: | ConstrainedIncreasingMdot | |||
logical, | intent(out) | :: | ConstrainedDecreasingMdot |
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 ManageGeneratorFuelFlow(GeneratorType, GeneratorName, GeneratorNum,RunFlag,FuelFlowRequest, &
FuelFlowProvided, ConstrainedIncreasingMdot, ConstrainedDecreasingMdot)
! SUBROUTINE INFORMATION:
! AUTHOR B. Griffith
! DATE WRITTEN July 2006
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! check if change in fuel flow rate is okay
! METHODOLOGY EMPLOYED:
! <description>
! REFERENCES:
! na
! USE STATEMENTS:
! na
USE DataGlobalConstants
USE DataHVACGlobals, only:TimeStepSys
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: GeneratorType ! type of Generator
CHARACTER(len=*), INTENT(IN) :: GeneratorName ! user specified name of Generator
INTEGER, INTENT(IN) :: GeneratorNum ! Generator number
LOGICAL, INTENT(IN) :: RunFlag ! TRUE when Generator operating
REAL(r64) , INTENT(IN) :: FuelFlowRequest ! Generator demand mdot kg/ s
REAL(r64), INTENT(OUT) :: FuelFlowProvided ! allowed after constraints kg/s
LOGICAL, INTENT(OUT) :: ConstrainedIncreasingMdot ! true if request was altered because of fuel rate of change up
LOGICAL, INTENT(OUT) :: ConstrainedDecreasingMdot ! true if request was altered because of fuel rate of change down
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: MdotFuel
REAL(r64) :: MaxMdot
REAL(r64) :: MinMdot
INTEGER :: DynaCntrlNum
ConstrainedIncreasingMdot = .false.
ConstrainedDecreasingMdot = .false.
MdotFuel = FuelFlowRequest
! get index from GeneratorNum
SELECT CASE (GeneratorType)
CASE (iGeneratorMicroCHP)
DynaCntrlNum = MicroCHP(GeneratorNum)%DynamicsControlID
END SELECT
IF (FuelFlowRequest > GeneratorDynamics(DynaCntrlNum)%FuelMdotLastTimestep) THEN ! fuel flow is up
MaxMdot = GeneratorDynamics(DynaCntrlNum)%FuelMdotLastTimestep &
+ GeneratorDynamics(DynaCntrlNum)%UpTranLimitFuel * TimeStepSys * SecInHour
IF (MaxMdot < FuelFlowRequest ) THEN
MdotFuel = MaxMdot
ConstrainedIncreasingMdot = .true.
ENDIF
ELSEIF (FuelFlowRequest < GeneratorDynamics(DynaCntrlNum)%FuelMdotLastTimestep) THEN ! fuel flow is down
MinMdot = GeneratorDynamics(DynaCntrlNum)%FuelMdotLastTimestep &
- GeneratorDynamics(DynaCntrlNum)%DownTranLimitFuel * TimeStepSys * SecInHour
IF (FuelFlowRequest < MinMdot ) THEN
MdotFuel = MinMdot
ConstrainedDecreasingMdot = .true.
ENDIF
ELSE
! do nothing
ENDIF
FuelFlowProvided = MdotFuel
RETURN
END SUBROUTINE ManageGeneratorFuelFlow