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 | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | PurchAirName | |||
real(kind=r64), | intent(inout) | :: | SysOutputProvided | |||
real(kind=r64), | intent(out) | :: | MoistOutputProvided | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
integer, | intent(in) | :: | ControlledZoneNum | |||
integer, | intent(in) | :: | ActualZoneNum | |||
integer, | intent(inout) | :: | CompIndex |
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 SimPurchasedAir(PurchAirName, SysOutputProvided, MoistOutputProvided, FirstHVACIteration, &
ControlledZoneNum, ActualZoneNum, CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Russ Taylor
! DATE WRITTEN May 1997
! MODIFIED Don Shirey, Aug 2009 (LatOutputProvided - now MoistOutputProvided)
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine manages Purchased Air component simulation.
! It is called from SimZoneEquipment in the ZoneEquipmentManager
! at the system time step.
! METHODOLOGY EMPLOYED:
! REFERENCES:
! na
! USE STATEMENTS:
USE DataGlobals, ONLY: MaxNameLength
USE InputProcessor, ONLY: FindItemInList
USE General, ONLY: TrimSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: PurchAirName
REAL(r64), INTENT(INOUT) :: SysOutputProvided
REAL(r64), INTENT(OUT) :: MoistOutputProvided ! Moisture output provided (kg/s), dehumidification = negative
LOGICAL, INTENT(IN) :: FirstHVACIteration
INTEGER, INTENT(IN) :: ControlledZoneNum
INTEGER, INTENT(IN) :: ActualZoneNum
INTEGER, INTENT(INOUT) :: CompIndex
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: PurchAirNum
! Beginning of Code
IF (GetPurchAirInputFlag ) THEN
CALL GetPurchasedAir
GetPurchAirInputFlag = .FALSE.
END IF
! Find the correct PurchasedAir Equipment
IF (CompIndex == 0) THEN
PurchAirNum = FindItemInList(PurchAirName, PurchAir%Name, NumPurchAir)
IF (PurchAirNum == 0) THEN
CALL ShowFatalError('SimPurchasedAir: Unit not found='//TRIM(PurchAirName))
ENDIF
CompIndex=PurchAirNum
ELSE
PurchAirNum=CompIndex
IF (PurchAirNum > NumPurchAir .or. PurchAirNum < 1) THEN
CALL ShowFatalError('SimPurchasedAir: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(PurchAirNum))// &
', Number of Units='//TRIM(TrimSigDigits(NumPurchAir))// &
', Entered Unit name='//TRIM(PurchAirName))
ENDIF
IF (CheckEquipName(PurchAirNum)) THEN
IF (PurchAirName /= PurchAir(PurchAirNum)%Name) THEN
CALL ShowFatalError('SimPurchasedAir: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(PurchAirNum))// &
', Unit name='//TRIM(PurchAirName)//', stored Unit Name for that index='// &
TRIM(PurchAir(PurchAirNum)%Name))
ENDIF
CheckEquipName(PurchAirNum)=.false.
ENDIF
ENDIF
CALL InitPurchasedAir(PurchAirNum, FirstHVACIteration, ControlledZoneNum, ActualZoneNum)
CALL CalcPurchAirLoads(PurchAirNum, SysOutputProvided, MoistOutputProvided, ControlledZoneNum, ActualZoneNum)
CALL UpdatePurchasedAir(PurchAirNum)
CALL ReportPurchasedAir(PurchAirNum)
RETURN
END SUBROUTINE SimPurchasedAir