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) | :: | GeneratorNum | |||
real(kind=r64), | intent(in) | :: | Pnetss | |||
real(kind=r64), | intent(in) | :: | TcwIn |
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.
REAL(r64) FUNCTION FuncDetermineCWMdotForInternalFlowControl(GeneratorNum, Pnetss, TcwIn)
! FUNCTION INFORMATION:
! AUTHOR B. Griffith
! DATE WRITTEN Dec 2009
! MODIFIED na
! RE-ENGINEERED B. Griffith, Sept 2010, plant upgrade
! PURPOSE OF THIS FUNCTION:
! common place to figure flow rates with internal flow control
! METHODOLOGY EMPLOYED:
! apply contraints imposed by plant according to flow lock, first HVAC iteration etc.
! REFERENCES:
! na
! USE STATEMENTS:
USE CurveManager, ONLY: CurveValue
USE DataPlant, ONLY: PlantLoop
USE DataLoopNode, ONLY: Node
USE PlantUtilities, ONLY: SetComponentFlowRate
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: GeneratorNum ! ID of generator
REAL(r64), INTENT(IN) :: Pnetss ! power net steady state
REAL(r64), INTENT(IN) :: TcwIn ! temperature of cooling water at inlet
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: MdotCW
INTEGER :: InletNode
INTEGER :: OutletNode
InletNode = MicroCHP(GeneratorNum)%PlantInletNodeID
OutletNode = MicroCHP(GeneratorNum)%PlantOutletNodeID
! first evaluate curve
Mdotcw = CurveValue(MicroCHP(GeneratorNum)%A42Model%WaterFlowCurveID, Pnetss, TcwIn)
! now apply constraints
Mdotcw = MAX(0.0D0, Mdotcw)
!make sure plant can provide, utility call may change flow
IF (MicroCHP(GeneratorNum)%CWLoopNum > 0) THEN ! protect early calls
CALL SetComponentFlowRate(Mdotcw,InletNode,OutletNode, &
MicroCHP(GeneratorNum)%CWLoopNum, &
MicroCHP(GeneratorNum)%CWLoopSideNum, &
MicroCHP(GeneratorNum)%CWBranchNum, &
MicroCHP(GeneratorNum)%CWCompNum)
ENDIF
FuncDetermineCWMdotForInternalFlowControl = Mdotcw
RETURN
END FUNCTION FuncDetermineCWMdotForInternalFlowControl