Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | Tact | |||
real(kind=r64), | intent(in) | :: | Tlo | |||
real(kind=r64), | intent(in) | :: | Thi | |||
real(kind=r64), | intent(in) | :: | Xlo | |||
real(kind=r64), | intent(in) | :: | Xhi |
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 GetInterpValue(Tact,Tlo,Thi,Xlo,Xhi) RESULT(ReturnValue)
! FUNCTION INFORMATION:
! AUTHOR Rick Strand
! DATE WRITTEN June 2004
! MODIFIED N/A
! RE-ENGINEERED N/A
! PURPOSE OF THIS FUNCTION:
! This subroutine does a simple linear interpolation.
! METHODOLOGY EMPLOYED:
! No mysteries here...just plain-old linear interpolation.
! REFERENCES:
! Any basic engineering mathematic text.
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: Tact ! actual temperature at which we want the property of interest
REAL(r64), INTENT(IN) :: Tlo ! temperature below Tact for which we have property data
REAL(r64), INTENT(IN) :: Thi ! temperature above Tact for which we have property data
REAL(r64), INTENT(IN) :: Xlo ! value of property at Tlo
REAL(r64), INTENT(IN) :: Xhi ! value of property at Thi
REAL(r64) :: ReturnValue
! SUBROUTINE PARAMETER DEFINITIONS:
REAL(r64), PARAMETER :: TempToler = 0.001d0 ! Some reasonable value for comparisons
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
! na
! FLOW:
IF ( ABS(Thi-Tlo) > TempToler) THEN
ReturnValue = Xhi - ( ( (Thi-Tact)/(Thi-Tlo) ) * (Xhi-Xlo) )
ELSE
CALL ShowFatalError('GetInterpValue: Temperatures for fluid property data too close together, division by zero')
ReturnValue = 0.0d0
END IF
RETURN
END FUNCTION GetInterpValue