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) | :: | SpeedRatio | |||
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 DXCoilVarSpeedHumRatResidual(SpeedRatio, Par) RESULT (Residuum)
! FUNCTION INFORMATION:
! AUTHOR Richard Raustad
! DATE WRITTEN January 2008
! MODIFIED
! RE-ENGINEERED
! PURPOSE OF THIS FUNCTION:
! Calculates residual function (desired outlet humrat - actual outlet humrat).
! DX Coil output depends on the compressor speed which is being varied to zero the residual.
! METHODOLOGY EMPLOYED:
! Calls calc routine sof multi speed or variable speed coils to get outlet humidity ratio at the given compressor speed
! and calculates the residual as defined above
! REFERENCES:
! USE STATEMENTS:
USE DXCoils, ONLY: DXCoilOutletHumRat, CalcMultiSpeedDXCoil, CalcMultiSpeedDXCoilCooling
USE VariableSpeedCoils, ONLY: CalcVarSpeedCoilCooling
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: SpeedRatio ! compressor speed ratio (1.0 is max, 0.0 is min)
REAL(r64), INTENT(IN), DIMENSION(:), OPTIONAL :: Par ! par(1) = DX coil number
! par(2) = desired air outlet humidity ratio [kg/kg]
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
INTEGER :: UnitarySysNum ! index to Unitary System
REAL(r64) :: OutletAirHumRat ! outlet air humidity ratio
REAL(r64) :: CycRatio
INTEGER :: SpeedNum
INTEGER :: FanOpMode
INTEGER :: CompOp
REAL(r64) :: ReqOutput
REAL(r64) :: dummy
REAL(r64) :: RuntimeFrac
REAL(r64) :: OnOffAirFlowRatio
CoilIndex = INT(Par(1))
UnitarySysNum = INT(Par(3))
SELECT CASE(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num)
CASE (CoilDX_CoolingTwoSpeed)
CALL CalcMultiSpeedDXCoil(CoilIndex,SpeedRatio,1.0d0)
OutletAirHumRat = DXCoilOutletHumRat(CoilIndex)
CASE (CoilDX_MultiSpeedCooling)
CycRatio = Par(4)
SpeedNum = INT(Par(5))
FanOpMode = INT(Par(6))
CompOp = INT(Par(7))
CALL CalcMultiSpeedDXCoilCooling(CoilIndex,SpeedRatio,CycRatio,SpeedNum,FanOpMode,CompOp)
OutletAirHumRat = DXCoilOutletHumRat(CoilIndex)
CASE (Coil_CoolingAirToAirVariableSpeed, Coil_CoolingWaterToAirHPVSEquationFit)
CycRatio = Par(4)
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 CalcVarSpeedCoilCooling(CoilIndex,FanOpMode,RuntimeFrac,&
ReqOutput,dummy,CompOp,CycRatio,OnOffAirFlowRatio, SpeedRatio, SpeedNum)
OutletAirHumRat = Node(UnitarySystem(UnitarySysNum)%CoolCoilOutletNodeNum)%HumRat
CASE DEFAULT
END SELECT
Residuum = Par(2) - OutletAirHumRat
RETURN
END FUNCTION DXCoilVarSpeedHumRatResidual