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(in) | :: | LoopNum | |||
integer, | intent(in) | :: | LoopSide | |||
integer, | intent(inout) | :: | CompIndex | |||
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 |
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 SimBLASTAbsorber(AbsorberType,AbsorberName,EquipFlowCtrl,LoopNum,LoopSide,CompIndex,RunFlag,FirstIteration, &
InitLoopEquip,MyLoad,MaxCap,MinCap,OptCap,GetSizingFactor,SizingFactor, TempCondInDesign)
! SUBROUTINE INFORMATION:
! AUTHOR Dan Fisher
! DATE WRITTEN Nov. 2000
! MODIFIED na
! 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 PlantUtilities, ONLY: UpdateChillerComponentCondenserSide, UpdateAbsorberChillerComponentGeneratorSide
USE DataPlant, ONLY: TypeOf_Chiller_Absorption
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) :: LoopNum ! Plant loop index for where called from
INTEGER, INTENT(IN) :: LoopSide ! Plant loop side index for where called from
LOGICAL , INTENT(IN) :: RunFlag ! simulate Absorber 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
LOGICAL, INTENT(IN) :: GetSizingFactor ! TRUE when just the sizing factor is requested
REAL(r64), INTENT(INOUT) :: SizingFactor ! sizing factor
REAL(r64), INTENT(INOUT) :: TempCondInDesign
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL, SAVE :: GetInput = .TRUE.! when TRUE, calls subroutine to read input file.
INTEGER :: ChillNum ! Chiller number pointer
!Get Absorber data from input file
IF (GetInput) THEN
CALL GetBLASTAbsorberInput
GetInput = .FALSE.
END IF
! Find the correct Chiller
IF (CompIndex == 0) THEN
ChillNum = FindItemInList(AbsorberName,BLASTAbsorber%Name,NumBLASTAbsorbers)
IF (ChillNum == 0) THEN
CALL ShowFatalError('SimBLASTAbsorber: Specified Absorber not one of Valid Absorption Chillers='//TRIM(AbsorberName))
ENDIF
CompIndex=ChillNum
ELSE
ChillNum=CompIndex
IF (ChillNum > NumBLASTAbsorbers .or. ChillNum < 1) THEN
CALL ShowFatalError('SimBLASTAbsorber: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(ChillNum))// &
', Number of Units='//TRIM(TrimSigDigits(NumBLASTAbsorbers))// &
', Entered Unit name='//TRIM(AbsorberName))
ENDIF
IF (CheckEquipName(ChillNum)) THEN
IF (AbsorberName /= BLASTAbsorber(ChillNum)%Name) THEN
CALL ShowFatalError('SimBLASTAbsorber: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(ChillNum))// &
', Unit name='//TRIM(AbsorberName)//', stored Unit Name for that index='// &
TRIM(BLASTAbsorber(ChillNum)%Name))
ENDIF
CheckEquipName(ChillNum)=.false.
ENDIF
ENDIF
! Initialize Loop Equipment
IF (InitLoopEquip) THEN
TempCondInDesign = BLASTAbsorber(ChillNum)%TempDesCondIn
CALL InitBLASTAbsorberModel(ChillNum,RunFlag,MyLoad)
CALL SizeAbsorpChiller(ChillNum)
IF (LoopNum == BLASTAbsorber(ChillNum)%CWLoopNum) THEN
MinCap = BLASTAbsorber(ChillNum)%NomCap*BLASTAbsorber(ChillNum)%MinPartLoadRat
MaxCap = BLASTAbsorber(ChillNum)%NomCap*BLASTAbsorber(ChillNum)%MaxPartLoadRat
OptCap = BLASTAbsorber(ChillNum)%NomCap*BLASTAbsorber(ChillNum)%OptPartLoadRat
ELSE
MinCap = 0.d0
MaxCap = 0.d0
OptCap = 0.d0
ENDIF
IF (GetSizingFactor) THEN
SizingFactor = BLASTAbsorber(ChillNum)%SizFac
END IF
RETURN
END IF
! different actions depending on which loop the component was called from
IF (LoopNum == BLASTAbsorber(ChillNum)%CWLoopNum) THEN
! called from dominant chilled water connection loop side
!Calculate Load
CALL InitBLASTAbsorberModel(ChillNum,RunFlag, MyLoad)
CALL CalcBLASTAbsorberModel(ChillNum,MyLoad,Runflag,FirstIteration, EquipFlowCtrl)
CALL UpdateBLASTAbsorberRecords(MyLoad,RunFlag,ChillNum)
ELSEIF (LoopNum == BLASTAbsorber(ChillNum)%CDLoopNum ) THEN
! Called from non-dominant condenser water connection loop side
CALL UpdateChillerComponentCondenserSide(LoopNum, LoopSide, TypeOf_Chiller_Absorption, &
BLASTAbsorber(ChillNum)%CondInletNodeNum, &
BLASTAbsorber(ChillNum)%CondOutletNodeNum, &
BLASTAbsorberReport(ChillNum)%QCond, &
BLASTAbsorberReport(ChillNum)%CondInletTemp, &
BLASTAbsorberReport(ChillNum)%CondOutletTemp , &
BLASTAbsorberReport(ChillNum)%Condmdot, FirstIteration )
ELSEIF (LoopNum == BLASTAbsorber(ChillNum)%GenLoopNum) THEN
! Called from non-dominant generator hot water or steam connection loop side
CALL UpdateAbsorberChillerComponentGeneratorSide(LoopNum, LoopSide, TypeOf_Chiller_Absorption, &
BLASTAbsorber(ChillNum)%GeneratorInletNodeNum, &
BLASTAbsorber(ChillNum)%GeneratorOutletNodeNum, &
BLASTAbsorber(ChillNum)%GenHeatSourceType, &
BLASTAbsorberReport(ChillNum)%QGenerator, &
BLASTAbsorberReport(ChillNum)%SteamMdot, FirstIteration )
ELSE
CALL ShowFatalError('SimBLASTAbsorber: Invalid LoopNum passed=' // &
TRIM(TrimSigDigits(LoopNum))// &
', Unit name='//TRIM(AbsorberName)// &
', stored chilled water loop='// &
TRIM(TrimSigDigits(BLASTAbsorber(ChillNum)%CWLoopNum)) // &
', stored condenser water loop='// &
TRIM(TrimSigDigits(BLASTAbsorber(ChillNum)%CDLoopNum)) // &
', stored generator loop='// &
TRIM(TrimSigDigits(BLASTAbsorber(ChillNum)%GenLoopNum)) )
ENDIF
RETURN
END SUBROUTINE SimBLASTAbsorber