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 | :: | MixerNum |
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 CalcAirMixer(MixerNum)
! 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:
USE Psychrometrics, ONlY: PsyTdbFnHW
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
Integer :: MixerNum
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
Integer :: InletNodeNum
!Reset the totals to zero before they are summed.
MixerCond(MixerNum)%OutletMassFlowRate = 0.0d0
MixerCond(MixerNum)%OutletMassFlowRateMaxAvail = 0.0d0
MixerCond(MixerNum)%OutletMassFlowRateMinAvail = 0.0d0
MixerCond(MixerNum)%OutletTemp = 0.0d0
MixerCond(MixerNum)%OutletHumRat = 0.0d0
MixerCond(MixerNum)%OutletPressure = 0.0d0
MixerCond(MixerNum)%OutletEnthalpy = 0.0d0
DO InletNodeNum = 1, MixerCond(MixerNum)%NumInletNodes
MixerCond(MixerNum)%OutletMassFlowRate = MixerCond(MixerNum)%OutletMassFlowRate + &
MixerCond(MixerNum)%InletMassFlowRate(InletNodeNum)
MixerCond(MixerNum)%OutletMassFlowRateMaxAvail = MixerCond(MixerNum)%OutletMassFlowRateMaxAvail + &
MixerCond(MixerNum)%InletMassFlowRateMaxAvail(InletNodeNum)
MixerCond(MixerNum)%OutletMassFlowRateMinAvail = MixerCond(MixerNum)%OutletMassFlowRateMinAvail + &
MixerCond(MixerNum)%InletMassFlowRateMinAvail(InletNodeNum)
END DO
If(MixerCond(MixerNum)%OutletMassFlowRate .gt. 0.0d0) Then
! Mass balance on moisture to get outlet air humidity ratio
DO InletNodeNum = 1, MixerCond(MixerNum)%NumInletNodes
MixerCond(MixerNum)%OutletHumRat = MixerCond(MixerNum)%OutletHumRat + &
MixerCond(MixerNum)%InletMassFlowRate(InletNodeNum) * &
MixerCond(MixerNum)%InletHumRat(InletNodeNum) / &
MixerCond(MixerNum)%OutletMassFlowRate
END DO
! "Momentum balance" to get outlet air pressure
DO InletNodeNum = 1, MixerCond(MixerNum)%NumInletNodes
MixerCond(MixerNum)%OutletPressure = MixerCond(MixerNum)%OutletPressure + &
MixerCond(MixerNum)%InletPressure(InletNodeNum) * &
MixerCond(MixerNum)%InletMassFlowRate(InletNodeNum) / &
MixerCond(MixerNum)%OutletMassFlowRate
END DO
! Energy balance to get outlet air enthalpy
DO InletNodeNum = 1, MixerCond(MixerNum)%NumInletNodes
MixerCond(MixerNum)%OutletEnthalpy = MixerCond(MixerNum)%OutletEnthalpy + &
MixerCond(MixerNum)%InletEnthalpy(InletNodeNum) * &
MixerCond(MixerNum)%InletMassFlowRate(InletNodeNum) / &
MixerCond(MixerNum)%OutletMassFlowRate
END DO
! Use Enthalpy and humidity ratio to get outlet temperature from psych chart
MixerCond(MixerNum)%OutletTemp = PsyTdbFnHW(MixerCond(MixerNum)%OutletEnthalpy, &
MixerCond(MixerNum)%OutletHumRat)
Else
! Mass Flow in air loop is zero and loop is not operating.
! Arbitrarily set the output to the first inlet leg
MixerCond(MixerNum)%OutletHumRat = MixerCond(MixerNum)%InletHumRat(1)
MixerCond(MixerNum)%OutletPressure = MixerCond(MixerNum)%InletPressure(1)
MixerCond(MixerNum)%OutletEnthalpy = MixerCond(MixerNum)%InletEnthalpy(1)
MixerCond(MixerNum)%OutletTemp = MixerCond(MixerNum)%InletTemp(1)
End If
! make sure MassFlowRateMaxAvail is >= MassFlowRate
MixerCond(MixerNum)%OutletMassFlowRateMaxAvail = MAX(MixerCond(MixerNum)%OutletMassFlowRateMaxAvail, &
MixerCond(MixerNum)%OutletMassFlowRate)
RETURN
END SUBROUTINE CalcAirMixer