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 SimReformulatedEIRChiller(EIRChillerType,EIRChillerName,EquipFlowCtrl, CompIndex,LoopNum,RunFlag,FirstIteration, &
InitLoopEquip,MyLoad,MaxCap,MinCap,OptCap,GetSizingFactor,SizingFactor, &
TempCondInDesign,TempEvapOutDesign )
! SUBROUTINE INFORMATION:
! AUTHOR Lixing Gu
! DATE WRITTEN July 2004
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This is the reformulated EIR chiller model driver. It gets the input for the
! models, initializes simulation variables, calls the appropriate model and sets
! up reporting variables.
! METHODOLOGY EMPLOYED: na
! REFERENCES: na
! USE STATEMENTS:
USE DataInterfaces, ONLY : ShowFatalError
USE InputProcessor, ONLY : FindItemInList
USE PlantUtilities, ONLY : UpdateChillerComponentCondenserSide, UpdateComponentHeatRecoverySide
USE DataPlant, ONLY : TypeOf_Chiller_ElectricReformEIR
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 !unused1208
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 [W]
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
INTEGER :: LoopSide
IF (GetInputREIR) THEN
CALL GetElecReformEIRChillerInput
GetInputREIR = .FALSE.
END IF
! Find the correct Chiller
IF (CompIndex == 0) THEN
EIRChillNum = FindItemInList(EIRChillerName,ElecReformEIRChiller%Name,NumElecReformEIRChillers)
IF (EIRChillNum == 0) THEN
CALL ShowFatalError('SimReformulatedEIRChiller: Specified Chiller not one of Valid Reformulated EIR Electric Chillers='// &
TRIM(EIRChillerName))
ENDIF
CompIndex=EIRChillNum
ELSE
EIRChillNum=CompIndex
IF (EIRChillNum > NumElecReformEIRChillers .or. EIRChillNum < 1) THEN
CALL ShowFatalError('SimReformulatedEIRChiller: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(EIRChillNum))// &
', Number of Units='//TRIM(TrimSigDigits(NumElecReformEIRChillers))// &
', Entered Unit name='//TRIM(EIRChillerName))
ENDIF
IF (EIRChillerName /= ElecReformEIRChiller(EIRChillNum)%Name) THEN
CALL ShowFatalError('SimReformulatedEIRChiller: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(EIRChillNum))// &
', Unit name='//TRIM(EIRChillerName)//', stored Unit Name for that index='// &
TRIM(ElecReformEIRChiller(EIRChillNum)%Name))
ENDIF
ENDIF
IF (InitLoopEquip) THEN
TempEvapOutDesign = ElecReformEIRChiller(EIRChillNum)%TempRefEvapOut
TempCondInDesign = ElecReformEIRChiller(EIRChillNum)%TempRefCondIn
CALL InitElecReformEIRChiller(EIRChillNum,RunFlag,MyLoad)
CALL SizeElecReformEIRChiller(EIRChillNum)
IF (LoopNum == ElecReformEIRChiller(EIRChillNum)%CWLoopNum) THEN
MinCap = ElecReformEIRChiller(EIRChillNum)%RefCap*ElecReformEIRChiller(EIRChillNum)%MinPartLoadRat
MaxCap = ElecReformEIRChiller(EIRChillNum)%RefCap*ElecReformEIRChiller(EIRChillNum)%MaxPartLoadRat
OptCap = ElecReformEIRChiller(EIRChillNum)%RefCap*ElecReformEIRChiller(EIRChillNum)%OptPartLoadRat
ELSE
MinCap = 0.d0
MaxCap = 0.d0
OptCap = 0.d0
ENDIF
IF (GetSizingFactor) THEN
SizingFactor = ElecReformEIRChiller(EIRChillNum)%SizFac
END IF
RETURN
END IF
IF (LoopNum == ElecReformEIRChiller(EIRChillNum)%CWLoopNum) THEN
CALL InitElecReformEIRChiller(EIRChillNum,RunFlag,MyLoad)
CALL ControlReformEIRChillerModel(EIRChillNum,MyLoad,Runflag,FirstIteration,EquipFlowCtrl)
CALL UpdateReformEIRChillerRecords(MyLoad,RunFlag,EIRChillNum)
ELSEIF (LoopNum == ElecReformEIRChiller(EIRChillNum)%CDLoopNum) THEN
LoopSide = ElecReformEIRChiller(EIRChillNum)%CDLoopSideNum
CALL UpdateChillerComponentCondenserSide(LoopNum, LoopSide, TypeOf_Chiller_ElectricReformEIR, &
ElecReformEIRChiller(EIRChillNum)%CondInletNodeNum, &
ElecReformEIRChiller(EIRChillNum)%CondOutletNodeNum, &
ElecReformEIRChillerReport(EIRChillNum)%QCond, &
ElecReformEIRChillerReport(EIRChillNum)%CondInletTemp, &
ElecReformEIRChillerReport(EIRChillNum)%CondOutletTemp, &
ElecReformEIRChillerReport(EIRChillNum)%Condmdot, FirstIteration)
ELSEIF (LoopNum == ElecReformEIRChiller(EIRChillNum)%HRLoopNum) THEN
CALL UpdateComponentHeatRecoverySide(ElecReformEIRChiller(EIRChillNum)%HRLoopNum, &
ElecReformEIRChiller(EIRChillNum)%HRLoopSideNum, &
TypeOf_Chiller_ElectricReformEIR, &
ElecReformEIRChiller(EIRChillNum)%HeatRecInletNodeNum, &
ElecReformEIRChiller(EIRChillNum)%HeatRecOutletNodeNum, &
ElecReformEIRChillerReport(EIRChillNum)%QHeatRecovery, &
ElecReformEIRChillerReport(EIRChillNum)%HeatRecInletTemp, &
ElecReformEIRChillerReport(EIRChillNum)%HeatRecOutletTemp, &
ElecReformEIRChillerReport(EIRChillNum)%HeatRecMassFlow , &
FirstIteration)
ENDIF
RETURN
END SUBROUTINE SimReformulatedEIRChiller