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 | ||
---|---|---|---|---|---|---|
character(len=MaxNameLength) | :: | CurrentModuleObject | ||||
integer, | intent(in) | :: | NumSchemes | |||
integer, | intent(in) | :: | LoopNum | |||
integer, | intent(in) | :: | SchemeNum | |||
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 FindDeltaTempRangeInput(CurrentModuleObject,NumSchemes,LoopNum,SchemeNum,ErrorsFound)
! SUBROUTINE INFORMATION:
! AUTHOR Chandan Sharma
! DATE WRITTEN August 2010
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Load range based input into PLANTLOOP data structure
! METHODOLOGY EMPLOYED:
! calls the Input Processor to retrieve data from input file.
! The format of the Energy+.idd (the EnergyPlus input data dictionary) for the
! following keywords is reflected exactly in this subroutine:
! PlantEquipmentOperation:OutdoorDryBulbDifference
! PlantEquipmentOperation:OutdoorWetBulbDifference
! PlantEquipmentOperation:OutdoorDewPointDifference
! REFERENCES:
! Based on subroutine FindRangeBasedOrUncontrolledInput from Dan Fisher, July 2010
! USE STATEMENTS:
USE InputProcessor, ONLY: GetObjectItem, SameString, GetObjectDefMaxArgs
USE NodeInputManager, ONLY: GetOnlySingleNode
USE DataLoopNode
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS:
LOGICAL, INTENT(INOUT) :: ErrorsFound ! May be set here and passed on
INTEGER, INTENT(IN) :: LoopNum ! May be set here and passed on
INTEGER, INTENT(IN) :: SchemeNum ! May be set here and passed on
INTEGER, INTENT(IN) :: NumSchemes ! May be set here and passed on
CHARACTER(len=MaxNameLength) :: CurrentModuleObject ! for ease in renaming
! SUBROUTINE PARAMETER DEFINITIONS:
INTEGER, PARAMETER :: Plant = 1 ! Used to identify whether the current loop is Plant
INTEGER, PARAMETER :: Condenser = 2 ! Used to identify whether the current loop is Condenser
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: NumAlphas
INTEGER :: NumNums
INTEGER :: IOSTAT
CHARACTER(Len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: AlphArray ! 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(:) :: NumArray ! 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.
INTEGER :: TotalArgs=0 ! Total number of alpha and numeric arguments (max) for a
! certain object in the input file
INTEGER :: Num
INTEGER :: NumEquipLists
INTEGER :: ListNum
CHARACTER(len=MaxNameLength) :: LoopOpSchemeObj ! Used to identify the object name for loop equipment operation scheme
LOGICAL :: SchemeNameFound ! Set to FALSE if a match of OpScheme object and OpScheme name is not found
SchemeNameFound = .TRUE.
! Determine max number of alpha and numeric arguments for all objects being read, in order to allocate local arrays
CALL GetObjectDefMaxArgs(CurrentModuleObject,TotalArgs,NumAlphas,NumNums)
ALLOCATE(AlphArray(NumAlphas))
AlphArray=' '
ALLOCATE(cAlphaFields(NumAlphas))
cAlphaFields=' '
ALLOCATE(cNumericFields(NumNums))
cNumericFields=' '
ALLOCATE(NumArray(NumNums))
NumArray=0.0d0
ALLOCATE(lAlphaBlanks(NumAlphas))
lAlphaBlanks=.TRUE.
ALLOCATE(lNumericBlanks(NumNums))
lNumericBlanks=.TRUE.
IF (PlantLoop(LoopNum)%TypeofLoop == Plant) THEN
LoopOpSchemeObj = 'PlantEquipmentOperationSchemes'
ELSEIF (PlantLoop(LoopNum)%TypeofLoop == Condenser) THEN
LoopOpSchemeObj = 'CondenserEquipmentOperationSchemes'
ENDIF
IF (NumSchemes .GT. 0) THEN
DO Num = 1, NumSchemes
CALL GetObjectItem(CurrentModuleObject,Num, &
AlphArray,NumAlphas,NumArray,NumNums,IOSTAT)
IF(SameString(PlantLoop(LoopNum)%OpScheme(SchemeNum)%Name,AlphArray(1))) EXIT
IF (Num == NumSchemes) THEN
CALL ShowSevereError(TRIM(LoopOpSchemeObj)//' = "'//TRIM(PlantLoop(LoopNum)%OperationScheme)// &
'", could not find '// &
TRIM(CurrentModuleObject)//' = "'//TRIM(PlantLoop(LoopNum)%OpScheme(SchemeNum)%Name)//'".')
ErrorsFound = .true.
SchemeNameFound = .FALSE.
ENDIF
ENDDO
IF (SchemeNameFound) THEN
PlantLoop(LoopNum)%OpScheme(SchemeNum)%NumEquipLists = (NumAlphas-2)
IF (PlantLoop(LoopNum)%OpScheme(SchemeNum)%NumEquipLists <= 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = "'//TRIM(AlphArray(1))// &
'", specified without equipment list.')
ErrorsFound = .true.
ELSE
ALLOCATE (PlantLoop(LoopNum)%OpScheme(SchemeNum)%EquipList &
(PlantLoop(LoopNum)%OpScheme(SchemeNum)%NumEquipLists))
NumEquipLists=PlantLoop(LoopNum)%OpScheme(SchemeNum)%NumEquipLists
PlantLoop(LoopNum)%OpScheme(SchemeNum)%ReferenceNodeName = AlphArray(2)
PlantLoop(LoopNum)%OpScheme(SchemeNum)%ReferenceNodeNumber = &
GetOnlySingleNode(AlphArray(2),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1), &
NodeType_Water,NodeConnectionType_Sensor, 1, ObjectIsNotParent)
!For DO Loop below -- Check for lower limit > upper limit.(invalid)
DO ListNum = 1, NumEquipLists
PlantLoop(LoopNum)%OpScheme(SchemeNum)%EquipList(ListNum)%RangeLowerLimit = NumArray(ListNum*2-1)
PlantLoop(LoopNum)%OpScheme(SchemeNum)%EquipList(ListNum)%RangeUpperLimit = NumArray(ListNum*2)
PlantLoop(LoopNum)%OpScheme(SchemeNum)%EquipList(ListNum)%name= AlphArray(ListNum+2)
IF (PlantLoop(LoopNum)%OpScheme(SchemeNum)%EquipList(ListNum)%RangeLowerLimit > &
PlantLoop(LoopNum)%OpScheme(SchemeNum)%EquipList(ListNum)%RangeUpperLimit ) THEN
CALL ShowSevereError(TRIM(LoopOpSchemeObj)//' = "'//TRIM(PlantLoop(LoopNum)%OperationScheme)// &
'", found a lower limit that is higher than an upper limit in '// &
TRIM(CurrentModuleObject)//' = "'//TRIM(PlantLoop(LoopNum)%OpScheme(SchemeNum)%Name)//'".')
ErrorsFound=.true.
ENDIF
CALL LoadEquipList(LoopNum,SchemeNum,ListNum,ErrorsFound)
END DO
ENDIF
ENDIF
ELSE
CALL ShowSevereError(TRIM(LoopOpSchemeObj)//' = "'//TRIM(PlantLoop(LoopNum)%OperationScheme)// &
'", could not find '// &
TRIM(CurrentModuleObject)//' = "'//TRIM(PlantLoop(LoopNum)%OpScheme(SchemeNum)%Name)//'".')
ErrorsFound = .true.
ENDIF
DEALLOCATE(AlphArray)
DEALLOCATE(cAlphaFields)
DEALLOCATE(cNumericFields)
DEALLOCATE(NumArray)
DEALLOCATE(lAlphaBlanks)
DEALLOCATE(lNumericBlanks)
RETURN
END SUBROUTINE FindDeltaTempRangeInput