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.
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 InitSimpleIceStorage
! SUBROUTINE INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN Jan 2010
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! do initializations for simple ice storage
! METHODOLOGY EMPLOYED:
! <description>
! REFERENCES:
! na
! USE STATEMENTS:
USE DataGlobals, ONLY: BeginEnvrnFlag
USE DataPlant, ONLY: TypeOf_TS_IceSimple, PlantLoop, ScanPlantLoopsForObject,CommonPipe_TwoWay, &
SupplySide, LoopFlowStatus_NeedyAndTurnsLoopOn
USE PlantUtilities, ONLY: InitComponentNodes
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:
LOGICAL, ALLOCATABLE, SAVE, DIMENSION(:) :: MyPlantScanFlag
LOGICAL, SAVE :: MyOneTimeFlag = .TRUE.
LOGICAL, ALLOCATABLE, SAVE, DIMENSION(:) :: MyEnvrnFlag
LOGICAL :: errFlag
INTEGER :: CompNum ! local do loop counter
IF (MyOneTimeFlag) THEN
ALLOCATE(MyPlantScanFlag(NumIceStorages))
ALLOCATE(MyEnvrnFlag(NumIceStorages))
MyOneTimeFlag = .false.
MyPlantScanFlag = .TRUE.
MyEnvrnFlag = .TRUE.
END IF
IF (MyPlantScanFlag(IceNum)) THEN
! Locate the storage on the plant loops for later usage
errFlag=.false.
CALL ScanPlantLoopsForObject(IceStorage(IceNum)%Name, &
TypeOf_TS_IceSimple, &
IceStorage(IceNum)%LoopNum, &
IceStorage(IceNum)%LoopSideNum, &
IceStorage(IceNum)%BranchNum, &
IceStorage(IceNum)%CompNum, &
errFlag=errFlag)
IF (errFlag) THEN
CALL ShowFatalError('InitSimpleIceStorage: Program terminated due to previous condition(s).')
ENDIF
MyPlantScanFlag(IceNum)=.FALSE.
ENDIF
IF (BeginEnvrnFlag .and. MyEnvrnFlag(IceNum)) THEN
IceStorage(IceNum)%DesignMassFlowRate = PlantLoop(IceStorage(IceNum)%LoopNum)%MaxMassFlowRate
!no design flow rates for model, assume min is zero and max is plant loop's max
CALL InitComponentNodes( 0.0d0, IceStorage(IceNum)%DesignMassFlowRate, &
IceStorage(IceNum)%PltInletNodeNum, &
IceStorage(IceNum)%PltOutletNodeNum, &
IceStorage(IceNum)%LoopNum, &
IceStorage(IceNum)%LoopSideNum, &
IceStorage(IceNum)%BranchNum, &
IceStorage(IceNum)%CompNum)
IF ((PlantLoop(IceStorage(IceNum)%LoopNum)%CommonPipeType == CommonPipe_TwoWay) .AND. &
(IceStorage(IceNum)%LoopSideNum == SupplySide)) THEN
! up flow priority of other components on the same branch as the Ice tank
DO CompNum = 1, PlantLoop(IceStorage(IceNum)%LoopNum)%LoopSide(SupplySide)% &
Branch(IceStorage(IceNum)%BranchNum)%TotalComponents
PlantLoop(IceStorage(IceNum)%LoopNum)%LoopSide(SupplySide)% &
Branch(IceStorage(IceNum)%BranchNum)%Comp(CompNum)%FlowPriority = LoopFlowStatus_NeedyAndTurnsLoopOn
ENDDO
ENDIF
IceStorageReport(IceNum)%MyLoad = 0.0d0
IceStorageReport(IceNum)%U = 0.0d0
IceStorageReport(IceNum)%Urate = 0.0d0
IceStorageReport(IceNum)%IceFracRemain = 1.0d0
IceStorageReport(IceNum)%ITSCoolingRate = 0.0d0
IceStorageReport(IceNum)%ITSCoolingEnergy = 0.0d0
IceStorageReport(IceNum)%ITSChargingRate = 0.0d0
IceStorageReport(IceNum)%ITSChargingEnergy = 0.0d0
IceStorageReport(IceNum)%ITSmdot = 0.0d0
IceStorageReport(IceNum)%ITSInletTemp = 0.0d0
IceStorageReport(IceNum)%ITSOutletTemp = 0.0d0
MyEnvrnFlag(IceNum) = .FALSE.
ENDIF
IF (.NOT. BeginEnvrnFlag) MyEnvrnFlag(IceNum) = .TRUE.
ITSNomCap = IceStorage(IceNum)%ITSNomCap
InletNodeNum = IceStorage(IceNum)%PltInletNodeNum
OutletNodeNum = IceStorage(IceNum)%PltOutletNodeNum
RETURN
END SUBROUTINE InitSimpleIceStorage