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 SizeEngineDrivenChiller(ChillNum)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN June 2002
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for sizing Engine Driven 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:
!unused1208 INTEGER :: PltSizIndex ! Plant Sizing Do loop index
INTEGER :: PltSizNum ! Plant Sizing index corresponding to CurLoopNum
INTEGER :: PltSizCondNum ! Plant Sizing index for condenser loop
LOGICAL :: ErrorsFound ! If errors detected in input
LOGICAL :: LoopErrorsFound
CHARACTER(len=MaxNameLength) :: equipName
REAL(r64) :: rho ! local fluid density
REAL(r64) :: Cp ! local fluid specific heat
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
PltSizNum = 0
PltSizCondNum = 0
ErrorsFound = .FALSE.
tmpNomCap = EngineDrivenChiller(ChillNum)%Base%NomCap
tmpEvapVolFlowRate = EngineDrivenChiller(ChillNum)%Base%EvapVolFlowRate
tmpCondVolFlowRate = EngineDrivenChiller(ChillNum)%Base%CondVolFlowRate
IF (EngineDrivenChiller(ChillNum)%Base%CondenserType == WaterCooled) THEN
IF (EngineDrivenChiller(ChillNum)%Base%CondVolFlowRate == AutoSize) THEN
PltSizCondNum = PlantLoop(EngineDrivenChiller(ChillNum)%Base%CDLoopNum)%PlantSizNum
END IF
END IF
PltSizNum = PlantLoop(EngineDrivenChiller(ChillNum)%Base%CWLoopNum)%PlantSizNum
IF (EngineDrivenChiller(ChillNum)%Base%NomCap == AutoSize) THEN
IF (PltSizNum > 0) THEN
IF (PlantSizData(PltSizNum)%DesVolFlowRate >= SmallWaterVolFlow) THEN
rho = GetDensityGlycol(PlantLoop(EngineDrivenChiller(ChillNum)%Base%CWLoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(EngineDrivenChiller(ChillNum)%Base%CWLoopNum)%FluidIndex,&
'SizeEngineDrivenChiller')
Cp = GetSpecificHeatGlycol(PlantLoop(EngineDrivenChiller(ChillNum)%Base%CWLoopNum)%FluidName, &
InitConvTemp, &
PlantLoop(EngineDrivenChiller(ChillNum)%Base%CWLoopNum)%FluidIndex, &
'SizeEngineDrivenChiller')
tmpNomCap = Cp * rho * PlantSizData(PltSizNum)%DeltaT &
* PlantSizData(PltSizNum)%DesVolFlowRate * EngineDrivenChiller(ChillNum)%Base%SizFac
IF (PlantSizesOkayToFinalize) EngineDrivenChiller(ChillNum)%Base%NomCap = tmpNomCap
ELSE
tmpNomCap = 0.d0
IF (PlantSizesOkayToFinalize) EngineDrivenChiller(ChillNum)%Base%NomCap = tmpNomCap
END IF
IF (PlantSizesOkayToFinalize) CALL ReportSizingOutput('Chiller:EngineDriven', EngineDrivenChiller(ChillNum)%Base%Name, &
'Nominal Capacity [W]', EngineDrivenChiller(ChillNum)%Base%NomCap)
ELSE
CALL ShowSevereError('Autosizing of Engine Driven Chiller nominal capacity requires a loop Sizing:Plant object')
CALL ShowContinueError('Occurs in Engine Driven Chiller object='//TRIM(EngineDrivenChiller(ChillNum)%Base%Name))
ErrorsFound = .TRUE.
END IF
END IF
IF (EngineDrivenChiller(ChillNum)%Base%EvapVolFlowRate == AutoSize) THEN
IF (PltSizNum > 0) THEN
IF (PlantSizData(PltSizNum)%DesVolFlowRate >= SmallWaterVolFlow) THEN
tmpEvapVolFlowRate = PlantSizData(PltSizNum)%DesVolFlowRate * &
EngineDrivenChiller(ChillNum)%Base%SizFac
IF (PlantSizesOkayToFinalize) EngineDrivenChiller(ChillNum)%Base%EvapVolFlowRate = tmpEvapVolFlowRate
ELSE
tmpEvapVolFlowRate = 0.d0
IF (PlantSizesOkayToFinalize) EngineDrivenChiller(ChillNum)%Base%EvapVolFlowRate = tmpEvapVolFlowRate
END IF
IF (PlantSizesOkayToFinalize) CALL ReportSizingOutput('Chiller:EngineDriven', EngineDrivenChiller(ChillNum)%Base%Name, &
'Design Chilled Water Flow Rate [m3/s]', &
EngineDrivenChiller(ChillNum)%Base%EvapVolFlowRate)
ELSE
CALL ShowSevereError('Autosizing of Engine Driven Chiller evap flow rate requires a loop Sizing:Plant object')
CALL ShowContinueError('Occurs in Engine Driven Chiller object='//TRIM(EngineDrivenChiller(ChillNum)%Base%Name))
ErrorsFound = .TRUE.
END IF
END IF
CALL RegisterPlantCompDesignFlow(EngineDrivenChiller(ChillNum)%Base%EvapInletNodeNum,tmpEvapVolFlowRate)
IF (EngineDrivenChiller(ChillNum)%Base%CondVolFlowRate == AutoSize) THEN
IF (PltSizCondNum > 0) THEN
IF (PlantSizData(PltSizNum)%DesVolFlowRate >= SmallWaterVolFlow) THEN
rho = GetDensityGlycol(PlantLoop(EngineDrivenChiller(ChillNum)%Base%CDLoopNum)%FluidName, &
EngineDrivenChiller(ChillNum)%TempDesCondIn, &
PlantLoop(EngineDrivenChiller(ChillNum)%Base%CDLoopNum)%FluidIndex,&
'SizeEngineDrivenChiller')
Cp = GetSpecificHeatGlycol(PlantLoop(EngineDrivenChiller(ChillNum)%Base%CDLoopNum)%FluidName, &
EngineDrivenChiller(ChillNum)%TempDesCondIn, &
PlantLoop(EngineDrivenChiller(ChillNum)%Base%CDLoopNum)%FluidIndex, &
'SizeEngineDrivenChiller')
tmpCondVolFlowRate = tmpNomCap * (1.d0 + 1.d0/EngineDrivenChiller(ChillNum)%Base%COP) / &
( PlantSizData(PltSizCondNum)%DeltaT * Cp * rho )
IF (PlantSizesOkayToFinalize) EngineDrivenChiller(ChillNum)%Base%CondVolFlowRate = tmpCondVolFlowRate
ELSE
tmpCondVolFlowRate = 0.0d0
IF (PlantSizesOkayToFinalize) EngineDrivenChiller(ChillNum)%Base%CondVolFlowRate = tmpCondVolFlowRate
END IF
IF (PlantSizesOkayToFinalize) CALL ReportSizingOutput('Chiller:EngineDriven', EngineDrivenChiller(ChillNum)%Base%Name, &
'Design Condenser Water Flow Rate [m3/s]', &
EngineDrivenChiller(ChillNum)%Base%CondVolFlowRate)
ELSE
CALL ShowSevereError('Autosizing of EngineDriven Chiller condenser flow rate requires a condenser')
CALL ShowContinueError('loop Sizing:Plant object')
CALL ShowContinueError('Occurs in EngineDriven Chiller object='//TRIM(EngineDrivenChiller(ChillNum)%Base%Name))
ErrorsFound = .TRUE.
END IF
END IF
! save the design condenser water volumetric flow rate for use by the condenser water loop sizing algorithms
IF (EngineDrivenChiller(ChillNum)%Base%CondenserType == WaterCooled) THEN
CALL RegisterPlantCompDesignFlow(EngineDrivenChiller(ChillNum)%Base%CondInletNodeNum, tmpCondVolFlowRate)
ENDIF
IF (PlantSizesOkayToFinalize) Then
!create predefined report
equipName = EngineDrivenChiller(ChillNum)%Base%Name
CALL PreDefTableEntry(pdchMechType,equipName,'Chiller:EngineDriven')
CALL PreDefTableEntry(pdchMechNomEff,equipName,EngineDrivenChiller(ChillNum)%Base%COP)
CALL PreDefTableEntry(pdchMechNomCap,equipName,EngineDrivenChiller(ChillNum)%Base%NomCap)
ENDIF
IF (ErrorsFound) THEN
CALL ShowFatalError('Preceding sizing errors cause program termination')
END IF
RETURN
END SUBROUTINE SizeEngineDrivenChiller