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) | :: | thisHBsurf |
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.
REAL(r64) FUNCTION FigureNDheightInZone(thisHBsurf)
! FUNCTION INFORMATION:
! AUTHOR B.Griffith
! DATE WRITTEN aug 2005, Jan2004
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! return a non-dimensional height zeta
! METHODOLOGY EMPLOYED:
! figure average floor height (follows code in surfacegeometry.f90
! use ceiling height from Zone structure
! non dimensionalize surface's centroid's Z value
!
! REFERENCES:
! na
! USE STATEMENTS:
! na
USE DataSurfaces , ONLY : Surface, SurfaceClass_Floor, SurfaceClass_Wall
USE DataHeatBalance, ONLY : Zone
Use DataInterfaces, ONLY: ShowWarningError, ShowContinueError
Use General, Only: RoundSigDigits
USE DataErrorTracking, ONLY : TotalRoomAirPatternTooLow, TotalRoomAirPatternTooHigh
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: thisHBsurf ! index in main Surface array
! FUNCTION PARAMETER DEFINITIONS:
REAL(r64), PARAMETER :: TolValue=.0001d0
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER :: thisZone !
REAL(r64) :: ZoneZorig
REAL(r64) :: ZoneCeilHeight
REAL(r64) :: Zcm
REAL(r64) :: SurfMinZ
REAL(r64) :: SurfMaxZ
REAL(r64) :: Zeta
REAL(r64) :: FloorCount
REAL(r64) :: ZFlrAvg
REAL(r64) :: ZMax
REAL(r64) :: ZMin
INTEGER :: Count
INTEGER :: SurfNum
REAL(r64) :: Z1
REAL(r64) :: Z2
! Get the centroid height for the surface
Zcm = Surface(thisHBsurf)%centroid%z
thisZone = surface(thisHBsurf)%zone
!this next Do block is copied from SurfaceGeometry.f90 with modification for just floor Z
! used find floor z.
FloorCount=0.0d0
ZFlrAvg=0.0d0
ZMax=0.0d0
ZMin=0.0d0
Count=0
DO SurfNum=Zone(thisZone)%SurfaceFirst,Zone(thisZone)%SurfaceLast
IF (Surface(SurfNum)%Class == SurfaceClass_Floor) THEN
! Use Average Z for surface, more important for roofs than floors...
FloorCount=FloorCount+1.0d0
Z1=MINVAL(Surface(SurfNum)%Vertex(1:Surface(SurfNum)%Sides)%Z)
Z2=MAXVAL(Surface(SurfNum)%Vertex(1:Surface(SurfNum)%Sides)%Z)
ZFlrAvg=ZFlrAvg+(Z1+Z2)/2.0d0
ENDIF
IF (Surface(SurfNum)%Class == SurfaceClass_Wall) THEN
! Use Wall calculation in case no floor in zone
Count=Count+1
IF (Count == 1) THEN
ZMax=Surface(SurfNum)%Vertex(1)%Z
ZMin=ZMax
ENDIF
ZMax=MAX(ZMax,MAXVAL(Surface(SurfNum)%Vertex(1:Surface(SurfNum)%Sides)%Z))
ZMin=MIN(ZMin,MINVAL(Surface(SurfNum)%Vertex(1:Surface(SurfNum)%Sides)%Z))
ENDIF
ENDDO
IF (FloorCount > 0.0d0) THEN
ZFlrAvg=ZFlrAvg/FloorCount
ELSE
ZFlrAvg=ZMin
endif
ZoneZorig = ZFlrAvg ! Z floor [M]
ZoneCeilHeight = zone(thisZone)%CeilingHeight
!first check if some basic things are reasonable
SurfMinZ = MINVAL(surface(thisHBsurf)%vertex%Z)
SurfMaxZ = MAXVAL(surface(thisHBsurf)%vertex%Z)
IF (SurfMinZ < (ZoneZorig-TolValue)) then
IF (DisplayExtraWarnings) THEN
call ShowWarningError('RoomAirModelUserTempPattern: Problem in non-dimensional height calculation')
call ShowContinueError('too low surface: '//trim(surface(thisHBsurf)%name)//' in zone: '//trim(zone(thisZone)%name ) )
call ShowContinueError('**** Average floor height of zone is: '//trim(RoundSigDigits(ZoneZorig, 3) ) )
call ShowContinueError('**** Surface minimum height is: '//trim(RoundSigDigits(SurfMinZ , 3) ) )
ELSE
TotalRoomAirPatternTooLow=TotalRoomAirPatternTooLow+1
ENDIF
ENDIF
IF (SurfMaxZ > (ZoneZorig + ZoneCeilHeight + TolValue) ) then
IF (DisplayExtraWarnings) THEN
call ShowWarningError('RoomAirModelUserTempPattern: Problem in non-dimensional height calculation')
call ShowContinueError(' too high surface: '//trim(surface(thisHBsurf)%name )//' in zone: '//trim(zone(thisZone)%name) )
call ShowContinueError('**** Average Ceiling height of zone is: '//trim(RoundSigDigits((ZoneZorig + ZoneCeilHeight), 3) ) )
call ShowContinueError('**** Surface Maximum height is: '//trim(RoundSigDigits(SurfMaxZ , 3) ) )
ELSE
TotalRoomAirPatternTooHigh=TotalRoomAirPatternTooHigh+1
ENDIF
ENDIF
!non dimensionalize.
Zeta = (Zcm - ZoneZorig) / ZoneCeilHeight
! bound so that floors and ceiling are just in from endpoints.
If (Zeta > 0.99d0 ) Zeta = 0.99d0
If (Zeta < 0.01d0) Zeta = 0.01d0
FigureNDheightInZone = zeta
END FUNCTION FigureNDheightInZone