Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | IL | ||||
real(kind=r64) | :: | BLUM | ||||
real(kind=r64) | :: | GLINDX | ||||
integer | :: | ZoneNum |
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.
SUBROUTINE DayltgGlare(IL, BLUM, GLINDX, ZoneNum)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Winkelmann
! DATE WRITTEN July 1997
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! CALCULATE GLARE INDEX.
! METHODOLOGY EMPLOYED:
! Called from DayltgInteriorIllum. Finds glare index at reference
! point no. IL in a space using the Cornell/BRS large source
! glare formula. BLUM is the background luminance (cd/m**2).
!
! TH comment 1/21/2010: The SurfaceWindow(IWin)%ShadingFlag has to be set
! before calling this subroutine. For switchable glazings this is tricky
! because the ZoneDaylight(ZoneNum)%SourceLumFromWinAtRefPt(IL,2,loop)
! may change every time step to represent intermediate switched state.
! REFERENCES:
! Based on DOE-2.1E subroutine DGLARE.
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER :: IL ! Reference point index: 1=first ref pt, 2=second ref pt
REAL(r64) :: BLUM ! Window background (surround) luminance (cd/m2)
REAL(r64) :: GLINDX ! Glare index
INTEGER :: ZoneNum ! Zone number
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: GTOT ! Glare constant
REAL(r64) :: GTOT1 ! Portion of glare constant
REAL(r64) :: GTOT2 ! Portion of glare constant
INTEGER :: IWin ! Window counter
INTEGER :: IS ! Window shading index: 1=unshaded, 2=shaded
INTEGER :: loop ! Loop index
! FLOW:
! Initialize glare constant
GTOT = 0.0d0
! Loop over exterior windows associated with zone
DO loop = 1,ZoneDaylight(ZoneNum)%NumOfDayltgExtWins
IWin = ZoneDaylight(ZoneNum)%DayltgExtWinSurfNums(loop)
IS = 1
IF((SurfaceWindow(IWin)%ShadingFlag >= 1 .AND. SurfaceWindow(IWin)%ShadingFlag <= 9) .OR. &
SurfaceWindow(IWin)%SolarDiffusing) IS = 2
! Conversion from ft-L to cd/m2, with cd/m2 = 0.2936 ft-L, gives the 0.4794 factor
! below, which is (0.2936)**0.6
GTOT1 = 0.4794d0*(ZoneDaylight(ZoneNum)%SourceLumFromWinAtRefPt(IL,IS,loop)**1.6d0) * &
ZoneDaylight(ZoneNum)%SolidAngAtRefPtWtd(IL,loop)**0.8d0
GTOT2 = BLUM + 0.07d0 * (ZoneDaylight(ZoneNum)%SolidAngAtRefPt(IL,loop)**0.5d0) * &
ZoneDaylight(ZoneNum)%SourceLumFromWinAtRefPt(IL,IS,loop)
GTOT = GTOT + GTOT1 / (GTOT2 + 0.000001d0)
END DO
! Glare index (adding 0.000001 prevents LOG10 (0))
GLINDX = 10.0d0*LOG10(GTOT+0.000001d0)
! Set glare index to zero for GTOT < 1
GLINDX = MAX(0.0d0, GLINDX)
RETURN
END SUBROUTINE DayltgGlare