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) | :: | AirLoopNum | |||
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 SimUnitaryBypassVAV(CompName, FirstHVACIteration, AirLoopNum, CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Richard Raustad
! DATE WRITTEN July 2006
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Manages the simulation of a changeover-bypass VAV system. Called from SimAirServingZones.
! METHODOLOGY EMPLOYED:
! NA
! REFERENCES:
! na
! USE STATEMENTS:
USE General, ONLY: TrimSigDigits
USE InputProcessor, ONLY: FindItemInList
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT (IN) :: CompName ! Name of the CBVAV system
LOGICAL, INTENT (IN) :: FirstHVACIteration ! TRUE if 1st HVAC simulation of system time step
INTEGER, INTENT (IN) :: AirLoopNum ! air loop index
INTEGER, INTENT (INOUT) :: CompIndex ! Index to changeover-bypass VAV system
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: CBVAVNum ! Index of CBVAV system being simulated
LOGICAL,SAVE :: GetInputFlag = .TRUE. ! First time, input is "gotten"
REAL(r64) :: OnOffAirFlowRatio ! Ratio of compressor ON airflow to average airflow over timestep
REAL(r64) :: QUnitOut ! Sensible capacity delivered by this air loop system
REAL(r64) :: QZnLoad ! Zone load required by all zones served by this air loop system
LOGICAL :: HXUnitOn ! flag to enable heat exchanger
! FLOW
! First time SimUnitaryBypassVAV is called, get the input for all the CBVAVs
IF (GetInputFlag) THEN
CALL GetCBVAV
GetInputFlag = .FALSE.
END IF
! Find the correct changeover-bypass VAV unit
IF (CompIndex == 0) THEN
CBVAVNum = FindItemInList(CompName,CBVAV%Name,NumCBVAV)
IF (CBVAVNum == 0) THEN
CALL ShowFatalError('SimUnitaryBypassVAV: Unit not found='//TRIM(CompName))
END IF
CompIndex=CBVAVNum
ELSE
CBVAVNum=CompIndex
IF (CBVAVNum > NumCBVAV .or. CBVAVNum < 1) THEN
CALL ShowFatalError('SimUnitaryBypassVAV: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(CBVAVNum))// &
', Number of Units='//TRIM(TrimSigDigits(NumCBVAV))// &
', Entered Unit name='//TRIM(CompName))
END IF
IF (CheckEquipName(CBVAVNum)) THEN
IF (CompName /= CBVAV(CBVAVNum)%Name) THEN
CALL ShowFatalError('SimUnitaryBypassVAV: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(CBVAVNum))// &
', Unit name='//TRIM(CompName)//', stored Unit Name for that index='// &
TRIM(CBVAV(CBVAVNum)%Name))
END IF
CheckEquipName(CBVAVNum)=.false.
ENDIF
END IF
OnOffAirFlowRatio = 0.0d0
HXUnitOn = .TRUE.
! Initialize the changeover-bypass VAV system
CALL InitCBVAV(CBVAVNum, FirstHVACIteration, AirLoopNum, QZnLoad, OnOffAirFlowRatio, HXUnitOn)
! Simulate the unit
CALL SimCBVAV(CBVAVNum, FirstHVACIteration, QZnLoad, QUnitOut, OnOffAirFlowRatio, HXUnitOn)
! Report the result of the simulation
CALL ReportCBVAV(CBVAVNum)
RETURN
END SUBROUTINE SimUnitaryBypassVAV