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 TESCoilResidual(PartLoadRatio, Par) RESULT (Residuum)
! FUNCTION INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN April 2013
! MODIFIED
! RE-ENGINEERED
! PURPOSE OF THIS FUNCTION:
! Calculates residual function (desired outlet temp - actual outlet temp)
! TES Coil output depends on the part load ratio which is being varied to zero the residual.
! METHODOLOGY EMPLOYED:
! Calls appropriate calculation routine depending on operating mode
! to get outlet temperature at the given cycling ratio
! and calculates the residual as defined above
! REFERENCES:
! USE STATEMENTS:
USE PackagedThermalStorageCoil, ONLY: CalcTESCoilCoolingOnlyMode, CalcTESCoilCoolingAndChargeMode, &
CalcTESCoilCoolingAndDischargeMode, CalcTESCoilDischargeOnlyMode
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(3) = TES coil operating mode
! par(4) = outlet node number
! 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) :: OutletAirTemp ! outlet air temperature [C]
INTEGER :: FanOpMode ! Supply air fan operating mode
INTEGER :: TESOpMode
INTEGER :: OutletNodeNum
CoilIndex = INT(Par(1))
FanOpMode = INT(Par(5))
OutletNodeNum = INT(Par(4))
TESOpMode = INT(Par(3))
SELECT CASE (TESOpMode)
CASE (CoolingOnlyMode)
CALL CalcTESCoilCoolingOnlyMode(CoilIndex, FanOpMode, PartLoadRatio)
CASE (CoolingAndChargeMode)
CALL CalcTESCoilCoolingAndChargeMode(CoilIndex, FanOpMode, PartLoadRatio)
CASE (CoolingAndDischargeMode)
CALL CalcTESCoilCoolingAndDischargeMode(CoilIndex, FanOpMode, PartLoadRatio)
CASE (DischargeOnlyMode)
CALL CalcTESCoilDischargeOnlyMode(CoilIndex, PartLoadRatio)
END SELECT
OutletAirTemp = Node(OutletNodeNum)%Temp
Residuum = Par(2) - OutletAirTemp
RETURN
END FUNCTION TESCoilResidual