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) | :: | ColleNum | |||
real(kind=r64), | intent(in) | :: | IncidentAngle | |||
real(kind=r64), | intent(out) | :: | TransSys | |||
real(kind=r64), | intent(out) | :: | ReflSys | |||
real(kind=r64), | intent(out) | :: | AbsCover1 | |||
real(kind=r64), | intent(out) | :: | AbsCover2 | |||
logical, | intent(in), | optional | :: | InOUTFlag | ||
real(kind=r64), | intent(out), | optional | :: | RefSysDiffuse |
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 CalcTransRefAbsOfCover(ColleNum,IncidentAngle,TransSys,ReflSys,AbsCover1,AbsCover2,InOUTFlag,RefSysDiffuse)
! SUBROUTINE INFORMATION:
! AUTHOR Bereket A Nigusse
! DATE WRITTEN February 2012
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Calculates the transmitance, reflectance, and absorptance of the collector covers based on
! solar collector optical parameters specified.
! METHODOLOGY EMPLOYED:
! Uses a ray tracing method.
! REFERENCES:
! Duffie, J. A., and Beckman, W. A. Solar Engineering of Thermal Processes, Second Edition.
! Wiley-Interscience: New York (1991).
!
USE DataGlobals, ONLY: DegToRadians
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: ColleNum ! Collector object number
REAL(r64), INTENT(IN) :: IncidentAngle ! Angle of incidence (radians)
REAL(r64), INTENT(OUT) :: TransSys ! cover system solar transmittance
REAL(r64), INTENT(OUT) :: ReflSys ! cover system solar reflectance
REAL(r64), INTENT(OUT) :: AbsCover1 ! Inner cover solar absorbtance
REAL(r64), INTENT(OUT) :: AbsCover2 ! Outer cover solar absorbtance
LOGICAL, INTENT(IN), OPTIONAL :: InOUTFlag ! flag for calc. diffuse solar refl of cover from inside out
REAL(r64), INTENT(OUT), OPTIONAL :: RefSysDiffuse ! cover system solar reflectance from inner to outer cover
! FUNCTION PARAMETER DEFINITIONS:
REAL(r64), PARAMETER :: AirRefIndex = 1.0003d0 ! refractive index of air
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
! CHARACTER(len=MaxNameLength):: String ! Dummy string for converting numbers to strings
INTEGER :: nCover ! covers count
INTEGER :: ParamNum ! Collector parameters object number
REAL(r64) :: IncAngle ! angle of incidence
REAL(r64) :: RefrAngle ! angle of refraction
REAL(r64) :: ParaRad ! parallel reflected component of unpolarized solar radiation
REAL(r64) :: PerpRad ! Perpendicular reflected component of unpolarized solar radiation
REAL(r64) :: TransPara(2) ! cover transmittance parallel component
REAL(r64) :: TransPerp(2) ! cover transmittance perpendicular component
REAL(r64) :: ReflPara(2) ! cover reflectance parallel component
REAL(r64) :: ReflPerp(2) ! cover reflectance Perpendicular component
REAL(r64) :: AbsorPara(2) ! cover absorbtance parallel component
REAL(r64) :: AbsorPerp(2) ! cover absorbtance Perpendicular component
REAL(r64) :: TransAbsOnly(2) ! cover transmittance with absorptance only considered
REAL(r64) :: CoverRefrIndex ! refractive index of collector cover
REAL(r64) :: TransSysDiff ! cover system solar transmittance from inner to outer cover
LOGICAL :: DiffRefFlag ! flag for calc. diffuse refl of cover from inside to outside
! LOGICAL :: OneTimeFlag ! allows to run only once
! FLOW:
! set
TransPerp = 1.0d0
TransPara = 1.0d0
ReflPerp = 0.0d0
ReflPara = 0.0d0
AbsorPerp = 0.0d0
AbsorPara = 0.0d0
TransAbsOnly = 1.0d0
TransSys = 0.0d0
ReflSys = 0.0d0
AbsCover1 = 0.0d0
AbsCover2 = 0.0d0
IF (PRESENT(InOUTFlag)) THEN
DiffRefFlag = InOUTFlag
ELSE
DiffRefFlag = .FALSE.
ENDIF
! get the incidence and refraction angles
IncAngle = IncidentAngle
ParamNum = Collector(ColleNum)%Parameters
DO nCover = 1, Parameters(ParamNum)%NumOfCovers
CoverRefrIndex = Parameters(ParamNum)%RefractiveIndex(nCover)
RefrAngle = ASIN( SIN(IncAngle) * AirRefIndex / CoverRefrIndex )
! transmitted component with absorption only considered:
TransAbsOnly(nCover) = EXP(-Parameters(ParamNum)%ExtCoefTimesThickness(nCover)/COS(RefrAngle))
! parallel and perpendicular reflection components:
IF (IncAngle == 0.d0) THEN
ParaRad = ((CoverRefrIndex - AirRefIndex)/ (CoverRefrIndex + AirRefIndex))**2
PerpRad = ((CoverRefrIndex - AirRefIndex)/ (CoverRefrIndex + AirRefIndex))**2
ELSE
ParaRad = TAN(RefrAngle - IncAngle)**2 / TAN(RefrAngle + IncAngle)**2
PerpRad = SIN(RefrAngle - IncAngle)**2 / SIN(RefrAngle + IncAngle)**2
ENDIF
! parallel and perpendicular transmitted components:
TransPerp(nCover) = TransAbsOnly(nCover)*((1.d0-PerpRad)/(1.d0+PerpRad))*((1.d0-PerpRad**2) &
/ (1.d0-(PerpRad*TransAbsOnly(nCover))**2))
TransPara(nCover) = TransAbsOnly(nCover)*((1.d0-ParaRad)/(1.d0+ParaRad))*((1.d0-ParaRad**2) &
/ (1.d0-(ParaRad*TransAbsOnly(nCover))**2))
ReflPerp(nCover) = (PerpRad + (((1.d0-PerpRad)**2)*(TransAbsOnly(nCover)**2)*PerpRad) &
/ (1.d0-(PerpRad*TransAbsOnly(nCover))**2))
ReflPara(nCover) = (ParaRad + (((1.d0-ParaRad)**2)*(TransAbsOnly(nCover)**2)*ParaRad) &
/ (1.d0-(ParaRad*TransAbsOnly(nCover))**2))
AbsorPerp(nCover) = 1.d0 - TransPerp(nCover) - ReflPerp(nCover)
AbsorPara(nCover) = 1.d0 - TransPara(nCover) - ReflPara(nCover)
END DO
! solar absorptance of the individual cover
AbsCover1 = 0.5d0 * (AbsorPerp(1) + AbsorPara(1))
if (Parameters(ParamNum)%NumOfCovers == 2) AbsCover2 = 0.5d0 * (AbsorPerp(2) + AbsorPara(2))
! calculate from outer to inner cover:
TransSys = 0.5d0*(TransPerp(1)*TransPerp(2)/(1.d0- ReflPerp(1)*ReflPerp(2)) &
+ TransPara(1)*TransPara(2)/(1.d0 - ReflPara(1)*ReflPara(2)))
ReflSys = 0.5d0*(ReflPerp(1)+TransSys*ReflPerp(2)*TransPerp(1)/TransPerp(2) &
+ ReflPara(1)+TransSys*ReflPara(2)*TransPara(1)/TransPara(2))
IF (DiffRefFlag) Then
! calculate from inner to outer cover:
TransSysDiff = 0.5d0*(TransPerp(2)*TransPerp(1)/(1.d0 - ReflPerp(2)*ReflPerp(1)) &
+ TransPara(2)*TransPara(1)/(1.d0 - ReflPara(2)*ReflPara(1)))
RefSysDiffuse = 0.5d0*(ReflPerp(2)+TransSysDiff*ReflPerp(1)*TransPerp(2)/TransPerp(1) &
+ ReflPara(2)+TransSysDiff*ReflPara(1)*TransPara(2)/TransPara(1))
ENDIF
RETURN
END SUBROUTINE CalcTransRefAbsOfCover