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.
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 SetupReports
! SUBROUTINE INFORMATION:
! AUTHOR Rick Strand
! DATE WRITTEN July 2001
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine initializes the plant supply side reports.
! It was created during the splitting of supply and demand side functions.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
USE DataPlant, ONLY: PlantReport, PlantLoop, DemandSide, SupplySide, DemandOpSchemeType
USE DataGlobals, ONLY: DisplayAdvancedReportVariables
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: LoopNum ! DO loop counter (plant supply sides)
INTEGER :: LoopSideNum
INTEGER :: BranchNum
INTEGER :: CompNum
INTEGER :: MaxBranches ! Maximum number of branches on any plant loop (used for allocating arrays)
CHARACTER(len=MaxNameLength) :: CurrentModuleObject ! for ease in renaming.
INTEGER :: FluidIndex
! FLOW:
MaxBranches =0
DO LoopNum=1,TotNumLoops
MaxBranches=MAX(MaxBranches,PlantLoop(LoopNum)%LoopSide(DemandSide)%TotalBranches)
MaxBranches=MAX(MaxBranches,PlantLoop(LoopNum)%LoopSide(SupplySide)%TotalBranches)
PlantLoop(LoopNum)%MaxBranch = MaxBranches
END DO
ALLOCATE (PlantReport(TotNumLoops))
PlantReport%CoolingDemand = 0.d0
PlantReport%HeatingDemand = 0.d0
PlantReport%DemandNotDispatched = 0.d0
PlantReport%UnmetDemand = 0.d0
PlantReport%InletNodeTemperature = 0.d0
PlantReport%OutletNodeTemperature = 0.d0
PlantReport%InletNodeFlowrate = 0.d0
PlantReport%BypassFrac = 0.d0
PlantReport%OutletNodeFlowrate = 0.d0
DO LoopNum =1, TotNumLoops
IF(LoopNum .LE. NumPlantLoops) THEN
CurrentModuleObject = 'Plant Loop'
ELSE
CurrentModuleObject = 'Cond Loop'
END IF
! CurrentModuleObject='Plant/Condenser Loop'
CALL SetupOutputVariable('Plant Supply Side Cooling Demand Rate [W]', &
PlantReport(LoopNum)%CoolingDemand,'System','Average',PlantLoop(LoopNum)%Name)
CALL SetupOutputVariable('Plant Supply Side Heating Demand Rate [W]', &
PlantReport(LoopNum)%HeatingDemand,'System','Average',PlantLoop(LoopNum)%Name)
CALL SetupOutputVariable('Plant Supply Side Inlet Mass Flow Rate [kg/s]', &
PlantReport(LoopNum)%InletNodeFlowrate,'System','Average',PlantLoop(LoopNum)%Name)
CALL SetupOutputVariable('Plant Supply Side Inlet Temperature [C]', &
PlantReport(LoopNum)%InletNodeTemperature,'System','Average',PlantLoop(LoopNum)%Name)
CALL SetupOutputVariable('Plant Supply Side Outlet Temperature [C]', &
PlantReport(LoopNum)%OutletNodeTemperature,'System','Average',PlantLoop(LoopNum)%Name)
CALL SetupOutputVariable('Plant Supply Side Not Distributed Demand Rate [W]', &
PlantReport(LoopNum)%DemandNotDispatched,'System','Average',PlantLoop(LoopNum)%Name)
CALL SetupOutputVariable('Plant Supply Side Unmet Demand Rate [W]', &
PlantReport(LoopNum)%UnmetDemand,'System','Average',PlantLoop(LoopNum)%Name)
! Debug variables -- used by OSU developers
CALL SetupOutputVariable('Debug Plant Loop Bypass Fraction []', &
PlantReport(LoopNum)%BypassFrac,'System','Average',PlantLoop(LoopNum)%Name)
! CALL SetupOutputVariable('Debug SSInletNode Flowrate[kg/s]', &
! PlantReport(LoopNum)%InletNodeFlowrate,'System','Average',PlantLoop(LoopNum)%Name)
! CALL SetupOutputVariable('Debug SSInletNode Temperature[C]', &
! PlantReport(LoopNum)%InletNodeTemperature,'System','Average',PlantLoop(LoopNum)%Name)
! CALL SetupOutputVariable('Debug SSOutletNode Flowrate [kg/s]', &
! PlantReport(LoopNum)%OutletNodeFlowrate,'System','Average',PlantLoop(LoopNum)%Name)
! CALL SetupOutputVariable('Debug SSOutletNode Temperature[C]', &
! PlantReport(LoopNum)%OutletNodeTemperature,'System','Average',PlantLoop(LoopNum)%Name)
CALL SetupOutputVariable('Debug Plant Last Simulated Loop Side []', &
PlantReport(LoopNum)%LastLoopSideSimulated, 'System', 'Average', PlantLoop(LoopNum)%Name)
END DO
! setup more variables inside plant data structure
! CurrentModuleObject='Plant/Condenser Loop(Advanced)'
IF (DisplayAdvancedReportVariables) THEN
DO LoopNum =1, TotNumLoops
CALL SetupOutputVariable('Plant Demand Side Lumped Capacitance Temperature [C]', &
PlantLoop(LoopNum)%LoopSide(DemandSide)%LoopSideInlet_TankTemp, &
'System', 'Average', PlantLoop(LoopNum)%Name)
CALL SetupOutputVariable('Plant Supply Side Lumped Capacitance Temperature [C]', &
PlantLoop(LoopNum)%LoopSide(SupplySide)%LoopSideInlet_TankTemp, &
'System', 'Average', PlantLoop(LoopNum)%Name)
DO LoopSideNum = DemandSide, SupplySide
DO BranchNum = 1, PlantLoop(LoopNum)%LoopSide(LoopSideNum)%TotalBranches
DO CompNum = 1, PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%TotalComponents
IF ( PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType /= &
DemandOpSchemeType ) THEN
CALL SetupOutputVariable('Plant Component Distributed Demand Rate [W]', &
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%MyLoad, &
'System', 'Average', &
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%Name)
ENDIF
ENDDO
ENDDO
ENDDO
ENDDO
ENDIF
! now traverse plant loops and set fluid type index in all nodes on the loop
DO LoopNum =1, TotNumLoops
FluidIndex = PlantLoop(LoopNum)%FluidIndex
DO LoopSideNum = DemandSide, SupplySide
Node(PlantLoop(LoopNum)%LoopSide(LoopSideNum)%NodeNumIn)%FluidIndex = FluidIndex
Node(PlantLoop(LoopNum)%LoopSide(LoopSideNum)%NodeNumOut)%FluidIndex = FluidIndex
DO BranchNum = 1, PlantLoop(LoopNum)%LoopSide(LoopSideNum)%TotalBranches
DO CompNum = 1, PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%TotalComponents
Node(PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%NodeNumIn )%FluidIndex = FluidIndex
Node(PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%NodeNumOut)%FluidIndex = FluidIndex
ENDDO
ENDDO
ENDDO
ENDDO ! plant loops
RETURN
END SUBROUTINE SetupReports