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) | :: | AbsorberType | |||
character(len=*), | intent(in) | :: | AbsorberName | |||
integer, | intent(in) | :: | EquipFlowCtrl | |||
integer, | intent(inout) | :: | CompIndex | |||
logical, | intent(in) | :: | RunFlag | |||
logical, | intent(in) | :: | FirstIteration | |||
logical, | intent(inout) | :: | InitLoopEquip | |||
real(kind=r64), | intent(inout) | :: | MyLoad | |||
integer, | intent(in) | :: | BranchInletNodeNum | |||
real(kind=r64), | intent(out) | :: | MaxCap | |||
real(kind=r64), | intent(out) | :: | MinCap | |||
real(kind=r64), | intent(out) | :: | OptCap | |||
logical, | intent(in) | :: | GetSizingFactor | |||
real(kind=r64), | intent(out) | :: | SizingFactor |
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 SimExhaustAbsorber(AbsorberType,AbsorberName,EquipFlowCtrl, CompIndex,RunFlag,FirstIteration,InitLoopEquip,&
MyLoad,BranchInletNodeNum,MaxCap,MinCap,OptCap,GetSizingFactor,SizingFactor)
! SUBROUTINE INFORMATION:
! AUTHOR Jason Glazer
! DATE WRITTEN March 2001
! MODIFIED Mahabir Bhandari, ORNL, Aug 2011, modified to accomodate Exhaust Fired Double Effect Absorption Chiller
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE: This is the Absorption Chiller model driver. It
! gets the input for the models, initializes simulation variables, call
! the appropriate model and sets up reporting variables.
! METHODOLOGY EMPLOYED: na
! REFERENCES: na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE CurveManager, ONLY : CurveValue
USE DataPlant, ONLY : TypeOf_Chiller_ExhFiredAbsorption
USE PlantUtilities, ONLY : UpdateChillerComponentCondenserSide
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: AbsorberType ! type of Absorber
CHARACTER(len=*), INTENT(IN) :: AbsorberName ! user specified name of Absorber
INTEGER, INTENT(IN) :: EquipFlowCtrl ! Flow control mode for the equipment
INTEGER , INTENT(IN) :: BranchInletNodeNum ! node number of inlet to calling branch,
! used to determine if heating side or cooling
! side of chiller-heater is being called
LOGICAL , INTENT(IN) :: RunFlag ! simulate Absorber when TRUE
LOGICAL , INTENT(IN) :: FirstIteration ! initialize variables when TRUE
LOGICAL, INTENT(INOUT) :: InitLoopEquip ! If not false, calculate the max load for operating conditions
REAL(r64), INTENT(INOUT) :: MyLoad ! loop demand component will meet
REAL(r64), INTENT(OUT) :: MinCap ! W - minimum operating capacity of Absorber
REAL(r64), INTENT(OUT) :: MaxCap ! W - maximum operating capacity of Absorber
REAL(r64), INTENT(OUT) :: OptCap ! W - optimal operating capacity of Absorber
INTEGER, INTENT(INOUT) :: CompIndex ! Absorber number counter
LOGICAL, INTENT(IN) :: GetSizingFactor ! TRUE when just the sizing factor is requested
REAL(r64), INTENT(OUT) :: SizingFactor ! sizing factor
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: HeatCap = 0.0d0 ! W - nominal heating capacity
LOGICAL, SAVE :: GetInput = .TRUE. ! then TRUE, calls subroutine to read input file.
!unused INTEGER :: CondReturnNodeNum !holds the node number for the condenser side return
!unused REAL(r64) :: CondMassFlowRate !the rate of mass flow for the condenser (estimated)
INTEGER :: ChillNum ! Absorber number counter
!Get Absorber data from input file
IF (GetInput) THEN
CALL GetExhaustAbsorberInput
GetInput = .FALSE.
END IF
! Find the correct Equipment
IF (CompIndex == 0) THEN
ChillNum = FindItemInList(AbsorberName,ExhaustAbsorber%Name,NumExhaustAbsorbers)
IF (ChillNum == 0) THEN
CALL ShowFatalError('SimExhaustAbsorber: Unit not found='//TRIM(AbsorberName))
ENDIF
CompIndex=ChillNum
ELSE
ChillNum=CompIndex
IF (ChillNum > NumExhaustAbsorbers .or. ChillNum < 1) THEN
CALL ShowFatalError('SimExhaustAbsorber: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(ChillNum))// &
', Number of Units='//TRIM(TrimSigDigits(NumExhaustAbsorbers))// &
', Entered Unit name='//TRIM(AbsorberName))
ENDIF
IF (CheckEquipName(ChillNum)) THEN
IF (AbsorberName /= ExhaustAbsorber(ChillNum)%Name) THEN
CALL ShowFatalError('SimExhaustAbsorber: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(ChillNum))// &
', Unit name='//TRIM(AbsorberName)//', stored Unit Name for that index='// &
TRIM(ExhaustAbsorber(ChillNum)%Name))
ENDIF
CheckEquipName(ChillNum)=.false.
ENDIF
ENDIF
! Check that this is a valid call
IF (InitLoopEquip) THEN
CALL InitExhaustAbsorber(ChillNum,RunFlag)
CALL SizeExhaustAbsorber(ChillNum)
! Match inlet node name of calling branch to determine if this call is for heating or cooling
IF (BranchInletNodeNum == ExhaustAbsorber(ChillNum)%ChillReturnNodeNum) THEN ! Operate as chiller
MinCap = ExhaustAbsorber(ChillNum)%NomCoolingCap*ExhaustAbsorber(ChillNum)%MinPartLoadRat
MaxCap = ExhaustAbsorber(ChillNum)%NomCoolingCap*ExhaustAbsorber(ChillNum)%MaxPartLoadRat
OptCap = ExhaustAbsorber(ChillNum)%NomCoolingCap*ExhaustAbsorber(ChillNum)%OptPartLoadRat
ELSEIF (BranchInletNodeNum == ExhaustAbsorber(ChillNum)%HeatReturnNodeNum) THEN ! Operate as heater
HeatCap = ExhaustAbsorber(ChillNum)%NomCoolingCap*ExhaustAbsorber(ChillNum)%NomHeatCoolRatio
MinCap = HeatCap*ExhaustAbsorber(ChillNum)%MinPartLoadRat
MaxCap = HeatCap*ExhaustAbsorber(ChillNum)%MaxPartLoadRat
OptCap = HeatCap*ExhaustAbsorber(ChillNum)%OptPartLoadRat
ELSEIF (BranchInletNodeNum == ExhaustAbsorber(ChillNum)%CondReturnNodeNum) THEN ! called from condenser loop
HeatCap = 0.d0
MinCap = 0.d0
MaxCap = 0.d0
OptCap = 0.d0
ELSE ! Error, nodes do not match
CALL ShowSevereError('SimExhaustAbsorber: Invalid call to Exhaust Absorbtion Chiller-Heater '//TRIM(AbsorberName))
CALL ShowContinueError('Node connections in branch are not consistent with object nodes.')
CALL ShowFatalError('Preceding conditions cause termination.')
ENDIF ! Operate as Chiller or Heater
IF (GetSizingFactor) THEN
SizingFactor = ExhaustAbsorber(ChillNum)%SizFac
END IF
RETURN
END IF
! Match inlet node name of calling branch to determine if this call is for heating or cooling
IF (BranchInletNodeNum .EQ. ExhaustAbsorber(ChillNum)%ChillReturnNodeNum) THEN ! Operate as chiller
! Calculate Node Values
! Calculate Equipment and Update Variables
IF (RunFlag) THEN
ExhaustAbsorber(ChillNum)%InCoolingMode = .TRUE.
ELSE
ExhaustAbsorber(ChillNum)%InCoolingMode = .FALSE.
ENDIF
CALL InitExhaustAbsorber(ChillNum,RunFlag)
CALL CalcExhaustAbsorberChillerModel(ChillNum,MyLoad,Runflag)
CALL UpdateExhaustAbsorberCoolRecords(MyLoad,RunFlag,ChillNum)
ELSEIF (BranchInletNodeNum .EQ. ExhaustAbsorber(ChillNum)%HeatReturnNodeNum) THEN ! Operate as heater
! Calculate Node Values
! Calculate Equipment and Update Variables
IF (RunFlag) THEN
ExhaustAbsorber(ChillNum)%InHeatingMode = .TRUE.
ELSE
ExhaustAbsorber(ChillNum)%InHeatingMode = .FALSE.
ENDIF
CALL InitExhaustAbsorber(ChillNum,RunFlag)
CALL CalcExhaustAbsorberHeaterModel(ChillNum,MyLoad,Runflag)
CALL UpdateExhaustAbsorberHeatRecords(MyLoad,RunFlag,ChillNum)
ELSEIF (BranchInletNodeNum == ExhaustAbsorber(ChillNum)%CondReturnNodeNum) THEN ! called from condenser loop
CALL UpdateChillerComponentCondenserSide(ExhaustAbsorber(ChillNum)%CDLoopNum, &
ExhaustAbsorber(ChillNum)%CDLoopSideNum, &
TypeOf_Chiller_ExhFiredAbsorption, &
ExhaustAbsorber(ChillNum)%CondReturnNodeNum, &
ExhaustAbsorber(ChillNum)%CondSupplyNodeNum, &
ExhaustAbsorberReport(ChillNum)%TowerLoad, &
ExhaustAbsorberReport(ChillNum)%CondReturnTemp, &
ExhaustAbsorberReport(ChillNum)%CondSupplyTemp, &
ExhaustAbsorberReport(ChillNum)%CondWaterFlowRate, &
FirstIteration)
ELSE ! Error, nodes do not match
CALL ShowSevereError('Invalid call to Exhaust Absorber Chiller '//TRIM(AbsorberName))
CALL ShowContinueError('Node connections in branch are not consistent with object nodes.')
CALL ShowFatalError('Preceding conditions cause termination.')
ENDIF
RETURN
END SUBROUTINE SimExhaustAbsorber