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) | :: | UnitarySysNum | |||
real(kind=r64), | intent(in) | :: | PartLoadRatio | |||
real(kind=r64), | intent(inout) | :: | OnOffAirFlowRatio |
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 SetAverageAirFlow(UnitarySysNum,PartLoadRatio,OnOffAirFlowRatio)
! SUBROUTINE INFORMATION:
! AUTHOR Richard Raustad
! DATE WRITTEN July 2005
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Set the average air mass flow rates using the part-load fraction of the HVAC system for this time step
! Set OnOffAirFlowRatio to be used by DX coils
! METHODOLOGY EMPLOYED:
! The air flow rate in cooling, heating, and no cooling or heating can be dIFferent.
! Calculate the air flow rate based on initializations.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataZoneEnergyDemands
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT (IN) :: UnitarySysNum ! Unit index
REAL(r64), INTENT (IN) :: PartLoadRatio ! unit part load ratio
REAL(r64), INTENT (INOUT) :: OnOffAirFlowRatio ! ratio of compressor ON airflow to AVERAGE airflow over timestep
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: InletNode ! inlet node number
REAL(r64) :: AverageUnitMassFlow ! average supply air mass flow rate over time step
INTEGER :: SpeedNum ! speed for multi-speed or variable-speed coils
LOGICAL :: FanOn
SpeedNum = MAX(UnitarySystem(UnitarySysNum)%CoolingSpeedNum,UnitarySystem(UnitarySysNum)%HeatingSpeedNum)
InletNode = UnitarySystem(UnitarySysNum)%UnitarySystemInletNodeNum
IF(SpeedNum > 1)THEN
AverageUnitMassFlow = CompOnMassFlow
ELSE
AverageUnitMassFlow = (PartLoadRatio * CompOnMassFlow) + ((1.0d0-PartLoadRatio) * CompOffMassFlow)
END IF
IF(CompOffFlowRatio .GT. 0.0d0)THEN
IF(SpeedNum > 1)THEN
FanSpeedRatio = CompOnFlowRatio
ELSE
FanSpeedRatio = (PartLoadRatio * CompOnFlowRatio) + ((1.0d0-PartLoadRatio) * CompOffFlowRatio)
END IF
ELSE
FanSpeedRatio = CompOnFlowRatio
END IF
! If the unitary system is scheduled on or nightime cycle overrides fan schedule. Uses same logic as fan.
IF(UnitarySystem(UnitarySysNum)%FanExists)THEN
FanOn=.FALSE.
IF(GetCurrentScheduleValue(UnitarySystem(UnitarySysNum)%FanAvailSchedPtr) .GT. 0)FanOn=.TRUE.
ELSE
FanOn=.TRUE.
END IF
IF ( GetCurrentScheduleValue(UnitarySystem(UnitarySysNum)%SysAvailSchedPtr) .GT. 0.0d0 .AND. &
( (FanOn .OR. TurnFansOn) .AND. .NOT. TurnFansOff) ) THEN
Node(InletNode)%MassFlowRate = AverageUnitMassFlow
Node(InletNode)%MassFlowRateMaxAvail = AverageUnitMassFlow
IF (AverageUnitMassFlow .GT. 0.0d0) THEN
OnOffAirFlowRatio = CompOnMassFlow / AverageUnitMassFlow
ELSE
OnOffAirFlowRatio = 0.0d0
END IF
ELSE
Node(InletNode)%MassFlowRate = 0.0d0
OnOffAirFlowRatio = 1.0d0
END IF
RETURN
END SUBROUTINE SetAverageAirFlow