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 GetZoneAirDistribution
! SUBROUTINE INFORMATION:
! AUTHOR T. Hong - LBNL
! DATE WRITTEN March 2012
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Obtains input data for the zone air distribution objects and stores it in
! appropriate data structure.
! METHODOLOGY EMPLOYED:
! Uses InputProcessor "Get" routines to obtain data.
! This object requires only a name where the default values are assumed
! if subsequent fields are not entered.
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: GetNumObjectsFound, GetObjectDefMaxArgs, GetObjectItem, VerifyName, SameString
USE ScheduleManager, ONLY: GetScheduleIndex, CheckScheduleValueMinMax
USE DataIPShortCuts
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName='GetZoneAirDistribution: ' ! include trailing blank space
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: NumAlphas ! Number of Alphas for each GetObjectItem call
INTEGER :: NumNumbers ! Number of Numbers for each GetObjectItem call
INTEGER :: TotalArgs ! Total number of alpha and numeric arguments (max) for a
INTEGER :: IOStatus ! Used in GetObjectItem
INTEGER :: ZADIndex
LOGICAL :: ErrorsFound = .false. ! If errors detected in input
LOGICAL :: IsNotOK ! Flag to verify name
LOGICAL :: IsBlank ! Flag for blank name
CHARACTER(Len=MaxNameLength) :: CurrentModuleObject ! for ease in getting objects
CHARACTER(Len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: Alphas ! Alpha input items for object
CHARACTER(Len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cAlphaFields ! Alpha field names
CHARACTER(Len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cNumericFields ! Numeric field names
REAL(r64), ALLOCATABLE, DIMENSION(:) :: Numbers ! Numeric input items for object
LOGICAL, ALLOCATABLE, DIMENSION(:) :: lAlphaBlanks ! Logical array, alpha field input BLANK = .true.
LOGICAL, ALLOCATABLE, DIMENSION(:) :: lNumericBlanks ! Logical array, numeric field input BLANK = .true.
CurrentModuleObject='DesignSpecification:ZoneAirDistribution'
NumZoneAirDistribution = GetNumObjectsFound(CurrentModuleObject)
CALL GetObjectDefMaxArgs(CurrentModuleObject,TotalArgs,NumAlphas,NumNumbers)
ALLOCATE(Alphas(NumAlphas))
Alphas=' '
ALLOCATE(cAlphaFields(NumAlphas))
cAlphaFields=' '
ALLOCATE(cNumericFields(NumNumbers))
cNumericFields=' '
ALLOCATE(Numbers(NumNumbers))
Numbers=0.0d0
ALLOCATE(lAlphaBlanks(NumAlphas))
lAlphaBlanks=.true.
ALLOCATE(lNumericBlanks(NumNumbers))
lNumericBlanks=.true.
IF (NumZoneAirDistribution .GT. 0) THEN
ALLOCATE(ZoneAirDistribution(NumZoneAirDistribution))
!Start Loading the zone air distribution input
DO ZADIndex = 1, NumZoneAirDistribution
CALL GetObjectItem(CurrentModuleObject,ZADIndex,Alphas,NumAlphas,Numbers,NumNumbers,IOStatus, &
AlphaBlank=lAlphaBlanks,NumBlank=lNumericBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields)
CALL VerifyName(Alphas(1),ZoneAirDistribution%Name,ZADIndex-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
IF (IsBlank) Alphas(1)='xxxxx'
ENDIF
ZoneAirDistribution(ZADIndex)%Name = Alphas(1)
! Zone Air Distribution Effectiveness in Cooling Mode
IF(NumNumbers .GT. 0)THEN
ZoneAirDistribution(ZADIndex)%ZoneADEffCooling = Numbers(1)
ELSE
! default value
ZoneAirDistribution(ZADIndex)%ZoneADEffCooling = 1.0d0
END IF
! Zone Air Distribution Effectiveness in Heating Mode
IF(NumNumbers .GT. 1)THEN
ZoneAirDistribution(ZADIndex)%ZoneADEffHeating = Numbers(2)
ELSE
! default value
ZoneAirDistribution(ZADIndex)%ZoneADEffHeating = 1.0d0
END IF
! Zone Secondary Recirculation Fraction
IF(NumNumbers .GT. 2)THEN
ZoneAirDistribution(ZADIndex)%ZoneSecondaryRecirculation = Numbers(3)
ELSE
! default value
ZoneAirDistribution(ZADIndex)%ZoneSecondaryRecirculation = 0.0d0
END IF
IF(NumAlphas .GT. 1)THEN
IF(.NOT. lAlphaBlanks(2))THEN
ZoneAirDistribution(ZADIndex)%ZoneADEffSchName = Alphas(2)
ZoneAirDistribution(ZADIndex)%ZoneADEffSchPtr = GetScheduleIndex(Alphas(2))
IF(ZoneAirDistribution(ZADIndex)%ZoneADEffSchPtr .GT. 0) THEN
IF (.NOT.CheckScheduleValueMinMax(ZoneAirDistribution(ZADIndex)%ZoneADEffSchPtr,'>',0.0D0)) THEN
CAll ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(ZoneAirDistribution(ZADIndex)%Name)//'",')
CALL ShowContinueError('Error found in '//TRIM(cAlphaFields(2))//' = '//TRIM(Alphas(2)) )
CALL ShowContinueError('Schedule values must be >0.0)')
ErrorsFound=.true.
END IF
ELSE
CAll ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(ZoneAirDistribution(ZADIndex)%Name)//'",')
CALL ShowContinueError('...Not Found '//TRIM(cAlphaFields(2))//'="'//TRIM(Alphas(2))//'".')
ErrorsFound=.TRUE.
END IF
END IF
END IF
END DO
DEALLOCATE(Alphas)
DEALLOCATE(cAlphaFields)
DEALLOCATE(cNumericFields)
DEALLOCATE(Numbers)
DEALLOCATE(lAlphaBlanks)
DEALLOCATE(lNumericBlanks)
IF (ErrorsFound) THEN
CALL ShowFatalError(RoutineName//'Errors found in input. Preceding condition(s) cause termination.')
ENDIF
ENDIF
RETURN
END SUBROUTINE GetZoneAirDistribution