Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | PartLoadFrac | |||
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 MSHPCyclingResidual(PartLoadFrac,Par)
! FUNCTION INFORMATION:
! AUTHOR Lixing Gu
! DATE WRITTEN June 2007
! MODIFIED na
! RE-ENGINEERED Revised for multispeed heat pump use based on DXCoilCyclingResidual
! PURPOSE OF THIS FUNCTION:
! Calculates residual function ((ActualOutput - QZnReq)/QZnReq)
! MSHP output depends on the part load ratio which is being varied to zero the residual.
! METHODOLOGY EMPLOYED:
! Calls CalcMSHeatPump to get ActualOutput at the given part load ratio
! and calculates the residual as defined above
! REFERENCES:
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: PartLoadFrac ! compressor cycling ratio (1.0 is continuous, 0.0 is off)
REAL(r64), INTENT(IN), DIMENSION(:), OPTIONAL :: Par ! par(1) = MSHPNum
! par(2) = Zone Num
! par(3) = FirstHVACIteration
! par(4) = OpMode
! par(5) = QZnReq
! par(6) = OnOffAirFlowRatio
! par(7) = SupHeaterLoad
! par(9) = CompOp
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER :: MSHeatPumpNum ! MSHP index
INTEGER :: ZoneNum ! Zone index
LOGICAL :: FirstHVACIteration ! FirstHVACIteration flag
INTEGER :: OpMode ! Compressor operating mode
REAL(r64) :: QZnReq ! zone load (W)
REAL(r64) :: OnOffAirFlowRatio ! ratio of compressor ON airflow to average airflow over timestep
REAL(r64) :: ActualOutput ! delivered capacity of MSHP
REAL(r64) :: SupHeaterLoad ! Supplemental heater load
INTEGER :: CompOp ! compressor operation; 1=on, 0=off
MSHeatPumpNum = INT(Par(1))
ZoneNum = INT(Par(2))
! FirstHVACIteration is a logical, Par is REAL(r64), so make 1.0=TRUE and 0.0=FALSE
IF(Par(3) .EQ. 1.0d0)THEN
FirstHVACIteration = .TRUE.
ELSE
FirstHVACIteration = .FALSE.
END IF
OpMode = INT(Par(4))
QZnReq = Par(5)
OnOffAirFlowRatio = Par(6)
SupHeaterLoad = Par(7)
CompOp = INT(Par(9))
CALL CalcMSHeatPump(MSHeatPumpNum,FirstHVACIteration,CompOp,1,0.0d0,PartLoadFrac, &
ActualOutput,QZnReq,OnOffAirFlowRatio,SupHeaterLoad)
MSHPCyclingResidual = (ActualOutput - QZnReq)/QZnReq
RETURN
END FUNCTION MSHPCyclingResidual