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) | :: | Item | |||
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 CalcVentilatedSlabComps(Item,FirstHVACIteration,LoadMet)
! SUBROUTINE INFORMATION:
! AUTHOR Young Tae Chae, Rick Strand
! DATE WRITTEN June 2008
! 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 system is off to carry null conditions
! through the system 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 ventilatd slab system 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 DataHVACGlobals, ONLY : ZoneCompTurnFansOn, ZoneCompTurnFansOff
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: Item ! system index in ventilated slab array
LOGICAL, INTENT(IN) :: FirstHVACIteration ! flag for 1st HVAV iteration in the time step
REAL(r64), INTENT(OUT) :: LoadMet ! load met by the system (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 system
REAL(r64) :: CpAirZn ! specific heat of dry air at zone conditions (zone conditions same as system inlet)
INTEGER :: HCoilInAirNode ! inlet node number for fan exit/coil inlet
INTEGER :: InletNode ! system air inlet node
INTEGER :: OutletNode ! system air outlet node
!unused0309 INTEGER :: HCoilOutAirNode
REAL(r64) :: QCoilReq ! Heat addition required from an electric/gas heating coil
REAL(r64) :: HCoilOutAirTemp
REAL(r64) :: HCoilInAirTemp
!unused1208 REAL(r64) :: RadInTemp ! Set temperature for "Slab In Node"
! FLOW:
CALL SimVentSlabOAMixer(Item)
CALL SimulateFanComponents(VentSlab(Item)%FanName,FirstHVACIteration,VentSlab(Item)%Fan_Index, &
ZoneCompTurnFansOn = ZoneCompTurnFansOn,ZoneCompTurnFansOff = ZoneCompTurnFansOff)
IF ((VentSlab(Item)%CCoilPresent) .AND. (VentSlab(Item)%CCoilSchedValue >= 0.0d0)) THEN
IF(VentSlab(Item)%CCoilType == Cooling_CoilHXAssisted) THEN
CALL SimHXAssistedCoolingCoil(VentSlab(Item)%CCoilName,FirstHVACIteration,On,0.0d0,VentSlab(Item)%CCoil_Index,ContFanCycCoil)
ELSE
CALL SimulateWaterCoilComponents(VentSlab(Item)%CCoilName,FirstHVACIteration, &
VentSlab(Item)%CCoil_Index)
END IF
END IF
IF ((VentSlab(Item)%HCoilPresent).AND. (VentSlab(Item)%HCoilSchedValue >= 0.0d0)) THEN
SELECT CASE (VentSlab(Item)%HCoilType)
CASE (Heating_WaterCoilType)
CALL SimulateWaterCoilComponents(VentSlab(Item)%HCoilName,FirstHVACIteration, &
VentSlab(Item)%HCoil_Index)
CASE (Heating_SteamCoilType)
IF (.NOT.HCoilOn) THEN
QCoilReq = 0.0d0
ELSE
HCoilInAirNode = VentSlab(Item)%FanOutletNode
CpAirZn = PsyCpAirFnWTdb(Node(HCoilInAirNode)%HumRat,Node(HCoilInAirNode)%Temp)
QCoilReq = Node(HCoilInAirNode)%MassFlowRate * CpAirZn &
*(Node(VentSlab(Item)%RadInNode)%Temp)-(Node(HCoilInAirNode)%Temp)
END IF
IF (QCoilReq < 0.0d0) QCoilReq = 0.0d0 ! a heating coil can only heat, not cool
CALL SimulateSteamCoilComponents(CompName=VentSlab(Item)%HCoilName, &
FirstHVACIteration=FirstHVACIteration, &
QCoilReq=QCoilReq, &
CompIndex=VentSlab(Item)%HCoil_Index)
CASE (Heating_ElectricCoilType,Heating_GasCoilType)
IF (.NOT.HCoilOn) THEN
QCoilReq = 0.0d0
ELSE
HCoilInAirTemp = Node(VentSlab(Item)%FanOutletNode)%Temp
HCoilOutAirTemp = Node(VentSlab(Item)%RadInNode)%Temp
CpAirZn = PsyCpAirFnWTdb(Node(VentSlab(Item)%RadInNode)%HumRat,Node(VentSlab(Item)%RadInNode)%Temp)
QCoilReq = Node(VentSlab(Item)%FanOutletNode)%MassFlowRate * CpAirZn &
*(HCoilOutAirTemp-HCoilInAirTemp)
END IF
IF (QCoilReq < 0.0d0) QCoilReq = 0.0d0 ! a heating coil can only heat, not cool
CALL SimulateHeatingCoilComponents(CompName=VentSlab(Item)%HCoilName, &
FirstHVACIteration=FirstHVACIteration, &
QCoilReq=QCoilReq, &
CompIndex=VentSlab(Item)%HCoil_Index)
END SELECT
END IF
InletNode = VentSlab(Item)%FanOutletNode
OutletNode = VentSlab(Item)%RadInNode
AirMassFlow = Node(OutletNode)%MassFlowRate
LoadMet = AirMassFlow * (PsyHFnTdbW(Node(OutletNode)%Temp,Node(InletNode)%HumRat) &
- PsyHFnTdbW(Node(InletNode)%Temp,Node(InletNode)%HumRat))
RETURN
END SUBROUTINE CalcVentilatedSlabComps