SUBROUTINE CalcLowTempCFloRadSysComps(RadSysNum,MainLoopNodeIn,Iteration,LoadMet)
! SUBROUTINE INFORMATION:
! AUTHOR Rick Strand
! DATE WRITTEN August 2003
! MODIFIED Sep 2011 LKL/BG - resimulate only zones needing it for Radiant systems
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine solves the radiant system based on how much water is (and
! the conditions of the water) supplied to the radiant system. The purpose
! of this subroutine is similar to CalcLowTempHydrRadSysComps except that
! it solves this for a constant flow hydronic radiant system.
! METHODOLOGY EMPLOYED:
! Use heat exchanger formulas to obtain the heat source/sink for the radiant
! system based on the inlet conditions and flow rate of water. Once that is
! determined, recalculate the surface heat balances to reflect this heat
! addition/subtraction. The load met by the system is determined by the
! difference between the convection from all surfaces in the zone when
! there was no radiant system output and with a source/sink added.
! REFERENCES:
! IBLAST-QTF research program, completed in January 1995 (unreleased)
! Strand, R.K. 1995. "Heat Source Transfer Functions and Their Application to
! Low Temperature Radiant Heating Systems", Ph.D. dissertation, University
! of Illinois at Urbana-Champaign, Department of Mechanical and Industrial
! Engineering.
! USE STATEMENTS:
USE DataEnvironment, ONLY : OutBaroPress
USE General, ONLY : RoundSigDigits
USE DataHeatBalance, ONLY : Construct, Zone
USE DataHeatBalFanSys, ONLY : RadSysTiHBConstCoef, &
RadSysTiHBToutCoef,RadSysTiHBQsrcCoef, &
RadSysToHBConstCoef,RadSysToHBTinCoef, &
RadSysToHBQsrcCoef,CTFTsrcConstPart, &
ZoneAirHumRat
USE DataHeatBalSurface, ONLY : TH
USE DataLoopNode, ONLY : Node
USE DataSurfaces, ONLY : Surface, HeatTransferModel_CondFD, HeatTransferModel_CTF
USE FluidProperties, ONLY : GetSpecificHeatGlycol
USE PlantUtilities, ONLY : SetComponentFlowRate
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: RadSysNum ! Index for the low temperature radiant system under consideration
INTEGER, INTENT(IN) :: MainLoopNodeIn ! Node number on main loop of the inlet node to the radiant system
LOGICAL, INTENT(IN) :: Iteration ! FALSE for the regular solution, TRUE when we had to loop back
! through and figure out more information (i.e., did not know the
! inlet temperature directly)
REAL(r64), INTENT(INOUT) :: LoadMet ! Load met by the low temperature radiant system, in Watts
! SUBROUTINE PARAMETER DEFINITIONS:
REAL(r64), PARAMETER :: CondDeltaTemp = 1.0d0 ! How close the surface temperatures can get to the dewpoint temperature of a space
! before the radiant cooling system shuts off the flow.
REAL(r64), PARAMETER :: TempCheckLimit = 0.1d0 ! Maximum allowed temperature difference between outlet temperature calculations
REAL(r64), PARAMETER :: ZeroSystemResp = 0.1d0 ! Response below which the system response is really zero
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: ConstrNum ! Index for construction number in Construct derived type
REAL(r64) :: Cp ! Intermediate calculational variable for specific heat of water
REAL(r64) :: DewPointTemp ! Dew-point temperature based on the zone air conditions
REAL(r64) :: EpsMdotCp ! Epsilon (heat exchanger terminology) times water mass flow rate times water specific heat
REAL(r64) :: LoopTerm ! Intermeidate calculation variable for determining the water inlet temperature
REAL(r64) :: Mdot ! Intermediate calculation variable for mass flow rate in a surface within the radiant system
INTEGER :: RadSurfNum ! DO loop counter for the surfaces that comprise a particular radiant system
INTEGER :: RadSurfNum2 ! DO loop counter for the surfaces that comprise a particular radiant system
INTEGER :: RadSurfNum3 ! DO loop counter for the surfaces that comprise a particular radiant system
REAL(r64) :: RecircTerm ! Intermeidate calculation variable for determining the water inlet temperature
REAL(r64) :: SumFlowFracCkCm ! Summation of surface flow fraction, Ck, and Cm product for each surface in the system
REAL(r64) :: SumFlowFracOneMinusCm ! Summation of surface flow fraction times (1-Cm) for each surface in the radiant system
INTEGER :: SurfNum ! Index for radiant surface in Surface derived type
INTEGER :: SurfNum2 ! Index for radiant surface in Surface derived type
REAL(r64) :: TotalRadSysPower ! Total heat source/sink to radiant system
REAL(r64) :: TwiCoeff ! Intermeidate calculation variable for determining the water inlet temperature
REAL(r64) :: WaterMassFlow ! Water mass flow rate in the radiant system, kg/s
INTEGER :: WaterNodeIn ! Node number of the water entering the radiant system
REAL(r64) :: WaterOutletTempCheck ! Radiant system water outlet temperature (calculated from mixing all outlet streams together)
REAL(r64) :: WaterTempIn ! Temperature of the water entering the radiant system, in C
INTEGER :: ZoneNum ! number of zone being served
REAL(r64) :: ZoneMult ! Zone multiplier for this system
REAL(r64) :: Ca,Cb,Cc,Cd,Ce,Cf,Cg,Ch,Ci,Cj,Ck,Cl ! Coefficients to relate the inlet water temperature to the heat source
! For more info on Ca through Cl, see comments below
REAL(r64), SAVE, DIMENSION(:), ALLOCATABLE :: Ckj, Cmj ! Coefficients for individual surfaces within a radiant system
REAL(r64), SAVE, DIMENSION(:), ALLOCATABLE :: WaterTempOut ! Array of outlet water temperatures for
! each surface in the radiant system
LOGICAL, SAVE :: FirstTimeFlag=.true. ! for setting size of Ckj, Cmj, WaterTempOut arrays
! FLOW:
! First, apply heat exchanger logic to find the heat source/sink to the system.
! This involves finding out the heat transfer characteristics of the hydronic
! loop and then applying the equations derived on pp. 113-118 of the dissertation.
IF (FirstTimeFlag) THEN
ALLOCATE (Ckj(MaxCloNumOfSurfaces))
ALLOCATE (Cmj(MaxCloNumOfSurfaces))
ALLOCATE (WaterTempOut(MaxCloNumOfSurfaces))
FirstTimeFlag=.false.
ENDIF
Ckj = 0.0d0
Cmj = 0.0d0
WaterTempOut = CFloRadSys(RadSysNum)%WaterInletTemp
! Set the conditions on the water side inlet
SELECT CASE(OperatingMode)
CASE (HeatingMode)
WaterNodeIn = CFloRadSys(RadSysNum)%HotWaterInNode
CASE (CoolingMode)
WaterNodeIn = CFloRadSys(RadSysNum)%ColdWaterInNode
CASE DEFAULT
CALL ShowSevereError('Illegal low temperature radiant system operating mode')
CALL ShowContinueError('Occurs in Radiant System='//TRIM(CFloRadSys(RadSysNum)%Name))
CALL ShowFatalError('Preceding condition causes termination.')
END SELECT
ZoneNum = CFloRadSys(RadSysNum)%ZonePtr
ZoneMult = REAL(Zone(ZoneNum)%Multiplier * Zone(ZoneNum)%ListMultiplier,r64)
WaterMassFlow = CFloRadSys(RadSysNum)%WaterMassFlowRate / ZoneMult
WaterTempIn = CFloRadSys(RadSysNum)%WaterInletTemp
IF (WaterMassFlow <= 0.0d0) THEN
! No flow or below minimum allowed so there is no heat source/sink
! This is possible with a mismatch between system and plant operation
! or a slight mismatch between zone and system controls. This is not
! necessarily a "problem" so this exception is necessary in the code.
DO RadSurfNum = 1, CFloRadSys(RadSysNum)%NumOfSurfaces
SurfNum = CFloRadSys(RadSysNum)%SurfacePtr(RadSurfNum)
QRadSysSource(SurfNum) = 0.0D0
IF (Surface(SurfNum)%ExtBoundCond > 0 .AND. Surface(SurfNum)%ExtBoundCond /= SurfNum) &
QRadSysSource(Surface(SurfNum)%ExtBoundCond) = 0.0D0 ! Also zero the other side of an interzone
END DO
CFloRadSys(RadSysNum)%WaterOutletTemp = CFloRadSys(RadSysNum)%WaterInletTemp
ELSE
DO RadSurfNum = 1, CFloRadSys(RadSysNum)%NumOfSurfaces
SurfNum = CFloRadSys(RadSysNum)%SurfacePtr(RadSurfNum)
! Determine the heat exchanger "effectiveness" term
EpsMdotCp = CalcRadSysHXEffectTerm(RadSysNum,ConstantFlowSystem,WaterTempIn,WaterMassFlow, &
CFloRadSys(RadSysNum)%SurfaceFlowFrac(RadSurfNum), &
CFloRadSys(RadSysNum)%NumCircuits(RadSurfNum), &
CFloRadSys(RadSysNum)%TubeLength, &
CFloRadSys(RadSysNum)%TubeDiameter, &
CFloRadSys(RadSysNum)%GlycolIndex)
! Obtain the heat balance coefficients and calculate the intermediate coefficients
! linking the inlet water temperature to the heat source/sink to the radiant system.
! The coefficients are based on the following development...
! The heat balance equations at the outside and inside surfaces are of the form:
! Tinside = Ca + Cb*Toutside + Cc*q"
! Toutside = Cd + Ce*Tinside + Cf*q"
! Tsource = Cg + Ch*q" + Ci*Tinside + Cj*Toutside
! where:
! Tinside is the temperature at the inside surface
! Toutside is the temperature at the outside surface
! Tsource is the temperature within the radiant system at the location of the source/sink
! Ca is all of the other terms in the inside heat balance (solar, LW exchange, conduction history terms, etc.)
! Cb is the current cross CTF term
! Cc is the QTF inside term for the current heat source/sink
! Cd is all of the other terms in the outside heat balance (solar, LW exchange, conduction history terms, etc.)
! Ce is the current cross CTF term (should be equal to Cb)
! Cf is the QTF outside term for the current heat source/sink
! Cg is the summation of all temperature and source history terms at the source/sink location
! Ch is the QTF term at the source/sink location for the current heat source/sink
! Ci is the CTF inside term for the current inside surface temperature
! Cj is the CTF outside term for the current outside surface temperature
! Note that it is necessary to not use "slow conduction" assumptions because the
! source/sink has an impact on BOTH the inside and outside surface heat balances.
! Hence the more general formulation.
! The first two T equations above can be solved to remove the other surface temperature.
! This results in the following equations:
! Tinside = Ca + Cb*(Cd + Ce*Tinside + Cf*q") + Cc*q" or...
! Tinside = (Ca + Cb*Cd + (Cc+Cb*Cf)*q") / (1 - Ce*Cb)
! Toutside = Cd + Ce*(Ca + Cb*Toutside + Cc*q") + Cf*q" or...
! Toutside = (Cd + Ce*Ca + (Cf+Ce*Cc)*q") / (1 - Ce*Cb)
! Substituting the new equations for Tinside and Toutside as a function of C and q"
! into the equation for Tsource...
! Tsource = Cg + Ch*q" + Ci*((Ca + Cb*Cd + (Cc+Cb*Cf)*q") / (1 - Ce*Cb)) &
! + Cj*((Cd + Ce*Ca + (Cf+Ce*Cc)*q") / (1 - Ce*Cb))
! Or rearranging this to get Tsource as a function of q", we get...
! Tsource = Cg + ((Ci*(Ca + Cb*Cd) + Cj*(Cd + Ce*Ca))/(1-Ce*Cb)) &
! +(Ch + ((Ci*(Cc + Cb*Cf) + Cj*(Cf + Ce*Cc))/(1-Ce*Cb)))*q"
! Or in a slightly simpler form...
! Tsource = Ck + Cl*q"
! where:
! Ck = Cg + ((Ci*(Ca + Cb*Cd) + Cj*(Cd + Ce*Ca))/(1-Ce*Cb))
! Cl = Ch + ((Ci*(Cc + Cb*Cf) + Cj*(Cf + Ce*Cc))/(1-Ce*Cb))
! Note also that from heat exchanger "algebra", we have:
! q = epsilon*qmax and qmax = Mdot*Cp*(Twaterin-Tsource)
! So...
! q" = q/Area = (epsilon*Mdot*Cp/Area)*(Twaterin-Tsource)
! Or rearranging this equation:
! Tsource = -(q"*A/(epsilon*Mdot*Cp)) + Twaterin
! Setting this equation equal to the other equation for Tsource a couple lines up
! and rearranging to solve for q"...
! q" = (Twaterin - Ck) / (Cl + (A/(epsilon*Mdot*Cp))
! or
! q = (Twaterin - Ck) / ((Cl/A) + (1/epsilon*Mdot*Cp))
! or
! q = epsilon*Mdot*Cp*(Twaterin - Ck) / (1+(epsilon*Mdot*Cp*Cl/A))
! which is the desired result, that is the heat source or sink to the radiant
! system as a function of the water inlet temperature (flow rate is also in there
! as well as all of the heat balance terms "hidden" in Ck and Cl).
ConstrNum = Surface(SurfNum)%Construction
Ca = RadSysTiHBConstCoef(SurfNum)
Cb = RadSysTiHBToutCoef(SurfNum)
Cc = RadSysTiHBQsrcCoef(SurfNum)
Cd = RadSysToHBConstCoef(SurfNum)
Ce = RadSysToHBTinCoef(SurfNum)
Cf = RadSysToHBQsrcCoef(SurfNum)
Cg = CTFTsrcConstPart(SurfNum)
Ch = Construct(ConstrNum)%CTFTSourceQ(0)
Ci = Construct(ConstrNum)%CTFTSourceIn(0)
Cj = Construct(ConstrNum)%CTFTSourceOut(0)
Ck = Cg + ( ( Ci*(Ca+Cb*Cd) + Cj*(Cd+Ce*Ca) ) / ( 1.0d0 - Ce*Cb ) )
Cl = Ch + ( ( Ci*(Cc+Cb*Cf) + Cj*(Cf+Ce*Cc) ) / ( 1.0d0 - Ce*Cb ) )
Mdot = WaterMassFlow * CFloRadSys(RadSysNum)%SurfaceFlowFrac(RadSurfNum)
Cp = GetSpecificHeatGlycol('WATER',WaterTempIn,CFloRadSys(RadSysNum)%GlycolIndex,'CalcLowTempCFloRadSysComps')
IF (.NOT. Iteration) THEN
IF (Surface(SurfNum)%HeatTransferAlgorithm == HeatTransferModel_CTF) &
QRadSysSource(SurfNum) = EpsMdotCp * (WaterTempIn - Ck) &
/(1.0d0 + (EpsMdotCp*Cl/Surface(SurfNum)%Area) )
IF (Surface(SurfNum)%HeatTransferAlgorithm == HeatTransferModel_CondFD ) &
QRadSysSource(SurfNum) = EpsMdotCp * (WaterTempIn - TCondFDSourceNode(SurfNum))
IF (Surface(SurfNum)%ExtBoundCond > 0 .AND. Surface(SurfNum)%ExtBoundCond /= SurfNum) &
QRadSysSource(Surface(SurfNum)%ExtBoundCond) = QRadSysSource(SurfNum) ! Also set the other side of an interzone
WaterTempOut(RadSurfNum) = WaterTempIn - (QRadSysSource(SurfNum)/(Mdot*Cp))
ELSE ! (Iteration)
! In this case, we did not know the inlet temperature directly and have
! to figure it out as part of the solution. Thus, we have to do a little
! more algebra.
! The last equation in the previous block was:
! q = epsilon*Mdot*Cp*(Twaterin - Ck) / (1+(epsilon*Mdot*Cp*Cl/A))
! which combines with:
! q = Mdot*Cp*(Twaterin - Twaterout,j)
! so that:
! (Twaterin - Twaterout.j) = epsilon*(Twaterin - Ck) / (1+(epsilon*Mdot*Cp*Cl/A))
! Let:
! Cm = epsilonj / (1+(epsilonj*Mdot,j*Cp*Cl,j/A))
! for each surface in the radiant system. This results in:
! (Twaterin - Twaterout,j) = Cm,j*(Twaterin - Ck,j)
! Or:
! Twaterout,j = (1 - Cm,j)*Twaterin + Cm,j*Ck,j
! This holds for each surface that is part of the radiant system (j). To get the
! overall outlet temperature, we have to do a mixing calculation after all of the
! surfaces have been simulated:
! Twaterout = SUM(Fractionj*Twaterout,j)
! We also have to solve an energy balance at the mixing valve and add in pump heat.
! The energy balance at the mixing valve relates the loop inlet temperature (Tloopin)
! and the overall outlet temperature (Twaterout):
! Tpumpin = (Mdotloop/Mdotradsys)*Tloopin + (Mdotrecirc/Mdotradsys)*Twaterout
! This can then be related to the inlet water temperature to the radiant system
! after pump heat has been taken into account:
! Twaterin = (Mdotloop/Mdotradsys)*Tloopin + (Mdotrecirc/Mdotradsys)*Twaterout + PumpHeat/(Mdotradsys*Cp)
! Pluggin in the definition of Twaterout (sum equation above) and then the definition
! of each individual Twaterout,j equation (which is solely a function of Twaterin
! and coefficients), we can obtain an equation for Twaterin that consists of all
! known quantities. This requires us to calculate Ck,j and Cm,j for all the radiant
! surfaces in the system first and then coming up with a calculation for Twaterin.
! After than, individual Twaterout,j can be calculated along with QRadSysSource.
Ckj(RadSurfNum) = Ck
Cmj(RadSurfNum) = (EpsMdotCp/(Mdot*Cp))/(1.0d0+(EpsMdotCp*Cl/Surface(SurfNum)%Area))
IF (RadSurfNum == CFloRadSys(RadSysNum)%NumOfSurfaces) THEN ! Last one so we can now do the other calculations
! Equation for Twaterin is:
! Twaterin = (LoopTerm + RecircTerm)/(TwiCoeff)
! where:
! LoopTerm = (Mdotloop/Mdotradsys)*Tloopin + PumpHeat/(Mdotradsys*Cp)
! RecircTerm = (Mdotrecirc/Mdotradsys)*SUM(FlowFracj*Ck,j*Cm,j)
! TwiCoeff = 1 - (Mdotrecirc/Mdotradsys)*SUM(FlowFracj*(1 - Cm,j))
SumFlowFracCkCm = 0.0d0
SumFlowFracOneMinusCm = 0.0d0
DO RadSurfNum2 = 1, CFloRadSys(RadSysNum)%NumOfSurfaces
SumFlowFracCkCm = SumFlowFracCkCm &
+(CFloRadSys(RadSysNum)%SurfaceFlowFrac(RadSurfNum2)*Ckj(RadSurfNum)*Cmj(RadSurfNum2))
SumFlowFracOneMinusCm = SumFlowFracOneMinusCm &
+(CFloRadSys(RadSysNum)%SurfaceFlowFrac(RadSurfNum2)*(1.0d0 - Cmj(RadSurfNum2)))
END DO
LoopTerm = (CFloRadSys(RadSysNum)%WaterInjectionRate/CFloRadSys(RadSysNum)%WaterMassFlowRate)*Node(MainLoopNodeIn)%Temp &
+(CFloRadSys(RadSysNum)%PumpHeattoFluid/(CFloRadSys(RadSysNum)%WaterMassFlowRate*Cp))
RecircTerm = (CFloRadSys(RadSysNum)%WaterRecircRate/CFloRadSys(RadSysNum)%WaterMassFlowRate)*SumFlowFracCkCm
TwiCoeff = 1.0d0 - (CFloRadSys(RadSysNum)%WaterRecircRate/CFloRadSys(RadSysNum)%WaterMassFlowRate)*SumFlowFracOneMinusCm
WaterTempIn = (LoopTerm + RecircTerm)/(TwiCoeff)
CFloRadSys(RadSysNum)%WaterInletTemp = WaterTempIn
DO RadSurfNum2 = 1, CFloRadSys(RadSysNum)%NumOfSurfaces
WaterTempOut(RadSurfNum2) = WaterTempIn*(1.0d0 - Cmj(RadSurfNum2)) + (Ckj(RadSurfNum2) * Cmj(RadSurfNum2))
Mdot = WaterMassFlow * CFloRadSys(RadSysNum)%SurfaceFlowFrac(RadSurfNum2)
SurfNum = CFloRadSys(RadSysNum)%SurfacePtr(RadSurfNum2)
QRadSysSource(SurfNum) = Mdot*Cp*(WaterTempIn - WaterTempOut(RadSurfNum2))
IF (Surface(SurfNum)%ExtBoundCond > 0 .AND. Surface(SurfNum)%ExtBoundCond /= SurfNum) &
QRadSysSource(Surface(SurfNum)%ExtBoundCond) = QRadSysSource(SurfNum) ! Also set the other side of an interzone
END DO
END IF
END IF
END DO
DO RadSurfNum = 1, CFloRadSys(RadSysNum)%NumOfSurfaces
SurfNum = CFloRadSys(RadSysNum)%SurfacePtr(RadSurfNum)
! "Temperature Comparison" Cut-off:
! Check to see whether or not the system should really be running. If
! QRadSysSource is negative when we are in heating mode or QRadSysSource
! is positive when we are in cooling mode, then the radiant system will
! be doing the opposite of its intention. In this case, the flow rate
! is set to zero to avoid heating in cooling mode or cooling in heating
! mode.
IF ( ((OperatingMode == HeatingMode).AND.(QRadSysSource(SurfNum) <= 0.0d0)) .OR. &
((OperatingMode == CoolingMode).AND.(QRadSysSource(SurfNum) >= 0.0d0)) ) THEN
WaterMassFlow = 0.0d0
IF (OperatingMode==HeatingMode) THEN
CALL SetComponentFlowRate(WaterMassFlow, &
CFloRadSys(RadSysNum)%HotWaterInNode, &
CFloRadSys(RadSysNum)%HotWaterOutNode, &
CFloRadSys(RadSysNum)%HWLoopNum, &
CFloRadSys(RadSysNum)%HWLoopSide, &
CFloRadSys(RadSysNum)%HWBranchNum, &
CFloRadSys(RadSysNum)%HWCompNum )
ELSEIF (OperatingMode==CoolingMode) THEN
CALL SetComponentFlowRate(WaterMassFlow, &
CFloRadSys(RadSysNum)%ColdWaterInNode, &
CFloRadSys(RadSysNum)%ColdWaterOutNode, &
CFloRadSys(RadSysNum)%CWLoopNum, &
CFloRadSys(RadSysNum)%CWLoopSide, &
CFloRadSys(RadSysNum)%CWBranchNum, &
CFloRadSys(RadSysNum)%CWCompNum)
ENDIF
CFloRadSys(RadSysNum)%WaterMassFlowRate = WaterMassFlow
DO RadSurfNum2 = 1, CFloRadSys(RadSysNum)%NumOfSurfaces
SurfNum2 = CFloRadSys(RadSysNum)%SurfacePtr(RadSurfNum2)
QRadSysSource(SurfNum2) = 0.0D0
IF (Surface(SurfNum2)%ExtBoundCond > 0 .AND. Surface(SurfNum2)%ExtBoundCond /= SurfNum2) &
QRadSysSource(Surface(SurfNum2)%ExtBoundCond) = 0.0D0 ! Also zero the other side of an interzone
END DO
EXIT ! outer do loop
END IF
END DO
! Condensation Cut-off:
! Check to see whether there are any surface temperatures within the radiant system that have
! dropped below the dew-point temperature. If so, we need to shut off this radiant system.
! A safety parameter is added (hardwired parameter) to avoid getting too close to condensation
! conditions.
CFloRadSys(RadSysNum)%CondCausedShutDown = .FALSE.
DewPointTemp = PsyTdpFnWPb(ZoneAirHumRat(CFloRadSys(RadSysNum)%ZonePtr),OutBaroPress)
IF ( (OperatingMode == CoolingMode) .AND. (CFloRadSys(RadSysNum)%CondCtrlType == CondCtrlSimpleOff) ) THEN
DO RadSurfNum2 = 1, CFloRadSys(RadSysNum)%NumOfSurfaces
IF (TH(CFloRadSys(RadSysNum)%SurfacePtr(RadSurfNum2),1,2) < (DewPointTemp+CFloRadSys(RadSysNum)%CondDewPtDeltaT)) THEN
! Condensation warning--must shut off radiant system
CFloRadSys(RadSysNum)%CondCausedShutDown = .TRUE.
WaterMassFlow = 0.0d0
CALL SetComponentFlowRate(WaterMassFlow, &
CFloRadSys(RadSysNum)%ColdWaterInNode, &
CFloRadSys(RadSysNum)%ColdWaterOutNode, &
CFloRadSys(RadSysNum)%CWLoopNum, &
CFloRadSys(RadSysNum)%CWLoopSide, &
CFloRadSys(RadSysNum)%CWBranchNum, &
CFloRadSys(RadSysNum)%CWCompNum)
CFloRadSys(RadSysNum)%WaterMassFlowRate = WaterMassFlow
DO RadSurfNum3 = 1, CFloRadSys(RadSysNum)%NumOfSurfaces
SurfNum2 = CFloRadSys(RadSysNum)%SurfacePtr(RadSurfNum3)
QRadSysSource(SurfNum2) = 0.0D0
IF (Surface(SurfNum2)%ExtBoundCond > 0 .AND. Surface(SurfNum2)%ExtBoundCond /= SurfNum2) &
QRadSysSource(Surface(SurfNum2)%ExtBoundCond) = 0.0D0 ! Also zero the other side of an interzone
END DO
! Produce a warning message so that user knows the system was shut-off due to potential for condensation
IF (.not. WarmupFlag) THEN
IF (CFloRadSys(RadSysNum)%CondErrIndex == 0) THEN ! allow errors up to number of radiant systems
CALL ShowWarningMessage(cConstantFlowSystem//' ['//TRIM(CFloRadSys(RadSysNum)%Name)//']')
CALL ShowContinueError('Surface ['//trim(Surface(CFloRadSys(RadSysNum)%SurfacePtr(RadSurfNum2))%Name)// &
'] temperature below dew-point temperature--potential for condensation exists')
CALL ShowContinueError('Flow to the radiant system will be shut-off to avoid condensation')
CALL ShowContinueError('Predicted radiant system surface temperature = '// &
trim(RoundSigDigits(TH(CFloRadSys(RadSysNum)%SurfacePtr(RadSurfNum2),1,2),2)))
CALL ShowContinueError('Zone dew-point temperature + safety delta T= '// &
trim(RoundSigDigits(DewPointTemp+CFloRadSys(RadSysNum)%CondDewPtDeltaT,2)))
CALL ShowContinueErrorTimeStamp(' ')
CALL ShowContinueError('Note that a '//TRIM(RoundSigDigits(CFloRadSys(RadSysNum)%CondDewPtDeltaT,4))// &
' C safety was chosen in the input for the shut-off criteria')
CALL ShowContinueError('Note also that this affects all surfaces that are part of this radiant system')
END IF
CALL ShowRecurringWarningErrorAtEnd(cConstantFlowSystem//' ['//TRIM(CFloRadSys(RadSysNum)%Name)// &
'] condensation shut-off occurrence continues.', &
CFloRadSys(RadSysNum)%CondErrIndex,ReportMinOf=DewPointTemp,ReportMaxOf=DewPointTemp, &
ReportMaxUnits='C',ReportMinUnits='C')
END IF
EXIT ! outer do loop
END IF
END DO
ELSE IF ( (OperatingMode == CoolingMode) .AND. (CFloRadSys(RadSysNum)%CondCtrlType == CondCtrlNone) ) THEN
DO RadSurfNum2 = 1, CFloRadSys(RadSysNum)%NumOfSurfaces
IF (TH(CFloRadSys(RadSysNum)%SurfacePtr(RadSurfNum2),1,2) < DewPointTemp) THEN
! Condensation occurring but user does not want to shut radiant system off ever
CFloRadSys(RadSysNum)%CondCausedShutDown = .TRUE.
END IF
END DO
ELSE IF ( (OperatingMode == CoolingMode) .AND. (CFloRadSys(RadSysNum)%CondCtrlType == CondCtrlVariedOff) ) THEN
DO RadSurfNum2 = 1, CFloRadSys(RadSysNum)%NumOfSurfaces
IF (TH(CFloRadSys(RadSysNum)%SurfacePtr(RadSurfNum2),1,2) < (DewPointTemp+CFloRadSys(RadSysNum)%CondDewPtDeltaT)) THEN
VarOffCond = .TRUE.
IF (CFloCondIterNum >= 2) THEN
! We have already iterated once so now we must shut off radiant system
CFloRadSys(RadSysNum)%CondCausedShutDown = .TRUE.
WaterMassFlow = 0.0d0
CALL SetComponentFlowRate(WaterMassFlow, &
CFloRadSys(RadSysNum)%ColdWaterInNode, &
CFloRadSys(RadSysNum)%ColdWaterOutNode, &
CFloRadSys(RadSysNum)%CWLoopNum, &
CFloRadSys(RadSysNum)%CWLoopSide, &
CFloRadSys(RadSysNum)%CWBranchNum, &
CFloRadSys(RadSysNum)%CWCompNum)
CFloRadSys(RadSysNum)%WaterMassFlowRate = WaterMassFlow
DO RadSurfNum3 = 1, CFloRadSys(RadSysNum)%NumOfSurfaces
SurfNum2 = CFloRadSys(RadSysNum)%SurfacePtr(RadSurfNum3)
QRadSysSource(SurfNum2) = 0.0D0
IF (Surface(SurfNum2)%ExtBoundCond > 0 .AND. Surface(SurfNum2)%ExtBoundCond /= SurfNum2) &
QRadSysSource(Surface(SurfNum2)%ExtBoundCond) = 0.0D0 ! Also zero the other side of an interzone
END DO
! Produce a warning message so that user knows the system was shut-off due to potential for condensation
IF (.not. WarmupFlag) THEN
IF (CFloRadSys(RadSysNum)%CondErrIndex == 0) THEN ! allow errors up to number of radiant systems
CALL ShowWarningMessage(cConstantFlowSystem//' ['//TRIM(CFloRadSys(RadSysNum)%Name)//']')
CALL ShowContinueError('Surface ['//trim(Surface(CFloRadSys(RadSysNum)%SurfacePtr(RadSurfNum2))%Name)// &
'] temperature below dew-point temperature--potential for condensation exists')
CALL ShowContinueError('Flow to the radiant system will be shut-off to avoid condensation')
CALL ShowContinueError('Predicted radiant system surface temperature = '// &
trim(RoundSigDigits(TH(CFloRadSys(RadSysNum)%SurfacePtr(RadSurfNum2),1,2),2)))
CALL ShowContinueError('Zone dew-point temperature + safety delta T= '// &
trim(RoundSigDigits(DewPointTemp+CFloRadSys(RadSysNum)%CondDewPtDeltaT,2)))
CALL ShowContinueErrorTimeStamp(' ')
CALL ShowContinueError('Note that a '//TRIM(RoundSigDigits(CFloRadSys(RadSysNum)%CondDewPtDeltaT,4))// &
' C safety was chosen in the input for the shut-off criteria')
CALL ShowContinueError('Note also that this affects all surfaces that are part of this radiant system')
END IF
CALL ShowRecurringWarningErrorAtEnd(cConstantFlowSystem//' ['//TRIM(CFloRadSys(RadSysNum)%Name)// &
'] condensation shut-off occurrence continues.', &
CFloRadSys(RadSysNum)%CondErrIndex,ReportMinOf=DewPointTemp,ReportMaxOf=DewPointTemp, &
ReportMaxUnits='C',ReportMinUnits='C')
END IF
EXIT ! outer do loop
ELSE ! (First iteration--reset loop required temperature and try again to avoid condensation)
LoopReqTemp = DewPointTemp+CFloRadSys(RadSysNum)%CondDewPtDeltaT
END IF
END IF
END DO
END IF
! Determine radiant system outlet temperature (two ways to calculate--use as a check)
WaterOutletTempCheck = 0.0d0
TotalRadSysPower = 0.0d0
DO RadSurfNum = 1, CFloRadSys(RadSysNum)%NumOfSurfaces
SurfNum = CFloRadSys(RadSysNum)%SurfacePtr(RadSurfNum)
TotalRadSysPower = TotalRadSysPower + QRadSysSource(SurfNum)
WaterOutletTempCheck = WaterOutletTempCheck &
+(CFloRadSys(RadSysNum)%SurfaceFlowFrac(RadSurfNum)*WaterTempOut(RadSurfNum))
END DO
TotalRadSysPower = ZoneMult * TotalRadSysPower
IF (CFloRadSys(RadSysNum)%WaterMassFlowRate > 0.0d0) THEN
Cp = GetSpecificHeatGlycol('WATER',WaterTempIn,CFloRadSys(RadSysNum)%GlycolIndex,'CalcLowTempCFloRadSysComps')
CFloRadSys(RadSysNum)%WaterOutletTemp = CFloRadSys(RadSysNum)%WaterInletTemp &
-(TotalRadSysPower/(CFloRadSys(RadSysNum)%WaterMassFlowRate*Cp))
IF ( (ABS(CFloRadSys(RadSysNum)%WaterOutletTemp-WaterOutletTempCheck) > TempCheckLimit) .AND. &
(ABS(TotalRadSysPower) > ZeroSystemResp) ) THEN
! If the total system power is zero, that means we have shut down and the temperatures won't match because of that
CALL ShowWarningError('Radiant system water outlet temperature calculation mismatch--this should not happen')
END IF
ELSE
CFloRadSys(RadSysNum)%WaterOutletTemp = CFloRadSys(RadSysNum)%WaterInletTemp
END IF
END IF
! Now that we have the source/sink term(s), we must redo the heat balances to obtain
! the new SumHATsurf value for the zone. Note that the difference between the new
! SumHATsurf and the value originally calculated by the heat balance with a zero
! source for all radiant systems in the zone is the load met by the system (approximately).
CALL CalcHeatBalanceOutsideSurf(ZoneNum)
CALL CalcHeatBalanceInsideSurf(ZoneNum)
LoadMet = SumHATsurf(CFloRadSys(RadSysNum)%ZonePtr) - ZeroSourceSumHATsurf(CFloRadSys(RadSysNum)%ZonePtr)
! DEALLOCATE (Ckj)
! DEALLOCATE (Cmj)
! DEALLOCATE (WaterTempOut)
RETURN
END SUBROUTINE CalcLowTempCFloRadSysComps