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 | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | MyLoad | |||
logical, | intent(in) | :: | RunFlag | |||
integer, | intent(in) | :: | Num |
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 UpdateElectricChillerRecords(MyLoad,RunFlag, Num)
! SUBROUTINE INFORMATION:
! AUTHOR: Dan Fisher / Brandon Anderson
! DATE WRITTEN: September 2000
! PURPOSE OF THIS SUBROUTINE:
! reporting
! METHODOLOGY EMPLOYED: na
! REFERENCES: na
! USE STATEMENTS: na
USE DataGlobals, ONLY : SecInHour
USE DataHVACGlobals, ONLY : TimeStepSys
USE PlantUtilities, ONLY : SetComponentFlowRate, SafeCopyPlantNode
USE Psychrometrics, ONLY : PsyHFnTdbW
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64),INTENT(IN) :: MyLoad ! current load
LOGICAL, INTENT(IN) :: RunFlag ! TRUE if chiller operating
INTEGER, INTENT(IN) :: Num ! chiller number
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: EvapInletNode ! evaporator inlet node number, water side
INTEGER :: EvapOutletNode ! evaporator outlet node number, water side
INTEGER :: CondInletNode ! condenser inlet node number, water side
INTEGER :: CondOutletNode ! condenser outlet node number, water side
INTEGER :: HeatRecInNode
INTEGER :: HeatRecOutNode
REAL(r64) :: ReportingConstant ! Number of seconds per HVAC system time step, to convert from W (J/s) to J
ReportingConstant = TimeStepSys*SecInHour
EvapInletNode = ElectricChiller(Num)%Base%EvapInletNodeNum
EvapOutletNode = ElectricChiller(Num)%Base%EvapOutletNodeNum
CondInletNode = ElectricChiller(Num)%Base%CondInletNodeNum
CondOutletNode = ElectricChiller(Num)%Base%CondOutletNodeNum
HeatRecInNode = ElectricChiller(Num)%HeatRecInletNodeNum
HeatRecOutNode = ElectricChiller(Num)%HeatRecOutletNodeNum
IF (MyLoad >= 0.d0 .OR. .NOT. RunFlag)THEN !Chiller not running so pass inlet states to outlet states
!set node temperatures
Node(EvapOutletNode)%Temp = Node(EvapInletNode)%Temp
Node(CondOutletNode)%Temp = Node(CondInletNode)%Temp
IF(ElectricChiller(Num)%Base%CondenserType /= WaterCooled) THEN
Node(CondOutletNode)%HumRat = Node(CondInletNode)%HumRat
Node(CondOutletNode)%Enthalpy = Node(CondInletNode)%Enthalpy
END IF
ElectricChillerReport(Num)%Base%Power = 0.0d0
ElectricChillerReport(Num)%Base%QEvap = 0.0d0
ElectricChillerReport(Num)%Base%QCond = 0.0d0
ElectricChillerReport(Num)%Base%Energy = 0.0d0
ElectricChillerReport(Num)%Base%EvapEnergy = 0.0d0
ElectricChillerReport(Num)%Base%CondEnergy = 0.0d0
ElectricChillerReport(Num)%Base%EvapInletTemp = Node(EvapInletNode)%Temp
ElectricChillerReport(Num)%Base%CondInletTemp = Node(CondInletNode)%Temp
ElectricChillerReport(Num)%Base%CondOutletTemp = Node(CondOutletNode)%Temp
ElectricChillerReport(Num)%Base%EvapOutletTemp = Node(EvapOutletNode)%Temp
ElectricChillerReport(Num)%Base%Evapmdot = EvapMassFlowRate
ElectricChillerReport(Num)%Base%Condmdot = CondMassFlowRate
ElectricChillerReport(Num)%ActualCOP = 0.0d0
IF (ElectricChiller(Num)%Base%CondenserType == EvapCooled) THEN
ElectricChillerReport(Num)%Base%BasinHeaterPower = BasinHeaterPower
ElectricChillerReport(Num)%Base%BasinHeaterConsumption = BasinHeaterPower*ReportingConstant
ENDIF
If(ElectricChiller(Num)%HeatRecActive) Then
CALL SafeCopyPlantNode( HeatRecInNode, HeatRecOutNode)
ElectricChillerReport(Num)%QHeatRecovery = 0.0d0
ElectricChillerReport(Num)%EnergyHeatRecovery = 0.0d0
ElectricChillerReport(Num)%HeatRecInletTemp = Node(HeatRecInNode)%Temp
ElectricChillerReport(Num)%HeatRecOutletTemp = Node(HeatRecOutNode)%Temp
ElectricChillerReport(Num)%HeatRecMassFlow = Node(HeatRecInNode)%MassFlowRate
ElectricChillerReport(Num)%ChillerCondAvgTemp = AvgCondSinkTemp
End If
ELSE !Chiller is running, so pass calculated values
!set node temperatures
Node(EvapOutletNode)%Temp = EvapOutletTemp
Node(CondOutletNode)%Temp = CondOutletTemp
IF(ElectricChiller(Num)%Base%CondenserType /= WaterCooled) THEN
Node(CondOutletNode)%HumRat = CondOutletHumRat
Node(CondOutletNode)%Enthalpy = PsyHFnTdbW(CondOutletTemp, CondOutletHumRat)
END IF
!set node flow rates; for these load based models
!assume that the sufficient evaporator flow rate available
ElectricChillerReport(Num)%Base%Power = Power
ElectricChillerReport(Num)%Base%QEvap = QEvaporator
ElectricChillerReport(Num)%Base%QCond = QCondenser
ElectricChillerReport(Num)%Base%Energy = Energy
ElectricChillerReport(Num)%Base%EvapEnergy = EvaporatorEnergy
ElectricChillerReport(Num)%Base%CondEnergy = CondenserEnergy
ElectricChillerReport(Num)%Base%EvapInletTemp = Node(EvapInletNode)%Temp
ElectricChillerReport(Num)%Base%CondInletTemp = Node(CondInletNode)%Temp
ElectricChillerReport(Num)%Base%CondOutletTemp = Node(CondOutletNode)%Temp
ElectricChillerReport(Num)%Base%EvapOutletTemp = Node(EvapOutletNode)%Temp
ElectricChillerReport(Num)%Base%Evapmdot = EvapMassFlowRate
ElectricChillerReport(Num)%Base%Condmdot = CondMassFlowRate
IF (ElectricChiller(Num)%Base%CondenserType == EvapCooled) THEN
ElectricChillerReport(Num)%Base%BasinHeaterPower = BasinHeaterPower
ElectricChillerReport(Num)%Base%BasinHeaterConsumption = BasinHeaterPower*ReportingConstant
ENDIF
IF (Power .NE. 0.0d0) THEN
ElectricChillerReport(Num)%ActualCOP = QEvaporator/Power
ELSE
ElectricChillerReport(Num)%ActualCOP = 0.0d0
END IF
If(ElectricChiller(Num)%HeatRecActive) Then
CALL SafeCopyPlantNode( HeatRecInNode, HeatRecOutNode)
ElectricChillerReport(Num)%QHeatRecovery = QHeatRecovered
ElectricChillerReport(Num)%EnergyHeatRecovery = QHeatRecovered*TimeStepSys*SecInHour
Node(HeatRecOutNode)%Temp = HeatRecOutletTemp
ElectricChillerReport(Num)%HeatRecInletTemp = Node(HeatRecInNode)%Temp
ElectricChillerReport(Num)%HeatRecOutletTemp = Node(HeatRecOutNode)%Temp
ElectricChillerReport(Num)%HeatRecMassFlow = Node(HeatRecInNode)%MassFlowRate
ElectricChillerReport(Num)%ChillerCondAvgTemp = AvgCondSinkTemp
End If
END IF
RETURN
END SUBROUTINE UpdateElectricChillerRecords