REAL(r64) FUNCTION InterpSw(SwitchFac,A,B)
! FUNCTION INFORMATION:
! AUTHOR Fred Winkelmann
! DATE WRITTEN February 1999
! PURPOSE OF THIS FUNCTION:
! For switchable glazing, calculates a weighted average of properties
! A and B
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: SwitchFac ! Switching factor: 0.0 if glazing is unswitched, = 1.0 if fully switched
REAL(r64), INTENT(IN) :: A ! Glazing property in unswitched state
REAL(r64), INTENT(IN) :: B ! Glazing property in fully switched state
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: locSwitchFac
! bound SwitchFac
locSwitchFac = MIN(SwitchFac, 1.d0)
locSwitchFac = MAX(locSwitchFac, 0.d0)
InterpSw = (1.0d0-locSwitchFac)*A + locSwitchFac*B
RETURN
END FUNCTION InterpSw