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 SetupShadeSurfacesForSolarCalcs
! SUBROUTINE INFORMATION:
! AUTHOR B. Griffith
! DATE WRITTEN Dec. 2008
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! determine if Shading surfaces need full solar calcs because they
! are also used to define geometry of an active solar component.
! Normally, a shading surface is not included in calculations of incident solar, only shading
!
! METHODOLOGY EMPLOYED:
! Mine solar renewables input and collect surface names.
! find shading surfaces with names that match those in solar objects.
! setup flags for shading surfaces so that the solar renewables can resuse incident solar calcs
! new solar component models that use shading surfaces will have to extend the code here.
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: GetNumObjectsFound, GetObjectItem, FindItemInList, SameString
USE DataIPShortCuts
USE DataHeatBalance, ONLY:
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
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: TmpCandidateSurfaceNames
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: TmpCandidateICSSurfaceNames
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: TmpCandidateICSBCTypeNames
INTEGER :: NumCandidateNames
INTEGER :: NumOfCollectors
INTEGER :: NumOfICSUnits
INTEGER :: NumOfFlatPlateUnits
INTEGER :: NumPVTs
INTEGER :: NumPVs
INTEGER :: SurfNum
INTEGER :: found
INTEGER :: CollectorNum
INTEGER :: PVTNum
INTEGER :: PVNum
INTEGER :: NumAlphas ! Number of alpha names being passed
INTEGER :: NumNumbers ! Number of numeric parameters being passed
INTEGER :: IOStatus
!First collect names of surfaces referenced by active solar components
cCurrentModuleObject = 'SolarCollector:FlatPlate:Water'
NumOfFlatPlateUnits = GetNumObjectsFound(cCurrentModuleObject)
cCurrentModuleObject = 'SolarCollector:FlatPlate:PhotovoltaicThermal'
NumPVTs = GetNumObjectsFound(cCurrentModuleObject)
cCurrentModuleObject = 'Generator:Photovoltaic'
NumPVs = GetNumObjectsFound(cCurrentModuleObject )
cCurrentModuleObject = 'SolarCollector:IntegralCollectorStorage'
NumOfICSUnits = GetNumObjectsFound(cCurrentModuleObject)
NumCandidateNames = NumOfFlatPlateUnits + NumPVTs + NumPVs + NumOfICSUnits
NumOfCollectors = NumOfFlatPlateUnits + NumOfICSUnits
ALLOCATE(TmpCandidateSurfaceNames(NumCandidateNames), TmpCandidateICSSurfaceNames(NumOfCollectors), &
TmpCandidateICSBCTypeNames(NumOfCollectors))
IF (NumOfCollectors > 0) THEN
cCurrentModuleObject = 'SolarCollector:FlatPlate:Water'
DO CollectorNum = 1, NumOfFlatPlateUnits
CALL GetObjectItem(cCurrentModuleObject,CollectorNum,cAlphaArgs,NumAlphas,rNumericArgs,NumNumbers,IOStatus)
TmpCandidateSurfaceNames(CollectorNum) = cAlphaArgs(3)
TmpCandidateICSBCTypeNames(CollectorNum) = ' '
ENDDO
ENDIF
IF (NumPVTs > 0) THEN
cCurrentModuleObject = 'SolarCollector:FlatPlate:PhotovoltaicThermal'
DO PVTNum = 1, NumPVTs
CALL GetObjectItem(cCurrentModuleObject,PVTNum,cAlphaArgs,NumAlphas,rNumericArgs,NumNumbers,IOStatus)
TmpCandidateSurfaceNames(NumOfFlatPlateUnits + PVTNum) = cAlphaArgs(2)
ENDDO
ENDIF
IF (NumPVs > 0) THEN
cCurrentModuleObject = 'Generator:Photovoltaic'
DO PVNum = 1, NumPVs
CALL GetObjectItem(cCurrentModuleObject,PVNum,cAlphaArgs,NumAlphas,rNumericArgs,NumNumbers,IOStatus)
TmpCandidateSurfaceNames(NumOfFlatPlateUnits + NumPVTs + PVNum) = cAlphaArgs(2)
ENDDO
ENDIF
IF (NumOfICSUnits > 0) THEN
cCurrentModuleObject = 'SolarCollector:IntegralCollectorStorage'
DO CollectorNum = 1, NumOfICSUnits
CALL GetObjectItem(cCurrentModuleObject,CollectorNum,cAlphaArgs,NumAlphas,rNumericArgs,NumNumbers,IOStatus)
TmpCandidateSurfaceNames(NumOfFlatPlateUnits + NumPVTs + NumPVs + CollectorNum) = cAlphaArgs(3)
TmpCandidateICSSurfaceNames(NumOfFlatPlateUnits + CollectorNum) = cAlphaArgs(3)
TmpCandidateICSBCTypeNames(NumOfFlatPlateUnits + CollectorNum) = cAlphaArgs(4)
ENDDO
ENDIF
! loop through all the surfaces
Do SurfNum=1, TotSurfaces
Found = FindItemInList(Surface(SurfNum)%name, TmpCandidateSurfaceNames, NumCandidateNames)
IF (Found > 0) Then
IF (.NOT. Surface(SurfNum)%HeatTransSurf ) Then ! not BIPV, must be a shading surf with solar device
! Setup missing values to allow shading surfaces to model incident solar and wind
Surface(SurfNum)%ExtSolar = .TRUE.
Surface(SurfNum)%ExtWind = .TRUE.
Surface(SurfNum)%ViewFactorGround = 0.5d0 * (1.0d0 - Surface(SurfNum)%CosTilt)
ENDIF
! check if this surface is used for ICS collector mounting and has OthersideCondictionsModel as its
! boundary condition
IF (NumOfICSUnits > 0) Then
DO CollectorNum = 1, NumOfCollectors
IF ( SameString(Surface(SurfNum)%name, TmpCandidateICSSurfaceNames(CollectorNum)) .AND. &
SameString(TmpCandidateICSBCTypeNames(CollectorNum), 'OTHERSIDECONDITIONSMODEL') ) THEN
Surface(SurfNum)%IsICS = .TRUE.
Surface(SurfNum)%ICSPtr = CollectorNum
ENDIF
END DO
ENDIF
ENDIF ! end of IF (Found > 0) Then
ENDDO
DEALLOCATE(TmpCandidateSurfaceNames,TmpCandidateICSBCTypeNames,TmpCandidateICSSurfaceNames)
RETURN
END SUBROUTINE SetupShadeSurfacesForSolarCalcs