Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | Tin | |||
real(kind=r64), | intent(in) | :: | Tout | |||
real(kind=r64), | intent(in) | :: | Tfr |
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 CalcDetIceStorLMTDstar(Tin, Tout, Tfr)
! SUBROUTINE INFORMATION:
! AUTHOR Rick Strand
! DATE WRITTEN February 2006
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine calculates the log mean temperature difference for
! the detailed ice storage unit. The temperature difference is non-
! dimensionalized using a nominal temperature difference of 10C.
! This value must be used when obtaining the curve fit coefficients.
! METHODOLOGY EMPLOYED:
! Straight-forward calculation where:
! LMTD* = LMTD/Tnom
! LMTD = (Tin-Tout)/ln((Tin-Tfr)/(Tout-Tfr))
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: Tin ! ice storage unit inlet temperature
REAL(r64), INTENT(IN) :: Tout ! ice storage unit outlet (setpoint) temperature
REAL(r64), INTENT(IN) :: Tfr ! freezing temperature
! SUBROUTINE PARAMETER DEFINITIONS:
REAL(r64), PARAMETER :: Tnom =10.0d0 ! Nominal temperature difference across the ice storage unit [C]
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: DeltaTio ! Inlet to outlet temperature difference
REAL(r64) :: DeltaTif ! Inlet to freezing temperature difference
REAL(r64) :: DeltaTof ! Outlet to freezing temperature difference
! FLOW:
! First set the temperature differences and avoid problems with the LOG
! term by setting some reasonable minimums
DeltaTio = ABS(Tin-Tout)
DeltaTif = ABS(Tin-Tfr)
DeltaTof = ABS(Tout-Tfr)
IF (DeltaTif < DeltaTifMin) DeltaTif = DeltaTifMin
IF (DeltaTof < DeltaTofMin) DeltaTof = DeltaTofMin
CalcDetIceStorLMTDstar = ( DeltaTio / LOG(DeltaTif/DeltaTof) ) / Tnom
RETURN
END FUNCTION CalcDetIceStorLMTDstar