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 | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ChillNum |
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.
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 SizeGasAbsorber(ChillNum)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN June 2003
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for sizing direct fired gas absorption chiller components for which
! capacities and flow rates have not been specified in the input.
! METHODOLOGY EMPLOYED:
! Obtains evaporator flow rate from the plant sizing array. Calculates nominal capacity from
! the evaporator flow rate and the chilled water loop design delta T. The condenser flow rate
! is calculated from the nominal capacity, the COP, and the condenser loop design delta T.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataSizing
USE DataPlant, ONLY: PlantLoop, PlantSizesOkayToFinalize
USE PlantUtilities, ONLY: RegisterPlantCompDesignFlow
USE ReportSizingManager, ONLY: ReportSizingOutput
USE OutputReportPredefined
! USE BranchInputManager, ONLY: MyPlantSizingIndex
USE FluidProperties, ONLY: GetDensityGlycol, GetSpecificHeatGlycol
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: ChillNum
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: PltSizCoolNum ! Plant Sizing index for cooling loop
INTEGER :: PltSizHeatNum ! Plant Sizing index for heating loop
INTEGER :: PltSizCondNum ! Plant Sizing index for condenser loop
LOGICAL :: ErrorsFound ! If errors detected in input
! LOGICAL :: LoopErrorsFound
CHARACTER(len=MaxNameLength) :: equipName
REAL(r64) :: Cp ! local fluid specific heat
REAL(r64) :: rho ! local fluid density
REAL(r64) :: tmpNomCap ! local nominal capacity cooling power
REAL(r64) :: tmpEvapVolFlowRate ! local evaporator design volume flow rate
REAL(r64) :: tmpCondVolFlowRate ! local condenser design volume flow rate
REAL(r64) :: tmpHeatRecVolFlowRate ! local heat recovery design volume flow rate
PltSizCoolNum = 0
PltSizCondNum = 0
PltSizHeatNum = 0
ErrorsFound = .FALSE.
tmpNomCap = GasAbsorber(ChillNum)%NomCoolingCap
tmpEvapVolFlowRate = GasAbsorber(ChillNum)%EvapVolFlowRate
tmpCondVolFlowRate = GasAbsorber(ChillNum)%CondVolFlowRate
tmpHeatRecVolFlowRate = GasAbsorber(ChillNum)%HeatVolFlowRate
IF (GasAbsorber(ChillNum)%NomCoolingCap == AutoSize .or. &
GasAbsorber(ChillNum)%EvapVolFlowRate == AutoSize .or. &
GasAbsorber(ChillNum)%HeatVolFlowRate == AutoSize .or. &
GasAbsorber(ChillNum)%CondVolFlowRate == AutoSize) THEN
IF (GasAbsorber(ChillNum)%isWaterCooled) &
PltSizCondNum = PlantLoop(GasAbsorber(ChillNum)%CDLoopNum)%PlantSizNum
PltSizHeatNum = PlantLoop(GasAbsorber(ChillNum)%HWLoopNum)%PlantSizNum
PltSizCoolNum = PlantLoop(GasAbsorber(ChillNum)%CWLoopNum)%PlantSizNum
ENDIF
IF (GasAbsorber(ChillNum)%NomCoolingCap == AutoSize) THEN
IF (PltSizCoolNum > 0) THEN
IF (PlantSizData(PltSizCoolNum)%DesVolFlowRate >= SmallWaterVolFlow) THEN
Cp = GetSpecificHeatGlycol(PlantLoop(GasAbsorber(ChillNum)%CWLoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(GasAbsorber(ChillNum)%CWLoopNum)%FluidIndex, &
'SizeGasAbsorber')
rho = GetDensityGlycol(PlantLoop(GasAbsorber(ChillNum)%CWLoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(GasAbsorber(ChillNum)%CWLoopNum)%FluidIndex, &
'SizeGasAbsorber')
tmpNomCap = Cp * rho * PlantSizData(PltSizCoolNum)%DeltaT &
* PlantSizData(PltSizCoolNum)%DesVolFlowRate * GasAbsorber(ChillNum)%SizFac
IF (PlantSizesOkayToFinalize) GasAbsorber(ChillNum)%NomCoolingCap = tmpNomCap
ELSE
tmpNomCap = 0.d0
IF (PlantSizesOkayToFinalize) GasAbsorber(ChillNum)%NomCoolingCap = tmpNomCap
END IF
IF (PlantSizesOkayToFinalize) CALL ReportSizingOutput('ChillerHeater:Absorption:DirectFired', GasAbsorber(ChillNum)%Name, &
'Nominal Cooling Capacity [W]', GasAbsorber(ChillNum)%NomCoolingCap)
ELSE
CALL ShowSevereError('SizeGasAbsorber: ChillerHeater:Absorption:DirectFired="'//trim(GasAbsorber(ChillNum)%Name)// &
'", autosize error.')
CALL ShowContinueError('Autosizing of Direct Fired Absorption Chiller nominal cooling capacity requires')
CALL ShowContinueError('a cooling loop Sizing:Plant object.')
ErrorsFound = .TRUE.
END IF
END IF
IF (GasAbsorber(ChillNum)%EvapVolFlowRate == AutoSize) THEN
IF (PltSizCoolNum > 0) THEN
IF (PlantSizData(PltSizCoolNum)%DesVolFlowRate >= SmallWaterVolFlow) THEN
tmpEvapVolFlowRate = PlantSizData(PltSizCoolNum)%DesVolFlowRate * GasAbsorber(ChillNum)%SizFac
IF (PlantSizesOkayToFinalize) GasAbsorber(ChillNum)%EvapVolFlowRate = tmpEvapVolFlowRate
ELSE
tmpEvapVolFlowRate = 0.d0
IF (PlantSizesOkayToFinalize) GasAbsorber(ChillNum)%EvapVolFlowRate = tmpEvapVolFlowRate
END IF
IF (PlantSizesOkayToFinalize) CALL ReportSizingOutput('ChillerHeater:Absorption:DirectFired', GasAbsorber(ChillNum)%Name, &
'Design Chilled Water Flow Rate [m3/s]', &
GasAbsorber(ChillNum)%EvapVolFlowRate)
ELSE
CALL ShowSevereError('SizeGasAbsorber: ChillerHeater:Absorption:DirectFired="'//trim(GasAbsorber(ChillNum)%Name)// &
'", autosize error.')
CALL ShowContinueError('Autosizing of Direct Fired Absorption Chiller evap flow rate requires')
CALL ShowContinueError('a cooling loop Sizing:Plant object.')
ErrorsFound = .TRUE.
END IF
END IF
CALL RegisterPlantCompDesignFlow(GasAbsorber(ChillNum)%ChillReturnNodeNum,tmpEvapVolFlowRate)
IF (GasAbsorber(ChillNum)%HeatVolFlowRate == AutoSize) THEN
IF (PltSizHeatNum > 0) THEN
IF (PlantSizData(PltSizHeatNum)%DesVolFlowRate >= SmallWaterVolFlow) THEN
tmpHeatRecVolFlowRate = PlantSizData(PltSizHeatNum)%DesVolFlowRate * GasAbsorber(ChillNum)%SizFac
IF (PlantSizesOkayToFinalize) GasAbsorber(ChillNum)%HeatVolFlowRate = tmpHeatRecVolFlowRate
ELSE
tmpHeatRecVolFlowRate = 0.d0
IF (PlantSizesOkayToFinalize) GasAbsorber(ChillNum)%HeatVolFlowRate = tmpHeatRecVolFlowRate
END IF
IF (PlantSizesOkayToFinalize) CALL ReportSizingOutput('ChillerHeater:Absorption:DirectFired', GasAbsorber(ChillNum)%Name, &
'Design Hot Water Flow Rate [m3/s]', &
GasAbsorber(ChillNum)%HeatVolFlowRate)
ELSE
CALL ShowSevereError('SizeGasAbsorber: ChillerHeater:Absorption:DirectFired="'//trim(GasAbsorber(ChillNum)%Name)// &
'", autosize error.')
CALL ShowContinueError('Autosizing of Direct Fired Absorption Chiller hot water flow rate requires')
CALL ShowContinueError('a heating loop Sizing:Plant object.')
ErrorsFound = .TRUE.
END IF
END IF
CALL RegisterPlantCompDesignFlow(GasAbsorber(ChillNum)%HeatReturnNodeNum,tmpHeatRecVolFlowRate)
IF ((GasAbsorber(ChillNum)%CondVolFlowRate == AutoSize) .AND. (GasAbsorber(ChillNum)%isWaterCooled)) THEN
IF (PltSizCondNum > 0) THEN
IF (PlantSizData(PltSizCoolNum)%DesVolFlowRate >= SmallWaterVolFlow) THEN
Cp = GetSpecificHeatGlycol(PlantLoop(GasAbsorber(ChillNum)%CDLoopNum)%FluidName, &
GasAbsorber(ChillNum)%TempDesCondReturn, &
PlantLoop(GasAbsorber(ChillNum)%CDLoopNum)%FluidIndex, &
'SizeGasAbsorber')
rho = GetDensityGlycol(PlantLoop(GasAbsorber(ChillNum)%CDLoopNum)%FluidName, &
GasAbsorber(ChillNum)%TempDesCondReturn, &
PlantLoop(GasAbsorber(ChillNum)%CDLoopNum)%FluidIndex, &
'SizeGasAbsorber')
tmpCondVolFlowRate = tmpNomCap * &
(1.0d0 + GasAbsorber(ChillNum)%FuelCoolRatio) / &
( PlantSizData(PltSizCondNum)%DeltaT * Cp * rho )
IF (PlantSizesOkayToFinalize) GasAbsorber(ChillNum)%CondVolFlowRate = tmpCondVolFlowRate
ELSE
tmpCondVolFlowRate = 0.d0
IF (PlantSizesOkayToFinalize) GasAbsorber(ChillNum)%CondVolFlowRate = tmpCondVolFlowRate
END IF
IF (PlantSizesOkayToFinalize) CALL ReportSizingOutput('ChillerHeater:Absorption:DirectFired', GasAbsorber(ChillNum)%Name, &
'Design Condenser Water Flow Rate [m3/s]', &
GasAbsorber(ChillNum)%CondVolFlowRate)
ELSE
CALL ShowSevereError('SizeGasAbsorber: ChillerHeater:Absorption:DirectFired="'//trim(GasAbsorber(ChillNum)%Name)// &
'", autosize error.')
CALL ShowContinueError('Autosizing of Direct Fired Absorption Chiller condenser flow rate requires a condenser')
CALL ShowContinueError('loop Sizing:Plant object.')
ErrorsFound = .TRUE.
END IF
END IF
! save the design condenser water volumetric flow rate for use by the condenser water loop sizing algorithms
IF (GasAbsorber(ChillNum)%isWaterCooled) &
CALL RegisterPlantCompDesignFlow(GasAbsorber(ChillNum)%CondReturnNodeNum,tmpCondVolFlowRate)
IF (ErrorsFound) THEN
CALL ShowFatalError('Preceding sizing errors cause program termination')
END IF
IF (PlantSizesOkayToFinalize) THEN
!create predefined report
equipName = GasAbsorber(ChillNum)%Name
CALL PreDefTableEntry(pdchMechType,equipName,'ChillerHeater:Absorption:DirectFired')
CALL PreDefTableEntry(pdchMechNomEff,equipName,GasAbsorber(ChillNum)%FuelCoolRatio)
CALL PreDefTableEntry(pdchMechNomCap,equipName,GasAbsorber(ChillNum)%NomCoolingCap)
ENDIF
RETURN
END SUBROUTINE SizeGasAbsorber