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) | :: | OAControllerNum |
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 UpdateOAController(OAControllerNum)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN Oct 1998
! MODIFIED Shirey/Raustad FSEC, June 2003
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE
! Move the results of CalcOAController to the affected nodes
! METHODOLOGY EMPLOYED:
! REFERENCES:
! USE STATEMENTS:
USE DataLoopNode
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS
INTEGER, INTENT(IN) :: OAControllerNum
! SUBROUTINE PARAMETER DEFINITIONS:
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: OutAirNodeNum
INTEGER :: InletAirNodeNum
INTEGER :: RelAirNodeNum
INTEGER :: RetAirNodeNum
OutAirNodeNum = OAController(OAControllerNum)%OANode
InletAirNodeNum = OAController(OAControllerNum)%InletNode
RelAirNodeNum = OAController(OAControllerNum)%RelNode
RetAirNodeNum = OAController(OAControllerNum)%RetNode
IF(OAController(OAControllerNum)%ControllerType_Num == ControllerOutsideAir)THEN
! The outside air controller sets the outside air flow rate and the relief air flow rate
Node(OutAirNodeNum)%MassFlowRate = OAController(OAControllerNum)%OAMassFlow
Node(InletAirNodeNum)%MassFlowRate = OAController(OAControllerNum)%OAMassFlow
Node(RelAirNodeNum)%MassFlowRate = OAController(OAControllerNum)%RelMassFlow
Node(OutAirNodeNum)%MassFlowRateMaxAvail = OAController(OAControllerNum)%OAMassFlow
ELSE
! The ERV controller sets the supply and secondary inlet node information for the Stand Alone ERV
! Currently, the Stand Alone ERV only has constant air flows (supply and exhaust), and these are
! already set in HVACStandAloneERV.f90 (subroutine init). Therefore, these flow assignments below are
! currently redundant but may be useful in the future as mass flow rates can vary based on the controller signal.
Node(OutAirNodeNum)%MassFlowRate = OAController(OAControllerNum)%OAMassFlow
Node(OutAirNodeNum)%MassFlowRateMaxAvail = OAController(OAControllerNum)%OAMassFlow
!
Node(RetAirNodeNum)%MassFlowRate = Node(OAController(OAControllerNum)%RetNode)%MassFlowRate
Node(RetAirNodeNum)%MassFlowRateMaxAvail = Node(OAController(OAControllerNum)%RetNode)%MassFlowRate
!
END IF
IF (Contaminant%CO2Simulation .AND. OAController(OAControllerNum)%ControllerType_Num .EQ. ControllerSimple) Then
Node(RelAirNodeNum)%CO2 = Node(InletAirNodeNum)%CO2
If (Node(RetAirNodeNum)%MassFlowRate .GT. 0.0d0) Then
Node(RetAirNodeNum)%CO2 = ((Node(InletAirNodeNum)%MassFlowRate-Node(RelAirNodeNum)%MassFlowRate)*Node(InletAirNodeNum)%CO2 + &
Node(OutAirNodeNum)%MassFlowRate*OutdoorCO2) / Node(RetAirNodeNum)%MassFlowRate
ELSE
Node(RetAirNodeNum)%CO2 = Node(InletAirNodeNum)%CO2
END If
End If
IF (Contaminant%GenericContamSimulation .AND. OAController(OAControllerNum)%ControllerType_Num .EQ. ControllerSimple) Then
Node(RelAirNodeNum)%GenContam = Node(InletAirNodeNum)%GenContam
If (Node(RetAirNodeNum)%MassFlowRate .GT. 0.0d0) Then
Node(RetAirNodeNum)%GenContam = ((Node(InletAirNodeNum)%MassFlowRate-Node(RelAirNodeNum)%MassFlowRate)* &
Node(InletAirNodeNum)%GenContam + Node(OutAirNodeNum)%MassFlowRate*OutdoorGC) / Node(RetAirNodeNum)%MassFlowRate
ELSE
Node(RetAirNodeNum)%GenContam = Node(InletAirNodeNum)%GenContam
END If
End If
RETURN
END SUBROUTINE UpdateOAController