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) | :: | RadSysNum | |||
integer, | intent(in) | :: | SystemType | |||
real(kind=r64), | intent(in) | :: | Temperature | |||
real(kind=r64), | intent(in) | :: | WaterMassFlow | |||
real(kind=r64), | intent(in) | :: | FlowFraction | |||
real(kind=r64), | intent(in) | :: | NumCircs | |||
real(kind=r64), | intent(in) | :: | TubeLength | |||
real(kind=r64), | intent(in) | :: | TubeDiameter | |||
integer, | intent(inout) | :: | GlycolIndex |
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 CalcRadSysHXEffectTerm(RadSysNum,SystemType, Temperature,WaterMassFlow, &
FlowFraction,NumCircs,TubeLength,TubeDiameter,GlycolIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Rick Strand
! DATE WRITTEN December 2000
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine calculates the radiant system "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 heat exchanger (radiant system "coil").
! METHODOLOGY EMPLOYED:
! Assumes that the only real 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 inside surface temperature
! is equal to the "source location temperature" and that it is
! a CONSTANT throughout the radiant system. This is to make
! the problem more tractable and to fit with other system assumptions
! that were made elsewhere in the radiant system model.
! REFERENCES:
! 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 FluidProperties, ONLY : GetSpecificHeatGlycol
USE DataPlant, ONLY : PlantLoop
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: RadSysNum ! Index number of radiant system under consideration !unused1208
INTEGER, INTENT(IN) :: SystemType ! Type of radiant system: hydronic, constant flow, or electric
REAL(r64), INTENT(IN) :: Temperature ! Temperature of water entering the radiant system, in C
REAL(r64), INTENT(IN) :: WaterMassFlow ! Mass flow rate of water in the radiant system, in kg/s
REAL(r64), INTENT(IN) :: FlowFraction ! Mass flow rate fraction for this surface in the radiant system
REAL(r64), INTENT(IN) :: NumCircs ! Number of fluid circuits in this surface
REAL(r64), INTENT(IN) :: TubeLength ! Length of tubing in the radiant system, in m
REAL(r64), INTENT(IN) :: TubeDiameter ! Inside diameter of the tubing in the radiant system, in m
INTEGER, INTENT(INOUT) :: GlycolIndex ! Index for the fluid used in this radiant system
! SUBROUTINE PARAMETER DEFINITIONS:
REAL(r64), PARAMETER :: MaxLaminarRe = 2300.d0 ! Maximum Reynolds number for laminar flow
INTEGER, PARAMETER :: NumOfPropDivisions = 13
REAL(r64), PARAMETER :: MaxExpPower = 50.d0 ! Maximum power after which EXP argument would be zero for DP variables
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) :: NTU
REAL(r64) :: CpWater
REAL(r64) :: Kactual
REAL(r64) :: MUactual
REAL(r64) :: PRactual
REAL(r64) :: Eff ! HX effectiveness
! 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
SELECT CASE( SystemType )
CASE (HydronicSystem)
SELECT CASE (OperatingMode)
CASE (HeatingMode)
CpWater = GetSpecificHeatGlycol(PlantLoop(HydrRadSys(RadSysNum)%HWLoopNum)%FluidName, &
60.d0, &
PlantLoop(HydrRadSys(RadSysNum)%HWLoopNum)%FluidIndex, &
'CalcRadSysHXEffectTerm')
CASE (CoolingMode)
CpWater = GetSpecificHeatGlycol(PlantLoop(HydrRadSys(RadSysNum)%CWLoopNum)%FluidName, &
Temperature, &
PlantLoop(HydrRadSys(RadSysNum)%CWLoopNum)%FluidIndex, &
'CalcRadSysHXEffectTerm')
END SELECT
CASE (ConstantFlowSystem)
SELECT CASE (OperatingMode)
CASE (HeatingMode)
CpWater = GetSpecificHeatGlycol(PlantLoop(CFloRadSys(RadSysNum)%HWLoopNum)%FluidName, &
Temperature, &
PlantLoop(CFloRadSys(RadSysNum)%HWLoopNum)%FluidIndex, &
'CalcRadSysHXEffectTerm')
CASE (CoolingMode)
CpWater = GetSpecificHeatGlycol(PlantLoop(CFloRadSys(RadSysNum)%CWLoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(CFloRadSys(RadSysNum)%CWLoopNum)%FluidIndex, &
'CalcRadSysHXEffectTerm')
END SELECT
END SELECT
! Calculate the Reynold's number from RE=(4*Mdot)/(Pi*Mu*Diameter)
ReD = 4.0d0 * WaterMassFlow * FlowFraction / ( PI * MUactual * TubeDiameter * NumCircs )
! 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 * TubeLength / (WaterMassFlow * CpWater) ! FlowFraction cancels out here
! Calculate Epsilon*MassFlowRate*Cp
IF (NTU > MaxExpPower) THEN
Eff = 1.0d0
CalcRadSysHXEffectTerm = FlowFraction*WaterMassFlow*CpWater
ELSE
Eff = (1.0d0 - EXP(-NTU))
CalcRadSysHXEffectTerm = (1.0d0-EXP(-NTU))*FlowFraction*WaterMassFlow*CpWater
END IF
RETURN
END FUNCTION CalcRadSysHXEffectTerm