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) | :: | EquipName | |||
integer, | intent(in) | :: | ControlledZoneNum | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
real(kind=r64), | intent(inout) | :: | SensOutputProvided | |||
real(kind=r64), | intent(out) | :: | LatOutputProvided | |||
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 SimDirectAir(EquipName,ControlledZoneNum,FirstHVACIteration,SensOutputProvided,LatOutputProvided,CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN Oct 1999
! MODIFIED Don Shirey, Aug 2009, LatOutputProvided
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE
! This subroutine manages Direct Air component simulation.
! It is called from SimZoneEquipment.
! METHODOLOGY EMPLOYED:
! REFERENCES:
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE General, ONLY: TrimSigDigits
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS
CHARACTER(len=*), INTENT(IN) :: EquipName
INTEGER, INTENT(IN) :: ControlledZoneNum
REAL(r64), INTENT(INOUT) :: SensOutputProvided
REAL(r64), INTENT(OUT) :: LatOutputProvided ! Latent output provided (kg/s), dehumidification = negative
LOGICAL, INTENT (IN):: FirstHVACIteration
INTEGER, INTENT(INOUT) :: CompIndex
! SUBROUTINE PARAMETER DEFINITIONS:
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: DirectAirNum
LOGICAL,SAVE :: GetDirectAirInputFlag = .TRUE.
IF (GetDirectAirInputFlag) THEN !First time subroutine has been entered
CALL GetDirectAirInput
GetDirectAirInputFlag = .FALSE.
END IF
! Find the correct Direct Air Equipment
IF (CompIndex == 0) THEN
DirectAirNum = FindItemInList(EquipName, DirectAir%EquipID, NumDirectAir)
IF (DirectAirNum == 0) THEN
CALL ShowFatalError('SimDirectAir: Unit not found='//TRIM(EquipName))
ENDIF
CompIndex=DirectAirNum
ELSE
DirectAirNum=CompIndex
IF (DirectAirNum > NumDirectAir .or. DirectAirNum < 1) THEN
CALL ShowFatalError('SimDirectAir: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(DirectAirNum))// &
', Number of Units='//TRIM(TrimSigDigits(NumDirectAir))// &
', Entered Unit name='//TRIM(EquipName))
ENDIF
IF (CheckEquipName(DirectAirNum)) THEN
IF (EquipName /= DirectAir(DirectAirNum)%EquipID) THEN
CALL ShowFatalError('SimDirectAir: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(DirectAirNum))// &
', Unit name='//TRIM(EquipName)//', stored Unit Name for that index='// &
TRIM(DirectAir(DirectAirNum)%EquipID))
ENDIF
CheckEquipName(DirectAirNum)=.false.
ENDIF
ENDIF
IF (DirectAirNum <= 0) THEN
CALL ShowFatalError('SimDirectAir: Unit not found='//TRIM(EquipName))
ENDIF
! With the correct DirectAirNum to Initialize the system
CALL InitDirectAir(DirectAirNum,FirstHVACIteration)
CALL CalcDirectAir(DirectAirNum,ControlledZoneNum,SensOutputProvided,LatOutputProvided)
! No Update
CALL ReportDirectAir(DirectAirNum)
END SUBROUTINE SimDirectAir