Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | CWFlow | |||
real(kind=r64), | intent(in), | optional | DIMENSION(:) | :: | Par |
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.
FUNCTION CoolBeamResidual(CWFlow, Par) RESULT (Residuum)
! FUNCTION INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN February 2009
! MODIFIED
! RE-ENGINEERED
! PURPOSE OF THIS FUNCTION:
! Calculates residual function (Requested Unit Load - Unit Output) / Max Unit Output
! Unit Output depends on the cold water flow rate which is being varied to zero the residual.
! METHODOLOGY EMPLOYED:
! Calls CalcCoolBeam, and calculates the residual as defined above.
! REFERENCES:
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: CWFlow ! cold water flow rate in kg/s
REAL(r64), INTENT(IN), DIMENSION(:), OPTIONAL :: Par
REAL(r64) :: Residuum ! residual to be minimized to zero
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER :: CBIndex
INTEGER :: ZoneNodeIndex
REAL(r64) :: UnitOutput=0.0d0
REAL(r64) :: TWOut=0.0d0
CBIndex = INT(Par(1))
ZoneNodeIndex = INT(Par(2))
CALL CalcCoolBeam(CBIndex,ZoneNodeIndex,CWFlow,UnitOutput,TWOut)
Residuum = (Par(3) - UnitOutput) / (Par(5) - Par(4))
RETURN
END FUNCTION CoolBeamResidual