aboutsummaryrefslogtreecommitdiff
path: root/src/EOS_GIF.F90
diff options
context:
space:
mode:
authorknarf <knarf@9002d74a-9e00-4850-b1cf-9d84fd065b5d>2009-12-02 22:22:53 +0000
committerknarf <knarf@9002d74a-9e00-4850-b1cf-9d84fd065b5d>2009-12-02 22:22:53 +0000
commitd324ef7f4c2e2de9b29f3110e3d25f5bff1d16a6 (patch)
tree30fd9eb39302e9d9928c153fc406d8b0f8f81b2e /src/EOS_GIF.F90
parent8dae45ad0c7465172e619abffc7a0e4e8d9cfef0 (diff)
thorns for general eos interface (moved from Whisky_Dev repositories)
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEOS/EOSG_IdealFluid/trunk@2 9002d74a-9e00-4850-b1cf-9d84fd065b5d
Diffstat (limited to 'src/EOS_GIF.F90')
-rwxr-xr-xsrc/EOS_GIF.F9084
1 files changed, 84 insertions, 0 deletions
diff --git a/src/EOS_GIF.F90 b/src/EOS_GIF.F90
new file mode 100755
index 0000000..b8cef15
--- /dev/null
+++ b/src/EOS_GIF.F90
@@ -0,0 +1,84 @@
+ /*@@
+ @file EOS_GIF.F90
+ @date Mon Mar 14 16:42:15 2005
+ @author Ian Hawke
+ @desc
+ The functions that actually set the polytropic EOS
+ @enddesc
+ @@*/
+
+#include "cctk.h"
+#include "cctk_Parameters.h"
+
+subroutine EOS_GIF_Pressure(nelems, rho, eps, press)
+
+ USE EOS_GIF_Scalars
+
+ implicit none
+
+ CCTK_INT, intent(in) :: nelems
+ CCTK_REAL, dimension(nelems), intent(in) :: rho, eps
+ CCTK_REAL, dimension(nelems), intent(out) :: press
+
+ press = (eos_if_gamma_local - 1.d0) * rho * eps
+
+end subroutine EOS_GIF_Pressure
+
+subroutine EOS_GIF_DPDRho(nelems, rho, eps, dpdrho)
+
+ USE EOS_GIF_Scalars
+
+ implicit none
+
+ CCTK_INT, intent(in) :: nelems
+ CCTK_REAL, dimension(nelems), intent(in) :: rho, eps
+ CCTK_REAL, dimension(nelems), intent(out) :: dpdrho
+
+ dpdrho = (eos_if_gamma_local - 1.d0) * eps
+
+end subroutine EOS_GIF_DPDRho
+
+subroutine EOS_GIF_DPDIE(nelems, rho, eps, dpdie)
+
+ USE EOS_GIF_Scalars
+
+ implicit none
+
+ CCTK_INT, intent(in) :: nelems
+ CCTK_REAL, dimension(nelems), intent(in) :: rho, eps
+ CCTK_REAL, dimension(nelems), intent(out) :: dpdie
+
+ dpdie = (eos_if_gamma_local - 1.d0) * rho
+
+end subroutine EOS_GIF_DPDIE
+
+subroutine EOS_GIF_cs2(nelems, rho, eps, cs2)
+
+ USE EOS_GIF_Scalars
+
+ implicit none
+
+ CCTK_INT, intent(in) :: nelems
+ CCTK_REAL, dimension(nelems), intent(in) :: rho, eps
+ CCTK_REAL, dimension(nelems), intent(out) :: cs2
+
+ cs2 = eos_if_gamma_local * (eos_if_gamma_local - 1.d0) * eps / &
+ (1.d0 + eos_if_gamma_local * eps)
+
+end subroutine EOS_GIF_cs2
+
+subroutine EOS_GIF_Temp(nelems, rho, eps, temperature)
+
+ USE EOS_GIF_Scalars
+
+ implicit none
+
+ CCTK_INT, intent(in) :: nelems
+ CCTK_REAL, dimension(nelems), intent(in) :: rho, eps
+ CCTK_REAL, dimension(nelems), intent(out) :: temperature
+
+ temperature = (eos_if_gamma_local - 1.d0) * eps * &
+ mean_molecular_weight_local / &
+ k_boltzmann
+
+end subroutine EOS_GIF_Temp