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 UpdateEngineDrivenChiller(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: SafeCopyPlantNode
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 :: HeatRecInletNode
INTEGER :: HeatRecOutletNode
REAL(r64) :: ReportingConstant ! Number of seconds per HVAC system time step, to convert from W (J/s) to J
ReportingConstant = TimeStepSys*SecInHour
EvapInletNode = EngineDrivenChiller(Num)%Base%EvapInletNodeNum
EvapOutletNode = EngineDrivenChiller(Num)%Base%EvapOutletNodeNum
CondInletNode = EngineDrivenChiller(Num)%Base%CondInletNodeNum
CondOutletNode = EngineDrivenChiller(Num)%Base%CondOutletNodeNum
HeatRecInletNode = EngineDrivenChiller(Num)%HeatRecInletNodeNum
HeatRecOutletNode = EngineDrivenChiller(Num)%HeatRecOutletNodeNum
IF (MyLoad >=0.d0 .OR. .NOT. RunFlag)THEN !Chiller not running
!set node temperatures
Node(EvapOutletNode)%Temp = Node(EvapInletNode)%Temp
Node(CondOutletNode)%Temp = Node(CondInletNode)%Temp
EngineDrivenChillerReport(Num)%Base%Power = 0.0d0
EngineDrivenChillerReport(Num)%Base%QEvap = 0.0d0
EngineDrivenChillerReport(Num)%Base%QCond = 0.0d0
EngineDrivenChillerReport(Num)%Base%Energy = 0.0d0
EngineDrivenChillerReport(Num)%Base%EvapEnergy = 0.0d0
EngineDrivenChillerReport(Num)%Base%CondEnergy = 0.0d0
EngineDrivenChillerReport(Num)%Base%EvapInletTemp = Node(EvapInletNode)%Temp
EngineDrivenChillerReport(Num)%Base%CondInletTemp = Node(CondInletNode)%Temp
EngineDrivenChillerReport(Num)%Base%CondOutletTemp = Node(CondOutletNode)%Temp
EngineDrivenChillerReport(Num)%Base%EvapOutletTemp = Node(EvapOutletNode)%Temp
EngineDrivenChillerReport(Num)%Base%Evapmdot = EvapMassFlowRate
EngineDrivenChillerReport(Num)%Base%Condmdot = CondMassFlowRate
EngineDrivenChillerReport(Num)%FuelCOP = 0.0d0
IF (EngineDrivenChiller(Num)%Base%CondenserType == EvapCooled) THEN
EngineDrivenChillerReport(Num)%Base%BasinHeaterPower = BasinHeaterPower
EngineDrivenChillerReport(Num)%Base%BasinHeaterConsumption = BasinHeaterPower*ReportingConstant
ENDIF
ELSE !Chiller is running
!set node temperatures
Node(EvapOutletNode)%Temp = EvapOutletTemp
Node(CondOutletNode)%Temp = CondOutletTemp
EngineDrivenChillerReport(Num)%Base%Power = Power
EngineDrivenChillerReport(Num)%Base%QEvap = QEvaporator
EngineDrivenChillerReport(Num)%Base%QCond = QCondenser
EngineDrivenChillerReport(Num)%Base%Energy = Energy
EngineDrivenChillerReport(Num)%Base%EvapEnergy = EvaporatorEnergy
EngineDrivenChillerReport(Num)%Base%CondEnergy = CondenserEnergy
EngineDrivenChillerReport(Num)%Base%EvapInletTemp = Node(EvapInletNode)%Temp
EngineDrivenChillerReport(Num)%Base%CondInletTemp = Node(CondInletNode)%Temp
EngineDrivenChillerReport(Num)%Base%CondOutletTemp = Node(CondOutletNode)%Temp
EngineDrivenChillerReport(Num)%Base%EvapOutletTemp = Node(EvapOutletNode)%Temp
EngineDrivenChillerReport(Num)%Base%Evapmdot = EvapMassFlowRate
EngineDrivenChillerReport(Num)%Base%Condmdot = CondMassFlowRate
IF (FuelEnergyUseRate .NE. 0.0d0) THEN
EngineDrivenChillerReport(Num)%FuelCOP = QEvaporator/FuelEnergyUseRate
ELSE
EngineDrivenChillerReport(Num)%FuelCOP = 0.0d0
END IF
IF (EngineDrivenChiller(Num)%Base%CondenserType == EvapCooled) THEN
EngineDrivenChillerReport(Num)%Base%BasinHeaterPower = BasinHeaterPower
EngineDrivenChillerReport(Num)%Base%BasinHeaterConsumption = BasinHeaterPower*ReportingConstant
ENDIF
END IF
! Update Heat Recovery Stuff whether running or not, variables should be set correctly
EngineDrivenChillerReport(Num)%QJacketRecovered = QJacketRecovered
EngineDrivenChillerReport(Num)%QLubeOilRecovered = QLubeOilRecovered
EngineDrivenChillerReport(Num)%QExhaustRecovered = QExhaustRecovered
EngineDrivenChillerReport(Num)%QTotalHeatRecovered = QTotalHeatRecovered
EngineDrivenChillerReport(Num)%FuelEnergyUseRate = FuelEnergyUseRate
EngineDrivenChillerReport(Num)%JacketEnergyRec = JacketEnergyRec
EngineDrivenChillerReport(Num)%LubeOilEnergyRec = LubeOilEnergyRec
EngineDrivenChillerReport(Num)%ExhaustEnergyRec = ExhaustEnergyRec
EngineDrivenChillerReport(Num)%TotalHeatEnergyRec = TotalHeatEnergyRec
EngineDrivenChillerReport(Num)%FuelEnergy = FuelEnergy
EngineDrivenChillerReport(Num)%FuelMdot = FuelMdot
EngineDrivenChillerReport(Num)%ExhaustStackTemp = ExhaustStackTemp
EngineDrivenChillerReport(Num)%HeatRecInletTemp = HeatRecInletTemp
EngineDrivenChillerReport(Num)%HeatRecOutletTemp = HeatRecOutletTemp
EngineDrivenChillerReport(Num)%HeatRecMdot = HeatRecMdotActual
!Update the Heat Recovery outlet
IF (EngineDrivenChiller(Num)%HeatRecActive) THEN
CALL SafeCopyPlantNode(HeatRecInletNode, HeatRecOutletNode)
Node(HeatRecOutletNode)%Temp = HeatRecOutletTemp
ENDIF
RETURN
END SUBROUTINE UpdateEngineDrivenChiller