[Commits] [svn:einsteintoolkit] EOS_Omni/trunk/src/ (Rev. 76)
cott at tapir.caltech.edu
cott at tapir.caltech.edu
Fri Mar 15 16:50:51 CDT 2013
User: cott
Date: 2013/03/15 04:50 PM
Modified:
/trunk/src/
EOS_Omni_Module.F90, EOS_Omni_SingleVarCalls.F90
Log:
* add possibility to stich on a polytrope to the lower end
of a tabulated cold EOS
File Changes:
Directory: /trunk/src/
======================
File [modified]: EOS_Omni_Module.F90
Delta lines: +2 -0
===================================================================
--- trunk/src/EOS_Omni_Module.F90 2013-02-24 21:07:38 UTC (rev 75)
+++ trunk/src/EOS_Omni_Module.F90 2013-03-15 21:50:51 UTC (rev 76)
@@ -33,6 +33,8 @@
real*8 :: coldeos_gammath = 0.0d0
real*8 :: coldeos_rhomin = 0.0d0
real*8 :: coldeos_rhomax = 0.0d0
+ real*8 :: coldeos_low_kappa = 0.0d0
+ real*8 :: coldeos_low_gamma = 0.0d0
real*8 :: coldeos_kappa = 0.0d0
real*8 :: coldeos_thfac = 1.0d0
real*8 :: coldeos_dlrho = 1.0d0
File [modified]: EOS_Omni_SingleVarCalls.F90
Delta lines: +17 -11
===================================================================
--- trunk/src/EOS_Omni_SingleVarCalls.F90 2013-02-24 21:07:38 UTC (rev 75)
+++ trunk/src/EOS_Omni_SingleVarCalls.F90 2013-03-15 21:50:51 UTC (rev 76)
@@ -122,8 +122,9 @@
! cold tabular EOS with gamma law
do i=1,npoints
if(rho(i).lt.coldeos_rhomin) then
- keyerr(i) = 104
- anyerr = 1
+ press(i) = coldeos_low_kappa * rho(i)**coldeos_low_gamma
+ eps(i) = press(i) / (coldeos_low_gamma - 1.0) / rho(i)
+ cycle
else if(rho(i).gt.coldeos_rhomax) then
keyerr(i) = 103
anyerr = 1
@@ -281,8 +282,9 @@
! and entropy (the latter, because T=0)
do i=1,npoints
if(rho(i).lt.coldeos_rhomin) then
- keyerr(i) = 104
- anyerr = 1
+ dpdrhoe(i) = coldeos_low_kappa * coldeos_low_gamma * &
+ rho(i)**(coldeos_low_gamma-1.0d0)
+ cycle
else if(rho(i).gt.coldeos_rhomax) then
keyerr(i) = 103
anyerr = 1
@@ -421,8 +423,8 @@
! only the gamma law has non-zero dPdeps
do i=1,npoints
if(rho(i).lt.coldeos_rhomin) then
- keyerr(i) = 104
- anyerr = 1
+ dpdepsrho(i) = 0.0d0
+ cycle
else if(rho(i).gt.coldeos_rhomax) then
keyerr(i) = 103
anyerr = 1
@@ -573,13 +575,17 @@
enddo
case (5)
- ! with the cold eos we have to assume P = P(rho), so
- ! by definition dPdrho is at constant internal energy
- ! and entropy (the latter, because T=0)
+ ! with the cold eos we have to assume P = P(rho), so
+ ! by definition dPdrho is at constant internal energy
+ ! and entropy (the latter, because T=0)
do i=1,npoints
if(rho(i).lt.coldeos_rhomin) then
- keyerr(i) = 104
- anyerr = 1
+ xprs = coldeos_low_kappa * rho(i)**coldeos_low_gamma
+ eps(i) = xprs / (coldeos_low_gamma - 1.0d0) / rho(i)
+ cs2(i) = coldeos_low_kappa * coldeos_low_gamma * &
+ rho(i)**(coldeos_low_gamma-1.0d0) / &
+ (1.0d0 + eps(i) + xprs)
+ cycle
else if(rho(i).gt.coldeos_rhomax) then
keyerr(i) = 103
anyerr = 1
More information about the Commits
mailing list