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) | :: | GlheNum | |||
logical, | intent(in) | :: | RunFlag |
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 InitBoreholeHXSimVars(GlheNum,Runflag)
! SUBROUTINE INFORMATION:
! AUTHOR: Dan Fisher
! DATE WRITTEN: August, 2000
! MODIFIED Arun Murugappan
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine needs a description.
! METHODOLOGY EMPLOYED:
! Needs description, as appropriate.
! REFERENCES:
! na
! USE STATEMENTS:
USE PlantUtilities, ONLY: InitComponentNodes, SetComponentFlowRate, RegulateCondenserCompFlowReqOp
USE DataPlant, ONLY: PlantLoop, TypeOf_GrndHtExchgVertical, ScanPlantLoopsForObject
USE FluidProperties, ONLY: GetDensityGlycol
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
LOGICAL, INTENT (IN) :: RunFlag
INTEGER, INTENT (IN) :: GlheNum
! SUBROUTINE PARAMETER DEFINITIONS:
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL,SAVE :: MyEnvironFlag = .TRUE.
REAL(r64) :: FluidDensity
LOGICAL, ALLOCATABLE, SAVE, DIMENSION(:) :: MyFlag
LOGICAL, SAVE :: MyOneTimeFlag = .TRUE.
LOGICAL, ALLOCATABLE, SAVE, DIMENSION(:) :: MyEnvrnFlag
LOGICAL :: errFlag
IF (MyOneTimeFlag) THEN
ALLOCATE(MyEnvrnFlag(NumVerticalGlhes))
ALLOCATE(MyFlag(NumVerticalGlhes))
MyOneTimeFlag = .false.
MyEnvrnFlag = .TRUE.
MyFlag = .TRUE.
END IF
! Init more variables
IF (MyFlag(GlheNum)) THEN
! Locate the hx on the plant loops for later usage
errFlag=.false.
CALL ScanPlantLoopsForObject(VerticalGlhe(GlheNum)%Name, &
TypeOf_GrndHtExchgVertical, &
VerticalGlhe(GlheNum)%LoopNum, &
VerticalGlhe(GlheNum)%LoopSideNum, &
VerticalGlhe(GlheNum)%BranchNum, &
VerticalGlhe(GlheNum)%CompNum, &
errFlag=errFlag)
IF (errFlag) THEN
CALL ShowFatalError('InitBoreholeHXSimVars: Program terminated due to previous condition(s).')
ENDIF
MyFlag(GlheNum)=.FALSE.
ENDIF
IF(MyEnvrnFlag(GlheNum) .AND. BeginEnvrnFlag)THEN
MyEnvrnFlag(GlheNum) = .FALSE.
IF(.NOT. ALLOCATED(LastQnSubHr)) ALLOCATE(LastQnSubHr(NumVerticalGlhes))
FluidDensity = GetDensityGlycol(PlantLoop(VerticalGlhe(GlheNum)%LoopNum)%FluidName, &
20.d0 , &
PlantLoop(VerticalGlhe(GlheNum)%LoopNum)%FluidIndex, &
'InitBoreholeHXSimVars')
VerticalGlhe(GlheNum)%DesignMassFlow = VerticalGlhe(GlheNum)%DesignFlow * FluidDensity
Call InitComponentNodes(0.d0, VerticalGlhe(GlheNum)%DesignMassFlow, &
VerticalGlhe(GlheNum)%GlheInletNodeNum, &
VerticalGlhe(GlheNum)%GlheOutletNodeNum, &
VerticalGlhe(GlheNum)%LoopNum, &
VerticalGlhe(GlheNum)%LoopSideNum, &
VerticalGlhe(GlheNum)%BranchNum, &
VerticalGlhe(GlheNum)%CompNum)
LastQnSubHr = 0.0d0
Node(VerticalGlhe(GlheNum)%GlheInletNodeNum)%Temp = VerticalGlhe(GlheNum)%TempGround
Node(VerticalGlhe(GlheNum)%GlheOutletNodeNum)%Temp = VerticalGlhe(GlheNum)%TempGround
! zero out all history arrays
VerticalGlhe(GlheNum)%QnHr = 0.0d0
VerticalGlhe(GlheNum)%QnMonthlyAgg = 0.0d0
VerticalGlhe(GlheNum)%QnSubHr = 0.0d0
VerticalGlhe(GlheNum)%LastHourN = 0
PrevTimeSteps = 0.0d0
CurrentSimtime = 0.0d0
END IF
MDotActual = RegulateCondenserCompFlowReqOp(VerticalGlhe(GlheNum)%LoopNum, &
VerticalGlhe(GlheNum)%LoopSideNum, &
VerticalGlhe(GlheNum)%BranchNum, &
VerticalGlhe(GlheNum)%CompNum, &
VerticalGlhe(GlheNum)%DesignMassFlow)
CALL SetComponentFlowRate( MDotActual, &
VerticalGlhe(GlheNum)%GlheInletNodeNum, &
VerticalGlhe(GlheNum)%GlheOutletNodeNum, &
VerticalGlhe(GlheNum)%LoopNum, &
VerticalGlhe(GlheNum)%LoopSideNum, &
VerticalGlhe(GlheNum)%BranchNum, &
VerticalGlhe(GlheNum)%CompNum)
! Resent local environment init flag
IF (.NOT. BeginEnvrnFlag) MyEnvrnFlag = .TRUE.
RETURN
END SUBROUTINE InitBoreholeHXSimVars