Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | SplitterNum | |||
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 CalcAirLoopSplitter(SplitterNum, FirstCall)
! SUBROUTINE INFORMATION:
! AUTHOR Richard J. Liesen
! DATE WRITTEN March 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:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: SplitterNum
LOGICAL, INTENT(IN) :: FirstCall
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: OutletNodeNum
!The first time through the State properties are split and passed through
IF(FirstCall) Then
! Moisture balance to get outlet air humidity ratio
DO OutletNodeNum = 1, SplitterCond(SplitterNum)%NumOutletNodes
SplitterCond(SplitterNum)%OutletHumRat(OutletNodeNum) = SplitterCond(SplitterNum)%InletHumRat
END DO
! "Momentum balance" to get outlet air pressure
DO OutletNodeNum = 1, SplitterCond(SplitterNum)%NumOutletNodes
SplitterCond(SplitterNum)%OutletPressure(OutletNodeNum) = SplitterCond(SplitterNum)%InletPressure
END DO
! Energy balance to get outlet air enthalpy
DO OutletNodeNum = 1, SplitterCond(SplitterNum)%NumOutletNodes
SplitterCond(SplitterNum)%OutletEnthalpy(OutletNodeNum) = SplitterCond(SplitterNum)%InletEnthalpy
END DO
! Set outlet temperatures equal to inlet temperature
DO OutletNodeNum = 1, SplitterCond(SplitterNum)%NumOutletNodes
SplitterCond(SplitterNum)%OutletTemp(OutletNodeNum) = SplitterCond(SplitterNum)%InletTemp
END DO
ELSE
!This is the second time through and this is where the mass flows from each outlet are
! summed and then assigned upstream to the inlet node.
! Overall Mass Continuity Equation to get inlet mass flow rates
!Zero the inlet Totals before the Inlets are summed
SplitterCond(SplitterNum)%InletMassFlowRate = 0.0d0
SplitterCond(SplitterNum)%InletMassFlowRateMaxAvail = 0.0d0
SplitterCond(SplitterNum)%InletMassFlowRateMinAvail = 0.0d0
DO OutletNodeNum = 1, SplitterCond(SplitterNum)%NumOutletNodes
SplitterCond(SplitterNum)%InletMassFlowRate = SplitterCond(SplitterNum)%InletMassFlowRate + &
SplitterCond(SplitterNum)%OutletMassFlowRate(OutletNodeNum)
SplitterCond(SplitterNum)%InletMassFlowRateMaxAvail = SplitterCond(SplitterNum)%InletMassFlowRateMaxAvail + &
SplitterCond(SplitterNum)%OutletMassFlowRateMaxAvail(OutletNodeNum)
SplitterCond(SplitterNum)%InletMassFlowRateMinAvail = SplitterCond(SplitterNum)%InletMassFlowRateMinAvail + &
SplitterCond(SplitterNum)%OutletMassFlowRateMinAvail(OutletNodeNum)
END DO
! What happens if Splitter inlet mass flow rate is greater than max available
END IF
RETURN
END SUBROUTINE CalcAirLoopSplitter