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 CalcMultiZoneAverageCoolingSetPoint(SetPtMgrNum)
! SUBROUTINE INFORMATION:
! AUTHOR Bereket Nigusse, FSEC
! DATE WRITTEN July 2010
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Calculate the "Average" supply air setpoint temperature that will satisfy the cooling
! requirements of all the zones served by a central air system.
! METHODOLOGY EMPLOYED:
! Zone sensible (cooling 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) :: SumCoolLoad ! sum of the zone cooling 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 cooled 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 :: ZonesCooledIndex ! 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
SumCoolLoad = 0.0d0
ZoneAverageTemp = 0.0d0
SumProductMdotCp = 0.0d0
SumProductMdotCpTot = 0.0d0
SumProductMdotCpTzoneTot = 0.0d0
AirLoopNum = MZAverageCoolingSetPtMgr(SetPtMgrNum)%AirLoopNum
SetPointTemp = MZAverageCoolingSetPtMgr(SetPtMgrNum)%MaxSetTemp
DO ZonesCooledIndex=1,AirToZoneNodeInfo(AirLoopNum)%NumZonesCooled
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesCooledIndex)
ZoneInletNode = AirToZoneNodeInfo(AirLoopNum)%CoolZoneInletNodes(ZonesCooledIndex)
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)
SumCoolLoad = SumCoolLoad + ZoneLoad
SumProductMdotCp = SumProductMdotCp + ZoneMassFlowRate * CpAir
END IF
END DO
IF (SumProductMdotCpTot > 0.0d0) ZoneAverageTemp = SumProductMdotCpTzoneTot / SumProductMdotCpTot
IF (SumProductMdotCp > 0.0d0) SetPointTemp = ZoneAverageTemp + SumCoolLoad / SumProductMdotCp
SetPointTemp = MAX(MZAverageCoolingSetPtMgr(SetPtMgrNum)%MinSetTemp,MIN(SetPointTemp, &
MZAverageCoolingSetPtMgr(SetPtMgrNum)%MaxSetTemp))
IF (ABS(SumCoolLoad) < SmallLoad) THEN
SetPointTemp = MZAverageCoolingSetPtMgr(SetPtMgrNum)%MaxSetTemp
END IF
MZAverageCoolingSetPtMgr(SetPtMgrNum)%SetPt = SetPointTemp
RETURN
END SUBROUTINE CalcMultiZoneAverageCoolingSetPoint