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) | :: | ZonePlenumNum |
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 CalcAirZoneReturnPlenum(ZonePlenumNum)
! SUBROUTINE INFORMATION:
! AUTHOR Peter Graham Ellis
! DATE WRITTEN November 2000
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine needs a description.
! METHODOLOGY EMPLOYED:
! Needs description, as appropriate.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataDefineEquip, ONLY: AirDistUnit, NumAirDistUnits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: ZonePlenumNum
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: InletNodeNum = 0 ! inlet node number
INTEGER :: IndNum = 0 ! induced air index
INTEGER :: ADUNum = 0 ! air distribution unit number
INTEGER :: ADUListIndex = 0 ! air distribution unit index in zone return plenum data structure
REAL(r64) :: TotIndMassFlowRate = 0.0d0 ! total induced air mass flow rate [kg/s]
! Reset the totals to zero before they are summed.
ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRate = 0.0d0
ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRateMaxAvail = 0.0d0
ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRateMinAvail = 0.0d0
ZoneRetPlenCond(ZonePlenumNum)%OutletTemp = 0.0d0
ZoneRetPlenCond(ZonePlenumNum)%OutletHumRat = 0.0d0
ZoneRetPlenCond(ZonePlenumNum)%OutletPressure = 0.0d0
ZoneRetPlenCond(ZonePlenumNum)%OutletEnthalpy = 0.0d0
TotIndMassFlowRate = 0.0d0
DO InletNodeNum = 1, ZoneRetPlenCond(ZonePlenumNum)%NumInletNodes
ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRate = ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRate + &
ZoneRetPlenCond(ZonePlenumNum)%InletMassFlowRate(InletNodeNum)
ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRateMaxAvail = ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRateMaxAvail + &
ZoneRetPlenCond(ZonePlenumNum)%InletMassFlowRateMaxAvail(InletNodeNum)
ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRateMinAvail = ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRateMinAvail + &
ZoneRetPlenCond(ZonePlenumNum)%InletMassFlowRateMinAvail(InletNodeNum)
END DO
IF (ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRate .GT. 0.0d0) THEN
! "Momentum balance" to get outlet air pressure
DO InletNodeNum = 1, ZoneRetPlenCond(ZonePlenumNum)%NumInletNodes
ZoneRetPlenCond(ZonePlenumNum)%OutletPressure = ZoneRetPlenCond(ZonePlenumNum)%OutletPressure + &
ZoneRetPlenCond(ZonePlenumNum)%InletPressure(InletNodeNum) * &
ZoneRetPlenCond(ZonePlenumNum)%InletMassFlowRate(InletNodeNum) / &
ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRate
END DO
ELSE
! Mass Flow in air loop is zero and loop is not operating.
! Arbitrarily set the output to the first inlet leg
ZoneRetPlenCond(ZonePlenumNum)%OutletPressure = ZoneRetPlenCond(ZonePlenumNum)%InletPressure(1)
END IF
! add in the leak flow rate, if any. Don't alter the pressure calc (it is not used anyway)
DO ADUListIndex = 1,ZoneRetPlenCond(ZonePlenumNum)%NumADUs
ADUNum = ZoneRetPlenCond(ZonePlenumNum)%ADUIndex(ADUListIndex)
IF (AirDistUnit(ADUNum)%UpStreamLeak .OR. AirDistUnit(ADUNum)%DownStreamLeak) THEN
ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRate = ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRate + &
AirDistUnit(ADUNum)%MassFlowRateUpStrLk + &
AirDistUnit(ADUNum)%MassFlowRateDnStrLk
ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRateMaxAvail = ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRateMaxAvail + &
AirDistUnit(ADUNum)%MaxAvailDelta
ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRateMinAvail = ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRateMinAvail + &
AirDistUnit(ADUNum)%MinAvailDelta
END IF
END DO
! Sum up induced air flow rate
DO IndNum=1,ZoneRetPlenCond(ZonePlenumNum)%NumInducedNodes
TotIndMassFlowRate = TotIndMassFlowRate + ZoneRetPlenCond(ZonePlenumNum)%InducedMassFlowRate(IndNum)
END DO
ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRate = ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRate - TotIndMassFlowRate
! Set the Plenum Outlet to the Zone Node conditions
ZoneRetPlenCond(ZonePlenumNum)%OutletHumRat = ZoneRetPlenCond(ZonePlenumNum)%ZoneHumRat
ZoneRetPlenCond(ZonePlenumNum)%OutletEnthalpy = ZoneRetPlenCond(ZonePlenumNum)%ZoneEnthalpy
ZoneRetPlenCond(ZonePlenumNum)%OutletTemp = ZoneRetPlenCond(ZonePlenumNum)%ZoneTemp
! make sure the MassFlowMaxAvail >= MassFlowRate
ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRateMaxAvail = MAX(ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRateMaxAvail, &
ZoneRetPlenCond(ZonePlenumNum)%OutletMassFlowRate)
RETURN
END SUBROUTINE CalcAirZoneReturnPlenum