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 VerifySetPointManagers(ErrorsFound)
! SUBROUTINE INFORMATION:
! AUTHOR Richard Raustad, FSEC
! DATE WRITTEN July 2008
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE
! Check the SetPointManager data to eliminate conflicts.
! METHODOLOGY EMPLOYED:
! 1) Check for duplicate names in individual setpoint managers.
!
! Control nodes = A B C D
! Check A with B, C, and D
! Check B with C and D
! Check C with D
!
! 2) Check for duplicate names in all other setpoint managers
! Verify setpoint managers use same control type (e.g. TEMP) and then check for duplicate nodes
!
! SPM 1 - Control nodes A - D, SPM 2 - Control nodes E - H, SPM 3 - Control nodes I - L
! If SPM 1 has same control type as SPM 2 and SPM 3 (e.g. all use SPM%CtrlTypeMode = iCtrlVarType_Temp) then:
! Check A with E-H and I-L
! Check B with E-H and I-L
! Check C with E-H and I-L
! Check D with E-H and I-L
!
! Then check SPM 2 nodes with SPM 3. Check E with I-L, F with I-L, etc.
!
! 3) For SET POINT MANAGER:RETURN AIR BYPASS FLOW
! check for duplicate air loop names.
!
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: SameString
IMPLICIT NONE
! SUBROUTINE PARAMETER DEFINITIONS:
LOGICAL, INTENT(INOUT) :: ErrorsFound ! flag to denote node conflicts in input. !unused1208
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: SetPtMgrNum ! Setpoint Manager index
INTEGER :: TempSetPtMgrNum ! Setpoint Manager index for warning messages
INTEGER :: CtrldNodeNum ! index of the items in the controlled node node list
INTEGER :: TempCtrldNodeNum ! index of the items in the controlled node node list, used for warning messages
DO SetPtMgrNum = 1, NumAllSetPtMgrs
! check for duplicate nodes in each setpoint managers control node list (node lists of size 1 do not need verification)
! issue warning only since duplicate node names within a setpoint manager does not cause a conflict (i.e., same
! value written to node) but may indicate an error in the node name.
DO CtrldNodeNum = 1, AllSetPtMgr(SetPtMgrNum)%NumCtrlNodes - 1
DO TempCtrldNodeNum = CtrldNodeNum+1, AllSetPtMgr(SetPtMgrNum)%NumCtrlNodes
IF(AllSetPtMgr(SetPtMgrNum)%CtrlNodes(CtrldNodeNum) /= AllSetPtMgr(SetPtMgrNum)%CtrlNodes(TempCtrldNodeNum))CYCLE
CALL ShowWarningError(TRIM(cValidSPMTypes(AllSetPtMgr(SetPtMgrNum)%SPMType))//'="'//TRIM(AllSetPtMgr(SetPtMgrNum)%Name)//'"')
CALL ShowContinueError('...duplicate node specified = '//TRIM(NodeID(AllSetPtMgr(SetPtMgrNum)%CtrlNodes(CtrldNodeNum))))
CALL ShowContinueError('...control type variable = '//TRIM(cValidCtrlTypes(AllSetPtMgr(SetPtMgrNum)%CtrlTypeMode)))
END DO
END DO
! check for node conflicts in all other setpoint managers
DO TempSetPtMgrNum = SetPtMgrNum+1, NumAllSetPtMgrs
! check the air loop name in addition to the node names for these SP manager types
! IF((AllSetPtMgr(SetPtMgrNum)%SPMType == iSPMType_WarmestTempFlow .AND. &
! AllSetPtMgr(TempSetPtMgrNum)%SPMType == iSPMType_WarmestTempFlow) .OR. &
! (AllSetPtMgr(SetPtMgrNum)%SPMType == iSPMType_RAB .AND. &
! AllSetPtMgr(TempSetPtMgrNum)%SPMType == iSPMType_RAB) .OR. &
! (AllSetPtMgr(SetPtMgrNum)%SPMType == iSPMType_Coldest .AND. &
! AllSetPtMgr(TempSetPtMgrNum)%SPMType == iSPMType_Coldest) .OR. &
! (AllSetPtMgr(SetPtMgrNum)%SPMType == iSPMType_Warmest .AND. &
! AllSetPtMgr(TempSetPtMgrNum)%SPMType == iSPMType_Warmest))THEN
IF((AllSetPtMgr(SetPtMgrNum)%SPMType == iSPMType_RAB .AND. &
AllSetPtMgr(TempSetPtMgrNum)%SPMType == iSPMType_RAB))THEN
! check the air loop name for duplicates in this SP manager type
IF(ALLSetPtMgr(SetPtMgrNum)%AirLoopNum == AllSetPtMgr(TempSetPtMgrNum)%AirLoopNum)THEN
CALL ShowWarningError(TRIM(cValidSPMTypes(AllSetPtMgr(SetPtMgrNum)%SPMType))//'="'// &
TRIM(AllSetPtMgr(SetPtMgrNum)%Name)//'"')
CALL ShowContinueError('...air loop name conflicts with another setpoint manager.')
CALL ShowContinueError('...conflicting setpoint manager = '// &
TRIM(cValidSPMTypes(AllSetPtMgr(TempSetPtMgrNum)%SPMType))//' "'// &
TRIM(AllSetPtMgr(TempSetPtMgrNum)%Name)//'"')
CALL ShowContinueError('...conflicting air loop name = '// &
TRIM(AllSetPtMgr(SetPtMgrNum)%AirLoopName))
! ErrorsFound=.TRUE.
END IF
! check for duplicate control nodes
IF(AllSetPtMgr(SetPtMgrNum)%CtrlTypeMode /= AllSetPtMgr(TempSetPtMgrNum)%CtrlTypeMode)CYCLE
DO CtrldNodeNum = 1, AllSetPtMgr(SetPtMgrNum)%NumCtrlNodes
DO TempCtrldNodeNum = 1, AllSetPtMgr(TempSetPtMgrNum)%NumCtrlNodes
IF((AllSetPtMgr(SetPtMgrNum)%CtrlNodes(CtrldNodeNum) == &
AllSetPtMgr(TempSetPtMgrNum)%CtrlNodes(TempCtrldNodeNum)) .AND. &
AllSetPtMgr(SetPtMgrNum)%CtrlNodes(CtrldNodeNum) .NE. 0)THEN
CALL ShowWarningError(TRIM(cValidSPMTypes(AllSetPtMgr(SetPtMgrNum)%SPMType))//'="'// &
TRIM(AllSetPtMgr(SetPtMgrNum)%Name)//'"')
CALL ShowContinueError('...setpoint node conflicts with another setpoint manager.')
CALL ShowContinueError('...conflicting setpoint manager = '// &
TRIM(cValidSPMTypes(AllSetPtMgr(TempSetPtMgrNum)%SPMType))//' "'// &
TRIM(AllSetPtMgr(TempSetPtMgrNum)%Name)//'"')
CALL ShowContinueError('...conflicting node name = '// &
TRIM(NodeID(AllSetPtMgr(SetPtMgrNum)%CtrlNodes(CtrldNodeNum))))
CALL ShowContinueError('...control type variable = '//TRIM(cValidCtrlTypes(AllSetPtMgr(SetPtMgrNum)%CtrlTypeMode)))
! ErrorsFound=.TRUE.
END IF
END DO
END DO
ELSE ! not a RAB setpoint manager
! check just the control nodes for other types of SP managers
IF(AllSetPtMgr(SetPtMgrNum)%CtrlTypeMode /= AllSetPtMgr(TempSetPtMgrNum)%CtrlTypeMode)CYCLE
DO CtrldNodeNum = 1, AllSetPtMgr(SetPtMgrNum)%NumCtrlNodes
DO TempCtrldNodeNum = 1, AllSetPtMgr(TempSetPtMgrNum)%NumCtrlNodes
IF(AllSetPtMgr(SetPtMgrNum)%CtrlNodes(CtrldNodeNum) /= &
AllSetPtMgr(TempSetPtMgrNum)%CtrlNodes(TempCtrldNodeNum))CYCLE
! only warn if scheduled setpoint manager is setting mass flow rate on the same node used by RAB
IF(AllSetPtMgr(SetPtMgrNum)%SPMType == iSPMType_RAB .OR. AllSetPtMgr(TempSetPtMgrNum)%SPMType == iSPMType_RAB)THEN
CALL ShowWarningError(TRIM(cValidSPMTypes(AllSetPtMgr(SetPtMgrNum)%SPMType))//'="'// &
TRIM(AllSetPtMgr(SetPtMgrNum)%Name)//'"')
CALL ShowContinueError('...setpoint node conflicts with another setpoint manager.')
CALL ShowContinueError('...conflicting setpoint manager ='// &
TRIM(cValidSPMTypes(AllSetPtMgr(TempSetPtMgrNum)%SPMType))//':"'// &
TRIM(AllSetPtMgr(TempSetPtMgrNum)%Name)//'"')
CALL ShowContinueError('...conflicting node name = '//TRIM(NodeID(AllSetPtMgr(SetPtMgrNum)%CtrlNodes(CtrldNodeNum))))
CALL ShowContinueError('...control type variable = '//TRIM(cValidCtrlTypes(AllSetPtMgr(SetPtMgrNum)%CtrlTypeMode)))
CALL ShowContinueError('...return air bypass flow setpoint manager will have priority setting mass flow rate'// &
' on this node.')
ELSE ! severe error for other SP manager types
CALL ShowWarningError(TRIM(cValidSPMTypes(AllSetPtMgr(SetPtMgrNum)%SPMType))//'="'// &
TRIM(AllSetPtMgr(SetPtMgrNum)%Name)//'"')
CALL ShowContinueError('...setpoint node conflicts with another setpoint manager.')
CALL ShowContinueError('...conflicting setpoint manager = '// &
TRIM(cValidSPMTypes(AllSetPtMgr(TempSetPtMgrNum)%SPMType))//':"'// &
TRIM(AllSetPtMgr(TempSetPtMgrNum)%Name)//'"')
CALL ShowContinueError('...conflicting node name = '//TRIM(NodeID(AllSetPtMgr(SetPtMgrNum)%CtrlNodes(CtrldNodeNum))))
CALL ShowContinueError('...control type variable = '//TRIM(cValidCtrlTypes(AllSetPtMgr(SetPtMgrNum)%CtrlTypeMode)))
! ErrorsFound=.TRUE.
END IF
END DO
END DO
END IF
END DO ! DO TempSetPtMgrNum = SetPtMgrNum+1, AllSetPtMgrs
END DO ! DO SetPtMgrNum = 1, AllSetPtMgrs
IF (ALLOCATED(AllSetPtMgr)) DEALLOCATE(AllSetPtMgr)
RETURN
END SUBROUTINE VerifySetPointManagers