apr_eos.h

00001 /*
00002   -------------------------------------------------------------------
00003   
00004   Copyright (C) 2006, 2007, 2008, Andrew W. Steiner
00005   
00006   This file is part of O2scl.
00007   
00008   O2scl is free software; you can redistribute it and/or modify
00009   it under the terms of the GNU General Public License as published by
00010   the Free Software Foundation; either version 3 of the License, or
00011   (at your option) any later version.
00012   
00013   O2scl is distributed in the hope that it will be useful,
00014   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016   GNU General Public License for more details.
00017   
00018   You should have received a copy of the GNU General Public License
00019   along with O2scl. If not, see <http://www.gnu.org/licenses/>.
00020 
00021   -------------------------------------------------------------------
00022 */
00023 #ifndef O2SCL_APR_EOS_H
00024 #define O2SCL_APR_EOS_H
00025 
00026 #include <cmath>
00027 #include <o2scl/constants.h>
00028 #include <o2scl/hadronic_eos.h>
00029 #include <o2scl/fermion.h>
00030 #include <o2scl/nonrel_fermion.h>
00031 
00032 #ifndef DOXYGENP
00033 namespace o2scl {
00034 #endif
00035 
00036   /** 
00037       \brief EOS from Akmal, Pandharipande, and Raveno2scll (zero temperature).
00038 
00039       Taken from \ref Akmal98.
00040 
00041       The chemical potentials include the rest mass energy and the 
00042       energy density includes the rest mass energy density.
00043 
00044       Note that APR seems to have been designed to be used with
00045       non-relativistic neutrons and protons with equal masses of 939
00046       MeV. This gives a saturation density very close to 0.16.
00047   
00048       The Hamiltonian is:
00049       \f[
00050       {\cal H}_{APR} = {\cal H}_{kin} + {\cal H}_{pot}
00051       \f]
00052 
00053       \f[
00054       {\cal H}_{kin} = \left( \frac{\hbar^2}{2 m} + 
00055       \left( p_3 + \left( 1 - x \right) 
00056       p_5 \right) n e^{-p_4 n} \right) \tau_n + 
00057       \left( \frac{\hbar^2}{2 m} + \left( p_3 + x 
00058       p_5 \right) n e^{-p_4 n} \right) \tau_p
00059       \f]
00060 
00061       \f[
00062       {\cal H}_{pot} =
00063       g_1 \left( 1 - \left( 1 - 2 x \right)^2 \right) +
00064       g_2 \left( 1 - 2 x \right)^2
00065       \f]
00066 
00067       The following are definitions for \f$ g_i \f$ in the low-density phase
00068       (LDP) or the high-density phase (HDP):
00069 
00070       \f[
00071       g_{1,LDP} = -n^2 \left( p_1 + p_2 n + p_6 n^2 + 
00072       \left( p_{10} + p_{11} n \right) e^{-p_9^2 n^2} \right) 
00073       \f]
00074 
00075       \f[
00076       g_{2,LDP} = -n^2 \left( p_{12}/n + p_7 + p_8 n + 
00077       p_{13} e^{-p_9^2 n^2} \right) 
00078       \f]
00079 
00080       \f[
00081       g_{1,HDP} = g_{1,LDP} -n^2 \left( p_{17} \left( n - p_{19} \right)
00082       + p_{21} \left( n - p_{19} \right)^2 e^{p_{18} 
00083       \left( n - p_{19} \right) } 
00084       \right)
00085       \f]
00086 
00087       \f[
00088       g_{2,HDP} = g_{2,LDP} -n^2 \left( p_{15} \left( n - p_{20} \right)
00089       + p_{14} \left( n - p_{20} \right)^2 e^{p_{16} 
00090       \left( n - p_{20} \right)} 
00091       \right)
00092       \f] 
00093 
00094       The variables \f$ \nu_n\f$ and \f$ \nu_p\f$ contain the expressions 
00095       \f$ (-\mu_n+V_n)/T \f$ and \f$ (-\mu_p+V_p)/T \f$ 
00096       respectively, where \f$ V \f$ is the potential part
00097       of the single particle energy for particle i (i.e. the derivative
00098       of the Hamiltonian w.r.t. density while energy density held constant).
00099       Equivalently, \f$ \nu_n\f$ is just \f$ -k_{F_n}^2/ 2 m^{*} \f$.
00100 
00101       The finite temperature approximations from \ref Prakash97 (see
00102       also the "Windsurfing the Fermi Sea" proceedings) are used in
00103       testing.
00104 
00105       \note Since this EOS uses the effective masses and chemical
00106       potentials in the fermion class, the values of
00107       part::non_interacting for neutrons and protons are set to false
00108       in many of the functions.
00109       
00110       \todo Improve testing
00111   */
00112   class apr_eos : public hadronic_eos {
00113 
00114 #ifndef DOXYGEN_INTERNAL
00115 
00116   protected:
00117 
00118     /// Storage for the parameters
00119     double *par;
00120 
00121     /// An integer to indicate which phase was used in calc_e()
00122     int lp;
00123 
00124 #endif
00125 
00126   public:
00127     apr_eos();
00128 
00129     virtual ~apr_eos();
00130 
00131     /** 
00132         \name Choose phase
00133     
00134         0 = use phase which minimizes energy (default) \n
00135         1 = LDP (no pion condensation) \n
00136         2 = HDP (pion condensation) \n
00137     */
00138     //@{
00139     static const int best=0;
00140     static const int ldp=1;
00141     static const int hdp=2;
00142     int pion;
00143     //@}
00144 
00145     /** \brief Equation of state as a function of density
00146      */
00147     virtual int calc_e(fermion &n, fermion &p, thermo &th);
00148     
00149     /// Equation of state as a function of densities
00150     virtual int calc_temp_e(fermion &n, fermion &pr, const double temper, 
00151                             thermo &th);
00152     
00153     /** \brief Return the phase of the most recent call to calc_e()
00154      */
00155     int last_phase() { return lp; }
00156 
00157     /** 
00158         \brief Compute the compressibility
00159 
00160         See general notes at hadronic_eos::fcomp(). This computes the
00161         compressibility (at fixed proton fraction = 0.5) exactly,
00162         unless \ref parent_method is true in which case the derivative
00163         is taken numerically in hadronic_eos::fcomp().
00164      */
00165     double fcomp(double nb);
00166 
00167     /** \brief Calculate symmetry energy of matter as energy of 
00168         neutron matter minus the energy of nuclear matter
00169 
00170         This function returns the energy per baryon of neutron matter
00171         minus the energy per baryon of nuclear matter. This will
00172         deviate significantly from the results from fesym() only if
00173         the dependence of the symmetry energy on \f$ \delta \f$ is not
00174         quadratic.
00175     */
00176     double fesym_diff(double nb);
00177 
00178     /** 
00179         \brief Select model
00180 
00181         Valid values for \c model_index are: \n
00182         1 - A18+UIX*+deltav (preferred by Akmal, et. al. - this is 
00183         the default) \n
00184         2 - A18+UIX* \n
00185         3 - A18+deltav \n
00186         4 - A18 \n
00187 
00188         If any other integer is given, A18+UIX*+deltav is assumed.
00189     */
00190     void select(int model_index);
00191 
00192     /** 
00193         \brief Calculate Q's for semi-infinite nuclear matter
00194     
00195         For general discussion, see the documentation to hadronic_eos::qs().
00196 
00197         For APR, we set \f$ x_1=x_2=0 \f$ so that \f$ Q_i=P_i/2 \f$ and then
00198         \f{eqnarray*}
00199         P_1 &=& \left(\frac{1}{2} p_3-p_5 \right) e^{-p_4 n}
00200         \nonumber \\
00201         P_2 &=& \left(\frac{1}{2} p_3+p_5 \right) e^{-p_4 n}
00202         \f}
00203 
00204         This gives
00205         \f{eqnarray*}
00206         Q_{nn}&=&\frac{1}{4} e^{-p_4 \rho}
00207         \left[ -6 p_5 - p_4 (p_3 - 2 p_5) (n_n + 2 n_p) \right]
00208         \nonumber \\
00209         Q_{np}&=&\frac{1}{8} e^{-p_4 \rho}
00210         \left[ 4 (p_3 - 4 p_5) - 3 p_4 (p_3 - 2 p_5) (n_n + n_p)\right]
00211         \nonumber \\
00212         Q_{pp}&=&\frac{1}{4} e^{-p_4 \rho}
00213         \left[ -6 p_5 - p_4 (p_3 - 2 p_5) (n_p + 2 n_n) \right]
00214         \f}
00215 
00216         \htmlonly
00217         See the Mathematica notebook
00218         <a href="apr_eos.nb">
00219         apr_eos.nb</a>, and
00220         <a href="apr_eos.ps">
00221         apr_eos.ps</a>.
00222         \endhtmlonly
00223         \latexonly
00224         See the Mathematica notebook
00225         \begin{verbatim}
00226         doc/o2scl/extras/apr_eos.nb
00227         doc/o2scl/extras/apr_eos.ps
00228         \end{verbatim}
00229         \endlatexonly
00230     */
00231     int gradient_qij2(double nn, double np, 
00232                       double &qnn, double &qnp, double &qpp, 
00233                       double &dqnndnn, double &dqnndnp,
00234                       double &dqnpdnn, double &dqnpdnp,
00235                       double &dqppdnn, double &dqppdnp);
00236 
00237     /** \brief Get the value of one of the parameters
00238      */
00239     double get_par(int n) {
00240       if (n<23 && n>0) return par[n];
00241       return 0.0;
00242     }
00243 
00244     /** \brief Set the value of one of the parameters
00245      */
00246     int set_par(int n, double x) {
00247       if (n<23 && n>0) par[n]=x;
00248       return 0;
00249     }
00250 
00251     /// Default nonrelativistic neutron
00252     nonrel_fermion def_nr_neutron;
00253 
00254     /// Default nonrelativistic proton
00255     nonrel_fermion def_nr_proton;
00256 
00257     /// Return string denoting type ("apr_eos")
00258     virtual const char *type() { return "apr_eos"; }
00259 
00260     /** 
00261         \brief If true, use the methods from hadronic_eos for fcomp()
00262 
00263         This can be set to true to check the difference in the
00264         compressibility wbetween the exact expressions and the
00265         numerical values from class hadronic_eos.
00266     */
00267     bool parent_method;
00268     
00269 #ifndef DOXYGEN_INTERNAL
00270     
00271   protected:
00272 
00273     friend class io_tlate<apr_eos>;
00274     
00275     /// The variable indicating which parameter set is to be used
00276     int choice;
00277     
00278 #endif
00279     
00280   };
00281 
00282   template<> int io_tlate<apr_eos>::input
00283     (cinput *co, in_file_format *ins, apr_eos *ap);
00284   template<> int io_tlate<apr_eos>::output
00285     (coutput *co, out_file_format *outs, apr_eos *ap);
00286   template<> const char *io_tlate<apr_eos>::type();
00287   
00288   typedef io_tlate<apr_eos> apr_eos_io_type;
00289 
00290 #ifndef DOXYGENP
00291 }
00292 #endif
00293 
00294 #endif

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page