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 SimulateDualDuct(CompName,FirstHVACIteration, ZoneNum, ZoneNodeNum,CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Richard Liesen
! DATE WRITTEN February 2000
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine manages Damper component simulation.
! It is called from the SimAirLoopComponent
! at the system time step.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList, MakeUPPERcase
USE General, ONLY: TrimSigDigits
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: CompName
LOGICAL, INTENT (IN):: FirstHVACIteration
INTEGER, INTENT (IN):: ZoneNum
INTEGER, INTENT (IN):: ZoneNodeNum
INTEGER, INTENT (INOUT):: CompIndex
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: DamperNum ! The Damper that you are currently loading input into
! FLOW:
! Obtains and Allocates Damper related parameters from input file
IF (GetDualDuctInputFlag) THEN !First time subroutine has been entered
CALL GetDualDuctInput
GetDualDuctInputFlag=.false.
End If
! Find the correct DamperNumber with the AirLoop & CompNum from AirLoop Derived Type
IF (CompIndex == 0) THEN
DamperNum = FindItemInList(CompName,Damper%DamperName,NumDampers)
IF (DamperNum == 0) THEN
CALL ShowFatalError('SimulateDualDuct: Damper not found='//TRIM(CompName))
ENDIF
CompIndex=DamperNum
ELSE
DamperNum=CompIndex
IF (DamperNum > NumDampers .or. DamperNum < 1) THEN
CALL ShowFatalError('SimulateDualDuct: Invalid CompIndex passed='//TRIM(TrimSigDigits(CompIndex))// &
', Number of Dampers='//TRIM(TrimSigDigits(NumDampers))//', Damper name='//TRIM(CompName))
ENDIF
IF (CheckEquipName(DamperNum)) THEN
IF (CompName /= Damper(DamperNum)%DamperName) THEN
CALL ShowFatalError('SimulateDualDuct: Invalid CompIndex passed='//TRIM(TrimSigDigits(CompIndex))// &
', Damper name='//TRIM(CompName)//', stored Damper Name for that index='// &
TRIM(Damper(DamperNum)%DamperName))
ENDIF
CheckEquipName(DamperNum)=.false.
ENDIF
ENDIF
IF (CompIndex > 0) THEN
! With the correct DamperNum Initialize
CALL InitDualDuct(DamperNum,FirstHVACIteration) ! Initialize all Damper related parameters
! Calculate the Correct Damper Model with the current DamperNum
SELECT CASE(Damper(DamperNum)%DamperType)
CASE (DualDuct_ConstantVolume) ! 'AirTerminal:DualDuct:ConstantVolume'
Call SimDualDuctConstVol(DamperNum, ZoneNum, ZoneNodeNum)
CASE (DualDuct_VariableVolume) ! 'AirTerminal:DualDuct:VAV'
Call SimDualDuctVarVol(DamperNum, ZoneNum, ZoneNodeNum)
CASE (DualDuct_OutdoorAir)
Call SimDualDuctVAVOutdoorAir(DamperNum, ZoneNum, ZoneNodeNum) ! 'AirTerminal:DualDuct:VAV:OutdoorAir'
END SELECT
! Update the current Damper to the outlet nodes
Call UpdateDualDuct(DamperNum)
! Report the current Damper
Call ReportDualDuct(DamperNum)
ELSE
CALL ShowFatalError('SimulateDualDuct: Damper not found='//TRIM(CompName))
ENDIF
RETURN
END SUBROUTINE SimulateDualDuct