Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. 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.
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 W5InitGlassParameters
! SUBROUTINE INFORMATION:
! AUTHOR F. Winkelmann
! DATE WRITTEN October 1999
! MODIFIED Aug 2001 (FW): add blinds
! Oct 2002 (FW): change ConstrNumSh =
! WindowShadingControl(Surface(SurfNum)%WindowShadingControlPtr)%ShadedConstruction
! to Surface(SurfNum)%ShadedConstruction
! Jul 2003 (FW): remove unneeded warning if center-of-glass area < 0
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Initializes variables used in the window optical and thermal calculation.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE General, ONLY: RoundSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: ConstrNum ! Construction number
INTEGER :: SurfNum ! Surface number
INTEGER :: IPhi ! Angle of incidence counter
INTEGER :: FrDivNum ! Pointer to frame/divider
REAL(r64) :: FrWidth ! Window frame width {m}
REAL(r64) :: FrEdgeWidth ! Frame edge width {m}
REAL(r64) :: DivWidth ! Window divider width {m}
REAL(r64) :: DivEdgeWidth ! Divider edge width {m}
REAL(r64) :: GlHeight ! Height of glazed part of window {m}
REAL(r64) :: GlWidth ! Width of glazed part of window {m}
INTEGER :: NumHorDividers ! Number of horizontal divider elements
INTEGER :: NumVertDividers ! Number of vertical divider elements
INTEGER :: BaseSurfNum ! Base surface number
INTEGER :: ShadingType ! Window shading type
INTEGER :: MatNum ! Material number
INTEGER :: DifOverrideCount ! Count the number of SolarDiffusing material overrides
! FLOW
DO ConstrNum = 1,TotConstructs
IF(Construct(ConstrNum)%FromWindow5DataFile) CYCLE
IF(Construct(ConstrNum)%WindowTypeBSDF) CYCLE
Construct(ConstrNum)%TransDiff = 0.0d0
Construct(ConstrNum)%TransDiffVis = 0.0d0
Construct(ConstrNum)%AbsDiffBackShade = 0.0d0
Construct(ConstrNum)%ShadeAbsorpThermal = 0.0d0
Construct(ConstrNum)%ReflectSolDiffBack = 0.0d0
Construct(ConstrNum)%ReflectSolDiffFront = 0.0d0
Construct(ConstrNum)%ReflectVisDiffFront = 0.0d0
Construct(ConstrNum)%AbsBeamShadeCoef = 0.0d0
Construct(ConstrNum)%TransSolBeamCoef = 0.0d0
Construct(ConstrNum)%ReflSolBeamFrontCoef = 0.0d0
Construct(ConstrNum)%ReflSolBeamBackCoef = 0.0d0
Construct(ConstrNum)%TransVisBeamCoef = 0.0d0
Construct(ConstrNum)%AbsBeamCoef = 0.0d0
Construct(ConstrNum)%AbsBeamBackCoef = 0.0d0
Construct(ConstrNum)%AbsDiff = 0.0d0
Construct(ConstrNum)%AbsDiffBack = 0.0d0
END DO
DO SurfNum = 1,TotSurfaces
! For a window with shading device, get number of shaded construction and, if window
! has a blind (interior, exterior or between glass), get blind data pointer.
! TH 2/16/2010. CR 8010. The following code was modified and moved to GetSurfaceData
! in SurfaceGeometry module, because for blinds with variable slats new blinds were created and assigned
IF(Surface(SurfNum)%WindowShadingControlPtr /= 0) THEN
! ConstrNumSh = Surface(SurfNum)%ShadedConstruction
ShadingType = WindowShadingControl(Surface(SurfNum)%WindowShadingControlPtr)%ShadingType
! IF(ShadingType == WSC_ST_ExteriorBlind) THEN
! MatNum = Construct(ConstrNumSh)%LayerPoint(1)
! SurfaceWindow(SurfNum)%BlindNumber = Material(MatNum)%BlindDataPtr
! ELSE IF(ShadingType == WSC_ST_InteriorBlind) THEN
! MatNum = Construct(ConstrNumSh)%LayerPoint(Construct(ConstrNumSh)%TotLayers)
! SurfaceWindow(SurfNum)%BlindNumber = Material(MatNum)%BlindDataPtr
! Between glass blind is layer 3 for double glazing and layer 5 for triple glazing.
! ELSE IF(ShadingType == WSC_ST_BetweenGlassBlind) THEN
! IF(Construct(ConstrNumSh)%TotGlassLayers == 2) THEN
! SurfaceWindow(SurfNum)%BlindNumber = Material(Construct(ConstrNumSh)%LayerPoint(3))%BlindDataPtr
! ELSE
! SurfaceWindow(SurfNum)%BlindNumber = Material(Construct(ConstrNumSh)%LayerPoint(5))%BlindDataPtr
! END IF
! ELSE IF(ShadingType == WSC_ST_ExteriorScreen) THEN
IF(ShadingType == WSC_ST_ExteriorScreen) THEN
! Count number of exterior window screens, initialize in InitGlassOpticalCalculations after returning
! from this subroutine. The blind structure is initialized first and then the screen structure is initialized.
NumSurfaceScreens = NumSurfaceScreens + 1
END IF
END IF
END DO
! Set some static exterior-window frame and divider SurfaceWindow values
! from values in FrameDivider derived type
DO SurfNum = 1,TotSurfaces
FrDivNum = Surface(SurfNum)%FrameDivider
IF(FrDivNum > 0) THEN ! Surface is a window with a frame and/or divider
FrWidth = FrameDivider(FrDivNum)%FrameWidth
GlHeight = Surface(SurfNum)%Height
GlWidth = Surface(SurfNum)%Width
NumVertDividers = FrameDivider(FrDivNum)%VertDividers
NumHorDividers = FrameDivider(FrDivNum)%HorDividers
BaseSurfNum = Surface(SurfNum)%BaseSurf
SurfaceWindow(SurfNum)%FrameConductance = FrameDivider(FrDivNum)%FrameConductance
SurfaceWindow(SurfNum)%FrameSolAbsorp = FrameDivider(FrDivNum)%FrameSolAbsorp
SurfaceWindow(SurfNum)%FrameVisAbsorp = FrameDivider(FrDivNum)%FrameVisAbsorp
SurfaceWindow(SurfNum)%FrameEmis = FrameDivider(FrDivNum)%FrameEmis
SurfaceWindow(SurfNum)%FrEdgeToCenterGlCondRatio = FrameDivider(FrDivNum)%FrEdgeToCenterGlCondRatio
SurfaceWindow(SurfNum)%DividerType = DividedLite
IF(FrameDivider(FrDivNum)%DividerType == Suspended) SurfaceWindow(SurfNum)%DividerType = Suspended
DivWidth = FrameDivider(FrDivNum)%DividerWidth
SurfaceWindow(SurfNum)%DividerConductance = FrameDivider(FrDivNum)%DividerConductance
SurfaceWindow(SurfNum)%DividerSolAbsorp = FrameDivider(FrDivNum)%DividerSolAbsorp
SurfaceWindow(SurfNum)%DividerVisAbsorp = FrameDivider(FrDivNum)%DividerVisAbsorp
SurfaceWindow(SurfNum)%DividerEmis = FrameDivider(FrDivNum)%DividerEmis
SurfaceWindow(SurfNum)%DivEdgeToCenterGlCondRatio = FrameDivider(FrDivNum)%DivEdgeToCenterGlCondRatio
SurfaceWindow(SurfNum)%OutsideRevealSolAbs = FrameDivider(FrDivNum)%OutsideRevealSolAbs
SurfaceWindow(SurfNum)%InsideSillDepth = FrameDivider(FrDivNum)%InsideSillDepth
SurfaceWindow(SurfNum)%InsideReveal = FrameDivider(FrDivNum)%InsideReveal
SurfaceWindow(SurfNum)%InsideSillSolAbs = FrameDivider(FrDivNum)%InsideSillSolAbs
SurfaceWindow(SurfNum)%InsideRevealSolAbs = FrameDivider(FrDivNum)%InsideRevealSolAbs
FrEdgeWidth = FrameDivider(FrDivNum)%FrameEdgeWidth
DivEdgeWidth = FrameDivider(FrDivNum)%DividerEdgeWidth
SurfaceWindow(SurfNum)%FrameEdgeArea = 2 * FrEdgeWidth * &
( GlHeight - FrEdgeWidth - NumHorDividers*DivWidth + &
GlWidth - FrEdgeWidth - NumVertDividers*DivWidth )
SurfaceWindow(SurfNum)%DividerEdgeArea = 2*DivEdgeWidth* &
( NumHorDividers*(GlWidth-2*FrEdgeWidth) + NumVertDividers*(GlHeight-2*FrEdgeWidth)) &
- NumHorDividers*NumVertDividers*(4*DivEdgeWidth**2 + 4*FrEdgeWidth*DivWidth)
SurfaceWindow(SurfNum)%CenterGlArea = Surface(SurfNum)%Area - &
SurfaceWindow(SurfNum)%FrameEdgeArea - SurfaceWindow(SurfNum)%DividerEdgeArea
SurfaceWindow(SurfNum)%EdgeGlCorrFac = &
(SurfaceWindow(SurfNum)%FrameEdgeArea * SurfaceWindow(SurfNum)%FrEdgeToCenterGlCondRatio + &
SurfaceWindow(SurfNum)%DividerEdgeArea * SurfaceWindow(SurfNum)%DivEdgeToCenterGlCondRatio + &
SurfaceWindow(SurfNum)%CenterGlArea) / &
(SurfaceWindow(SurfNum)%FrameEdgeArea + SurfaceWindow(SurfNum)%DividerEdgeArea + &
SurfaceWindow(SurfNum)%CenterGlArea)
END IF
END DO
! Set SolarDiffusing to true for exterior windows that have a construction with an innermost diffusing glass layer
DifOverrideCount=0
DO SurfNum = 1,TotSurfaces
SurfaceWindow(SurfNum)%SolarDiffusing = .false.
IF(Surface(SurfNum)%Class == SurfaceClass_Window .AND. Surface(SurfNum)%ExtBoundCond == ExternalEnvironment .AND. &
Surface(SurfNum)%StormWinConstruction == 0) THEN
ConstrNum = Surface(SurfNum)%Construction
MatNum = Construct(ConstrNum)%LayerPoint(Construct(ConstrNum)%TotLayers)
IF(Material(MatNum)%SolarDiffusing) THEN
IF (Surface(SurfNum)%WindowShadingControlPtr == 0) THEN
SurfaceWindow(SurfNum)%SolarDiffusing = .true.
ELSE ! There is a shading control
IF (WindowShadingControl(Surface(SurfNum)%WindowShadingControlPtr)%ShadingType == SwitchableGlazing) THEN
SurfaceWindow(SurfNum)%SolarDiffusing = .true.
ELSE
SurfaceWindow(SurfNum)%SolarDiffusing = .false.
DifOverrideCount=DifOverrideCount+1
IF (DisplayExtraWarnings) THEN
CALL ShowWarningError('W5InitGlassParameters: Window="'//trim(Surface(SurfNum)%Name)// &
'" has interior material with Solar Diffusing=Yes, but existing Window Shading Device sets Diffusing=No.')
ENDIF
ENDIF
ENDIF
ENDIF
END IF
END DO
IF (DifOverrideCount > 0) THEN
IF (.not. DisplayExtraWarnings) THEN
CALL ShowWarningError('W5InitGlassParameters: '//trim(RoundSigDigits(DifOverrideCount))// &
' Windows had Solar Diffusing=Yes overridden by presence of Window Shading Device.')
ELSE
CALL ShowMessage('W5InitGlassParameters: '//trim(RoundSigDigits(DifOverrideCount))// &
' Windows had Solar Diffusing=Yes overridden by presence of Window Shading Device.')
ENDIF
ENDIF
DO IPhi = 1, 10
CosPhiIndepVar(IPhi) = COS((IPhi-1)*10.0d0*DegToRadians)
END DO
RETURN
END SUBROUTINE W5InitGlassParameters