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 | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | CompName | |||
integer, | intent(in) | :: | CompType_Num | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
integer, | intent(in) | :: | AirLoopNum | |||
integer, | intent(inout) | :: | CompIndex |
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 SimAirLoopComponent(CompName,CompType_Num,FirstHVACIteration,AirLoopNum,CompIndex)
! SUBROUTINE INFORMATION
! AUTHOR: Russ Taylor, Dan Fisher, Fred Buhl
! DATE WRITTEN: Oct 1997
! MODIFIED: Dec 1997 Fred Buhl, Richard Raustad,FSEC Sept 2003
! RE-ENGINEERED: This is new code, not reengineered
! PURPOSE OF THIS SUBROUTINE:
! Calls the individual air loop component simulation routines
! METHODOLOGY EMPLOYED: None
! REFERENCES: None
! USE Statements
USE Fans, ONLY:SimulateFanComponents
USE MixedAir, ONLY:ManageOutsideAirSystem
USE Furnaces, ONLY:SimFurnace
USE HVACDuct, ONLY:SimDuct
USE SteamCoils, ONLY:SimulateSteamCoilComponents
USE WaterCoils, ONLY:SimulateWaterCoilComponents
USE Humidifiers, ONLY:SimHumidifier
USE HeatingCoils, ONLY:SimulateHeatingCoilComponents
USE HeatRecovery, ONLY:SimHeatRecovery
USE HVACDXSystem, ONLY:SimDXCoolingSystem
USE HVACUnitarySystem, ONLY:SimUnitarySystem
USE HVACDXHeatPumpSystem, ONLY:SimDXHeatPumpSystem
USE EvaporativeCoolers, ONLY:SimEvapCooler
USE HVACUnitaryBypassVAV, ONLY:SimUnitaryBypassVAV
USE DesiccantDehumidifiers, ONLY:SimDesiccantDehumidifier
USE HVACHXAssistedCoolingCoil, ONLY:SimHXAssistedCoolingCoil
USE HVACMultiSpeedHeatPump, ONLY:SimMSHeatPump
USE UserDefinedComponents, ONLY:SimCoilUserDefined
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT (IN) :: CompName ! the component Name
INTEGER, INTENT (IN) :: CompType_Num ! numeric equivalent for component type
LOGICAL, INTENT (IN) :: FirstHVACIteration ! TRUE if first full HVAC iteration in an HVAC timestep
INTEGER, INTENT (IN) :: AirLoopNum ! Primary air loop number
INTEGER, INTENT (INOUT) :: CompIndex ! numeric pointer for CompType/CompName -- passed back from other routines
! SUBROUTINE PARAMETER DEFINITIONS: None
! INTERFACE BLOCK DEFINITIONS: None
! DERIVED TYPE DEFINITIONS: None
! SUBROUTINE LOCAL VARIABLE DEFINITIONS:
REAL(r64) :: QActual
LOGICAL :: CoolingActive
LOGICAL :: HeatingActive
! FLOW:
CoolingActive = .FALSE.
HeatingActive = .FALSE.
SELECT CASE(CompType_Num)
CASE(OAMixer_Num) ! 'OUTSIDE AIR SYSTEM'
CALL ManageOutsideAirSystem(CompName,FirstHVACIteration,AirLoopNum,CompIndex)
! Fan Types for the air sys simulation
CASE(Fan_Simple_CV) ! 'Fan:ConstantVolume'
CALL SimulateFanComponents(CompName,FirstHVACIteration,CompIndex)
CASE(Fan_Simple_VAV) ! 'Fan:VariableVolume'
CALL SimulateFanComponents(CompName,FirstHVACIteration,CompIndex)
! cpw22Aug2010 Add Fan:ComponentModel (new)
CASE(Fan_ComponentModel) ! 'Fan:ComponentModel'
CALL SimulateFanComponents(CompName,FirstHVACIteration,CompIndex)
! Coil Types for the air sys simulation
! Currently no control for HX Assisted coils
! CASE(DXCoil_CoolingHXAsst) ! 'CoilSystem:Cooling:DX:HeatExchangerAssisted'
! CALL SimHXAssistedCoolingCoil(CompName,FirstHVACIteration,CoilOn,0.0,CompIndex,ContFanCycCoil)
CASE(WaterCoil_CoolingHXAsst) ! 'CoilSystem:Cooling:Water:HeatExchangerAssisted'
CALL SimHXAssistedCoolingCoil(CompName,FirstHVACIteration,CoilOn,constant_zero,CompIndex,ContFanCycCoil, QTotOut=QActual)
IF(QActual .GT. 0.0D0) CoolingActive = .TRUE. ! determine if coil is ON
CASE(WaterCoil_SimpleHeat) ! 'Coil:Heating:Water'
CALL SimulateWaterCoilComponents(CompName,FirstHVACIteration,CompIndex,QActual=QActual)
IF(QActual .GT. 0.0D0) HeatingActive = .TRUE. ! determine if coil is ON
CASE(SteamCoil_AirHeat) ! 'Coil:Heating:Steam'
CALL SimulateSteamCoilComponents(CompName=CompName, &
FirstHVACIteration=FirstHVACIteration, &
QCoilReq=constant_zero,CompIndex=CompIndex,QCoilActual=QActual)
IF(QActual .GT. 0.0D0) HeatingActive = .TRUE. ! determine if coil is ON
CASE(WaterCoil_DetailedCool) ! 'Coil:Cooling:Water:DetailedGeometry'
CALL SimulateWaterCoilComponents(CompName,FirstHVACIteration,CompIndex,QActual=QActual)
IF(QActual .GT. 0.0D0) CoolingActive = .TRUE. ! determine if coil is ON
CASE(WaterCoil_Cooling) ! 'Coil:Cooling:Water'
CALL SimulateWaterCoilComponents(CompName,FirstHVACIteration,CompIndex,QActual=QActual)
IF(QActual .GT. 0.0D0) CoolingActive = .TRUE. ! determine if coil is ON
! stand-alone coils are temperature controlled (do not pass QCoilReq in argument list, QCoilReq overrides temp SP)
CASE(Coil_ElectricHeat) ! 'Coil:Heating:Electric'
CALL SimulateHeatingCoilComponents(CompName=CompName, &
FirstHVACIteration=FirstHVACIteration, &
CompIndex=CompIndex,QCoilActual=QActual)
IF(QActual .GT. 0.0D0) HeatingActive = .TRUE. ! determine if coil is ON
! stand-alone coils are temperature controlled (do not pass QCoilReq in argument list, QCoilReq overrides temp SP)
CASE(Coil_GasHeat) ! 'Coil:Heating:Gas'
CALL SimulateHeatingCoilComponents(CompName=CompName, &
FirstHVACIteration=FirstHVACIteration, &
CompIndex=CompIndex,QCoilActual=QActual)
IF(QActual .GT. 0.0D0) HeatingActive = .TRUE. ! determine if coil is ON
! stand-alone coils are temperature controlled (do not pass QCoilReq in argument list, QCoilReq overrides temp SP)
CASE(Coil_DeSuperHeat) ! 'Coil:Heating:Desuperheater' - heat reclaim
CALL SimulateHeatingCoilComponents(CompName=CompName, &
FirstHVACIteration=FirstHVACIteration, &
CompIndex=CompIndex,QCoilActual=QActual)
IF(QActual .GT. 0.0D0) HeatingActive = .TRUE. ! determine if coil is ON
CASE(DXSystem) ! CoilSystem:Cooling:DX old 'AirLoopHVAC:UnitaryCoolOnly'
CALL SimDXCoolingSystem(CompName, FirstHVACIteration, AirLoopNum, CompIndex, QTotOut=QActual)
IF(QActual .GT. 0.0D0) CoolingActive = .TRUE. ! determine if coil is ON
CASE(DXHeatPumpSystem) ! 'CoilSystem:Heating:DX'
CALL SimDXHeatPumpSystem(CompName, FirstHVACIteration, AirLoopNum, CompIndex, QTotOut=QActual)
IF(QActual .GT. 0.0D0) HeatingActive = .TRUE. ! determine if coil is ON
CASE(CoilUserDefined) ! Coil:UserDefined
CALL SimCoilUserDefined(CompName, CompIndex, AirLoopNum, HeatingActive, CoolingActive )
CASE(UnitarySystem) ! 'AirLoopHVAC:UnitarySystem'
CALL SimUnitarySystem(CompName, FirstHVACIteration, AirLoopNum, CompIndex, &
HeatActive=HeatingActive, CoolActive=CoolingActive)
CASE(Furnace_UnitarySys) ! 'AirLoopHVAC:Unitary:Furnace:HeatOnly', 'AirLoopHVAC:Unitary:Furnace:HeatCool',
! 'AirLoopHVAC:UnitaryHeatOnly', 'AirLoopHVAC:UnitaryHeatCool'
! 'AirLoopHVAC:UnitaryHeatPump:AirToAir', 'AirLoopHVAC:UnitaryHeatPump:WaterToAir'
CALL SimFurnace(CompName, FirstHVACIteration, AirLoopNum, CompIndex)
CASE(UnitarySystem_BypassVAVSys) ! 'AirLoopHVAC:UnitaryHeatCool:VAVChangeoverBypass'
CALL SimUnitaryBypassVAV(CompName, FirstHVACIteration, AirLoopNum, CompIndex)
CASE(UnitarySystem_MSHeatPump) ! 'AirLoopHVAC:UnitaryHeatPump:AirToAir:Multispeed'
CALL SimMSHeatPump(CompName, FirstHVACIteration, AirLoopNum, CompIndex)
! Humidifier Types for the air system simulation
CASE(Humidifier) ! 'Humidifier:Steam:Electric'
CALL SimHumidifier(CompName,FirstHVACIteration, CompIndex)
! Evap Cooler Types for the air system simulation
CASE(EvapCooler) ! 'EvaporativeCooler:Direct:CelDekPad', 'EvaporativeCooler:Indirect:CelDekPad'
! 'EvaporativeCooler:Indirect:WetCoil', 'EvaporativeCooler:Indirect:ResearchSpecial'
CALL SimEvapCooler(CompName, CompIndex)
! Desiccant Dehumidifier Types for the air system simulation
CASE(Desiccant) ! 'Dehumidifier:Desiccant:NoFans', 'Dehumidifier:Desiccant:System'
CALL SimDesiccantDehumidifier(CompName,FirstHVACIteration, CompIndex)
! Heat recovery
CASE(HeatXchngr) ! 'HeatExchanger:AirToAir:FlatPlate', 'HeatExchanger:AirToAir:SensibleAndLatent'
! 'HeatExchanger:Desiccant:BalancedFlow'
CALL SimHeatRecovery(CompName, FirstHVACIteration, CompIndex, ContFanCycCoil, &
EconomizerFlag=AirLoopControlInfo(AirLoopNum)%EconoActive, &
HighHumCtrlFlag=AirLoopControlInfo(AirLoopNum)%HighHumCtrlActive)
! Ducts
CASE(Duct) ! 'Duct'
CALL SimDuct(CompName,FirstHVACIteration,CompIndex)
CASE DEFAULT
END SELECT
! Set AirLoopControlInfo flag to identify coil operation for "Air Loop Coils"
! Any coil operation from multiple coils causes flag to be TRUE
! Flag is reset at beginning of each iteration (Subroutine SimHVAC)
AirLoopControlInfo(AirLoopNum)%CoolingActiveFlag = AirLoopControlInfo(AirLoopNum)%CoolingActiveFlag .OR. CoolingActive
AirLoopControlInfo(AirLoopNum)%HeatingActiveFlag = AirLoopControlInfo(AirLoopNum)%HeatingActiveFlag .OR. HeatingActive
RETURN
END SUBROUTINE SimAirLoopComponent