Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | WindAt10m | |||
real(kind=r64), | intent(in) | :: | WindDir | |||
real(kind=r64), | intent(in) | :: | SurfAzimuth | |||
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 CalcEmmelVertical(WindAt10m, WindDir, SurfAzimuth, SurfNum) RESULT (Hf)
! FUNCTION INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN Aug 2010
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! calculate model equation for forced convection using Emmel correlation
! for vertical walls
! METHODOLOGY EMPLOYED:
! encapsulate model in function
! REFERENCES:
! Emmel, M.G., M.O. Abadie, N. Mendes. 2007. New external convective
! heat transfer coefficient correlations for isolated low-rise buildings.
! Energy and Buildings 39 (2007) 335- 342
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64) , INTENT(IN) :: WindAt10m
REAL(r64) , INTENT(IN) :: WindDir ! Wind direction measured clockwise from geographhic North
REAL(r64) , INTENT(IN) :: SurfAzimuth ! or Facing, Direction the surface outward normal faces (degrees)
INTEGER , INTENT(IN) :: SurfNum
REAL(r64) :: Hf
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: Theta ! angle between wind and surface azimuth
INTEGER, SAVE :: ErrorIndex = 0
Theta = WindDir - SurfAzimuth - 90.d0 !TODO double check theta
IF (Theta > 180 ) Theta = Theta - 360.0d0
IF (Theta <= 22.5d0) THEN
Hf = 5.15d0 * (WindAt10m**0.81d0)
ELSEIF ((22.5d0 < Theta) .AND. (Theta <= 67.5d0)) THEN
Hf = 3.34d0 * (WindAt10m**0.84d0)
ELSEIF ((67.5d0 < Theta) .AND. (Theta <= 112.5d0)) THEN
Hf = 4.78d0 * (WindAt10m**0.71d0)
ELSEIF ((112.5d0 < Theta) .AND. (Theta <= 157.5d0)) THEN
Hf = 4.05d0 * (WindAt10m**0.77d0)
ELSEIF ((157.5d0 < Theta) .AND. (Theta <= 180.d0)) THEN
Hf = 3.54d0 * (WindAt10m**0.76d0)
ELSE
IF (ErrorIndex == 0) THEN
CALL ShowSevereMessage('CalcEmmelVertical: Convection model wind angle calculation suspect' &
//'(developer issue)' )
CALL ShowContinueError('Value for theta angle = ' //TRIM(RoundSigDigits(Theta,5)))
CALL ShowContinueError('Occurs for surface named = ' //TRIM(Surface(SurfNum)%Name) )
CALL ShowContinueError('Convection model uses high theta correlation and the simulation continues')
ENDIF
CALL ShowRecurringSevereErrorAtEnd('CalcEmmelVertical: Convection model wind angle calculation suspect' &
//' and high theta correlation', ErrorIndex)
Hf = 3.54d0 * (WindAt10m**0.76d0)
ENDIF
RETURN
END FUNCTION CalcEmmelVertical