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 | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | MinCompMdot | |||
real(kind=r64), | intent(in) | :: | MaxCompMdot | |||
integer, | intent(in) | :: | InletNode | |||
integer, | intent(in) | :: | OutletNode | |||
integer, | intent(in) | :: | LoopNum | |||
integer, | intent(in) | :: | LoopSideNum | |||
integer, | intent(in) | :: | BranchIndex | |||
integer, | intent(in) | :: | CompIndex |
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 InitComponentNodes(MinCompMdot,MaxCompMdot, InletNode,OutletNode,LoopNum,LoopSideNum,BranchIndex,CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN Sept 2010
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Central routine for initializing plant nodes connected to components
! typically used for BeginEnvrnFlag
! METHODOLOGY EMPLOYED:
! set massflowrate variables on inlet node
! reset inlet node if more restrictive
! REFERENCES:
! na
! USE STATEMENTS:
USE DataLoopNode, ONLY : Node, NodeID
USE DataPlant, ONLY : PlantLoop, DemandOpSchemeType
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: MinCompMdot !
REAL(r64), INTENT(IN) :: MaxCompMdot !
INTEGER, INTENT(IN) :: InletNode ! component's inlet node index in node structure
INTEGER, INTENT(IN) :: OutletNode ! component's outlet node index in node structure
INTEGER, INTENT(IN) :: LoopNum ! plant loop index for PlantLoop structure
INTEGER, INTENT(IN) :: LoopSideNum ! Loop side index for PlantLoop structure
INTEGER, INTENT(IN) :: BranchIndex ! branch index for PlantLoop
INTEGER, INTENT(IN) :: CompIndex ! component index for PlantLoop
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: tmpMinCompMdot ! local value
REAL(r64) :: tmpMaxCompMdot ! local value
tmpMinCompMdot = MinCompMdot
tmpMaxCompMdot = MaxCompMdot
! trap bad values that can happen before all the setup is done
IF (tmpMinCompMdot < 0.d0) tmpMinCompMdot = 0.d0
IF (tmpMaxCompMdot < 0.d0) tmpMaxCompMdot = 0.d0
! reset outlet node
Node(OutletNode)%MassFlowRate = 0.d0
! Node(OutletNode)%MassFlowRateMin = MinCompMdot
! Node(OutletNode)%MassFlowRateMinAvail = MinCompMdot
! Node(OutletNode)%MassFlowRateMax = MaxCompMdot
! Node(OutletNode)%MassFlowRateMaxAvail = MaxCompMdot
Node(InletNode)%MassFlowRateMin = tmpMinCompMdot
Node(InletNode)%MassFlowRateMinAvail = tmpMinCompMdot
Node(InletNode)%MassFlowRateMax = tmpMaxCompMdot
Node(InletNode)%MassFlowRateMaxAvail = tmpMaxCompMdot
!reset inlet node, but only change from inlet setting if set and more restrictive
Node(InletNode)%MassFlowRate = 0.d0
Node(InletNode)%MassFlowRateRequest = 0.d0
! IF (Node(InletNode)%MassFlowRateMax > 0.d0) THEN !if inlet has been set, only change it if more restrictive
! Node(InletNode)%MassFlowRateMax = MIN(tmpMaxCompMdot, Node(InletNode)%MassFlowRateMax)
! ELSE
! Node(InletNode)%MassFlowRateMax = tmpMaxCompMdot
! ENDIF
! IF (Node(InletNode)%MassFlowRateMaxAvail> 0.d0) THEN !if inlet has been set, only change it if more restrictive
! Node(InletNode)%MassFlowRateMaxAvail = MIN(tmpMaxCompMdot, Node(InletNode)%MassFlowRateMaxAvail)
! ELSE
! Node(InletNode)%MassFlowRateMaxAvail = tmpMaxCompMdot
! ENDIF
! IF (Node(InletNode)%MassFlowRateMin > 0.d0) THEN
! Node(InletNode)%MassFlowRateMin = MAX(tmpMinCompMdot, Node(InletNode)%MassFlowRateMin)
! ELSE
! Node(InletNode)%MassFlowRateMin = tmpMinCompMdot
! ENDIF
!
! IF (Node(InletNode)%MassFlowRateMinAvail > 0.d0) THEN
! Node(InletNode)%MassFlowRateMinAvail = MAX(tmpMinCompMdot, Node(InletNode)%MassFlowRateMinAvail)
! ELSE
! Node(InletNode)%MassFlowRateMinAvail = tmpMinCompMdot
! ENDIF
RETURN
END SUBROUTINE InitComponentNodes