Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ZonePlenumNum | |||
logical, | intent(in) | :: | FirstCall |
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 CalcAirZoneSupplyPlenum(ZonePlenumNum, FirstCall)
! SUBROUTINE INFORMATION:
! AUTHOR Peter Graham Ellis
! DATE WRITTEN March 2000
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine needs a description.
! METHODOLOGY EMPLOYED:
! Similar to the Zone Splitter component but with interactions to the plenum zone.
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: ZonePlenumNum
LOGICAL, INTENT(IN) :: FirstCall
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: NodeIndex
! The first time through the State properties are passed through
IF (FirstCall) THEN
! Moisture balance to get outlet air humidity ratio
DO NodeIndex=1,ZoneSupPlenCond(ZonePlenumNum)%NumOutletNodes
ZoneSupPlenCond(ZonePlenumNum)%OutletHumRat(NodeIndex) = ZoneSupPlenCond(ZonePlenumNum)%ZoneHumRat
END DO
! Energy balance to get outlet air enthalpy
DO NodeIndex=1,ZoneSupPlenCond(ZonePlenumNum)%NumOutletNodes
ZoneSupPlenCond(ZonePlenumNum)%OutletEnthalpy(NodeIndex) = ZoneSupPlenCond(ZonePlenumNum)%ZoneEnthalpy
END DO
! Set outlet temperatures equal to inlet temperature
DO NodeIndex=1,ZoneSupPlenCond(ZonePlenumNum)%NumOutletNodes
ZoneSupPlenCond(ZonePlenumNum)%OutletTemp(NodeIndex) = ZoneSupPlenCond(ZonePlenumNum)%ZoneTemp
END DO
ELSE
! This is the second time through and this is where the mass flows from the outlets are
! summed and then assigned upstream to the inlet node.
ZoneSupPlenCond(ZonePlenumNum)%InletMassFlowRate = 0.0d0
ZoneSupPlenCond(ZonePlenumNum)%InletMassFlowRateMaxAvail = 0.0d0
ZoneSupPlenCond(ZonePlenumNum)%InletMassFlowRateMinAvail = 0.0d0
DO NodeIndex=1,ZoneSupPlenCond(ZonePlenumNum)%NumOutletNodes
ZoneSupPlenCond(ZonePlenumNum)%InletMassFlowRate = ZoneSupPlenCond(ZonePlenumNum)%InletMassFlowRate + &
ZoneSupPlenCond(ZonePlenumNum)%OutletMassFlowRate(NodeIndex)
ZoneSupPlenCond(ZonePlenumNum)%InletMassFlowRateMaxAvail = ZoneSupPlenCond(ZonePlenumNum)%InletMassFlowRateMaxAvail + &
ZoneSupPlenCond(ZonePlenumNum)%OutletMassFlowRateMaxAvail(NodeIndex)
ZoneSupPlenCond(ZonePlenumNum)%InletMassFlowRateMinAvail = ZoneSupPlenCond(ZonePlenumNum)%InletMassFlowRateMinAvail + &
ZoneSupPlenCond(ZonePlenumNum)%OutletMassFlowRateMinAvail(NodeIndex)
END DO
END IF
RETURN
END SUBROUTINE CalcAirZoneSupplyPlenum