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) | :: | UnitVentNum | |||
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 CalcUnitVentilatorComponents(UnitVentNum,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. Only slight wrinkles
! here are that the unit ventilator has it's own outside air mixed and
! that a cooling coil must be present in order to call a cooling coil
! simulation. Other than that, the subroutine is very straightforward.
! REFERENCES:
! na
! USE STATEMENTS:
USE Fans, ONLY : SimulateFanComponents
USE HeatingCoils, ONLY : SimulateHeatingCoilComponents
USE WaterCoils, ONLY : SimulateWaterCoilComponents
USE HVACHXAssistedCoolingCoil, ONLY :SimHXAssistedCoolingCoil
Use SteamCoils, ONLY: SimulateSteamCoilComponents
USE DataZoneEquipment, ONLY: UnitVentilator_Num
USE DataHVACGlobals, ONLY: ZoneCompTurnFansOn, ZoneCompTurnFansOff
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: UnitVentNum ! Unit index in unit ventilator 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 SimUnitVentOAMixer(UnitVentNum)
CALL SimulateFanComponents(UnitVent(UnitVentNum)%FanName,FirstHVACIteration,UnitVent(UnitVentNum)%Fan_Index, &
ZoneCompTurnFansOn = ZoneCompTurnFansOn, ZoneCompTurnFansOff = ZoneCompTurnFansOff)
IF (UnitVent(UnitVentNum)%CCoilPresent) THEN
IF(UnitVent(UnitVentNum)%CCoilType == Cooling_CoilHXAssisted) THEN
CALL SimHXAssistedCoolingCoil(UnitVent(UnitVentNum)%CCoilName,FirstHVACIteration,On, &
0.0d0,UnitVent(UnitVentNum)%CCoil_Index,ContFanCycCoil)
ELSE
CALL SimulateWaterCoilComponents(UnitVent(UnitVentNum)%CCoilName,FirstHVACIteration, &
UnitVent(UnitVentNum)%CCoil_Index)
END IF
END IF
IF (UnitVent(UnitVentNum)%HCoilPresent) THEN
SELECT CASE (UnitVent(UnitVentNum)%HCoilType)
CASE (Heating_WaterCoilType)
CALL SimulateWaterCoilComponents(UnitVent(UnitVentNum)%HCoilName,FirstHVACIteration, &
UnitVent(UnitVentNum)%HCoil_Index)
CASE (Heating_SteamCoilType)
IF (.NOT.HCoilOn) THEN
QCoilReq = 0.0d0
ELSE
HCoilInAirNode = UnitVent(UnitVentNum)%FanOutletNode
CpAirZn = PsyCpAirFnWTdb(Node(UnitVent(UnitVentNum)%AirInNode)%HumRat,Node(UnitVent(UnitVentNum)%AirInNode)%Temp)
QCoilReq = QZnReq - Node(HCoilInAirNode)%MassFlowRate * CpAirZn &
*(Node(HCoilInAirNode)%Temp-Node(UnitVent(UnitVentNum)%AirInNode)%Temp)
END IF
IF (QCoilReq < 0.0d0) QCoilReq = 0.0d0 ! a heating coil can only heat, not cool
CALL SimulateSteamCoilComponents(CompName=UnitVent(UnitVentNum)%HCoilName, &
FirstHVACIteration=FirstHVACIteration, &
QCoilReq=QCoilReq, &
CompIndex=UnitVent(UnitVentNum)%HCoil_Index)
CASE (Heating_ElectricCoilType,Heating_GasCoilType)
IF (.NOT.HCoilOn) THEN
QCoilReq = 0.0d0
ELSE
HCoilInAirNode = UnitVent(UnitVentNum)%FanOutletNode
CpAirZn = PsyCpAirFnWTdb(Node(UnitVent(UnitVentNum)%AirInNode)%HumRat,Node(UnitVent(UnitVentNum)%AirInNode)%Temp)
QCoilReq = QZnReq - Node(HCoilInAirNode)%MassFlowRate * CpAirZn &
*(Node(HCoilInAirNode)%Temp-Node(UnitVent(UnitVentNum)%AirInNode)%Temp)
END IF
IF (QCoilReq < 0.0d0) QCoilReq = 0.0d0 ! a heating coil can only heat, not cool
CALL SimulateHeatingCoilComponents(CompName=UnitVent(UnitVentNum)%HCoilName, &
FirstHVACIteration=FirstHVACIteration, &
QCoilReq=QCoilReq, &
CompIndex=UnitVent(UnitVentNum)%HCoil_Index)
END SELECT
END IF ! (UnitVent(UnitVentNum)%HCoilPresent)
InletNode = UnitVent(UnitVentNum)%AirInNode
OutletNode = UnitVent(UnitVentNum)%AirOutNode
AirMassFlow = Node(OutletNode)%MassFlowRate
LoadMet = AirMassFlow * (PsyHFnTdbW(Node(OutletNode)%Temp,Node(InletNode)%HumRat) &
- PsyHFnTdbW(Node(InletNode)%Temp,Node(InletNode)%HumRat))
RETURN
END SUBROUTINE CalcUnitVentilatorComponents