SUBROUTINE SetupAdaptiveConvectionStaticMetaData
! SUBROUTINE INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN Aug 2010
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
!do one-time setup needed to store static data
! for adaptive convection algorithm
! METHODOLOGY EMPLOYED:
!
! REFERENCES:
! none, developed for EnergyPlus version 6.0, see Eng Ref.
! USE STATEMENTS:
USE Vectors, ONLY: Distance, DetermineAzimuthAndTilt, CreateNewellSurfaceNormalVector,CreateNewellAreaVector, VecLength
USE General, ONLY: ScanForReports, RoundSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
TYPE FacadeGeoCharactisticsStruct
REAL(r64) :: AzimuthRangeLow
REAL(r64) :: AzimuthRangeHi
REAL(r64) :: Zmax
REAL(r64) :: Zmin
REAL(r64) :: Ymax
REAL(r64) :: Ymin
REAL(r64) :: Xmax
REAL(r64) :: Xmin
REAL(r64) :: Area
REAL(r64) :: Perimeter
REAL(r64) :: Height
END TYPE FacadeGeoCharactisticsStruct
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL :: FirstRoofSurf = .TRUE.
INTEGER :: ZoneLoop !
INTEGER :: SurfLoop !
INTEGER :: VertLoop
! REAL(r64) :: thisZoneHeight
REAL(r64) :: BldgVolumeSum
REAL(r64) :: PerimExtLengthSum
REAL(r64) :: thisWWR
REAL(r64) :: thisZoneSimplePerim
REAL(r64) :: thisZoneHorizHydralicDiameter
INTEGER :: ExtWallCount
INTEGER :: ExtWindowCount
REAL(r64) :: thisAzimuth
REAL(r64) :: thisArea
INTEGER :: thisZone
REAL(r64), DIMENSION(8) :: RoofBoundZvals
REAL(r64), DIMENSION(4) :: TestDist
! TYPE(vector), DIMENSION(4) :: BoundSurf
Type(vector) :: BoundNewellVec
Type(vector) :: BoundNewellAreaVec
REAL(r64) :: surfacearea
REAL(r64) :: BoundTilt
REAL(r64) :: BoundAzimuth
Type(vector) :: dummy1
Type(vector) :: dummy2
Type(vector) :: dummy3
LOGICAL DoReport
REAL(r64) :: SideALength
REAL(r64) :: SideBLength
REAL(r64) :: SideCLength
REAL(r64) :: SideDLength
CHARACTER(len=3) :: YesNo1
CHARACTER(len=3) :: YesNo2
TYPE(FacadeGeoCharactisticsStruct) :: NorthFacade = &
FacadeGeoCharactisticsStruct(332.5d0, 22.5d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0 )
TYPE(FacadeGeoCharactisticsStruct) :: NorthEastFacade = &
FacadeGeoCharactisticsStruct(22.5d0, 67.5d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0 )
TYPE(FacadeGeoCharactisticsStruct) :: EastFacade = &
FacadeGeoCharactisticsStruct(67.5d0, 112.5d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0 )
TYPE(FacadeGeoCharactisticsStruct) :: SouthEastFacade = &
FacadeGeoCharactisticsStruct(112.5d0, 157.5d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0 )
TYPE(FacadeGeoCharactisticsStruct) :: SouthFacade = &
FacadeGeoCharactisticsStruct(157.5d0, 202.5d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0 )
TYPE(FacadeGeoCharactisticsStruct) :: SouthWestFacade = &
FacadeGeoCharactisticsStruct(202.5d0, 247.5d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0 )
TYPE(FacadeGeoCharactisticsStruct) :: WestFacade = &
FacadeGeoCharactisticsStruct(247.5d0, 287.5d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0 )
TYPE(FacadeGeoCharactisticsStruct) :: NorthWestFacade = &
FacadeGeoCharactisticsStruct(287.5d0, 332.5d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 0.d0 )
BldgVolumeSum = 0.d0
RoofBoundZVals=0.0d0
DO ZoneLoop=1, NumOfZones
BldgVolumeSum = BldgVolumeSum + Zone(ZoneLoop)%Volume*Zone(ZoneLoop)%Multiplier*Zone(ZoneLoop)%ListMultiplier
PerimExtLengthSum = 0.d0 ! init
ExtWallCount = 0 ! init
ExtWindowCount = 0 ! init
!model perimeter of bounding horizontal rectangle from max and min x and y values
thisZoneSimplePerim = 2.d0 * (Zone(ZoneLoop)%MaximumY - Zone(ZoneLoop)%MinimumY) &
+ 2.d0 * (Zone(ZoneLoop)%MaximumX - Zone(ZoneLoop)%MinimumX)
IF (thisZoneSimplePerim > 0.d0) THEN
thisZoneHorizHydralicDiameter = 4.d0*Zone(ZoneLoop)%FloorArea / thisZoneSimplePerim
ELSE
IF (Zone(ZoneLoop)%FloorArea > 0.d0) THEN
thisZoneHorizHydralicDiameter = SQRT(Zone(ZoneLoop)%FloorArea)
ENDIF
ENDIF
IF (Zone(ZoneLoop)%ExtGrossWallArea > 0.d0 ) THEN
thisWWR = Zone(ZoneLoop)%ExtWindowArea / Zone(ZoneLoop)%ExtGrossWallArea
ELSE
thisWWR = -999.d0 !throw error?
ENDIF
! first pass thru this zones surfaces to gather data
DO SurfLoop = Zone(ZoneLoop)%SurfaceFirst, Zone(ZoneLoop)%SurfaceLast
!first catch exterior walls and do summations
IF ( ( Surface(SurfLoop)%ExtBoundCond == ExternalEnvironment) &
.AND. (Surface(SurfLoop)%Class == SurfaceClass_Wall) ) THEN
PerimExtLengthSum = PerimExtLengthSum + Surface(SurfLoop)%Width
ExtWallCount = ExtWallCount + 1
ENDIF
IF ( ( Surface(SurfLoop)%ExtBoundCond == ExternalEnvironment) &
.AND. ((Surface(SurfLoop)%Class == SurfaceClass_Window) &
.OR. (Surface(SurfLoop)%Class == SurfaceClass_GlassDoor) )) THEN
ExtWindowCount = ExtWindowCount + 1
ENDIF
ENDDO
!second pass thru zone surfs to fill data
DO SurfLoop = Zone(ZoneLoop)%SurfaceFirst, Zone(ZoneLoop)%SurfaceLast
!now fill values
Surface(SurfLoop)%IntConvZoneWallHeight = Zone(ZoneLoop)%CeilingHeight
Surface(SurfLoop)%IntConvZonePerimLength = PerimExtLengthSum
Surface(SurfLoop)%IntConvZoneHorizHydrDiam = thisZoneHorizHydralicDiameter
Surface(SurfLoop)%IntConvWindowWallRatio = thisWWR
ENDDO !2nd pass over surfaces.
!third pass for window locations
IF ((ExtWindowCount > 0) .AND. (ExtWallCount > 0)) THEN
DO SurfLoop = Zone(ZoneLoop)%SurfaceFirst, Zone(ZoneLoop)%SurfaceLast
IF ( ( Surface(SurfLoop)%ExtBoundCond == ExternalEnvironment) &
.AND. ((Surface(SurfLoop)%Class == SurfaceClass_Window) &
.OR. (Surface(SurfLoop)%Class == SurfaceClass_GlassDoor) )) THEN
IF (Surface(SurfLoop)%IntConvWindowWallRatio < 0.5d0) THEN
IF (Surface(SurfLoop)%Centroid%Z < Zone(ZoneLoop)%Centroid%Z) THEN
Surface(SurfLoop)%IntConvWindowLocation = InConvWinLoc_LowerPartOfExteriorWall
ELSE
Surface(SurfLoop)%IntConvWindowLocation = InConvWinLoc_UpperPartOfExteriorWall
ENDIF
ELSE
Surface(SurfLoop)%IntConvWindowLocation = InConvWinLoc_LargePartOfExteriorWall
ENDIF
IF ( ( Surface(Surface(SurfLoop)%BaseSurf)%ExtBoundCond == ExternalEnvironment) &
.AND. (Surface(Surface(SurfLoop)%BaseSurf)%Class == SurfaceClass_Wall) ) THEN
IF (Surface(Surface(SurfLoop)%BaseSurf)%Centroid%Z < Surface(SurfLoop)%Centroid%z) THEN
Surface(Surface(SurfLoop)%BaseSurf)%IntConvWindowLocation = InConvWinLoc_WindowAboveThis
ELSE
Surface(Surface(SurfLoop)%BaseSurf)%IntConvWindowLocation = InConvWinLoc_WindowBelowThis
ENDIF
ENDIF
ENDIF
IF ( ( Surface(SurfLoop)%ExtBoundCond == ExternalEnvironment) &
.AND. (Surface(SurfLoop)%Class == SurfaceClass_Wall) &
.AND. (Surface(SurfLoop)%IntConvWindowLocation == InConvWinLoc_NotSet)) THEN
IF (Surface(SurfLoop)%Centroid%z < Zone(ZoneLoop)%Centroid%z) THEN
Surface(SurfLoop)%IntConvWindowLocation = InConvWinLoc_WindowAboveThis
ELSE
Surface(SurfLoop)%IntConvWindowLocation = InConvWinLoc_WindowBelowThis
ENDIF
ENDIF
ENDDO !third pass over surfaces
ENDIF
ENDDO !loop over zones for inside face parameters
CubeRootOfOverallBuildingVolume = (BldgVolumeSum)**OneThird
! first pass over surfaces for outside face params
DO SurfLoop=1, TotSurfaces
IF (Surface(SurfLoop)%ExtBoundCond /= ExternalEnvironment) CYCLE
IF (.NOT. Surface(SurfLoop)%HeatTransSurf) CYCLE
thisAzimuth = Surface(SurfLoop)%Azimuth
thisArea = Surface(SurfLoop)%Area
thisZone = Surface(SurfLoop)%Zone
IF ((Surface(SurfLoop)%Tilt >= 45.d0) .AND. (Surface(SurfLoop)%Tilt < 135.d0) ) THEN
!treat as vertical wall
IF ((thisAzimuth >= NorthFacade%AzimuthRangeLow) .OR. &
(thisAzimuth < NorthFacade%AzimuthRangeHi)) THEN
NorthFacade%Area = NorthFacade%Area + thisArea
NorthFacade%Zmax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%z), NorthFacade%Zmax)
NorthFacade%Zmin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%z), NorthFacade%Zmin)
NorthFacade%Ymax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%y), NorthFacade%Ymax)
NorthFacade%Ymin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%y), NorthFacade%Ymin)
NorthFacade%Xmax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%x), NorthFacade%Xmax)
NorthFacade%Xmin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%x), NorthFacade%Xmin)
ELSEIF ((thisAzimuth >= NorthEastFacade%AzimuthRangeLow) .AND. &
(thisAzimuth < NorthEastFacade%AzimuthRangeHi)) THEN
NorthEastFacade%Area = NorthEastFacade%Area + thisArea
NorthEastFacade%Zmax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%z), NorthEastFacade%Zmax)
NorthEastFacade%Zmin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%z), NorthEastFacade%Zmin)
NorthEastFacade%Ymax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%y), NorthEastFacade%Ymax)
NorthEastFacade%Ymin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%y), NorthEastFacade%Ymin)
NorthEastFacade%Xmax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%x), NorthEastFacade%Xmax)
NorthEastFacade%Xmin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%x), NorthEastFacade%Xmin)
ELSEIF ((thisAzimuth >= EastFacade%AzimuthRangeLow) .AND. &
(thisAzimuth < EastFacade%AzimuthRangeHi)) THEN
EastFacade%Area = EastFacade%Area + thisArea
EastFacade%Zmax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%z), EastFacade%Zmax)
EastFacade%Zmin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%z), EastFacade%Zmin)
EastFacade%Ymax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%y), EastFacade%Ymax)
EastFacade%Ymin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%y), EastFacade%Ymin)
EastFacade%Xmax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%x), EastFacade%Xmax)
EastFacade%Xmin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%x), EastFacade%Xmin)
ELSEIF ((thisAzimuth >= SouthEastFacade%AzimuthRangeLow) .AND. &
(thisAzimuth < SouthEastFacade%AzimuthRangeHi)) THEN
SouthEastFacade%Area = SouthEastFacade%Area + thisArea
SouthEastFacade%Zmax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%z), SouthEastFacade%Zmax)
SouthEastFacade%Zmin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%z), SouthEastFacade%Zmin)
SouthEastFacade%Ymax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%y), SouthEastFacade%Ymax)
SouthEastFacade%Ymin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%y), SouthEastFacade%Ymin)
SouthEastFacade%Xmax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%x), SouthEastFacade%Xmax)
SouthEastFacade%Xmin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%x), SouthEastFacade%Xmin)
ELSEIF ((thisAzimuth >= SouthFacade%AzimuthRangeLow) .AND. &
(thisAzimuth < SouthFacade%AzimuthRangeHi)) THEN
SouthFacade%Area = SouthFacade%Area + thisArea
SouthFacade%Zmax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%z), SouthFacade%Zmax)
SouthFacade%Zmin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%z), SouthFacade%Zmin)
SouthFacade%Ymax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%y), SouthFacade%Ymax)
SouthFacade%Ymin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%y), SouthFacade%Ymin)
SouthFacade%Xmax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%x), SouthFacade%Xmax)
SouthFacade%Xmin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%x), SouthFacade%Xmin)
ELSEIF ((thisAzimuth >= SouthWestFacade%AzimuthRangeLow) .AND. &
(thisAzimuth < SouthWestFacade%AzimuthRangeHi)) THEN
SouthWestFacade%Area = SouthWestFacade%Area + thisArea
SouthWestFacade%Zmax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%z), SouthWestFacade%Zmax)
SouthWestFacade%Zmin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%z), SouthWestFacade%Zmin)
SouthWestFacade%Ymax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%y), SouthWestFacade%Ymax)
SouthWestFacade%Ymin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%y), SouthWestFacade%Ymin)
SouthWestFacade%Xmax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%x), SouthWestFacade%Xmax)
SouthWestFacade%Xmin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%x), SouthWestFacade%Xmin)
ELSEIF ((thisAzimuth >= WestFacade%AzimuthRangeLow) .AND. &
(thisAzimuth < WestFacade%AzimuthRangeHi)) THEN
WestFacade%Area = WestFacade%Area + thisArea
WestFacade%Zmax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%z), WestFacade%Zmax)
WestFacade%Zmin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%z), WestFacade%Zmin)
WestFacade%Ymax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%y), WestFacade%Ymax)
WestFacade%Ymin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%y), WestFacade%Ymin)
WestFacade%Xmax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%x), WestFacade%Xmax)
WestFacade%Xmin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%x), WestFacade%Xmin)
ELSEIF ((thisAzimuth >= NorthWestFacade%AzimuthRangeLow) .AND. &
(thisAzimuth < NorthWestFacade%AzimuthRangeHi)) THEN
NorthWestFacade%Area = NorthWestFacade%Area + thisArea
NorthWestFacade%Zmax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%z), NorthWestFacade%Zmax)
NorthWestFacade%Zmin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%z), NorthWestFacade%Zmin)
NorthWestFacade%Ymax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%y), NorthWestFacade%Ymax)
NorthWestFacade%Ymin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%y), NorthWestFacade%Ymin)
NorthWestFacade%Xmax = MAX(MAXVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%x), NorthWestFacade%Xmax)
NorthWestFacade%Xmin = MIN(MINVAL(Surface(SurfLoop)%Vertex(1:Surface(SurfLoop)%Sides)%x), NorthWestFacade%Xmin)
ENDIF
ELSEIF (Surface(SurfLoop)%Tilt < 45.0d0) THEN !TODO Double check tilt wrt outside vs inside
IF (FirstRoofSurf) THEN !Init with something in the group
RoofGeo%XdYdZd%SurfNum = SurfLoop
RoofGeo%XdYdZd%VertNum = 1
RoofGeo%XdYdZd%Vertex = Surface(SurfLoop)%Vertex(1)
RoofGeo%XdYdZu%SurfNum = SurfLoop
RoofGeo%XdYdZu%VertNum = 1
RoofGeo%XdYdZu%Vertex = Surface(SurfLoop)%Vertex(1)
RoofGeo%XdYuZd%SurfNum = SurfLoop
RoofGeo%XdYuZd%VertNum = 1
RoofGeo%XdYuZd%Vertex = Surface(SurfLoop)%Vertex(1)
RoofGeo%XdYuZu%SurfNum = SurfLoop
RoofGeo%XdYuZu%VertNum = 1
RoofGeo%XdYuZu%Vertex = Surface(SurfLoop)%Vertex(1)
RoofGeo%XuYdZd%SurfNum = SurfLoop
RoofGeo%XuYdZd%VertNum = 1
RoofGeo%XuYdZd%Vertex = Surface(SurfLoop)%Vertex(1)
RoofGeo%XuYuZd%SurfNum = SurfLoop
RoofGeo%XuYuZd%VertNum = 1
RoofGeo%XuYuZd%Vertex = Surface(SurfLoop)%Vertex(1)
RoofGeo%XuYdZu%SurfNum = SurfLoop
RoofGeo%XuYdZu%VertNum = 1
RoofGeo%XuYdZu%Vertex = Surface(SurfLoop)%Vertex(1)
RoofGeo%XuYuZu%SurfNum = SurfLoop
RoofGeo%XuYuZu%VertNum = 1
RoofGeo%XuYuZu%Vertex = Surface(SurfLoop)%Vertex(1)
FirstRoofSurf = .FALSE.
ENDIF
! treat as part of roof group
RoofGeo%Area = RoofGeo%Area + thisArea
DO VertLoop = 1, Surface(SurfLoop)%Sides
!1 low x, low y, low z
IF ( (Surface(SurfLoop)%Vertex(VertLoop)%X <= RoofGeo%XdYdZd%Vertex%X) &
.AND. (Surface(SurfLoop)%Vertex(VertLoop)%Y <= RoofGeo%XdYdZd%Vertex%Y) &
.AND. (Surface(SurfLoop)%Vertex(VertLoop)%Z <= RoofGeo%XdYdZd%Vertex%Z) ) THEN
!this point is more toward this bound
RoofGeo%XdYdZd%SurfNum = SurfLoop
RoofGeo%XdYdZd%VertNum = VertLoop
RoofGeo%XdYdZd%Vertex = Surface(SurfLoop)%Vertex(VertLoop)
RoofBoundZvals(1) = Surface(SurfLoop)%Vertex(VertLoop)%Z
ENDIF
! 2 low x, low y, hi z
IF ( (Surface(SurfLoop)%Vertex(VertLoop)%X <= RoofGeo%XdYdZu%Vertex%X) &
.AND. (Surface(SurfLoop)%Vertex(VertLoop)%Y <= RoofGeo%XdYdZu%Vertex%Y) &
.AND. (Surface(SurfLoop)%Vertex(VertLoop)%Z >= RoofGeo%XdYdZu%Vertex%Z) ) THEN
!this point is more toward this bound
RoofGeo%XdYdZu%SurfNum = SurfLoop
RoofGeo%XdYdZu%VertNum = VertLoop
RoofGeo%XdYdZu%Vertex = Surface(SurfLoop)%Vertex(VertLoop)
RoofBoundZvals(2) = Surface(SurfLoop)%Vertex(VertLoop)%Z
ENDIF
! 3 low x, hi y, low z
IF ( (Surface(SurfLoop)%Vertex(VertLoop)%X <= RoofGeo%XdYuZd%Vertex%X) &
.AND. (Surface(SurfLoop)%Vertex(VertLoop)%Y >= RoofGeo%XdYuZd%Vertex%Y) &
.AND. (Surface(SurfLoop)%Vertex(VertLoop)%Z <= RoofGeo%XdYuZd%Vertex%Z) ) THEN
!this point is more toward this bound
RoofGeo%XdYuZd%SurfNum = SurfLoop
RoofGeo%XdYuZd%VertNum = VertLoop
RoofGeo%XdYuZd%Vertex = Surface(SurfLoop)%Vertex(VertLoop)
RoofBoundZvals(3) = Surface(SurfLoop)%Vertex(VertLoop)%Z
ENDIF
! 4 low x, hi y, hi z
IF ( (Surface(SurfLoop)%Vertex(VertLoop)%X <= RoofGeo%XdYuZu%Vertex%X) &
.AND. (Surface(SurfLoop)%Vertex(VertLoop)%Y >= RoofGeo%XdYuZu%Vertex%Y) &
.AND. (Surface(SurfLoop)%Vertex(VertLoop)%Z >= RoofGeo%XdYuZu%Vertex%Z) ) THEN
!this point is more toward this bound
RoofGeo%XdYuZu%SurfNum = SurfLoop
RoofGeo%XdYuZu%VertNum = VertLoop
RoofGeo%XdYuZu%Vertex = Surface(SurfLoop)%Vertex(VertLoop)
RoofBoundZvals(4) = Surface(SurfLoop)%Vertex(VertLoop)%Z
ENDIF
! 5 hi x, low y, low z
IF ( (Surface(SurfLoop)%Vertex(VertLoop)%X >= RoofGeo%XuYdZd%Vertex%X) &
.AND. (Surface(SurfLoop)%Vertex(VertLoop)%Y <= RoofGeo%XuYdZd%Vertex%Y) &
.AND. (Surface(SurfLoop)%Vertex(VertLoop)%Z <= RoofGeo%XuYdZd%Vertex%Z) ) THEN
!this point is more toward this bound
RoofGeo%XuYdZd%SurfNum = SurfLoop
RoofGeo%XuYdZd%VertNum = VertLoop
RoofGeo%XuYdZd%Vertex = Surface(SurfLoop)%Vertex(VertLoop)
RoofBoundZvals(5) = Surface(SurfLoop)%Vertex(VertLoop)%Z
ENDIF
! 6 hi x, hi y, low z
IF ( (Surface(SurfLoop)%Vertex(VertLoop)%X >= RoofGeo%XuYuZd%Vertex%X) &
.AND. (Surface(SurfLoop)%Vertex(VertLoop)%Y >= RoofGeo%XuYuZd%Vertex%Y) &
.AND. (Surface(SurfLoop)%Vertex(VertLoop)%Z <= RoofGeo%XuYuZd%Vertex%Z) ) THEN
!this point is more toward this bound
RoofGeo%XuYuZd%SurfNum = SurfLoop
RoofGeo%XuYuZd%VertNum = VertLoop
RoofGeo%XuYuZd%Vertex = Surface(SurfLoop)%Vertex(VertLoop)
RoofBoundZvals(6) = Surface(SurfLoop)%Vertex(VertLoop)%Z
ENDIF
! 7 hi x, low y, hi z
IF ( (Surface(SurfLoop)%Vertex(VertLoop)%X >= RoofGeo%XuYdZu%Vertex%X) &
.AND. (Surface(SurfLoop)%Vertex(VertLoop)%Y <= RoofGeo%XuYdZu%Vertex%Y) &
.AND. (Surface(SurfLoop)%Vertex(VertLoop)%Z >= RoofGeo%XuYdZu%Vertex%Z) ) THEN
!this point is more toward this bound
RoofGeo%XuYdZu%SurfNum = SurfLoop
RoofGeo%XuYdZu%VertNum = VertLoop
RoofGeo%XuYdZu%Vertex = Surface(SurfLoop)%Vertex(VertLoop)
RoofBoundZvals(7) = Surface(SurfLoop)%Vertex(VertLoop)%Z
ENDIF
! 8 hi x, hi y, hi z
IF ( (Surface(SurfLoop)%Vertex(VertLoop)%X >= RoofGeo%XuYuZu%Vertex%X) &
.AND. (Surface(SurfLoop)%Vertex(VertLoop)%Y >= RoofGeo%XuYuZu%Vertex%Y) &
.AND. (Surface(SurfLoop)%Vertex(VertLoop)%Z >= RoofGeo%XuYuZu%Vertex%Z) ) THEN
!this point is more toward this bound
RoofGeo%XuYuZu%SurfNum = SurfLoop
RoofGeo%XuYuZu%VertNum = VertLoop
RoofGeo%XuYuZu%Vertex = Surface(SurfLoop)%Vertex(VertLoop)
RoofBoundZvals(8) = Surface(SurfLoop)%Vertex(VertLoop)%Z
ENDIF
ENDDO
ENDIF
ENDDO ! fist loop over surfaces for outside face params
NorthFacade%Perimeter = 2.d0 * (((NorthFacade%Xmax - NorthFacade%Xmin)**2 &
+ (NorthFacade%Ymax - NorthFacade%Ymin)**2)**0.5d0) + &
2.d0 * (NorthFacade%Zmax - NorthFacade%Zmin)
NorthFacade%Height = NorthFacade%Zmax - NorthFacade%Zmin
NorthEastFacade%Perimeter = 2.d0 * (((NorthEastFacade%Xmax - NorthEastFacade%Xmin)**2 &
+ (NorthEastFacade%Ymax - NorthEastFacade%Ymin)**2)**0.5d0) + &
2.d0 * (NorthEastFacade%Zmax - NorthEastFacade%Zmin)
NorthEastFacade%Height = NorthEastFacade%Zmax - NorthEastFacade%Zmin
EastFacade%Perimeter = 2.d0 * (((EastFacade%Xmax - EastFacade%Xmin)**2 &
+ (EastFacade%Ymax - EastFacade%Ymin)**2)**0.5d0) + &
2.d0 * (EastFacade%Zmax - EastFacade%Zmin)
EastFacade%Height = EastFacade%Zmax - EastFacade%Zmin
SouthEastFacade%Perimeter = 2.d0 * (((SouthEastFacade%Xmax - SouthEastFacade%Xmin)**2 &
+ (SouthEastFacade%Ymax - SouthEastFacade%Ymin)**2)**0.5d0) + &
2.d0 * (SouthEastFacade%Zmax - SouthEastFacade%Zmin)
SouthEastFacade%Height = SouthEastFacade%Zmax - SouthEastFacade%Zmin
SouthFacade%Perimeter = 2.d0 * (((SouthFacade%Xmax - SouthFacade%Xmin)**2 &
+ (SouthFacade%Ymax - SouthFacade%Ymin)**2)**0.5d0) + &
2.d0 * (SouthFacade%Zmax - SouthFacade%Zmin)
SouthFacade%Height = SouthFacade%Zmax - SouthFacade%Zmin
SouthWestFacade%Perimeter = 2.d0 * (((SouthWestFacade%Xmax - SouthWestFacade%Xmin)**2 &
+ (SouthWestFacade%Ymax - SouthWestFacade%Ymin)**2)**0.5d0) + &
2.d0 * (SouthWestFacade%Zmax - SouthWestFacade%Zmin)
SouthWestFacade%Height = SouthWestFacade%Zmax - SouthWestFacade%Zmin
WestFacade%Perimeter = 2.d0 * (((WestFacade%Xmax - WestFacade%Xmin)**2 &
+ (WestFacade%Ymax - WestFacade%Ymin)**2)**0.5d0) + &
2.d0 * (WestFacade%Zmax - WestFacade%Zmin)
WestFacade%Height = WestFacade%Zmax - WestFacade%Zmin
NorthWestFacade%Perimeter = 2.d0 * (((NorthWestFacade%Xmax - NorthWestFacade%Xmin)**2 &
+ (NorthWestFacade%Ymax - NorthWestFacade%Ymin)**2)**0.5d0) + &
2.d0 * (NorthWestFacade%Zmax - NorthWestFacade%Zmin)
NorthWestFacade%Height = NorthWestFacade%Zmax - NorthWestFacade%Zmin
!now model roof perimeter
! move around bounding boxes side walls and find the longest of the four distances
! Side A: Y low -- uses XdYdZd, XdYdZu, XuYdZd, XuYdZu
TestDist(1) = Distance(RoofGeo%XdYdZd%Vertex, RoofGeo%XuYdZd%Vertex)
TestDist(2) = Distance(RoofGeo%XdYdZd%Vertex, RoofGeo%XuYdZu%Vertex)
TestDist(3) = Distance(RoofGeo%XdYdZu%Vertex, RoofGeo%XuYdZd%Vertex)
TestDist(4) = Distance(RoofGeo%XdYdZu%Vertex, RoofGeo%XuYdZu%Vertex)
SideALength = MAXVAL(TestDist)
! Side B: X Hi -- uses XuYdZd, XuYuZd, XuYdZu, XuYuZu
TestDist(1) = Distance(RoofGeo%XuYdZd%Vertex, RoofGeo%XuYuZd%Vertex)
TestDist(2) = Distance(RoofGeo%XuYdZd%Vertex, RoofGeo%XuYuZu%Vertex)
TestDist(3) = Distance(RoofGeo%XuYdZu%Vertex, RoofGeo%XuYuZd%Vertex)
TestDist(4) = Distance(RoofGeo%XuYdZu%Vertex, RoofGeo%XuYuZu%Vertex)
SideBLength = MAXVAL(TestDist)
! Side C: Y Hi -- uses XdYuZd, XdYuZu, XuYuZd, XuYuZu
TestDist(1) = Distance(RoofGeo%XdYuZd%Vertex, RoofGeo%XuYuZd%Vertex)
TestDist(2) = Distance(RoofGeo%XdYuZd%Vertex, RoofGeo%XuYuZu%Vertex)
TestDist(3) = Distance(RoofGeo%XdYuZu%Vertex, RoofGeo%XuYuZd%Vertex)
TestDist(4) = Distance(RoofGeo%XdYuZu%Vertex, RoofGeo%XuYuZu%Vertex)
SideCLength = MAXVAL(TestDist)
! Side D: X Lo Hi -- uses XdYuZd, XdYuZu, XuYuZd, XuYuZu
TestDist(1) = Distance(RoofGeo%XdYuZd%Vertex, RoofGeo%XuYuZd%Vertex)
TestDist(2) = Distance(RoofGeo%XdYuZd%Vertex, RoofGeo%XuYuZu%Vertex)
TestDist(3) = Distance(RoofGeo%XdYuZu%Vertex, RoofGeo%XuYuZd%Vertex)
TestDist(4) = Distance(RoofGeo%XdYuZu%Vertex, RoofGeo%XuYuZu%Vertex)
SideDLength = MAXVAL(TestDist)
RoofGeo%Perimeter = SideALength + SideBLength + SideCLength + SideDLength
RoofGeo%Height = MAXVAL(RoofBoundZvals) - MINVAL(RoofBoundZvals)
! now find the longest bound face
IF ( ( SideALength >= SideBLength) &
.AND. ( SideALength >= SideCLength) &
.AND. ( SideALength >= SideDLength) ) THEN
! Side A: Y low -- uses XdYdZd, XdYdZu, XuYdZd, XuYdZu
RoofGeo%BoundSurf(1) = RoofGeo%XdYdZd%Vertex
RoofGeo%BoundSurf(2) = RoofGeo%XuYdZd%Vertex
RoofGeo%BoundSurf(3) = RoofGeo%XuYdZu%Vertex
RoofGeo%BoundSurf(4) = RoofGeo%XdYdZu%Vertex
ELSEIF ( ( SideBLength >= SideALength) &
.AND. ( SideBLength >= SideCLength) &
.AND. ( SideBLength >= SideDLength) ) THEN
! Side B: X Hi -- uses XuYdZd, XuYuZd, XuYdZu, XuYuZu
RoofGeo%BoundSurf(1) = RoofGeo%XuYdZd%Vertex
RoofGeo%BoundSurf(2) = RoofGeo%XuYuZd%Vertex
RoofGeo%BoundSurf(3) = RoofGeo%XuYuZu%Vertex
RoofGeo%BoundSurf(4) = RoofGeo%XuYdZu%Vertex
ELSEIF ( ( SideCLength >= SideALength) &
.AND. ( SideCLength >= SideBLength) &
.AND. ( SideCLength >= SideDLength) ) THEN
! Side C: Y Hi -- uses XdYuZd, XdYuZu, XuYuZd, XuYuZu
RoofGeo%BoundSurf(1) = RoofGeo%XdYuZd%Vertex
RoofGeo%BoundSurf(2) = RoofGeo%XuYuZd%Vertex
RoofGeo%BoundSurf(3) = RoofGeo%XuYuZu%Vertex
RoofGeo%BoundSurf(4) = RoofGeo%XdYuZu%Vertex
ELSEIF ( ( SideDLength >= SideALength) &
.AND. ( SideDLength >= SideCLength) &
.AND. ( SideDLength >= SideBLength) ) THEN
! Side D: X Lo Hi -- uses XdYuZd, XdYuZu, XuYuZd, XuYuZu
RoofGeo%BoundSurf(1) = RoofGeo%XdYuZd%Vertex
RoofGeo%BoundSurf(2) = RoofGeo%XuYuZd%Vertex
RoofGeo%BoundSurf(3) = RoofGeo%XuYuZu%Vertex
RoofGeo%BoundSurf(4) = RoofGeo%XdYuZu%Vertex
ENDIF
CALL CreateNewellAreaVector(RoofGeo%BoundSurf, 4, BoundNewellAreaVec)
surfacearea=VecLength(BoundNewellAreaVec)
IF (surfacearea > .001d0) THEN ! Roof is not flat
CALL CreateNewellSurfaceNormalVector(RoofGeo%BoundSurf, 4, BoundNewellVec)
CALL DetermineAzimuthAndTilt(RoofGeo%BoundSurf, 4, BoundAzimuth, BoundTilt, dummy1, dummy2, dummy3, &
surfacearea, BoundNewellVec)
RoofLongAxisOutwardAzimuth = BoundAzimuth
ELSE
RoofLongAxisOutwardAzimuth = 0.0d0 ! flat roofs don't really have azimuth
ENDIF
DO SurfLoop=1, TotSurfaces
IF (Surface(SurfLoop)%ExtBoundCond /= ExternalEnvironment) CYCLE
IF (.NOT. Surface(SurfLoop)%HeatTransSurf) CYCLE
thisAzimuth = Surface(SurfLoop)%Azimuth
IF ((Surface(SurfLoop)%Tilt >= 45.d0) .AND. (Surface(SurfLoop)%Tilt < 135.d0) ) THEN
!treat as vertical wall
IF ((thisAzimuth >= NorthFacade%AzimuthRangeLow) .OR. &
(thisAzimuth < NorthFacade%AzimuthRangeHi)) THEN
Surface(SurfLoop)%OutConvFaceArea = MAX(NorthFacade%Area ,Surface(SurfLoop)%GrossArea)
Surface(SurfLoop)%OutConvFacePerimeter = MAX(NorthFacade%Perimeter,Surface(SurfLoop)%Perimeter)
Surface(SurfLoop)%OutConvFaceHeight = MAX(NorthFacade%Height , &
(MAXVAL(Surface(SurfLoop)%Vertex%Z) - MINVAL(Surface(SurfLoop)%Vertex%Z) ) )
ELSEIF ((thisAzimuth >= NorthEastFacade%AzimuthRangeLow) .AND. &
(thisAzimuth < NorthEastFacade%AzimuthRangeHi)) THEN
Surface(SurfLoop)%OutConvFaceArea = MAX(NorthEastFacade%Area ,Surface(SurfLoop)%GrossArea)
Surface(SurfLoop)%OutConvFacePerimeter = MAX(NorthEastFacade%Perimeter,Surface(SurfLoop)%Perimeter)
Surface(SurfLoop)%OutConvFaceHeight = MAX(NorthEastFacade%Height , &
(MAXVAL(Surface(SurfLoop)%Vertex%Z) - MINVAL(Surface(SurfLoop)%Vertex%Z) ) )
ELSEIF ((thisAzimuth >= EastFacade%AzimuthRangeLow) .AND. &
(thisAzimuth < EastFacade%AzimuthRangeHi)) THEN
Surface(SurfLoop)%OutConvFaceArea = MAX(EastFacade%Area ,Surface(SurfLoop)%GrossArea)
Surface(SurfLoop)%OutConvFacePerimeter = MAX(EastFacade%Perimeter,Surface(SurfLoop)%Perimeter)
Surface(SurfLoop)%OutConvFaceHeight = MAX(EastFacade%Height, &
(MAXVAL(Surface(SurfLoop)%Vertex%Z) - MINVAL(Surface(SurfLoop)%Vertex%Z) ) )
ELSEIF ((thisAzimuth >= SouthEastFacade%AzimuthRangeLow) .AND. &
(thisAzimuth < SouthEastFacade%AzimuthRangeHi)) THEN
Surface(SurfLoop)%OutConvFaceArea = MAX(SouthEastFacade%Area ,Surface(SurfLoop)%GrossArea)
Surface(SurfLoop)%OutConvFacePerimeter = MAX(SouthEastFacade%Perimeter,Surface(SurfLoop)%Perimeter)
Surface(SurfLoop)%OutConvFaceHeight = MAX(SouthEastFacade%Height, &
(MAXVAL(Surface(SurfLoop)%Vertex%Z) - MINVAL(Surface(SurfLoop)%Vertex%Z) ) )
ELSEIF ((thisAzimuth >= SouthFacade%AzimuthRangeLow) .AND. &
(thisAzimuth < SouthFacade%AzimuthRangeHi)) THEN
Surface(SurfLoop)%OutConvFaceArea = MAX(SouthFacade%Area ,Surface(SurfLoop)%GrossArea)
Surface(SurfLoop)%OutConvFacePerimeter = MAX(SouthFacade%Perimeter,Surface(SurfLoop)%Perimeter)
Surface(SurfLoop)%OutConvFaceHeight = MAX(SouthFacade%Height, &
(MAXVAL(Surface(SurfLoop)%Vertex%Z) - MINVAL(Surface(SurfLoop)%Vertex%Z) ) )
ELSEIF ((thisAzimuth >= SouthWestFacade%AzimuthRangeLow) .AND. &
(thisAzimuth < SouthWestFacade%AzimuthRangeHi)) THEN
Surface(SurfLoop)%OutConvFaceArea = MAX(SouthWestFacade%Area ,Surface(SurfLoop)%GrossArea)
Surface(SurfLoop)%OutConvFacePerimeter = MAX(SouthWestFacade%Perimeter,Surface(SurfLoop)%Perimeter)
Surface(SurfLoop)%OutConvFaceHeight = MAX(SouthWestFacade%Height, &
(MAXVAL(Surface(SurfLoop)%Vertex%Z) - MINVAL(Surface(SurfLoop)%Vertex%Z) ) )
ELSEIF ((thisAzimuth >= WestFacade%AzimuthRangeLow) .AND. &
(thisAzimuth < WestFacade%AzimuthRangeHi)) THEN
Surface(SurfLoop)%OutConvFaceArea = MAX(WestFacade%Area ,Surface(SurfLoop)%GrossArea)
Surface(SurfLoop)%OutConvFacePerimeter = MAX(WestFacade%Perimeter ,Surface(SurfLoop)%Perimeter)
Surface(SurfLoop)%OutConvFaceHeight = MAX(WestFacade%Height, &
(MAXVAL(Surface(SurfLoop)%Vertex%Z) - MINVAL(Surface(SurfLoop)%Vertex%Z) ) )
ELSEIF ((thisAzimuth >= NorthWestFacade%AzimuthRangeLow) .AND. &
(thisAzimuth < NorthWestFacade%AzimuthRangeHi)) THEN
Surface(SurfLoop)%OutConvFaceArea = MAX(NorthWestFacade%Area ,Surface(SurfLoop)%GrossArea)
Surface(SurfLoop)%OutConvFacePerimeter = MAX(NorthWestFacade%Perimeter ,Surface(SurfLoop)%Perimeter)
Surface(SurfLoop)%OutConvFaceHeight = MAX(NorthWestFacade%Height , &
(MAXVAL(Surface(SurfLoop)%Vertex%Z) - MINVAL(Surface(SurfLoop)%Vertex%Z) ) )
ENDIF
ELSEIF (Surface(SurfLoop)%Tilt < 45.0d0) THEN ! assume part of roof
Surface(SurfLoop)%OutConvFaceArea = MAX(RoofGeo%Area ,Surface(SurfLoop)%GrossArea)
Surface(SurfLoop)%OutConvFacePerimeter = MAX(RoofGeo%Perimeter ,Surface(SurfLoop)%Perimeter)
Surface(SurfLoop)%OutConvFaceHeight = MAX(RoofGeo%Height, &
(MAXVAL(Surface(SurfLoop)%Vertex%Z) - MINVAL(Surface(SurfLoop)%Vertex%Z) ) )
ELSEIF (Surface(SurfLoop)%Tilt >= 135.0d0) THEN !assume floor over exterior, just use surface's geometry
Surface(SurfLoop)%OutConvFaceArea = Surface(SurfLoop)%GrossArea
Surface(SurfLoop)%OutConvFacePerimeter = Surface(SurfLoop)%Perimeter
Surface(SurfLoop)%OutConvFaceHeight = (MAXVAL(Surface(SurfLoop)%Vertex%Z) - MINVAL(Surface(SurfLoop)%Vertex%Z) )
ENDIF
ENDDO ! second pass thru surfs for outside face convection params.
! now send to EIO if surface reporting selected
CALL ScanForReports('Surfaces',DoReport,'Details')
IF (DoReport) THEN ! echo out static geometry data related to convection models
Write(OutputFileInits, 900) !header
DO SurfLoop=1, TotSurfaces
IF (.NOT. Surface(SurfLoop)%HeatTransSurf) cycle
IF (Surface(SurfLoop)%IntConvSurfGetsRadiantHeat) THEN
YesNo1='Yes'
ELSE
YesNo1='No'
ENDIF
IF (Surface(SurfLoop)%IntConvSurfHasActiveInIt) THEN
YesNo2='Yes'
ELSE
YesNo2='No'
ENDIF
Write(OutputFileInits, 901) &
TRIM( Surface(SurfLoop)%Name ) , &
TRIM( RoundSigDigits(Surface(SurfLoop)%ExtConvCoeff)) , &
TRIM( RoundSigDigits(Surface(SurfLoop)%OutConvFaceArea, 2)), &
TRIM( RoundSigDigits(Surface(SurfLoop)%OutConvFacePerimeter, 2)), &
TRIM( RoundSigDigits(Surface(SurfLoop)%OutConvFaceHeight, 2)), &
TRIM( RoundSigDigits(Surface(SurfLoop)%IntConvCoeff)) , &
TRIM( RoundSigDigits(Surface(SurfLoop)%IntConvZoneWallHeight, 2)), &
TRIM( RoundSigDigits(Surface(SurfLoop)%IntConvZonePerimLength , 2)), & ! [m] length of perimeter zone's exterior wall
TRIM( RoundSigDigits(Surface(SurfLoop)%IntConvZoneHorizHydrDiam, 2)), & ! [m] hydraulic diameter, usually 4 times the zone floor area div by perimeter
TRIM( RoundSigDigits(Surface(SurfLoop)%IntConvWindowWallRatio, 2)), & ! [-] area of windows over area of exterior wall for zone
TRIM( RoundSigDigits(Surface(SurfLoop)%IntConvWindowLocation )), & ! relative location of window in zone for interior Hc models
TRIM(YesNo1),TRIM(YesNo2)
ENDDO
!if display advanced reports also dump meta group data used for convection geometry
IF (DisplayAdvancedReportVariables) THEN
WRITE (OutputFileInits, 8000) !header for north facade
WRITE (OutputFileInits, 8001) &
TRIM( RoundSigDigits( NorthFacade%Perimeter, 2)), &
TRIM( RoundSigDigits( NorthFacade%Height , 2)), &
TRIM( RoundSigDigits( NorthFacade%Xmin , 2)), &
TRIM( RoundSigDigits( NorthFacade%Xmax , 2)), &
TRIM( RoundSigDigits( NorthFacade%Ymin , 2)), &
TRIM( RoundSigDigits( NorthFacade%Ymax , 2)), &
TRIM( RoundSigDigits( NorthFacade%Zmin , 2)), &
TRIM( RoundSigDigits( NorthFacade%Zmax , 2))
WRITE (OutputFileInits, 8100) !header for northeast facade
WRITE (OutputFileInits, 8101) &
TRIM( RoundSigDigits( NorthEastFacade%Perimeter, 2)), &
TRIM( RoundSigDigits( NorthEastFacade%Height , 2)), &
TRIM( RoundSigDigits( NorthEastFacade%Xmin , 2)), &
TRIM( RoundSigDigits( NorthEastFacade%Xmax , 2)), &
TRIM( RoundSigDigits( NorthEastFacade%Ymin , 2)), &
TRIM( RoundSigDigits( NorthEastFacade%Ymax , 2)), &
TRIM( RoundSigDigits( NorthEastFacade%Zmin , 2)), &
TRIM( RoundSigDigits( NorthEastFacade%Zmax , 2))
WRITE (OutputFileInits, 8200) !header for east facade
WRITE (OutputFileInits, 8201) &
TRIM( RoundSigDigits( EastFacade%Perimeter, 2)), &
TRIM( RoundSigDigits( EastFacade%Height , 2)), &
TRIM( RoundSigDigits( EastFacade%Xmin , 2)), &
TRIM( RoundSigDigits( EastFacade%Xmax , 2)), &
TRIM( RoundSigDigits( EastFacade%Ymin , 2)), &
TRIM( RoundSigDigits( EastFacade%Ymax , 2)), &
TRIM( RoundSigDigits( EastFacade%Zmin , 2)), &
TRIM( RoundSigDigits( EastFacade%Zmax , 2))
WRITE (OutputFileInits, 8300) !header for southeast facade
WRITE (OutputFileInits, 8301) &
TRIM( RoundSigDigits( SouthEastFacade%Perimeter, 2)), &
TRIM( RoundSigDigits( SouthEastFacade%Height , 2)), &
TRIM( RoundSigDigits( SouthEastFacade%Xmin , 2)), &
TRIM( RoundSigDigits( SouthEastFacade%Xmax , 2)), &
TRIM( RoundSigDigits( SouthEastFacade%Ymin , 2)), &
TRIM( RoundSigDigits( SouthEastFacade%Ymax , 2)), &
TRIM( RoundSigDigits( SouthEastFacade%Zmin , 2)), &
TRIM( RoundSigDigits( SouthEastFacade%Zmax , 2))
WRITE (OutputFileInits, 8400) !header for south facade
WRITE (OutputFileInits, 8401) &
TRIM( RoundSigDigits( SouthFacade%Perimeter, 2)), &
TRIM( RoundSigDigits( SouthFacade%Height , 2)), &
TRIM( RoundSigDigits( SouthFacade%Xmin , 2)), &
TRIM( RoundSigDigits( SouthFacade%Xmax , 2)), &
TRIM( RoundSigDigits( SouthFacade%Ymin , 2)), &
TRIM( RoundSigDigits( SouthFacade%Ymax , 2)), &
TRIM( RoundSigDigits( SouthFacade%Zmin , 2)), &
TRIM( RoundSigDigits( SouthFacade%Zmax , 2))
WRITE (OutputFileInits, 8500) !header for southwest facade
WRITE (OutputFileInits, 8501) &
TRIM( RoundSigDigits( SouthWestFacade%Perimeter, 2)), &
TRIM( RoundSigDigits( SouthWestFacade%Height , 2)), &
TRIM( RoundSigDigits( SouthWestFacade%Xmin , 2)), &
TRIM( RoundSigDigits( SouthWestFacade%Xmax , 2)), &
TRIM( RoundSigDigits( SouthWestFacade%Ymin , 2)), &
TRIM( RoundSigDigits( SouthWestFacade%Ymax , 2)), &
TRIM( RoundSigDigits( SouthWestFacade%Zmin , 2)), &
TRIM( RoundSigDigits( SouthWestFacade%Zmax , 2))
WRITE (OutputFileInits, 8600) !header for west facade
WRITE (OutputFileInits, 8601) &
TRIM( RoundSigDigits( WestFacade%Perimeter, 2)), &
TRIM( RoundSigDigits( WestFacade%Height , 2)), &
TRIM( RoundSigDigits( WestFacade%Xmin , 2)), &
TRIM( RoundSigDigits( WestFacade%Xmax , 2)), &
TRIM( RoundSigDigits( WestFacade%Ymin , 2)), &
TRIM( RoundSigDigits( WestFacade%Ymax , 2)), &
TRIM( RoundSigDigits( WestFacade%Zmin , 2)), &
TRIM( RoundSigDigits( WestFacade%Zmax , 2))
WRITE (OutputFileInits, 8700) !header for northwest facade
WRITE (OutputFileInits, 8701) &
TRIM( RoundSigDigits( NorthWestFacade%Perimeter, 2)), &
TRIM( RoundSigDigits( NorthWestFacade%Height , 2)), &
TRIM( RoundSigDigits( NorthWestFacade%Xmin , 2)), &
TRIM( RoundSigDigits( NorthWestFacade%Xmax , 2)), &
TRIM( RoundSigDigits( NorthWestFacade%Ymin , 2)), &
TRIM( RoundSigDigits( NorthWestFacade%Ymax , 2)), &
TRIM( RoundSigDigits( NorthWestFacade%Zmin , 2)), &
TRIM( RoundSigDigits( NorthWestFacade%Zmax , 2))
WRITE (OutputFileInits, 8800) ! header for roof
WRITE (OutputFileInits, 8801, advance='No') &
TRIM( RoundSigDigits( RoofGeo%Area, 2)), &
TRIM( RoundSigDigits( RoofGeo%Perimeter, 2)), &
TRIM( RoundSigDigits( RoofGeo%Height, 2)), &
TRIM( RoundSigDigits( RoofGeo%XdYdZd%Vertex%X, 3)), &
TRIM( RoundSigDigits( RoofGeo%XdYdZd%Vertex%Y, 3)), &
TRIM( RoundSigDigits( RoofGeo%XdYdZd%Vertex%Z, 3)), &
TRIM( RoundSigDigits( RoofGeo%XdYdZu%Vertex%X, 3)), &
TRIM( RoundSigDigits( RoofGeo%XdYdZu%Vertex%Y, 3)), &
TRIM( RoundSigDigits( RoofGeo%XdYdZu%Vertex%Z, 3)), &
TRIM( RoundSigDigits( RoofGeo%XdYuZd%Vertex%X, 3))
WRITE (OutputFileInits, 88012, advance='No') &
TRIM( RoundSigDigits( RoofGeo%XdYuZd%Vertex%Y, 3)), &
TRIM( RoundSigDigits( RoofGeo%XdYuZd%Vertex%Z, 3)), &
TRIM( RoundSigDigits( RoofGeo%XdYuZu%Vertex%X, 3)), &
TRIM( RoundSigDigits( RoofGeo%XdYuZu%Vertex%Y, 3)), &
TRIM( RoundSigDigits( RoofGeo%XdYuZu%Vertex%Z, 3)), &
TRIM( RoundSigDigits( RoofGeo%XuYdZd%Vertex%X, 3)), &
TRIM( RoundSigDigits( RoofGeo%XuYdZd%Vertex%Y, 3)), &
TRIM( RoundSigDigits( RoofGeo%XuYdZd%Vertex%Z, 3)), &
TRIM( RoundSigDigits( RoofGeo%XuYuZd%Vertex%X, 3)), &
TRIM( RoundSigDigits( RoofGeo%XuYuZd%Vertex%Y, 3))
WRITE (OutputFileInits, 88013) &
TRIM( RoundSigDigits( RoofGeo%XuYuZd%Vertex%Z, 3)), &
TRIM( RoundSigDigits( RoofGeo%XuYdZu%Vertex%X, 3)), &
TRIM( RoundSigDigits( RoofGeo%XuYdZu%Vertex%Y, 3)), &
TRIM( RoundSigDigits( RoofGeo%XuYdZu%Vertex%Z, 3)), &
TRIM( RoundSigDigits( RoofGeo%XuYuZu%Vertex%X, 3)), &
TRIM( RoundSigDigits( RoofGeo%XuYuZu%Vertex%Y, 3)), &
TRIM( RoundSigDigits( RoofGeo%XuYuZu%Vertex%Z, 3))
ENDIF
ENDIF
900 format('! <Surface Convection Parameters>, Surface Name, Outside Model Assignment, Outside Area [m2], ', &
'Outside Perimeter [m], Outside Height [m], Inside Model Assignment, ', &
'Inside Height [cm], Inside Perimeter Envelope [m], Inside Hydraulic Diameter [m], Window Wall Ratio [ ], ', &
'Window Location [ ], Near Radiant [Yes/No], Has Active HVAC [Yes/No]')
901 format('Surface Convection Parameters,',A,',',A,',',A,',',A,',',A,',',A,',',A,',' &
,A,',',A,',',A,',',A,',',A,',',A )
8000 format('! <Building Convection Parameters:North Facade>, Perimeter, Height, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax ')
8001 format('Building Convection Parameters:North Facade, ',A, ',' , A,',', A,',',A,',', A,',', A,',', A ,',',A)
8100 format('! <Building Convection Parameters:Northeast Facade>, Perimeter, Height, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax ')
8101 format('Building Convection Parameters:Northeast Facade, ',A, ',' , A,',', A,',',A,',', A,',', A,',', A ,',',A)
8200 format('! <Building Convection Parameters:East Facade>, Perimeter, Height, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax ')
8201 format('Building Convection Parameters:East Facade, ',A, ',' , A,',', A,',',A,',', A,',', A,',', A ,',',A)
8300 format('! <Building Convection Parameters:Southeast Facade>, Perimeter, Height, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax ')
8301 format('Building Convection Parameters:Southeast Facade, ',A, ',' , A,',', A,',',A,',', A,',', A,',', A ,',',A)
8400 format('! <Building Convection Parameters:South Facade>, Perimeter, Height, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax ')
8401 format('Building Convection Parameters:South Facade, ',A, ',' , A,',', A,',',A,',', A,',', A,',', A ,',',A)
8500 format('! <Building Convection Parameters:Southwest Facade>, Perimeter, Height, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax ')
8501 format('Building Convection Parameters:Southwest Facade, ',A, ',' , A,',', A,',',A,',', A,',', A,',', A ,',',A)
8600 format('! <Building Convection Parameters:West Facade>, Perimeter, Height, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax ')
8601 format('Building Convection Parameters:West Facade, ',A, ',' , A,',', A,',',A,',', A,',', A,',', A ,',',A)
8700 format('! <Building Convection Parameters:Northwest Facade>, Perimeter, Height, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax ')
8701 format('Building Convection Parameters:NorthwWest Facade, ',A, ',' , A,',', A,',',A,',', A,',', A,',', A ,',',A)
8800 format('! <Building Convection Parameters:Roof>, Area [m2], Perimeter [m], Height [m], ', &
'XdYdZd:X, XdYdZd:Y, XdYdZd:Z' , & ! 1 low x, low y, low z
',XdYdZu:X, XdYdZu:Y, XdYdZu:Z', & ! 2 low x, low y, hi z
',XdYuZd:X, XdYuZd:Y, XdYuZd:Z', & ! 3 low x, hi y, low z
',XdYuZu:X, XdYuZu:Y, XdYuZu:Z', & ! 4 low x, hi y, hi z
',XuYdZd:X, XuYdZd:Y, XuYdZd:Z', & ! 5 hi x, low y, low z
',XuYuZd:X, XuYuZd:Y, XuYuZd:Z', & ! 6 hi x, hi y, low z
',XuYdZu:X, XuYdZu:Y, XuYdZu:Z', & ! 7 hi x, low y, hi z
',XuYuZu:X, XuYuZu:Y, XuYuZu:Z' ) ! 8 hi x, hi y, hi z
8801 format('Building Convection Parameters:Roof,',A,',',A,',',A,',',A,',',A,',',A,',',A,',',A,',',A,',',A,',' )
88012 format(A,',',A,',',A,',',A,',',A,',',A,',',A,',',A,',',A,',',A,',' )
88013 format(A,',',A,',',A,',',A,',',A,',',A,',',A)
ConvectionGeometryMetaDataSetup = .TRUE.
RETURN
END SUBROUTINE SetupAdaptiveConvectionStaticMetaData