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.
fw following check on mirror shadow surface can be removed with addition of above fw check on ShadowSurfPossibleObstruction (which is false for mirror shadow surfaces)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | IHOUR | |||
integer, | intent(in) | :: | IWin | |||
real(kind=r64), | intent(in) | :: | R1(3) | |||
real(kind=r64), | intent(in) | :: | RN(3) | |||
real(kind=r64), | intent(out) | :: | ObTrans |
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 DayltgHitObstruction(IHOUR,IWin,R1,RN,ObTrans)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Winkelmann
! DATE WRITTEN July 1997
! MODIFIED FCW, May 2003: update list of surface classes that qualify as obstructions;
! add interior surfaces as possible obstructors;
! return from DO loop over surfaces as soon as any obstruction is hit;
! FCW, July 2003: change from returning whether an obstruction is hit or not
! to product of solar transmittances of hit obstructions.
! FCW, Nov 2003: remove interior surfaces as possible obstructors since there
! is now a separate check for interior obstructions; exclude windows and
! doors as obstructors since if they are obstructors their base surfaces will
! also be obstructors
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Determines the product of the solar transmittances of the obstructions hit by a ray
! from R1 in the direction of vector RN.
! METHODOLOGY EMPLOYED:na
! REFERENCES:
! Based on DOE-2.1E subroutine DHITSH.
! USE STATEMENTS:
USE ScheduleManager, ONLY: LookUpScheduleValue
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: IHOUR ! Hour number
INTEGER, INTENT(IN) :: IWin ! Window index
REAL(r64), INTENT(IN) :: R1(3) ! Origin of ray (m)
REAL(r64), INTENT(IN) :: RN(3) ! Unit vector along ray
REAL(r64), INTENT(OUT) :: ObTrans ! Product of solar transmittances of exterior obstructions
! (shading surfaces, building walls, etc.) that are hit
! SUBROUTINE PARAMETER DEFINITIONS:na
! INTERFACE BLOCK SPECIFICATIONS:na
! DERIVED TYPE DEFINITIONS:na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: ISurf ! Surface index
INTEGER :: IType ! Surface type/class
! mirror surfaces of shading surfaces
REAL(r64) :: HP(3) ! Hit coordinates, if ray hits an obstruction
INTEGER :: Pierce ! 1 if a particular obstruction is hit, 0 otherwise
REAL(r64) :: Trans ! Solar transmittance of a shading surface
! FLOW:
ObTrans = 1.0d0
! Loop over obstructions, which can be building elements, like walls,
! or shadowing surfaces, like overhangs. Exclude base surface of window IWin.
! Building elements are assumed to be opaque. A shadowing surface is opaque unless
! its transmittance schedule value is non-zero.
DO ISurf = 1,TotSurfaces
IF(.NOT.Surface(ISurf)%ShadowSurfPossibleObstruction) CYCLE
IType = Surface(ISurf)%Class
IF ((IType==SurfaceClass_Wall .OR. IType==SurfaceClass_Roof .OR. IType==SurfaceClass_Floor) &
.AND. ISurf /= Surface(IWin)%BaseSurf) THEN
CALL DayltgPierceSurface(ISurf,R1,RN,Pierce,HP)
IF(Pierce > 0) THEN ! Building element is hit (assumed opaque)
ObTrans = 0.0d0
EXIT
END IF
ELSE IF (Surface(ISurf)%ShadowingSurf) THEN
!!fw following check on mirror shadow surface can be removed with addition of above
!!fw check on ShadowSurfPossibleObstruction (which is false for mirror shadow surfaces)
IF(.not. Surface(ISurf)%MirroredSurf) THEN ! This check skips mirror surfaces
CALL DayltgPierceSurface(ISurf,R1,RN,Pierce,HP)
IF(Pierce > 0) THEN ! Shading surface is hit
! Get solar transmittance of the shading surface
Trans = 0.0d0
IF(Surface(ISurf)%SchedShadowSurfIndex > 0) &
Trans = LookUpScheduleValue(Surface(ISurf)%SchedShadowSurfIndex,IHOUR,1)
IF(Trans < 1.d-6) THEN
ObTrans = 0.0d0
EXIT
ELSE
ObTrans = Obtrans * Trans
END IF
END IF
END IF
END IF ! End of test if building element or shading surface
END DO
RETURN
END SUBROUTINE DayltgHitObstruction