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 ReportAndTestGlycols
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN March 2008
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is written to report and test glycols through their range
! of temperatures and make sure that proper values will be returned.
! METHODOLOGY EMPLOYED:
! Use internal structure as the temperature limits. Write output to the
! debug output file.
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: fmta="(A)"
REAL(r64), PARAMETER :: incr=10.0d0
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: GlycolNum ! Loop Counter
REAL(r64) :: Temperature ! Temperature to drive values
REAL(r64) :: ReturnValue ! Values returned from glycol functions
INTEGER :: Loop ! Loop Counter
INTEGER :: GlycolIndex ! index used in routine / function calls, value is returned on first use (when index=0)
GetInput = .FALSE. ! input has already been gotten
DO GlycolNum=1,NumOfGlycols
GlycolIndex=0 ! used in routine calls -- value is returned when first 0
! Lay out the basic values:
IF (GlycolData(GlycolNum)%GlycolName /= ' ') THEN
write(OutputFileDebug,fmta) 'Glycol='//TRIM(GlycolData(GlycolNum)%Name)// &
', Mixture fluid='//TRIM(GlycolData(GlycolNum)%GlycolName)
ELSE
write(OutputFileDebug,fmta) 'Glycol='//TRIM(GlycolData(GlycolNum)%Name)
ENDIF
write(OutputFileDebug,fmta) 'Concentration:,'//TRIM(RoundSigDigits(GlycolData(GlycolNum)%Concentration,2))
IF (GlycolData(GlyColNum)%CPDataPresent) THEN
write(OutputFileDebug,fmta) 'Specific Heat Data points:,Low Temperature=,'// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%CpLowTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%CpLowTempIndex))// &
',High Temperature=,'//TRIM(RoundSigDigits(GlycolData(GlycolNum)%CpHighTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%CpHighTempIndex))
write(OutputFileDebug,fmta,advance='No') 'Temperatures:'
do Loop=1,GlycolData(GlycolNum)%NumCpTempPts-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%CpTemps(Loop),2))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%CpTemps(GlycolData(GlycolNum)%NumCpTempPts),2))
write(OutputFileDebug,fmta,advance='No') 'Specific Heat:'
do Loop=1,GlycolData(GlycolNum)%NumCpTempPts-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%CpValues(Loop),2))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%CpValues(GlycolData(GlycolNum)%NumCpTempPts),2))
ENDIF
IF (GlycolData(GlyColNum)%RhoDataPresent) THEN
write(OutputFileDebug,fmta) 'Density Data points:,Low Temperature=,'// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%RhoLowTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%RhoLowTempIndex))// &
',High Temperature=,'//TRIM(RoundSigDigits(GlycolData(GlycolNum)%RhoHighTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%RhoHighTempIndex))
write(OutputFileDebug,fmta,advance='No') 'Temperatures:'
do Loop=1,GlycolData(GlycolNum)%NumRhoTempPts-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%RhoTemps(Loop),2))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%RhoTemps(GlycolData(GlycolNum)%NumRhoTempPts),2))
write(OutputFileDebug,fmta,advance='No') 'Density:'
do Loop=1,GlycolData(GlycolNum)%NumRhoTempPts-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%RhoValues(Loop),2))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%RhoValues(GlycolData(GlycolNum)%NumRhoTempPts),2))
ENDIF
IF (GlycolData(GlyColNum)%CondDataPresent) THEN
write(OutputFileDebug,fmta) 'Conductivity Data points:,Low Temperature=,'// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%CondLowTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%CondLowTempIndex))// &
',High Temperature=,'//TRIM(RoundSigDigits(GlycolData(GlycolNum)%CondHighTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%CondHighTempIndex))
write(OutputFileDebug,fmta,advance='No') 'Temperatures:'
do Loop=1,GlycolData(GlycolNum)%NumCondTempPts-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%CondTemps(Loop),2))
enddo
write(OutputFileDebug,fmta) ','// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%CondTemps(GlycolData(GlycolNum)%NumCondTempPts),2))
write(OutputFileDebug,fmta,advance='No') 'Conductivity:'
do Loop=1,GlycolData(GlycolNum)%NumCondTempPts-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%CondValues(Loop),2))
enddo
write(OutputFileDebug,fmta) ','// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%CondValues(GlycolData(GlycolNum)%NumCondTempPts),2))
ENDIF
IF (GlycolData(GlyColNum)%ViscDataPresent) THEN
write(OutputFileDebug,fmta) 'Viscosity Data points:,Low Temperature=,'// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%ViscLowTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%ViscLowTempIndex))// &
',High Temperature=,'//TRIM(RoundSigDigits(GlycolData(GlycolNum)%ViscHighTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%ViscHighTempIndex))
write(OutputFileDebug,fmta,advance='No') 'Temperatures:'
do Loop=1,GlycolData(GlycolNum)%NumViscTempPts-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%ViscTemps(Loop),2))
enddo
write(OutputFileDebug,fmta) ','// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%ViscTemps(GlycolData(GlycolNum)%NumViscTempPts),2))
write(OutputFileDebug,fmta,advance='No') 'Viscosity:'
do Loop=1,GlycolData(GlycolNum)%NumViscTempPts-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%ViscValues(Loop),2))
enddo
write(OutputFileDebug,fmta) ','// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%ViscValues(GlycolData(GlycolNum)%NumViscTempPts),2))
ENDIF
! ============================================
! Glycol Results, using out of bounds to out of bounds values in calling
! ============================================
! ========= Specific Heat from Temperatures
write(OutputFileDebug,fmta) 'Glycol='//TRIM(GlycolData(GlycolNum)%Name)//' **** Results ****'
IF (GlycolData(GlyColNum)%CPDataPresent) THEN
write(OutputFileDebug,fmta,advance='No') 'Specific Heat Results at Temperatures:'
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%CpTemps(1)-incr,2))
do Loop=1,GlycolData(GlycolNum)%NumCpTempPts-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%CpTemps(Loop),2))
Temperature=GlycolData(GlycolNum)%CpTemps(Loop) + &
(GlycolData(GlycolNum)%CpTemps(Loop+1)-GlycolData(GlycolNum)%CpTemps(Loop))/2.0d0
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(Temperature,2))
enddo
write(OutputFileDebug,fmta,advance='No') ','// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%CpTemps(GlycolData(GlycolNum)%NumCpTempPts),2))
write(OutputFileDebug,fmta) ','// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%CpTemps(GlycolData(GlycolNum)%NumCpTempPts)+incr,2))
write(OutputFileDebug,fmta,advance='No') 'Specific Heat:'
Temperature=GlycolData(GlycolNum)%CpTemps(1)-incr
ReturnValue=GetSpecificHeatGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
do Loop=1,GlycolData(GlycolNum)%NumCpTempPts-1
Temperature=GlycolData(GlycolNum)%CpTemps(Loop)
ReturnValue=GetSpecificHeatGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
Temperature=GlycolData(GlycolNum)%CpTemps(Loop) + &
(GlycolData(GlycolNum)%CpTemps(Loop+1)-GlycolData(GlycolNum)%CpTemps(Loop))/2.0d0
ReturnValue=GetSpecificHeatGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
enddo
Temperature=GlycolData(GlycolNum)%CpTemps(GlycolData(GlycolNum)%NumCpTempPts)
ReturnValue=GetSpecificHeatGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
Temperature=GlycolData(GlycolNum)%CpTemps(GlycolData(GlycolNum)%NumCpTempPts)+incr
ReturnValue=GetSpecificHeatGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(ReturnValue,2))
ENDIF
! ========= Density from Temperatures
IF (GlycolData(GlyColNum)%RhoDataPresent) THEN
write(OutputFileDebug,fmta,advance='No') 'Density Results at Temperatures:'
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%RhoTemps(1)-incr,2))
do Loop=1,GlycolData(GlycolNum)%NumRhoTempPts-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%RhoTemps(Loop),2))
Temperature=GlycolData(GlycolNum)%RhoTemps(Loop) + &
(GlycolData(GlycolNum)%RhoTemps(Loop+1)-GlycolData(GlycolNum)%RhoTemps(Loop))/2.0d0
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(Temperature,2))
enddo
write(OutputFileDebug,fmta,advance='No') ','// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%RhoTemps(GlycolData(GlycolNum)%NumRhoTempPts),2))
write(OutputFileDebug,fmta) ','// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%RhoTemps(GlycolData(GlycolNum)%NumRhoTempPts)+incr,2))
write(OutputFileDebug,fmta,advance='No') 'Density:'
Temperature=GlycolData(GlycolNum)%RhoTemps(1)-incr
ReturnValue=GetDensityGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,3))
do Loop=1,GlycolData(GlycolNum)%NumRhoTempPts-1
Temperature=GlycolData(GlycolNum)%RhoTemps(Loop)
ReturnValue=GetDensityGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,3))
Temperature=GlycolData(GlycolNum)%RhoTemps(Loop) + &
(GlycolData(GlycolNum)%RhoTemps(Loop+1)-GlycolData(GlycolNum)%RhoTemps(Loop))/2.0d0
ReturnValue=GetDensityGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,3))
enddo
Temperature=GlycolData(GlycolNum)%RhoTemps(GlycolData(GlycolNum)%NumRhoTempPts)
ReturnValue=GetDensityGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,3))
Temperature=GlycolData(GlycolNum)%RhoTemps(GlycolData(GlycolNum)%NumRhoTempPts)+incr
ReturnValue=GetDensityGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(ReturnValue,3))
ENDIF
! ========= Conductivity from Temperatures
IF (GlycolData(GlyColNum)%CondDataPresent) THEN
write(OutputFileDebug,fmta,advance='No') 'Conductivity Results at Temperatures:'
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%CondTemps(1)-incr,2))
do Loop=1,GlycolData(GlycolNum)%NumCondTempPts-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%CondTemps(Loop),2))
Temperature=GlycolData(GlycolNum)%CondTemps(Loop) + &
(GlycolData(GlycolNum)%CondTemps(Loop+1)-GlycolData(GlycolNum)%CondTemps(Loop))/2.0d0
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(Temperature,2))
enddo
write(OutputFileDebug,fmta,advance='No') ','// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%CondTemps(GlycolData(GlycolNum)%NumCondTempPts),2))
write(OutputFileDebug,fmta) ','// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%CondTemps(GlycolData(GlycolNum)%NumCondTempPts)+incr,2))
write(OutputFileDebug,fmta,advance='No') 'Conductivity:'
Temperature=GlycolData(GlycolNum)%CondTemps(1)-incr
ReturnValue=GetConductivityGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,3))
do Loop=1,GlycolData(GlycolNum)%NumCondTempPts-1
Temperature=GlycolData(GlycolNum)%CondTemps(Loop)
ReturnValue=GetConductivityGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,3))
Temperature=GlycolData(GlycolNum)%CondTemps(Loop) + &
(GlycolData(GlycolNum)%CondTemps(Loop+1)-GlycolData(GlycolNum)%CondTemps(Loop))/2.0d0
ReturnValue=GetConductivityGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,3))
enddo
Temperature=GlycolData(GlycolNum)%CondTemps(GlycolData(GlycolNum)%NumCondTempPts)
ReturnValue=GetConductivityGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,3))
Temperature=GlycolData(GlycolNum)%CondTemps(GlycolData(GlycolNum)%NumCondTempPts)+incr
ReturnValue=GetConductivityGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(ReturnValue,3))
ENDIF
! ========= Viscosity from Temperatures
IF (GlycolData(GlyColNum)%ViscDataPresent) THEN
write(OutputFileDebug,fmta,advance='No') 'Viscosity Results at Temperatures:'
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%ViscTemps(1)-incr,2))
do Loop=1,GlycolData(GlycolNum)%NumViscTempPts-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(GlycolData(GlycolNum)%ViscTemps(Loop),2))
Temperature=GlycolData(GlycolNum)%ViscTemps(Loop) + &
(GlycolData(GlycolNum)%ViscTemps(Loop+1)-GlycolData(GlycolNum)%ViscTemps(Loop))/2.0d0
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(Temperature,2))
enddo
write(OutputFileDebug,fmta,advance='No') ','// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%ViscTemps(GlycolData(GlycolNum)%NumViscTempPts),2))
write(OutputFileDebug,fmta) ','// &
TRIM(RoundSigDigits(GlycolData(GlycolNum)%ViscTemps(GlycolData(GlycolNum)%NumViscTempPts)+incr,2))
write(OutputFileDebug,fmta,advance='No') 'Viscosity:'
Temperature=GlycolData(GlycolNum)%ViscTemps(1)-incr
ReturnValue=GetViscosityGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,4))
do Loop=1,GlycolData(GlycolNum)%NumViscTempPts-1
Temperature=GlycolData(GlycolNum)%ViscTemps(Loop)
ReturnValue=GetViscosityGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,4))
Temperature=GlycolData(GlycolNum)%ViscTemps(Loop) + &
(GlycolData(GlycolNum)%ViscTemps(Loop+1)-GlycolData(GlycolNum)%ViscTemps(Loop))/2.0d0
ReturnValue=GetViscosityGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,4))
enddo
Temperature=GlycolData(GlycolNum)%ViscTemps(GlycolData(GlycolNum)%NumViscTempPts)
ReturnValue=GetViscosityGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,4))
Temperature=GlycolData(GlycolNum)%ViscTemps(GlycolData(GlycolNum)%NumViscTempPts)+incr
ReturnValue=GetViscosityGlycol(GlycolData(GlycolNum)%Name,Temperature,GlycolIndex,'ReportAndTestGlycols')
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(ReturnValue,4))
ENDIF
ENDDO
RETURN
END SUBROUTINE ReportAndTestGlycols