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) | :: | SplitterNum | |||
logical, | intent(inout) | :: | SplitterInletChanged | |||
logical, | intent(in) | :: | FirstCall |
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 UpdateSplitter(SplitterNum, SplitterInletChanged, FirstCall)
! SUBROUTINE INFORMATION:
! AUTHOR Richard J. Liesen
! DATE WRITTEN March 2000
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine needs a description.
! METHODOLOGY EMPLOYED:
! Needs description, as appropriate.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataContaminantBalance, ONLY: Contaminant
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, Intent(IN) :: SplitterNum
LOGICAL, Intent(InOut)::SplitterInletChanged
LOGICAL, INTENT(IN) :: FirstCall
! SUBROUTINE PARAMETER DEFINITIONS:
REAL(r64), PARAMETER :: FlowRateToler = 0.01d0 ! Tolerance for mass flow rate convergence (in kg/s)
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
Integer :: InletNode
Integer :: OutletNode
Integer :: NodeNum
!Set the inlet node for this splitter to be used throughout subroutine for either case
InletNode = SplitterCond(SplitterNum)%InletNode
!On the FirstCall the State properties are passed through and the mass flows are not dealt with
! except for NO flow conditions
IF(FirstCall) Then
! Set the outlet nodes for properties that just pass through & not used
DO NodeNum = 1, SplitterCond(SplitterNum)%NumOutletNodes
OutletNode = SplitterCond(SplitterNum)%OutletNode(NodeNum)
Node(OutletNode)%Temp = SplitterCond(SplitterNum)%OutletTemp(NodeNum)
Node(OutletNode)%HumRat = SplitterCond(SplitterNum)%OutletHumRat(NodeNum)
Node(OutletNode)%Enthalpy = SplitterCond(SplitterNum)%OutletEnthalpy(NodeNum)
Node(OutletNode)%Quality = Node(InletNode)%Quality
Node(OutletNode)%Press = SplitterCond(SplitterNum)%OutletPressure(NodeNum)
IF (Contaminant%CO2Simulation) Then
Node(OutletNode)%CO2 = Node(InletNode)%CO2
End If
IF (Contaminant%GenericContamSimulation) Then
Node(OutletNode)%GenContam = Node(InletNode)%GenContam
End If
END DO
ELSE
! The second time through just updates the mass flow conditions back upstream
! to the inlet. Before it sets the inlet it checks to see that the flow rate has not
! changed or not. The tolerance has been relaxed some now that the splitter has been
! re-written
! Set the outlet air nodes of the Splitter if the splitter results have changed
! beyond the tolerance.
If(ABS(Node(InletNode)%MassFlowRate - SplitterCond(SplitterNum)%InletMassFlowRate).GT.FlowRateToler) Then
SplitterInletChanged = .TRUE.
END IF
Node(InletNode)%MassFlowRate = SplitterCond(SplitterNum)%InletMassFlowRate
Node(InletNode)%MassFlowRateMaxAvail = SplitterCond(SplitterNum)%InletMassFlowRateMaxAvail
Node(InletNode)%MassFlowRateMinAvail = SplitterCond(SplitterNum)%InletMassFlowRateMinAvail
END IF !The FirstCall END IF
RETURN
END Subroutine UpdateSplitter