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) | :: | PartLoadRatio | |||
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 VSCoilCyclingHumResidual(PartLoadRatio, Par) RESULT (Residuum)
! FUNCTION INFORMATION:
! AUTHOR Bo Shen
! DATE WRITTEN Feb, 2013
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Calculates residual function (Humidity) by comparing with the output of variable-speed DX coil
! interate part-load ratio
! REFERENCES:
! USE STATEMENTS:
! na
USE VariableSpeedCoils, ONLY: SimVariableSpeedCoils, VarSpeedCoil
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: PartLoadRatio ! 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(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 :: CoilIndex ! index of this coil
REAL(r64) :: OutletAirHumRat ! outlet air humidity ratio [kg/kg]
INTEGER :: FanOpMode ! Supply air fan operating mode
INTEGER :: SpeedNum = 1 !speed number of variable speed DX cooling coil
REAL(r64) :: QZnReq = 0.001d0 ! Zone load (W), input to variable-speed DX coil
REAL(r64) :: QLatReq = 0.0d0 ! Zone latent load, input to variable-speed DX coil
REAL(r64) :: MaxONOFFCyclesperHour = 4.0d0 ! Maximum cycling rate of heat pump [cycles/hr]
REAL(r64) :: HPTimeConstant = 0.0d0 ! Heat pump time constant [s]
REAL(r64) :: FanDelayTime = 0.0d0 ! Fan delay time, time delay for the HP's fan to
REAL(r64) :: OnOffAirFlowRatio = 1.0d0 ! ratio of compressor on flow to average flow over time step
REAL(r64) :: SpeedRatio = 0.0d0 ! SpeedRatio varies between 1.0 (higher speed) and 0.0 (lower speed)
CoilIndex = INT(Par(1))
FanOpMode = INT(Par(5))
Call SimVariableSpeedCoils(' ', CoilIndex,&
FanOpMode,MaxONOFFCyclesperHour, &
HPTimeConstant,FanDelayTime,&
On, PartLoadRatio, OnOffAirFlowRatio,SpeedNum, SpeedRatio, QZnReq, QLatReq)
OutletAirHumRat = VarSpeedCoil(CoilIndex)%OutletAirHumRat
Residuum = Par(2) - OutletAirHumRat
RETURN
END FUNCTION VSCoilCyclingHumResidual