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 CalcMultiZoneAverageMaxHumSetPoint(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 maximum humidity setpoint that will satisfy the maximum
! himudity ratio requirements of multiple zones served by a central air system.
! METHODOLOGY EMPLOYED:
! Zone latent load balance around the zones served by a central air system
! REFERENCES:
! na
! USE STATEMENTS:
USE DataZoneEquipment, ONLY: ZoneEquipConfig
USE DataZoneEnergyDemands, ONLY: ZoneSysMoistureDemand
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) :: MoistureLoad ! zone's moisture load predicted to the setpoint [kgH20/s]
REAL(r64) :: ZoneMassFlowRate ! zone inlet node actual mass flow rate lagged by system one time step[kg/s]
INTEGER :: AirLoopNum ! the index of the air loop served by this setpoint manager
REAL(r64) :: SumMoistureLoad ! sum of the zone moisture loads for this air loop [W]
REAL(r64) :: SumMdot ! sum of the actual mass flow rate for controlled zones in the air loop [kg/s]
REAL(r64) :: SumMdotTot ! sum of the actual mass flow rate for this air loop [kg/s]
REAL(r64) :: SumProductMdotHumTot ! sum of product of actual mass flow rate at the zone inlet node,
! and humidity ratio at zones air node for all zones in the airloop [kgH20/s]
REAL(r64) :: AverageZoneHum ! multizone average zone air node humidity ratio of all zones in the air loop [kg/kg]
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) :: ZoneHum ! zone air node humidity ratio [kg/kg]
! REAL(r64) :: AverageSetPointHum ! Supply air humidity ratio [kg/kg]
REAL(r64) :: SetPointHum ! system setpoint humidity ratio [kg/kg]
INTEGER :: ZoneNode ! the zone node number of the current zone
SumMdot = 0.0d0
SumMdotTot = 0.0d0
AverageZoneHum = 0.0d0
SumMoistureLoad = 0.0d0
SumProductMdotHumTot = 0.0d0
AirLoopNum = MZAverageMaxHumSetPtMgr(SetPtMgrNum)%AirLoopNum
SetPointHum = MZAverageMaxHumSetPtMgr(SetPtMgrNum)%MaxSetHum
DO ZonesCooledIndex=1,AirToZoneNodeInfo(AirLoopNum)%NumZonesCooled
CtrlZoneNum = AirToZoneNodeInfo(AirLoopNum)%CoolCtrlZoneNums(ZonesCooledIndex)
ZoneInletNode = AirToZoneNodeInfo(AirLoopNum)%CoolZoneInletNodes(ZonesCooledIndex)
ZoneNode = ZoneEquipConfig(CtrlZoneNum)%ZoneNode
ZoneMassFlowRate = Node(ZoneInletNode)%MassFlowRate
MoistureLoad = ZoneSysMoistureDemand(CtrlZoneNum)%OutputRequiredToDehumidifyingSP
ZoneHum = Node(ZoneNode)%HumRat
SumMdotTot = SumMdotTot + ZoneMassFlowRate
SumProductMdotHumTot = SumProductMdotHumTot + ZoneMassFlowRate * ZoneHum
! For dehumidification the mositure load is negative
IF (MoistureLoad < 0.0d0) THEN
SumMdot = SumMdot + ZoneMassFlowRate
SumMoistureLoad = SumMoistureLoad + MoistureLoad
ENDIF
END DO
IF (SumMdotTot > SmallMassFlow) AverageZoneHum = SumProductMdotHumTot / SumMdotTot
IF (SumMdot > SmallMassFlow) SetPointHum = MAX(0.0d0, AverageZoneHum + SumMoistureLoad / SumMdot)
SetPointHum = MAX(MZAverageMaxHumSetPtMgr(SetPtMgrNum)%MinSetHum,MIN(SetPointHum, &
MZAverageMaxHumSetPtMgr(SetPtMgrNum)%MaxSetHum))
MZAverageMaxHumSetPtMgr(SetPtMgrNum)%SetPt = SetPointHum
RETURN
END SUBROUTINE CalcMultiZoneAverageMaxHumSetPoint