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) | :: | UnitVentNum |
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 SimUnitVentOAMixer(UnitVentNum)
! SUBROUTINE INFORMATION:
! AUTHOR Rick Strand
! DATE WRITTEN May 2000
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This responsibility of this subroutine is to set the air flow rates
! through the mixing box portion of the unit ventilator and then perform
! an energy balance to arrive at outlet conditions which then would
! serve as inlet conditions to the coils (or outlet conditions for
! the device). There is some question as to whether this needs to be
! called every time the coils and fan are called since how the fans and
! coil operate won't presumable change how the mixer operates. The
! method in which this routine is called is slightly cleaner though
! from a code readability standpoint though less efficient.
! METHODOLOGY EMPLOYED:
! The OAMassFlowRate has already been calculated in the main control
! algorithm. Use this flow rate to establish all of the other flow
! rates and perform an energy balance on the mixing of the return and
! outdoor air streams.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataContaminantBalance, ONLY: Contaminant
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: UnitVentNum ! Unit index in unit ventilator array
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: AirRelNode ! relief air node number in unit ventilator loop
INTEGER :: InletNode ! inlet node number for unit ventilator loop
REAL(r64) :: OAFraction ! Outside air fraction of inlet air
INTEGER :: OAMixOutNode ! outside air mixer outlet node for unit ventilator loop
INTEGER :: OutsideAirNode ! outside air node number in unit ventilator loop
! FLOW:
AirRelNode = UnitVent(UnitVentNum)%AirReliefNode
InletNode = UnitVent(UnitVentNum)%AirInNode
OAMixOutNode = UnitVent(UnitVentNum)%OAMixerOutNode
OutsideAirNode = UnitVent(UnitVentNum)%OutsideAirNode
! "Resolve" the air flow rates...
Node(OutsideAirNode)%MassFlowRate = OAMassFlowRate
Node(OutsideAirNode)%MassFlowRateMinAvail = OAMassFlowRate
Node(OutsideAirNode)%MassFlowRateMaxAvail = OAMassFlowRate
Node(AirRelNode)%MassFlowRate = OAMassFlowRate
Node(AirRelNode)%MassFlowRateMinAvail = OAMassFlowRate
Node(AirRelNode)%MassFlowRateMaxAvail = OAMassFlowRate
Node(OAMixOutNode)%MassFlowRate = Node(InletNode)%MassFlowRate
Node(OAMixOutNode)%MassFlowRateMinAvail = Node(InletNode)%MassFlowRate
Node(OAMixOutNode)%MassFlowRateMaxAvail = Node(InletNode)%MassFlowRate
! "Inlet" conditions for InletNode and OutsideAirNode have already
! been set elsewhere so we just need to set the "outlet" conditions
Node(AirRelNode)%Temp = Node(InletNode)%Temp
Node(AirRelNode)%Press = Node(InletNode)%Press
Node(AirRelNode)%HumRat = Node(InletNode)%HumRat
Node(AirRelNode)%Enthalpy = Node(InletNode)%Enthalpy
IF (Node(InletNode)%MassFlowRate > 0.0d0) THEN
OAFraction = Node(OutsideAirNode)%MassFlowRate/Node(InletNode)%MassFlowRate
ELSE
OAFraction = 0.0d0
END IF
! Perform an energy and moisture mass balance on the mixing portion of the unit ventilator
Node(OAMixOutNode)%Enthalpy = OAFraction*Node(OutsideAirNode)%Enthalpy &
+(1.0d0-OAFraction)*Node(InletNode)%Enthalpy
Node(OAMixOutNode)%HumRat = OAFraction*Node(OutsideAirNode)%HumRat &
+(1.0d0-OAFraction)*Node(InletNode)%HumRat
! Find the other key state points based on calculated conditions
Node(OAMixOutNode)%Temp = PsyTdbFnHW(Node(OAMixOutNode)%Enthalpy,Node(OAMixOutNode)%HumRat)
Node(OAMixOutNode)%Press = Node(InletNode)%Press
IF (Contaminant%CO2Simulation) Then
Node(AirRelNode)%CO2 = Node(InletNode)%CO2
Node(OAMixOutNode)%CO2 = OAFraction*Node(OutsideAirNode)%CO2+(1.0d0-OAFraction)*Node(InletNode)%CO2
END IF
IF (Contaminant%GenericContamSimulation) Then
Node(AirRelNode)%GenContam = Node(InletNode)%GenContam
Node(OAMixOutNode)%GenContam = OAFraction*Node(OutsideAirNode)%GenContam+(1.0d0-OAFraction)*Node(InletNode)%GenContam
END IF
RETURN
END SUBROUTINE SimUnitVentOAMixer