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 | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | SupplyAirMassFlowRate | |||
real(kind=r64), | intent(in), | optional | DIMENSION(:) | :: | Par |
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.
FUNCTION CalcTwoSpeedDXCoilIEERResidual(SupplyAirMassFlowRate, Par) RESULT (Residuum)
! FUNCTION INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN July 2012
! MODIFIED
! RE-ENGINEERED
! PURPOSE OF THIS FUNCTION:
! Calculates residual function (desired outlet temp - actual outlet temp)
! Two Speed DX Coil rating for VAV, output depends on the supply air flow rate which is being varied to zero the residual.
! METHODOLOGY EMPLOYED:
! Calls CalcMultiSpeedDXCoil to get outlet temperature at the given supply flow rate and SpeedRatio
! and calculates the residual as defined above
! REFERENCES:
! USE STATEMENTS:
USE DataEnvironment, ONLY : OutBaroPress
USE Fans, ONLY : SimulateFanComponents
USE CurveManager, ONLY: CurveValue
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: SupplyAirMassFlowRate ! compressor cycling ratio (1.0 is continuous, 0.0 is off)
REAL(r64), INTENT(IN), DIMENSION(:), OPTIONAL :: Par ! par(1) = DX coil number
! par(2) = desired air outlet temperature [C]
! par(3) = speed ratio
! par(4) = cycling Ratio
! par(5) = supply air fan operating mode (ContFanCycCoil)
REAL(r64) :: Residuum ! residual to be minimized to zero
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER :: DXCoilNum ! index of this coil
REAL(r64) :: OutletAirTemp ! outlet air temperature [C]
REAL(r64) :: TargetCoilLeavingDryblub
REAL(r64) :: OutdoorUnitInletDryBulb
REAL(r64) :: IndoorUnitInletDryBulb
REAL(r64) :: IndoorUnitInletWetBulb
REAL(r64) :: AirMassFlowRatio
REAL(r64) :: SpeedRatio
REAL(r64) :: CycRatio
REAL(r64) :: SupplyAirRho
REAL(r64) :: SupplyAirHumRat
REAL(r64) :: NetCoolingCapRated
REAL(r64) :: TargetNetCapacity
REAL(r64) :: FanPowerPerEvapAirFlowRate
INTEGER :: FanInletNodeNum
INTEGER :: FanOutletNodeNum
INTEGER :: FanIndex
REAL(r64) :: FanExternalStaticFull
REAL(r64) :: SupplyAirVolFlowRate
REAL(r64) :: FanStaticPressureRise
REAL(r64) :: FanHeatCorrection
REAL(r64) :: TotCapFlowModFac
REAL(r64) :: TotCapTempModFac
REAL(r64) :: HighSpeedNetCoolingCap
REAL(r64) :: LowSpeedNetCoolingCap
DXCoilNum = INT(Par(1))
TargetCoilLeavingDryblub = Par(2)
TargetNetCapacity = Par(3)
OutdoorUnitInletDryBulb = Par(4)
IndoorUnitInletWetBulb = Par(5)
IndoorUnitInletDryBulb = Par(6)
NetCoolingCapRated = Par(7)
FanPowerPerEvapAirFlowRate = Par(8)
FanInletNodeNum = INT(Par(9))
FanOutletNodeNum = INT(Par(10))
FanExternalStaticFull = Par(11)
FanIndex = INT(Par(12))
IF (DXCoil(DXCoilNum)%RatedAirMassFlowRate(1) > 0.d0) THEN
AirMassFlowRatio = SupplyAirMassFlowRate / DXCoil(DXCoilNum)%RatedAirMassFlowRate(1)
ELSE
AirMassFlowRatio = 0.d0
ENDIF
SupplyAirHumRat = PsyWFnTdbTwbPb(IndoorUnitInletDryBulb, IndoorUnitInletWetBulb, OutBaroPress , &
'CalcTwoSpeedDXCoilIEERResidual')
SupplyAirRho = PsyRhoAirFnPbTdbW(OutBaroPress, IndoorUnitInletDryBulb, SupplyAirHumRat, &
'CalcTwoSpeedDXCoilIEERResidual')
SupplyAirVolFlowRate = SupplyAirMassFlowRate / SupplyAirRho
IF( DXCoil(DXCoilNum)%RateWithInternalStaticAndFanObject ) THEN
! modify external static per AHRI 340/360, Table 6, note 1.
FanStaticPressureRise = DXCoil(DXCoilNum)%InternalStaticPressureDrop &
+ (FanExternalStaticFull * (AirMassFlowRatio**2))
Node(FanInletNodeNum)%MassFlowRate = SupplyAirMassFlowRate
Node(FanOutletNodeNum)%MassFlowRate = SupplyAirMassFlowRate
Node(FanInletNodeNum)%Temp = IndoorUnitInletDryBulb
Node(FanInletNodeNum)%HumRat = PsyWFnTdbTwbPb(IndoorUnitInletDryBulb, IndoorUnitInletWetBulb, &
OutBaroPress , 'CalcTwoSpeedDXCoilIEERResidual')
Node(FanInletNodeNum)%Enthalpy = PsyHFnTdbW(IndoorUnitInletDryBulb, Node(FanInletNodeNum)%HumRat, &
'CalcTwoSpeedDXCoilIEERResidual')
CALL SimulateFanComponents(DXCoil(DXCoilNum)%SupplyFanName,.TRUE.,DXCoil(DXCoilNum)%SupplyFanIndex, &
ZoneCompTurnFansOn = .TRUE. , &
ZoneCompTurnFansOff = .FALSE. , &
PressureRise = FanStaticPressureRise)
FanHeatCorrection = Node(FanOutletNodeNum)%Enthalpy - Node(FanInletNodeNum)%Enthalpy
ELSE
FanHeatCorrection = FanPowerPerEvapAirFlowRate * SupplyAirVolFlowRate
ENDIF
TotCapFlowModFac = CurveValue(DXCoil(DXCoilNum)%CCapFFlow(1),AirMassFlowRatio)
TotCapTempModFac = CurveValue(DXCoil(DXCoilNum)%CCapFTemp(1),IndoorUnitInletWetBulb, &
OutdoorUnitInletDryBulb)
HighSpeedNetCoolingCap = DXCoil(DXCoilNum)%RatedTotCap(1) * TotCapTempModFac * TotCapFlowModFac &
- FanHeatCorrection
TotCapFlowModFac = CurveValue(DXCoil(DXCoilNum)%CCapFFlow(1),AirMassFlowRatio)
TotCapTempModFac = CurveValue(DXCoil(DXCoilNum)%CCapFTemp2,IndoorUnitInletWetBulb, &
OutdoorUnitInletDryBulb)
LowSpeedNetCoolingCap = DXCoil(DXCoilNum)%RatedTotCap2 * TotCapTempModFac * TotCapFlowModFac &
- FanHeatCorrection
IF (LowSpeedNetCoolingCap <= TargetNetCapacity ) THEN
CycRatio = 1.d0
SpeedRatio = (TargetNetCapacity - LowSpeedNetCoolingCap) &
/( HighSpeedNetCoolingCap - LowSpeedNetCoolingCap )
ELSE ! minimum unloading limit exceeded for no cycling
SpeedRatio = 0.d0
CycRatio = TargetNetCapacity / LowSpeedNetCoolingCap
ENDIF
DXCoil(DXCoilNum)%InletAirMassFlowRate = SupplyAirMassFlowRate
CALL CalcMultiSpeedDXCoil(DXCoilNum, SpeedRatio, CycRatio, ForceOn = .TRUE.)
OutletAirTemp = DXCoilOutletTemp(DXCoilNum)
Residuum = TargetCoilLeavingDryblub - OutletAirTemp
RETURN
END FUNCTION CalcTwoSpeedDXCoilIEERResidual