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) | :: | MSHeatPumpNum | 
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 MSHPHeatRecovery(MSHeatPumpNum)
            ! SUBROUTINE INFORMATION:
            !       AUTHOR:          Lixing Gu
            !       DATE WRITTEN:    June 2007
            !       MODIFIED:        na
            !       RE-ENGINEERED    Revised to calculate MSHP heat recovery rate based on EIR Chiller heat recovery subroutine
            ! PURPOSE OF THIS SUBROUTINE:
            !  Calculate the heat recovered from MSHP
            ! METHODOLOGY EMPLOYED:
            !  na
            ! REFERENCES:
            !  na
            ! USE STATEMENTS:
  USE DataHVACGlobals,     ONLY: MSHPWasteHeat
  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)     :: MSHeatPumpNum ! Number of the current electric MSHP 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]
  ! Begin routine
  HeatRecInNode  = MSHeatPump(MSHeatPumpNum)%HeatRecInletNodeNum
  HeatRecOutNode = MSHeatPump(MSHeatPumpNum)%HeatRecOutletNodeNum
   ! 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(MSHeatPump(MSHeatPumpNum)%HRLoopNum)%FluidName, &
                                      HeatRecInletTemp, &
                                      PlantLoop(MSHeatPump(MSHeatPumpNum)%HRLoopNum)%FluidIndex, &
                                      'MSHPHeatRecovery')
    HeatRecOutletTemp = QHeatRec/(HeatRecMassFlowRate*CpHeatRec) + HeatRecInletTemp
    IF (HeatRecOutletTemp .GT. MSHeatPump(MSHeatPumpNum)%MaxHeatRecOutletTemp) &
        HeatRecOutletTemp = MSHeatPump(MSHeatPumpNum)%MaxHeatRecOutletTemp
  ELSE
    HeatRecOutletTemp = HeatRecInletTemp
  END IF
  CALL SafeCopyPlantNode(HeatRecInNode, HeatRecOutNode)
  ! changed outputs
  Node(HeatRecOutNode)%Temp         = HeatRecOutletTemp
  MSHeatPump(MSHeatPumpNum)%HeatRecoveryRate = QHeatRec
  MSHeatPump(MSHeatPumpNum)%HeatRecoveryInletTemp  = HeatRecInletTemp
  MSHeatPump(MSHeatPumpNum)%HeatRecoveryOutletTemp = HeatRecOutletTemp
  MSHeatPump(MSHeatPumpNum)%HeatRecoveryMassFlowRate = HeatRecMassFlowRate
  RETURN
END SUBROUTINE MSHPHeatRecovery