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.
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 CheckTDDsAndLightShelvesInDaylitZones
! SUBROUTINE INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN Dec 2007
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine checks daylighting input for TDDs and light shelfs
! which need to be checked after daylighting input has been read in (CR 7145)
! (eventually this should be changed once/if implementations change to decouple from daylighting calcs so that
! these devices can be used in models without daylighting controls
!
! CR 7145 was for TDDs, but also implenting check for light shelves, the other "daylighting device"
! METHODOLOGY EMPLOYED:
! loop thru daylighting devices and check that their zones have daylight controls
! REFERENCES:
! na
! USE STATEMENTS:
Use DataHeatBalance, ONLY: Zone
USE DataDaylighting, ONLY: ZoneDaylight, NoDaylighting
USE DataDaylightingDevices
USE General, ONLY: RoundSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: fmta="(A)"
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: PipeNum ! TDD pipe object number
INTEGER :: ShelfNum ! light shelf object number
INTEGER :: SurfNum ! daylight device surface number
LOGICAL :: ErrorsFound
LOGICAL,SAVE :: FirstTime=.true.
IF (FirstTime) THEN
ALLOCATE(CheckTDDZone(NumOfZones))
CheckTDDZone=.true.
FirstTime=.false.
ENDIF
ErrorsFound = .FALSE.
DO PipeNum = 1, NumOfTDDPipes
SurfNum = TDDPipe(PipeNum)%Diffuser
IF (SurfNum > 0) THEN
IF (ZoneDaylight(Surface(SurfNum)%zone)%DaylightType == NoDaylighting) THEN
CALL ShowSevereError('DaylightingDevice:Tubular = '//TRIM(TDDPipe(PipeNum)%Name)// &
': is not connected to a Zone that has Daylighting. ')
CALL ShowContinueError('Add Daylighting:Controls (or Daylighting:DELight:Controls) ' //&
'to Zone named: '//TRIM(Zone(Surface(SurfNum)%zone)%name) )
CALL ShowContinueError('A sufficient control is provided on the .dbg file.')
ErrorsFound = .TRUE.
IF (CheckTDDZone(Surface(SurfNum)%zone)) THEN
WRITE(OutputFileDebug,fmta) ' ! Following control is to allow tubular reporting in this Zone'
WRITE(OutputFileDebug,fmta) 'Daylighting:Controls, !- this control controls 0% of zone.'
WRITE(OutputFileDebug,fmta) ' '//trim(Zone(Surface(SurfNum)%zone)%name)//', !- Zone Name'
WRITE(OutputFileDebug,fmta) ' 1, !- Total Daylighting Reference Points'
IF (DaylRefWorldCoordSystem) THEN
! world coordinates, use zone origin for ref pt
WRITE(OutputFileDebug,fmta) ' '//trim(RoundSigDigits(Zone(Surface(SurfNum)%zone)%OriginX,2))// &
', !- X-Coordinate of First Reference Point {m}'
WRITE(OutputFileDebug,fmta) ' '//trim(RoundSigDigits(Zone(Surface(SurfNum)%zone)%OriginY,2))// &
', !- Y-Coordinate of First Reference Point {m}'
WRITE(OutputFileDebug,fmta) ' '//trim(RoundSigDigits(Zone(Surface(SurfNum)%zone)%OriginZ,2))// &
', !- Z-Coordinate of First Reference Point {m}'
ELSE
! relative coordinates, use 0,0,0 for ref pt
WRITE(OutputFileDebug,fmta) ' 0.0, !- X-Coordinate of First Reference Point {m}'
WRITE(OutputFileDebug,fmta) ' 0.0, !- Y-Coordinate of First Reference Point {m}'
WRITE(OutputFileDebug,fmta) ' 0.0, !- Z-Coordinate of First Reference Point {m}'
ENDIF
WRITE(OutputFileDebug,fmta) ' , !- X-Coordinate of Second Reference Point'
WRITE(OutputFileDebug,fmta) ' , !- Y-Coordinate of Second Reference Point'
WRITE(OutputFileDebug,fmta) ' , !- Z-Coordinate of Second Reference Point'
WRITE(OutputFileDebug,fmta) ' 0.0, !- Fraction of Zone Controlled by First Reference Point'
WRITE(OutputFileDebug,fmta) ' 0.0, !- Fraction of Zone Controlled by Second Reference Point'
WRITE(OutputFileDebug,fmta) ' 0.0, !- Illuminance Setpoint at First Reference Point'
WRITE(OutputFileDebug,fmta) ' 0.0, !- Illuminance Setpoint at Second Reference Point'
WRITE(OutputFileDebug,fmta) ' 3, !- Lighting Control Type'
WRITE(OutputFileDebug,fmta) ' 0.0, !- Glare Calculation Azimuth Angle of View Direction Clockwise from Zone y-Axis'
WRITE(OutputFileDebug,fmta) ' , !- Maximum Allowable Discomfort Glare Index'
WRITE(OutputFileDebug,fmta) ' 0.0, !- Minimum Input Power Fraction for Continuous Dimming Control'
WRITE(OutputFileDebug,fmta) ' 0.0, !- Minimum Light Output Fraction for Continuous Dimming Control'
WRITE(OutputFileDebug,fmta) ' 0, !- Number of Stepped Control Steps'
WRITE(OutputFileDebug,fmta) ' 0.0; !- Probability Lighting will be Reset When Needed in Manual Stepped Control'
CheckTDDZone(Surface(SurfNum)%zone)=.false.
ENDIF
ENDIF
ELSE ! surfNum == 0
! should not come here (would have already been caught in TDD get input), but is an error
CALL ShowSevereError('DaylightingDevice:Tubular = '//TRIM(TDDPipe(PipeNum)%Name)// &
': Diffuser surface not found ')
ErrorsFound = .TRUE.
ENDIF
END DO ! PipeNum
DO ShelfNum = 1, NumOfShelf
SurfNum = Shelf(ShelfNum)%Window
! IF (SurfNum > 0) THEN
! IF (ZoneDaylight(Surface(SurfNum)%zone)%DaylightType == NoDaylighting) THEN
! CALL ShowSevereError('DaylightingDevice:Shelf = '//TRIM(Shelf(ShelfNum)%Name)// &
! ': is not connected to a Zone that has Daylighting. ')
! CALL ShowContinueError('Add Daylighting:Controls (or Daylighting:DELight:Controls) ' //&
! 'to Zone named: '//TRIM(Zone(Surface(SurfNum)%zone)%name) )
! ErrorsFound = .TRUE.
! ENDIF
!
! ELSE ! surfNum == 0
IF (SurfNum == 0) THEN
! should not come here (would have already been caught in shelf get input), but is an error
CALL ShowSevereError('DaylightingDevice:Shelf = '//TRIM(Shelf(ShelfNum)%Name)// &
': window not found ')
ErrorsFound = .TRUE.
ENDIF
END DO ! ShelfNum
IF (ErrorsFound) CALL ShowFatalError('CheckTDDsAndLightShelvesInDaylitZones: Errors in DAYLIGHTING input.')
END SUBROUTINE CheckTDDsAndLightShelvesInDaylitZones