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) | :: | SurfNum | |||
integer, | intent(in) | :: | iter | |||
real(kind=r64), | intent(out) | :: | VGap | |||
real(kind=r64), | intent(inout) | :: | TGapNew | |||
real(kind=r64), | intent(inout) | :: | TGapOutlet | |||
real(kind=r64), | intent(out) | :: | hcv | |||
real(kind=r64), | intent(inout) | :: | QConvGap |
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 BetweenGlassForcedFlow(SurfNum,iter,VGap,TGapNew,TGapOutlet,hcv,QConvGap)
! SUBROUTINE INFORMATION:
! AUTHOR F. Winkelmann
! DATE WRITTEN February 2003
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Called by SolveForWindowTemperatures for "airflow windows",i.e., windows
! with forced airflow in one of the gaps between layers of glass. Based on
! the velocity of airflow through gap, finds effective temperature of gap air,
! convective heat transfer coefficient from glass to gap air,
! the gap outlet temperature, and the outlet convective heat flow.
! Called only for double and triple glazing. For triple glazing the airflow
! is assumed to be between the inner two layers of glass (glass layers 2 and 3).
! METHODOLOGY EMPLOYED:
! Based on ISO/DIS 15099, "Thermal Performance of Windows, Doors and Shading Devices --
! Detailed Calculations"
! REFERENCES:
! na
USE ScheduleManager, ONLY: GetCurrentScheduleValue
USE InputProcessor, ONLY: SameString
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT (IN) :: SurfNum ! Surface number
INTEGER, INTENT (IN) :: iter ! Iteration number for glass heat balance calculation
REAL(r64), INTENT (OUT) :: VGap ! Air velocity in airflow gap (m/s)
REAL(r64), INTENT (INOUT) :: TGapNew ! Current-iteration average air temp in airflow gap (K)
REAL(r64), INTENT (INOUT) :: TGapOutlet ! Temperature of air leaving glass-shade/blind gap at top for upward
! air flow or bottom for downward air flow (K)
REAL(r64), INTENT (INOUT) :: QConvGap ! Convective heat gain from air flow gap (W)
REAL(r64), INTENT (OUT) :: hcv ! Convection coefficient from gap glass faces to gap air (W/m2-K)
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: ConstrNum ! Construction number of surface
INTEGER :: NGlass ! Number of glass layers in construction
INTEGER :: GapNum ! Number of airflow gap
REAL(r64) :: TGapInlet ! Temperature of air entering glass-shade/blind gap at bottom for upward
! air flow or top for downward air flow (K)
REAL(r64) :: TGlassFace1 ! Temperature of left-hand glass surface facing airflow gap (K)
REAL(r64) :: TGlassFace2 ! Temperature of right-hand glass surface facing airflow gap (K)
REAL(r64) :: hGapStill ! Still-air gap conduction/convection coeff (W/m2-K)
REAL(r64) :: TGapOld ! Previous-iteration average air temp in airflow gap (K)
REAL(r64) :: GapHeight ! Vertical length of airflow gap (m)
REAL(r64) :: GapDepth ! Thickness of airflow gap (m)
REAL(r64) :: RhoAir ! Density of airflow gap air at a temperature of TGapOld (kg/m3)
REAL(r64) :: AGap ! Cross sectional area of airflow gap (m2); for vertical window, this
! is in horizontal plane normal to window.
REAL(r64) :: GapHeightChar ! Characteristic height of the airflow gap air temperature profile (m)
REAL(r64) :: TAve ! Average of TGlassFace1 and TGlassFace2 (K)
!REAL(r64) :: AirProps(8) ! Air properties
REAL(r64) :: con ! Gap conductivity and derivative
REAL(r64) :: gr ! Gap air Grashof number
REAL(r64) :: pr ! Gap air Prandtl number
REAL(r64) :: nu ! Gap air Nusselt number
! Air properties
! Dens dDens/dT Con dCon/dT Vis dVis/dT Prandtl dPrandtl/dT
!DATA AirProps / 1.29, -0.4e-2, 2.41e-2, 7.6e-5, 1.73e-5, 1.0e-7, 0.72, 1.8e-3 /
ConstrNum = Surface(SurfNum)%Construction
NGlass = Construct(ConstrNum)%TotGlassLayers
TGlassFace1 = thetas(2*NGlass-2)
TGlassFace2 = thetas(2*NGlass-1)
GapNum = NGlass - 1
TAve = 0.5d0*(TGlassFace1 + TGlassFace2)
IF(SurfaceWindow(SurfNum)%AirFlowSource == AirFlowWindow_Source_IndoorAir) THEN
TGapInlet = tin ! Source is inside air
ELSE
TGapInlet = tout ! Source is outside air
END IF
IF(iter == 0) THEN
TGapOld = 0.5d0*(TAve + TGapInlet)
ELSE
TGapOld = TGapNew
END IF
! Conductance of gap assuming it is sealed
CALL WindowGasConductance(TGlassFace1,TGlassFace2,GapNum,con,pr,gr)
CALL NusseltNumber(SurfNum,TGlassFace1,TGlassFace2,GapNum,gr,pr,nu)
hGapStill = con/gap(GapNum)*nu
GapHeight = Surface(SurfNum)%Height
GapDepth = Material(Construct(ConstrNum)%LayerPoint(2*NGlass-2))%Thickness
AGap = GapDepth * Surface(SurfNum)%Width
VGap = SurfaceWindow(SurfNum)%AirFlowThisTS/GapDepth
hcv = 2.d0*hGapStill + 4.d0*VGap
RhoAir = AirProps(1) + AirProps(2)*(TGapOld-TKelvin)
GapHeightChar = RhoAir * 1008.d0 * GapDepth * VGap/(2.d0*hcv)
! The following avoids divide by zero and exponential underflow
IF(GapHeightChar == 0.0d0) THEN
TGapOutlet = TAve
ELSE IF((GapHeight/GapHeightChar) > 15.d0) THEN
TGapOutlet = TAve
ELSE
TGapOutlet = TAve - (TAve-TGapInlet)*EXP(-GapHeight/GapHeightChar)
END IF
TGapNew = TAve - (GapHeightChar/GapHeight) * (TGapOutlet-TGapInlet)
! Convective heat flow from gap [W]
RhoAir = AirProps(1) + AirProps(2)*(TGapNew-TKelvin)
QConvGap = RhoAir * AGap * VGap * 1008.d0 * (TGapOutlet - TGapInlet)
RETURN
END SUBROUTINE BetweenGlassForcedFlow