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) | :: | FurnaceName | |||
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.
SUBROUTINE SimFurnace(FurnaceName,FirstHVACIteration, AirLoopNum, CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Dan Fisher
! DATE WRITTEN Jan 2001
! MODIFIED Richard Liesen, Oct 2001 - Richard Raustad; Bo Shen, March 2012, for VS WSHP
! RE-ENGINEERED Feb 2001
! PURPOSE OF THIS SUBROUTINE:
! This subroutine manages Furnace component simulation.
! METHODOLOGY EMPLOYED:
! CALL the calc routine to determine an operating PLR. Resimulate child components at this PLR.
! A supplemental heater augments the heating capacity for both air-to-air and water-to-air heat pump systems.
! A reheat coil is used for the HeatCool furnace/unitarysystem to offset the sensible cooling when the
! dehumidification control type is COOLREHEAT. Both the supplemental and reheat heating coil load is calculated
! in the Calc routines and returned here through subroutine arguments. The actual simulation of these coils is
! performed here (i.e. the supplemental and reheat coil loads are passed as 0 to CalcFurnaceOutput).
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE HeatingCoils, Only: SimulateHeatingCoilComponents
USE HVACHXAssistedCoolingCoil, ONLY: SimHXAssistedCoolingCoil
USE DataAirLoop, ONLY: AirLoopControlInfo, AirLoopFlow
USE DataZoneEnergyDemands
USE General, ONLY: TrimSigDigits
USE WatertoAirheatPumpSimple, ONLY: SimWatertoAirHPSimple
USE DataHeatBalFanSys, ONLY: TempControlType
!USE WaterCoils, ONLY: SimulateWaterCoilComponents
!USE PlantUtilities, ONLY: SetComponentFlowRate
!USE SteamCoils, ONLY: SimulateSteamCoilComponents
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
LOGICAL, INTENT (IN):: FirstHVACIteration
CHARACTER(len=*), INTENT(IN) :: FurnaceName
INTEGER, INTENT (IN) :: AirLoopNum ! Primary air loop number
INTEGER, INTENT (INOUT) :: CompIndex ! Pointer to which furnace
! SUBROUTINE PARAMETER DEFINITIONS:
INTEGER, PARAMETER :: MaxIter = 25 ! maximum number of iterations for controlling output
INTEGER, PARAMETER :: MaxIterCycl = 100
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: FurnaceNum ! Furnace number
LOGICAL,SAVE :: GetInputFlag = .True. ! Logical to allow "GetInput" only once per simulation
REAL(r64) :: HeatCoilLoad ! Zone heating coil load
REAL(r64) :: ReheatCoilLoad ! Load to be met by the reheat coil (if high humidity control)
REAL(r64) :: ZoneLoad ! Control zone sensible load
REAL(r64) :: MoistureLoad ! Control zone latent load
REAL(r64) :: H2OHtOfVap ! Heat of vaporization of air
INTEGER :: FurnaceInletNode ! Inlet node to furnace or unitary system
REAL(r64) :: FurnaceSavMdot ! saved furnace inlet air mass flow rate [m3/s]
REAL(r64) :: Dummy = 0.0d0
INTEGER :: CompOp ! compressor operation; 1=on, 0=off
REAL(r64) :: OnOffAirFlowRatio ! Ratio of compressor ON air flow to AVERAGE air flow over time step
INTEGER :: FanOpMode ! Fan operating mode (1=CycFanCycCoil, 2=ContFanCycCoil)
LOGICAL :: HXUnitOn ! flag to control HX assisted cooling coil
REAL(r64) :: ZoneLoadToCoolSPSequenced
REAL(r64) :: ZoneLoadToHeatSPSequenced
REAL(r64) :: QCoilReq ! load passed to heating coil (W)
REAL(r64) :: QActual ! actual heating coil output (W)
REAL(r64) :: mdot ! local temporary for mass flow rate
REAL(r64) :: QCoilMax ! heating coil maximum capacity (W)
REAL(r64) :: MinWaterFlow ! minimum fluid flow rates
REAL(r64) :: PartLoadRatioHeatingCoil ! Heating Coil Part Load Ratio
LOGICAL :: SuppHeatingCoilFlag ! true if supplemental heating coil
! Obtains and Allocates Furnace related parameters from input file
IF (GetInputFlag) THEN !First time subroutine has been entered
!Get the furnace input
CALL GetFurnaceInput
GetInputFlag=.FALSE.
End If
! Find the correct Furnace
IF (CompIndex == 0) THEN
FurnaceNum = FindItemInList(FurnaceName,Furnace%Name,NumFurnaces)
IF (FurnaceNum == 0) THEN
CALL ShowFatalError('SimFurnace: Unit not found='//TRIM(FurnaceName))
ENDIF
CompIndex=FurnaceNum
ELSE
FurnaceNum=CompIndex
IF (FurnaceNum > NumFurnaces .or. FurnaceNum < 1) THEN
CALL ShowFatalError('SimFurnace: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(FurnaceNum))// &
', Number of Units='//TRIM(TrimSigDigits(NumFurnaces))// &
', Entered Unit name='//TRIM(FurnaceName))
ENDIF
IF (CheckEquipName(FurnaceNum)) THEN
IF (FurnaceName /= Furnace(FurnaceNum)%Name) THEN
CALL ShowFatalError('SimFurnace: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(FurnaceNum))// &
', Unit name='//TRIM(FurnaceName)//', stored Unit Name for that index='// &
TRIM(Furnace(FurnaceNum)%Name))
ENDIF
CheckEquipName(FurnaceNum)=.false.
ENDIF
ENDIF
HXUnitOn = .FALSE.
OnOffAirFlowRatio = 0.0d0
! here we need to deal with sequenced zone equip
IF (Furnace(FurnaceNum)%ZoneSequenceCoolingNum > 0 .and. Furnace(FurnaceNum)%ZoneSequenceHeatingNum > 0) THEN
ZoneLoadToCoolSPSequenced = ZoneSysEnergyDemand(Furnace(FurnaceNum)%ControlZoneNum)%&
SequencedOutputRequiredToCoolingSP(Furnace(FurnaceNum)%ZoneSequenceCoolingNum)
ZoneLoadToHeatSPSequenced = ZoneSysEnergyDemand(Furnace(FurnaceNum)%ControlZoneNum)%&
SequencedOutputRequiredToHeatingSP(Furnace(FurnaceNum)%ZoneSequenceHeatingNum)
IF (ZoneLoadToHeatSPSequenced > 0.d0 .AND. ZoneLoadToCoolSPSequenced > 0.d0 .AND. &
TempControlType(Furnace(FurnaceNum)%ControlZoneNum) .NE. SingleCoolingSetPoint) THEN
ZoneLoad = ZoneLoadToHeatSPSequenced
ELSEIF (ZoneLoadToHeatSPSequenced > 0.d0 .AND. ZoneLoadToCoolSPSequenced > 0.d0 .AND. &
TempControlType(Furnace(FurnaceNum)%ControlZoneNum) .EQ. SingleCoolingSetPoint) THEN
ZoneLoad = 0.d0
ELSEIF (ZoneLoadToHeatSPSequenced < 0.d0 .AND. ZoneLoadToCoolSPSequenced < 0.d0 .AND. &
TempControlType(Furnace(FurnaceNum)%ControlZoneNum) .NE. SingleHeatingSetPoint) THEN
ZoneLoad = ZoneLoadToCoolSPSequenced
ELSEIF (ZoneLoadToHeatSPSequenced < 0.d0 .AND. ZoneLoadToCoolSPSequenced < 0.d0 .AND. &
TempControlType(Furnace(FurnaceNum)%ControlZoneNum) .EQ. SingleHeatingSetPoint) THEN
ZoneLoad = 0.d0
ELSEIF (ZoneLoadToHeatSPSequenced <= 0.d0 .AND. ZoneLoadToCoolSPSequenced >= 0.d0) THEN
ZoneLoad = 0.d0
ENDIF
MoistureLoad = ZoneSysMoistureDemand(Furnace(FurnaceNum)%ControlZoneNum)% &
SequencedOutputRequiredToDehumidSP(Furnace(FurnaceNum)%ZoneSequenceCoolingNum)
ELSE
ZoneLoad= ZoneSysEnergyDemand(Furnace(FurnaceNum)%ControlZoneNum)%RemainingOutputRequired
MoistureLoad = ZoneSysMoistureDemand(Furnace(FurnaceNum)%ControlZoneNum)%OutputRequiredToDehumidifyingSP
ENDIF
H2OHtOfVap = PsyHfgAirFnWTdb(Node(Furnace(FurnaceNum)%NodeNumofControlledZone)%HumRat,&
Node(Furnace(FurnaceNum)%NodeNumofControlledZone)%Temp,'SimFurnace')
MoistureLoad = MoistureLoad * H2OHtOfVap
! Initialize Furnace Flows
Call InitFurnace(FurnaceNum, AirLoopNum, OnOffAirFlowRatio, FanOpMode, ZoneLoad, MoistureLoad, FirstHVACIteration)
FurnaceInletNode = Furnace(FurnaceNum)%FurnaceInletNodeNum
FurnaceSavMdot = Node(FurnaceInletNode)%MassFlowRate
CompOp = On
CoolHeatPLRRat = 1.0d0
! Simulate correct system type (1 of 4 choices)
SELECT CASE(Furnace(FurnaceNum)%FurnaceType_Num)
! Simulate HeatOnly systems:
CASE(Furnace_HeatOnly, UnitarySys_HeatOnly)
! Update the furnace flow rates
Call CalcNewZoneHeatOnlyFlowRates(FurnaceNum,FirstHVACIteration,ZoneLoad,HeatCoilLoad,OnOffAirFlowRatio)
IF (Furnace(FurnaceNum)%FanPlace .EQ. BlowThru) THEN
! simulate fan
CALL SimulateFanComponents(Blank,FirstHVACIteration,Furnace(FurnaceNum)%FanIndex,FanSpeedRatio)
END IF
! simulate furnace heating coil
SuppHeatingCoilFlag = .FALSE. ! if true simulates supplemental heating coil
CALL CalcNonDXHeatingCoils(FurnaceNum,SuppHeatingCoilFlag,FirstHVACIteration,HeatCoilLoad,FanOpMode,QActual)
IF (Furnace(FurnaceNum)%FanPlace .EQ. DrawThru) THEN
! simulate fan
CALL SimulateFanComponents(Blank,FirstHVACIteration,Furnace(FurnaceNum)%FanIndex,FanSpeedRatio)
END IF
! Simulate HeatCool sytems:
CASE(Furnace_HeatCool, UnitarySys_HeatCool)
IF(Furnace(FurnaceNum)%CoolingCoilType_Num == Coil_CoolingAirToAirVariableSpeed) THEN
! variable speed cooling coil
HeatCoilLoad=0.0d0
Call SimVariableSpeedHP(FurnaceNum,FirstHVACIteration, ZoneLoad,MoistureLoad, OnOffAirFlowRatio)
ELSE
! calculate the system flow rate
IF ( .NOT. FirstHVACIteration .AND. Furnace(FurnaceNum)%OpMode == CycFanCycCoil .AND. CoolingLoad &
.AND. AirLoopControlInfo(AirLoopNum)%EconoActive) THEN
! for cycling fan, cooling load, check whether furnace can meet load with compressor off
CompOp = Off
Call CalcNewZoneHeatCoolFlowRates(FurnaceNum,FirstHVACIteration,CompOp,ZoneLoad,MoistureLoad, &
HeatCoilLoad, ReheatCoilLoad, OnOffAirFlowRatio, HXUnitOn)
IF (Furnace(FurnaceNum)%CoolPartLoadRatio >= 1.0d0 .OR. Furnace(FurnaceNum)%HeatPartLoadRatio >= 1.0d0 &
.OR. (Furnace(FurnaceNum)%CoolPartLoadRatio <= 0.0d0 .AND. Furnace(FurnaceNum)%HeatPartLoadRatio <= 0.0d0)) THEN
! compressor on (reset inlet air mass flow rate to starting value)
Node(FurnaceInletNode)%MassFlowRate = FurnaceSavMdot
CompOp = On
Call CalcNewZoneHeatCoolFlowRates(FurnaceNum,FirstHVACIteration,CompOp,ZoneLoad,MoistureLoad, &
HeatCoilLoad, ReheatCoilLoad, OnOffAirFlowRatio, HXUnitOn)
END IF
ELSE
! compressor on
Call CalcNewZoneHeatCoolFlowRates(FurnaceNum,FirstHVACIteration,CompOp,ZoneLoad,MoistureLoad, &
HeatCoilLoad, ReheatCoilLoad, OnOffAirFlowRatio, HXUnitOn)
END IF
IF (Furnace(FurnaceNum)%FanPlace .EQ. BlowThru) THEN
! simulate fan
CALL SimulateFanComponents(Blank,FirstHVACIteration,Furnace(FurnaceNum)%FanIndex,FanSpeedRatio)
END IF
IF(.NOT. Furnace(FurnaceNum)%CoolingCoilUpstream)THEN
! simulate furnace heating coil
SuppHeatingCoilFlag = .FALSE. ! if true simulates supplemental heating coil
CALL CalcNonDXHeatingCoils(FurnaceNum,SuppHeatingCoilFlag,FirstHVACIteration,HeatCoilLoad,FanOpMode,QActual)
END IF
! simulate furnace DX cooling coil
IF (Furnace(FurnaceNum)%CoolingCoilType_Num == CoilDX_CoolingHXAssisted) THEN
CALL SimHXAssistedCoolingCoil(Blank,FirstHVACIteration,CompOp,Furnace(FurnaceNum)%CoolPartLoadRatio, &
Furnace(FurnaceNum)%CoolingCoilIndex, FanOpMode, &
HXUnitEnable=HXUnitOn, OnOffAFR = OnOffAirFlowRatio, EconomizerFlag=EconomizerFlag)
ELSE
CALL SimDXCoil(Blank,CompOp,FirstHVACIteration,Furnace(FurnaceNum)%CoolPartLoadRatio,Furnace(FurnaceNum)%CoolingCoilIndex, &
FanOpMode, OnOffAFR = OnOffAirFlowRatio, CoilCoolingHeatingPLRRatio = CoolHeatPLRRat)
END IF
IF(Furnace(FurnaceNum)%CoolingCoilUpstream)THEN
! simulate furnace heating coil
SuppHeatingCoilFlag = .FALSE. ! if true simulates supplemental heating coil
CALL CalcNonDXHeatingCoils(FurnaceNum,SuppHeatingCoilFlag,FirstHVACIteration,HeatCoilLoad,FanOpMode,QActual)
END IF
IF (Furnace(FurnaceNum)%FanPlace .EQ. DrawThru) THEN
! simulate fan
CALL SimulateFanComponents(Blank,FirstHVACIteration,Furnace(FurnaceNum)%FanIndex,FanSpeedRatio)
END IF
! Simulate furnace reheat coil if a humidistat is used or if the reheat coil is present
IF(Furnace(FurnaceNum)%DehumidControlType_Num == DehumidControl_CoolReheat .OR. &
Furnace(FurnaceNum)%SuppHeatCoilIndex .GT. 0)THEN
SuppHeatingCoilFlag = .TRUE. ! if truee simulates supplemental heating coil
CALL CalcNonDXHeatingCoils(FurnaceNum,SuppHeatingCoilFlag,FirstHVACIteration,ReheatCoilLoad,FanOpMode,QActual)
END IF
END IF
! Simulate air-to-air heat pumps:
CASE(UnitarySys_HeatPump_AirToAir)
IF(Furnace(FurnaceNum)%HeatingCoilType_Num == Coil_HeatingAirToAirVariableSpeed) THEN
! variable speed heat pump
HeatCoilLoad=0.0d0
Call SimVariableSpeedHP(FurnaceNum,FirstHVACIteration, ZoneLoad,MoistureLoad, OnOffAirFlowRatio)
ELSE
! Update the furnace flow rates
IF ( .NOT. FirstHVACIteration .AND. Furnace(FurnaceNum)%OpMode == CycFanCycCoil .AND. CoolingLoad &
.AND. AirLoopControlInfo(AirLoopNum)%EconoActive) THEN
! for cycling fan, cooling load, check whether furnace can meet load with compressor off
CompOp = Off
Call CalcNewZoneHeatCoolFlowRates(FurnaceNum,FirstHVACIteration,CompOp,ZoneLoad,MoistureLoad, &
HeatCoilLoad, ReheatCoilLoad, OnOffAirFlowRatio, HXUnitOn)
IF (Furnace(FurnaceNum)%CoolPartLoadRatio >= 1.0d0 .OR. Furnace(FurnaceNum)%HeatPartLoadRatio >= 1.0d0 &
.OR. (Furnace(FurnaceNum)%CoolPartLoadRatio <= 0.0d0 .AND. Furnace(FurnaceNum)%HeatPartLoadRatio <= 0.0d0)) THEN
! compressor on (reset inlet air mass flow rate to starting value)
CompOp = On
Node(FurnaceInletNode)%MassFlowRate = FurnaceSavMdot
Call CalcNewZoneHeatCoolFlowRates(FurnaceNum,FirstHVACIteration,CompOp,ZoneLoad,MoistureLoad, &
HeatCoilLoad, ReheatCoilLoad, OnOffAirFlowRatio, HXUnitOn)
END IF
ELSE
! compressor on
Call CalcNewZoneHeatCoolFlowRates(FurnaceNum,FirstHVACIteration,CompOp,ZoneLoad,MoistureLoad, &
HeatCoilLoad, ReheatCoilLoad, OnOffAirFlowRatio, HXUnitOn)
END IF
IF (Furnace(FurnaceNum)%FanPlace .EQ. BlowThru) THEN
CALL SimulateFanComponents(Blank,FirstHVACIteration,Furnace(FurnaceNum)%FanIndex,FanSpeedRatio)
END IF
IF (Furnace(FurnaceNum)%CoolingCoilType_Num == CoilDX_CoolingHXAssisted) THEN
CALL SimHXAssistedCoolingCoil(Blank,FirstHVACIteration,CompOp,Furnace(FurnaceNum)%CoolPartLoadRatio, &
Furnace(FurnaceNum)%CoolingCoilIndex, FanOpMode, &
HXUnitEnable=HXUnitOn, OnOffAFR = OnOffAirFlowRatio, EconomizerFlag=EconomizerFlag)
ELSE
CALL SimDXCoil(Blank,CompOp,FirstHVACIteration,Furnace(FurnaceNum)%CoolPartLoadRatio,Furnace(FurnaceNum)%CoolingCoilIndex, &
FanOpMode, OnOffAFR = OnOffAirFlowRatio)
END IF
CALL SimDXCoil(Blank,CompOp,FirstHVACIteration,Furnace(FurnaceNum)%HeatPartLoadRatio, &
Furnace(FurnaceNum)%HeatingCoilIndex, FanOpMode, OnOffAFR = OnOffAirFlowRatio)
IF (Furnace(FurnaceNum)%FanPlace .EQ. DrawThru) THEN
CALL SimulateFanComponents(Blank,FirstHVACIteration,Furnace(FurnaceNum)%FanIndex,FanSpeedRatio)
END IF
! Simulate furnace reheat coil if a humidistat is present, the dehumidification type of coolreheat and
! reheat coil load exists
IF(Furnace(FurnaceNum)%DehumidControlType_Num == DehumidControl_CoolReheat .AND. ReheatCoilLoad .GT. 0.d0)THEN
SuppHeatingCoilFlag = .TRUE. ! if truee simulates supplemental heating coil
CALL CalcNonDXHeatingCoils(FurnaceNum,SuppHeatingCoilFlag,FirstHVACIteration,ReheatCoilLoad,FanOpMode,QActual)
ELSE
SuppHeatingCoilFlag = .TRUE. ! if true simulates supplemental heating coil
CALL CalcNonDXHeatingCoils(FurnaceNum,SuppHeatingCoilFlag,FirstHVACIteration,HeatCoilLoad,FanOpMode,QActual)
ENDIF
END IF
! Simulate water-to-air systems:
CASE(UnitarySys_HeatPump_WaterToAir)
IF(Furnace(FurnaceNum)%WatertoAirHPType == WatertoAir_Simple) THEN
! Update the furnace flow rates
!
! When CompOp logic is added to the child cooling coil (COIL:WaterToAirHP:EquationFit:Cooling), then this logic
! needs to be reinstated.. to align with Unitary/Furnace HeatCool and Unitary Air-to-Air Heat Pump (see above).
!
IF ( .NOT. FirstHVACIteration .AND. Furnace(FurnaceNum)%OpMode == CycFanCycCoil .AND. CoolingLoad &
.AND. AirLoopControlInfo(AirLoopNum)%EconoActive) THEN
! for cycling fan, cooling load, check whether furnace can meet load with compressor off
CompOp = Off
Call CalcNewZoneHeatCoolFlowRates(FurnaceNum,FirstHVACIteration,CompOp,ZoneLoad,MoistureLoad, &
HeatCoilLoad, ReheatCoilLoad, OnOffAirFlowRatio, HXUnitOn)
IF (Furnace(FurnaceNum)%CoolPartLoadRatio >= 1.0d0 .OR. Furnace(FurnaceNum)%HeatPartLoadRatio >= 1.0d0 &
.OR. (Furnace(FurnaceNum)%CoolPartLoadRatio <= 0.0d0 .AND. Furnace(FurnaceNum)%HeatPartLoadRatio <= 0.0d0)) THEN
! compressor on (reset inlet air mass flow rate to starting value)
CompOp = On
Node(FurnaceInletNode)%MassFlowRate = FurnaceSavMdot
Call CalcNewZoneHeatCoolFlowRates(FurnaceNum,FirstHVACIteration,CompOp,ZoneLoad,MoistureLoad, &
HeatCoilLoad, ReheatCoilLoad, OnOffAirFlowRatio, HXUnitOn)
END IF
ELSE
! compressor on
Call CalcNewZoneHeatCoolFlowRates(FurnaceNum,FirstHVACIteration,CompOp,ZoneLoad,MoistureLoad, &
HeatCoilLoad, ReheatCoilLoad, OnOffAirFlowRatio, HXUnitOn)
END IF
IF (Furnace(FurnaceNum)%FanPlace .EQ. BlowThru) THEN
CALL SimulateFanComponents(Blank,FirstHVACIteration,Furnace(FurnaceNum)%FanIndex,FanSpeedRatio)
END IF
CALL SimWatertoAirHPSimple(Blank, Furnace(FurnaceNum)%CoolingCoilIndex, &
Furnace(FurnaceNum)%CoolingCoilSensDemand, Furnace(FurnaceNum)%CoolingCoilLatentDemand, &
Furnace(FurnaceNum)%OpMode,Furnace(FurnaceNum)%WSHPRuntimeFrac, Furnace(FurnaceNum)%MaxONOFFCyclesperHour, &
Furnace(FurnaceNum)%HPTimeConstant, Furnace(FurnaceNum)%FanDelayTime, CompOp, &
Furnace(FurnaceNum)%CoolPartLoadRatio, FirstHVACIteration)
CALL SimWatertoAirHPSimple(Blank, Furnace(FurnaceNum)%HeatingCoilIndex, &
Furnace(FurnaceNum)%HeatingCoilSensDemand, dummy, Furnace(FurnaceNum)%OpMode, &
Furnace(FurnaceNum)%WSHPRuntimeFrac, &
Furnace(FurnaceNum)%MaxONOFFCyclesperHour, Furnace(FurnaceNum)%HPTimeConstant, &
Furnace(FurnaceNum)%FanDelayTime, CompOp, &
Furnace(FurnaceNum)%HeatPartLoadRatio, FirstHVACIteration)
IF (Furnace(FurnaceNum)%FanPlace .EQ. DrawThru) THEN
CALL SimulateFanComponents(Blank,FirstHVACIteration,Furnace(FurnaceNum)%FanIndex,FanSpeedRatio)
END IF
IF(Furnace(FurnaceNum)%DehumidControlType_Num == DehumidControl_CoolReheat .AND. ReheatCoilLoad .GT. 0.d0)THEN
SuppHeatingCoilFlag = .TRUE. ! if true simulates supplemental heating coil
CALL CalcNonDXHeatingCoils(FurnaceNum,SuppHeatingCoilFlag,FirstHVACIteration,ReheatCoilLoad,FanOpMode,QActual)
ELSE
SuppHeatingCoilFlag = .TRUE. ! if true simulates supplemental heating coil
CALL CalcNonDXHeatingCoils(FurnaceNum,SuppHeatingCoilFlag,FirstHVACIteration,HeatCoilLoad,FanOpMode,QActual)
ENDIF
ELSE IF(Furnace(FurnaceNum)%WatertoAirHPType == WatertoAir_ParEst) THEN
! simulate the heat pump
HeatCoilLoad=0.0d0
CALL CalcWaterToAirHeatpump(AirLoopNum, FurnaceNum,FirstHVACIteration,CompOp,ZoneLoad,MoistureLoad)
ELSE IF(Furnace(FurnaceNum)%WatertoAirHPType == WatertoAir_VarSpeedEquationFit) THEN
! simulate the heat pump
HeatCoilLoad=0.0d0
Call SimVariableSpeedHP(FurnaceNum,FirstHVACIteration, ZoneLoad,MoistureLoad, OnOffAirFlowRatio)
ELSE IF(Furnace(FurnaceNum)%WatertoAirHPType == WatertoAir_VarSpeedLooUpTable) THEN
END IF
CASE DEFAULT
! will never get here, all system types are simulated above
END SELECT
! set the econo lockout flags
IF (Furnace(FurnaceNum)%CompPartLoadRatio > 0.0d0 .AND. &
AirLoopControlInfo(AirLoopNum)%CanLockoutEconoWithCompressor) THEN
AirLoopControlInfo(AirLoopNum)%ReqstEconoLockoutWithCompressor = .TRUE.
ELSE
AirLoopControlInfo(AirLoopNum)%ReqstEconoLockoutWithCompressor = .FALSE.
END IF
IF ((HeatCoilLoad > 0.0d0 .OR. Furnace(FurnaceNum)%HeatPartLoadRatio > 0.0d0) .AND. &
(AirLoopControlInfo(AirLoopNum)%CanLockoutEconoWithCompressor .OR. &
AirLoopControlInfo(AirLoopNum)%CanLockoutEconoWithHeating)) THEN
AirLoopControlInfo(AirLoopNum)%ReqstEconoLockoutWithHeating = .TRUE.
ELSE
AirLoopControlInfo(AirLoopNum)%ReqstEconoLockoutWithHeating = .FALSE.
END IF
IF(Furnace(FurnaceNum)%OpMode == CycFanCycCoil)THEN
AirLoopflow(AirLoopNum)%FanPLR = Furnace(FurnaceNum)%FanPartLoadRatio
END IF
! Report the current Furnace output
Call ReportFurnace(FurnaceNum)
! Reset OnOffFanPartLoadFraction to 1 in case another on/off fan is called without a part-load curve
OnOffFanPartLoadFraction = 1.0d0
RETURN
END SUBROUTINE SimFurnace