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 | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | LoopNum | |||
integer, | intent(in) | :: | LoopSideNum | |||
integer, | intent(in) | :: | SplitNum |
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 UpdatePlantSplitter(LoopNum, LoopSideNum, SplitNum)
! SUBROUTINE INFORMATION:
! AUTHOR Brandon Anderson, Dan Fisher
! DATE WRITTEN October 1999
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Set the outlet conditions of the splitter
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
USE DataPlant, ONLY : PlantLoop, DemandSide,SupplySide
USE DataLoopNode, ONLY : Node
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: LoopNum
INTEGER, INTENT(IN) :: LoopSideNum
! INTEGER, INTENT(IN) :: FlowLock
INTEGER, INTENT(IN) :: SplitNum
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
! na
INTEGER :: SplitterInletNode
INTEGER :: SplitterOutletNode
INTEGER :: CurNode
! Update Temperatures across splitter
IF (PlantLoop(LoopNum)%LoopSide(LoopSideNum)%SplitterExists) THEN
! Set branch number at splitter inlet
SplitterInletNode = PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Splitter(SplitNum)%NodeNumIn
!Loop over outlet nodes
DO CurNode = 1, PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Splitter(SplitNum)%TotalOutletNodes
SplitterOutletNode = PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Splitter(SplitNum)%NodeNumOut(CurNode)
!Inlet Temp equals exit Temp to all outlet branches
Node(SplitterOutletNode)%Temp = Node(SplitterInletNode)%Temp
Node(SplitterOutletNode)%TempMin = Node(SplitterInletNode)%TempMin
Node(SplitterOutletNode)%TempMax = Node(SplitterInletNode)%TempMax
IF (PlantLoop(LoopNum)%HasPressureComponents) THEN
!Don't update pressure, let pressure system handle this...
ELSE
!Go ahead and update!
Node(SplitterOutletNode)%Press = Node(SplitterInletNode)%Press
END IF
Node(SplitterOutletNode)%Quality = Node(SplitterInletNode)%Quality
!DSU? These two blocks and the following one which I added need to be cleaned up
! I think we will always pass maxavail down the splitter, min avail is the issue.
! Changed to include hardware max in next line 7/26/2011
Node(SplitterOutletNode)%MassFlowRateMaxAvail = MIN(Node(SplitterInletNode)%MassFlowRateMaxAvail, &
Node(SplitterOutletNode)%MassFlowRateMax)
Node(SplitterOutletNode)%MassFlowRateMinAvail = 0.0d0
!
! If(PlantLoop(LoopNum)%LoopSide(LoopSideNum)%FlowLock == 0 .and. LoopSideNum == SupplySide) Then
! Node(SplitterOutletNode)%MassFlowRateMaxAvail = Node(SplitterInletNode)%MassFlowRateMaxAvail
! Node(SplitterOutletNode)%MassFlowRateMinAvail = 0.0d0
! !Node(SplitterInletNode)%MassFlowRateMinAvail CR branch pumps (7643)
! End If
! If(LoopSideNum == DemandSide .AND. (PlantLoop(LoopNum)%LoopSide(LoopSideNum)%LoopPump .OR. &
! PlantLoop(LoopNum)%LoopSide(LoopSideNum)%BranchPump)) Then
! Node(SplitterOutletNode)%MassFlowRateMaxAvail = Node(SplitterInletNode)%MassFlowRateMaxAvail
! Node(SplitterOutletNode)%MassFlowRateMinAvail = 0.0d0
! End If
!DSU? Not sure about passing min avail if it is nonzero. I am testing a pump with nonzero
! min flow rate, and it is causing problems because this routine passes zero down. Perhaps if
! it is a single parallel branch, we are safe to assume we need to just pass it down.
! But need to test for multiple branches (or at least think about it), to see what we need to do...
IF (PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Splitter(SplitNum)%TotalOutletNodes == 1) THEN
Node(SplitterOutletNode)%MassFlowRateMinAvail = Node(SplitterInletNode)%MassFlowRateMinAvail
END IF
END DO
END IF
RETURN
END SUBROUTINE UpdatePlantSplitter