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=MaxNameLength), | intent(in) | :: | AirChillerSetName | |||
integer, | intent(in) | :: | ZoneNum | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
real(kind=r64), | intent(out) | :: | SysOutputProvided | |||
real(kind=r64), | intent(out) | :: | LatOutputProvided | |||
integer, | intent(inout) | :: | AirChillerSetPtr |
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 SimAirChillerSet(AirChillerSetName, ZoneNum, FirstHVACIteration, &
SysOutputProvided,LatOutputProvided,AirChillerSetPtr)
! SUBROUTINE INFORMATION:
! AUTHOR Therese Stovall, ORNL
! DATE WRITTEN January 2011
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Transfers the load requested from the zone to the refrigeration module.
! The load is met, partially met, or not met in the call to the detailed system solution
!
! METHODOLOGY EMPLOYED:
! Called from Zone Equipment Manager.
!
! USE STATEMENTS:
USE DataZoneEnergyDemands, ONLY: ZoneSysEnergyDemand
USE InputProcessor, ONLY: FindItemInList
USE DataHeatBalFanSys, ONLY: TempControlType
USE DataHVACGlobals, ONLY: SingleHeatingSetPoint
USE General, ONLY: TrimSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=MaxNameLength), INTENT(IN) :: AirChillerSetName
LOGICAL, INTENT(IN) :: FirstHVACIteration
INTEGER, INTENT(IN) :: ZoneNum
INTEGER, INTENT(INOUT) :: AirChillerSetPtr !from ZoneEquipList(CurZoneEqNum)%EquipIndex(EquipPtr)
REAL(r64), INTENT(OUT) :: LatOutputProvided
REAL(r64), INTENT(OUT) :: SysOutputProvided
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: ChillerSetID
REAL(r64) :: RemainingOutputToCoolingSP ! Remaining requested load in zone
CALL CheckRefrigerationInput
! Find the correct Chiller set
IF (AirChillerSetPtr == 0) THEN
ChillerSetID = FindItemInList(AirChillerSetName, AirChillerSet%Name, NumRefrigChillerSets)
IF (ChillerSetID == 0) THEN
CALL ShowFatalError('SimAirChillerSet: Unit not found='//TRIM(AirChillerSetName))
ENDIF ! chillersetid ==0 because not in list
AirChillerSetPtr=ChillerSetID
ELSE !airchllersetpointer passed in call to subroutine not ==0
ChillerSetID=AirChillerSetPtr
IF (ChillerSetID > NumRefrigChillerSets .or. ChillerSetID < 1) THEN
CALL ShowFatalError('SimAirChillerSet: Invalid AirChillerSetPtr passed='// &
TRIM(TrimSigDigits(ChillerSetID,0))// &
', Number of Units='//TRIM(TrimSigDigits(NumRefrigChillerSets))// &
', Entered Unit name='//TRIM(AirChillerSetName))
ENDIF !ChillerSetID makes no sense
IF (CheckChillerSetName(ChillerSetID)) THEN
IF (AirChillerSetName /= AirChillerSet(ChillerSetID)%Name) THEN
CALL ShowFatalError('SimAirChillerSet: Invalid AirChillerSetPtr passed='// &
TRIM(TrimSigDigits(ChillerSetID))// &
', Unit name='//TRIM(AirChillerSetName)//', stored Unit Name for that index='// &
TRIM(AirChillerSet(ChillerSetID)%Name))
ENDIF !name not equal correct name
CheckChillerSetName(ChillerSetID)=.false.
ENDIF !CheckChillerSetName logical test
ENDIF !(AirChillerSetPtr == 0 or else not == 0
IF(FirstHVACIteration) THEN
DO ChillerSetID = 1,NumRefrigChillerSets !bbb what point of do loop, only set one (airchillersetptr) to zero
AirChillerSet(AirChillerSetPtr)%QZnReqSens = 0.0D0
END DO
END IF !FirstHVACIteration
RemainingOutputToCoolingSP = ZoneSysEnergyDemand(ZoneNum)%RemainingOutputReqToCoolSP
!RemainingOutputToCoolingSP in Watts, < 0 for cooling demand
IF(RemainingOutputToCoolingSP .LT. 0.0D0 .and. TempControlType(ZoneNum) .NE. SingleHeatingSetPoint)THEN
AirChillerSet(AirChillerSetPtr)%QZnReqSens = RemainingOutputToCoolingSP
ELSE
AirChillerSet(AirChillerSetPtr)%QZnReqSens = 0.0D0
END IF
UseSysTimeStep = .TRUE.
CALL ManageRefrigeratedCaseRacks
UseSysTimeStep = .FALSE.
! Return values to Zone Equipment Manager.
LatOutputProvided = CoilSysCredit(ZoneNum)%LatKgPerS_ToZoneRate
SysOutputProvided = CoilSysCredit(ZoneNum)%SenCreditToZoneRate
RETURN
END SUBROUTINE SimAirChillerSet