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) | :: | SetPtMgrNum |
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 CalcMultiZoneAverageHeatingSetPoint(SetPtMgrNum)
! SUBROUTINE INFORMATION:
! AUTHOR Bereket Nigusse, FSEC
! DATE WRITTEN July 2010
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Calculates the "Average" supply air setpoint temperature that will satisfy the heating
! requirements of multizones served by a central air system.
! METHODOLOGY EMPLOYED:
! Zone sensible (heating load) heat balance around the zones served by a central air system
! REFERENCES:
! na
! USE STATEMENTS:
USE DataZoneEquipment, ONLY: ZoneEquipConfig
USE DataZoneEnergyDemands, ONLY: ZoneSysEnergyDemand
USE DataHVACGlobals, ONLY: SmallMassFlow, SmallLoad
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT (IN) :: SetPtMgrNum ! number of the current setpoint manager being simulated
! SUBROUTINE PARAMETER DEFINITIONS:
! INTERFACE BLOCK SPECIFICATIONS
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: ZoneLoad ! zone load predicted to the setpoint [W]
REAL(r64) :: ZoneMassFlowRate ! zone inlet node actual mass flow rate lagged by system one time step[kg/s]
REAL(r64) :: CpAir ! inlet air specific heat [J/kg-C]
INTEGER :: AirLoopNum ! the index of the air loop served by this setpoint manager
REAL(r64) :: SumHeatLoad ! sum of the zone's predicted heating loads for this air loop [W]
REAL(r64) :: SumProductMdotCpTZoneTot ! sum of the product of zone inlet node actual mass flow rate,
! Cp of air at zone air node and zone air node temperature for
! all zones in the air loop [W]
REAL(r64) :: SumProductMdotCp ! sum of the product of zone inlet node actual mass flow rate, and
! Cp of air at zone inlet node for all heated zones in the airloop [W/C]
REAL(r64) :: SumProductMdotCpTot ! sum of the product of zone inlet node actual mass flow rate, and
! Cp of air at zone air node for all zones in the airloop [W/C]
REAL(r64) :: ZoneAverageTemp ! multizone average zone air node temperature [C]
INTEGER :: ZonesHeatedIndex ! DO loop index for zones cooled by the air loop
INTEGER :: CtrlZoneNum ! the controlled zone index
INTEGER :: ZoneInletNode ! the zone inlet node number
REAL(r64) :: ZoneTemp ! zone air node temperature [C]
REAL(r64) :: SetPointTemp ! the system setpoint temperature [C]
INTEGER :: ZoneNode ! the zone node number of the current zone
SumHeatLoad = 0.0d0
ZoneAverageTemp = 0.0d0
SumProductMdotCp = 0.0d0
SumProductMdotCpTot = 0.0d0
SumProductMdotCpTzoneTot = 0.0d0
AirLoopNum = MZAverageHeatingSetPtMgr(SetPtMgrNum)%AirLoopNum
SetPointTemp = MZAverageHeatingSetPtMgr(SetPtMgrNum)%MinSetTemp
DO ZonesHeatedIndex=1,AirToZoneNodeInfo(AirLoopNum)%NumZonesCooled
! DO ZonesHeatedIndex=1,AirToZoneNodeInfo(AirLoopNum)%NumZonesHeated
! Using AirToZoneNodeInfo(AirLoopNum)%Cool* structure variables since they include heating and cooling.
! The data for number of zones heated is included in the data structure of the variable
! "AirToZoneNodeInfo(AirLoopNum)%NumZonesCooled" for all systems. The data structure
! "AirToZoneNodeInfo(AirLoopNum)%NumZonesHeated" applies to Dual Duct System only and
! if used will limit the application of this setpoint manager to other systems. Thus,
! the "AirToZoneNodeInfo(AirLoopNum)%NumZonesCooled" data is used instead.
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesHeatedIndex)
ZoneInletNode = AirToZoneNodeInfo(AirLoopNum)%CoolZoneInletNodes(ZonesHeatedIndex)
ZoneNode = ZoneEquipConfig(CtrlZoneNum)%ZoneNode
ZoneMassFlowRate = Node(ZoneInletNode)%MassFlowRate
ZoneLoad = ZoneSysEnergyDemand(CtrlZoneNum)%TotalOutputRequired
ZoneTemp = Node(ZoneNode)%Temp
CpAir = PsyCpAirFnWTdb(Node(ZoneNode)%HumRat,ZoneTemp)
SumProductMdotCpTot = SumProductMdotCpTot + ZoneMassFlowRate * CpAir
SumProductMdotCpTzoneTot = SumProductMdotCpTzoneTot + ZoneMassFlowRate * CpAir * ZoneTemp
IF (ZoneLoad > 0.0d0) THEN
CpAir = PsyCpAirFnWTdb(Node(ZoneInletNode)%HumRat,Node(ZoneInletNode)%Temp)
SumHeatLoad = SumHeatLoad + ZoneLoad
SumProductMdotCp = SumProductMdotCp + ZoneMassFlowRate * CpAir
END IF
END DO
IF (SumProductMdotCpTot > 0.0d0) ZoneAverageTemp = SumProductMdotCpTzoneTot / SumProductMdotCpTot
IF (SumProductMdotCp > 0.0d0) SetPointTemp = ZoneAverageTemp + SumHeatLoad / SumProductMdotCp
SetPointTemp = MIN(MZAverageHeatingSetPtMgr(SetPtMgrNum)%MaxSetTemp,MAX(SetPointTemp, &
MZAverageHeatingSetPtMgr(SetPtMgrNum)%MinSetTemp))
IF (SumHeatLoad < SmallLoad) THEN
SetPointTemp = MZAverageHeatingSetPtMgr(SetPtMgrNum)%MinSetTemp
END IF
MZAverageHeatingSetPtMgr(SetPtMgrNum)%SetPt = SetPointTemp
RETURN
END SUBROUTINE CalcMultiZoneAverageHeatingSetPoint