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 | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | PondBulkTemp | |||
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.
FUNCTION CalcTotalFLux(PondBulkTemp,PondGHENum)
! AUTHOR Simon Rees
! DATE WRITTEN August 2002
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Thic calculates the summation of the heat fluxes on the pond for a
! given pond temperature. The following heat fluxes are calculated:
! convection,
! long-wave radiation,
! solar gain,
! evaporation,
! ground conduction,
! along with heat exchange with the fluid
! METHODOLOGY EMPLOYED:
! Convection is calculated with the ASHRAE simple convection coefficients.
! Evaporation is calculated assuming a fixed Lewis number - not as in
! Chaisson model. Heat transfer with the fluid is calculated using a heat
! exchanger Effectiveness-NTU method, where the pond is seen as a static
! fluid - this is also different from Chaisson's original model (assumed
! pond at average of inlet and outlet temps).
! 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.
! Hull, J.R., K.V. Liu, W.T. Sha, J. Kamal, and C.E. Nielsen, 1984.
! Dependence of Ground Heat Losses Upon Solar Pond Size and Perimeter
! Insulation Calculated and Experimental Results. Solar Energy,33(1):25-33.
! USE STATEMENTS:
USE DataEnvironment, ONLY: OutDryBulbTempAt,OutWetBulbTempAt,WindSpeedAt,IsSnow,IsRain,SkyTemp,OutBaroPress, &
GroundTemp_Deep
USE FluidProperties, ONLY : GetSpecificHeatGlycol
USE ConvectionCoefficients, ONLY : CalcASHRAESimpExtConvectCoeff
USE DataGlobals
USE DataHeatBalance, ONLY: VeryRough
USE Psychrometrics, ONLY:PsyCpAirFnWTdb,PsyWFnTdbTwbPb,PsyHfgAirFnWTdb
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64) :: CalcTotalFLux ! function return variable
REAL(r64), INTENT(IN) :: PondBulkTemp ! pond temp for this flux calculation
INTEGER, INTENT(IN) :: PondGHENum ! Number of the Pond GHE
! FUNCTION PARAMETER DEFINITIONS:
REAL(r64), PARAMETER :: PrantlAir = 0.71d0 ! Prantl number for air - assumed constant
REAL(r64), PARAMETER :: SchmidtAir = 0.6d0 ! Schmidt number for air - assumed constant
REAL(r64), PARAMETER :: PondHeight = 0.0d0 ! for now
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: ConvCoef ! convection coefficient
REAL(r64) :: ExternalTemp ! external environmental temp - drybulb or wetbulb
REAL(r64) :: FluxSolAbsorbed ! absorbed solar flux
REAL(r64) :: FluxLongwave ! absorbed longwave flux
REAL(r64) :: FluxConvect ! convective flux
REAL(r64) :: FluxEvap ! evaporative heat flux
REAL(r64) :: FluxGround ! ground heat transfer flux
REAL(r64) :: Qfluid ! convective flux
REAL(r64) :: SurfTempAbs ! absolute value of surface temp
REAL(r64) :: SkyTempAbs ! absolute value of sky temp
REAL(r64) :: ThermalAbs ! thermal absorptivity
REAL(r64) :: SpecHeat ! specific heat capacity
REAL(r64) :: HumRatioFilm ! humidity ratio at pond surface/film temperature
REAL(r64) :: HumRatioAir ! humidity ratio of air
REAL(r64) :: SpecHeatAir ! air specific heat
REAL(r64) :: LatentHeatAir ! latent heat of air
REAL(r64) :: UvalueGround ! ground heat transfer coefficient
REAL(r64) :: Perimeter ! pond perimeter
REAL(r64) :: OutDryBulb ! drybulb at pond height
REAL(r64) :: OutWetBulb ! wetbulb at pond height
! make a surface heat balance and solve for temperature
ThermalAbs = 0.9d0
! set appropriate external temp
! use height dependency -- if there was a height for this unit, it could be inserted.
! parameter PondHeight=0.0 is used.
OutDryBulb=OutDryBulbTempAt(PondHeight)
OutWetBulb=OutWetBulbTempAt(PondHeight)
IF(IsSnow)THEN
ExternalTemp = OutWetBulb
ELSE IF(IsRain)THEN
ExternalTemp = OutWetBulb
ELSE ! normal dry conditions
ExternalTemp = OutDryBulb
END IF
! absolute temperatures
SurfTempAbs = PondBulkTemp + KelvinConv
SkyTempAbs = SkyTemp + KelvinConv
! ASHRAE simple convection coefficient model for external surfaces.
ConvCoef = CalcASHRAESimpExtConvectCoeff(VeryRough,WindSpeedAt(PondHeight))
! convective flux
FluxConvect = ConvCoef*(PondBulkTemp - ExternalTemp)
! long-wave radiation between pond and sky.
FluxLongwave = StefBoltzmann*ThermalAbs*((SurfTempAbs**4)-(SkyTempAbs**4))
! total absorbed solar using function - no ground solar
FluxSolAbsorbed = CalcSolarFlux()
! specific heat from fluid prop routines
SpecHeat = GetSpecificHeatGlycol(PlantLoop(PondGHE(PondGHENum)%LoopNum)%FluidName,MAX(InletTemp,0.0d0), &
PlantLoop(PondGHE(PondGHENum)%LoopNum)%FluidIndex,'PondGroundHeatExchanger:CalcTotalFlux')
! heat transfer with fluid - heat exchanger analogy.
Qfluid = FlowRate*SpecHeat*CalcEffectiveness(InletTemp,PondBulkTemp,FlowRate,PondGHENum)* &
(InletTemp - PondBulkTemp)
HeatTransRate = Qfluid
! evaporation flux
! get air properties
HumRatioAir = PsyWFnTdbTwbPb(OutDrybulb, OutWetBulb, OutBaroPress)
HumRatioFilm = PsyWFnTdbTwbPb(PondBulkTemp, PondBulkTemp, OutBaroPress)
SpecHeatAir = PsyCpAirFnWTdb(HumRatioAir, OutDrybulb)
LatentHeatAir = PsyHfgAirFnWTdb(HumRatioAir, OutDrybulb,'PondGroundHeatExchanger:CalcTotalFlux')
FluxEvap = (PrantlAir/SchmidtAir)**2.0d0/3.0d0 * ConvCoef/SpecHeatAir * &
(HumRatioFilm - HumRatioAir) * LatentHeatAir
! ground heat transfer flux
Perimeter = 4.0d0*SQRT(PondArea) ! square assumption
UvalueGround = 0.999d0*(GrndConductivity/PondDepth) + 1.37d0*(GrndConductivity*Perimeter/PondArea)
FluxGround = UvalueGround * (PondBulkTemp - GroundTemp_Deep)
CalcTotalFLux = Qfluid + PondArea*(FluxSolAbsorbed - FluxConvect - FluxLongwave - &
FluxEvap - FluxGround)
IF(BeginTimeStepFlag)THEN
END IF
END FUNCTION CalcTotalFLux