aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknarf <knarf@9c56c927-b35f-42c5-a3f6-df2e9f55b230>2010-01-12 20:51:22 +0000
committerknarf <knarf@9c56c927-b35f-42c5-a3f6-df2e9f55b230>2010-01-12 20:51:22 +0000
commita32568b88b98dd4cc8642cde6c9da957cd7ac7e1 (patch)
tree5e85bee6a0278d8902a5927f990c55f65e95c161
parent585d8889fb03daee0e1092bad5b6c9c21ad3a3df (diff)
move development of EOS_Polytrope and EOS_Hybrid from Whisky to Cactus
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEOS/EOS_Hybrid/trunk@2 9c56c927-b35f-42c5-a3f6-df2e9f55b230
-rw-r--r--README13
-rw-r--r--configuration.ccl4
-rw-r--r--doc/documentation.tex185
-rw-r--r--interface.ccl9
-rw-r--r--param.ccl24
-rw-r--r--schedule.ccl13
-rw-r--r--src/EOS_Hybrid.F144
-rw-r--r--src/EOS_Hybrid_Analysis.F76
-rw-r--r--src/EOS_Hybrid_Scalars.F18
-rw-r--r--src/EOS_Hybrid_Startup.F84
-rw-r--r--src/make.code.defn12
-rw-r--r--src/make.code.deps5
-rw-r--r--src/make.configuration.deps5
13 files changed, 592 insertions, 0 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..f5334cf
--- /dev/null
+++ b/README
@@ -0,0 +1,13 @@
+Cactus Code Thorn EOS_Hybrid
+Author(s) : Harry Dimmelmeier
+ Ian Hawke
+ Christian Ott
+Maintainer(s): Cactus team
+Licence : LGPL
+--------------------------------------------------------------------------
+
+1. Purpose
+
+This thorn implements the EOS used by Dimmelmeier Novak Font Ibanez Mueller PRD71 064023 (2005) in
+core collapse simulations. Requires the CactusEOS infrastructure.
+
diff --git a/configuration.ccl b/configuration.ccl
new file mode 100644
index 0000000..3ec86b6
--- /dev/null
+++ b/configuration.ccl
@@ -0,0 +1,4 @@
+# Configuration definition for thorn EOS_Hybrid
+
+REQUIRES EOS_Base EOS_Polytrope
+
diff --git a/doc/documentation.tex b/doc/documentation.tex
new file mode 100644
index 0000000..04ced87
--- /dev/null
+++ b/doc/documentation.tex
@@ -0,0 +1,185 @@
+% *======================================================================*
+% Cactus Thorn template for ThornGuide documentation
+% Author: Ian Kelley
+% Date: Sun Jun 02, 2002
+%
+% Thorn documentation in the latex file doc/documentation.tex
+% will be included in ThornGuides built with the Cactus make system.
+% The scripts employed by the make system automatically include
+% pages about variables, parameters and scheduling parsed from the
+% relevent thorn CCL files.
+%
+% This template contains guidelines which help to assure that your
+% documentation will be correctly added to ThornGuides. More
+% information is available in the Cactus UsersGuide.
+%
+% Guidelines:
+% - Do not change anything before the line
+% % START CACTUS THORNGUIDE",
+% except for filling in the title, author, date etc. fields.
+% - Each of these fields should only be on ONE line.
+% - Author names should be sparated with a \\ or a comma
+% - You can define your own macros are OK, but they must appear after
+% the START CACTUS THORNGUIDE line, and do not redefine standard
+% latex commands.
+% - To avoid name clashes with other thorns, 'labels', 'citations',
+% 'references', and 'image' names should conform to the following
+% convention:
+% ARRANGEMENT_THORN_LABEL
+% For example, an image wave.eps in the arrangement CactusWave and
+% thorn WaveToyC should be renamed to CactusWave_WaveToyC_wave.eps
+% - Graphics should only be included using the graphix package.
+% More specifically, with the "includegraphics" command. Do
+% not specify any graphic file extensions in your .tex file. This
+% will allow us (later) to create a PDF version of the ThornGuide
+% via pdflatex. |
+% - References should be included with the latex "bibitem" command.
+% - use \begin{abstract}...\end{abstract} instead of \abstract{...}
+% - For the benefit of our Perl scripts, and for future extensions,
+% please use simple latex.
+%
+% *======================================================================*
+%
+% Example of including a graphic image:
+% \begin{figure}[ht]
+% \begin{center}
+% \includegraphics[width=6cm]{MyArrangement_MyThorn_MyFigure}
+% \end{center}
+% \caption{Illustration of this and that}
+% \label{MyArrangement_MyThorn_MyLabel}
+% \end{figure}
+%
+% Example of using a label:
+% \label{MyArrangement_MyThorn_MyLabel}
+%
+% Example of a citation:
+% \cite{MyArrangement_MyThorn_Author99}
+%
+% Example of including a reference
+% \bibitem{MyArrangement_MyThorn_Author99}
+% {J. Author, {\em The Title of the Book, Journal, or periodical}, 1 (1999),
+% 1--16. {\tt http://www.nowhere.com/}}
+%
+% *======================================================================*
+
+\documentclass{article}
+
+% Use the Cactus ThornGuide style file
+% (Automatically used from Cactus distribution, if you have a
+% thorn without the Cactus Flesh download this from the Cactus
+% homepage at www.cactuscode.org)
+\usepackage{../../../../doc/ThornGuide/cactus}
+
+\begin{document}
+
+% The author of the documentation
+\author{Harry Dimmelmeier, Ian Hawke, Christian Ott}
+
+% The title of the document (not necessarily the name of the Thorn)
+\title{EOS\_Hybrid}
+
+% the date your document was last changed, if your document is in CVS,
+% please use:
+\date{$ $Date$ $}
+
+\maketitle
+
+% Do not delete next line
+% START CACTUS THORNGUIDE
+
+% Add all definitions used in this documentation here
+% \def\mydef etc
+
+% Add an abstract for this thorn's documentation
+\begin{abstract}
+ EOS\_Hybrid. The equation of state used for ``simple'' core
+ collapse simulations.
+\end{abstract}
+
+% The following sections are suggestive only.
+% Remove them or add your own.
+
+\section{The equations}
+\label{sec:eqn}
+
+This equation provides the hybrid polytropic / ideal gas equation of
+state used by Dimmelmeier et al.~\cite{Dimm05} for supernova collapse. A thorn
+wanting to use this needs to use the CactusEOS interface found in
+EOS\_Base.
+
+The equations are
+\begin{eqnarray}
+ \label{eq:eosformulas}
+ P & = & P_{\textrm{poly}} + P_{\textrm{th}} \\
+ \frac{\partial P}{\partial \rho} & = & \frac{\partial
+ P_{\textrm{poly}}}{\partial \rho} + \frac{\partial
+ P_{\textrm{th}_1}}{\partial \rho} + \frac{\partial
+ P_{\textrm{th}_2}}{\partial \rho} \\
+ \frac{\partial P}{\partial \epsilon} & = & (\gamma_{\textrm{th}} - 1)
+ \rho,
+\end{eqnarray}
+where
+\begin{eqnarray}
+ \label{eq:eostemps}
+ P_{\textrm{poly}} & = & K \rho^{\gamma} \\
+ P_{\textrm{th}} & = & -K \frac{\gamma_{\textrm{th}} - 1}{\gamma - 1}
+ \rho^{\gamma} + (\gamma_{\textrm{th}} - 1) \rho \epsilon -
+ (\gamma_{\textrm{th}} - 1) \frac{\gamma - \gamma_1}{\gamma_2 - 1} K
+ \rho_{\textrm{nuc}}^{\gamma_1 - 1} \rho \\
+ \frac{\partial P_{\textrm{poly}}}{\partial \rho} & = & \gamma K
+ \rho^{\gamma - 1} \\
+ \frac{\partial P_{\textrm{th}_1}}{\partial \rho} & = & - \gamma K
+ \frac{\gamma_{\textrm{th}} - 1}{\gamma - 1} \rho^{\gamma -1} \\
+ \frac{\partial P_{\textrm{th}_2}}{\partial \rho} & = & (\gamma - 1)
+ \epsilon - (\gamma_{\textrm{th}} - 1) \frac{\gamma -
+ \gamma_1}{(\gamma_1 - 1)(\gamma_2 - 1)} K \rho_{\textrm{nuc}}
+ (\gamma_1 - 1).
+\end{eqnarray}
+These expressions do not include the conversions between cgs and
+Cactus units that are necessary inside the code.
+
+For more details, a recent paper to start with would
+be~\cite{Dimm05}.
+
+% \section{Introduction}
+
+% \section{Physical System}
+
+% \section{Numerical Implementation}
+
+% \section{Using This Thorn}
+
+% \subsection{Obtaining This Thorn}
+
+% \subsection{Basic Usage}
+
+% \subsection{Special Behaviour}
+
+% \subsection{Interaction With Other Thorns}
+
+% \subsection{Support and Feedback}
+
+% \section{History}
+
+% \subsection{Thorn Source Code}
+
+% \subsection{Thorn Documentation}
+
+% \subsection{Acknowledgements}
+
+
+\begin{thebibliography}{9}
+
+\bibitem{Dimm05}
+H. Dimmelmeier, J. Novak, A. Font, J.~M. Ibanez, E. Mueller
+\newblock
+Combining spectral and shock-capturing methods: A new numerical approach
+for 3D relativistic core collapse simulations
+\newblock Phys. Rev. D71 064023 (2005)
+
+\end{thebibliography}
+
+% Do not delete next line
+% END CACTUS THORNGUIDE
+
+\end{document}
diff --git a/interface.ccl b/interface.ccl
new file mode 100644
index 0000000..cf9ee02
--- /dev/null
+++ b/interface.ccl
@@ -0,0 +1,9 @@
+# Interface definition for thorn EOS_Hybrid
+
+implements: EOS_Hybrid
+inherits: HydroBase,EOS_2d_Polytrope
+
+real pressure_contributions type = GF tags='Prolongation="None"'
+{
+ pressure_poly, pressure_th
+} "Polytropic and thermal contributions to the pressure"
diff --git a/param.ccl b/param.ccl
new file mode 100644
index 0000000..d568544
--- /dev/null
+++ b/param.ccl
@@ -0,0 +1,24 @@
+# Parameter definitions for thorn EOS_Hybrid
+
+shares: EOS_2d_Polytrope
+
+USES REAL eos_k
+USES REAL eos_gamma
+USES REAL gamma_ini
+
+private:
+
+REAL eos_gamma_th "Gamma_th for EOS"
+{
+ : :: ""
+} 1.5
+
+REAL eos_gamma_supernuclear "Gamma_2 for EOS"
+{
+ : :: ""
+} 1.66666666666666
+
+REAL rho_nuc "Nuclear matter density"
+{
+ : :: ""
+} 1.e-10
diff --git a/schedule.ccl b/schedule.ccl
new file mode 100644
index 0000000..8ce134f
--- /dev/null
+++ b/schedule.ccl
@@ -0,0 +1,13 @@
+# Schedule definitions for thorn EOS_Hybrid
+
+schedule EOS_Hybrid_Startup AT startup AFTER EOS_Polytrope_Startup
+{
+ LANG: Fortran
+} "Setup the EOS used by Dimmelmeier et al. in core collapse"
+
+schedule Check_Poly_Contrib AT analysis
+{
+ LANG: Fortran
+ STORAGE: pressure_contributions
+ TRIGGERS: pressure_contributions
+} "Output the polytropic and thermal contributions"
diff --git a/src/EOS_Hybrid.F b/src/EOS_Hybrid.F
new file mode 100644
index 0000000..c74af75
--- /dev/null
+++ b/src/EOS_Hybrid.F
@@ -0,0 +1,144 @@
+ /*@@
+ @file EOS_Hybrid.F
+ @date Wed Mar 20 14:56:35 2002
+ @author Ian Hawke
+ @desc
+ Routines to calculate the EOS used by
+ Dimmelmeier Novak Font Ibanez Mueller PRD71 064023 (2005)
+ in supernova core collapse simulations.
+ @enddesc
+ @@*/
+
+#include "cctk.h"
+#include "cctk_Parameters.h"
+
+ CCTK_REAL function EOS_Hybrid_Pressure(rho, eps)
+
+ USE EOS_Polytrope_Scalars
+ USE EOS_Hybrid_Scalars
+
+ implicit none
+
+ DECLARE_CCTK_PARAMETERS
+
+ CCTK_REAL rho, eps, local_eos_gamma, p_poly, p_th, local_eos_k_cgs, zero
+
+ zero = 0.d0
+
+ if (rho > rho_nuc) then
+ local_eos_gamma = eos_gamma_supernuclear
+ local_eos_k_cgs = eos_k_supernuclear_cgs
+ else
+ local_eos_gamma = eos_gamma
+ local_eos_k_cgs = eos_k_cgs
+ end if
+
+ p_poly = p_geom_factor * local_eos_k_cgs *
+ . (rho * rho_geom_factor_inv)**local_eos_gamma
+
+ p_th = - p_geom_factor * local_eos_k_cgs * (eos_gamma_th - 1.d0) /
+ . (local_eos_gamma - 1.d0) * (rho * rho_geom_factor_inv)**local_eos_gamma +
+ . (eos_gamma_th - 1.d0) * rho * eps -
+ . (eos_gamma_th - 1.d0) * (local_eos_gamma - eos_gamma) /
+ . (eos_gamma - 1.d0) / (eos_gamma_supernuclear - 1.d0) *
+ . p_geom_factor * eos_k_cgs * rho_geom_factor_inv**eos_gamma *
+ . rho_nuc**(eos_gamma - 1.d0) * rho
+
+ p_th = max(zero, p_th)
+
+ EOS_Hybrid_Pressure = p_poly + p_th
+
+ end function EOS_Hybrid_Pressure
+
+c The specific internal energy isn''t correct yet
+
+ CCTK_REAL function EOS_Hybrid_SpecificIE(rho, press)
+
+ USE EOS_Polytrope_Scalars
+ USE EOS_Hybrid_Scalars
+
+ implicit none
+ DECLARE_CCTK_PARAMETERS
+
+ CCTK_REAL rho, press
+
+c$$$ if (rho > rho_nuc) then
+c$$$ EOS_Hybrid_SpecificIE = eos_k_cgs / (eos_gamma_2 - 1.d0) *
+c$$$ . (rho / rho_nuc) ** eos_gamma_2 * rho_nuc ** eos_gamma_1 /
+c$$$ . rho +
+c$$$ . eos_k_cgs * (eos_gamma_2 - eos_gamma_1) /
+c$$$ . (eos_gamma_2 - 1.d0) / (eos_gamma_1 - 1.d0) *
+c$$$ . rho_nuc ** (eos_gamma_1 - 1.d0)
+c$$$ else
+c$$$ EOS_Hybrid_SpecificIE = eos_k_cgs * (rho ** (eos_gamma_1 - 1.d0)) /
+c$$$ . (eos_gamma_1 - 1.d0)
+c$$$ end if
+
+ EOS_Hybrid_SpecificIE = 2.34567890d0
+
+ end function EOS_Hybrid_SpecificIE
+
+c The rest mass density isn''t correct yet
+
+ CCTK_REAL function EOS_Hybrid_RestMassDens(eps, press)
+
+ implicit none
+ DECLARE_CCTK_PARAMETERS
+
+ CCTK_REAL eps, press
+
+ EOS_Hybrid_RestMassDens = 1.23456789d0
+
+ end function EOS_Hybrid_RestMassDens
+
+ CCTK_REAL function EOS_Hybrid_DPressByDRho(rho, eps)
+
+ USE EOS_Polytrope_Scalars
+ USE EOS_Hybrid_Scalars
+
+ implicit none
+ DECLARE_CCTK_PARAMETERS
+
+ CCTK_REAL rho, eps, local_eos_gamma, local_eos_k_cgs, d_p_poly, d_p_th_1,
+ . d_p_th_2, zero
+
+ zero = 0.d0
+
+ if (rho > rho_nuc) then
+ local_eos_gamma = eos_gamma_supernuclear
+ local_eos_k_cgs = eos_k_supernuclear_cgs
+ else
+ local_eos_gamma = eos_gamma
+ local_eos_k_cgs = eos_k_cgs
+ end if
+
+ d_p_poly = local_eos_gamma * p_geom_factor * local_eos_k_cgs *
+ . rho**(local_eos_gamma - 1.d0) * rho_geom_factor_inv**local_eos_gamma
+
+ d_p_th_1 = - local_eos_gamma * p_geom_factor * local_eos_k_cgs *
+ . (eos_gamma_th - 1.d0) / (local_eos_gamma - 1.d0) *
+ . rho**(local_eos_gamma - 1.d0) * rho_geom_factor_inv**local_eos_gamma
+
+ d_p_th_2 = (eos_gamma_th - 1.d0) * eps
+ . - (eos_gamma_th - 1.d0) * (local_eos_gamma - eos_gamma) /
+ . (eos_gamma - 1.d0) / (eos_gamma_supernuclear - 1.d0) *
+ . p_geom_factor * eos_k_cgs * rho_geom_factor_inv**eos_gamma *
+ . rho_nuc**(eos_gamma - 1.d0)
+
+! d_p_th_1 = max(d_p_th_1, zero)
+! d_p_th_2 = max(d_p_th_2, zero)
+
+ EOS_Hybrid_DPressByDRho = d_p_poly + d_p_th_1 + d_p_th_2
+
+ end function EOS_Hybrid_DPressByDRho
+
+ CCTK_REAL function EOS_Hybrid_DPressByDEps(rho, eps)
+
+ implicit none
+ DECLARE_CCTK_PARAMETERS
+
+ CCTK_REAL rho, eps
+
+ EOS_Hybrid_DPressByDEps = (eos_gamma_th - 1.d0) * rho
+
+ end function EOS_Hybrid_DPressByDEps
diff --git a/src/EOS_Hybrid_Analysis.F b/src/EOS_Hybrid_Analysis.F
new file mode 100644
index 0000000..9f82a41
--- /dev/null
+++ b/src/EOS_Hybrid_Analysis.F
@@ -0,0 +1,76 @@
+ /*@@
+ @file EOS_Hybrid_Analysis.F
+ @date Fri Apr 26 16:14:47 2002
+ @author Harry Dimmelmeier, Ian Hawke, Christian Ott
+ @desc
+ Calculates the polytropic and thermal contributions to the
+ total pressure.
+ @enddesc
+ @@*/
+
+#include "cctk.h"
+#include "cctk_Arguments.h"
+#include "cctk_Parameters.h"
+
+ /*@@
+ @routine Check_Poly_Contrib
+ @date Fri Apr 26 16:25:35 2002
+ @author Harry Dimmelmeier, Ian Hawke, Christian Ott
+ @desc
+ The routine that calculates the contributions.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+@@*/
+
+ subroutine Check_Poly_Contrib(CCTK_ARGUMENTS)
+
+ USE EOS_Polytrope_Scalars
+ USE EOS_Hybrid_Scalars
+
+ implicit none
+
+ DECLARE_CCTK_ARGUMENTS
+ DECLARE_CCTK_PARAMETERS
+
+ CCTK_INT :: i,j,k
+
+
+ CCTK_REAL local_eos_gamma, local_eos_k_cgs, d_p_poly, d_p_th_1,
+ . d_p_th_2, zero
+
+ do k = 1, cctk_lsh(3)
+ do j = 1, cctk_lsh(2)
+ do i = 1, cctk_lsh(1)
+
+ if (rho(i,j,k) > rho_nuc) then
+ local_eos_gamma = eos_gamma_supernuclear
+ local_eos_k_cgs = eos_k_supernuclear_cgs
+ else
+ local_eos_gamma = eos_gamma
+ local_eos_k_cgs = eos_k_cgs
+ end if
+
+ pressure_poly(i,j,k) = p_geom_factor * local_eos_k_cgs *
+ . (rho(i,j,k) * rho_geom_factor_inv)**local_eos_gamma
+
+ pressure_th(i,j,k) = - p_geom_factor * local_eos_k_cgs *
+ . (eos_gamma_th - 1.d0) / (local_eos_gamma - 1.d0) *
+ . (rho(i,j,k) * rho_geom_factor_inv)**local_eos_gamma +
+ . (eos_gamma_th - 1.d0) * rho(i,j,k) * eps(i,j,k) -
+ . (eos_gamma_th - 1.d0) * (local_eos_gamma - eos_gamma) /
+ . (eos_gamma - 1.d0) / (eos_gamma_supernuclear - 1.d0) *
+ . p_geom_factor * eos_k_cgs *
+ . rho_geom_factor_inv**eos_gamma *
+ . rho_nuc**(eos_gamma - 1.d0) * rho(i,j,k)
+
+c$$$ pressure_th(i,j,k) = dmax1(0.d0, pressure_th(i,j,k))
+
+ end do
+ end do
+ end do
+
+ end subroutine Check_Poly_Contrib
diff --git a/src/EOS_Hybrid_Scalars.F b/src/EOS_Hybrid_Scalars.F
new file mode 100644
index 0000000..3e85c39
--- /dev/null
+++ b/src/EOS_Hybrid_Scalars.F
@@ -0,0 +1,18 @@
+ /*@@
+ @file EOS_Hybrid_Scalars.F
+ @date Fri Apr 26 13:14:18 2002
+ @author Harry Dimmelmeier, Ian Hawke, Christian Ott
+ @desc
+ Constant for the EOS routines.
+ @enddesc
+ @@*/
+
+#include "cctk.h"
+
+ module EOS_Hybrid_Scalars
+
+ implicit none
+
+ CCTK_REAL :: eos_k_supernuclear_cgs
+
+ end module EOS_Hybrid_Scalars
diff --git a/src/EOS_Hybrid_Startup.F b/src/EOS_Hybrid_Startup.F
new file mode 100644
index 0000000..24111d4
--- /dev/null
+++ b/src/EOS_Hybrid_Startup.F
@@ -0,0 +1,84 @@
+ /*@@
+ @file EOS_Hybrid_Startup.F
+ @date Wed Mar 20 14:50:22 2002
+ @author Ian Hawke
+ @desc
+ Startup for EOS_Hybrid.
+ @enddesc
+ @@*/
+
+#include "cctk.h"
+#include "cctk_Parameters.h"
+
+ /*@@
+ @routine EOS_Hybrid_Startup
+ @date Wed Mar 20 14:52:41 2002
+ @author Ian Hawke
+ @desc
+ Startup for EOS_Hybrid
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+@@*/
+
+ integer function EOS_Hybrid_Startup()
+
+ USE EOS_Polytrope_Scalars
+ USE EOS_Hybrid_Scalars
+
+ implicit none
+
+ DECLARE_CCTK_PARAMETERS
+
+ integer handle, ierr
+
+ external EOS_Hybrid_Pressure
+ external EOS_Hybrid_SpecificIE
+ external EOS_Hybrid_RestMassDens
+ external EOS_Hybrid_DPressByDRho
+ external EOS_Hybrid_DPressByDEps
+
+ call EOS_RegisterMethod(handle,"EOS_Hybrid")
+
+ if (handle .ge. 0) then
+
+ call EOS_RegisterPressure(ierr, handle, EOS_Hybrid_Pressure)
+ call EOS_RegisterSpecificIntEnergy(ierr, handle,
+ . EOS_Hybrid_SpecificIE)
+ call EOS_RegisterRestMassDens(ierr, handle,
+ . EOS_Hybrid_RestMassDens)
+ call EOS_RegisterDPressByDRho(ierr, handle,
+ . EOS_Hybrid_DPressByDRho)
+ call EOS_RegisterDPressByDEps(ierr, handle,
+ . EOS_Hybrid_DPressByDEps)
+
+ else
+
+ call CCTK_WARN(0, "Unable to register the EOS method!")
+
+ end if
+
+c$$$ all these are now set by the polytropic EOS
+
+c$$$ These constants match the values in RNSID: consts.h
+
+c$$$ m_solar_cgs = 1.987d33
+c$$$ c_cgs = 2.9979d10
+c$$$ G_cgs = 6.6732d-8
+c$$$
+c$$$ m_solar_geom = G_cgs / c_cgs**2 * m_solar_cgs
+c$$$ p_geom_factor = G_cgs / c_cgs**4 * m_solar_geom**2
+c$$$ rho_geom_factor = p_geom_factor * c_cgs**2
+c$$$ rho_geom_factor_inv = 1.d0 / rho_geom_factor
+c$$$
+c$$$ eos_k_cgs = eos_k * rho_geom_factor**gamma_ini / p_geom_factor
+
+ eos_k_supernuclear_cgs = eos_k_cgs * (rho_nuc * rho_geom_factor_inv)**
+ . (eos_gamma - eos_gamma_supernuclear)
+
+ EOS_Hybrid_Startup = 0
+
+ end function EOS_Hybrid_Startup
diff --git a/src/make.code.defn b/src/make.code.defn
new file mode 100644
index 0000000..103c9f0
--- /dev/null
+++ b/src/make.code.defn
@@ -0,0 +1,12 @@
+# Main make.code.defn file for thorn EOS_Hybrid
+# $Header$
+
+# Source files in this directory
+SRCS = EOS_Hybrid.F \
+ EOS_Hybrid_Analysis.F \
+ EOS_Hybrid_Scalars.F \
+ EOS_Hybrid_Startup.F
+
+# Subdirectories containing source files
+SUBDIRS =
+
diff --git a/src/make.code.deps b/src/make.code.deps
new file mode 100644
index 0000000..76300b4
--- /dev/null
+++ b/src/make.code.deps
@@ -0,0 +1,5 @@
+# Module dependencies for thorn EOS_Hybrid
+
+EOS_Hybrid.F.o: EOS_Hybrid_Scalars.F.o
+EOS_Hybrid_Analysis.F.o: EOS_Hybrid_Scalars.F.o
+EOS_Hybrid_Startup.F.o: EOS_Hybrid_Scalars.F.o \ No newline at end of file
diff --git a/src/make.configuration.deps b/src/make.configuration.deps
new file mode 100644
index 0000000..a1d3ce6
--- /dev/null
+++ b/src/make.configuration.deps
@@ -0,0 +1,5 @@
+# Make sure that EOS_Polytrope is compiled first
+
+ifneq (,$(findstring EUHydro/EOS_Polytrope,$(THORNS)))
+$(CCTK_LIBDIR)$(DIRSEP)libEOS_Hybrid.a : $(CCTK_LIBDIR)$(DIRSEP)libEOS_Polytrope.a
+endif