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 | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | FirstHVACIteration | |||
integer, | intent(in) | :: | RadSysNum |
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 CalcHighTempRadiantSystemSP(FirstHVACIteration,RadSysNum)
! SUBROUTINE INFORMATION:
! AUTHOR Rick Strand
! DATE WRITTEN February 2008
! MODIFIED Sep 2011 LKL/BG - resimulate only zones needing it for Radiant systems
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine does all of the stuff that is necessary to simulate
! a high temperature radiant heating system using setpoint temperature control.
! METHODOLOGY EMPLOYED:
! Follows the methods used by many other pieces of zone equipment except
! that we are controlling the input to the heater element. Note that
! cooling is not allowed for such a system. Controls are very basic and
! use an iterative approach to get close to what we need.
! REFERENCES:
! Other EnergyPlus modules
! Building Systems Laboratory, BLAST User's Guide/Reference.
! Fanger, P.O. "Analysis and Applications in Environmental Engineering",
! Danish Technical Press, 1970.
! Maloney, Dan. 1987. "Development of a radiant heater model and the
! incorporation of thermal comfort considerations into the BLAST
! energy analysis program", M.S. thesis, University of Illinois at
! Urbana-Champaign (Dept. of Mechanical and Industrial Engineering).
! USE STATEMENTS:
USE DataHeatBalance, ONLY : MRT
USE DataHeatBalFanSys, ONLY : MAT
USE ScheduleManager, ONLY : GetCurrentScheduleValue
USE DataInterfaces, ONLY : CalcHeatBalanceOutsideSurf, CalcHeatBalanceInsideSurf
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
LOGICAL, INTENT(IN) :: FirstHVACIteration ! true if this is the first HVAC iteration at this system time step !unused1208
INTEGER, INTENT(IN) :: RadSysNum ! name of the low temperature radiant system
! SUBROUTINE PARAMETER DEFINITIONS:
REAL, PARAMETER :: TempConvToler = 0.1d0 ! Temperature controller tries to converge to within 0.1C
INTEGER, PARAMETER :: MaxIterations = 10 ! Maximum number of iterations to achieve temperature control
! (10 interval halvings achieves control to 0.1% of capacity)
! These two parameters are intended to achieve reasonable control
! without excessive run times.
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL :: ConvergFlag ! convergence flag for temperature control
!unused INTEGER, SAVE :: ErrIterCount=0 ! number of time max iterations has been exceeded
REAL :: HeatFrac ! fraction of maximum energy input to radiant system [dimensionless]
REAL :: HeatFracMax ! maximum range of heat fraction
REAL :: HeatFracMin ! minimum range of heat fraction
INTEGER :: IterNum ! iteration number
REAL(r64) :: SetPtTemp ! Setpoint temperature [C]
INTEGER :: ZoneNum ! number of zone being served
REAL(r64) :: ZoneTemp ! zone temperature (MAT, MRT, or Operative Temperature, depending on control type) [C]
! FLOW:
! initialize local variables
ZoneNum = HighTempRadSys(RadSysNum)%ZonePtr
QHTRadSource(RadSysNum) = 0.0D0
IF (GetCurrentScheduleValue(HighTempRadSys(RadSysNum)%SchedPtr) > 0) THEN
! Unit is scheduled on-->this section is intended to control the output of the
! high temperature radiant heater (temperature controlled)
! Determine the current setpoint temperature and the temperature at which the unit should be completely off
SetptTemp = GetCurrentScheduleValue(HighTempRadSys(RadSysNum)%SetptSchedPtr)
! Now, distribute the radiant energy of all systems to the appropriate
! surfaces, to people, and the air; determine the latent portion
CALL DistributeHTRadGains
! Now "simulate" the system by recalculating the heat balances
CALL CalcHeatBalanceOutsideSurf(ZoneNum)
CALL CalcHeatBalanceInsideSurf(ZoneNum)
! First determine whether or not the unit should be on
! Determine the proper temperature on which to control
SELECT CASE (HighTempRadSys(RadSysNum)%ControlType)
CASE (MATSPControl)
ZoneTemp = MAT(ZoneNum)
CASE (MRTSPControl)
ZoneTemp = MRT(ZoneNum)
CASE (OperativeSPControl)
ZoneTemp = 0.5d0*(MAT(ZoneNum)+MRT(ZoneNum))
END SELECT
IF (ZoneTemp < (SetptTemp-TempConvToler)) THEN
! Use simple interval halving to find the best operating fraction to achieve proper temperature control
IterNum = 0
ConvergFlag = .FALSE.
HeatFracMax = 1.0d0
HeatFracMin = 0.0d0
DO WHILE ( (IterNum <= MaxIterations) .AND. (.NOT. ConvergFlag) )
! In the first iteration (IterNum=0), try full capacity and see if that is the best solution
IF (IterNum == 0) THEN
HeatFrac = 1.0d0
ELSE
HeatFrac = (HeatFracMin + HeatFracMax) / 2.0d0
END IF
! Set the heat source for the high temperature radiant system
QHTRadSource(RadSysNum) = HeatFrac*HighTempRadSys(RadSysNum)%MaxPowerCapac
! Now, distribute the radiant energy of all systems to the appropriate
! surfaces, to people, and the air; determine the latent portion
CALL DistributeHTRadGains
! Now "simulate" the system by recalculating the heat balances
CALL CalcHeatBalanceOutsideSurf(ZoneNum)
CALL CalcHeatBalanceInsideSurf(ZoneNum)
! Redetermine the current value of the controlling temperature
SELECT CASE (HighTempRadSys(RadSysNum)%ControlType)
CASE (MATControl)
ZoneTemp = MAT(ZoneNum)
CASE (MRTControl)
ZoneTemp = MRT(ZoneNum)
CASE (OperativeControl)
ZoneTemp = 0.5d0*(MAT(ZoneNum)+MRT(ZoneNum))
END SELECT
IF ( (ABS(ZoneTemp-SetptTemp)) <= TempConvToler ) THEN
! The radiant heater has controlled the zone temperature to the appropriate level--stop iterating
ConvergFlag = .TRUE.
ELSEIF (ZoneTemp < SetptTemp) THEN
! The zone temperature is too low--try increasing the radiant heater output
IF (IterNum == 0) THEN
! Heater already at capacity--this is the best that we can do
ConvergFlag = .TRUE.
ELSE
HeatFracMin = HeatFrac
END IF
ELSE ! (ZoneTemp > SetptTemp)
! The zone temperature is too high--try decreasing the radiant heater output
IF (IterNum > 0) HeatFracMax = HeatFrac
END IF
IterNum = IterNum + 1
END DO
END IF
END IF
RETURN
END SUBROUTINE CalcHighTempRadiantSystemSP