aboutsummaryrefslogtreecommitdiff
path: root/src/EOS_Omni_SingleVarCalls.F90
diff options
context:
space:
mode:
authorcott <cott@8e189c6b-2ab8-4400-aa02-70a9cfce18b9>2010-11-03 16:49:03 +0000
committercott <cott@8e189c6b-2ab8-4400-aa02-70a9cfce18b9>2010-11-03 16:49:03 +0000
commita457eab8a10c6bbc23dcdb8be65753404240cf26 (patch)
treec8555102f60d957d6a4b27fcb9b67ecf0fee1e89 /src/EOS_Omni_SingleVarCalls.F90
parent5621733be96b97235891c5da5e1aaa52967058c3 (diff)
* fix a number of small issues
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEOS/EOS_Omni/EOS_Omni@12 8e189c6b-2ab8-4400-aa02-70a9cfce18b9
Diffstat (limited to 'src/EOS_Omni_SingleVarCalls.F90')
-rw-r--r--src/EOS_Omni_SingleVarCalls.F90135
1 files changed, 130 insertions, 5 deletions
diff --git a/src/EOS_Omni_SingleVarCalls.F90 b/src/EOS_Omni_SingleVarCalls.F90
index 217c8f3..ce8a22e 100644
--- a/src/EOS_Omni_SingleVarCalls.F90
+++ b/src/EOS_Omni_SingleVarCalls.F90
@@ -30,6 +30,10 @@ subroutine EOS_Omni_EOS_Press(eoskey,keytemp,rf_precision,npoints,&
real*8 :: hybrid_local_gamma, hybrid_local_k_cgs, &
hybrid_p_poly, hybrid_p_th
real*8,parameter :: zero = 0.0d0
+ ! temporary vars for nuc_eos
+ real*8 :: xrho,xye,xtemp,xenr,xent
+ real*8 :: xprs,xmunu,xcs2
+ real*8 :: xdedt,xdpderho,xdpdrhoe
anyerr = 0
keyerr(:) = 0
@@ -84,12 +88,31 @@ subroutine EOS_Omni_EOS_Press(eoskey,keytemp,rf_precision,npoints,&
press(i) = hybrid_p_poly + hybrid_p_th
enddo
-!!! case (4)
-!!!
-!!! do i=1,npoints
-!!!
-!!! enddo
+ case (4)
+ do i=1,npoints
+
+ xrho = rho(i) * inv_rho_gf
+ xtemp = temp(i)
+ xye = ye(i)
+ xenr = eps(i) * inv_eps_gf
+ call nuc_eos_short(xrho,xtemp,xye,xenr,xprs,&
+ xent,xcs2,xdedt,xdpderho,xdpdrhoe,xmunu,&
+ keytemp,keyerr(i),rf_precision)
+
+ if(keyerr(i).ne.0) then
+ anyerr = 1
+ endif
+
+ if(keytemp.eq.1) then
+ eps(i) = xenr * eps_gf
+ else
+ temp(i) = xtemp
+ endif
+
+ press(i) = xprs * press_gf
+
+ enddo
case DEFAULT
write(warnstring,*) "eoskey ",eoskey," not implemented!"
@@ -121,6 +144,10 @@ subroutine EOS_Omni_EOS_DPressByDRho(eoskey,keytemp,rf_precision,npoints,&
real*8 :: hybrid_local_gamma, hybrid_local_k_cgs, &
hybrid_dp_poly, hybrid_dp_th1, hybrid_dp_th2
real*8,parameter :: zero = 0.0d0
+ ! temporary vars for nuc_eos
+ real*8 :: xrho,xye,xtemp,xenr,xent
+ real*8 :: xprs,xmunu,xcs2
+ real*8 :: xdedt,xdpderho,xdpdrhoe
anyerr = 0
keyerr(:) = 0
@@ -181,6 +208,28 @@ subroutine EOS_Omni_EOS_DPressByDRho(eoskey,keytemp,rf_precision,npoints,&
enddo
+ case (4)
+ do i=1,npoints
+ xrho = rho(i) * inv_rho_gf
+ xtemp = temp(i)
+ xye = ye(i)
+ xenr = eps(i) * inv_eps_gf
+ call nuc_eos_short(xrho,xtemp,xye,xenr,xprs,&
+ xent,xcs2,xdedt,xdpderho,xdpdrhoe,xmunu,&
+ keytemp,keyerr(i),rf_precision)
+
+ if(keyerr(i).ne.0) then
+ anyerr = 1
+ endif
+
+ if(keytemp.eq.1) then
+ eps(i) = xenr * eps_gf
+ else
+ temp(i) = xtemp
+ endif
+
+ dpdrhoe(i) = xdpdrhoe * press_gf * inv_rho_gf
+ enddo
case DEFAULT
write(warnstring,*) "eoskey ",eoskey," not implemented!"
call CCTK_WARN(0,warnstring)
@@ -206,6 +255,11 @@ subroutine EOS_Omni_EOS_DPressByDEps(eoskey,keytemp,rf_precision,npoints,&
! local vars
integer :: i
character(256) :: warnstring
+ ! temporary vars for nuc_eos
+ real*8 :: xrho,xye,xtemp,xenr,xent
+ real*8 :: xprs,xmunu,xcs2
+ real*8 :: xdedt,xdpderho,xdpdrhoe
+
anyerr = 0
keyerr(:) = 0
@@ -241,6 +295,32 @@ subroutine EOS_Omni_EOS_DPressByDEps(eoskey,keytemp,rf_precision,npoints,&
dpdepsrho(i) = (hybrid_gamma_th - 1.0d0) * rho(i)
enddo
+ case (4)
+ ! nuc_eos
+ do i=1,npoints
+
+ xrho = rho(i) * inv_rho_gf
+ xtemp = temp(i)
+ xye = ye(i)
+ xenr = eps(i) * inv_eps_gf
+ call nuc_eos_short(xrho,xtemp,xye,xenr,xprs,&
+ xent,xcs2,xdedt,xdpderho,xdpdrhoe,xmunu,&
+ keytemp,keyerr(i),rf_precision)
+
+ if(keyerr(i).ne.0) then
+ anyerr = 1
+ endif
+
+ if(keytemp.eq.1) then
+ eps(i) = xenr * eps_gf
+ else
+ temp(i) = xtemp
+ endif
+
+ dpdepsrho(i) = xdpderho * press_gf * inv_eps_gf
+
+ enddo
+
case DEFAULT
write(warnstring,*) "eoskey ",eoskey," not implemented!"
call CCTK_WARN(0,warnstring)
@@ -270,6 +350,10 @@ subroutine EOS_Omni_EOS_cs2(eoskey,keytemp,rf_precision,npoints,&
real*8 :: hybrid_local_gamma, hybrid_local_k_cgs, &
hybrid_p_poly, hybrid_p_th
real*8,parameter :: zero = 0.0d0
+ ! temporary vars for nuc_eos
+ real*8 :: xrho,xye,xtemp,xenr,xent
+ real*8 :: xprs,xmunu,xcs2
+ real*8 :: xdedt
anyerr = 0
keyerr(:) = 0
@@ -331,6 +415,35 @@ subroutine EOS_Omni_EOS_cs2(eoskey,keytemp,rf_precision,npoints,&
cs2(i) = (hybrid_local_gamma * hybrid_p_poly + hybrid_gamma_th * hybrid_p_th) / &
rho(i) / (1.0d0 + eps(i) + xpress/rho(i))
enddo
+ case(4)
+ ! nuc_eos
+
+ do i=1,npoints
+
+ xrho = rho(i) * inv_rho_gf
+ xtemp = temp(i)
+ xye = ye(i)
+ xenr = eps(i) * inv_eps_gf
+ call nuc_eos_short(xrho,xtemp,xye,xenr,xprs,&
+ xent,xcs2,xdedt,xdpderho,xdpdrhoe,xmunu,&
+ keytemp,keyerr(i),rf_precision)
+
+ if(keyerr(i).ne.0) then
+ anyerr = 1
+ endif
+
+ if(keytemp.eq.1) then
+ eps(i) = xenr * eps_gf
+ else
+ temp(i) = xtemp
+ endif
+
+ cs2(i) = xcs2 * cliteinv2 / &
+ (1.0d0 + eps(i) + xprs * press_gf / rho(i))
+
+ enddo
+
+
case DEFAULT
write(warnstring,*) "eoskey ",eoskey," not implemented!"
call CCTK_WARN(0,warnstring)
@@ -357,6 +470,10 @@ subroutine EOS_Omni_EOS_eps_from_press(eoskey,keytemp,rf_precision,npoints,&
! local vars
integer :: i
character(256) :: warnstring
+ ! temporary vars for nuc_eos
+ real*8 :: xrho,xye,xtemp,xenr,xent
+ real*8 :: xprs,xmunu,xcs2
+ real*8 :: xdedt,xdpderho,xdpdrhoe
if(keytemp.eq.1) then
anyerr = 1
@@ -381,6 +498,10 @@ subroutine EOS_Omni_EOS_eps_from_press(eoskey,keytemp,rf_precision,npoints,&
! hybrid EOS
write(warnstring,*) "EOS_Omni_EpsFromPress call not supported for hybrid EOS"
call CCTK_WARN(0,warnstring)
+ case (4)
+ ! nuc EOS
+ write(warnstring,*) "EOS_Omni_EpsFromPress call not supported for nuc_eos yet"
+ call CCTK_WARN(0,warnstring)
case DEFAULT
write(warnstring,*) "eoskey ",eoskey," not implemented!"
call CCTK_WARN(0,warnstring)
@@ -431,6 +552,10 @@ subroutine EOS_Omni_EOS_RestMassDensityFromEpsPress(eoskey,keytemp,rf_precision,
! hybrid EOS
write(warnstring,*) "EOS_Omni_RestMassDensityFromEpsPress not supported for hybrid EOS"
call CCTK_WARN(0,warnstring)
+ case (4)
+ ! nuc EOS
+ write(warnstring,*) "EOS_Omni_RestMassDensityFromEpsPress call not supported for nuc_eos yet"
+ call CCTK_WARN(0,warnstring)
case DEFAULT
write(warnstring,*) "eoskey ",eoskey," not implemented!"
call CCTK_WARN(0,warnstring)