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) | :: | BlindNum | |||
real(kind=r64), | intent(in) | :: | c(15) | |||
real(kind=r64), | intent(in) | :: | b_el | |||
real(kind=r64), | intent(in) | :: | s_el | |||
real(kind=r64), | intent(out) | :: | p(16) |
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 BlindOpticsBeam (BlindNum,c,b_el,s_el,p)
! SUBROUTINE INFORMATION:
! AUTHOR Hans Simmler
! DATE WRITTEN July-Aug 1995
! MODIFIED Aug 2001 (FCW): adapt to EnergyPlus
! Aug 2002 (FCW): make corrections so that calculations are consistent with
! G(i) = Sum over j of J(j)*F(j,i). Previously, i,j was
! interchanged in F, so that
! G(i) = Sum over j of J(j)*F(i,j), which is wrong.
! This change was made to resolve discrepancies between EnergyPlus results
! and blind transmittance measurements made at Oklahoma State Univ.
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Calculates the beam radiation properties of a
! window blind consisting of flat slats with known material properties.
! The calculation for the reverse direction is done with the radiation source
! reflected at the window plane.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! "Solar-Thermal Window Blind Model for DOE-2," H. Simmler, U. Fischer and
! F. Winkelmann, Lawrence Berkeley National Laboratory, Jan. 1996.
! USE STATEMENTS:
USE General, ONLY: BlindBeamBeamTrans ! Blind beam-to-beam transmittance function
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: BlindNum ! Blind number
REAL(r64), INTENT(IN) :: c(15) ! Slat properties (equivalent to BLD_PR)
REAL(r64), INTENT(IN) :: b_el ! Slat elevation (radians)
REAL(r64), INTENT(IN) :: s_el ! Solar profile angle (radians)
REAL(r64), INTENT(OUT) :: p(16) ! Blind properties (equivalent to ST_LAY)
! The slat input properties are:
! c(1) 0. (unused)
! c(2) Slat width (m)
! c(3) Slat separation (m)
! c(4) 0. (unused)
! c(5) 0. (unused)
! c(6) 0. (unused)
! The following are solar or visible properties
! c(7) trans beam-diff
! c(8) refl front beam-diff
! c(9) refl back beam-diff
! c(10) trans diff-diff
! c(11) refl front diff-diff
! c(12) refl back diff-diff
! The following are hemispherical thermal IR properties
! c(13) trans diff-diff
! c(14) emiss front diff
! c(15) emiss back diff
! The calculated blind properties are:
! The following are solar or visible properties
! p(1) trans front beam-beam
! p(2) refl front beam-beam
! p(3) trans back beam-beam
! p(4) refl back beam-beam
! p(5) trans front beam-diff
! p(6) refl front beam-diff
! p(7) trans back beam-diff
! p(8) refl back beam-diff
! p(9) trans front diff-diff
! p(10) refl front diff-diff
! p(11) trans back diff-diff
! p(12) refl back diff-diff
! The following are IR properties
! p(13) IR trans front (same as IR trans back)
! p(14) IR emissivity front
! p(15) IR emissivity back
! p(16) 0.0 (unused)
! SUBROUTINE PARAMETER DEFINITIONS:na
! INTERFACE BLOCK SPECIFICATIONS:na
! DERIVED TYPE DEFINITIONS:na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) phib ! Elevation angle of normal vector to front of slat (0 to pi radians)
REAL(r64) phis ! Elevation angle of source vector; same as "profile angle" (-pi/2 to pi/2 radians)
REAL(r64) Gamma ! phib - phis (radians)
REAL(r64) J(6) ! Slat surface section radiosity vector
REAL(r64) G(6) ! Slat surface section irradiance vector
REAL(r64) Q(6) ! Slat surface section source vector
REAL(r64) F(6,6) ! View factor array
REAL(r64) X(4,4) ! X*J = Q
REAL(r64) Xinv(4,4) ! J = Xinv*Q
REAL(r64) fEdge,fEdge1 ! Slat edge correction factor
INTEGER i,k,m ! Array indices
INTEGER indx(4) ! Indices for LU decomposition
p = 0.0d0
! Elevation of radiation source; source is assumed to be in a plane that
! (1) contains the slat outward normal and (2) is perpendicular to plane of the blinds.
phis = s_el
! Elevation of slat outward normal
phib = b_el
! Loop twice for front and back side properties of blind
DO i=0,2,2
! For back-side properties, reflect the source position so that it is the mirror
! image of the original source position, where the "mirror" is in the plane of the
! blinds. This is equivalent to keeping the original source position but rotating
! the slats so that the original slat angle (e.g., 45 deg) becomes 180 - original slat
! angle (135 deg).
if (i.eq.2) then
phib = PI - phib
end if
! Correction factor that accounts for finite thickness of slats. It is used to modify the
! blind transmittance and reflectance to account for reflection and absorption by the
! edge of the slat. fEdge is ratio of area subtended by edge of slat
! to area between tops of adjacent slats.
fEdge = 0.0d0
fEdge1 = 0.0d0
gamma = phib - phis
IF(ABS(SIN(gamma))>0.01d0) THEN
IF((phib > 0.0 .AND. phib <= PiOvr2 .AND. phis <= phib) .OR. &
(phib > PiOvr2 .AND. phib <= Pi .AND. phis > -(Pi-phib))) &
fEdge1 = Blind(BlindNum)%SlatThickness * ABS(SIN(gamma)) / &
((Blind(BlindNum)%SlatSeparation + Blind(BlindNum)%SlatThickness/ABS(SIN(phib)))*COS(phis))
fEdge = MIN(1.0d0,ABS(fEdge1))
END IF
! Direct-to-direct transmittance (portion of beam that passes between slats without
! without touching them
p(1+i) = BlindBeamBeamTrans(phis,phib,Blind(BlindNum)%SlatWidth,Blind(BlindNum)%SlatSeparation, &
Blind(BlindNum)%SlatThickness)
! Direct-to-direct reflectance; this is zero for now since all reflection is assumed to be diffuse.
p(2+i)=0.0d0
! View factors between slat sections for calculating direct-to-diffuse transmittance and reflectance
CALL ViewFac(c(2),c(3),phib,phis,F)
! Set up exchange matrix X for calculating direct-to-diffuse properties
do k=3,5,2
do m=3,6
X(k-2,m-2)=-c(12)*F(m,k)-c(10)*F(m,k+1)
X(k-1,m-2)=-c(10)*F(m,k)-c(11)*F(m,k+1)
end do
end do
do k=1,4
X(k,k)=X(k,k)+1.0d0
end do
indx = 0
! In the following, note that InvertMatrix changes X
CALL InvertMatrix(X,Xinv,indx,4,4)
! Set up sources for direct-diffuse slat properties
if (ABS(phis-phib) <= PiOvr2) then ! Beam hits front of slat
Q(3) = c(4) + c(7) ! beam-beam trans of slat + beam-diff trans of slat
Q(4) = c(5) + c(8) ! front beam-beam refl of slat + front beam-diff refl of slat
else ! Beam hits back of slat
Q(3) = c(6) + c(9) ! back beam-beam refl of slat + back beam-diff refl of slat
Q(4) = c(4) + c(7) ! beam-beam trans of slat + beam-diff trans of slat
end if
! Correct for fraction of beam that is not directly transmitted; 1 - this fraction is
! the fraction of the incoming beam that is incident on the front or back surfaces of the slats.
Q(3) = Q(3)*(1.0d0-p(1+i))
Q(4) = Q(4)*(1.0d0-p(1+i))
! Radiosities (radiance of slat sections)
J(1)=0.0d0
J(2)=0.0d0
do k=3,6
J(k)=0.0d0
do m=3,4
J(k)=J(k) + Xinv(k-2,m-2)*Q(m)
end do
end do
! Irradiance on slat sections
do k=1,6
G(k)=0.0d0
do m=3,6
G(k)=G(k)+J(m)*F(m,k)
end do
end do
! Direct-to-diffuse transmittance
p(5+i)=G(2)*(1.0d0-fEdge)
! Direct-to-diffuse reflectance (assuming the edge reflectance is the same as the
! reflectance of the front side of the slat, C(8))
p(6+i)=G(1)*(1.0d0-fEdge) + fEdge*C(8)
END DO ! End of loop over front and back side properties of blind
RETURN
END SUBROUTINE BlindOpticsBeam