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) | :: | UnitHeatNum | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
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 CalcUnitHeaterComponents(UnitHeatNum,FirstHVACIteration,LoadMet)
! SUBROUTINE INFORMATION:
! AUTHOR Rick Strand
! DATE WRITTEN May 2000
! MODIFIED July 2012, Chandan Sharma - FSEC: Added zone sys avail managers
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine launches the individual component simulations.
! This is called either when the unit is off to carry null conditions
! through the unit or during control iterations to continue updating
! what is going on within the unit.
! METHODOLOGY EMPLOYED:
! Simply calls the different components in order.
! REFERENCES:
! na
! USE STATEMENTS:
USE Fans, ONLY : SimulateFanComponents
USE HeatingCoils, ONLY : SimulateHeatingCoilComponents
USE WaterCoils, ONLY : SimulateWaterCoilComponents
USE SteamCoils, ONLY : SimulateSteamCoilComponents
USE DataZoneEquipment, ONLY: UnitHeater_Num
USE DataHVACGlobals, ONLY: ZoneCompTurnFansOn, ZoneCompTurnFansOff
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: UnitHeatNum ! Unit index in unit heater array
LOGICAL, INTENT(IN) :: FirstHVACIteration ! flag for 1st HVAV iteration in the time step
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:
REAL(r64) :: AirMassFlow ! total mass flow through the unit
REAL(r64) :: CpAirZn ! specific heat of dry air at zone conditions (zone conditions same as unit inlet)
INTEGER :: HCoilInAirNode ! inlet node number for fan exit/coil inlet
INTEGER :: InletNode ! unit air inlet node
INTEGER :: OutletNode ! unit air outlet node
REAL(r64) :: QCoilReq ! Heat addition required from an electric/gas heating coil
! FLOW:
CALL SimulateFanComponents(UnitHeat(UnitHeatNum)%FanName,FirstHVACIteration,UnitHeat(UnitHeatNum)%Fan_Index, &
ZoneCompTurnFansOn = ZoneCompTurnFansOn,ZoneCompTurnFansOff = ZoneCompTurnFansOff)
SELECT CASE (UnitHeat(UnitHeatNum)%HCoilType)
CASE (WaterCoil)
CALL SimulateWaterCoilComponents(UnitHeat(UnitHeatNum)%HCoilName,FirstHVACIteration, &
UnitHeat(UnitHeatNum)%HCoil_Index)
CASE (SteamCoil)
IF (.NOT.HCoilOn) THEN
QCoilReq = 0.0d0
ELSE
HCoilInAirNode = UnitHeat(UnitHeatNum)%FanOutletNode
CpAirZn = PsyCpAirFnWTdb(Node(UnitHeat(UnitHeatNum)%AirInNode)%HumRat,Node(UnitHeat(UnitHeatNum)%AirInNode)%Temp)
QCoilReq = QZnReq - Node(HCoilInAirNode)%MassFlowRate * CpAirZn &
*(Node(HCoilInAirNode)%Temp-Node(UnitHeat(UnitHeatNum)%AirInNode)%Temp)
END IF
IF (QCoilReq < 0.0d0) QCoilReq = 0.0d0 ! a heating coil can only heat, not cool
CALL SimulateSteamCoilComponents(CompName=UnitHeat(UnitHeatNum)%HCoilName, &
FirstHVACIteration=FirstHVACIteration, &
QCoilReq=QCoilReq, &
CompIndex=UnitHeat(UnitHeatNum)%HCoil_Index)
CASE (ElectricCoil,GasCoil)
IF (.NOT.HCoilOn) THEN
QCoilReq = 0.0d0
ELSE
HCoilInAirNode = UnitHeat(UnitHeatNum)%FanOutletNode
CpAirZn = PsyCpAirFnWTdb(Node(UnitHeat(UnitHeatNum)%AirInNode)%HumRat,Node(UnitHeat(UnitHeatNum)%AirInNode)%Temp)
QCoilReq = QZnReq - Node(HCoilInAirNode)%MassFlowRate * CpAirZn &
*(Node(HCoilInAirNode)%Temp-Node(UnitHeat(UnitHeatNum)%AirInNode)%Temp)
END IF
IF (QCoilReq < 0.0d0) QCoilReq = 0.0d0 ! a heating coil can only heat, not cool
CALL SimulateHeatingCoilComponents(CompName=UnitHeat(UnitHeatNum)%HCoilName, &
FirstHVACIteration=FirstHVACIteration, &
QCoilReq=QCoilReq, &
CompIndex=UnitHeat(UnitHeatNum)%HCoil_Index)
END SELECT
InletNode = UnitHeat(UnitHeatNum)%AirInNode
OutletNode = UnitHeat(UnitHeatNum)%AirOutNode
AirMassFlow = Node(OutletNode)%MassFlowRate
Node(InletNode)%MassFlowRate = Node(OutletNode)%MassFlowRate ! maintain continuity through unit heater
LoadMet = AirMassFlow * (PsyHFnTdbW(Node(OutletNode)%Temp,Node(InletNode)%HumRat) &
- PsyHFnTdbW(Node(InletNode)%Temp,Node(InletNode)%HumRat))
RETURN
END SUBROUTINE CalcUnitHeaterComponents