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 ReportAndTestRefrigerants
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN March 2008; only stub provided to satisfy calling programs.
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is written to report and test refrigerants through their range
! of inputs (temperatures?) and make sure that proper values will be returned.
! METHODOLOGY EMPLOYED:
! Use internal structure as the range 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
REAL(r64), PARAMETER :: Quality=1.0d0
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: RefrigNum ! Loop Counter
REAL(r64) :: Temperature ! Temperature to drive values
! REAL(r64) :: Pressure ! Pressure to drive values
REAL(r64) :: ReturnValue ! Values returned from refrigerant functions
INTEGER :: Loop ! Loop Counter
INTEGER :: Loop1 ! Loop Counter
INTEGER :: RefrigIndex !
GetInput = .FALSE. ! input has already been gotten
DO RefrigNum=1,NumOfRefrigerants
RefrigIndex=0 ! used in routine calls -- value is returned when first 0
! Lay out the basic values:
IF (RefrigData(RefrigNum)%Name /= ' ') THEN
write(OutputFileDebug,fmta) 'Refrigerant='//TRIM(RefrigData(RefrigNum)%Name)
ENDIF
IF (RefrigData(RefrigNum)%NumPsPoints > 0) THEN
write(OutputFileDebug,fmta) 'Saturation Pressures Data points:,Low Temperature=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%PsLowTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%PsLowTempIndex))// &
',High Temperature=,'//TRIM(RoundSigDigits(RefrigData(RefrigNum)%PsHighTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%PsHighTempIndex))
write(OutputFileDebug,fmta,advance='No') 'Temperatures:'
do Loop=1,RefrigData(RefrigNum)%NumPsPoints-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%PsTemps(Loop),2))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%PsTemps(RefrigData(RefrigNum)%NumPsPoints),2))
write(OutputFileDebug,fmta,advance='No') 'Saturation Pressure:'
do Loop=1,RefrigData(RefrigNum)%NumPsPoints-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%PsValues(Loop),2))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%PsValues(RefrigData(RefrigNum)%NumPsPoints),2))
ENDIF
IF (RefrigData(RefrigNum)%NumHPoints > 0) THEN
write(OutputFileDebug,fmta) 'Enthalpy Saturated Fluid Data points:,Low Temperature=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%HfLowTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%HfLowTempIndex))// &
',High Temperature=,'//TRIM(RoundSigDigits(RefrigData(RefrigNum)%HfHighTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%HfHighTempIndex))
write(OutputFileDebug,fmta,advance='No') 'Temperatures:'
do Loop=1,RefrigData(RefrigNum)%NumHPoints-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%HTemps(Loop),2))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%HTemps(RefrigData(RefrigNum)%NumHPoints),2))
write(OutputFileDebug,fmta,advance='No') 'Enthalpy Saturated Fluid:'
do Loop=1,RefrigData(RefrigNum)%NumHPoints-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%HfValues(Loop),2))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%HfValues(RefrigData(RefrigNum)%NumHPoints),2))
write(OutputFileDebug,fmta) 'Enthalpy Saturated Fluid/Gas Data points:,Low Temperature=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%HfgLowTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%HfgLowTempIndex))// &
',High Temperature=,'//TRIM(RoundSigDigits(RefrigData(RefrigNum)%HfgHighTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%HfgHighTempIndex))
write(OutputFileDebug,fmta,advance='No') 'Temperatures:'
do Loop=1,RefrigData(RefrigNum)%NumHPoints-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%HTemps(Loop),2))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%HTemps(RefrigData(RefrigNum)%NumHPoints),2))
write(OutputFileDebug,fmta,advance='No') 'Enthalpy Saturated Fluid/Gas:'
do Loop=1,RefrigData(RefrigNum)%NumHPoints-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%HfgValues(Loop),2))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%HfgValues(RefrigData(RefrigNum)%NumHPoints),2))
ENDIF
IF (RefrigData(RefrigNum)%NumCpPoints > 0) THEN
write(OutputFileDebug,fmta) 'Specific Heat Saturated Fluid Data points:,Low Temperature=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpfLowTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpfLowTempIndex))// &
',High Temperature=,'//TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpfHighTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpfHighTempIndex))
write(OutputFileDebug,fmta,advance='No') 'Temperatures:'
do Loop=1,RefrigData(RefrigNum)%NumCpPoints-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpTemps(Loop),2))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpTemps(RefrigData(RefrigNum)%NumCpPoints),2))
write(OutputFileDebug,fmta,advance='No') 'Specific Heat Saturated Fluid:'
do Loop=1,RefrigData(RefrigNum)%NumCpPoints-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpfValues(Loop),2))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpfValues(RefrigData(RefrigNum)%NumCpPoints),2))
write(OutputFileDebug,fmta) 'Specific Heat Saturated Fluid/Gas Data points:,Low Temperature=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpfgLowTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpfgLowTempIndex))// &
',High Temperature=,'//TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpfgHighTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpfgHighTempIndex))
write(OutputFileDebug,fmta,advance='No') 'Temperatures:'
do Loop=1,RefrigData(RefrigNum)%NumCpPoints-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpTemps(Loop),2))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpTemps(RefrigData(RefrigNum)%NumCpPoints),2))
write(OutputFileDebug,fmta,advance='No') 'Specific Heat Saturated Fluid/Gas:'
do Loop=1,RefrigData(RefrigNum)%NumCpPoints-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpfgValues(Loop),2))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpfgValues(RefrigData(RefrigNum)%NumCpPoints),2))
ENDIF
IF (RefrigData(RefrigNum)%NumRhoPoints > 0) THEN
write(OutputFileDebug,fmta) 'Density Saturated Fluid Data points:,Low Temperature=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhofLowTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhofLowTempIndex))// &
',High Temperature=,'//TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhofHighTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhofHighTempIndex))
write(OutputFileDebug,fmta,advance='No') 'Temperatures:'
do Loop=1,RefrigData(RefrigNum)%NumRhoPoints-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhoTemps(Loop),2))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhoTemps(RefrigData(RefrigNum)%NumRhoPoints),2))
write(OutputFileDebug,fmta,advance='No') 'Density Saturated Fluid:'
do Loop=1,RefrigData(RefrigNum)%NumRhoPoints-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhofValues(Loop),2))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhofValues(RefrigData(RefrigNum)%NumRhoPoints),2))
write(OutputFileDebug,fmta) 'Density Saturated Fluid/Gas Data points:,Low Temperature=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhofgLowTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhofgLowTempIndex))// &
',High Temperature=,'//TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhofgHighTempValue,2))//',Index=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhofgHighTempIndex))
write(OutputFileDebug,fmta,advance='No') 'Temperatures:'
do Loop=1,RefrigData(RefrigNum)%NumRhoPoints-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhoTemps(Loop),2))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhoTemps(RefrigData(RefrigNum)%NumRhoPoints),2))
write(OutputFileDebug,fmta,advance='No') 'Density Saturated Fluid/Gas:'
do Loop=1,RefrigData(RefrigNum)%NumRhoPoints-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhofgValues(Loop),2))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhofgValues(RefrigData(RefrigNum)%NumRhoPoints),2))
ENDIF
IF (RefrigData(RefrigNum)%NumSuperTempPts > 0 .and. RefrigData(RefrigNum)%NumSuperPressPts > 0) THEN
write(OutputFileDebug,fmta) 'Superheated Gas Fluid Data points:,NumTemperaturePoints=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%NumSuperTempPts))//',NumPressurePoints=,'// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%NumSuperPressPts))
write(OutputFileDebug,fmta,advance='No') 'Superheated Temperatures:'
do Loop=1,RefrigData(RefrigNum)%NumSuperTempPts-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%SHTemps(Loop),3))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%SHTemps(RefrigData(RefrigNum)%NumSuperTempPts),3))
write(OutputFileDebug,fmta,advance='No') 'Superheated Pressures:'
do Loop=1,RefrigData(RefrigNum)%NumSuperPressPts-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%SHPress(Loop),3))
enddo
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%SHPress(RefrigData(RefrigNum)%NumSuperPressPts),3))
do Loop=1,RefrigData(RefrigNum)%NumSuperPressPts
write(OutputFileDebug,fmta) 'Superheated Pressure:#'//Trim(RoundSigDigits(Loop))//'='// &
trim(RoundSigDigits(RefrigData(RefrigNum)%SHPress(Loop),2))
write(OutputFileDebug,fmta,advance='No') 'Enthalpy Superheated Gas:'
do Loop1=1,RefrigData(RefrigNum)%NumSuperTempPts-1
write(OutputFileDebug,fmta,advance='No') ','// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%HshValues(Loop1,Loop),3))
enddo
write(OutputFileDebug,fmta) ','// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%HshValues(RefrigData(RefrigNum)%NumSuperTempPts,Loop),3))
enddo
do Loop=1,RefrigData(RefrigNum)%NumSuperPressPts
write(OutputFileDebug,fmta) 'Superheated Pressure:#'//Trim(RoundSigDigits(Loop))//'='// &
trim(RoundSigDigits(RefrigData(RefrigNum)%SHPress(Loop),2))
write(OutputFileDebug,fmta,advance='No') 'Density Superheated Gas:'
do Loop1=1,RefrigData(RefrigNum)%NumSuperTempPts-1
write(OutputFileDebug,fmta,advance='No') ','// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhoshValues(Loop1,Loop),3))
enddo
write(OutputFileDebug,fmta) ','// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhoshValues(RefrigData(RefrigNum)%NumSuperTempPts,Loop),3))
enddo
do Loop=1,RefrigData(RefrigNum)%NumSuperTempPts
write(OutputFileDebug,fmta) 'Superheated Temperature:#'//Trim(RoundSigDigits(Loop))//'='// &
trim(RoundSigDigits(RefrigData(RefrigNum)%SHTemps(Loop),2))
write(OutputFileDebug,fmta,advance='No') 'Enthalpy Superheated Gas:'
do Loop1=1,RefrigData(RefrigNum)%NumSuperPressPts-1
write(OutputFileDebug,fmta,advance='No') ','// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%HshValues(Loop,Loop1),3))
enddo
write(OutputFileDebug,fmta) ','// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%HshValues(Loop,RefrigData(RefrigNum)%NumSuperPressPts),3))
enddo
do Loop=1,RefrigData(RefrigNum)%NumSuperTempPts
write(OutputFileDebug,fmta) 'Superheated Temperature:#'//Trim(RoundSigDigits(Loop))//'='// &
trim(RoundSigDigits(RefrigData(RefrigNum)%SHTemps(Loop),2))
write(OutputFileDebug,fmta,advance='No') 'Density Superheated Gas:'
do Loop1=1,RefrigData(RefrigNum)%NumSuperPressPts-1
write(OutputFileDebug,fmta,advance='No') ','// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhoshValues(Loop,Loop1),3))
enddo
write(OutputFileDebug,fmta) ','// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhoshValues(Loop,RefrigData(RefrigNum)%NumSuperPressPts),3))
enddo
ENDIF
! ============================================
! Refrigeration Results, using out of bounds to out of bounds values in calling
! ============================================
! ========= Pressure from Temperatures
write(OutputFileDebug,fmta) 'Refrigerant='//TRIM(RefrigData(RefrigNum)%Name)//' **** Results ****'
IF (RefrigData(RefrigNum)%NumPsPoints > 0) THEN
write(OutputFileDebug,fmta,advance='No') 'Pressure Results at Temperatures:'
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%PsTemps(1)-incr,2))
do Loop=1,RefrigData(RefrigNum)%NumPsPoints-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%PsTemps(Loop),2))
Temperature=RefrigData(RefrigNum)%PsTemps(Loop) + &
(RefrigData(RefrigNum)%PsTemps(Loop+1)-RefrigData(RefrigNum)%PsTemps(Loop))/2.0d0
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(Temperature,2))
enddo
write(OutputFileDebug,fmta,advance='No') ','// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%PsTemps(RefrigData(RefrigNum)%NumPsPoints),2))
write(OutputFileDebug,fmta) ','// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%PsTemps(RefrigData(RefrigNum)%NumPsPoints)+incr,2))
write(OutputFileDebug,fmta,advance='No') 'Saturated Pressures:'
Temperature=RefrigData(RefrigNum)%PsTemps(1)-incr
ReturnValue=GetSatPressureRefrig(RefrigData(RefrigNum)%Name,Temperature,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
do Loop=1,RefrigData(RefrigNum)%NumPsPoints-1
Temperature=RefrigData(RefrigNum)%PsTemps(Loop)
ReturnValue=GetSatPressureRefrig(RefrigData(RefrigNum)%Name,Temperature,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
Temperature=RefrigData(RefrigNum)%PsTemps(Loop) + &
(RefrigData(RefrigNum)%PsTemps(Loop+1)-RefrigData(RefrigNum)%PsTemps(Loop))/2.0d0
ReturnValue=GetSatPressureRefrig(RefrigData(RefrigNum)%Name,Temperature,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
enddo
Temperature=RefrigData(RefrigNum)%PsTemps(RefrigData(RefrigNum)%NumPsPoints)
ReturnValue=GetSatPressureRefrig(RefrigData(RefrigNum)%Name,Temperature,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
Temperature=RefrigData(RefrigNum)%PsTemps(RefrigData(RefrigNum)%NumPsPoints)+incr
ReturnValue=GetSatPressureRefrig(RefrigData(RefrigNum)%Name,Temperature,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(ReturnValue,2))
ENDIF
! ========= Enthalpy from Temperatures
IF (RefrigData(RefrigNum)%NumHPoints > 0) THEN
write(OutputFileDebug,fmta,advance='No') 'Enthalpy Results at Temperatures:'
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%HTemps(1)-incr,2))
do Loop=1,RefrigData(RefrigNum)%NumHPoints-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%HTemps(Loop),2))
Temperature=RefrigData(RefrigNum)%HTemps(Loop) + &
(RefrigData(RefrigNum)%HTemps(Loop+1)-RefrigData(RefrigNum)%HTemps(Loop))/2.0d0
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(Temperature,2))
enddo
write(OutputFileDebug,fmta,advance='No') ','// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%HTemps(RefrigData(RefrigNum)%NumHPoints),2))
write(OutputFileDebug,fmta) ','// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%HTemps(RefrigData(RefrigNum)%NumHPoints)+incr,2))
write(OutputFileDebug,fmta,advance='No') 'Saturated Enthalpy:'
Temperature=RefrigData(RefrigNum)%HTemps(1)-incr
ReturnValue=GetSatEnthalpyRefrig(RefrigData(RefrigNum)%Name,Temperature,Quality,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
do Loop=1,RefrigData(RefrigNum)%NumHPoints-1
Temperature=RefrigData(RefrigNum)%HTemps(Loop)
ReturnValue=GetSatEnthalpyRefrig(RefrigData(RefrigNum)%Name,Temperature,Quality,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
Temperature=RefrigData(RefrigNum)%HTemps(Loop) + &
(RefrigData(RefrigNum)%HTemps(Loop+1)-RefrigData(RefrigNum)%HTemps(Loop))/2.0d0
ReturnValue=GetSatEnthalpyRefrig(RefrigData(RefrigNum)%Name,Temperature,Quality,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
enddo
Temperature=RefrigData(RefrigNum)%HTemps(RefrigData(RefrigNum)%NumHPoints)
ReturnValue=GetSatEnthalpyRefrig(RefrigData(RefrigNum)%Name,Temperature,Quality,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
Temperature=RefrigData(RefrigNum)%HTemps(RefrigData(RefrigNum)%NumHPoints)+incr
ReturnValue=GetSatEnthalpyRefrig(RefrigData(RefrigNum)%Name,Temperature,Quality,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(ReturnValue,2))
ENDIF
! ========= Specific Heat from Temperatures
IF (RefrigData(RefrigNum)%NumCpPoints > 0) THEN
write(OutputFileDebug,fmta,advance='No') 'Specific Heat Results at Temperatures:'
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpTemps(1)-incr,2))
do Loop=1,RefrigData(RefrigNum)%NumCpPoints-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpTemps(Loop),2))
Temperature=RefrigData(RefrigNum)%CpTemps(Loop) + &
(RefrigData(RefrigNum)%CpTemps(Loop+1)-RefrigData(RefrigNum)%CpTemps(Loop))/2.0d0
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(Temperature,2))
enddo
write(OutputFileDebug,fmta,advance='No') ','// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpTemps(RefrigData(RefrigNum)%NumCpPoints),2))
write(OutputFileDebug,fmta) ','// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%CpTemps(RefrigData(RefrigNum)%NumCpPoints)+incr,2))
write(OutputFileDebug,fmta,advance='No') 'Saturated Specific Heat:'
Temperature=RefrigData(RefrigNum)%CpTemps(1)-incr
ReturnValue=GetSatSpecificHeatRefrig(RefrigData(RefrigNum)%Name,Temperature,Quality,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
do Loop=1,RefrigData(RefrigNum)%NumCpPoints-1
Temperature=RefrigData(RefrigNum)%CpTemps(Loop)
ReturnValue=GetSatSpecificHeatRefrig(RefrigData(RefrigNum)%Name,Temperature,Quality,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
Temperature=RefrigData(RefrigNum)%CpTemps(Loop) + &
(RefrigData(RefrigNum)%CpTemps(Loop+1)-RefrigData(RefrigNum)%CpTemps(Loop))/2.0d0
ReturnValue=GetSatSpecificHeatRefrig(RefrigData(RefrigNum)%Name,Temperature,Quality,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
enddo
Temperature=RefrigData(RefrigNum)%CpTemps(RefrigData(RefrigNum)%NumCpPoints)
ReturnValue=GetSatSpecificHeatRefrig(RefrigData(RefrigNum)%Name,Temperature,Quality,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
Temperature=RefrigData(RefrigNum)%CpTemps(RefrigData(RefrigNum)%NumCpPoints)+incr
ReturnValue=GetSatSpecificHeatRefrig(RefrigData(RefrigNum)%Name,Temperature,Quality,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(ReturnValue,2))
ENDIF
! ========= Density from Temperatures
IF (RefrigData(RefrigNum)%NumRhoPoints > 0) THEN
write(OutputFileDebug,fmta,advance='No') 'Density Results at Temperatures:'
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhoTemps(1)-incr,2))
do Loop=1,RefrigData(RefrigNum)%NumRhoPoints-1
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhoTemps(Loop),2))
Temperature=RefrigData(RefrigNum)%RhoTemps(Loop) + &
(RefrigData(RefrigNum)%RhoTemps(Loop+1)-RefrigData(RefrigNum)%RhoTemps(Loop))/2.0d0
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(Temperature,2))
enddo
write(OutputFileDebug,fmta,advance='No') ','// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhoTemps(RefrigData(RefrigNum)%NumRhoPoints),2))
write(OutputFileDebug,fmta) ','// &
TRIM(RoundSigDigits(RefrigData(RefrigNum)%RhoTemps(RefrigData(RefrigNum)%NumRhoPoints)+incr,2))
write(OutputFileDebug,fmta,advance='No') 'Saturated Density:'
Temperature=RefrigData(RefrigNum)%RhoTemps(1)-incr
ReturnValue=GetSatDensityRefrig(RefrigData(RefrigNum)%Name,Temperature,Quality,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
do Loop=1,RefrigData(RefrigNum)%NumRhoPoints-1
Temperature=RefrigData(RefrigNum)%RhoTemps(Loop)
ReturnValue=GetSatDensityRefrig(RefrigData(RefrigNum)%Name,Temperature,Quality,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
Temperature=RefrigData(RefrigNum)%RhoTemps(Loop) + &
(RefrigData(RefrigNum)%RhoTemps(Loop+1)-RefrigData(RefrigNum)%RhoTemps(Loop))/2.0d0
ReturnValue=GetSatDensityRefrig(RefrigData(RefrigNum)%Name,Temperature,Quality,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
enddo
Temperature=RefrigData(RefrigNum)%RhoTemps(RefrigData(RefrigNum)%NumRhoPoints)
ReturnValue=GetSatDensityRefrig(RefrigData(RefrigNum)%Name,Temperature,Quality,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta,advance='No') ','//TRIM(RoundSigDigits(ReturnValue,2))
Temperature=RefrigData(RefrigNum)%RhoTemps(RefrigData(RefrigNum)%NumRhoPoints)+incr
ReturnValue=GetSatDensityRefrig(RefrigData(RefrigNum)%Name,Temperature,Quality,RefrigIndex,'ReportAndTestRefrigerants')
write(OutputFileDebug,fmta) ','//TRIM(RoundSigDigits(ReturnValue,2))
ENDIF
ENDDO
RETURN
END SUBROUTINE ReportAndTestRefrigerants