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.
FUNCTION AnyPlantSplitterMixerLacksContinuity() RESULT (NeedToReSimulate)
! FUNCTION INFORMATION:
! AUTHOR B. Griffith
! DATE WRITTEN April 2012
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Similiar to CheckPlantMixerSplitterConsistency, but used to decide if plant needs to iterate again
! METHODOLOGY EMPLOYED:
! <description>
! REFERENCES:
! na
! USE STATEMENTS:
USE DataPlant, ONLY : TotNumLoops, PlantLoop, DemandSide, SupplySide, &
CriteriaDelta_MassFlowRate
USE DataLoopNode, ONLY : Node
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
LOGICAL :: NeedToReSimulate
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER :: LoopNum
INTEGER :: SplitterInletNode
INTEGER :: LoopSide
INTEGER :: NumSplitterOutlets
INTEGER :: OutletNum
INTEGER :: BranchNum
INTEGER :: LastNodeOnBranch
REAL(r64) :: SumOutletFlow
REAL(r64) :: AbsDifference
NeedToReSimulate = .FALSE.
DO LoopNum = 1, TotNumLoops
DO LoopSide = DemandSide,SupplySide
IF (PlantLoop(LoopNum)%LoopSide(LoopSide)%SplitterExists) THEN
SplitterInletNode = PlantLoop(LoopNum)%LoopSide(LoopSide)%Splitter(1)%NodeNumIn
! loop across branch outlet nodes and check mass continuity
NumSplitterOutlets = PlantLoop(LoopNum)%LoopSide(LoopSide)%Splitter(1)%TotalOutletNodes
SumOutletFlow = 0.d0
DO OutletNum = 1, NumSplitterOutlets
BranchNum = PlantLoop(LoopNum)%LoopSide(LoopSide)%Splitter(1)%BranchNumOut(OutletNum)
LastNodeOnBranch = PlantLoop(LoopNum)%LoopSide(LoopSide)%Branch(branchNum)%NodeNumOut
SumOutletFlow = SumOutletFlow + Node(LastNodeOnBranch)%MassFlowRate
ENDDO
AbsDifference=ABS(Node(SplitterInletNode)%MassFlowRate - SumOutletFlow)
IF (AbsDifference > CriteriaDelta_MassFlowRate) THEN
NeedToReSimulate = .TRUE.
RETURN
ENDIF
ENDIF
ENDDO
ENDDO
RETURN
END FUNCTION AnyPlantSplitterMixerLacksContinuity