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) | :: | EIRChillerType | |||
character(len=*), | intent(in) | :: | EIRChillerName | |||
integer, | intent(in) | :: | EquipFlowCtrl | |||
integer, | intent(inout) | :: | CompIndex | |||
integer, | intent(in) | :: | LoopNum | |||
logical, | intent(in) | :: | RunFlag | |||
logical, | intent(in) | :: | FirstIteration | |||
logical, | intent(inout) | :: | InitLoopEquip | |||
real(kind=r64), | intent(inout) | :: | MyLoad | |||
real(kind=r64), | intent(inout) | :: | MaxCap | |||
real(kind=r64), | intent(inout) | :: | MinCap | |||
real(kind=r64), | intent(inout) | :: | OptCap | |||
logical, | intent(in) | :: | GetSizingFactor | |||
real(kind=r64), | intent(inout) | :: | SizingFactor | |||
real(kind=r64), | intent(inout) | :: | TempCondInDesign | |||
real(kind=r64), | intent(inout) | :: | TempEvapOutDesign |
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 SimElectricEIRChiller(EIRChillerType,EIRChillerName,EquipFlowCtrl, CompIndex,LoopNum, RunFlag,FirstIteration, &
InitLoopEquip,MyLoad,MaxCap,MinCap,OptCap,GetSizingFactor,SizingFactor, &
TempCondInDesign,TempEvapOutDesign)
! SUBROUTINE INFORMATION:
! AUTHOR Richard Raustad
! DATE WRITTEN June 2004
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This is the electric EIR chiller model driver. It gets the input for the
! model, initializes simulation variables, calls the appropriate model and sets
! up reporting variables.
! METHODOLOGY EMPLOYED: na
! REFERENCES: na
! USE STATEMENTS:
USE InputProcessor, ONLY : FindItemInList
USE PlantUtilities, ONLY : UpdateChillerComponentCondenserSide, UpdateComponentHeatRecoverySide
USE DataPlant, ONLY : TypeOf_Chiller_ElectricEIR
USE DataSizing, ONLY : CurLoopNum
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: EIRChillerType ! Type of chiller
CHARACTER(len=*), INTENT(IN) :: EIRChillerName ! User specified name of chiller
INTEGER, INTENT(IN) :: EquipFlowCtrl ! Flow control mode for the equipment
LOGICAL, INTENT(IN) :: RunFlag ! Simulate chiller when TRUE
LOGICAL, INTENT(IN) :: FirstIteration ! Initialize variables when TRUE
LOGICAL, INTENT(INOUT) :: InitLoopEquip ! If not zero, calculate the max load for operating conditions
REAL(r64), INTENT(INOUT) :: MyLoad ! Loop demand component will meet
REAL(r64), INTENT(INOUT) :: MinCap ! Minimum operating capacity of chiller [W]
REAL(r64), INTENT(INOUT) :: MaxCap ! Maximum operating capacity of chiller [W]
REAL(r64), INTENT(INOUT) :: OptCap ! Optimal operating capacity of chiller [W]
INTEGER, INTENT(INOUT) :: CompIndex ! Chiller number pointer
INTEGER, INTENT(IN) :: LoopNum ! plant loop index pointer
LOGICAL, INTENT(IN) :: GetSizingFactor ! TRUE when just the sizing factor is requested
REAL(r64), INTENT(INOUT) :: SizingFactor ! sizing factor
REAL(r64), INTENT(INOUT) :: TempCondInDesign
REAL(r64), INTENT(INOUT) :: TempEvapOutDesign
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: EIRChillNum ! Chiller number pointer
INTEGER :: LoopSide
IF (GetInputEIR) THEN
CALL GetElectricEIRChillerInput
GetInputEIR = .FALSE.
END IF
! Find the correct Chiller
IF (CompIndex == 0) THEN
EIRChillNum = FindItemInList(EIRChillerName,ElectricEIRChiller%Name,NumElectricEIRChillers)
IF (EIRChillNum == 0) THEN
CALL ShowFatalError('SimElectricEIRChiller: Specified Chiller not one of Valid EIR Electric Chillers='//TRIM(EIRChillerName))
ENDIF
CompIndex=EIRChillNum
ELSE
EIRChillNum=CompIndex
IF (EIRChillNum > NumElectricEIRChillers .or. EIRChillNum < 1) THEN
CALL ShowFatalError('SimElectricEIRChiller: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(EIRChillNum))// &
', Number of Units='//TRIM(TrimSigDigits(NumElectricEIRChillers))// &
', Entered Unit name='//TRIM(EIRChillerName))
ENDIF
IF (CheckEquipName(EIRChillNum)) THEN
IF (EIRChillerName /= ElectricEIRChiller(EIRChillNum)%Name) THEN
CALL ShowFatalError('SimElectricEIRChiller: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(EIRChillNum))// &
', Unit name='//TRIM(EIRChillerName)//', stored Unit Name for that index='// &
TRIM(ElectricEIRChiller(EIRChillNum)%Name))
ENDIF
CheckEquipName(EIRChillNum)=.false.
ENDIF
ENDIF
IF (InitLoopEquip) THEN
TempEvapOutDesign = ElectricEIRChiller(EIRChillNum)%TempRefEvapOut
TempCondInDesign = ElectricEIRChiller(EIRChillNum)%TempRefCondIn
CALL InitElectricEIRChiller(EIRChillNum,RunFlag,MyLoad)
CALL SizeElectricEIRChiller(EIRChillNum)
IF (LoopNum == ElectricEIRChiller(EIRChillNum)%CWLoopNum) THEN
MinCap = ElectricEIRChiller(EIRChillNum)%RefCap*ElectricEIRChiller(EIRChillNum)%MinPartLoadRat
MaxCap = ElectricEIRChiller(EIRChillNum)%RefCap*ElectricEIRChiller(EIRChillNum)%MaxPartLoadRat
OptCap = ElectricEIRChiller(EIRChillNum)%RefCap*ElectricEIRChiller(EIRChillNum)%OptPartLoadRat
ELSE
MinCap = 0.d0
MaxCap = 0.d0
OptCap = 0.d0
ENDIF
IF (GetSizingFactor) THEN
SizingFactor = ElectricEIRChiller(EIRChillNum)%SizFac
END IF
RETURN
END IF
IF (LoopNum == ElectricEIRChiller(EIRChillNum)%CWLoopNum) THEN
CALL InitElectricEIRChiller(EIRChillNum,RunFlag,MyLoad)
CALL CalcElectricEIRChillerModel(EIRChillNum,MyLoad,Runflag,FirstIteration,EquipFlowCtrl)
CALL UpdateElectricEIRChillerRecords(MyLoad,RunFlag,EIRChillNum)
ELSEIF (LoopNum == ElectricEIRChiller(EIRChillNum)%CDLoopNum) THEN
LoopSide = ElectricEIRChiller(EIRChillNum)%CDLoopSideNum
CALL UpdateChillerComponentCondenserSide(LoopNum, LoopSide, TypeOf_Chiller_ElectricEIR, &
ElectricEIRChiller(EIRChillNum)%CondInletNodeNum, &
ElectricEIRChiller(EIRChillNum)%CondOutletNodeNum, &
ElectricEIRChillerReport(EIRChillNum)%QCond, &
ElectricEIRChillerReport(EIRChillNum)%CondInletTemp, &
ElectricEIRChillerReport(EIRChillNum)%CondOutletTemp, &
ElectricEIRChillerReport(EIRChillNum)%Condmdot, FirstIteration)
ELSEIF (LoopNum == ElectricEIRChiller(EIRChillNum)%HRLoopNum) THEN
CALL UpdateComponentHeatRecoverySide(ElectricEIRChiller(EIRChillNum)%HRLoopNum, &
ElectricEIRChiller(EIRChillNum)%HRLoopSideNum, &
TypeOf_Chiller_ElectricEIR, &
ElectricEIRChiller(EIRChillNum)%HeatRecInletNodeNum, &
ElectricEIRChiller(EIRChillNum)%HeatRecOutletNodeNum, &
ElectricEIRChillerReport(EIRChillNum)%QHeatRecovery, &
ElectricEIRChillerReport(EIRChillNum)%HeatRecInletTemp, &
ElectricEIRChillerReport(EIRChillNum)%HeatRecOutletTemp, &
ElectricEIRChillerReport(EIRChillNum)%HeatRecMassFlow , &
FirstIteration)
ENDIF
RETURN
END SUBROUTINE SimElectricEIRChiller