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) | :: | CompName | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
integer, | intent(in) | :: | ZoneNum | |||
integer, | intent(in) | :: | ZoneNodeNum | |||
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 SimIndUnit(CompName, FirstHVACIteration, ZoneNum, ZoneNodeNum, CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN June 18 2004
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Manages the simulation of a passive (no fan) induction terminal unit.
! Called from SimZoneAirLoopEquipment in module ZoneAirLoopEquipmentManager.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE DataSizing, ONLY: TermUnitIU
USE General, ONLY: TrimSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: CompName ! name of the terminal unit
LOGICAL, INTENT (IN) :: FirstHVACIteration ! TRUE if first HVAC iteration in time step
INTEGER, INTENT (IN) :: ZoneNum ! index of zone served by the terminal unit
INTEGER, INTENT (IN) :: ZoneNodeNum ! zone node number of zone served by the terminal unit
INTEGER, INTENT (INOUT) :: CompIndex ! which terminal unit in data structure
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: IUNum ! index of terminal unit being simulated
! First time SimIndUnit is called, get the input for all the passive terminal induction units
IF (GetIUInputFlag) THEN
CALL GetIndUnits
GetIUInputFlag = .FALSE.
END IF
! Get the induction unit index
IF (CompIndex == 0) THEN
IUNum = FindItemInList(CompName,IndUnit%Name,NumIndUnits)
IF (IUNum == 0) THEN
CALL ShowFatalError('SimIndUnit: Induction Unit not found='//TRIM(CompName))
ENDIF
CompIndex=IUNum
ELSE
IUNum=CompIndex
IF (IUNum > NumIndUnits .or. IUNum < 1) THEN
CALL ShowFatalError('SimIndUnit: Invalid CompIndex passed='//TRIM(TrimSigDigits(CompIndex))// &
', Number of Induction Units='//TRIM(TrimSigDigits(NumIndUnits))// &
', System name='//TRIM(CompName))
ENDIF
IF (CheckEquipName(IUNum)) THEN
IF (CompName /= IndUnit(IUNum)%Name) THEN
CALL ShowFatalError('SimIndUnit: Invalid CompIndex passed='//TRIM(TrimSigDigits(CompIndex))// &
', Induction Unit name='//TRIM(CompName)//', stored Induction Unit for that index='// &
TRIM(IndUnit(IUNum)%Name))
ENDIF
CheckEquipName(IUNum)=.false.
ENDIF
ENDIF
! initialize the unit
CALL InitIndUnit(IUNum,FirstHVACIteration)
TermUnitIU = .TRUE.
! Select the correct unit type
SELECT CASE(IndUnit(IUNum)%UnitType_Num)
CASE (SingleDuct_CV_FourPipeInduc)
CALL SimFourPipeIndUnit(IUNum,ZoneNum,ZoneNodeNum,FirstHVACIteration)
CASE DEFAULT
CALL ShowSevereError('Illegal Induction Unit Type used='//TRIM(IndUnit(IUNum)%UnitType))
CALL ShowContinueError('Occurs in Induction Unit='//TRIM(IndUnit(IUNum)%Name))
CALL ShowFatalError('Preceding condition causes termination.')
END SELECT
TermUnitIU = .FALSE.
! the tasks usually done by the Update and Report routines are not required in a compound terminal unit.
! Update the current unit's outlet nodes. No update needed
! CALL UpdateIndUnit(IUNum)
! Fill the report variables. There are no report variables
! CALL ReportIndUnit(IUNum)
RETURN
END SUBROUTINE SimIndUnit