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) | :: | FurnaceNum | |||
logical, | intent(in) | :: | FirstHVACIteration |
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 SizeFurnace(FurnaceNum,FirstHVACIteration)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN January 2002
! MODIFIED Bereket Nigusse, May 2010, removed the autosize option for the input field supply air
! flow fraction through controlled zone.
! Bo Shen, March 2012, size the air flow rates at individual speed levels for VS WSHP
! Bo Shen, ORNL, July 2012 - added variable-speed air source heat pump cooling and heating coils, using curve-fits
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for sizing Furnace Components for which nominal cpacities
! and flow rates have not been specified in the input
! METHODOLOGY EMPLOYED:
! Obtains heating capacities and flow rates from the zone or system sizing arrays.
!
! NOTE: In UNITARYSYSTEM:HEATPUMP:AIRTOAIR we are sizing the heating capacity to be
! equal to the cooling capacity. Thus the cooling and
! and heating capacities of a DX heat pump system will be identical. In real life the ARI
! heating and cooling capacities are close but not identical.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataSizing
USE General, ONLY: TrimSigDigits
USE BranchInputManager, ONLY: CheckSystemBranchFlow
USE HVACHXAssistedCoolingCoil, ONLY: SimHXAssistedCoolingCoil
USE WatertoAirheatPumpSimple, ONLY: SimWatertoAirHPSimple
USE VariableSpeedCoils, ONLY: SimVariableSpeedCoils, VarSpeedCoil
USE ReportSizingManager, ONLY: ReportSizingOutput
USE EMSManager, ONLY: ManageEMS
USE DataGlobals, ONLY: emsCallFromUnitarySystemSizing
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
Integer, Intent(IN) :: FurnaceNum
LOGICAL, Intent(IN) :: FirstHVACIteration
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: ControlZoneVolFlow
INTEGER :: ThisCtrlZoneNum ! the controlled zone number of the control zone !!!
INTEGER :: ControlledZoneNum
INTEGER :: Iter !iteration count
REAL(r64) :: MulSpeedFlowScale ! variable speed air flow scaling factor
LOGICAL :: ErrFound ! flag returned from mining functions
REAL(r64) :: BranchFlow ! branch volumetric flow rate [m3/s]
CALL ManageEMS(emsCallFromUnitarySystemSizing) ! calling point
ThisCtrlZoneNum = 0
DXCoolCap = 0.0d0
UnitaryHeatCap = 0.0d0
SuppHeatCap = 0.0d0
IF (Furnace(FurnaceNum)%CoolingCoilType_Num == CoilDX_CoolingSingleSpeed) THEN
CALL SimDXCoil(Blank,On,.TRUE.,0.0d0,Furnace(FurnaceNum)%CoolingCoilIndex, 1)
ELSE IF (Furnace(FurnaceNum)%CoolingCoilType_Num == CoilDX_CoolingHXAssisted) THEN
CALL SimHXAssistedCoolingCoil(Blank,.TRUE.,On, &
0.0d0, Furnace(FurnaceNum)%CoolingCoilIndex, 1, &
HXUnitEnable=.FALSE., OnOffAFR = 1.0d0, EconomizerFlag=.FALSE.)
ELSE IF (Furnace(FurnaceNum)%CoolingCoilType_Num == Coil_CoolingWaterToAirHPSimple) THEN
CALL SimWatertoAirHPSimple(Blank, &
Furnace(FurnaceNum)%CoolingCoilIndex, &
Furnace(FurnaceNum)%CoolingCoilSensDemand, Furnace(FurnaceNum)%CoolingCoilLatentDemand, &
0,0.0d0, Furnace(FurnaceNum)%MaxONOFFCyclesperHour, & !CoolPartLoadRatio
Furnace(FurnaceNum)%HPTimeConstant, Furnace(FurnaceNum)%FanDelayTime, 0, 0.0d0, FirstHVACIteration)
ELSE IF (Furnace(FurnaceNum)%CoolingCoilType_Num == Coil_CoolingWaterToAirHPVSEquationFit .OR. &
Furnace(FurnaceNum)%CoolingCoilType_Num == Coil_CoolingAirToAirVariableSpeed ) THEN
CALL SimVariableSpeedCoils(Blank,Furnace(FurnaceNum)%CoolingCoilIndex,&
0,Furnace(FurnaceNum)%MaxONOFFCyclesperHour, &
Furnace(FurnaceNum)%HPTimeConstant,Furnace(FurnaceNum)%FanDelayTime,&
0, 0.0d0, 0.0d0,1, 0.0d0,0.0d0, 0.0d0 ) !conduct the sizing operation in the VS WSHP
Furnace(FurnaceNum)%NumOfSpeedCooling = VarSpeedCoil(Furnace(FurnaceNum)%CoolingCoilIndex)%NumOfSpeeds
MulSpeedFlowScale = VarSpeedCoil(Furnace(FurnaceNum)%CoolingCoilIndex)%RatedAirVolFlowRate/ &
VarSpeedCoil(Furnace(FurnaceNum)%CoolingCoilIndex)%MSRatedAirVolFlowRate( &
VarSpeedCoil(Furnace(FurnaceNum)%CoolingCoilIndex)%NormSpedLevel)
Do Iter = 1,Furnace(FurnaceNum)%NumOfSpeedCooling
Furnace(FurnaceNum)%CoolVolumeFlowRate(Iter) = &
VarSpeedCoil(Furnace(FurnaceNum)%CoolingCoilIndex)%MSRatedAirVolFlowRate(Iter) * MulSpeedFlowScale
Furnace(FurnaceNum)%CoolMassFlowRate(Iter) = &
VarSpeedCoil(Furnace(FurnaceNum)%CoolingCoilIndex)%MSRatedAirMassFlowRate(Iter) * MulSpeedFlowScale
Furnace(FurnaceNum)%MSCoolingSpeedRatio(Iter) = &
VarSpeedCoil(Furnace(FurnaceNum)%CoolingCoilIndex)%MSRatedAirVolFlowRate(Iter)/ &
VarSpeedCoil(Furnace(FurnaceNum)%CoolingCoilIndex)%MSRatedAirVolFlowRate(Furnace(FurnaceNum)%NumOfSpeedCooling)
End Do
IF (Furnace(FurnaceNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPVSEquationFit .OR. &
Furnace(FurnaceNum)%HeatingCoilType_Num == Coil_HeatingAirToAirVariableSpeed) THEN
CALL SimVariableSpeedCoils(Blank,Furnace(FurnaceNum)%HeatingCoilIndex,&
0,Furnace(FurnaceNum)%MaxONOFFCyclesperHour, &
Furnace(FurnaceNum)%HPTimeConstant,Furnace(FurnaceNum)%FanDelayTime,&
0, 0.0d0, 0.0d0,1, 0.0d0,0.0d0, 0.0d0 ) !conduct the sizing operation in the VS WSHP
Furnace(FurnaceNum)%NumOfSpeedHeating = VarSpeedCoil(Furnace(FurnaceNum)%HeatingCoilIndex)%NumOfSpeeds
MulSpeedFlowScale = VarSpeedCoil(Furnace(FurnaceNum)%HeatingCoilIndex)%RatedAirVolFlowRate/ &
VarSpeedCoil(Furnace(FurnaceNum)%HeatingCoilIndex)%MSRatedAirVolFlowRate( &
VarSpeedCoil(Furnace(FurnaceNum)%HeatingCoilIndex)%NormSpedLevel)
Do Iter = 1,Furnace(FurnaceNum)%NumOfSpeedHeating
Furnace(FurnaceNum)%HeatVolumeFlowRate(Iter) = &
VarSpeedCoil(Furnace(FurnaceNum)%HeatingCoilIndex)%MSRatedAirVolFlowRate(Iter) * MulSpeedFlowScale
Furnace(FurnaceNum)%HeatMassFlowRate(Iter) = &
VarSpeedCoil(Furnace(FurnaceNum)%HeatingCoilIndex)%MSRatedAirMassFlowRate(Iter) * MulSpeedFlowScale
Furnace(FurnaceNum)%MSHeatingSpeedRatio(Iter) = &
VarSpeedCoil(Furnace(FurnaceNum)%HeatingCoilIndex)%MSRatedAirVolFlowRate(Iter)/ &
VarSpeedCoil(Furnace(FurnaceNum)%HeatingCoilIndex)%MSRatedAirVolFlowRate&
(Furnace(FurnaceNum)%NumOfSpeedHeating)
End Do
END IF
IF(Furnace(FurnaceNum)%NumOfSpeedHeating > 0) THEN
Furnace(FurnaceNum)%IdleMassFlowRate = &
min(Furnace(FurnaceNum)%HeatMassFlowRate(1), Furnace(FurnaceNum)%CoolMassFlowRate(1))
Furnace(FurnaceNum)%IdleSpeedRatio = &
min(Furnace(FurnaceNum)%MSHeatingSpeedRatio(1), Furnace(FurnaceNum)%MSCoolingSpeedRatio(1))
Furnace(FurnaceNum)%IdleVolumeAirRate = &
min(Furnace(FurnaceNum)%HeatVolumeFlowRate(1), Furnace(FurnaceNum)%CoolVolumeFlowRate(1))
ELSE
Furnace(FurnaceNum)%IdleMassFlowRate = Furnace(FurnaceNum)%CoolMassFlowRate(1)
Furnace(FurnaceNum)%IdleSpeedRatio = Furnace(FurnaceNum)%MSCoolingSpeedRatio(1)
Furnace(FurnaceNum)%IdleVolumeAirRate = Furnace(FurnaceNum)%CoolVolumeFlowRate(1)
END IF
IF (Furnace(FurnaceNum)%OpMode .EQ. ContFanCycCoil) THEN
Furnace(FurnaceNum)%MaxNoCoolHeatAirVolFlow = Furnace(FurnaceNum)%IdleVolumeAirRate
Furnace(FurnaceNum)%MaxNoCoolHeatAirMassFlow = Furnace(FurnaceNum)%IdleMassFlowRate
Furnace(FurnaceNum)%NoHeatCoolSpeedRatio= Furnace(FurnaceNum)%IdleSpeedRatio
END IF
END IF
IF (Furnace(FurnaceNum)%DesignFanVolFlowRate == AutoSize) THEN
IF (CurSysNum > 0) THEN
CALL CheckSysSizing(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num), Furnace(FurnaceNum)%Name)
IF (FinalSysSizing(CurSysNum)%DesMainVolFlow >= SmallAirVolFlow) THEN
Furnace(FurnaceNum)%DesignFanVolFlowRate = FinalSysSizing(CurSysNum)%DesMainVolFlow
ELSE
Furnace(FurnaceNum)%DesignFanVolFlowRate = 0.0d0
END IF
IF (Furnace(FurnaceNum)%DesignFanVolFlowRateEMSOverrideOn) THEN
Furnace(FurnaceNum)%DesignFanVolFlowRate = Furnace(FurnaceNum)%DesignFanVolFlowRateEMSOverrideValue
ENDIF
CALL ReportSizingOutput(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num), Furnace(FurnaceNum)%Name, &
'Supply Air Flow Rate [m3/s]', &
Furnace(FurnaceNum)%DesignFanVolFlowRate)
END IF
END IF
IF (Furnace(FurnaceNum)%MaxHeatAirVolFlow == AutoSize) THEN
IF (CurSysNum > 0) THEN
CALL CheckSysSizing(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num), Furnace(FurnaceNum)%Name)
IF (FinalSysSizing(CurSysNum)%DesMainVolFlow >= SmallAirVolFlow) THEN
Furnace(FurnaceNum)%MaxHeatAirVolFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
ELSE
Furnace(FurnaceNum)%MaxHeatAirVolFlow = 0.0d0
END IF
IF (Furnace(FurnaceNum)%MaxHeatAirVolFlowEMSOverrideOn) THEN
Furnace(FurnaceNum)%MaxHeatAirVolFlow = Furnace(FurnaceNum)%MaxHeatAirVolFlowEMSOverrideValue
ENDIF
CALL ReportSizingOutput(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num), Furnace(FurnaceNum)%Name, &
'Supply Air Flow Rate During Heating Operation [m3/s]', &
Furnace(FurnaceNum)%MaxHeatAirVolFlow)
END IF
END IF
IF (Furnace(FurnaceNum)%MaxCoolAirVolFlow == AutoSize) THEN
IF (CurSysNum > 0) THEN
CALL CheckSysSizing(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num), Furnace(FurnaceNum)%Name)
IF (FinalSysSizing(CurSysNum)%DesMainVolFlow >= SmallAirVolFlow) THEN
Furnace(FurnaceNum)%MaxCoolAirVolFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
ELSE
Furnace(FurnaceNum)%MaxCoolAirVolFlow = 0.0d0
END IF
IF (Furnace(FurnaceNum)%MaxCoolAirVolFlowEMSOverrideOn) THEN
Furnace(FurnaceNum)%MaxCoolAirVolFlow = Furnace(FurnaceNum)%MaxCoolAirVolFlowEMSOverrideValue
ENDIF
CALL ReportSizingOutput(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num), Furnace(FurnaceNum)%Name, &
'Supply Air Flow Rate During Cooling Operation [m3/s]', &
Furnace(FurnaceNum)%MaxCoolAirVolFlow)
END IF
END IF
IF (Furnace(FurnaceNum)%MaxNoCoolHeatAirVolFlow == AutoSize) THEN
IF (CurSysNum > 0) THEN
CALL CheckSysSizing(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num), Furnace(FurnaceNum)%Name)
IF (FinalSysSizing(CurSysNum)%DesMainVolFlow >= SmallAirVolFlow) THEN
Furnace(FurnaceNum)%MaxNoCoolHeatAirVolFlow = FinalSysSizing(CurSysNum)%DesMainVolFlow
ELSE
Furnace(FurnaceNum)%MaxNoCoolHeatAirVolFlow = 0.0d0
END IF
IF (Furnace(FurnaceNum)%MaxNoCoolHeatAirVolFlowEMSOverrideOn) THEN
Furnace(FurnaceNum)%MaxNoCoolHeatAirVolFlow = Furnace(FurnaceNum)%MaxNoCoolHeatAirVolFlowEMSOverrideValue
ENDIF
CALL ReportSizingOutput(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num), Furnace(FurnaceNum)%Name, &
'Supply Air Flow Rate When No Cooling or Heating is Needed [m3/s]', &
Furnace(FurnaceNum)%MaxNoCoolHeatAirVolFlow)
END IF
END IF
IF (Furnace(FurnaceNum)%DesignHeatingCapacity == AutoSize) THEN
IF (CurSysNum > 0) THEN
IF (Furnace(FurnaceNum)%FurnaceType_Num == UnitarySys_HeatPump_AirToAir .OR. &
Furnace(FurnaceNum)%FurnaceType_Num == UnitarySys_HeatPump_WaterToAir) THEN
CALL CheckSysSizing(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num), Furnace(FurnaceNum)%Name)
Furnace(FurnaceNum)%DesignHeatingCapacity = DXCoolCap
ELSE
CALL CheckSysSizing(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num), Furnace(FurnaceNum)%Name)
Furnace(FurnaceNum)%DesignHeatingCapacity = FinalSysSizing(CurSysNum)%HeatCap
END IF
IF (Furnace(FurnaceNum)%DesignHeatingCapacity < SmallLoad) THEN
Furnace(FurnaceNum)%DesignHeatingCapacity = 0.0d0
END IF
CALL ReportSizingOutput(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num), Furnace(FurnaceNum)%Name, &
'Nominal Heating Capacity [W]', &
Furnace(FurnaceNum)%DesignHeatingCapacity)
END IF
END IF
IF (Furnace(FurnaceNum)%DesignCoolingCapacity == AutoSize) THEN
IF (CurSysNum > 0) THEN
CALL CheckSysSizing(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num), Furnace(FurnaceNum)%Name)
IF (DXCoolCap >= SmallLoad) THEN
Furnace(FurnaceNum)%DesignCoolingCapacity = DXCoolCap
ELSE
Furnace(FurnaceNum)%DesignCoolingCapacity = 0.0d0
END IF
CALL ReportSizingOutput(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num), Furnace(FurnaceNum)%Name, &
'Nominal Cooling Capacity [W]', &
Furnace(FurnaceNum)%DesigncoolingCapacity)
END IF
END IF
IF (Furnace(FurnaceNum)%DesignMaxOutletTemp == AutoSize) THEN
IF (CurSysNum > 0) THEN
CALL CheckSysSizing(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num), Furnace(FurnaceNum)%Name)
Furnace(FurnaceNum)%DesignMaxOutletTemp = FinalSysSizing(CurSysNum)%HeatSupTemp
CALL ReportSizingOutput(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num), Furnace(FurnaceNum)%Name, &
'Maximum Supply Air Temperature from Supplemental Heater [C]', &
Furnace(FurnaceNum)%DesignMaxOutletTemp)
END IF
END IF
IF (Furnace(FurnaceNum)%DesignSuppHeatingCapacity == AutoSize) THEN
IF (CurSysNum > 0) THEN
CALL CheckSysSizing(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num), Furnace(FurnaceNum)%Name)
IF (Furnace(FurnaceNum)%FurnaceType_Num == UnitarySys_HeatPump_AirToAir .or. &
Furnace(FurnaceNum)%FurnaceType_Num == UnitarySys_HeatPump_WaterToAir) THEN
! set the supplemental heating capacity to the actual heating load
Furnace(FurnaceNum)%DesignSuppHeatingCapacity = FinalSysSizing(CurSysNum)%HeatCap
! if reheat needed for humidity control, make sure supplemental heating is at least as big
! as the cooling capacity
IF (Furnace(FurnaceNum)%Humidistat .AND. Furnace(FurnaceNum)%DehumidControlType_Num == DehumidControl_CoolReheat) THEN
Furnace(FurnaceNum)%DesignSuppHeatingCapacity = MAX(Furnace(FurnaceNum)%DesignSuppHeatingCapacity, &
Furnace(FurnaceNum)%DesignCoolingCapacity)
IF (Furnace(FurnaceNum)%DesignSuppHeatingCapacity < SmallLoad) THEN
Furnace(FurnaceNum)%DesignSuppHeatingCapacity = 0.0d0
ENDIF
END IF
ELSE
IF (Furnace(FurnaceNum)%Humidistat .AND. Furnace(FurnaceNum)%DehumidControlType_Num == DehumidControl_CoolReheat) THEN
Furnace(FurnaceNum)%DesignSuppHeatingCapacity = Furnace(FurnaceNum)%DesignCoolingCapacity
ELSE
Furnace(FurnaceNum)%DesignSuppHeatingCapacity = 0.0d0
END IF
ENDIF
CALL ReportSizingOutput(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num), Furnace(FurnaceNum)%Name, &
'Supplemental Heating Coil Nominal Capacity [W]', &
Furnace(FurnaceNum)%DesignSuppHeatingCapacity)
END IF
END IF
UnitaryHeatCap = Furnace(FurnaceNum)%DesignHeatingCapacity
SuppHeatCap = Furnace(FurnaceNum)%DesignSuppHeatingCapacity
BranchFlow = 0.0d0
ErrFound = .FALSE.
! check branch flow rate vs system flow rate. Branch must match system of OA system is present
CALL CheckSystemBranchFlow(TRIM(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num)), &
Furnace(FurnaceNum)%Name,BranchFlow,Furnace(FurnaceNum)%DesignFanVolFlowRate, ErrFound)
IF(ErrFound)CALL ShowContinueError('...occurs in '//TRIM(cFurnaceTypes(Furnace(FurnaceNum)%FurnaceType_Num))// &
' "'//TRIM(Furnace(FurnaceNum)%Name))
RETURN
END SUBROUTINE SizeFurnace