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 SizeExhaustAbsorber(ChillNum)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN June 2003
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for sizing Exhaust Fired 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 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 = ExhaustAbsorber(ChillNum)%NomCoolingCap
tmpEvapVolFlowRate = ExhaustAbsorber(ChillNum)%EvapVolFlowRate
tmpCondVolFlowRate = ExhaustAbsorber(ChillNum)%CondVolFlowRate
tmpHeatRecVolFlowRate = ExhaustAbsorber(ChillNum)%HeatVolFlowRate
IF (ExhaustAbsorber(ChillNum)%NomCoolingCap == AutoSize .or. &
ExhaustAbsorber(ChillNum)%EvapVolFlowRate == AutoSize .or. &
ExhaustAbsorber(ChillNum)%HeatVolFlowRate == AutoSize .or. &
ExhaustAbsorber(ChillNum)%CondVolFlowRate == AutoSize) THEN
IF (ExhaustAbsorber(ChillNum)%isWaterCooled) &
PltSizCondNum = PlantLoop(ExhaustAbsorber(ChillNum)%CDLoopNum)%PlantSizNum
PltSizHeatNum = PlantLoop(ExhaustAbsorber(ChillNum)%HWLoopNum)%PlantSizNum
PltSizCoolNum = PlantLoop(ExhaustAbsorber(ChillNum)%CWLoopNum)%PlantSizNum
ENDIF
IF (ExhaustAbsorber(ChillNum)%NomCoolingCap == AutoSize) THEN
IF (PltSizCoolNum > 0) THEN
IF (PlantSizData(PltSizCoolNum)%DesVolFlowRate >= SmallWaterVolFlow) THEN
Cp = GetSpecificHeatGlycol(PlantLoop(ExhaustAbsorber(ChillNum)%CWLoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(ExhaustAbsorber(ChillNum)%CWLoopNum)%FluidIndex, &
'SizeExhaustAbsorber')
rho = GetDensityGlycol(PlantLoop(ExhaustAbsorber(ChillNum)%CWLoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(ExhaustAbsorber(ChillNum)%CWLoopNum)%FluidIndex, &
'SizeExhaustAbsorber')
tmpNomCap = Cp * rho * PlantSizData(PltSizCoolNum)%DeltaT &
* PlantSizData(PltSizCoolNum)%DesVolFlowRate * ExhaustAbsorber(ChillNum)%SizFac
IF (PlantSizesOkayToFinalize) ExhaustAbsorber(ChillNum)%NomCoolingCap = tmpNomCap
ELSE
tmpNomCap = 0.d0
IF (PlantSizesOkayToFinalize) ExhaustAbsorber(ChillNum)%NomCoolingCap = tmpNomCap
END IF
IF (PlantSizesOkayToFinalize) &
CALL ReportSizingOutput('ChillerHeater:Absorption:DoubleEffect', ExhaustAbsorber(ChillNum)%Name, &
'Nominal Cooling Capacity [W]', ExhaustAbsorber(ChillNum)%NomCoolingCap)
ELSE
CALL ShowSevereError('SizeExhaustAbsorber: ChillerHeater:Absorption:DoubleEffect="'//trim(ExhaustAbsorber(ChillNum)%Name)// &
'", autosize error.')
CALL ShowContinueError('Autosizing of Exhaust Fired Absorption Chiller nominal cooling capacity requires')
CALL ShowContinueError('a cooling loop Sizing:Plant object.')
ErrorsFound = .TRUE.
END IF
END IF
IF (ExhaustAbsorber(ChillNum)%EvapVolFlowRate == AutoSize) THEN
IF (PltSizCoolNum > 0) THEN
IF (PlantSizData(PltSizCoolNum)%DesVolFlowRate >= SmallWaterVolFlow) THEN
tmpEvapVolFlowRate = PlantSizData(PltSizCoolNum)%DesVolFlowRate * ExhaustAbsorber(ChillNum)%SizFac
IF (PlantSizesOkayToFinalize) ExhaustAbsorber(ChillNum)%EvapVolFlowRate = tmpEvapVolFlowRate
ELSE
tmpEvapVolFlowRate = 0.d0
IF (PlantSizesOkayToFinalize) ExhaustAbsorber(ChillNum)%EvapVolFlowRate = tmpEvapVolFlowRate
END IF
IF (PlantSizesOkayToFinalize) &
CALL ReportSizingOutput('ChillerHeater:Absorption:DoubleEffect', ExhaustAbsorber(ChillNum)%Name, &
'Design Chilled Water Flow Rate [m3/s]', &
ExhaustAbsorber(ChillNum)%EvapVolFlowRate)
ELSE
CALL ShowSevereError('SizeExhaustAbsorber: ChillerHeater:Absorption:DoubleEffect="'//trim(ExhaustAbsorber(ChillNum)%Name)// &
'", autosize error.')
CALL ShowContinueError('Autosizing of Exhaust Fired Absorption Chiller evap flow rate requires')
CALL ShowContinueError('a cooling loop Sizing:Plant object.')
ErrorsFound = .TRUE.
END IF
END IF
CALL RegisterPlantCompDesignFlow(ExhaustAbsorber(ChillNum)%ChillReturnNodeNum,tmpEvapVolFlowRate)
IF (ExhaustAbsorber(ChillNum)%HeatVolFlowRate == AutoSize) THEN
IF (PltSizHeatNum > 0) THEN
IF (PlantSizData(PltSizHeatNum)%DesVolFlowRate >= SmallWaterVolFlow) THEN
tmpHeatRecVolFlowRate = PlantSizData(PltSizHeatNum)%DesVolFlowRate * ExhaustAbsorber(ChillNum)%SizFac
IF (PlantSizesOkayToFinalize) ExhaustAbsorber(ChillNum)%HeatVolFlowRate = tmpHeatRecVolFlowRate
ELSE
tmpHeatRecVolFlowRate = 0.d0
IF (PlantSizesOkayToFinalize) ExhaustAbsorber(ChillNum)%HeatVolFlowRate = tmpHeatRecVolFlowRate
END IF
IF (PlantSizesOkayToFinalize) &
CALL ReportSizingOutput('ChillerHeater:Absorption:DoubleEffect', ExhaustAbsorber(ChillNum)%Name, &
'Design Hot Water Flow Rate [m3/s]', &
ExhaustAbsorber(ChillNum)%HeatVolFlowRate)
ELSE
CALL ShowSevereError('SizeExhaustAbsorber: ChillerHeater:Absorption:DoubleEffect="'//trim(ExhaustAbsorber(ChillNum)%Name)// &
'", autosize error.')
CALL ShowContinueError('Autosizing of Exhaust Fired Absorption Chiller hot water flow rate requires')
CALL ShowContinueError('a heating loop Sizing:Plant object.')
ErrorsFound = .TRUE.
END IF
END IF
CALL RegisterPlantCompDesignFlow(ExhaustAbsorber(ChillNum)%HeatReturnNodeNum,tmpHeatRecVolFlowRate)
IF ((ExhaustAbsorber(ChillNum)%CondVolFlowRate == AutoSize) .AND. (ExhaustAbsorber(ChillNum)%isWaterCooled)) THEN
IF (PltSizCondNum > 0) THEN
IF (PlantSizData(PltSizCoolNum)%DesVolFlowRate >= SmallWaterVolFlow) THEN
Cp = GetSpecificHeatGlycol(PlantLoop(ExhaustAbsorber(ChillNum)%CDLoopNum)%FluidName, &
ExhaustAbsorber(ChillNum)%TempDesCondReturn, &
PlantLoop(ExhaustAbsorber(ChillNum)%CDLoopNum)%FluidIndex, &
'SizeExhaustAbsorber')
rho = GetDensityGlycol(PlantLoop(ExhaustAbsorber(ChillNum)%CDLoopNum)%FluidName, &
ExhaustAbsorber(ChillNum)%TempDesCondReturn, &
PlantLoop(ExhaustAbsorber(ChillNum)%CDLoopNum)%FluidIndex, &
'SizeExhaustAbsorber')
tmpCondVolFlowRate = tmpNomCap * &
(1.0d0 + ExhaustAbsorber(ChillNum)%ThermalEnergyCoolRatio) / &
( PlantSizData(PltSizCondNum)%DeltaT * Cp * rho )
IF (PlantSizesOkayToFinalize) ExhaustAbsorber(ChillNum)%CondVolFlowRate = tmpCondVolFlowRate
ELSE
tmpCondVolFlowRate = 0.d0
IF (PlantSizesOkayToFinalize) ExhaustAbsorber(ChillNum)%CondVolFlowRate = tmpCondVolFlowRate
END IF
IF (PlantSizesOkayToFinalize) &
CALL ReportSizingOutput('ChillerHeater:Absorption:DoubleEffect', ExhaustAbsorber(ChillNum)%Name, &
'Design Condenser Water Flow Rate [m3/s]', &
ExhaustAbsorber(ChillNum)%CondVolFlowRate)
ELSE
CALL ShowSevereError('SizeExhaustAbsorber: ChillerHeater:Absorption:DoubleEffect="'//trim(ExhaustAbsorber(ChillNum)%Name)// &
'", autosize error.')
CALL ShowSevereError('Autosizing of Exhaust 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 (ExhaustAbsorber(ChillNum)%isWaterCooled) &
CALL RegisterPlantCompDesignFlow(ExhaustAbsorber(ChillNum)%CondReturnNodeNum,tmpCondVolFlowRate)
IF (ErrorsFound) THEN
CALL ShowFatalError('Preceding sizing errors cause program termination')
END IF
IF (PlantSizesOkayToFinalize) THEN
!create predefined report
equipName = ExhaustAbsorber(ChillNum)%Name
CALL PreDefTableEntry(pdchMechType,equipName,'ChillerHeater:Absorption:DoubleEffect')
CALL PreDefTableEntry(pdchMechNomEff,equipName,ExhaustAbsorber(ChillNum)%ThermalEnergyCoolRatio)
CALL PreDefTableEntry(pdchMechNomCap,equipName,ExhaustAbsorber(ChillNum)%NomCoolingCap)
ENDIF
RETURN
END SUBROUTINE SizeExhaustAbsorber