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 | |||
real(kind=r64) | :: | NonAirSysOutput |
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 SimCoolBeam(CompName, FirstHVACIteration, ZoneNum, ZoneNodeNum, CompIndex, NonAirSysOutput)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN Feb 3, 2009
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Manages the simulation of a cooled beam 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 cooled beam unit
LOGICAL, INTENT (IN) :: FirstHVACIteration ! TRUE if first HVAC iteration in time step
INTEGER, INTENT (IN) :: ZoneNum ! index of zone served by the unit
INTEGER, INTENT (IN) :: ZoneNodeNum ! zone node number of zone served by the unit
INTEGER, INTENT (INOUT) :: CompIndex ! which cooled beam unit in data structure
REAL(r64) :: NonAirSysOutput ! convective cooling by the beam system [W]
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: CBNum ! index of cooled beam unit being simulated
LOGICAL,SAVE :: GetInputFlag = .TRUE. ! First time, input is "gotten"
! First time SimIndUnit is called, get the input for all the cooled beam units
IF (GetInputFlag) THEN
CALL GetCoolBeams
GetInputFlag = .FALSE.
END IF
! Get the unit index
IF (CompIndex == 0) THEN
CBNum = FindItemInList(CompName,CoolBeam%Name,NumCB)
IF (CBNum == 0) THEN
CALL ShowFatalError('SimCoolBeam: Cool Beam Unit not found='//TRIM(CompName))
ENDIF
CompIndex=CBNum
ELSE
CBNum=CompIndex
IF (CBNum > NumCB .or. CBNum < 1) THEN
CALL ShowFatalError('SimCoolBeam: Invalid CompIndex passed='//TRIM(TrimSigDigits(CompIndex))// &
', Number of Cool Beam Units='//TRIM(TrimSigDigits(NumCB))// &
', System name='//TRIM(CompName))
ENDIF
IF (CheckEquipName(CBNum)) THEN
IF (CompName /= CoolBeam(CBNum)%Name) THEN
CALL ShowFatalError('SimCoolBeam: Invalid CompIndex passed='//TRIM(TrimSigDigits(CompIndex))// &
', Cool Beam Unit name='//TRIM(CompName)//', stored Cool Beam Unit for that index='// &
TRIM(CoolBeam(CBNum)%Name))
ENDIF
CheckEquipName(CBNum)=.false.
ENDIF
ENDIF
IF (CBNum .EQ. 0) THEN
CALL ShowFatalError('Cool Beam Unit not found = '//TRIM(CompName))
END IF
! initialize the unit
CALL InitCoolBeam(CBNum,FirstHVACIteration)
CALL ControlCoolBeam(CBNum,ZoneNum,ZoneNodeNum,FirstHVACIteration,NonAirSysOutput)
! Update the current unit's outlet nodes. No update needed
CALL UpdateCoolBeam(CBNum)
! Fill the report variables. There are no report variables
CALL ReportCoolBeam(CBNum)
RETURN
END SUBROUTINE SimCoolBeam