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 InitializeGlycolTempLimits(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 temperature limits for the glycol 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 :: GlycolNum
INTEGER :: IndexNum
LOGICAL :: Failure
DO GlycolNum=1,NumOfGlycols
IF (GlycolData(GlyColNum)%CPDataPresent) THEN
! check for lowest non-zero value by referencing temp data
DO IndexNum = 1, GlycolData(GlycolNum)%NumCpTempPts
IF (GlycolData(GlycolNum)%CpValues(IndexNum) <= 0.0d0) CYCLE
GlycolData(GlycolNum)%CpLowTempIndex = IndexNum
GlycolData(GlycolNum)%CpLowTempValue = GlycolData(GlycolNum)%CpTemps(IndexNum)
EXIT
ENDDO
! check for highest non-zero value by referencing temp data
DO IndexNum = GlycolData(GlycolNum)%NumCpTempPts, 1, -1
IF (GlycolData(GlycolNum)%CpValues(IndexNum) <= 0.0d0) CYCLE
GlycolData(GlycolNum)%CpHighTempIndex = IndexNum
GlycolData(GlycolNum)%CpHighTempValue = GlycolData(GlycolNum)%CpTemps(IndexNum)
EXIT
ENDDO
ENDIF
IF (GlycolData(GlyColNum)%RhoDataPresent) THEN
! check for lowest non-zero value by referencing temp data
DO IndexNum = 1, GlycolData(GlycolNum)%NumRhoTempPts
IF (GlycolData(GlycolNum)%RhoValues(IndexNum) <= 0.0d0) CYCLE
GlycolData(GlycolNum)%RhoLowTempIndex = IndexNum
GlycolData(GlycolNum)%RhoLowTempValue = GlycolData(GlycolNum)%RhoTemps(IndexNum)
EXIT
ENDDO
! check for highest non-zero value by referencing temp data
DO IndexNum = GlycolData(GlycolNum)%NumRhoTempPts, 1, -1
IF (GlycolData(GlycolNum)%RhoValues(IndexNum) <= 0.0d0) CYCLE
GlycolData(GlycolNum)%RhoHighTempIndex = IndexNum
GlycolData(GlycolNum)%RhoHighTempValue = GlycolData(GlycolNum)%RhoTemps(IndexNum)
EXIT
ENDDO
ENDIF
IF (GlycolData(GlyColNum)%CondDataPresent) THEN
! check for lowest non-zero value by referencing temp data
DO IndexNum = 1, GlycolData(GlycolNum)%NumCondTempPts
IF (GlycolData(GlycolNum)%CondValues(IndexNum) <= 0.0d0) CYCLE
GlycolData(GlycolNum)%CondLowTempIndex = IndexNum
GlycolData(GlycolNum)%CondLowTempValue = GlycolData(GlycolNum)%CondTemps(IndexNum)
EXIT
ENDDO
! check for highest non-zero value by referencing temp data
DO IndexNum = GlycolData(GlycolNum)%NumCondTempPts, 1, -1
IF (GlycolData(GlycolNum)%CondValues(IndexNum) <= 0.0d0) CYCLE
GlycolData(GlycolNum)%CondHighTempIndex = IndexNum
GlycolData(GlycolNum)%CondHighTempValue = GlycolData(GlycolNum)%CondTemps(IndexNum)
EXIT
ENDDO
ENDIF
IF (GlycolData(GlyColNum)%ViscDataPresent) THEN
! check for lowest non-zero value by referencing temp data
DO IndexNum = 1, GlycolData(GlycolNum)%NumViscTempPts
IF (GlycolData(GlycolNum)%ViscValues(IndexNum) <= 0.0d0) CYCLE
GlycolData(GlycolNum)%ViscLowTempIndex = IndexNum
GlycolData(GlycolNum)%ViscLowTempValue = GlycolData(GlycolNum)%ViscTemps(IndexNum)
EXIT
ENDDO
! check for highest non-zero value by referencing temp data
DO IndexNum = GlycolData(GlycolNum)%NumViscTempPts, 1, -1
IF (GlycolData(GlycolNum)%ViscValues(IndexNum) <= 0.0d0) CYCLE
GlycolData(GlycolNum)%ViscHighTempIndex = IndexNum
GlycolData(GlycolNum)%ViscHighTempValue = GlycolData(GlycolNum)%ViscTemps(IndexNum)
EXIT
ENDDO
ENDIF
Failure=.false.
! Check to see that all are set to non-zero
IF (GlycolData(GlyColNum)%CpDataPresent) THEN
IF (GlycolData(GlycolNum)%CpLowTempIndex == 0) Failure=.true.
IF (GlycolData(GlycolNum)%CpHighTempIndex == 0) Failure=.true.
ENDIF
IF (GlycolData(GlyColNum)%RhoDataPresent) THEN
IF (GlycolData(GlycolNum)%RhoLowTempIndex == 0) Failure=.true.
IF (GlycolData(GlycolNum)%RhoHighTempIndex == 0) Failure=.true.
ENDIF
IF (GlycolData(GlyColNum)%CondDataPresent) THEN
IF (GlycolData(GlycolNum)%CondLowTempIndex == 0) Failure=.true.
IF (GlycolData(GlycolNum)%CondHighTempIndex == 0) Failure=.true.
ENDIF
IF (GlycolData(GlyColNum)%ViscDataPresent) THEN
IF (GlycolData(GlycolNum)%ViscLowTempIndex == 0) Failure=.true.
IF (GlycolData(GlycolNum)%ViscHighTempIndex == 0) Failure=.true.
ENDIF
IF (Failure) THEN
CALL ShowSevereError('InitializeGlycolTempLimits: Required values for Glycol='//TRIM(GlycolData(GlycolNum)%Name)// &
' are all zeroes for some data types.')
ErrorsFound=.true.
ENDIF
ENDDO
RETURN
END SUBROUTINE InitializeGlycolTempLimits