From 0e045b8b3c7caeb62c491a4b3a6534890d4276cf Mon Sep 17 00:00:00 2001 From: cott Date: Sat, 23 Mar 2013 20:08:12 +0000 Subject: * Low-density polytrope for tabulated cold EOS. This part of the commit was forgotten. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEOS/EOS_Omni/trunk@77 8e189c6b-2ab8-4400-aa02-70a9cfce18b9 --- src/EOS_Omni_ColdEOSReadTable.F90 | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/EOS_Omni_ColdEOSReadTable.F90 b/src/EOS_Omni_ColdEOSReadTable.F90 index b73bd4d..faee59d 100644 --- a/src/EOS_Omni_ColdEOSReadTable.F90 +++ b/src/EOS_Omni_ColdEOSReadTable.F90 @@ -19,7 +19,8 @@ subroutine EOS_Omni_ReadColdTable(CCTK_ARGUMENTS) LOGICAL :: tablethere character(len=256) :: buffer1,buffer2,buffer3 CCTK_INT :: lnrho,lnye,lntemp - integer :: i + CCTK_REAL :: temp_press + integer :: i ! convert file name to fortran string call CCTK_FortranString ( slength, coldeos_table_name, & @@ -47,6 +48,7 @@ subroutine EOS_Omni_ReadColdTable(CCTK_ARGUMENTS) endif coldeos_nrho = lnrho + ! allocate vars allocate(coldeos_logrho(coldeos_nrho)) allocate(coldeos_eps(coldeos_nrho)) @@ -55,8 +57,8 @@ subroutine EOS_Omni_ReadColdTable(CCTK_ARGUMENTS) ! read rho min and max read(667,"(A16,A16)") buffer1,buffer2 - read(buffer1(9:),*) coldeos_rhomin - read(buffer2(9:),*) coldeos_rhomax + read(buffer1(10:),*) coldeos_rhomin + read(buffer2(10:),*) coldeos_rhomax ! read heat capacity? Not sure what exactly that is used for, just ignore it ! for now @@ -74,6 +76,7 @@ subroutine EOS_Omni_ReadColdTable(CCTK_ARGUMENTS) read(667,"(A30)") buffer1 read(buffer1(9:),*) coldeos_kappa + ! make sure density is in log spacing read(667,"(A30)") buffer1 if(.not.(trim(adjustl(buffer1)).eq."RhoSpacing = Log")) then @@ -94,7 +97,15 @@ subroutine EOS_Omni_ReadColdTable(CCTK_ARGUMENTS) coldeos_logrho(i) = log10(coldeos_rhomin) + (i-1)*coldeos_dlrho enddo -#if 0 + ! set up low_kappa to be able to extrapolate to very low densities + ! we are using gamma=2 + coldeos_low_gamma = 2.0d0 + temp_press = (10.0d0**coldeos_logrho(1))**coldeos_gamma(1) + coldeos_low_kappa = temp_press / & + ((10.0d0**coldeos_logrho(1))**coldeos_low_gamma) + + +#if 0 ! debug output do i=1,coldeos_nrho write(6,"(i5,1P10E15.6)") i, coldeos_logrho(i), & @@ -102,4 +113,5 @@ subroutine EOS_Omni_ReadColdTable(CCTK_ARGUMENTS) enddo #endif + end subroutine EOS_Omni_ReadColdTable -- cgit v1.2.3