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 |
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 UpdateMTGeneratorRecords(Num)
! SUBROUTINE INFORMATION:
! AUTHOR R. Raustad/D. Shirey
! DATE WRITTEN Mar 2008
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Reporting and updating nodes if necessary.
! METHODOLOGY EMPLOYED: na
! REFERENCES: na
! USE STATEMENTS:
USE DataHVACGlobals, ONLY: TimeStepSys
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: Num ! Generator number
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: HeatRecInletNode ! Node number for heat recovery (water) inlet node
INTEGER :: HeatRecOutletNode ! Node number for heat recovery (water) outlet node
INTEGER :: ExhaustAirNodeNum ! Node number for exhaust air node
INTEGER :: CombustAirInletNodeNum ! Node number for combustion inlet air node
IF (MTGenerator(Num)%HeatRecActive) THEN
HeatRecInletNode = MTGenerator(Num)%HeatRecInletNodeNum
HeatRecOutletNode = MTGenerator(Num)%HeatRecOutletNodeNum
! Node(HeatRecOutletNode)%MassFlowRate = MTGenerator(Num)%HeatRecMdot
Node(HeatRecOutletNode)%Temp = MTGenerator(Num)%HeatRecOutletTemp
! Node(HeatRecOutletNode)%MassFlowRateMaxAvail = Node(HeatRecInletNode)%MassFlowRateMaxAvail
! Node(HeatRecOutletNode)%MassFlowRateMinAvail = Node(HeatRecInletNode)%MassFlowRateMinAvail
END IF
IF (MTGenerator(Num)%ExhAirCalcsActive) THEN
ExhaustAirNodeNum = MTGenerator(Num)%CombustionAirOutletNodeNum
CombustAirInletNodeNum = MTGenerator(Num)%CombustionAirInletNodeNum
Node(ExhaustAirNodeNum)%MassFlowRate = MTGenerator(Num)%ExhaustAirMassFlowRate
Node(CombustAirInletNodeNum)%MassFlowRate = MTGenerator(Num)%ExhaustAirMassFlowRate
Node(ExhaustAirNodeNum)%Temp = MTGenerator(Num)%ExhaustAirTemperature
Node(ExhaustAirNodeNum)%HumRat = MTGenerator(Num)%ExhaustAirHumRat
Node(ExhaustAirNodeNum)%MassFlowRateMaxAvail = Node(CombustAirInletNodeNum)%MassFlowRateMaxAvail
Node(ExhaustAirNodeNum)%MassFlowRateMinAvail = Node(CombustAirInletNodeNum)%MassFlowRateMinAvail
! also update the report variables
MTGeneratorReport(Num)%ExhAirMassFlowRate = MTGenerator(Num)%ExhaustAirMassFlowRate
MTGeneratorReport(Num)%ExhAirTemperature = MTGenerator(Num)%ExhaustAirTemperature
! for exhaust only report
END IF
MTGeneratorReport(Num)%PowerGen = MTGenerator(Num)%ElecPowerGenerated
MTGeneratorReport(Num)%EnergyGen = MTGenerator(Num)%ElecPowerGenerated*TimeStepSys*SecInHour
MTGeneratorReport(Num)%QHeatRecovered = MTGenerator(Num)%QHeatRecovered
MTGeneratorReport(Num)%ExhaustEnergyRec = MTGenerator(Num)%QHeatRecovered*TimeStepSys*SecInHour
MTGeneratorReport(Num)%FuelEnergyUseRateHHV = MTGenerator(Num)%FuelEnergyUseRateHHV
MTGeneratorReport(Num)%FuelEnergyHHV = MTGenerator(Num)%FuelEnergyUseRateHHV*TimeStepSys*SecInHour
MTGeneratorReport(Num)%FuelMdot = MTGenerator(Num)%FuelMdot
IF (MTGenerator(Num)%FuelEnergyUseRateLHV .GT. 0.0d0) THEN
MTGeneratorReport(Num)%ElectricEfficiencyLHV = MTGenerator(Num)%ElecPowerGenerated / MTGenerator(Num)%FuelEnergyUseRateLHV
MTGeneratorReport(Num)%ThermalEfficiencyLHV = MTGenerator(Num)%QHeatRecovered / MTGenerator(Num)%FuelEnergyUseRateLHV
ELSE
MTGeneratorReport(Num)%ElectricEfficiencyLHV = 0.0d0
MTGeneratorReport(Num)%ThermalEfficiencyLHV = 0.0d0
END IF
MTGeneratorReport(Num)%HeatRecInletTemp = MTGenerator(Num)%HeatRecInletTemp
MTGeneratorReport(Num)%HeatRecOutletTemp = MTGenerator(Num)%HeatRecOutletTemp
MTGeneratorReport(Num)%HeatRecMdot = MTGenerator(Num)%HeatRecMdot
MTGeneratorReport(Num)%AncillaryPowerRate = MTGenerator(Num)%AncillaryPowerRate
MTGeneratorReport(Num)%AncillaryEnergy = MTGenerator(Num)%AncillaryPowerRate*TimeStepSys*SecInHour
MTGeneratorReport(Num)%StandbyPowerRate = MTGenerator(Num)%StandbyPowerRate
MTGeneratorReport(Num)%StandbyEnergy = MTGenerator(Num)%StandbyPowerRate*TimeStepSys*SecInHour
RETURN
END SUBROUTINE UpdateMTGeneratorRecords