Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | totsol | |||
real(kind=r64), | intent(in) | :: | rtot | |||
real(kind=r64), | intent(in), | dimension(maxlay3) | :: | rs | ||
integer, | intent(in) | :: | nlayer | |||
real(kind=r64), | intent(in), | dimension(maxlay) | :: | absol | ||
real(kind=r64), | intent(out) | :: | sf |
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 solarISO15099(totsol, rtot, rs, nlayer, absol, sf)
!***********************************************************************
! This subroutine calculates the shading coefficient for a window.
!***********************************************************************
! Inputs:
! absol array of absorped fraction of solar radiation in lites
! totsol total solar transmittance
! rtot total thermal resistance of window
! rs array of thermal resistances of each gap and layer
! layer number of layers
! dir direct solar radiation
! Outputs:
! sf solar gain of space
real(r64), intent(in) :: totsol, rtot
real(r64), dimension(maxlay), intent(in) :: absol
real(r64), dimension(maxlay3), intent(in) :: rs
integer, intent(in) :: nlayer
real(r64), intent(out) :: sf
real(r64) :: flowin, fract
integer :: i, j
fract = 0.0d0
flowin = 0.0d0
sf = 0.0d0
if (rtot == 0.0d0) then
return
end if
! evaluate inward flowing fraction of absorbed radiation:
flowin = (rs(1) + 0.5d0 * rs(2)) / rtot
fract = absol(1) * flowin
do i=2, nlayer
j = 2*i
flowin = flowin + (0.5d0 * (rs(j-2) + rs(j)) + rs(j-1)) / rtot
fract = fract + absol(i) * flowin
end do
sf = totsol+fract ! add inward fraction to directly transmitted fraction
end subroutine solarISO15099