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) | :: | PondGHENum |
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 CalcPondGroundHeatExchanger(PondGHENum)
! AUTHOR Simon Rees
! DATE WRITTEN August 2002
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine does all of the stuff that is necessary to simulate
! a pond ground heat exchanger. Calls are made to appropriate subroutines
! either in this module or outside of it.
! METHODOLOGY EMPLOYED:
! The differential equation defined by the heat balance is solved using
! a fourth order Runge-Kutta numerical integration method. The differential
! equation is:
! Mdot*Cp*dT/dt = Sum of fluxes.
! 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 DataLoopNode, ONLY : Node
USE DataHVACGlobals, ONLY : TimeStepSys
USE FluidProperties, ONLY : GetSpecificHeatGlycol, GetDensityGlycol
USE DataGlobals, ONLY : SimTimeSteps, CurrentTime, BeginDayFlag, SecInHour
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: PondGHENum ! Number of the Pond GHE
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: PondTempStar
REAL(r64) :: PondTempStarStar
REAL(r64) :: PondTempStarStarStar
REAL(r64) :: Flux
REAL(r64) :: FluxStar
REAL(r64) :: FluxStarStar
REAL(r64) :: NewPondTemp
REAL(r64) :: SpecificHeat
REAL(r64) :: PondMass
PondMass = PondDepth*PondArea* &
GetDensityGlycol('WATER',MAX(PondTemp, constant_zero), &
WaterIndex,'CalcPondGroundHeatExchanger')
SpecificHeat = GetSpecificHeatGlycol('WATER',MAX(PondTemp, constant_zero), &
WaterIndex,'CalcPondGroundHeatExchanger') !DSU bug fix here, was using working fluid index
Flux = CalcTotalFLux(PondTemp,PondGHENum)
PondTempStar = PastPondTemp + 0.5d0*SecInHour*TimeStepSys*Flux/ (SpecificHeat*PondMass)
FluxStar = CalcTotalFLux(PondTempStar,PondGHENum)
PondTempStarStar = PastPondTemp + 0.5d0*SecInHour*TimeStepSys*FluxStar/ (SpecificHeat*PondMass)
FluxStarStar = CalcTotalFLux(PondTempStarStar,PondGHENum)
PondTempStarStarStar = PastPondTemp + SecInHour*TimeStepSys*FluxStarStar/(SpecificHeat*PondMass)
NewPondTemp = PastPondTemp + SecInHour*TimeStepSys*(Flux+2.0d0*FluxStar + 2.0d0*FluxStarStar + &
CalcTotalFLux(PondTempStarStarStar,PondGHENum)) / &
(6.0d0*SpecificHeat*PondMass)
PondTemp = NewPondTemp
END SUBROUTINE CalcPondGroundHeatExchanger