Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | DeltaTemp | |||
real(kind=r64), | intent(in) | :: | Height | |||
real(kind=r64), | intent(in) | :: | SurfTemp | |||
real(kind=r64), | intent(in) | :: | QdotConv | |||
integer, | intent(in) | :: | 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.
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.
FUNCTION CalcFohannoPolidoriVerticalWall(DeltaTemp, Height, SurfTemp, QdotConv, SurfNum) RESULT (Hn)
! FUNCTION INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN Jul 2010
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Calculate model equation for natural convection
! METHODOLOGY EMPLOYED:
! isolate function for equation.
! REFERENCES:
! Fohanno, S., and G. Polidori. 2006. Modelling of natural convective heat transfer
! at an internal surface. Energy and Buildings 38 (2006) 548 - 553
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: DeltaTemp ! [C] temperature difference between surface and air
REAL(r64), INTENT(IN) :: Height ! [m] characteristic size, height of zone
REAL(r64), INTENT(IN) :: SurfTemp ![C] surface temperature
REAL(r64), INTENT(IN) :: QdotConv ![W/m2] heat flux rate for rayleigh #
INTEGER, INTENT(IN) :: SurfNum ! for messages
REAL(r64) :: Hn ! function result, natural convection coefficient
! FUNCTION 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
! FUNCTION LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: RaH = 0.d0
REAL(r64) :: BetaFilm = 0.d0
INTEGER, SAVE :: ErrorIndex = 0
BetaFilm = 1.d0 / (KelvinConv + SurfTemp + 0.5d0 * DeltaTemp) ! TODO check sign on DeltaTemp
IF (Height > 0.d0) THEN
RaH = (g * BetaFilm * QdotConv * (Height**4) * Pr )/(k * v**2)
IF (RaH <= 6.3d09) Then
Hn = 1.332d0*((ABS(DeltaTemp)/Height)**OneFourth)
ELSE
Hn = 1.235d0*EXP(0.0467d0*Height)*(ABS(DeltaTemp))**0.316d0
ENDIF
ELSE
! bad value for Height, but we have little info to identify calling culprit
Hn = 9.999d0
IF (ErrorIndex == 0) THEN
CALL ShowSevereMessage('CalcFohannoPolidoriVerticalWall: Convection model not evaluated (would divide by zero)')
CALL ShowContinueError('Effective surface height is zero, convection model not applicable for surface =' &
//TRIM(Surface(SurfNum)%name) )
CALL ShowContinueError('Convection surface heat transfer coefficient set to 9.999 [W/m2-K] and the simulation continues')
ENDIF
CALL ShowRecurringSevereErrorAtEnd('CalcFohannoPolidoriVerticalWall: Convection model not evaluated because zero' &
//' height and set to 9.999 [W/m2-K]' , ErrorIndex)
ENDIF
RETURN
END FUNCTION CalcFohannoPolidoriVerticalWall