Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | IceNum | ||||
real(kind=r64), | intent(in) | :: | ChillerOutletTemp | |||
real(kind=r64), | intent(out) | :: | QiceMaxByITS |
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.
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.
SUBROUTINE CalcQiceChargeMaxByITS(IceNum,ChillerOutletTemp,QiceMaxByITS)
! SUBROUTINE INFORMATION:
! PURPOSE OF THIS SUBROUTINE:
! METHODOLOGY EMPLOYED:
! REFERENCES:
! USE STATEMENTS:
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER :: IceNum
REAL(r64), INTENT(IN) :: ChillerOutletTemp ![degC]
REAL(r64), INTENT(OUT) :: QiceMaxByITS ![W]
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: Tfr
REAL(r64) :: ChillerInletTemp
REAL(r64) :: ChOutletTemp
REAL(r64) :: LogTerm
! FLOW
! Qice is maximized when ChillerInletTemp and ChillerOutletTemp(input data) is almost same due to LMTD method.
! Qice is minimized(=0) when ChillerInletTemp is almost same as FreezTemp(=0).
! Initilize
Tfr = FreezTempIP
ChOutletTemp = TempSItoIP(ChillerOutletTemp) ![degF] = ConvertSItoIP[degC]
! Chiller outlet temp must be below freeze temp, or else no charge
IF (ChOutletTemp .GE. Tfr) THEN
ChillerInletTemp = ChOutletTemp
QiceMaxByITS = 0.0d0
ELSE
! Make ChillerInletTemp as almost same as ChillerOutletTemp(input data)
ChillerInletTemp = ChOutletTemp + 0.01
! ChillerInletTemp cannot be greater than or equal to freeze temp
IF (ChillerInletTemp .GE. Tfr) THEN
ChillerInletTemp = ChOutletTemp + (Tfr - ChOutletTemp)/2
ENDIF
LogTerm = (Tfr - ChOutletTemp) / (Tfr - ChillerInletTemp)
! Need to protect this from LogTerm <= 0 - not sure what it should do then
IF (LogTerm <= 0.0d0) THEN
ChillerInletTemp = ChOutletTemp
QiceMaxByITS = 0.0d0
ENDIF
QiceMaxByITS = UAiceCh * ( TempIPtoSI(ChillerInletTemp) - TempIPtoSI(ChOutletTemp) ) / LOG(LogTerm)
ENDIF
RETURN
END SUBROUTINE CalcQiceChargeMaxByITS