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) | :: | Num | |||
real(kind=r64), | intent(in) | :: | EnergyRecovered | |||
real(kind=r64), | intent(in) | :: | HeatRecMdot | |||
real(kind=r64), | intent(inout) | :: | HRecRatio |
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 CalcICEngineGenHeatRecovery(Num,EnergyRecovered,HeatRecMdot,HRecRatio)
! 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:
USE FluidProperties, ONLY: GetSpecificHeatGlycol
USE DataPlant, ONLY: PlantLoop
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER,INTENT(IN) :: Num ! HR Component number
REAL(r64), INTENT(IN) :: EnergyRecovered ! Amount of heat recovered
REAL(r64),INTENT(IN) :: HeatRecMdot
REAL(r64),INTENT(INOUT) :: HRecRatio ! Max Heat recovery ratio
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: HeatRecInNode
INTEGER :: HeatRecOutNode
REAL(r64) :: MinHeatRecMdot
REAL(r64) :: HeatRecInTemp
REAL(r64) :: HeatRecOutTemp
REAL(r64) :: HeatRecCp
!Load inputs to local structure
HeatRecInNode = ICEngineGenerator(Num)%HeatRecInletNodeNum
HeatRecOutNode = ICEngineGenerator(Num)%HeatRecOutletNodeNum
!Need to set the HeatRecRatio to 1.0 if it is not modified
HRecRatio= 1.0d0
HeatRecInTemp = Node(HeatRecInNode)%Temp
HeatRecCp = GetSpecificHeatGlycol(PlantLoop(ICEngineGenerator(Num)%HRLoopNum)%FluidName, &
HeatRecInTemp, &
PlantLoop(ICEngineGenerator(Num)%HRLoopNum)%FluidIndex, &
'CalcICEngineGeneratorModel')
!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
!Note: check to make sure the Max Temperature was not exceeded
IF(HeatRecOutTemp > ICEngineGenerator(Num)%HeatRecMaxTemp) THEN
IF(ICEngineGenerator(Num)%HeatRecMaxTemp /= HeatRecInTemp)THEN
MinHeatRecMdot = (EnergyRecovered)/(HeatRecCp * (ICEngineGenerator(Num)%HeatRecMaxTemp - HeatRecInTemp))
If(MinHeatRecMdot < 0.0d0) MinHeatRecMdot = 0.0d0
ELSE
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
HRecRatio = HeatRecMdot/MinHeatRecMdot
ELSE
HeatRecOutTemp = HeatRecInTemp
HRecRatio = 0.0d0
END IF
END IF
!Update global variables for reporting later
ICEngineGenerator(Num)%HeatRecInletTemp = HeatRecInTemp
ICEngineGenerator(Num)%HeatRecOutletTemp = HeatRecOutTemp
ICEngineGenerator(Num)%HeatRecMdotActual = HeatRecMdot
END SUBROUTINE CalcICEngineGenHeatRecovery