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) | :: | CondenserOutletTemp | |||
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 ReformEIRChillerCondInletTempResidual(CondenserOutletTemp, Par) RESULT (Residuum)
! FUNCTION INFORMATION:
! AUTHOR Chandan Sharma
! DATE WRITTEN February 2012
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Calculates residual function as described below
! Residuum = (CondenserInletTempAtAHRIConditions - CondenserInletTemp) / CondenserInletTempAtAHRIConditions.
! CondenserInletTemp here depends on the CondenserOutletTemp which is being varied to zero the residual.
! METHODOLOGY EMPLOYED:
! Varies CondenserOutletTemp until a balance point exists where the model output corresponds to the desired
! independent variable (i.e. CondenserInletTemp is within tolerance of CondenserInletTempAtAHRIConditions)
! REFERENCES:
! USE STATEMENTS:
USE DataBranchAirLoopPlant, ONLY: MassFlowTolerance
USE CurveManager, ONLY: CurveValue
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: CondenserOutletTemp ! Condenser outlet temperature (boundary condition or guess value) [C]
REAL(r64), INTENT(IN), DIMENSION(:), OPTIONAL :: Par ! par(1) = Condenser inlet temperature at AHRI Standard
! 551/591 conditons[C]
! par(2) = Evaporator outlet temperature [C]
! par(3) = Water specific heat [J/(kg*C)]
! par(4) = Part load ratio
! par(5) = Evaporator mass flow rate [kg/s]
! par(6) = Index for the total cooling capacity modifier curve
! par(7) = Index for the energy input ratio modifier curve
! par(8) = Index for the EIR vs part-load ratio curve
! par(9) = Reference capacity of chiller [W]
! par(10) = Reference coefficient of performance [W/W]
! par(11) = Open chiller motor efficiency [fraction, 0 to 1]
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:
REAL(r64) :: AvailChillerCap = 0.0D0 ! Chiller available capacity at current operating conditions [W]
REAL(r64) :: CondenserInletTemp = 0.0D0 ! Calculated condenser inlet temperature [C]
REAL(r64) :: EvapOutletTemp = 0.0D0 ! Evaporator outlet temperature temperature [C]
REAL(r64) :: QEvap = 0.0D0 ! Rate of heat transfer to the evaporator coil [W]
REAL(r64) :: QCond = 0.0D0 ! Rate of heat transfer to the condenser coil [W]
REAL(r64) :: Power = 0.0D0 ! Power at reduced capacity test conditions (100%, 75%, 50%, and 25%)
REAL(r64) :: ReformEIRChillerCapFT = 0.0D0 ! Chiller capacity fraction (evaluated as a function of temperature)
REAL(r64) :: ReformEIRChillerEIRFT = 0.0D0 ! Chiller electric input ratio (EIR = 1 / COP) as a function of temperature
REAL(r64) :: ReformEIRChillerEIRFPLR = 0.0D0 ! Chiller EIR as a function of part-load ratio (PLR)
EvapOutletTemp = Par(2)
ReformEIRChillerCapFT = CurveValue(INT(Par(6)), EvapOutletTemp,CondenserOutletTemp)
ReformEIRChillerEIRFT = CurveValue(INT(Par(7)),EvapOutletTemp, CondenserOutletTemp)
! Available chiller capacity as a function of temperature
AvailChillerCap = Par(9) * ReformEIRChillerCapFT
ReformEIRChillerEIRFPLR = CurveValue(INT(Par(8)),CondenserOutletTemp,Par(4))
Power = (AvailChillerCap / Par(10)) * ReformEIRChillerEIRFPLR * ReformEIRChillerEIRFT
QEvap = AvailChillerCap * Par(4)
QCond = Power*Par(11) + QEvap
IF (Par(6) .GT. MassFlowTolerance) THEN
CondenserInletTemp = CondenserOutletTemp - QCond/Par(5)/Par(3)
ENDIF
Residuum = (Par(1) - CondenserInletTemp) / Par(1)
RETURN
END FUNCTION ReformEIRChillerCondInletTempResidual