Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | FlowRatio | |||
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 SimpleTowerApproachResidual(FlowRatio, Par) RESULT (Residuum)
! FUNCTION INFORMATION:
! AUTHOR Richard Raustad, FSEC
! DATE WRITTEN Feb 2005
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Calculates residual function (Desired Approach - Model Approach Output)
! Tower Approach depends on the water (or air) flow rate ratio which is being varied to zero the residual.
! METHODOLOGY EMPLOYED:
! In SizeTower, calibrates tower water flow rate ratio at an air flow rate ratio of 1.
! In VariableSpeedTower, calculates air flow rate ratio at the inlet water flow rate ratio.
! REFERENCES:
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: FlowRatio ! water or air flow ratio of cooling tower
REAL(r64), INTENT(IN), DIMENSION(:), OPTIONAL :: Par ! par(1) = tower number
! par(2) = water or air flow ratio (opposite of input variable)
! par(3) = inlet air wet-bulb temp [C]
! par(4) = tower range [C]
! par(5) = desired approach [C]
! par(6) = 0.0 to calculate water flow rate ratio, 1.0 for air
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 :: TowerIndex ! index of this tower
REAL(r64) :: WaterFlowRateRatio ! ratio of water flow rate to design water flow rate
REAL(r64) :: AirFlowRateRatio ! ratio of water flow rate to design water flow rate
REAL(r64) :: InletAirWB ! inlet air wet-bulb temperature [C]
REAL(r64) :: Trange ! tower range temperature [C]
REAL(r64) :: TapproachActual ! actual tower approach temperature [C]
REAL(r64) :: TapproachDesired ! desired tower approach temperature [C]
TowerIndex = INT(Par(1))
IF(Par(6) .EQ. 0.0d0) THEN
AirFlowRateRatio = Par(2)
WaterFlowRateRatio = FlowRatio
ELSE
AirFlowRateRatio = FlowRatio
WaterFlowRateRatio = Par(2)
END IF
InletAirWB = Par(3)
Trange = Par(4)
TapproachDesired = Par(5)
TapproachActual = 0.0d0
! call model to determine tower approach temperature given other independent variables
CALL CalcVSTowerApproach(TowerIndex,WaterFlowRateRatio,AirFlowRateRatio,InletAirWB,Trange,TapproachActual)
Residuum = TapproachDesired - TapproachActual
RETURN
END FUNCTION SimpleTowerApproachResidual