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) | :: | PipeHTNum | |||
real(kind=r64), | intent(in) | :: | Temperature | |||
real(kind=r64), | intent(in) | :: | MassFlowRate | |||
real(kind=r64), | intent(in) | :: | Diameter |
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 CalcPipeHeatTransCoef(PipeHTNum,Temperature,MassFlowRate,Diameter)
! FUNCTION INFORMATION:
! AUTHOR Simon Rees
! DATE WRITTEN July 2007
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine calculates pipe/fluid heat transfer coefficients.
! This routine is adapted from that in the low temp radiant surface model.
! METHODOLOGY EMPLOYED:
! Currently assumes water data when calculating Pr and Re
! 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 DataPlant, ONLY: PlantLoop
USE FluidProperties, ONLY: GetConductivityGlycol, GetViscosityGlycol
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: PipeHTNum
REAL(r64), INTENT(IN) :: Temperature ! Temperature of water entering the surface, in C
REAL(r64), INTENT(IN) :: MassFlowRate ! Mass flow rate, in kg/s
REAL(r64), INTENT(IN) :: Diameter ! Pipe diameter, m
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(*), PARAMETER :: RoutineName = 'PipeHeatTransfer::CalcPipeHeatTransCoef: '
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/)
! 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) :: Kactual
REAL(r64) :: MUactual
REAL(r64) :: PRactual
INTEGER :: LoopNum
!retrieve loop index for this component so we can look up fluid properties
LoopNum = PipeHT(PipeHTNum)%LoopNum
!since the fluid properties routine doesn't have Prandtl, we'll just use water values
Index = 1
DO WHILE (Index <= NumOfPropDivisions)
IF (Temperature < Temps(Index)) THEN
IF (Index == 1) THEN
PRactual = Pr(Index)
ELSE IF (Index > NumOfPropDivisions) THEN
PRactual = Pr(NumOfPropDivisions) !CR 8566
ELSE
InterpFrac = (Temperature-Temps(Index-1))/(Temps(Index)-Temps(Index-1))
PRactual = Pr(Index-1) + InterpFrac*(Pr(Index)-Pr(Index-1))
END IF
EXIT ! DO loop
ELSE !CR 8566
PRactual = Pr(NumOfPropDivisions)
END IF
Index = Index + 1
END DO
!look up conductivity and viscosity
Kactual = GetConductivityGlycol(PlantLoop(LoopNum)%FluidName, &
PipeHT(PipeHTNum)%FluidTemp(0), &
PlantLoop(LoopNum)%FluidIndex, &
RoutineName) !W/m-K
MuActual = GetViscosityGlycol(PlantLoop(LoopNum)%FluidName, &
PipeHT(PipeHTNum)%FluidTemp(0), &
PlantLoop(LoopNum)%FluidIndex, &
RoutineName) / 1000.0d0 !Note fluid properties routine returns mPa-s, we need Pa-s
! Calculate the Reynold's number from RE=(4*Mdot)/(Pi*Mu*Diameter) - as RadiantSysLowTemp
ReD = 4.0d0 * MassFlowRate / ( PI * MUactual * Diameter)
IF (ReD == 0.0d0) THEN ! No flow
!For now just leave it how it was doing it before
NuD = 3.66d0
!Although later it would be nice to have a natural convection correlation
ELSE ! 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
ENDIF
CalcPipeHeatTransCoef = Kactual * NuD / Diameter
RETURN
END FUNCTION CalcPipeHeatTransCoef