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) | :: | WaterThermalTankNum |
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 MinePlantStructForInfo(WaterThermalTankNum)
! SUBROUTINE INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN October 2007
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! get information from plant loop data structure
! check what we can learn from plant structure against user inputs
! METHODOLOGY EMPLOYED:
! looping
! REFERENCES:
! na
! USE STATEMENTS:
USE DataHVACGlobals , ONLY: NumPlantLoops
USE DataInterfaces, ONLY: ShowFatalError, ShowSevereError, ShowContinueError
USE DataSizing, ONLY: AutoSize
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, Intent(In) :: WaterThermalTankNum
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: PlantLoopNum ! Used for looking up plant info
INTEGER :: LoopSideNum ! Used for looking up plant info
!unused INTEGER :: BranchNum ! Used for looking up plant info
! INTEGER :: CompNum ! Used for looking up plant info
INTEGER :: SplitNum ! used for checking series parallel in plant
INTEGER :: UseInletNode ! Water heater use inlet node number
INTEGER :: SourceInletNode ! Water heater source inlet node number
Logical :: errorsFound
errorsFound = .FALSE.
!IF (WaterThermalTank(WaterThermalTankNum)%PlantStructureCheck .AND. ALLOCATED(PlantLoop)) THEN
IF ( ALLOCATED(PlantLoop) .and. WaterThermalTank(WaterThermalTankNum)%UseSidePlantLoopNum > 0) THEN
! check plant structure for useful data.
UseInletNode = WaterThermalTank(WaterThermalTankNum)%UseInletNode
PlantLoopNum=WaterThermalTank(WaterThermalTankNum)%UseSidePlantLoopNum
LoopSideNum=WaterThermalTank(WaterThermalTankNum)%UseSidePlantLoopSide
IF ((WaterThermalTank(WaterThermalTankNum)%UseDesignVolFlowRate == AutoSize) .AND. &
(WaterThermalTank(WaterThermalTankNum)%UseSidePlantSizNum == 0)) THEN
CALL ShowSevereError('Water heater = '//trim(WaterThermalTank(WaterThermalTankNum)%Name)//&
' for autosizing Use side flow rate, did not find Sizing:Plant object '// &
TRIM(PlantLoop(PlantLoopNum)%Name) )
ErrorsFound = .true.
ENDIF
!Is this wh Use side plumbed in series (default) or are there other branches in parallel?
IF (ALLOCATED(PlantLoop(PlantLoopNum)%LoopSide(LoopSideNum)%Splitter)) THEN
DO SplitNum = 1, PlantLoop(PlantLoopNum)%LoopSide(LoopSideNum)%NumSplitters
If (ANY(PlantLoop(PlantLoopNum)%LoopSide(LoopSideNum)%Splitter(SplitNum)%NodeNumOut &
== UseInletNode) ) THEN ! this wh is on the splitter
If (PlantLoop(PlantLoopNum)%LoopSide(LoopSideNum)%Splitter(SplitNum)%TotalOutletNodes > 1) THEN
WaterThermalTank(WaterThermalTankNum)%UseSideSeries = .FALSE.
ENDIF
ENDIF
ENDDO
ENDIF
ENDIF
IF ( ALLOCATED(PlantLoop) .and. WaterThermalTank(WaterThermalTankNum)%SourceSidePlantLoopNum > 0) THEN
SourceInletNode = WaterThermalTank(WaterThermalTankNum)%SourceInletNode
PlantLoopNum=WaterThermalTank(WaterThermalTankNum)%SourceSidePlantLoopNum
LoopSideNum=WaterThermalTank(WaterThermalTankNum)%SourceSidePlantLoopSide
! was user's input correct for plant loop name?
IF ((WaterThermalTank(WaterThermalTankNum)%SourceDesignVolFlowRate == AutoSize) .AND. &
(WaterThermalTank(WaterThermalTankNum)%SourceSidePlantSizNum == 0) .AND. &
(WaterThermalTank(WaterThermalTankNum)%DesuperheaterNum == 0) .AND. &
(WaterThermalTank(WaterThermalTankNum)%HeatPumpNum == 0) ) THEN
CALL ShowSevereError('Water heater = '//trim(WaterThermalTank(WaterThermalTankNum)%Name)//&
'for autosizing Source side flow rate, did not find Sizing:Plant object '// &
TRIM(PlantLoop(PlantLoopNum)%Name))
ErrorsFound = .true.
ENDIF
!Is this wh Source side plumbed in series (default) or are there other branches in parallel?
IF (ALLOCATED(PlantLoop(PlantLoopNum)%LoopSide(LoopSideNum)%Splitter)) THEN
DO SplitNum = 1, PlantLoop(PlantLoopNum)%LoopSide(LoopSideNum)%NumSplitters
IF (ANY(PlantLoop(PlantLoopNum)%LoopSide(LoopSideNum)%Splitter(SplitNum)%NodeNumOut &
== SourceInletNode) ) THEN ! this wh is on the splitter
IF (PlantLoop(PlantLoopNum)%LoopSide(LoopSideNum)%Splitter(SplitNum)%TotalOutletNodes > 1) THEN
WaterThermalTank(WaterThermalTankNum)%SourceSideSeries = .FALSE.
ENDIF
ENDIF
ENDDO
ENDIF
ENDIF
IF (errorsFound) THEN
CALL ShowFatalError('Preceding water heater input errors cause program termination')
ENDIF
RETURN
END SUBROUTINE MinePlantStructForInfo