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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | PipeNum |
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.
REAL(r64) FUNCTION CalcTDDTransSolHorizon(PipeNum)
! SUBROUTINE INFORMATION:
! AUTHOR Peter Graham Ellis
! DATE WRITTEN July 2003
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Calculates the transmittance of sky horizon radiation for use with the anisotropic sky transmittance.
! METHODOLOGY EMPLOYED:
! The transmittance is calculated and stored once at initialization because the value is a constant.
! The routine numerically integrates over the horizon as an infinitesimally narrow strip of the sky.
! Horizon radiation is isotropic, but incident angle varies over the semicircle.
!
! Trans = Flux Transmitted / Flux Incident
!
! Not sure if shading is adequately accounted for by DifShdgRatioHoriz later on or not...
! REFERENCES:
! See AnisoSkyViewFactors in SolarShading.f90.
! USE STATEMENTS:
USE DataSurfaces
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: PipeNum ! TDD pipe object number
! FUNCTION PARAMETER DEFINITIONS:
INTEGER, PARAMETER :: NTH = 18 ! Number of azimuth integration points
! FUNCTION LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: FluxInc ! Incident solar flux
REAL(r64) :: FluxTrans ! Transmitted solar flux
REAL(r64) :: trans ! Total beam solar transmittance of TDD
INTEGER :: N ! Loop counter
REAL(r64) :: TH ! Azimuth angle of sky horizon element
REAL(r64) :: dTH ! Azimuth angle increment
REAL(r64) :: THMIN ! Minimum azimuth integration limit
REAL(r64) :: THMAX ! Maximum azimuth integration limit
REAL(r64) :: CosPhi ! Cosine of TDD:DOME altitude angle
REAL(r64) :: Theta ! TDD:DOME azimuth angle
REAL(r64) :: COSI ! Cosine of the incident angle
! FLOW:
FluxInc = 0.0d0
FluxTrans = 0.0d0
CosPhi = COS(PiOvr2 - Surface(TDDPipe(PipeNum)%Dome)%Tilt * DegToRadians)
Theta = Surface(TDDPipe(PipeNum)%Dome)%Azimuth * DegToRadians
IF (CosPhi > 0.01d0) THEN ! Dome has a view of the horizon
! Integrate over the semicircle
THMIN = Theta - PiOvr2
THMAX = Theta + PiOvr2
dTH = 180.0d0 * DegToRadians / NTH
TH = THMIN + 0.5d0 * dTH
DO N = 1, NTH
! Calculate incident angle between dome outward normal and horizon element
COSI = CosPhi * COS(TH - Theta)
! Calculate total TDD transmittance for given angle
trans = TransTDD(PipeNum, COSI, SolarBeam)
FluxInc = FluxInc + COSI * dTH
FluxTrans = FluxTrans + trans * COSI * dTH
TH = TH + dTH ! Increment the azimuth angle
END DO ! N
CalcTDDTransSolHorizon = FluxTrans / FluxInc
ELSE ! Dome is nearly horizontal and has almost no view of the horizon
CalcTDDTransSolHorizon = 0.0d0 ! = TransTDD(PipeNum, ???, SolarBeam) ! Could change to an angle near the horizon
END IF
RETURN
END FUNCTION CalcTDDTransSolHorizon