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(inout) | :: | 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.
SUBROUTINE MakeMirrorSurface(SurfNum)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN June 2002
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine creates a "mirror" surface using the indicated surface.
! This is the simple approach for bi-directional shading devices. If, perchance,
! the user has already taken care of this (e.g. fins in middle of wall), there will
! be extra shading devices shown.
! METHODOLOGY EMPLOYED:
! Reverse the vertices in the original surface. Add "bi" to name.
! REFERENCES:
! na
! USE STATEMENTS:
USE Vectors
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(INOUT) :: SurfNum ! In=>Surface to Mirror, Out=>new Surface index
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER Vert
INTEGER NVert
REAL(r64) SurfWorldAz
REAL(r64) SurfTilt
INTEGER N
! TYPE (Vector) :: temp1
NVert=SurfaceTmp(SurfNum)%Sides
ALLOCATE(SurfaceTmp(SurfNum+1)%Vertex(NVert))
! doesn't work when Vertex are pointers SurfaceTmp(SurfNum+1)=SurfaceTmp(SurfNum)
SurfaceTmp(SurfNum+1)%Name=SurfaceTmp(SurfNum)%Name
SurfaceTmp(SurfNum+1)%Construction=SurfaceTmp(SurfNum)%Construction
SurfaceTmp(SurfNum+1)%ConstructionStoredInputValue=SurfaceTmp(SurfNum)%ConstructionStoredInputValue
SurfaceTmp(SurfNum+1)%Class=SurfaceTmp(SurfNum)%Class
SurfaceTmp(SurfNum+1)%GrossArea=SurfaceTmp(SurfNum)%GrossArea
SurfaceTmp(SurfNum+1)%Area=SurfaceTmp(SurfNum)%Area
SurfaceTmp(SurfNum+1)%Azimuth=SurfaceTmp(SurfNum)%Azimuth
SurfaceTmp(SurfNum+1)%Height=SurfaceTmp(SurfNum)%Height
SurfaceTmp(SurfNum+1)%Reveal=SurfaceTmp(SurfNum)%Reveal
SurfaceTmp(SurfNum+1)%Shape=SurfaceTmp(SurfNum)%Shape
SurfaceTmp(SurfNum+1)%Sides=SurfaceTmp(SurfNum)%Sides
SurfaceTmp(SurfNum+1)%Tilt=SurfaceTmp(SurfNum)%Tilt
SurfaceTmp(SurfNum+1)%Width=SurfaceTmp(SurfNum)%Width
SurfaceTmp(SurfNum+1)%HeatTransSurf=SurfaceTmp(SurfNum)%HeatTransSurf
SurfaceTmp(SurfNum+1)%BaseSurfName=SurfaceTmp(SurfNum)%BaseSurfName
SurfaceTmp(SurfNum+1)%BaseSurf=SurfaceTmp(SurfNum)%BaseSurf
SurfaceTmp(SurfNum+1)%ZoneName=SurfaceTmp(SurfNum)%ZoneName
SurfaceTmp(SurfNum+1)%Zone=SurfaceTmp(SurfNum)%Zone
SurfaceTmp(SurfNum+1)%ExtBoundCondName=SurfaceTmp(SurfNum)%ExtBoundCondName
SurfaceTmp(SurfNum+1)%ExtBoundCond=SurfaceTmp(SurfNum)%ExtBoundCond
SurfaceTmp(SurfNum+1)%ExtSolar=SurfaceTmp(SurfNum)%ExtSolar
SurfaceTmp(SurfNum+1)%ExtWind=SurfaceTmp(SurfNum)%ExtWind
SurfaceTmp(SurfNum+1)%ViewFactorGround=SurfaceTmp(SurfNum)%ViewFactorGround
SurfaceTmp(SurfNum+1)%ViewFactorSky=SurfaceTmp(SurfNum)%ViewFactorSky
SurfaceTmp(SurfNum+1)%ViewFactorGroundIR=SurfaceTmp(SurfNum)%ViewFactorGroundIR
SurfaceTmp(SurfNum+1)%ViewFactorSkyIR=SurfaceTmp(SurfNum)%ViewFactorSkyIR
SurfaceTmp(SurfNum+1)%SchedShadowSurfIndex=SurfaceTmp(SurfNum)%SchedShadowSurfIndex
SurfaceTmp(SurfNum+1)%ShadowSurfSchedVaries=SurfaceTmp(SurfNum)%ShadowSurfSchedVaries
SurfaceTmp(SurfNum+1)%SchedMinValue=SurfaceTmp(SurfNum)%SchedMinValue
SurfaceTmp(SurfNum+1)%IsTransparent=SurfaceTmp(SurfNum)%IsTransparent
SurfaceTmp(SurfNum+1)%ShadowingSurf=SurfaceTmp(SurfNum)%ShadowingSurf
SurfaceTmp(SurfNum+1)%MaterialMovInsulExt=SurfaceTmp(SurfNum)%MaterialMovInsulExt
SurfaceTmp(SurfNum+1)%MaterialMovInsulInt=SurfaceTmp(SurfNum)%MaterialMovInsulInt
SurfaceTmp(SurfNum+1)%SchedMovInsulExt=SurfaceTmp(SurfNum)%SchedMovInsulExt
SurfaceTmp(SurfNum+1)%SchedMovInsulInt=SurfaceTmp(SurfNum)%SchedMovInsulInt
SurfaceTmp(SurfNum+1)%WindowShadingControlPtr=SurfaceTmp(SurfNum)%WindowShadingControlPtr
SurfaceTmp(SurfNum+1)%ShadedConstruction=SurfaceTmp(SurfNum)%ShadedConstruction
SurfaceTmp(SurfNum+1)%FrameDivider=SurfaceTmp(SurfNum)%FrameDivider
SurfaceTmp(SurfNum+1)%Multiplier=SurfaceTmp(SurfNum)%Multiplier
SurfaceTmp(SurfNum+1)%NetAreaShadowCalc=SurfaceTmp(SurfNum)%NetAreaShadowCalc
SurfaceTmp(SurfNum+1)%Perimeter=SurfaceTmp(SurfNum)%Perimeter
DO Vert=1,SurfaceTmp(SurfNum)%Sides
SurfaceTmp(SurfNum+1)%Vertex(Vert)=SurfaceTmp(SurfNum)%Vertex(NVert)
NVert=NVert-1
ENDDO
SurfNum=SurfNum+1
SurfaceTmp(SurfNum)%Name='Mir-'//TRIM(SurfaceTmp(SurfNum-1)%Name)
! TH 3/26/2010
SurfaceTmp(SurfNum)%MirroredSurf = .TRUE.
IF (SurfaceTmp(SurfNum)%Sides > 2) THEN
CALL CreateNewellAreaVector(SurfaceTmp(SurfNum)%Vertex,SurfaceTmp(SurfNum)%Sides,SurfaceTmp(surfnum)%NewellAreaVector)
SurfaceTmp(SurfNum)%GrossArea=VecLength(SurfaceTmp(surfnum)%NewellAreaVector)
SurfaceTmp(SurfNum)%Area=SurfaceTmp(SurfNum)%GrossArea
SurfaceTmp(SurfNum)%NetAreaShadowCalc = SurfaceTmp(SurfNum)%Area
CALL CreateNewellSurfaceNormalVector(SurfaceTmp(SurfNum)%Vertex,SurfaceTmp(SurfNum)%Sides, &
SurfaceTmp(surfnum)%NewellSurfaceNormalVector)
CALL DetermineAzimuthAndTilt(SurfaceTmp(SurfNum)%Vertex,SurfaceTmp(SurfNum)%Sides,SurfWorldAz,SurfTilt, &
SurfaceTmp(SurfNum)%lcsx,SurfaceTmp(SurfNum)%lcsy,SurfaceTmp(SurfNum)%lcsz, &
SurfaceTmp(SurfNum)%GrossArea,SurfaceTmp(SurfNum)%NewellSurfaceNormalVector)
SurfaceTmp(SurfNum)%Azimuth=SurfWorldAz
SurfaceTmp(SurfNum)%Tilt=SurfTilt
! Sine and cosine of azimuth and tilt
SurfaceTmp(SurfNum)%SinAzim = SIN(SurfWorldAz*DegToRadians)
SurfaceTmp(SurfNum)%CosAzim = COS(SurfWorldAz*DegToRadians)
SurfaceTmp(SurfNum)%SinTilt = SIN(SurfTilt*DegToRadians)
SurfaceTmp(SurfNum)%CosTilt = COS(SurfTilt*DegToRadians)
! Outward normal unit vector (pointing away from room)
SurfaceTmp(SurfNum)%OutNormVec = SurfaceTmp(SurfNum)%NewellSurfaceNormalVector
DO N=1,3
IF (ABS(SurfaceTmp(SurfNum)%OutNormVec(N)-1.0d0) < 1.d-06) SurfaceTmp(SurfNum)%OutNormVec(N) = +1.0d0
IF (ABS(SurfaceTmp(SurfNum)%OutNormVec(N)+1.0d0) < 1.d-06) SurfaceTmp(SurfNum)%OutNormVec(N) = -1.0d0
IF (ABS(SurfaceTmp(SurfNum)%OutNormVec(N)) < 1.d-06) SurfaceTmp(SurfNum)%OutNormVec(N) = 0.0d0
ENDDO
! Can perform tests on this surface here
SurfaceTmp(SurfNum)%ViewFactorSky=0.5d0*(1.d0+SurfaceTmp(SurfNum)%CosTilt)
! The following IR view factors are modified in subr. SkyDifSolarShading if there are shadowing
! surfaces
SurfaceTmp(SurfNum)%ViewFactorSkyIR = SurfaceTmp(SurfNum)%ViewFactorSky
SurfaceTmp(SurfNum)%ViewFactorGroundIR = 0.5d0*(1.d0-SurfaceTmp(SurfNum)%CosTilt)
ENDIF
RETURN
END SUBROUTINE MakeMirrorSurface