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) | :: | UnitarySysNum |
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 UnitarySystemHeatRecovery(UnitarySysNum)
! SUBROUTINE INFORMATION:
! AUTHOR: Chandan Sharma
! DATE WRITTEN: May 2013
! MODIFIED: na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Calculate the heat recovered from UnitarySystem
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE FluidProperties, ONLY: GetSpecificHeatGlycol
USE DataPlant, ONLY: PlantLoop
USE PlantUtilities, ONLY: SafeCopyPlantNode
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT (IN) :: UnitarySysNum ! Number of the current electric UnitarySystem being simulated
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! DERIVMS TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: HeatRecInNode ! Node number of heat recovery water inlet node
INTEGER :: HeatRecOutNode ! Node number of heat recovery water outlet node
REAL(r64) :: QHeatRec ! Total heat recovered [W]
REAL(r64) :: HeatRecInletTemp ! Heat reclaim inlet temp [C]
REAL(r64) :: HeatRecOutletTemp ! Heat reclaim outlet temp [C]
REAL(r64) :: HeatRecMassFlowRate ! Heat reclaim mass flow rate [m3/s]
REAL(r64) :: CpHeatRec ! Heat reclaim water inlet specIFic heat [J/kg-K]
REAL(r64) :: HeatRecInletEnth ! Heat reclaim water inlet enthalpy [J/kg]
REAL(r64) :: ReportingConstant
ReportingConstant = TimeStepSys*SecInHour
! Begin routine
HeatRecInNode = UnitarySystem(UnitarySysNum)%HeatRecoveryInletNodeNum
HeatRecOutNode = UnitarySystem(UnitarySysNum)%HeatRecoveryOutletNodeNum
! Inlet node to the heat recovery heat exchanger
HeatRecInletTemp = Node(HeatRecInNode)%Temp
HeatRecInletEnth = Node(HeatRecInNode)%Enthalpy
! Set heat recovery mass flow rates
HeatRecMassFlowRate = Node(HeatRecInNode)%MassFlowRate
QHeatRec = MSHPWasteHeat
IF (HeatRecMassFlowRate > 0.0d0) THEN
CpHeatRec = GetSpecificHeatGlycol(PlantLoop(UnitarySystem(UnitarySysNum)%HRLoopNum)%FluidName, &
HeatRecInletTemp, &
PlantLoop(UnitarySystem(UnitarySysNum)%HRLoopNum)%FluidIndex, &
'UnitarySystemHeatRecovery')
HeatRecOutletTemp = QHeatRec/(HeatRecMassFlowRate*CpHeatRec) + HeatRecInletTemp
IF (HeatRecOutletTemp .GT. UnitarySystem(UnitarySysNum)%MaxHROutletWaterTemp) &
HeatRecOutletTemp = UnitarySystem(UnitarySysNum)%MaxHROutletWaterTemp
ELSE
HeatRecOutletTemp = HeatRecInletTemp
END IF
CALL SafeCopyPlantNode(HeatRecInNode, HeatRecOutNode)
! changed outputs
Node(HeatRecOutNode)%Temp = HeatRecOutletTemp
UnitarySystem(UnitarySysNum)%HeatRecoveryRate = QHeatRec
UnitarySystem(UnitarySysNum)%HeatRecoveryEnergy = UnitarySystem(UnitarySysNum)%HeatRecoveryRate*ReportingConstant
UnitarySystem(UnitarySysNum)%HeatRecoveryInletTemp = HeatRecInletTemp
UnitarySystem(UnitarySysNum)%HeatRecoveryOutletTemp = HeatRecOutletTemp
UnitarySystem(UnitarySysNum)%HeatRecoveryMassFlowRate = HeatRecMassFlowRate
RETURN
END SUBROUTINE UnitarySystemHeatRecovery