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 | |||
real(kind=r64), | intent(in) | :: | ThisLoopSideFlow | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
logical, | intent(inout) | :: | LoopShutDownFlag |
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 SimulateAllLoopSideBranches(LoopNum, LoopSideNum, ThisLoopSideFlow, FirstHVACIteration, LoopShutDownFlag)
! SUBROUTINE INFORMATION:
! AUTHOR Edwin Lee
! DATE WRITTEN July 2010
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This routine will step through all branch groups (single branch .OR. inlet/parallels/outlet)
! and call the branch group simulation routine. This routine also calls to update the splitter
! and mixer.
! METHODOLOGY EMPLOYED:
! The number of branch groups is either 1 or 3. 1 would be a single branch half-loop. 3 would
! be the minimum for an inlet/parallels/outlet set. The number of branch groups can then be
! calculated as #BrGrps = 1 + 2*L; where L is zero for single half loop and one for parallel-type set.
! This calculation can be reduced to the logical/integer conversion as shown in the code.
! The simulation then steps through each branch group. If there are parallel branches, the splitter is
! updated on flowlock=0 to pass information through, then after the parallel branches the mixer is always
! updated. The outlet branch "group" is then simulated.
! USE STATEMENTS:
USE PlantUtilities, ONLY: UpdatePlantSplitter, UpdatePlantMixer
USE DataPlant, ONLY: PlantLoop, FlowUnlocked
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: LoopNum
INTEGER, INTENT(IN) :: LoopSideNum
REAL(r64), INTENT(IN) :: ThisLoopSideFlow
LOGICAL, INTENT(IN) :: FirstHVACIteration
LOGICAL, INTENT(INOUT) :: LoopShutDownFlag
! SUBROUTINE PARAMETER DEFINITIONS:
INTEGER, PARAMETER :: InletBranchOrOneBranchHalfLoop = 1
INTEGER, PARAMETER :: ParallelBranchSet = 2
INTEGER, PARAMETER :: OutletBranch = 3
LOGICAL, PARAMETER :: StartingNewLoopSidePass = .TRUE.
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: NumBranchGroups
INTEGER :: BranchesGreaterThanOne
INTEGER :: BranchGroup
IF (PlantLoop(LoopNum)%LoopSide(LoopSideNum)%TotalBranches > 1) THEN
BranchesGreaterThanOne = 1
ELSE
BranchesGreaterThanOne = 0
ENDIF
NumBranchGroups = 1 + 2 * BranchesGreaterThanOne
DO BranchGroup = 1, NumBranchGroups
IF ((BranchGroup > 1) .AND. (PlantLoop(LoopNum)%LoopSide(LoopSideNum)%TotalBranches == 1)) EXIT
SELECT CASE(BranchGroup)
CASE (InletBranchOrOneBranchHalfLoop) ! This group would be the inlet branch, or the single half-loop branch
CALL SimulateLoopSideBranchGroup( &
LoopNum, &
LoopSideNum, &
1, &
1, &
ThisLoopSideFlow, &
FirstHVACIteration, &
LoopShutDownFlag, &
StartingNewLoopSidePass &
)
CASE (ParallelBranchSet) ! This group is the parallel set of branches, or the single branch between the mix/split
CALL UpdatePlantSplitter(LoopNum,LoopSideNum,1)
CALL SimulateLoopSideBranchGroup( &
LoopNum, &
LoopSideNum, &
2, &
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%TotalBranches - 1, &
ThisLoopSideFlow, &
FirstHVACIteration, &
LoopShutDownFlag &
)
CALL UpdatePlantMixer(LoopNum,LoopSideNum,1)
CASE (OutletBranch) ! This group is the outlet branch
CALL SimulateLoopSideBranchGroup( &
LoopNum, &
LoopSideNum, &
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%TotalBranches, &
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%TotalBranches, &
ThisLoopSideFlow, &
FirstHVACIteration, &
LoopShutDownFlag &
)
END SELECT
END DO
RETURN
END SUBROUTINE SimulateAllLoopSideBranches