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) | :: | SysNum | |||
real(kind=r64), | intent(inout) | :: | SAMassFlow | |||
real(kind=r64), | intent(inout) | :: | AirLoopOAFrac |
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 CalcOAMassFlow(SysNum, SAMassFlow, AirLoopOAFrac)
! FUNCTION INFORMATION:
! AUTHOR R. Raustad (FSEC)
! DATE WRITTEN Jan 2010
! MODIFIED Mangesh Basarkar, 06/2011: Modifying outside air based on airloop DCV flag
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Calculates the amount of outside air required based on optional user input.
! Zone multipliers are included and are applied in GetInput.
! METHODOLOGY EMPLOYED:
! User input defines method used to calculate OA.
! REFERENCES:
! USE STATEMENTS:
USE DataAirLoop, ONLY: AirLoopFlow, AirLoopControlInfo
USE DataZoneEquipment, ONLY: ZoneEquipConfig, CalcDesignSpecificationOutdoorAir
USE Psychrometrics, ONLY: PsyRhoAirFnPbTdbW
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: SysNum ! index to terminal unit
REAL(r64), INTENT(INOUT) :: SAMassFlow ! outside air based on optional user input
REAL(r64), INTENT(INOUT) :: AirLoopOAFrac ! outside air based on optional user input
! FUNCTION PARAMETER DEFINITIONS:
LOGICAL, PARAMETER :: UseMinOASchFlag = .TRUE. ! Always use min OA schedule in calculations.
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER :: AirLoopNum ! Index to air loop
REAL(r64) :: RhoAir ! density of terminal unit inlet air
REAL(r64) :: OAVolumeFlowRate ! outside air volume flow rate (m3/s)
REAL(r64) :: OAMassFlow ! outside air mass flow rate (kg/s)
! initialize OA flow rate and OA report variable
SAMassFlow = 0.0D0
AirLoopOAFrac = 0.0D0
AirLoopNum = 0
If(Sys(SysNum)%CtrlZoneNum .GT. 0) AirLoopNum = ZoneEquipConfig(Sys(SysNum)%CtrlZoneNum)%AirLoopNum
! Calculate the amount of OA based on optional user inputs
IF(AirLoopNum .GT. 0)THEN
AirLoopOAFrac = AirLoopFlow(AirLoopNum)%OAFrac
! If no additional input from user, RETURN from subroutine
IF(Sys(SysNum)%NoOAFlowInputFromUser)RETURN
! Calculate outdoor air flow rate, zone multipliers are applied in GetInput
IF(AirLoopOAFrac .GT. 0.0D0)THEN
OAVolumeFlowRate = CalcDesignSpecificationOutdoorAir(Sys(SysNum)%OARequirementsPtr, &
Sys(SysNum)%ActualZoneNum, AirLoopControlInfo(AirLoopNum)%AirLoopDCVFlag, UseMinOASchFlag)
RhoAir = PsyRhoAirFnPbTdbW(Node(Sys(SysNum)%InletNodeNum)%Press, &
Node(Sys(SysNum)%InletNodeNum)%Temp, &
Node(Sys(SysNum)%InletNodeNum)%HumRat)
OAMassFlow = OAVolumeFlowRate * RhoAir
! convert OA mass flow rate to supply air flow rate based on air loop OA fraction
SAMassFlow = OAMassFlow / AirLoopOAFrac
END IF
END IF
RETURN
END SUBROUTINE CalcOAMassFlow