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(out) | :: | SizingFactor | |||
real(kind=r64), | intent(out) | :: | 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 SimIndirectAbsorber(AbsorberType,AbsorberName,EquipFlowCtrl,LoopNum,LoopSide,CompIndex,RunFlag,FirstIteration, &
InitLoopEquip,MyLoad,MaxCap,MinCap,OptCap,GetSizingFactor,SizingFactor,TempCondInDesign)
! SUBROUTINE INFORMATION:
! AUTHOR R. Raustad (FSEC)
! DATE WRITTEN May 2008
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE: This is the Indirect 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_Indirect_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 ! W - minimum operating capacity of Absorber
REAL(r64), INTENT(INOUT) :: MaxCap ! W - maximum operating capacity of Absorber
REAL(r64), INTENT(INOUT) :: OptCap ! W - optimal operating capacity of Absorber
INTEGER, INTENT(INOUT) :: CompIndex ! Chiller number pointer
LOGICAL, INTENT(IN) :: GetSizingFactor ! TRUE when just the sizing factor is requested
REAL(r64), INTENT(OUT) :: SizingFactor ! sizing factor
REAL(r64), INTENT(OUT) :: 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
IF ( CompIndex .NE. 0 ) THEN
TempCondInDesign = IndirectAbsorber(CompIndex)%TempDesCondIn
END IF
!Get Absorber data from input file
IF (GetInput) THEN
CALL GetIndirectAbsorberInput
GetInput = .FALSE.
END IF
! Find the correct Chiller
IF (CompIndex == 0) THEN
ChillNum = FindItemInList(AbsorberName,IndirectAbsorber%Name,NumIndirectAbsorbers)
IF (ChillNum == 0) THEN
CALL ShowFatalError('SimIndirectAbsorber: Specified chiller not one of Valid Absorption Chillers='//TRIM(AbsorberName))
ENDIF
CompIndex=ChillNum
ELSE
ChillNum=CompIndex
IF (ChillNum > NumIndirectAbsorbers .or. ChillNum < 1) THEN
CALL ShowFatalError('SimIndirectAbsorber: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(ChillNum))// &
', Number of Units='//TRIM(TrimSigDigits(NumIndirectAbsorbers))// &
', Entered Unit name='//TRIM(AbsorberName))
ENDIF
IF (AbsorberName /= IndirectAbsorber(ChillNum)%Name) THEN
CALL ShowFatalError('SimIndirectAbsorber: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(ChillNum))// &
', Unit name='//TRIM(AbsorberName)//', stored Unit Name for that index='// &
TRIM(IndirectAbsorber(ChillNum)%Name))
ENDIF
ENDIF
! Initialize Loop Equipment
IF (InitLoopEquip) THEN
CALL InitIndirectAbsorpChiller(ChillNum,RunFlag, MyLoad)
CALL SizeIndirectAbsorpChiller(ChillNum)
IF (LoopNum == IndirectAbsorber(ChillNum)%CWLoopNum ) THEN
MinCap = IndirectAbsorber(ChillNum)%NomCap*IndirectAbsorber(ChillNum)%MinPartLoadRat
MaxCap = IndirectAbsorber(ChillNum)%NomCap*IndirectAbsorber(ChillNum)%MaxPartLoadRat
OptCap = IndirectAbsorber(ChillNum)%NomCap*IndirectAbsorber(ChillNum)%OptPartLoadRat
ELSE
MinCap = 0.d0
MaxCap = 0.d0
OptCap = 0.d0
ENDIF
IF (GetSizingFactor) THEN
ChillNum = FindItemInList(AbsorberName,IndirectAbsorber%Name,NumIndirectAbsorbers)
IF (ChillNum /= 0) THEN
SizingFactor = IndirectAbsorber(ChillNum)%SizFac
END IF
END IF
RETURN
END IF
IF (LoopNum == IndirectAbsorber(ChillNum)%CWLoopNum ) THEN
CALL InitIndirectAbsorpChiller(ChillNum,RunFlag, MyLoad)
CALL CalcIndirectAbsorberModel(ChillNum,MyLoad,Runflag,FirstIteration, EquipFlowCtrl)
CALL UpdateIndirectAbsorberRecords(MyLoad,RunFlag,ChillNum)
ELSEIF (LoopNum == IndirectAbsorber(ChillNum)%CDLoopNum ) THEN
! Called from non-dominant condenser water connection loop side
CALL UpdateChillerComponentCondenserSide(LoopNum, LoopSide, TypeOf_Chiller_Indirect_Absorption, &
IndirectAbsorber(ChillNum)%CondInletNodeNum, &
IndirectAbsorber(ChillNum)%CondOutletNodeNum, &
IndirectAbsorberReport(ChillNum)%QCond, &
IndirectAbsorberReport(ChillNum)%CondInletTemp, &
IndirectAbsorberReport(ChillNum)%CondOutletTemp , &
IndirectAbsorberReport(ChillNum)%Condmdot , FirstIteration)
ELSEIF (LoopNum == IndirectAbsorber(ChillNum)%GenLoopNum ) THEN
! Called from non-dominant generator hot water or steam connection loop side
CALL UpdateAbsorberChillerComponentGeneratorSide(LoopNum, LoopSide, TypeOf_Chiller_Indirect_Absorption, &
IndirectAbsorber(ChillNum)%GeneratorInletNodeNum, &
IndirectAbsorber(ChillNum)%GeneratorOutletNodeNum, &
IndirectAbsorber(ChillNum)%GenHeatSourceType, &
IndirectAbsorberReport(ChillNum)%QGenerator, &
IndirectAbsorberReport(ChillNum)%SteamMdot , FirstIteration)
ELSE
CALL ShowFatalError('SimIndirectAbsorber: Invalid LoopNum passed=' // &
TRIM(TrimSigDigits(LoopNum))// &
', Unit name='//TRIM(AbsorberName)// &
', stored chilled water loop='// &
TRIM(TrimSigDigits(IndirectAbsorber(ChillNum)%CWLoopNum)) // &
', stored condenser water loop='// &
TRIM(TrimSigDigits(IndirectAbsorber(ChillNum)%CDLoopNum)) // &
', stored generator loop='// &
TRIM(TrimSigDigits(IndirectAbsorber(ChillNum)%GenLoopNum)) )
ENDIF
RETURN
END SUBROUTINE SimIndirectAbsorber