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) | :: | ChillerNum | |||
real(kind=r64), | intent(in) | :: | EnergyRecovered | |||
real(kind=r64), | intent(inout) | :: | HeatRecRatio |
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 CalcEngineChillerHeatRec(ChillerNum, EnergyRecovered, HeatRecRatio)
! SUBROUTINE INFORMATION:
! AUTHOR: Brandon Anderson
! DATE WRITTEN: November 2000
! PURPOSE OF THIS SUBROUTINE:
! To perform heat recovery calculations and node updates
! METHODOLOGY EMPLOYED: This routine is required for the heat recovery loop.
! It works in conjunction with the Heat Recovery Manager, and the PlantWaterHeater.
! The chiller sets the flow on the loop first by the input design flowrate and then
! performs a check to verify that
! REFERENCES: na
! USE STATEMENTS: na
USE Psychrometrics, ONLY: PsyCpAirFnWTdb
USE FluidProperties, ONLY: GetSpecificHeatGlycol
USE DataPlant, ONLY: PlantLoop
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER,INTENT(IN) :: ChillerNum ! Chiller number
REAL(r64), INTENT(IN) :: EnergyRecovered ! Amount of heat recovered
REAL(r64),INTENT(INOUT) :: HeatRecRatio ! Max Heat recovery ratio
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: HeatRecInNode
INTEGER :: HeatRecOutNode
REAL(r64) :: HeatRecMdot
REAL(r64) :: MinHeatRecMdot
REAL(r64) :: HeatRecInTemp
REAL(r64) :: HeatRecOutTemp
REAL(r64) :: HeatRecCp
!Load inputs to local structure
HeatRecInNode = EngineDrivenChiller(ChillerNum)%HeatRecInletNodeNum
HeatRecOutNode = EngineDrivenChiller(ChillerNum)%HeatRecOutletNodeNum
!Need to set the HeatRecRatio to 1.0 if it is not modified
HeatRecRatio= 1.0d0
! !This mdot is input specified mdot "Desired Flowrate", already set in init routine
HeatRecMdot = Node(HeatRecInNode)%MassFlowRate
HeatRecInTemp = Node(HeatRecInNode)%Temp
HeatRecCp = GetSpecificHeatGlycol(PlantLoop(EngineDrivenChiller(ChillerNum)%HRLoopNum)%FluidName, &
HeatRecInletTemp, &
PlantLoop(EngineDrivenChiller(ChillerNum)%HRLoopNum)%FluidIndex, &
'ChillerHeatRecovery')
!Don't divide by zero - Note This also results in no heat recovery when
! design Mdot for Heat Recovery - Specified on Chiller Input - is zero
! In order to see what minimum heat recovery flow rate is for the design temperature
! The design heat recovery flow rate can be set very small, but greater than zero.
IF ((HeatRecMdot .GT. 0) .AND. (HeatRecCp .GT. 0)) THEN
HeatRecOutTemp = (EnergyRecovered)/(HeatRecMdot * HeatRecCp) + HeatRecInTemp
ELSE
HeatRecOutTemp = HeatRecInTemp
END IF
!Now verify that the design flowrate was large enough to prevent phase change
IF(HeatRecOutTemp > EngineDrivenChiller(ChillerNum)%HeatRecMaxTemp) THEN
IF(EngineDrivenChiller(ChillerNum)%HeatRecMaxTemp /= HeatRecInTemp)THEN
MinHeatRecMdot = (EnergyRecovered)/(HeatRecCp * (EngineDrivenChiller(ChillerNum)%HeatRecMaxTemp - HeatRecInTemp))
If(MinHeatRecMdot < 0.0d0) MinHeatRecMdot = 0.0d0
END IF
!Recalculate Outlet Temperature, with adjusted flowrate
IF ((MinHeatRecMdot .GT. 0.0d0) .AND. (HeatRecCp .GT. 0.0d0)) THEN
HeatRecOutTemp = (EnergyRecovered)/(MinHeatRecMdot * HeatRecCp) + HeatRecInTemp
HeatRecRatio = HeatRecMdot/MinHeatRecMdot
ELSE
HeatRecOutTemp = HeatRecInTemp
HeatRecRatio = 0.0d0
END IF
END IF
!Update global variables for reporting later
HeatRecInletTemp = HeatRecInTemp
HeatRecOutletTemp = HeatRecOutTemp
HeatRecMdotActual = HeatRecMdot
END SUBROUTINE CalcEngineChillerHeatRec