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.
REAL(r64) FUNCTION PLRResidual(PartLoadRatio,Par)
! FUNCTION INFORMATION:
! AUTHOR Richard Raustad, FSEC
! DATE WRITTEN August 2010
! MODIFIED
! RE-ENGINEERED
! PURPOSE OF THIS FUNCTION:
! Calculates residual function ((ActualOutput - QZnReq)/QZnReq)
! VRF TU output depends on the part load ratio which is being varied to zero the residual.
! METHODOLOGY EMPLOYED:
! Calls CalcVRF to get ActualOutput at the given part load ratio
! and calculates the residual as defined above
! REFERENCES:
! na
! USE STATEMENTS:
! na
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) = VRFTUNum
! par(2) = Not used
! par(3) = FirstHVACIteration
! par(4) = OpMode
! par(5) = QZnReq
! par(6) = OnOffAirFlowRatio
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER :: VRFTUNum ! TU index
LOGICAL :: FirstHVACIteration ! FirstHVACIteration flag
INTEGER :: OpMode ! Compressor operating mode
REAL(r64) :: QZnReq ! zone load (W)
REAL(r64) :: QZnReqTemp ! denominator representing zone load (W)
REAL(r64) :: OnOffAirFlowRatio ! ratio of compressor ON airflow to average airflow over timestep
REAL(r64) :: ActualOutput ! delivered capacity of VRF terminal unit
VRFTUNum = INT(Par(1))
! FirstHVACIteration is a logical, Par is real, so make 1.0=TRUE and 0.0=FALSE
IF(Par(3) .EQ. 1.d0)THEN
FirstHVACIteration = .TRUE.
ELSE
FirstHVACIteration = .FALSE.
END IF
OpMode = INT(Par(4))
QZnReq = Par(5)
QZnReqTemp = QZnReq
IF(ABS(QZnReq) .LT. 100.d0)QZnReqTemp=SIGN(100.d0,QZnReq)
OnOffAirFlowRatio = Par(6)
CALL CalcVRF(VRFTUNum,FirstHVACIteration,PartLoadRatio,ActualOutput,OnOffAirFlowRatio)
PLRResidual = (ActualOutput - QZnReq)/QZnReqTemp
RETURN
END FUNCTION PLRResidual