All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
eos_had_hlps.h
Go to the documentation of this file.
1 /*
2  -------------------------------------------------------------------
3 
4  Copyright (C) 2014, 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  From an energy per baryon of
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] +
46  \left[ (2 \eta - 4 \eta_L) x (1-x) + \eta_L \right] u^{\gamma} \right\}
47  \f]
48 
49  One can fix the values of \f$ \alpha, \eta, \f$ and \f$ \gamma \f$
50  by the requirement that the pressure is zero at saturation and
51  by fixing the binding energy and incompressibility.
52 
53  Note that the original reference has a typo in the pressure in
54  Eq. 3. The \f$ 2/5 \f$ factor in front should be \f$ 1/5 \f$ .
55 
56  See Ref. \ref Hebeler13 .
57  */
59 
60  protected:
61 
62  /// To solve quadratic equation for 'gamma'
64 
65  public:
66 
67  /// \name Constants (all unitless)
68  //@{
69  double gamma;
70  double alpha;
71  double eta;
72  double alphaL;
73  double etaL;
74  //@}
75 
76  eos_had_hlps();
77 
78  virtual ~eos_had_hlps() {};
79 
80  /** \brief Fix 'alpha', 'eta' and 'gamma' from saturation
81  properties
82 
83  All inputs must be in \f$ \mathrm{fm}^{-1} \f$. This employs a
84  simple iterative method that may not always converge.
85  */
86  void fix_coeffs(double M, double B, double K);
87 
88  /** \brief Fix 'alphaL' and 'etaL' from neutron matter EOS and its
89  derivative
90 
91  The parameters \c M and \c Eneut must be in
92  \f$ \mathrm{fm}^{-1} \f$ and \c dEneut must be in
93  \f$ \mathrm{fm}^{2} \f$
94  */
95  void fix_neutron_matter(double M, double Eneut, double dEneut);
96 
97  /** \brief Equation of state as a function of density
98  */
99  virtual int calc_e(fermion &ln, fermion &lp,
100  thermo &lth);
101 
102  /// Return string denoting type ("eos_had_hlps")
103  virtual const char *type() { return "eos_had_hlps"; }
104 
105  };
106 
107 #ifndef DOXYGEN_NO_O2NS
108 }
109 #endif
110 
111 #endif
virtual int calc_e(fermion &ln, fermion &lp, thermo &lth)
Equation of state as a function of density.
void fix_coeffs(double M, double B, double K)
Fix 'alpha', 'eta' and 'gamma' from saturation properties.
Schematic EOS from Hebeler et al.
Definition: eos_had_hlps.h:58
A hadronic EOS based on a function of the densities [abstract base].
Definition: eos_had_base.h:825
virtual const char * type()
Return string denoting type ("eos_had_hlps")
Definition: eos_had_hlps.h:103
void fix_neutron_matter(double M, double Eneut, double dEneut)
Fix 'alphaL' and 'etaL' from neutron matter EOS and its derivative.
quadratic_real_coeff_gsl quad
To solve quadratic equation for 'gamma'.
Definition: eos_had_hlps.h:63

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).
Hosted at Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads..