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 | ||
---|---|---|---|---|---|---|
logical, | intent(inout) | :: | ErrorsFound |
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 GetLightWellData(ErrorsFound)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Winkelmann
! DATE WRITTEN Apr 2004
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Gets data for a light well associated with a rectangular exterior window.
! Calculates light well efficiency, defined as the ratio of the amount of visible
! solar radiation leaving a well to the amount entering the well.
! METHODOLOGY EMPLOYED:
! Based on fit to Fig. 8-21, "Efficiency factors for various depths of light wells
! based on well-interreflectance values," Lighting Handbook, 8th Edition, Illuminating
! Engineering Society of North America, 1993.
! REFERENCES: see above.
! USE STATEMENTS:
USE DataIPShortCuts
USE InputProcessor, ONLY: GetNumObjectsFound, GetObjectItem, FindItemInList
USE General, ONLY: RoundSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
LOGICAL, INTENT(INOUT) :: ErrorsFound ! If errors found in input
! SUBROUTINE PARAMETER DEFINITIONS:na
! INTERFACE BLOCK SPECIFICATIONS:na
! DERIVED TYPE DEFINITIONS:na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: IOStat ! IO Status when calling get input subroutine
INTEGER :: NumAlpha ! Number of alpha names being passed
INTEGER :: NumProp ! Number of properties being passed
INTEGER :: TotLightWells ! Total Light Well objects
INTEGER :: Loop ! DO loop index
INTEGER :: SurfNum ! Surface number
LOGICAL :: WrongSurfaceType ! True if associated surface is not an exterior window
REAL(r64) :: HeightWell ! Well height (from window to bottom of well) (m)
REAL(r64) :: PerimWell ! Well perimeter (at bottom of well) (m)
REAL(r64) :: AreaWell ! Well area (at bottom of well) (m2)
REAL(r64) :: VisReflWell ! Area-weighted visible reflectance of well walls
REAL(r64) :: WellCavRatio ! Well cavity ratio
! Get the total number of Light Well objects
cCurrentModuleObject='DaylightingDevice:LightWell'
TotLightWells = GetNumObjectsFound(cCurrentModuleObject)
IF(TotLightWells == 0) RETURN
DO Loop = 1, TotLightWells
CALL GetObjectItem(cCurrentModuleObject,Loop,cAlphaArgs,NumAlpha,rNumericArgs,NumProp,IOSTAT, &
AlphaBlank=lAlphaFieldBlanks,NumBlank=lNumericFieldBlanks, &
AlphaFieldnames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
SurfNum = FindItemInList(cAlphaArgs(1),Surface%Name,TotSurfaces)
IF(SurfNum == 0) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//': invalid '//TRIM(cAlphaFieldNames(1))// &
'="'//TRIM(cAlphaArgs(1))//'" not found.')
END IF
! Check that associated surface is an exterior window
WrongSurfaceType = .FALSE.
IF(SurfNum /= 0) THEN
IF(Surface(SurfNum)%Class /= SurfaceClass_Window.AND. Surface(SurfNum)%ExtBoundCond /= ExternalEnvironment) &
WrongSurfaceType = .TRUE.
IF(WrongSurfaceType) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//': invalid '//TRIM(cAlphaFieldNames(1))// &
'="'//TRIM(cAlphaArgs(1))//'" - not an exterior window.')
ErrorsFound = .TRUE.
END IF
END IF
IF(.NOT.ErrorsFound) THEN
! Associated surface is an exterior window; calculate light well efficiency.
SurfaceWindow(SurfNum)%LightWellEff = 1.0d0
HeightWell = rNumericArgs(1)
PerimWell = rNumericArgs(2)
AreaWell = rNumericArgs(3)
VisReflWell = rNumericArgs(4)
! Warning if light well area is less than window area
IF(AreaWell < (Surface(SurfNum)%Area+SurfaceWindow(SurfNum)%DividerArea-0.1d0)) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//': invalid '//TRIM(cAlphaFieldNames(1))// &
'="'//TRIM(cAlphaArgs(1))//'" - Areas.')
CALL ShowContinueError('has Area of Bottom of Well='//TRIM(RoundSigDigits(Surface(SurfNum)%Area,1))// &
' that is less than window area='//TRIM(RoundSigDigits(AreaWell,1)))
END IF
IF(HeightWell >= 0.0d0 .AND. PerimWell > 0.0d0 .AND. AreaWell > 0.0d0) THEN
WellCavRatio = 2.5d0*HeightWell*PerimWell/AreaWell
SurfaceWindow(SurfNum)%LightWellEff = EXP(-WellCavRatio*(0.16368d0-0.14467d0*VisReflWell))
END IF
END IF
END DO ! End of loop over light well objects
RETURN
END SUBROUTINE GetLightWellData