[Commits] [svn:einsteintoolkit] EOS_Omni/trunk/src/ (Rev. 77)
cott at tapir.caltech.edu
cott at tapir.caltech.edu
Sat Mar 23 15:08:12 CDT 2013
User: cott
Date: 2013/03/23 03:08 PM
Modified:
/trunk/src/
EOS_Omni_ColdEOSReadTable.F90
Log:
* Low-density polytrope for tabulated cold EOS. This
part of the commit was forgotten.
File Changes:
Directory: /trunk/src/
======================
File [modified]: EOS_Omni_ColdEOSReadTable.F90
Delta lines: +16 -4
===================================================================
--- trunk/src/EOS_Omni_ColdEOSReadTable.F90 2013-03-15 21:50:51 UTC (rev 76)
+++ trunk/src/EOS_Omni_ColdEOSReadTable.F90 2013-03-23 20:08:12 UTC (rev 77)
@@ -19,7 +19,8 @@
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 @@
endif
coldeos_nrho = lnrho
+
! allocate vars
allocate(coldeos_logrho(coldeos_nrho))
allocate(coldeos_eps(coldeos_nrho))
@@ -55,8 +57,8 @@
! 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 @@
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 @@
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 @@
enddo
#endif
+
end subroutine EOS_Omni_ReadColdTable
More information about the Commits
mailing list