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 | ||||
real(kind=r64), | intent(inout) | :: | Maxload | |||
real(kind=r64), | intent(inout) | :: | MinLoad | |||
real(kind=r64), | intent(inout) | :: | OptLoad |
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 SimPondGroundHeatExchanger(CompName,CompIndex,FirstHVACIteration,RunFlag,InitLoopEquip,Maxload,MinLoad,OptLoad) !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 pond 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 pond components.
! REFERENCES:
! Chiasson, A. Advances in Modeling of Ground-Source Heat Pump Systems.
! M.S. Thesis, Oklahoma State University, December 1999.
! Chiasson, A.D., J.D. Spitler, S.J. Rees, M.D. Smith. 2000. A Model For
! Simulating The Performance Of A Shallow Pond As A Supplemental Heat
! Rejecter With Closed-Loop Ground-Source Heat Pump Systems.
! ASHRAE Transactions. 106(2):107-121.
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: CompName ! name of the pond GHE
INTEGER, INTENT(INOUT) :: CompIndex ! index in local derived types
LOGICAL, INTENT(IN) :: FirstHVACIteration ! TRUE if 1st HVAC simulation of system timestep
LOGICAL, INTENT(IN) :: Runflag ! TRUE if equipment turned on by loop operation scheme
LOGICAL :: InitLoopEquip
REAL(r64),INTENT(INOUT) :: Maxload
REAL(r64),INTENT(INOUT) :: MinLoad
REAL(r64),INTENT(INOUT) :: OptLoad
! 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 :: PondGHENum ! index in local derived types
! check for input
IF (GetInputFlag) THEN
CALL GetPondGroundHeatExchanger
GetInputFlag=.FALSE.
ENDIF
IF (CompIndex == 0) THEN
PondGHENum = FindItemInList(CompName,PondGHE%Name,NumOfPondGHEs)
IF (PondGHENum == 0) THEN
CALL ShowFatalError('SimPondGroundHeatExchanger: Unit not found='//TRIM(CompName))
ENDIF
CompIndex=PondGHENum
ELSE
PondGHENum=CompIndex
IF (PondGHENum > NumOfPondGHEs .or. PondGHENum < 1) THEN
CALL ShowFatalError('SimPondGroundHeatExchanger: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(PondGHENum))// &
', Number of Units='//TRIM(TrimSigDigits(NumOfPondGHEs))// &
', Entered Unit name='//TRIM(CompName))
ENDIF
IF (CheckEquipName(PondGHENum)) THEN
IF (CompName /= PondGHE(PondGHENum)%Name) THEN
CALL ShowFatalError('SimPondGroundHeatExchanger: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(PondGHENum))// &
', Unit name='//TRIM(CompName)//', stored Unit Name for that index='// &
TRIM(PondGHE(PondGHENum)%Name))
ENDIF
CheckEquipName(PondGHENum)=.false.
ENDIF
ENDIF
IF (InitLoopEquip) THEN
CALL InitPondGroundHeatExchanger(PondGHENum,FirstHVACIteration,RunFlag)
Maxload = PondGHE(PondGHENum)%DesignCapacity
MinLoad = 0.d0
OptLoad = PondGHE(PondGHENum)%DesignCapacity
RETURN
ENDIF
! initialize
CALL InitPondGroundHeatExchanger(PondGHENum,FirstHVACIteration,RunFlag)
! make the calculations
CALL CalcPondGroundHeatExchanger(PondGHENum)
! update vaiables
CALL UpdatePondGroundHeatExchanger(PondGHENum)
! update report variables
CALL ReportPondGroundHeatExchanger(PondGHENum)
RETURN
END SUBROUTINE SimPondGroundHeatExchanger