eos_had_hlps.h
Go to the documentation of this file.
1 /*
2  -------------------------------------------------------------------
3 
4  Copyright (C) 2014-2017, Andrew W. Steiner
5 
6  This file is part of O2scl.
7 
8  O2scl is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 3 of the License, or
11  (at your option) any later version.
12 
13  O2scl is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with O2scl. If not, see <http://www.gnu.org/licenses/>.
20 
21  -------------------------------------------------------------------
22 */
23 /** \file eos_had_hlps.h
24  \brief File defining \ref o2scl::eos_had_hlps
25 */
26 #ifndef O2SCL_HLPS_EOS_H
27 #define O2SCL_HLPS_EOS_H
28 
29 #include <iostream>
30 
31 #include <o2scl/poly.h>
32 #include <o2scl/fermion.h>
33 #include <o2scl/eos_had_base.h>
34 
35 #ifndef DOXYGEN_NO_O2NS
36 namespace o2scl {
37 #endif
38 
39  /** \brief Schematic EOS from Hebeler et al.
40 
41  The energy per baryon is
42  \f[
43  E/A = \left( 3 \pi^2 n_0/2 \right)^{2/3} \frac{1}{2 M}
44  \left\{ \frac{3}{5} \left[ x^{5/3} + (1-x)^{5/3} \right] (2 u)^{2/3}-
45  [(2 \alpha - 4 \alpha_L) x (1-x)+\alpha_L] u +
46  \left[ (2 \eta - 4 \eta_L) x (1-x) + \eta_L \right] u^{\gamma} \right\}
47  \f]
48  where \f$ u = n/n_0 \f$ .
49 
50  One can fix the values of \f$ \alpha, \eta, \f$ and \f$ \gamma \f$
51  by the requirement that the pressure is zero at saturation and
52  by fixing the binding energy and incompressibility.
53 
54  Note that the original reference has a typo in the pressure in
55  Eq. 3. The \f$ 2/5 \f$ factor in front should be \f$ 1/5 \f$ .
56 
57  See Ref. \ref Hebeler13eo .
58  */
60 
61  protected:
62 
63  /// To solve quadratic equation for 'gamma'
65 
66  public:
67 
68  /// \name Constants (all unitless)
69  //@{
70  double gamma;
71  double alpha;
72  double eta;
73  double alphaL;
74  double etaL;
75  //@}
76 
77  eos_had_hlps();
78 
79  virtual ~eos_had_hlps() {};
80 
81  /** \brief Fix 'alpha', 'eta' and 'gamma' from saturation
82  properties
83 
84  All inputs must be in \f$ \mathrm{fm}^{-1} \f$. This employs a
85  simple iterative method that may not always converge.
86  */
87  void fix_coeffs(double M, double local_n0, double B, double K);
88 
89  /** \brief Fix 'alphaL' and 'etaL' from neutron matter EOS and its
90  derivative
91 
92  The parameters \c M and \c Eneut must be in
93  \f$ \mathrm{fm}^{-1} \f$ and \c dEneut must be in
94  \f$ \mathrm{fm}^{2} \f$
95  */
96  void fix_neutron_matter(double M, double local_n0,
97  double Eneut, double dEneut);
98 
99  /** \brief
100  */
101  void fix_SL(double M, double local_n0, double S, double L);
102 
103  /** \brief Equation of state as a function of density
104  */
105  virtual int calc_e(fermion &ln, fermion &lp,
106  thermo &lth);
107 
108  /// Return string denoting type ("eos_had_hlps")
109  virtual const char *type() { return "eos_had_hlps"; }
110 
111  };
112 
113 #ifndef DOXYGEN_NO_O2NS
114 }
115 #endif
116 
117 #endif
virtual int calc_e(fermion &ln, fermion &lp, thermo &lth)
Equation of state as a function of density.
void fix_neutron_matter(double M, double local_n0, double Eneut, double dEneut)
Fix &#39;alphaL&#39; and &#39;etaL&#39; from neutron matter EOS and its derivative.
Schematic EOS from Hebeler et al.
Definition: eos_had_hlps.h:59
A hadronic EOS based on a function of the densities [abstract base].
Definition: eos_had_base.h:932
virtual const char * type()
Return string denoting type ("eos_had_hlps")
Definition: eos_had_hlps.h:109
quadratic_real_coeff_gsl quad
To solve quadratic equation for &#39;gamma&#39;.
Definition: eos_had_hlps.h:64
void fix_coeffs(double M, double local_n0, double B, double K)
Fix &#39;alpha&#39;, &#39;eta&#39; and &#39;gamma&#39; from saturation properties.

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).