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) | :: | CycRatio | |||
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 HeatingCoilVarSpeedCycResidual(CycRatio, Par) RESULT (Residuum)
! FUNCTION INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN September 2002
! MODIFIED
! RE-ENGINEERED
! PURPOSE OF THIS FUNCTION:
! Calculates residual function (desired outlet temp - actual outlet temp)
! DX Coil output depends on the cycling ratio which is being varied to zero the residual.
! METHODOLOGY EMPLOYED:
! Calls multi or variable speed coil to get outlet temperature at the given cycling ratio
! and calculates the residual as defined above
! REFERENCES:
! USE STATEMENTS:
USE DXCoils, ONLY: DXCoilOutletTemp, CalcMultiSpeedDXCoil, CalcMultiSpeedDXCoilHeating
USE VariableSpeedCoils, ONLY: CalcVarSpeedCoilHeating
USE HeatingCoils, ONLY: CalcMultiStageElectricHeatingCoil, CalcMultiStageGasHeatingCoil
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: CycRatio ! 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]
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 :: CoilIndex ! index of this coil
REAL(r64) :: OutletAirTemp ! outlet air temperature [C]
REAL(R64) :: SpeedRatio
INTEGER :: SpeedNum
INTEGER :: FanOpMode
INTEGER :: CompOp
INTEGER :: UnitarySysNum
REAL(r64) :: RuntimeFrac
REAL(r64) :: ReqOutput
REAL(r64) :: dummy
REAL(r64) :: OnOffAirFlowRatio
! Par(1) = REAL(UnitarySystem(UnitarySysNum)%CoolingCoilIndex,r64)
! Par(2) = DesOutTemp
! Par(3) = UnitarySysNum
! Par(4) = SpeedRatio
! Par(5) = UnitarySystem(UnitarySysNum)%CoolingSpeedNum
! Par(6) = UnitarySystem(UnitarySysNum)%FanOpMode
! Par(7) = 1.0d0 ! CompOp
CoilIndex = INT(Par(1))
UnitarySysNum = INT(Par(3))
SELECT CASE(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num)
CASE (CoilDX_MultiSpeedHeating)
SpeedRatio = INT(Par(4))
SpeedNum = INT(Par(5))
FanOpMode = INT(Par(6))
CompOp = INT(Par(7))
CALL CalcMultiSpeedDXCoilHeating(CoilIndex,SpeedRatio,CycRatio,SpeedNum,FanOpMode)
OutletAirTemp = DXCoilOutletTemp(CoilIndex)
CASE (Coil_HeatingAirToAirVariableSpeed, Coil_HeatingWaterToAirHPVSEquationFit)
SpeedNum = INT(Par(5))
FanOpMode = INT(Par(6))
CompOp = INT(Par(7))
ReqOutput = Par(8)
dummy = 0.0d0
RuntimeFrac = 1.0d0
OnOffAirFlowRatio = 1.0d0
CALL CalcVarSpeedCoilHeating(CoilIndex,FanOpMode,RuntimeFrac,&
ReqOutput,CompOp,CycRatio,OnOffAirFlowRatio, SpeedRatio, SpeedNum)
OutletAirTemp = Node(UnitarySystem(UnitarySysNum)%HeatCoilOutletNodeNum)%Temp
CASE (Coil_HeatingElectric_MultiStage)
SpeedRatio = INT(Par(4))
SpeedNum = INT(Par(5))
FanOpMode = INT(Par(6))
CALL CalcMultiStageElectricHeatingCoil(CoilIndex,SpeedRatio,CycRatio,SpeedNum,FanOpMode)
OutletAirTemp = Node(UnitarySystem(UnitarySysNum)%HeatCoilOutletNodeNum)%Temp
CASE (Coil_HeatingGas_MultiStage)
SpeedRatio = INT(Par(4))
SpeedNum = INT(Par(5))
FanOpMode = INT(Par(6))
CALL CalcMultiStageElectricHeatingCoil(CoilIndex,SpeedRatio,CycRatio,SpeedNum,FanOpMode)
OutletAirTemp = Node(UnitarySystem(UnitarySysNum)%HeatCoilOutletNodeNum)%Temp
CASE DEFAULT
END SELECT
Residuum = Par(2) - OutletAirTemp
RETURN
END FUNCTION HeatingCoilVarSpeedCycResidual