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) | :: | BaseboardNum |
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.
SUBROUTINE SizeHWBaseboard(BaseboardNum)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN February 2002
! MODIFIED August 2009 Daeho Kang (Add UA autosizing by LMTD)
! Aug 2013 Daeho Kang, add component sizing table entries
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for sizing hot water baseboard components
! METHODOLOGY EMPLOYED:
! Obtains flow rates from the zone sizing arrays and plant sizing data.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataSizing
USE DataLoopNode, ONLY: Node
USE PlantUtilities, ONLY: RegisterPlantCompDesignFlow
USE General, ONLY: RoundSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: BaseboardNum
! SUBROUTINE PARAMETER DEFINITIONS:
REAL(r64), PARAMETER :: AirInletTempStd = 18.0d0 ! I=B=R rating document
REAL(r64), PARAMETER :: CPAirStd = 1005.0d0 ! Average specific heat of air at between 25C and 40C in J/kg-k
REAL(r64), PARAMETER :: Constant = 0.0062d0 ! Constant of linear equation for air mass flow rate
REAL(r64), PARAMETER :: Coeff = 0.0000275d0 ! Correlation coefficient to capacity
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: PltSizNum ! do loop index for plant sizing
INTEGER :: PltSizHeatNum ! index of plant sizing object for 1st heating loop
REAL(r64) :: DesCoilLoad
REAL(r64) :: WaterInletTempStd
REAL(r64) :: WaterOutletTempStd
REAL(r64) :: AirOutletTempStd
REAL(r64) :: DeltaT1
REAL(r64) :: DeltaT2
REAL(r64) :: LMTD
REAL(r64) :: AirMassFlowRate
REAL(r64) :: WaterMassFlowRateStd
REAL(r64) :: rho ! local fluid density
REAL(r64) :: Cp ! local fluid specific heat
LOGICAL :: ErrorsFound ! If errors detected in input
LOGICAL :: FlowAutosize ! Indicator to autosize for maximum water vloume flow
LOGICAL :: CapAutosize ! Indicator to autosize for capacity
REAL(r64) :: WaterVolFlowRateMaxDes ! Design maximum water volume flow for reproting
REAL(r64) :: WaterVolFlowRateMaxUser ! User hard-sized maximum water volume flow for reproting
!REAL(r64) :: RatedCapacityDes ! Design rated capacity for reproting
!REAL(r64) :: RatedCapacityUser ! User hard-sized rated capacity for reproting
PltSizHeatNum = 0
PltSizNum = 0
DesCoilLoad = 0.0d0
ErrorsFound = .FALSE.
FlowAutosize = .FALSE.
CapAutosize = .FALSE.
WaterVolFlowRateMaxDes = 0.0d0
WaterVolFlowRateMaxUser = 0.0d0
!RatedCapacityDes = 0.0d0
!RatedCapacityUser = 0.0d0
! find the appropriate heating Plant Sizing object
PltSizHeatNum = PlantLoop(HWBaseboard(BaseboardNum)%LoopNum)%PlantSizNum
IF (PltSizHeatNum > 0) THEN
IF (CurZoneEqNum > 0) THEN
IF (HWBaseboard(BaseboardNum)%WaterVolFlowRateMax == AutoSize) THEN
FlowAutosize = .TRUE.
END IF
IF (.NOT. FlowAutosize .AND. .NOT. ZoneSizingRunDone) THEN ! Simulation continue
IF (HWBaseboard(BaseboardNum)%WaterVolFlowRateMax > 0.0d0) THEN
CALL ReportSizingOutput(cCMO_BBRadiator_Water,HWBaseboard(BaseboardNum)%EquipID,&
'User-Specified Maximum Water Flow Rate [m3/s]',HWBaseboard(BaseboardNum)%WaterVolFlowRateMax)
END IF
ELSE
CALL CheckZoneSizing(cCMO_BBRadiator_Water,HWBaseboard(BaseboardNum)%EquipID)
DesCoilLoad = CalcFinalZoneSizing(CurZoneEqNum)%DesHeatLoad * CalcFinalZoneSizing(CurZoneEqNum)%HeatSizingFactor
IF (DesCoilLoad >= SmallLoad) THEN
Cp = GetSpecificHeatGlycol(PlantLoop(HWBaseboard(BaseboardNum)%LoopNum)%FluidName, &
60.0d0, &
PlantLoop(HWBaseboard(BaseboardNum)%LoopNum)%FluidIndex, &
'SizeHWBaseboard')
rho = GetDensityGlycol(PlantLoop(HWBaseboard(BaseboardNum)%LoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(HWBaseboard(BaseboardNum)%LoopNum)%FluidIndex,&
'SizeHWBaseboard')
WaterVolFlowRateMaxDes = DesCoilLoad / (PlantSizData(PltSizHeatNum)%DeltaT * Cp * rho)
ELSE
WaterVolFlowRateMaxDes = 0.0d0
END IF
IF (FlowAutoSize) THEN
HWBaseboard(BaseboardNum)%WaterVolFlowRateMax = WaterVolFlowRateMaxDes
CALL ReportSizingOutput(cCMO_BBRadiator_Water,HWBaseboard(BaseboardNum)%EquipID,&
'Design Size Maximum Water Flow Rate [m3/s]',WaterVolFlowRateMaxDes)
ELSE ! Hard-sized with sizing data
IF (HWBaseboard(BaseboardNum)%WaterVolFlowRateMax > 0.0d0 .AND. WaterVolFlowRateMaxDes > 0.0d0) THEN
WaterVolFlowRateMaxUser = HWBaseboard(BaseboardNum)%WaterVolFlowRateMax
CALL ReportSizingOutput(cCMO_BBRadiator_Water,HWBaseboard(BaseboardNum)%EquipID,&
'Design Size Maximum Water Flow Rate [m3/s]',WaterVolFlowRateMaxDes, &
'User-Specified Maximum Water Flow Rate [m3/s]',WaterVolFlowRateMaxUser)
IF (DisplayExtraWarnings) THEN
IF ((ABS(WaterVolFlowRateMaxDes - WaterVolFlowRateMaxUser)/WaterVolFlowRateMaxUser) &
> AutoVsHardSizingThreshold) THEN
CALL ShowMessage('SizeHWBaseboard: Potential issue with equipment sizing for ' &
// 'ZoneHVAC:Baseboard:RadiantConvective:Water="'// &
TRIM(HWBaseboard(BaseboardNum)%EquipID)//'".')
CALL ShowContinueError('User-Specified Maximum Water Flow Rate of '// &
TRIM(RoundSigDigits(WaterVolFlowRateMaxUser,5))//' [m3/s]')
CALL ShowContinueError('differs from Design Size Maximum Water Flow Rate of ' // &
TRIM(RoundSigDigits(WaterVolFlowRateMaxDes,5))//' [m3/s]')
CALL ShowContinueError('This may, or may not, indicate mismatched component sizes.')
CALL ShowContinueError('Verify that the value entered is intended and is consistent with other components.')
END IF
ENDIF
END IF
END IF
END IF
IF (HWBaseboard(BaseboardNum)%WaterTempAvg > 0.0d0 .AND. HWBaseboard(BaseboardNum)%WaterMassFlowRateStd > 0.0d0 &
.AND. HWBaseboard(BaseboardNum)%RatedCapacity > 0.0d0) THEN
DesCoilLoad = HWBaseboard(BaseboardNum)%RatedCapacity
WaterMassFlowRateStd = HWBaseboard(BaseboardNum)%WaterMassFlowRateStd
Else IF (HWBaseboard(BaseboardNum)%RatedCapacity == AutoSize .OR. &
HWBaseboard(BaseboardNum)%RatedCapacity == 0.0d0) THEN
DesCoilLoad = CalcFinalZoneSizing(CurZoneEqNum)%DesHeatLoad * CalcFinalZoneSizing(CurZoneEqNum)%HeatSizingFactor
rho = GetDensityGlycol(PlantLoop(HWBaseboard(BaseboardNum)%LoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(HWBaseboard(BaseboardNum)%LoopNum)%FluidIndex,&
'BaseboardRadiatorWater:SizeHWBaseboard')
WaterMassFlowRateStd = HWBaseboard(BaseboardNum)%WaterVolFlowRateMax * rho
END IF
IF (DesCoilLoad >= SmallLoad) THEN
! Calculate UA value
! Air mass flow rate is obtained from the following linear equation
! m_dot = 0.0062 + 2.75e-05*q
AirMassFlowRate = Constant + Coeff * DesCoilLoad
Cp = GetSpecificHeatGlycol(PlantLoop(HWBaseboard(BaseboardNum)%LoopNum)%FluidName, &
HWBaseboard(BaseboardNum)%WaterTempAvg, &
PlantLoop(HWBaseboard(BaseboardNum)%LoopNum)%FluidIndex, &
'SizeHWBaseboard')
WaterInletTempStd = (DesCoilLoad / (2.0d0 * WaterMassFlowRateStd * Cp)) &
+ HWBaseboard(BaseboardNum)%WaterTempAvg
WaterOutletTempStd = ABS((2.0d0 * HWBaseboard(BaseboardNum)%WaterTempAvg) - WaterInletTempStd)
AirOutletTempStd = (DesCoilLoad / (AirMassFlowRate * CPAirStd)) + AirInletTempStd
HWBaseboard(BaseboardNum)%AirMassFlowRateStd = AirMassFlowRate
! Check Ta,out < Tw,in
IF (AirOutletTempStd >= WaterInletTempStd) THEN
CALL ShowSevereError('SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water="'// &
TRIM(HWBaseboard(BaseboardNum)%EquipID)//'".')
CALL ShowContinueError('...Air Outlet temperature must be below the Water Inlet temperature')
CALL ShowContinueError('...Air Outlet Temperature=['//trim(RoundSigDigits(AirOutletTempStd,2))// &
'], Water Inlet Temperature=['//trim(RoundSigDigits(WaterInletTempStd,2))//'].')
AirOutletTempStd = WaterInletTempStd-0.01d0
CALL ShowContinueError('...Air Outlet Temperature set to ['//trim(RoundSigDigits(AirOutletTempStd,2))//'].')
END IF
! Check Tw,out < Ta,in
IF (AirInletTempStd >= WaterOutletTempStd) THEN
CALL ShowSevereError('SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water="'// &
TRIM(HWBaseboard(BaseboardNum)%EquipID)//'".')
CALL ShowContinueError('...Water Outlet temperature must be below the Air Inlet temperature')
CALL ShowContinueError('...Air Inlet Temperature=['//trim(RoundSigDigits(AirInletTempStd,2))// &
'], Water Outlet Temperature=['//trim(RoundSigDigits(WaterOutletTempStd,2))//'].')
WaterOutletTempStd = AirInletTempStd+0.01d0
CALL ShowContinueError('...Water Outlet Temperature set to ['//trim(RoundSigDigits(WaterOutletTempStd,2))//'].')
END IF
! LMTD calculation
DeltaT1 = WaterInletTempStd - AirOutletTempStd
DeltaT2 = WaterOutletTempStd - AirInletTempStd
LMTD = (DeltaT1 - DeltaT2) / (log(DeltaT1 / DeltaT2))
HWBaseboard(BaseboardNum)%UA = DesCoilLoad / LMTD
ELSE
HWBaseboard(BaseboardNum)%UA = 0.0d0
END IF
! Report an UA value
CALL ReportSizingOutput(cCMO_BBRadiator_Water,HWBaseboard(BaseboardNum)%EquipID,&
'U-Factor times Area [W/C]',HWBaseboard(BaseboardNum)%UA)
END IF
ELSE
! if there is no heating Sizing:Plant object and autosizng was requested, issue an error message
IF (HWBaseboard(BaseboardNum)%WaterVolFlowRateMax == AutoSize .OR. &
HWBaseboard(BaseboardNum)%RatedCapacity == AutoSize .OR. HWBaseboard(BaseboardNum)%RatedCapacity == 0.0d0 ) THEN
CALL ShowSevereError('Autosizing of hot water baseboard requires a heating loop Sizing:Plant object')
CALL ShowContinueError('Occurs in Hot Water Baseboard Heater='//TRIM(HWBaseboard(BaseboardNum)%EquipID))
ErrorsFound = .TRUE.
END IF
! calculate UA from rated capacities
DesCoilLoad = HWBaseboard(BaseboardNum)%RatedCapacity
IF (DesCoilLoad >= SmallLoad) THEN
WaterMassFlowRateStd = HWBaseboard(BaseboardNum)%WaterMassFlowRateStd
! m_dot = 0.0062 + 2.75e-05*q
AirMassFlowRate = Constant + Coeff * DesCoilLoad
Cp = GetSpecificHeatGlycol(PlantLoop(HWBaseboard(BaseboardNum)%LoopNum)%FluidName, &
HWBaseboard(BaseboardNum)%WaterTempAvg, &
PlantLoop(HWBaseboard(BaseboardNum)%LoopNum)%FluidIndex, &
'SizeHWBaseboard')
WaterInletTempStd = (DesCoilLoad / (2.0d0 * WaterMassFlowRateStd &
* Cp)) &
+ HWBaseboard(BaseboardNum)%WaterTempAvg
WaterOutletTempStd = ABS((2.0d0 * HWBaseboard(BaseboardNum)%WaterTempAvg) - WaterInletTempStd)
AirOutletTempStd = (DesCoilLoad / (AirMassFlowRate * CPAirStd)) + AirInletTempStd
HWBaseboard(BaseboardNum)%AirMassFlowRateStd = AirMassFlowRate
! Check Ta,out < Tw,in
IF (AirOutletTempStd >= WaterInletTempStd) THEN
CALL ShowSevereError('SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water="'// &
TRIM(HWBaseboard(BaseboardNum)%EquipID)//'".')
CALL ShowContinueError('...Air Outlet temperature must be below the Water Inlet temperature')
CALL ShowContinueError('...Air Outlet Temperature=['//trim(RoundSigDigits(AirOutletTempStd,2))// &
'], Water Inlet Temperature=['//trim(RoundSigDigits(WaterInletTempStd,2))//'].')
AirOutletTempStd = WaterInletTempStd-0.01d0
CALL ShowContinueError('...Air Outlet Temperature set to ['//trim(RoundSigDigits(AirOutletTempStd,2))//'].')
END IF
! Check Tw,out < Ta,in
IF (AirInletTempStd >= WaterOutletTempStd) THEN
CALL ShowSevereError('SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water="'// &
TRIM(HWBaseboard(BaseboardNum)%EquipID)//'".')
CALL ShowContinueError('...Water Outlet temperature must be below the Air Inlet temperature')
CALL ShowContinueError('...Air Inlet Temperature=['//trim(RoundSigDigits(AirInletTempStd,2))// &
'], Water Outlet Temperature=['//trim(RoundSigDigits(WaterOutletTempStd,2))//'].')
WaterOutletTempStd = AirInletTempStd+0.01d0
CALL ShowContinueError('...Water Outlet Temperature set to ['//trim(RoundSigDigits(WaterOutletTempStd,2))//'].')
END IF
! LMTD calculation
DeltaT1 = WaterInletTempStd - AirOutletTempStd
DeltaT2 = WaterOutletTempStd - AirInletTempStd
LMTD = (DeltaT1 - DeltaT2) / (log(DeltaT1 / DeltaT2))
HWBaseboard(BaseboardNum)%UA = DesCoilLoad / LMTD
ELSE
HWBaseboard(BaseboardNum)%UA = 0.0d0
END IF
! Report an UA value
CALL ReportSizingOutput(cCMO_BBRadiator_Water,HWBaseboard(BaseboardNum)%EquipID,&
'U-Factor times Area [W/C]',HWBaseboard(BaseboardNum)%UA)
END IF
! save the design water flow rate for use by the water loop sizing algorithms
CALL RegisterPlantCompDesignFlow(HWBaseboard(BaseboardNum)%WaterInletNode,HWBaseboard(BaseboardNum)%WaterVolFlowRateMax)
IF (ErrorsFound) THEN
CALL ShowFatalError('Preceding sizing errors cause program termination')
END IF
RETURN
END SUBROUTINE SizeHWBaseboard