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) | :: | ZoneNum | |||
real(kind=r64), | intent(in), | DIMENSION(:) | :: | SurfaceTemperatures |
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 CalcTrombeWallIntConvCoeff(ZoneNum,SurfaceTemperatures)
! SUBROUTINE INFORMATION:
! AUTHOR Peter Graham Ellis
! DATE WRITTEN ?????
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This subroutine calculates the interior convection coefficient
! using the Trombe Wall correlation ?????
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE DataHeatBalFanSys, ONLY: MAT
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
INTEGER, INTENT(IN) :: ZoneNum ! Zone number for which coefficients are being calculated
REAL(r64), DIMENSION(:), INTENT(IN) :: SurfaceTemperatures ! Temperature of surfaces for evaluation of HcIn
! SUBROUTINE PARAMETER DEFINITIONS:
REAL(r64), PARAMETER :: g = 9.81d0 ! gravity constant (m/s**2)
REAL(r64), PARAMETER :: v = 15.89d-6 ! kinematic viscosity (m**2/s) for air at 300 K
REAL(r64), PARAMETER :: k = 0.0263d0 ! thermal conductivity (W/m K) for air at 300 K
REAL(r64), PARAMETER :: Pr = 0.71d0 ! Prandtl number for air at ?
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: SurfNum ! DO loop counter for surfaces
INTEGER :: Surf1 ! first major wall surface
INTEGER :: Surf2 ! second major wall surface
REAL(r64) :: H ! height of enclosure
REAL(r64) :: minorW ! width of enclosure (narrow dimension)
REAL(r64) :: majorW ! width of major surface
REAL(r64) :: gapW ! width of air gap
REAL(r64) :: asp ! aspect ratio H/gapW
REAL(r64) :: beta ! volumetric thermal expansion coefficient
REAL(r64) :: Gr ! Grashof number
REAL(r64) :: Nu ! Nusselt number
REAL(r64) :: HConvNet ! net heat transfer coefficient from wall to wall
REAL(r64) :: Tso ! outside surface temperature [K]
REAL(r64) :: Tsi ! inside surface temperature [K]
! If the Trombe Wall option is selected the following correlations
! will be used based on references by .....
! tall enclosed rectangular cavity
! This routine assumes that the major Trombe wall surfaces are of the
! "WALL" class and are vertical. The important heat transfer surfaces
! are assumed to have exactly equal widths AND must have a greater
! width than the side surfaces.
!
Surf1 = 0
Surf2 = 0
H = Zone(ZoneNum)%CeilingHeight
minorW = 100000.0d0 ! An impossibly big width
majorW = 0.0d0
gapW = 0.0d0
Tso = 0.0d0
Tsi = 0.0d0
HConvNet = 0.0d0
! determine major width and minor width
DO SurfNum = Zone(ZoneNum)%SurfaceFirst,Zone(ZoneNum)%SurfaceLast
IF (Surface(SurfNum)%Class .NE. SurfaceClass_Wall) CYCLE
IF (Surface(SurfNum)%Width > majorW) THEN
majorW = Surface(SurfNum)%Width
END IF
IF (Surface(SurfNum)%Width < minorW) THEN
minorW = Surface(SurfNum)%Width
END IF
END DO
! assign major surfaces
DO SurfNum = Zone(ZoneNum)%SurfaceFirst,Zone(ZoneNum)%SurfaceLast
IF (Surface(SurfNum)%Class .NE. SurfaceClass_Wall) CYCLE
IF (Surface(SurfNum)%Width == majorW) THEN
IF (Surf1 == 0) THEN
Surf1 = SurfNum
ELSE
Surf2 = SurfNum
EXIT ! both major surfaces are now assigned
END IF
END IF
END DO
! check to make sure major surfaces were found
IF (Surf1 > 0 .AND. Surf2 > 0) THEN
gapW = minorW
asp = H/gapW ! This calc should only be done once for the zone
! make sure inside surface is hot, outside is cold
! NOTE: this is not ideal. could have circumstances that reverse this?
IF (SurfaceTemperatures(Surf1) > SurfaceTemperatures(Surf2)) THEN
Tsi = SurfaceTemperatures(Surf1) + KelvinConv
Tso = SurfaceTemperatures(Surf2) + KelvinConv
ELSE
Tso = SurfaceTemperatures(Surf1) + KelvinConv
Tsi = SurfaceTemperatures(Surf2) + KelvinConv
ENDIF
beta = 2.0d0/(Tso + Tsi)
Gr = (g*beta*ABS(Tsi - Tso)*gapW**3)/(v**2) ! curve fit for v = v(T)?
CALL CalcNusselt(SurfNum, asp, Tso, Tsi, Gr, Pr, Nu) ! curve fit for Pr = Pr(T)?
HConvNet = (k/gapW)*Nu ! curve fit for k = k(T)?
ELSE
! fatal Error msg "heat transfer surfaces not found"
END IF
! Assign convection coefficients
DO SurfNum = Zone(ZoneNum)%SurfaceFirst,Zone(ZoneNum)%SurfaceLast
IF (.NOT. Surface(SurfNum)%HeatTransSurf) CYCLE ! Skip non-heat transfer surfaces
! Use ASHRAESimple correlation to give values for all the minor surfaces
CALL CalcASHRAESimpleIntConvCoeff(SurfNum,SurfaceTemperatures(SurfNum),MAT(ZoneNum))
! assign the convection coefficent to the major surfaces and any subsurfaces on them
IF ((Surface(SurfNum)%BaseSurf == Surf1) .OR. (Surface(SurfNum)%BaseSurf == Surf2)) THEN
HConvIn(SurfNum) = 2.0d0*HConvNet
END IF
! Establish some lower limit to avoid a zero convection coefficient (and potential divide by zero problems)
IF (HConvIn(SurfNum) < LowHConvLimit) HConvIn(SurfNum) = LowHConvLimit
END DO
RETURN
END SUBROUTINE CalcTrombeWallIntConvCoeff