Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(inout) | :: | ErrorsFound |
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 InitializeRefrigerantLimits(ErrorsFound)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN March 2008
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This routine sets up the min/max limits (usually temperature and/or pressure)
! for the refrigerant properties.
! Most properties requested (e.g., Specific Heat) must be > 0 but the tables may
! be set up for symmetry and not be limited to just valid values.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
LOGICAL, INTENT(INOUT) :: ErrorsFound ! set to true if errors found here
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: RefrigNum
INTEGER :: IndexNum
LOGICAL :: Failure
DO RefrigNum=1,NumOfRefrigerants
DO IndexNum=1,RefrigData(RefrigNum)%NumPsPoints
IF (RefrigData(RefrigNum)%PsValues(IndexNum) <= 0.0d0) CYCLE
RefrigData(RefrigNum)%PsLowPresIndex=IndexNum
RefrigData(RefrigNum)%PsLowPresValue=RefrigData(RefrigNum)%PsValues(IndexNum)
RefrigData(RefrigNum)%PsLowTempValue=RefrigData(RefrigNum)%PsTemps(IndexNum)
RefrigData(RefrigNum)%PsLowTempIndex=IndexNum
EXIT
ENDDO
DO IndexNum=RefrigData(RefrigNum)%NumPsPoints,1,-1
IF (RefrigData(RefrigNum)%PsValues(IndexNum) <= 0.0d0) CYCLE
RefrigData(RefrigNum)%PsHighPresIndex=IndexNum
RefrigData(RefrigNum)%PsHighPresValue=RefrigData(RefrigNum)%PsValues(IndexNum)
RefrigData(RefrigNum)%PsHighTempValue=RefrigData(RefrigNum)%PsTemps(IndexNum)
RefrigData(RefrigNum)%PsHighTempIndex=IndexNum
EXIT
ENDDO
DO IndexNum=1,RefrigData(RefrigNum)%NumHPoints
IF (RefrigData(RefrigNum)%HfValues(IndexNum) <= 0.0d0) CYCLE
RefrigData(RefrigNum)%HfLowTempValue=RefrigData(RefrigNum)%HfValues(IndexNum)
RefrigData(RefrigNum)%HfLowTempIndex=IndexNum
EXIT
ENDDO
DO IndexNum=RefrigData(RefrigNum)%NumHPoints,1,-1
IF (RefrigData(RefrigNum)%HfValues(IndexNum) <= 0.0d0) CYCLE
RefrigData(RefrigNum)%HfHighTempValue=RefrigData(RefrigNum)%HfValues(IndexNum)
RefrigData(RefrigNum)%HfHighTempIndex=IndexNum
EXIT
ENDDO
DO IndexNum=1,RefrigData(RefrigNum)%NumHPoints
IF (RefrigData(RefrigNum)%HfgValues(IndexNum) <= 0.0d0) CYCLE
RefrigData(RefrigNum)%HfgLowTempValue=RefrigData(RefrigNum)%HfgValues(IndexNum)
RefrigData(RefrigNum)%HfgLowTempIndex=IndexNum
EXIT
ENDDO
DO IndexNum=RefrigData(RefrigNum)%NumHPoints,1,-1
IF (RefrigData(RefrigNum)%HfgValues(IndexNum) <= 0.0d0) CYCLE
RefrigData(RefrigNum)%HfgHighTempValue=RefrigData(RefrigNum)%HfgValues(IndexNum)
RefrigData(RefrigNum)%HfgHighTempIndex=IndexNum
EXIT
ENDDO
DO IndexNum=1,RefrigData(RefrigNum)%NumCpPoints
IF (RefrigData(RefrigNum)%CpfValues(IndexNum) <= 0.0d0) CYCLE
RefrigData(RefrigNum)%CpfLowTempValue=RefrigData(RefrigNum)%CpfValues(IndexNum)
RefrigData(RefrigNum)%CpfLowTempIndex=IndexNum
EXIT
ENDDO
DO IndexNum=RefrigData(RefrigNum)%NumCpPoints,1,-1
IF (RefrigData(RefrigNum)%CpfValues(IndexNum) <= 0.0d0) CYCLE
RefrigData(RefrigNum)%CpfHighTempValue=RefrigData(RefrigNum)%CpfValues(IndexNum)
RefrigData(RefrigNum)%CpfHighTempIndex=IndexNum
EXIT
ENDDO
DO IndexNum=1,RefrigData(RefrigNum)%NumCpPoints
IF (RefrigData(RefrigNum)%CpfgValues(IndexNum) <= 0.0d0) CYCLE
RefrigData(RefrigNum)%CpfgLowTempValue=RefrigData(RefrigNum)%CpfgValues(IndexNum)
RefrigData(RefrigNum)%CpfgLowTempIndex=IndexNum
EXIT
ENDDO
DO IndexNum=RefrigData(RefrigNum)%NumCpPoints,1,-1
IF (RefrigData(RefrigNum)%CpfgValues(IndexNum) <= 0.0d0) CYCLE
RefrigData(RefrigNum)%CpfgHighTempValue=RefrigData(RefrigNum)%CpfgValues(IndexNum)
RefrigData(RefrigNum)%CpfgHighTempIndex=IndexNum
EXIT
ENDDO
DO IndexNum=1,RefrigData(RefrigNum)%NumRhoPoints
IF (RefrigData(RefrigNum)%RhofValues(IndexNum) <= 0.0d0) CYCLE
RefrigData(RefrigNum)%RhofLowTempValue=RefrigData(RefrigNum)%RhofValues(IndexNum)
RefrigData(RefrigNum)%RhofLowTempIndex=IndexNum
EXIT
ENDDO
DO IndexNum=RefrigData(RefrigNum)%NumRhoPoints,1,-1
IF (RefrigData(RefrigNum)%RhofValues(IndexNum) <= 0.0d0) CYCLE
RefrigData(RefrigNum)%RhofHighTempValue=RefrigData(RefrigNum)%RhofValues(IndexNum)
RefrigData(RefrigNum)%RhofHighTempIndex=IndexNum
EXIT
ENDDO
DO IndexNum=1,RefrigData(RefrigNum)%NumRhoPoints
IF (RefrigData(RefrigNum)%RhofgValues(IndexNum) <= 0.0d0) CYCLE
RefrigData(RefrigNum)%RhofgLowTempValue=RefrigData(RefrigNum)%RhofgValues(IndexNum)
RefrigData(RefrigNum)%RhofgLowTempIndex=IndexNum
EXIT
ENDDO
DO IndexNum=RefrigData(RefrigNum)%NumRhoPoints,1,-1
IF (RefrigData(RefrigNum)%RhofgValues(IndexNum) <= 0.0d0) CYCLE
RefrigData(RefrigNum)%RhofgHighTempValue=RefrigData(RefrigNum)%RhofgValues(IndexNum)
RefrigData(RefrigNum)%RhofgHighTempIndex=IndexNum
EXIT
ENDDO
Failure=.false.
! Check to see that all are set to non-zero
IF (RefrigData(RefrigNum)%NumPsPoints > 0) THEN
IF (RefrigData(RefrigNum)%PsLowPresIndex == 0) Failure=.true.
IF (RefrigData(RefrigNum)%PsLowTempIndex == 0) Failure=.true.
IF (RefrigData(RefrigNum)%PsHighPresIndex == 0) Failure=.true.
IF (RefrigData(RefrigNum)%PsHighTempIndex == 0) Failure=.true.
ENDIF
IF (RefrigData(RefrigNum)%NumHPoints > 0) THEN
IF (RefrigData(RefrigNum)%HfLowTempIndex == 0) Failure=.true.
IF (RefrigData(RefrigNum)%HfgLowTempIndex == 0) Failure=.true.
IF (RefrigData(RefrigNum)%HfHighTempIndex == 0) Failure=.true.
IF (RefrigData(RefrigNum)%HfgHighTempIndex == 0) Failure=.true.
ENDIF
IF (RefrigData(RefrigNum)%NumCpPoints > 0) THEN
IF (RefrigData(RefrigNum)%CpfLowTempIndex == 0) Failure=.true.
IF (RefrigData(RefrigNum)%CpfgLowTempIndex == 0) Failure=.true.
IF (RefrigData(RefrigNum)%CpfHighTempIndex == 0) Failure=.true.
IF (RefrigData(RefrigNum)%CpfgHighTempIndex == 0) Failure=.true.
ENDIF
IF (RefrigData(RefrigNum)%NumRhoPoints > 0) THEN
IF (RefrigData(RefrigNum)%RhofLowTempIndex == 0) Failure=.true.
IF (RefrigData(RefrigNum)%RhofgLowTempIndex == 0) Failure=.true.
IF (RefrigData(RefrigNum)%RhofHighTempIndex == 0) Failure=.true.
IF (RefrigData(RefrigNum)%RhofgHighTempIndex == 0) Failure=.true.
ENDIF
IF (Failure) THEN
CALL ShowSevereError('InitializeRefrigerantLimits: Required values for Refrigerant='// &
TRIM(RefrigData(RefrigNum)%Name)// &
' are all zeroes for some data types.')
ErrorsFound=.true.
ENDIF
ENDDO
RETURN
END SUBROUTINE InitializeRefrigerantLimits