Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | THETA | |||
real(kind=r64), | intent(out) | :: | RAT_1MR | |||
real(kind=r64), | intent(out) | :: | RAT_TAU |
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.
LOGICAL FUNCTION Specular_OffNormal(THETA, RAT_1MR, RAT_TAU)
!
! FUNCTION INFORMATION:
! AUTHOR JOHN L. WRIGHT, University of Waterloo, Mechanical Engineering
! Advanced Glazing System Laboratory
! DATE WRITTEN unknown
! MODIFIED na
!
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Returns ratio of off-normal to normal of opetical properties.
!
! METHODOLOGY EMPLOYED:
! Uses a reference glass property.
!
! returns TRUE if RAT_TAU < 1 or RAT_1MR < 1 (and thus Specular_Adjust s/b called)
! else FALSE
!
! REFERENCES:
! na
!
! USE STATEMENTS:
! na
!
!
IMPLICIT NONE
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN):: THETA ! solar beam angle of incidence, from normal radians
! 0 <= THETA <= PI/2
REAL(r64), INTENT(OUT):: RAT_1MR ! returned: ratio of off-normal to normal solar (1-reflectance)
! NOTE: rhoAdj = 1-(1-rho)*RAT_1MR
REAL(r64), INTENT(OUT):: RAT_TAU ! returned: ratio of off-normal to normal solar transmittance
!
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: TAU0, RHO0, THETA1, THETA2, TAU_ON, RHO_ON, TAU_A
REAL(r64) :: RPERP, RPARL ! interface reflectance with respect to perpendicular
! and parallel polarization components of solar radiation
REAL(r64) :: TAUPERP, TAUPARL, RHOPERP, RHOPARL
REAL(r64) :: N2 ! reference refractive index for generating general off-normal
! curves for specular glazings
REAL(r64) :: KL ! extinction coefficient - thickness product, also used as a
! reference value to generate off-normal curves for specular layers
! Flow
Specular_OffNormal = .TRUE.
THETA1=ABS( THETA)
IF (THETA1 > PiOvr2 - DegToRadians) THEN
! theta > 89 deg
RAT_TAU = 0.0d0
RAT_1MR = 0.0d0
ELSE IF (THETA1 >= DegToRadians) THEN
! theta >= 1 deg
N2=1.526d0
KL=55.d0 * 0.006d0
TAU_A = EXP(-1.d0*KL)
RPERP=((N2-1.d0)/(N2+1.d0))**2
TAU0=TAU_A*(1.d0 -RPERP)*(1.d0 -RPERP) / (1.d0 -(RPERP*RPERP*TAU_A*TAU_A))
RHO0=RPERP*(1.d0 +(TAU_A*TAU0))
THETA2 = ASIN((SIN(THETA1))/N2)
TAU_A = EXP(-1.d0 * KL/COS(THETA2))
RPERP=((SIN(THETA2-THETA1))/(SIN(THETA2+THETA1)))**2
RPARL=((TAN(THETA2-THETA1))/(TAN(THETA2+THETA1)))**2
TAUPERP=TAU_A*(1.d0-RPERP)*(1.d0-RPERP) &
/ (1.d0-(RPERP*RPERP*TAU_A*TAU_A))
TAUPARL=TAU_A*(1.d0-RPARL)*(1.d0-RPARL) &
/ (1.d0-(RPARL*RPARL*TAU_A*TAU_A))
RHOPERP=RPERP*(1.d0+(TAU_A*TAUPERP))
RHOPARL=RPARL*(1.d0+(TAU_A*TAUPARL))
TAU_ON=(TAUPERP+TAUPARL)/2.d0
RHO_ON=(RHOPERP+RHOPARL)/2.d0
RAT_TAU=TAU_ON/TAU0
RAT_1MR=(1.d0-RHO_ON)/(1.d0-RHO0)
ELSE
Specular_OffNormal = .FALSE.
RAT_TAU = 1.0d0
RAT_1MR = 1.0d0
END IF
RETURN
END FUNCTION Specular_OffNormal