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 | |||
real(kind=r64), | intent(inout) | :: | LoadMet |
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 CalcLowTempHydrRadiantSystem(RadSysNum,LoadMet)
! SUBROUTINE INFORMATION:
! AUTHOR Rick Strand
! DATE WRITTEN November 2000
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine does all of the stuff that is necessary to simulate
! a low temperature hydronic radiant heating/cooling system. Calls are
! made to appropriate subroutines either in this module or outside of it.
! METHODOLOGY EMPLOYED:
! Follows the methods used by many other pieces of zone equipment.
! Much like a water coil, a hydronic system will use the ControlCompOutput
! routine to determine what fraction of capacity the unit should be
! functioning at by controlling the flow rate of water to the element.
! REFERENCES:
! Other EnergyPlus modules
! 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.
! Seem, J.E. 1986. "Heat Transfer in Buildings", Ph.D. dissertation, University
! of Wisconsin-Madison.
! USE STATEMENTS:
USE DataZoneEnergyDemands
! USE DataEnvironment, ONLY : OutDryBulbTemp, OutWetBulbTemp
USE DataHeatBalance, ONLY : MRT,Zone,ZoneData
USE DataHeatBalFanSys, ONLY : MAT
USE DataHVACGlobals, ONLY : SmallLoad
USE DataLoopNode, ONLY : Node
USE ScheduleManager, ONLY : GetCurrentScheduleValue
USE PlantUtilities, ONLY : SetComponentFlowRate
USE DataBranchAirLoopPlant, ONLY : MassFlowTolerance
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: RadSysNum ! name of the low temperature radiant system
REAL(r64), INTENT(INOUT) :: LoadMet ! load met by the radiant system, in Watts
! SUBROUTINE PARAMETER DEFINITIONS:
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: ActWaterFlow ! actual water flow for heating or cooling [kg/sec]
INTEGER :: ControlNode ! the hot water or cold water inlet node
REAL(r64) :: ControlTemp ! temperature of whatever is controlling the radiant system
REAL(r64) :: MassFlowFrac ! fraction of the maximum water flow rate as determined by the control algorithm
REAL(r64) :: MaxWaterFlow ! maximum water flow for heating or cooling [kg/sec]
REAL(r64) :: OffTempCool ! temperature at which the flow rate throttles back to zero for cooling
REAL(r64) :: OffTempHeat ! temperature at which the flow rate throttles back to zero for heating
REAL(r64) :: OpTemp ! operative temperature (approximately the average of MAT and MRT) [Celsius]
REAL(r64) :: QZnReq ! heating or cooling needed by zone [Watts]
REAL(r64) :: SetpointTemp ! temperature "goal" for the radiant system [Celsius]
INTEGER :: SurfNum ! Surface number in the Surface derived type for a radiant system surface
INTEGER :: SurfNum2 ! Surface number in the Surface derived type for a radiant system surface
INTEGER :: ZoneNum ! number of zone being served
REAL(r64) :: mdot ! local temporary for fluid mass flow rate
LOGICAL :: SysRunning ! True when system is running
! FLOW:
! initialize local variables
ControlNode = 0
MaxWaterFlow = 0.0d0
ActWaterFlow = 0.0d0
ZoneNum = HydrRadSys(RadSysNum)%ZonePtr
OperatingMode = NotOperating
SysRunning = .true.
IF (GetCurrentScheduleValue(HydrRadSys(RadSysNum)%SchedPtr) <= 0) THEN
! Unit is off or has no load upon it; set the flow rates to zero and then
! simulate the components with the no flow conditions
DO SurfNum = 1, HydrRadSys(RadSysNum)%NumOfSurfaces
SurfNum2 = HydrRadSys(RadSysNum)%SurfacePtr(SurfNum)
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
IF (HydrRadSys(RadSysNum)%HeatingSystem) THEN !
mdot = 0.d0
CALL SetComponentFlowRate ( mdot , &
HydrRadSys(RadSysNum)%HotWaterInNode, &
HydrRadSys(RadSysNum)%HotWaterOutNode, &
HydrRadSys(RadSysNum)%HWLoopNum, &
HydrRadSys(RadSysNum)%HWLoopSide, &
HydrRadSys(RadSysNum)%HWBranchNum, &
HydrRadSys(RadSysNum)%HWCompNum )
ENDIF
IF (HydrRadSys(RadSysNum)%CoolingSystem) THEN
mdot = 0.d0
CALL SetComponentFlowRate ( mdot , &
HydrRadSys(RadSysNum)%ColdWaterInNode, &
HydrRadSys(RadSysNum)%ColdWaterOutNode, &
HydrRadSys(RadSysNum)%CWLoopNum, &
HydrRadSys(RadSysNum)%CWLoopSide, &
HydrRadSys(RadSysNum)%CWBranchNum, &
HydrRadSys(RadSysNum)%CWCompNum )
ENDIF
ELSE ! Unit might be on-->this section is intended to control the water mass flow rate being
! sent to the radiant system
SELECT CASE (HydrRadSys(RadSysNum)%ControlType)
CASE (MATControl)
ControlTemp = MAT(ZoneNum)
CASE (MRTControl)
ControlTemp = MRT(ZoneNum)
CASE (OperativeControl)
ControlTemp = 0.5d0*(MAT(ZoneNum)+MRT(ZoneNum))
CASE (ODBControl)
ControlTemp = Zone(ZoneNum)%OutDryBulbTemp
CASE (OWBControl)
ControlTemp = Zone(ZoneNum)%OutWetBulbTemp
CASE DEFAULT ! Should never get here
ControlTemp = MAT(ZoneNum)
CALL ShowSevereError('Illegal control type in low temperature radiant system: '//TRIM(HydrRadSys(RadSysNum)%Name))
CALL ShowFatalError('Preceding condition causes termination.')
END SELECT
IF (HydrRadSys(RadSysNum)%HotSetptSchedPtr > 0) THEN
SetpointTemp = GetCurrentScheduleValue(HydrRadSys(RadSysNum)%HotSetptSchedPtr)
OffTempHeat = SetpointTemp + 0.5d0*HydrRadSys(RadSysNum)%HotThrottlRange
ELSE ! This system is not capable of heating, set OffTempHeat to something really low
OffTempHeat = LowTempHeating
END IF
IF (HydrRadSys(RadSysNum)%ColdSetptSchedPtr > 0) THEN
SetpointTemp = GetCurrentScheduleValue(HydrRadSys(RadSysNum)%ColdSetptSchedPtr)
OffTempCool = SetpointTemp - 0.5d0*HydrRadSys(RadSysNum)%ColdThrottlRange
ELSE ! This system is not capable of cooling, set OffTempCool to something really high
OffTempCool = HighTempCooling
END IF
! Check for an illogical condition where a user enters controls that could
! potentially be heating or cooling at a particular control temperature
IF (OffTempHeat > OffTempCool) THEN
MassFlowFrac = 0.0d0
CALL ShowSevereError('Overlapping heating and cooling control temps in radiant system: '//TRIM(HydrRadSys(RadSysNum)%Name))
CALL ShowFatalError('Preceding condition causes termination.')
ELSE ! Temperatures for heating and cooling do not overlap--calculate the mass flow fraction
IF (ControlTemp < OffTempHeat) THEN ! Heating mode
OperatingMode = HeatingMode
ControlNode = HydrRadSys(RadSysNum)%HotWaterInNode
MaxWaterFlow = HydrRadSys(RadSysNum)%WaterFlowMaxHeat
MassFlowFrac = (OffTempHeat-ControlTemp)/HydrRadSys(RadSysNum)%HotThrottlRange
ELSE IF (ControlTemp > OffTempCool) THEN ! Cooling mode
OperatingMode = CoolingMode
ControlNode = HydrRadSys(RadSysNum)%ColdWaterInNode
MaxWaterFlow = HydrRadSys(RadSysNum)%WaterFlowMaxCool
MassFlowFrac = (ControlTemp-OffTempCool)/HydrRadSys(RadSysNum)%ColdThrottlRange
ELSE ! ControlTemp is between OffTempHeat and OffTempCool--unit should not run
MassFlowFrac = 0.0d0
END IF
END IF
! Calculate and limit the water flow rate
ActWaterFlow = MassFlowFrac*MaxWaterFlow
IF (ActWaterFlow < MassFlowTolerance) ActWaterFlow = 0.d0
IF (HydrRadSys(RadSysNum)%EMSOverrideOnWaterMdot) ActWaterFlow = HydrRadSys(RadSysNum)%EMSWaterMdotOverrideValue
IF (OperatingMode == HeatingMode) THEN
IF (HydrRadSys(RadSysNum)%HeatingSystem) THEN
CALL SetComponentFlowRate ( ActWaterFlow , &
HydrRadSys(RadSysNum)%HotWaterInNode, &
HydrRadSys(RadSysNum)%HotWaterOutNode, &
HydrRadSys(RadSysNum)%HWLoopNum, &
HydrRadSys(RadSysNum)%HWLoopSide, &
HydrRadSys(RadSysNum)%HWBranchNum, &
HydrRadSys(RadSysNum)%HWCompNum )
ELSE ! not heating system
SysRunning=.false.
ENDIF
ELSEIF(OperatingMode == CoolingMode) THEN
IF (HydrRadSys(RadSysNum)%CoolingSystem) THEN
CALL SetComponentFlowRate ( ActWaterFlow , &
HydrRadSys(RadSysNum)%ColdWaterInNode, &
HydrRadSys(RadSysNum)%ColdWaterOutNode, &
HydrRadSys(RadSysNum)%CWLoopNum, &
HydrRadSys(RadSysNum)%CWLoopSide, &
HydrRadSys(RadSysNum)%CWBranchNum, &
HydrRadSys(RadSysNum)%CWCompNum )
ELSE ! not cooling system
SysRunning=.false.
ENDIF
ENDIF
! Now simulate the system...
IF ( (OperatingMode == HeatingMode) .OR. (OperatingMode == CoolingMode) .and. SysRunning) &
CALL CalcLowTempHydrRadSysComps(RadSysNum,LoadMet)
END IF
RETURN
END SUBROUTINE CalcLowTempHydrRadiantSystem