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) | :: | SurfaceGHENum | |||
real(kind=r64), | intent(in) | :: | Temperature | |||
real(kind=r64), | intent(in) | :: | WaterMassFlow |
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.
REAL(r64) FUNCTION CalcHXEffectTerm(SurfaceGHENum,Temperature,WaterMassFlow)
! SUBROUTINE INFORMATION:
! AUTHOR Rick Strand
! DATE WRITTEN December 2000
! MODIFIED Simon Rees, August 2002
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine calculates the "heat exchanger"
! effectiveness term. This is equal to the mass flow rate of water
! times the specific heat of water times the effectiveness of
! the surface heat exchanger. This routine is adapted from that in
! the low temp radiant surface model.
! METHODOLOGY EMPLOYED:
! Assumes that the only REAL(r64) heat transfer term that we have to
! deal with is the convection from the water to the tube. The
! other assumptions are that the tube bottom surface temperature
! is equal to the "source location temperature" and that it is
! a CONSTANT throughout the surface.
! REFERENCES:
! See RadiantSystemLowTemp module.
! Property data for water shown below as parameters taken from
! Incropera and DeWitt, Introduction to Heat Transfer, Table A.6.
! Heat exchanger information also from Incropera and DeWitt.
! Code based loosely on code from IBLAST program (research version)
! USE STATEMENTS:
USE DataGlobals, ONLY : PI
USE General, ONLY : RoundSigDigits
USE FluidProperties, ONLY : GetSpecificHeatGlycol
USE DataPlant, ONLY : PlantLoop
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: SurfaceGHENum ! Index number of surface under consideration
REAL(r64), INTENT(IN) :: Temperature ! Temperature of water entering the surface, in C
REAL(r64), INTENT(IN) :: WaterMassFlow ! Mass flow rate, in kg/s
! SUBROUTINE PARAMETER DEFINITIONS:
REAL(r64), PARAMETER :: MaxLaminarRe = 2300.d0 ! Maximum Reynolds number for laminar flow
INTEGER, PARAMETER :: NumOfPropDivisions = 13 ! intervals in property correlation
REAL(r64), PARAMETER, DIMENSION(NumOfPropDivisions) :: Temps= & ! Temperature, in C
(/1.85d0,6.85d0,11.85d0,16.85d0,21.85d0,26.85d0,31.85d0,36.85d0,41.85d0, &
46.85d0,51.85d0,56.85d0,61.85d0/)
REAL(r64), PARAMETER, DIMENSION(NumOfPropDivisions) :: Mu= & ! Viscosity, in Ns/m2
(/.001652d0,.001422d0,.001225d0,.00108d0,.000959d0,.000855d0,.000769d0,.000695d0, &
.000631d0,.000577d0,.000528d0,.000489d0,.000453d0/)
REAL(r64), PARAMETER, DIMENSION(NumOfPropDivisions) :: Conductivity= & ! Conductivity, in W/mK
(/.574d0,.582d0,.590d0,.598d0,.606d0,.613d0,.620d0,.628d0,.634d0,.640d0,.645d0,.650d0,.656d0/)
REAL(r64), PARAMETER, DIMENSION(NumOfPropDivisions) :: Pr= & ! Prandtl number (dimensionless)
(/12.22d0,10.26d0,8.81d0,7.56d0,6.62d0,5.83d0,5.20d0,4.62d0,4.16d0,3.77d0,3.42d0,3.15d0,2.88d0/)
INTEGER, PARAMETER :: WaterIndex = 1
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: Index
REAL(r64) :: InterpFrac
REAL(r64) :: NuD
REAL(r64) :: ReD
REAL(r64) :: NTU
REAL(r64) :: CpWater
REAL(r64) :: Kactual
REAL(r64) :: MUactual
REAL(r64) :: PRactual
REAL(r64) :: PipeLength
! INTEGER, SAVE :: ErrCount
! FLOW:
! First find out where we are in the range of temperatures
Index = 1
DO WHILE (Index <= NumOfPropDivisions)
IF (Temperature < Temps(Index)) EXIT ! DO loop
Index = Index + 1
END DO
! Initialize thermal properties of water
IF (Index == 1) THEN
MUactual = Mu(Index)
Kactual = Conductivity(Index)
PRactual = Pr(Index)
ELSE IF (Index > NumOfPropDivisions) THEN
Index = NumOfPropDivisions
MUactual = Mu(Index)
Kactual = Conductivity(Index)
PRactual = Pr(Index)
ELSE
InterpFrac = (Temperature-Temps(Index-1))/(Temps(Index)-Temps(Index-1))
MUactual = Mu(Index-1) + InterpFrac*(Mu(Index)-Mu(Index-1))
Kactual = Conductivity(Index-1) + InterpFrac*(Conductivity(Index)-Conductivity(Index-1))
PRactual = Pr(Index-1) + InterpFrac*(Pr(Index)-Pr(Index-1))
END IF
! arguments are glycol name, temperature, and concentration
IF (Temperature < 0.d0) THEN ! check if fluid is water and would be freezing
IF(PlantLoop(SurfaceGHE(SurfaceGHENum)%LoopNum)%FluidIndex == WaterIndex) THEN
IF (SurfaceGHE(SurfaceGHENum)%FrozenErrIndex1 == 0) THEN
CALL ShowWarningMessage('GroundHeatExchanger:Surface="'//trim(SurfaceGHE(SurfaceGHENum)%Name)// &
'", water is frozen; Model not valid. Calculated Water Temperature=['// &
trim(RoundSigDigits(InletTemp,2))//'] C')
CALL ShowContinueErrorTimeStamp(' ')
ENDIF
CALL ShowRecurringWarningErrorAtEnd('GroundHeatExchanger:Surface="'//trim(SurfaceGHE(SurfaceGHENum)%Name)// &
'", water is frozen',SurfaceGHE(SurfaceGHENum)%FrozenErrIndex1, ReportMinOf=InletTemp,ReportMinUnits='[C]', &
ReportMaxOf=InletTemp,ReportMaxUnits='[C]')
InletTemp = MAX(InletTemp, 0.0d0)
ENDIF
ENDIF
CpWater = GetSpecificHeatGlycol(PlantLoop(SurfaceGHE(SurfaceGHENum)%LoopNum)%FluidName,Temperature, &
PlantLoop(SurfaceGHE(SurfaceGHENum)%LoopNum)%FluidIndex,'SurfaceGroundHeatExchanger:CalcHXEffectTerm')
! Calculate the Reynold's number from RE=(4*Mdot)/(Pi*Mu*Diameter)
ReD = 4.0d0 * WaterMassFlow / ( PI * MUactual * SurfaceGHE(SurfaceGHENum)%TubeDiameter * &
SurfaceGHE(SurfaceGHENum)%TubeCircuits)
! Calculate the Nusselt number based on what flow regime one is in
IF (ReD >= MaxLaminarRe) THEN ! Turbulent flow --> use Colburn equation
NuD = 0.023d0*(ReD**(0.8d0))*(PRactual**(1.d0/3.d0))
ELSE ! Laminar flow --> use constant surface temperature relation
NuD = 3.66d0
END IF
! Calculate the NTU parameter
! NTU = UA/[(Mdot*Cp)min]
! where: U = h (convection coefficient) and h = (k)(Nu)/D
! A = Pi*D*TubeLength
! NTU = PI * Kactual * NuD * SurfaceGHE(SurfaceGHENum)%TubeLength / (WaterMassFlow * CpWater)
PipeLength = SurfaceGHE(SurfaceGHENum)%SurfaceLength * SurfaceGHE(SurfaceGHENum)%SurfaceWidth / &
SurfaceGHE(SurfaceGHENum)%TubeSpacing
NTU = PI * Kactual * NuD * PipeLength / (WaterMassFlow * CpWater)
! Calculate Epsilon*MassFlowRate*Cp
IF (-NTU >= EXP_LowerLimit) THEN
CalcHXEffectTerm = (1.0d0-EXP(-NTU))*WaterMassFlow*CpWater
ELSE
CalcHXEffectTerm = 1.0d0*WaterMassFlow*CpWater
ENDIF
RETURN
END FUNCTION CalcHXEffectTerm