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) | :: | HPNum |
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 UpdateWatertoAirHP(HPNum)
! SUBROUTINE INFORMATION:
! AUTHOR Hui Jin
! DATE WRITTEN Oct 2000
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine updates the Water to Air Heat Pump outlet nodes.
! METHODOLOGY EMPLOYED:
! Data is moved from the HP data structure to the HP outlet nodes.
! REFERENCES:
! USE STATEMENTS:
USE PlantUtilities, ONLY: SafeCopyPlantNode
USE DataHVACGlobals, ONLY: TimeStepSys
USE DataContaminantBalance, ONLY: Contaminant
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER , INTENT(In) :: HPNum
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: AirInletNode
INTEGER :: WaterInletNode
INTEGER :: AirOutletNode
INTEGER :: WaterOutletNode
REAL(r64) :: ReportingConstant
ReportingConstant = TimeStepSys*SecInHour
!WatertoAirHP(HPNum)%Simflag=.FALSE.
IF(.NOT. WatertoAirHP(HPNum)%Simflag)THEN
! Heatpump is off; just pass through conditions
WatertoAirHP(HPNum)%Power=0.0d0
WatertoAirHP(HPNum)%Energy=0.0d0
WatertoAirHP(HPNum)%QLoadTotal=0.0d0
WatertoAirHP(HPNum)%QSensible=0.0d0
WatertoAirHP(HPNum)%QLatent=0.0d0
WatertoAirHP(HPNum)%QSource=0.0d0
! These will be overwritten below based on variables above that are already set to 0.
! WatertoAirHP(HPNum)%EnergyLoadTotal=0.0
! WatertoAirHP(HPNum)%EnergySensible=0.0
! WatertoAirHP(HPNum)%EnergySource=0.0
! WatertoAirHP(HPNum)%EnergyLatent=0.0
WatertoAirHP(HPNum)%RunFrac=0.0d0
WatertoAirHP(HPNum)%PartLoadRatio=0.0d0
WatertoAirHP(HPNum)%OutletAirDBTemp=WatertoAirHP(HPNum)%InletAirDBTemp
WatertoAirHP(HPNum)%OutletAirHumRat=WatertoAirHP(HPNum)%InletAirHumRat
WatertoAirHP(HPNum)%OutletWaterTemp=WatertoAirHP(HPNum)%InletWaterTemp
WatertoAirHP(HPNum)%OutletAirMassFlowRate=WatertoAirHP(HPNum)%InletAirMassFlowRate
WatertoAirHP(HPNum)%OutletWaterMassFlowRate=WatertoAirHP(HPNum)%InletWaterMassFlowRate
WatertoAirHP(HPNum)%OutletAirEnthalpy = WatertoAirHP(HPNum)%InletAirEnthalpy
WatertoAirHP(HPNum)%OutletWaterEnthalpy = WatertoAirHP(HPNum)%InletWaterEnthalpy
END IF
AirInletNode = WatertoAirHP(HPNum)%AirInletNodeNum
WaterInletNode = WatertoAirHP(HPNum)%WaterInletNodeNum
AirOutletNode = WatertoAirHP(HPNum)%AirOutletNodeNum
WaterOutletNode = WatertoAirHP(HPNum)%WaterOutletNodeNum
! Set the outlet air nodes of the WatertoAirHP
Node(AirOutletNode)%MassFlowRate = Node(AirInletNode)%MassFlowRate
Node(AirOutletNode)%Temp = WatertoAirHP(HPNum)%OutletAirDBTemp
Node(AirOutletNode)%HumRat = WatertoAirHP(HPNum)%OutletAirHumRat
Node(AirOutletNode)%Enthalpy = WatertoAirHP(HPNum)%OutletAirEnthalpy
! Set the outlet nodes for properties that just pass through & not used
CALL SafeCopyPlantNode(WaterInletNode, WaterOutletNode)
! Set the outlet water nodes for the heat pump
Node(WaterOutletNode)%Temp = WatertoAirHP(HPNum)%OutletWaterTemp
Node(WaterOutletNode)%Enthalpy = WatertoAirHP(HPNum)%OutletWaterEnthalpy
! Set the outlet nodes for properties that just pass through & not used
Node(AirOutletNode)%Quality = Node(AirInletNode)%Quality
Node(AirOutletNode)%Press = Node(AirInletNode)%Press
Node(AirOutletNode)%MassFlowRateMin = Node(AirInletNode)%MassFlowRateMin
Node(AirOutletNode)%MassFlowRateMax = Node(AirInletNode)%MassFlowRateMax
Node(AirOutletNode)%MassFlowRateMinAvail= Node(AirInletNode)%MassFlowRateMinAvail
Node(AirOutletNode)%MassFlowRateMaxAvail= Node(AirInletNode)%MassFlowRateMaxAvail
! Pass through the load side mass flow rates
WaterToAirHP(HPNum)%InletAirMassFlowRate = Node(AirInletNode)%MassFlowRate
WaterToAirHP(HPNum)%OutletAirMassFlowRate = WaterToAirHP(HPNum)%InletAirMassFlowRate
WatertoAirHP(HPNum)%Energy = WatertoAirHP(HPNum)%Power*ReportingConstant
WatertoAirHP(HPNum)%EnergyLoadTotal = WatertoAirHP(HPNum)%QLoadTotal*ReportingConstant
WatertoAirHP(HPNum)%EnergySensible = WatertoAirHP(HPNum)%QSensible*ReportingConstant
WatertoAirHP(HPNum)%EnergyLatent = WatertoAirHP(HPNum)%QLatent*ReportingConstant
WatertoAirHP(HPNum)%EnergySource = WatertoAirHP(HPNum)%QSource*ReportingConstant
IF (Contaminant%CO2Simulation) Then
Node(AirOutletNode)%CO2 = Node(AirInletNode)%CO2
End If
IF (Contaminant%GenericContamSimulation) Then
Node(AirOutletNode)%GenContam = Node(AirInletNode)%GenContam
End If
RETURN
END SUBROUTINE UpdateWatertoAirHP