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 | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | CompName | |||
integer, | intent(inout) | :: | CompIndex | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
logical, | intent(in) | :: | RunFlag | |||
logical | :: | InitLoopEquip |
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 SimSurfaceGroundHeatExchanger(CompName,CompIndex,FirstHVACIteration,RunFlag,InitLoopEquip) !DSU
! SUBROUTINE INFORMATION:
! AUTHOR Simon Rees
! DATE WRITTEN August 2002
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is the public routine that is used to simulate
! the operation of surface ground heat exchangers at each system
! time step.
! METHODOLOGY EMPLOYED:
! Several private routines are called to get data, make the calculations
! and update stuff. This is called for each instance of surface GHE components.
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE General, ONLY: TrimSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: CompName ! name of the surface GHE
INTEGER, INTENT(INOUT) :: CompIndex
LOGICAL, INTENT(IN) :: FirstHVACIteration ! TRUE if 1st HVAC simulation of system timestep
!INTEGER, INTENT(IN) :: FlowLock ! flow initialization/condition flag !DSU
LOGICAL, INTENT(IN) :: RunFlag ! TRUE if equipment is operating
LOGICAL :: InitLoopEquip
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL, SAVE :: GetInputFlag = .TRUE. ! Flag first time, input is fetched
INTEGER :: SurfaceGHENum ! index in local derived types
! check for input
IF (GetInputFlag) THEN
CALL GetSurfaceGroundHeatExchanger
GetInputFlag=.FALSE.
ENDIF
IF (InitLoopEquip) THEN
SurfaceGHENum = FindItemInList(CompName,SurfaceGHE%Name,NumOfSurfaceGHEs)
CompIndex=SurfaceGHENum
RETURN
ENDIF
! Find the correct Surface Ground Heat Exchanger
IF (CompIndex <= 0) THEN
CALL ShowFatalError('SimSurfaceGroundHeatExchanger: Unit not found='//TRIM(CompName))
ELSE
SurfaceGHENum=CompIndex
IF (SurfaceGHENum > NumOfSurfaceGHEs .or. SurfaceGHENum < 1) THEN
CALL ShowFatalError('SimSurfaceGroundHeatExchanger: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(SurfaceGHENum))// &
', Number of Units='//TRIM(TrimSigDigits(NumOfSurfaceGHEs))// &
', Entered Unit name='//TRIM(CompName))
ENDIF
IF (CheckEquipName(SurfaceGHENum)) THEN
IF (CompName /= SurfaceGHE(SurfaceGHENum)%Name) THEN
CALL ShowFatalError('SimSurfaceGroundHeatExchanger: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(SurfaceGHENum))// &
', Unit name='//TRIM(CompName)//', stored Unit Name for that index='// &
TRIM(SurfaceGHE(SurfaceGHENum)%Name))
ENDIF
CheckEquipName(SurfaceGHENum)=.false.
ENDIF
ENDIF
! initialize
CALL InitSurfaceGroundHeatExchanger(SurfaceGHENum,RunFlag) !DSU
! make the calculations
CALL CalcSurfaceGroundHeatExchanger(SurfaceGHENum, FirstHVACIteration) !DSU
! update vaiables
CALL UpdateSurfaceGroundHeatExchngr(SurfaceGHENum) !DSU
! update report variables
CALL ReportSurfaceGroundHeatExchngr(SurfaceGHENum)
RETURN
END SUBROUTINE SimSurfaceGroundHeatExchanger