aboutsummaryrefslogtreecommitdiff
path: root/doc/documentation.tex
blob: 5f7d36f3fa29fc5026bbdaa4932f341d57759209 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
% *======================================================================*
%  Cactus Thorn template for ThornGuide documentation
%  Author: Ian Kelley
%  Date: Sun Jun 02, 2002
%  $Header$
%
%  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
%  relevant 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 separated with a \\ or a comma.
%   - You can define your own macros, but they must appear after
%     the START CACTUS THORNGUIDE line, and must 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 graphicx package.
%     More specifically, with the "\includegraphics" command.  Do
%     not specify any graphic file extensions in your .tex file. This
%     will allow us 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{...}
%   - Do not use \appendix, instead include any appendices you need as
%     standard sections.
%   - 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/}}
%
% *======================================================================*

% If you are using CVS use this line to give version information
% $Header$

\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/latex/cactus}

\begin{document}

% The author of the documentation
\author{Christian D. Ott \textless cott@tapir.caltech.edu\textgreater}

% The title of the document (not necessarily the name of the Thorn)
\title{EOS\_Omni}

% the date your document was last changed, if your document is in CVS,
% please use:
%    \date{$ $Date: 2004-01-07 12:12:39 -0800 (Wed, 07 Jan 2004) $ $}
\date{June 27 2010}

\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}
This Thorn provides a unified EOS interface and implements
multiple EOS. These currently are the polytropic EOS, the
gamma-law EOS, and the hybrid EOS.
\end{abstract}

% The following sections are suggestive only.
% Remove them or add your own.

\section{Introduction}

Equations of State (EOS) are crucial for hydrodynamics and hydro
codes (as well as other codes needing/providing microphysics)
are closely coupled to EOS and call EOS routines many times for
each grid point during the caculation of a time update.

{\tt EOS\_Omni} is presently coded for cold and hot EOS, 
including those based on microphysical models. It does currently
assume nuclear statistical equilibrium (NSE) with density,
specific internal energy (or temperature), and electron fraction
being the independent variables. {\tt EOS\_Omni} may be called
on vectors or on single points.

\section{Using This Thorn}


\subsection{Basic Usage}

{\tt EOS\_Omni} works via the aliased-function interface and
EOS functions to be used must be declared in {\tt interface.ccl}.
Here is an example call/{interface.ccl} entry:
\begin{verbatim}
void FUNCTION EOS_Omni_press(CCTK_INT IN eoskey,         \
                             CCTK_INT IN havetemp,       \
                             CCTK_INT IN npoints,        \
                             CCTK_REAL IN ARRAY rho,     \
                             CCTK_REAL INOUT ARRAY eps,  \
                             CCTK_REAL INOUT ARRAY temp, \
                             CCTK_REAL IN ARRAY ye,      \
                             CCTK_REAL OUT ARRAY press,  \
                             CCTK_INT OUT ARRAY keyerr,  \
                             CCTK_INT OUT anyerr)
\end{verbatim}

Here, 
\begin{itemize}
\item {\tt eoskey} is the type of EOS to be used in this call.
  \begin{itemize}
    \item {\tt eoskey = 1}: Polytropic EOS
    \item {\tt eoskey = 2}: Gamma-Law EOS
    \item {\tt eoskey = 3}: Hybrid EOS (2 Polys, 1 Gamma-Law), used
      for core-collapse simulations.
  \end{itemize}
\item {\tt havetemp} tells the EOS if the call is $X=X(\rho,T,Y_e)$
  ({\tt havetemp = 1}) or $X=X(\rho,\epsilon,Y_e)$  ({\tt havetemp = 0}),
\item {\tt npoints} tells the EOS how many data points are passed
  in,
\item {\tt rho,eps,temp,ye,press} are obvious,
\item {\tt keyerr} is an array (with n entries for n data points)
  containing error codes (relevant only for tabular EOS),
\item {\tt anyerr} is an integer that is .gt. 0 in the case
  any error occured.
\end{itemize}

\subsection{Parameter Settings}

Many hydro codes require a fallback EOS in case something goes
wrong. This is also true for the Einstein Toolkit GR hydro code {\tt
EinsteinEvolve/GRHydro}. If you want to use {\tt EOS\_Omni} with {\tt
GRHydro}, you must set parameters for the EOS of your choice and, {\bf
in addition}, the following parameters must be set to sensible values:

\begin{verbatim}
eos_omni::poly_gamma 
eos_omni::poly_gamma_ini 
eos_omni::poly_k 
\end{verbatim}

The only non-obvious parameter here is {\tt poly\_gamma\_ini}.
In most simulations it should be set equal to {\tt poly\_gamma}.
In simulations that are run with a different adiabatic index than
what was used to set up the initial data, {\tt poly\_gamma} should
be the evolution value, and {\tt poly\_gamma\_ini} should be the initial
data value.

Check out {\tt param.ccl} for parameters for other EOS.

\subsection{Special Behavior}

If special behavior occurs, please report it to {\tt cott@tapir.caltech.edu}.

%\begin{thebibliography}{9}

%\end{thebibliography}

% Do not delete next line
% END CACTUS THORNGUIDE

\end{document}