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 | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | FirstHVACIteration |
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 LogPlantConvergencePoints(FirstHVACIteration)
! SUBROUTINE INFORMATION:
! AUTHOR Edwin Lee
! DATE WRITTEN Summer 2011
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This routine stores the history of the plant convergence to check for stuck (max iteration) conditions
! METHODOLOGY EMPLOYED:
! Loop across all loops and loopsides
! On first hvac, reset the history arrays to begin anew
! Pick up the loopside inlet and outlet temp and flow rate
! Store this in the history array of each node using EOSHIFT
! REFERENCES:
! na
! USE STATEMENTS:
USE DataPlant
USE DataLoopNode
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
LOGICAL, INTENT(IN) :: FirstHVACIteration
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: ThisLoopNum
INTEGER :: ThisLoopSide
INTEGER :: InletNodeNum
INTEGER :: OutletNodeNum
REAL(r64) :: InletNodeTemp
REAL(r64) :: InletNodeMdot
REAL(r64) :: OutletNodeTemp
REAL(r64) :: OutletNodeMdot
DO ThisLoopNum = 1, SIZE(PlantLoop)
DO ThisLoopSide = 1, SIZE(PlantLoop(ThisLoopNum)%LoopSide)
IF (FirstHVACIteration) THEN
PlantLoop(ThisLoopNum)%LoopSide(ThisLoopSide)%InletNode%TemperatureHistory = 0.0d0
PlantLoop(ThisLoopNum)%LoopSide(ThisLoopSide)%InletNode%MassFlowRateHistory = 0.0d0
PlantLoop(ThisLoopNum)%LoopSide(ThisLoopSide)%OutletNode%TemperatureHistory = 0.0d0
PlantLoop(ThisLoopNum)%LoopSide(ThisLoopSide)%OutletNode%MassFlowRateHistory = 0.0d0
END IF
InletNodeNum = PlantLoop(ThisLoopNum)%LoopSide(ThisLoopSide)%NodeNumIn
InletNodeTemp = Node(InletNodeNum)%Temp
InletNodeMdot = Node(InletNodeNum)%MassFlowRate
OutletNodeNum = PlantLoop(ThisLoopNum)%LoopSide(ThisLoopSide)%NodeNumOut
OutletNodeTemp = Node(OutletNodeNum)%Temp
OutletNodeMdot = Node(OutletNodeNum)%MassFlowRate
PlantLoop(ThisLoopNum)%LoopSide(ThisLoopSide)%InletNode%TemperatureHistory = &
EOSHIFT(PlantLoop(ThisLoopNum)%LoopSide(ThisLoopSide)%InletNode%TemperatureHistory, -1, InletNodeTemp)
PlantLoop(ThisLoopNum)%LoopSide(ThisLoopSide)%InletNode%MassFlowRateHistory = &
EOSHIFT(PlantLoop(ThisLoopNum)%LoopSide(ThisLoopSide)%InletNode%MassFlowRateHistory, -1, InletNodeMdot)
PlantLoop(ThisLoopNum)%LoopSide(ThisLoopSide)%OutletNode%TemperatureHistory = &
EOSHIFT(PlantLoop(ThisLoopNum)%LoopSide(ThisLoopSide)%OutletNode%TemperatureHistory, -1, OutletNodeTemp)
PlantLoop(ThisLoopNum)%LoopSide(ThisLoopSide)%OutletNode%MassFlowRateHistory = &
EOSHIFT(PlantLoop(ThisLoopNum)%LoopSide(ThisLoopSide)%OutletNode%MassFlowRateHistory, -1, OutletNodeMdot)
END DO
END DO
END SUBROUTINE LogPlantConvergencePoints