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.
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 ResolveAirLoopFlowLimits
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN August 2003
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for resolving hard flow mismatches between zone equipment and
! the primary air loop. Such a mismatch can occur when the air terminal units are
! requsting more air than the central air system can supply.
! METHODOLOGY EMPLOYED:
! Sets the MassFlowRateMaxAvail on the terminal unit inlet nodes to match the
! maximum available from the primary air loop.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataZoneEquipment, ONLY : ZoneEquipConfig
USE DataConvergParams, ONLY : HVACFlowRateToler
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: AirLoopIndex
INTEGER :: ZonesCooledIndex
INTEGER :: ZonesHeatedIndex
INTEGER :: TermInletNode
INTEGER :: SupplyIndex
INTEGER :: SupplyNode
REAL(r64) :: FlowRatio
DO AirLoopIndex=1,NumPrimaryAirSys ! loop over the primary air loops
DO SupplyIndex=1,AirToZoneNodeInfo(AirLoopIndex)%NumSupplyNodes ! loop over the air loop supply outlets
IF (AirToZoneNodeInfo(AirLoopIndex)%SupplyDuctType(SupplyIndex) == Cooling) THEN ! check for cooling duct
! check if terminal units requesting more air than air loop can supply; if so, set terminal unit inlet
! node mass flow max avail to what air loop can supply
SupplyNode = AirToZoneNodeInfo(AirLoopIndex)%AirLoopSupplyNodeNum(SupplyIndex)
IF (Node(SupplyNode)%MassFlowRate > 0.0d0) THEN
IF ( (Node(SupplyNode)%MassFlowRateSetPoint - Node(SupplyNode)%MassFlowRate) > HVACFlowRateToler * 0.01d0) THEN
FlowRatio = Node(SupplyNode)%MassFlowRate / Node(SupplyNode)%MassFlowRateSetPoint
DO ZonesCooledIndex=1,AirToZoneNodeInfo(AirLoopIndex)%NumZonesCooled
TermInletNode = AirToZoneNodeInfo(AirLoopIndex)%TermUnitCoolInletNodes(ZonesCooledIndex)
Node(TermInletNode)%MassFlowRateMaxAvail = Node(TermInletNode)%MassFlowRate * FlowRatio
END DO
END IF
IF ( (Node(SupplyNode)%MassFlowRateSetPoint - Node(SupplyNode)%MassFlowRate) < - HVACFlowRateToler * 0.01d0) THEN
IF (Node(SupplyNode)%MassFlowRateSetPoint == 0.0d0) THEN
! CALL ShowFatalError('ResolveAirLoopFlowLimits: Node MassFlowRateSetPoint = 0.0, Node='// &
! TRIM(NodeID(SupplyNode))// &
! ', check for Node Connection Errors in the following messages.')
DO ZonesCooledIndex=1,AirToZoneNodeInfo(AirLoopIndex)%NumZonesCooled
TermInletNode = AirToZoneNodeInfo(AirLoopIndex)%TermUnitCoolInletNodes(ZonesCooledIndex)
Node(TermInletNode)%MassFlowRateMaxAvail = Node(TermInletNode)%MassFlowRateMax
Node(TermInletNode)%MassFlowRateMinAvail = Node(SupplyNode)%MassFlowRate / &
REAL(AirToZoneNodeInfo(AirLoopIndex)%NumZonesCooled,r64)
END DO
ELSE
FlowRatio = Node(SupplyNode)%MassFlowRate / Node(SupplyNode)%MassFlowRateSetPoint
DO ZonesCooledIndex=1,AirToZoneNodeInfo(AirLoopIndex)%NumZonesCooled
TermInletNode = AirToZoneNodeInfo(AirLoopIndex)%TermUnitCoolInletNodes(ZonesCooledIndex)
Node(TermInletNode)%MassFlowRateMinAvail = Node(TermInletNode)%MassFlowRate * FlowRatio
END DO
END IF
END IF
END IF
END IF
END DO
DO SupplyIndex=1,AirToZoneNodeInfo(AirLoopIndex)%NumSupplyNodes ! loop over the air loop supply outlets
IF (AirToZoneNodeInfo(AirLoopIndex)%SupplyDuctType(SupplyIndex) == Heating) THEN ! check for heating duct
! check if terminal units requesting more air than air loop can supply; if so, set terminal unit inlet
! node mass flow max avail to what air loop can supply
SupplyNode = AirToZoneNodeInfo(AirLoopIndex)%AirLoopSupplyNodeNum(SupplyIndex)
IF (Node(SupplyNode)%MassFlowRate > 0.0d0) THEN
IF ( (Node(SupplyNode)%MassFlowRateSetPoint - Node(SupplyNode)%MassFlowRate) > HVACFlowRateToler * 0.01d0) THEN
FlowRatio = Node(SupplyNode)%MassFlowRate / Node(SupplyNode)%MassFlowRateSetPoint
DO ZonesHeatedIndex=1,AirToZoneNodeInfo(AirLoopIndex)%NumZonesHeated
TermInletNode = AirToZoneNodeInfo(AirLoopIndex)%TermUnitHeatInletNodes(ZonesHeatedIndex)
Node(TermInletNode)%MassFlowRateMaxAvail = Node(TermInletNode)%MassFlowRate * FlowRatio
END DO
END IF
IF ( (Node(SupplyNode)%MassFlowRateSetPoint - Node(SupplyNode)%MassFlowRate) < - HVACFlowRateToler * 0.01d0) THEN
IF (Node(SupplyNode)%MassFlowRateSetPoint == 0.0d0) THEN
! CALL ShowFatalError('ResolveAirLoopFlowLimits: Node MassFlowRateSetPoint = 0.0, Node='// &
! TRIM(NodeID(SupplyNode))// &
! ', check for Node Connection Errors in the following messages.')
DO ZonesHeatedIndex=1,AirToZoneNodeInfo(AirLoopIndex)%NumZonesHeated
TermInletNode = AirToZoneNodeInfo(AirLoopIndex)%TermUnitHeatInletNodes(ZonesHeatedIndex)
Node(TermInletNode)%MassFlowRateMaxAvail = Node(TermInletNode)%MassFlowRateMax
Node(TermInletNode)%MassFlowRateMinAvail = Node(SupplyNode)%MassFlowRate / &
REAL(AirToZoneNodeInfo(AirLoopIndex)%NumZonesCooled,r64)
END DO
ELSE
FlowRatio = Node(SupplyNode)%MassFlowRate / Node(SupplyNode)%MassFlowRateSetPoint
DO ZonesHeatedIndex=1,AirToZoneNodeInfo(AirLoopIndex)%NumZonesHeated
TermInletNode = AirToZoneNodeInfo(AirLoopIndex)%TermUnitHeatInletNodes(ZonesHeatedIndex)
Node(TermInletNode)%MassFlowRateMinAvail = Node(TermInletNode)%MassFlowRate * FlowRatio
END DO
ENDIF
END IF
END IF
END IF
END DO
END DO
RETURN
END SUBROUTINE ResolveAirLoopFlowLimits