Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | SurfNum |
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 WindowHeatBalanceEquations(SurfNum)
! SUBROUTINE INFORMATION:
! AUTHOR F. Winkelmann
! DATE WRITTEN February 2000
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Evaluates heat balance functions at each glass face.
! Also evaluates Jacobian.
! Currently limited to three glass layers.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: SurfNum ! Surface number
REAL(r64) :: hgap(5) ! Gap gas conductance
REAL(r64) :: gr ! Gap gas Grashof number
REAL(r64) :: con ! Gap gas conductivity
REAL(r64) :: pr ! Gap gas Prandtl number
REAL(r64) :: nu ! Gap gas Nusselt number
! FLOW
! Have to zero fvec each time since LUdecompostion and LUsolution may
! add values to this array in unexpected places
fvec = 0.0d0
SELECT CASE(ngllayer)
CASE (1) ! single pane
fvec(1) = outir*emis(1) - emis(1)*sigma*thetas(1)**4 + scon(1)*(thetas(2)-thetas(1)) &
+ hcout*(tout-thetas(1)) + AbsRadGlassFace(1)
fvec(2) = rmir*emis(2) - emis(2)*sigma*thetas(2)**4 + scon(1)*(thetas(1)-thetas(2)) &
+ hcin*(tin-thetas(2)) + AbsRadGlassFace(2)
CASE (2) ! double pane
call WindowGasConductance(thetas(2),thetas(3),1,con,pr,gr)
call NusseltNumber(SurfNum,thetas(2),thetas(3),1,gr,pr,nu)
hgap(1) = (con/gap(1)*nu) * SurfaceWindow(SurfNum)%EdgeGlCorrFac
fvec(1) = outir*emis(1) - emis(1)*sigma*thetas(1)**4 + scon(1)*(thetas(2)-thetas(1)) &
+ hcout*(tout-thetas(1)) + AbsRadGlassFace(1)
fvec(2) = scon(1)*(thetas(1)-thetas(2)) + hgap(1)*(thetas(3)-thetas(2)) &
+ A23*(thetas(2)**4 - thetas(3)**4) + AbsRadGlassFace(2)
fvec(3) = hgap(1)*(thetas(2)-thetas(3)) + scon(2)*(thetas(4)-thetas(3)) &
+ A23*(thetas(3)**4 - thetas(2)**4) + AbsRadGlassFace(3)
fvec(4) = rmir*emis(4) - emis(4)*sigma*thetas(4)**4 + scon(2)*(thetas(3)-thetas(4)) &
+ hcin*(tin-thetas(4)) + AbsRadGlassFace(4)
CASE (3) ! Triple Pane
call WindowGasConductance(thetas(2),thetas(3),1,con,pr,gr)
call NusseltNumber(SurfNum,thetas(2),thetas(3),1,gr,pr,nu)
hgap(1) = con/gap(1)*nu * SurfaceWindow(SurfNum)%EdgeGlCorrFac
call WindowGasConductance(thetas(4),thetas(5),2,con,pr,gr)
call NusseltNumber(SurfNum,thetas(4),thetas(5),2,gr,pr,nu)
hgap(2) = con/gap(2)*nu * SurfaceWindow(SurfNum)%EdgeGlCorrFac
fvec(1) = outir*emis(1) - emis(1)*sigma*thetas(1)**4 + scon(1)*(thetas(2)-thetas(1)) &
+ hcout*(tout-thetas(1)) + AbsRadGlassFace(1)
fvec(2) = scon(1)*(thetas(1)-thetas(2)) + hgap(1)*(thetas(3)-thetas(2)) &
+ A23*(thetas(2)**4 - thetas(3)**4) + AbsRadGlassFace(2)
fvec(3) = hgap(1)*(thetas(2)-thetas(3)) + scon(2)*(thetas(4)-thetas(3)) &
+ A23*(thetas(3)**4 - thetas(2)**4) + AbsRadGlassFace(3)
fvec(4) = scon(2)*(thetas(3)-thetas(4)) + hgap(2)*(thetas(5)-thetas(4)) &
+ A45*(thetas(4)**4 - thetas(5)**4) + AbsRadGlassFace(4)
fvec(5) = hgap(2)*(thetas(4)-thetas(5)) + scon(3)*(thetas(6)-thetas(5)) &
+ A45*(thetas(5)**4 - thetas(4)**4) + AbsRadGlassFace(5)
fvec(6) = rmir*emis(6) - emis(6)*sigma*thetas(6)**4 + scon(3)*(thetas(5)-thetas(6)) &
+ hcin*(tin-thetas(6)) + AbsRadGlassFace(6)
CASE (4) ! Quad Pane
call WindowGasConductance(thetas(2),thetas(3),1,con,pr,gr)
call NusseltNumber(SurfNum,thetas(2),thetas(3),1,gr,pr,nu)
hgap(1) = con/gap(1)*nu * SurfaceWindow(SurfNum)%EdgeGlCorrFac
call WindowGasConductance(thetas(4),thetas(5),2,con,pr,gr)
call NusseltNumber(SurfNum,thetas(4),thetas(5),2,gr,pr,nu)
hgap(2) = con/gap(2)*nu * SurfaceWindow(SurfNum)%EdgeGlCorrFac
call WindowGasConductance(thetas(6),thetas(7),3,con,pr,gr)
call NusseltNumber(SurfNum,thetas(6),thetas(7),3,gr,pr,nu)
hgap(3) = con/gap(3)*nu * SurfaceWindow(SurfNum)%EdgeGlCorrFac
fvec(1) = outir*emis(1) - emis(1)*sigma*thetas(1)**4 + scon(1)*(thetas(2)-thetas(1)) &
+ hcout*(tout-thetas(1)) + AbsRadGlassFace(1)
fvec(2) = scon(1)*(thetas(1)-thetas(2)) + hgap(1)*(thetas(3)-thetas(2)) &
+ A23*(thetas(2)**4 - thetas(3)**4) + AbsRadGlassFace(2)
fvec(3) = hgap(1)*(thetas(2)-thetas(3)) + scon(2)*(thetas(4)-thetas(3)) &
+ A23*(thetas(3)**4 - thetas(2)**4) + AbsRadGlassFace(3)
fvec(4) = scon(2)*(thetas(3)-thetas(4)) + hgap(2)*(thetas(5)-thetas(4)) &
+ A45*(thetas(4)**4 - thetas(5)**4) + AbsRadGlassFace(4)
fvec(5) = hgap(2)*(thetas(4)-thetas(5)) + scon(3)*(thetas(6)-thetas(5)) &
+ A45*(thetas(5)**4 - thetas(4)**4) + AbsRadGlassFace(5)
fvec(6) = scon(3)*(thetas(5)-thetas(6)) + hgap(3)*(thetas(7)-thetas(6)) &
+ A67*(thetas(6)**4 - thetas(7)**4) + AbsRadGlassFace(6)
fvec(7) = hgap(3)*(thetas(6)-thetas(7)) + scon(4)*(thetas(8)-thetas(7)) &
+ A67*(thetas(7)**4 - thetas(6)**4) + AbsRadGlassFace(7)
fvec(8) = rmir*emis(8) - emis(8)*sigma*thetas(8)**4 + scon(4)*(thetas(7)-thetas(8)) &
+ hcin*(tin-thetas(8)) + AbsRadGlassFace(8)
END SELECT
return
END SUBROUTINE WindowHeatBalanceEquations