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) | :: | IUNum | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
integer, | intent(in) | :: | ZoneNode | |||
real(kind=r64), | intent(in) | :: | HWFlow | |||
real(kind=r64), | intent(in) | :: | CWFlow | |||
real(kind=r64), | intent(out) | :: | LoadMet |
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 CalcFourPipeIndUnit(IUNum,FirstHVACIteration,ZoneNode,HWFlow,CWFlow,LoadMet)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN June 2004
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Simulate the components making up the 4 pipe induction unit.
! METHODOLOGY EMPLOYED:
! Simulates the unit components sequentially in the air flow direction.
! REFERENCES:
! na
! USE STATEMENTS:
USE MixerComponent, ONLY: SimAirMixer
USE HeatingCoils, ONLY: SimulateHeatingCoilComponents
USE WaterCoils, ONLY: SimulateWaterCoilComponents
USE PlantUtilities, ONLY: SetComponentFlowRate
USE DataPlant, ONLY: PlantLoop
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT (IN) :: IUNum ! Unit index
LOGICAL, INTENT (IN) :: FirstHVACIteration ! flag for 1st HVAV iteration in the time step
INTEGER, INTENT (IN) :: ZoneNode ! zone node number
REAL(r64), INTENT (IN) :: HWFlow ! hot water flow (kg/s)
REAL(r64), INTENT (IN) :: CWFlow ! cold water flow (kg/s)
REAL(r64), INTENT (OUT) :: LoadMet ! load met by unit (watts)
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: OutletNode ! unit air outlet node
INTEGER :: PriNode ! unit primary air inlet node
INTEGER :: HotControlNode ! the hot water inlet node
INTEGER :: ColdControlNode ! the cold water inlet node
REAL(r64) :: PriAirMassFlow ! primary air mass flow rate [kg/s]
REAL(r64) :: SecAirMassFlow ! secondary air mass flow rate [kg/s]
REAL(r64) :: TotAirMassFlow ! total air mass flow rate [kg/s]
REAL(r64) :: InducRat ! induction ratio
REAL(r64) :: CpAirZn ! zone air specific heat [J/kg-C]
REAL(r64) :: mdotHW ! local temporary hot water flow rate [kg/s]
REAL(r64) :: mdotCW ! local temporary cold water flow rate [kg/s]
INTEGER :: HWOutletNode
INTEGER :: CWOutletNode
! FLOW
PriNode = IndUnit(IUNum)%PriAirInNode
OutletNode = IndUnit(IUNum)%OutAirNode
PriAirMassFlow = Node(PriNode)%MassFlowRateMaxAvail
InducRat = IndUnit(IUNum)%InducRatio
CpAirZn = PsyCpAirFnWTdb(Node(ZoneNode)%HumRat,Node(ZoneNode)%Temp)
SecAirMassFlow = InducRat*PriAirMassFlow
TotAirMassFlow = PriAirMassFlow + SecAirMassFlow
HotControlNode = IndUnit(IUNum)%HWControlNode
HWOutletNode = PlantLoop(IndUnit(IUNum)%HWLoopNum)%LoopSide(IndUnit(IUNum)%HWLoopSide) &
%Branch(IndUnit(IUNum)%HWBranchNum)%Comp(IndUnit(IUNum)%HWCompNum)%NodeNumOut
ColdControlNode = IndUnit(IUNum)%CWControlNode
CWOutletNode = PlantLoop(IndUnit(IUNum)%CWLoopNum)%LoopSide(IndUnit(IUNum)%CWLoopSide) &
%Branch(IndUnit(IUNum)%CWBranchNum)%Comp(IndUnit(IUNum)%CWCompNum)%NodeNumOut
mdotHW = HWFlow
Call SetComponentFlowRate( mdotHW, &
HotControlNode, &
HWOutletNode, &
IndUnit(IUNum)%HWLoopNum, &
IndUnit(IUNum)%HWLoopSide, &
IndUnit(IUNum)%HWBranchNum, &
IndUnit(IUNum)%HWCompNum)
! Node(HotControlNode)%MassFlowRate = HWFlow
mdotCW = CWFlow
CALL SetComponentFlowRate( mdotCW, &
ColdControlNode, &
CWOutletNode, &
IndUnit(IUNum)%CWLoopNum, &
IndUnit(IUNum)%CWLoopSide, &
IndUnit(IUNum)%CWBranchNum, &
IndUnit(IUNum)%CWCompNum)
! Node(ColdControlNode)%MassFlowRate = CWFlow
CALL SimulateWaterCoilComponents(IndUNit(IUNum)%HCoil,FirstHVACIteration,IndUNit(IUNum)%HCoil_Num)
CALL SimulateWaterCoilComponents(IndUnit(IUNum)%CCoil,FirstHVACIteration,IndUNit(IUNum)%CCoil_Num)
CALL SimAirMixer(IndUnit(IUNum)%MixerName,IndUnit(IUNum)%Mixer_Num)
LoadMet = TotAirMassFlow*CpAirZn*(Node(OutletNode)%Temp-Node(ZoneNode)%Temp)
RETURN
END SUBROUTINE CalcFourPipeIndUnit