Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | FalsiCondOutTemp | |||
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 CondOutTempResidual(FalsiCondOutTemp, Par)
! FUNCTION INFORMATION:
! AUTHOR Richard Raustad
! DATE WRITTEN May 2006
! MODIFIED L.Gu, May 2006
! RE-ENGINEERED
! PURPOSE OF THIS FUNCTION:
! Calculates residual function (desired condenser outlet temperature)
! Reformulated EIR chiller requires condenser outlet temperature to calculate capacity and power.
! METHODOLOGY EMPLOYED:
! Regula Falsi solver is used to calculate condenser outlet temperature.
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: FalsiCondOutTemp ! RegulaFalsi condenser outlet temperature result [C]
REAL(r64), INTENT(IN), DIMENSION(:), OPTIONAL :: Par ! Parameter array used to interface with RegulaFalsi solver
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER :: EIRChillNum ! Chiller number
REAL(r64) :: MyLoad ! Operating load [W]
LOGICAL :: FirstIteration ! TRUE when first iteration of timestep
LOGICAL :: RunFlag ! TRUE when chiller operating
INTEGER :: EquipFlowCtrl ! Flow control mode for the equipment
! FalsiCondOutTemp = Value used by RegulaFalsi during iteration (used to evaluate CAPFT, EIRFT, and EIRFPLR curves)
!
! CondOutletTemp = Value calculated by CalcReformEIRChillerModel subroutine as shown below
! CondOutletTemp = QCondenser/CondMassFlowRate/CPCW(CondInletTemp) + CondInletTemp
EIRChillNum = INT(Par(1))
MyLoad = Par(2)
IF (INT(Par(3)) == 1) THEN
Runflag = .True.
ELSE
Runflag = .False.
END IF
IF (INT(Par(4)) == 1) THEN
FirstIteration = .True.
ELSE
FirstIteration = .False.
END IF
!FlowLock = INT(Par(5)) !DSU
EquipFlowCtrl = INT(Par(6))
CALL CalcReformEIRChillerModel(EIRChillNum,MyLoad,Runflag,FirstIteration,EquipFlowCtrl,FalsiCondOutTemp)
CondOutTempResidual = FalsiCondOutTemp - CondOutletTemp ! CondOutletTemp is module level variable, final value used for reporting
RETURN
END FUNCTION CondOutTempResidual