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 SimPIU(CompName, FirstHVACIteration, ZoneNum, ZoneNodeNum,CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN March 2000
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Manages the simulation of a fan powered induction terminal unit.
! Called from SimZoneAirLoopEquipmentin module ZoneAirLoopEquipmentManager.
! METHODOLOGY EMPLOYED:
! NA
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE DataSizing, ONLY: TermUnitPIU
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 PIU
LOGICAL, INTENT (IN) :: FirstHVACIteration ! TRUE if first HVAC iteration in time step
INTEGER, INTENT (IN) :: ZoneNum ! index of zone served by PIU
INTEGER, INTENT (IN) :: ZoneNodeNum ! zone node number of zone served by PIU
INTEGER, INTENT (INOUT) :: CompIndex ! PIU Index in PIU names
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: PIUNum ! index of powered induction unit being simulated
! FLOW
! First time SimPIU is called, get the input for all the fan coil units
IF (GetPIUInputFlag) THEN
CALL GetPIUs
GetPIUInputFlag = .FALSE.
END IF
! Get the powered induction unit index
IF (CompIndex == 0) THEN
PIUNum = FindItemInList(CompName,PIU%Name,NumPIUs)
IF (PIUNum == 0) THEN
CALL ShowFatalError('SimPIU: PIU Unit not found='//TRIM(CompName))
ENDIF
CompIndex=PIUNum
ELSE
PIUNum=CompIndex
IF (PIUNum > NumPIUs .or. PIUNum < 1) THEN
CALL ShowFatalError('SimPIU: Invalid CompIndex passed='//TRIM(TrimSigDigits(CompIndex))// &
', Number of PIU Units='//TRIM(TrimSigDigits(NumPIUs))//', PIU Unit name='//TRIM(CompName))
ENDIF
IF (CheckEquipName(PIUNum)) THEN
IF (CompName /= PIU(PIUNum)%Name) THEN
CALL ShowFatalError('SimPIU: Invalid CompIndex passed='//TRIM(TrimSigDigits(CompIndex))// &
', PIU Unit name='//TRIM(CompName)//', stored PIU Unit Name for that index='//TRIM(PIU(PIUNum)%Name))
ENDIF
CheckEquipName(PIUNum)=.false.
ENDIF
ENDIF
! initialize the unit
CALL InitPIU(PIUNum,FirstHVACIteration)
TermUnitPIU = .TRUE.
! Select the correct unit type
SELECT CASE(PIU(PIUNum)%UnitType_Num)
CASE (SingleDuct_SeriesPIU_Reheat) ! 'AirTerminal:SingleDuct:SeriesPIU:Reheat'
CALL CalcSeriesPIU(PIUNum,ZoneNum,ZoneNodeNum,FirstHVACIteration)
CASE (SingleDuct_ParallelPIU_Reheat) ! 'AirTerminal:SingleDuct:ParallelPIU:Reheat'
CALL CalcParallelPIU(PIUNum,ZoneNum,ZoneNodeNum,FirstHVACIteration)
CASE DEFAULT
CALL ShowSevereError('Illegal PI Unit Type used='//TRIM(PIU(PIUNum)%UnitType))
CALL ShowContinueError('Occurs in PI Unit='//TRIM(PIU(PIUNum)%Name))
CALL ShowFatalError('Preceding condition causes termination.')
END SELECT
TermUnitPIU = .FALSE.
! Update the current unit's outlet nodes
! no update needed: reheat coil updates outlet node; inlet nodes' mass flow rate set by Calc routine
! Fill the report variables
CALL ReportPIU(PIUNum)
RETURN
END SUBROUTINE SimPIU