| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=r64), | intent(in) | :: | Eps | |||
| real(kind=r64), | intent(in) | :: | Z | 
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.
FUNCTION GetNTUforCrossFlowBothUnmixed(Eps, Z) RESULT (NTU)
          ! FUNCTION INFORMATION:
          !       AUTHOR         Michael Wetter
          !       DATE WRITTEN   March 1999
          !       MODIFIED       Fred Buhl November 2000
          !       RE-ENGINEERED  na
          ! PURPOSE OF THIS FUNCTION:
          ! Calculates the NTU value based on the exchanger effectiveness
          ! and the capacity ratio for cross flow exchanger, both
          ! streams unmixed
          ! METHODOLOGY EMPLOYED:
          ! Uses a Regula Falsi solver function to numerically invert the formula
          ! giving effectiveness as a function of NTU and Z..
          ! REFERENCES:
          ! M. Wetter, Simulation Model Air-to-Air Plate Heat Exchanger
          ! LBNL Report 42354, 1999.
          ! Also see:
          ! ASHRAE HVAC 2 Toolkit, pages 4-3 through 4-5
          ! USE STATEMENTS:
          ! na
  IMPLICIT NONE    ! Enforce explicit typing of all variables in this routine
          ! FUNCTION ARGUMENT DEFINITIONS:
  REAL(r64), INTENT(IN)     :: Eps     ! heat exchanger effectiveness
  REAL(r64), INTENT(IN)     :: Z       ! capacity rate ratio
  REAL(r64)            :: NTU     ! result variable; number of transfer units
          ! FUNCTION PARAMETER DEFINITIONS:
  REAL(r64), PARAMETER  :: Acc =  0.0001d0       ! Accuracy of result
  INTEGER, PARAMETER    :: MaxIte = 500        ! Maximum number of iterations
          ! INTERFACE BLOCK SPECIFICATIONS:
          ! na
          ! DERIVED TYPE DEFINITIONS:
          ! na
          ! FUNCTION LOCAL VARIABLE DECLARATIONS:
  INTEGER    :: SolFla              ! Flag of solver
  REAL(r64)  :: NTU0 = 0.d0           ! lower bound for NTU
  REAL(r64)  :: NTU1 = 50.d0          ! upper bound for NTU
  REAL(r64), DIMENSION(2) :: Par
  Par(1) = Eps
  Par(2) = Z
  CALL SolveRegulaFalsi(Acc, MaxIte, SolFla, NTU, &
    GetResidCrossFlowBothUnmixed, NTU0, NTU1, Par)
  IF (SolFla == -2) THEN
    CALL ShowFatalError('HeatRecovery: Bad initial bounds for NTU in GetNTUforCrossFlowBothUnmixed')
  ELSE IF (SolFla == -1) THEN
    CALL ShowFatalError('HeatRecovery: No convergence in solving for NTU in GetNTUforCrossFlowBothUnmixed')
  END IF
RETURN
END FUNCTION GetNTUforCrossFlowBothUnmixed