eos_had_sym4.h
Go to the documentation of this file.
1 /*
2  -------------------------------------------------------------------
3 
4  Copyright (C) 2006-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_sym4.h
24  \brief File defining \ref o2scl::eos_had_sym4
25 */
26 #ifndef O2SCL_SYM4_EOS_H
27 #define O2SCL_SYM4_EOS_H
28 
29 #include <iostream>
30 #include <o2scl/eos_had_apr.h>
31 #include <o2scl/eos_had_rmf.h>
32 #include <o2scl/eos_had_skyrme.h>
33 #include <o2scl/eos_had_potential.h>
34 #include <o2scl/test_mgr.h>
35 
36 #ifndef DOXYGEN_NO_O2NS
37 namespace o2scl {
38 #endif
39 
40  /** \brief A class to compute quartic contributions to the symmetry
41  energy [abstract base]
42 
43  The standard usage is that a child class implements the virtual
44  function calc_e_sep() which is then used by calc_e_alpha()
45  and calc_muhat(). These functions are employed by \ref eos_had_sym4
46  to compute the EOS for an arbitrary dependence of the
47  symmetry energy on the isospin.
48 
49  \hline
50  <b>References:</b>
51 
52  Created for \ref Steiner06.
53 
54  \bug Testing hasn't been working recently, especially for
55  MDI-like models.
56  */
58 
59 #ifndef DOXYGEN_INTERNAL
60 
61  protected:
62 
63  /// An electron for the computation of the \f$ \hat{\mu}\f$
65 
66  /// Zero-temperature fermion thermodynamics
68 
69 #endif
70 
71  public:
72 
74 
75  virtual ~eos_had_sym4_base() {}
76 
77  /** \brief Compute alpha at the specified density
78  */
79  virtual int calc_e_alpha(fermion &ne, fermion &pr, thermo &lth,
80  double &alphak, double &alphap, double &alphat,
81  double &diff_kin, double &diff_pot,
82  double &ed_kin_nuc, double &ed_pot_nuc);
83 
84  /** \brief Compute \f$ \hat{\mu} \f$, the out-of-whack parameter
85  */
86  virtual double calc_muhat(fermion &ne, fermion &pr);
87 
88  /** \brief Compute the potential and kinetic parts separately (to
89  be overwritten in children)
90  */
91  virtual int calc_e_sep(fermion &ne, fermion &pr, double &ed_kin,
92  double &ed_pot, double &mu_n_kin, double &mu_p_kin,
93  double &mu_n_pot, double &mu_p_pot)=0;
94 
95  };
96 
97  /** \brief A version of \ref eos_had_rmf to separate potential and kinetic
98  contributions
99 
100  \hline
101  <b>References:</b>
102 
103  Created for \ref Steiner06.
104  */
106 
107  public:
108 
109  /** \brief Compute the potential and kinetic parts separately
110  */
111  virtual int calc_e_sep(fermion &ne, fermion &pr, double &ed_kin,
112  double &ed_pot, double &mu_n_kin, double &mu_p_kin,
113  double &mu_n_pot, double &mu_p_pot);
114 
115  };
116 
117  /** \brief A version of \ref eos_had_apr to separate potential and kinetic
118  contributions
119 
120  \hline
121  <b>References:</b>
122 
123  Created for \ref Steiner06.
124  */
126 
127  public:
128 
129  /** \brief Compute the potential and kinetic parts separately
130  */
131  virtual int calc_e_sep(fermion &ne, fermion &pr, double &ed_kin,
132  double &ed_pot, double &mu_n_kin, double &mu_p_kin,
133  double &mu_n_pot, double &mu_p_pot);
134  };
135 
136  /** \brief A version of \ref eos_had_skyrme to separate potential and kinetic
137  contributions
138 
139  \hline
140  <b>References:</b>
141 
142  Created for \ref Steiner06.
143  */
145 
146  public:
147 
148  /** \brief Compute the potential and kinetic parts separately
149  */
150  virtual int calc_e_sep(fermion &ne, fermion &pr, double &ed_kin,
151  double &ed_pot, double &mu_n_kin, double &mu_p_kin,
152  double &mu_n_pot, double &mu_p_pot);
153  };
154 
155  /** \brief A version of \ref eos_had_potential to
156  separate potential and kinetic contributions
157 
158  \hline
159  <b>References:</b>
160 
161  Created for \ref Steiner06.
162  */
164  public eos_had_sym4_base {
165 
166 #ifndef DOXYGEN_INTERNAL
167 
168  protected:
169 
170  /// Compute the kinetic part of the energy density
171  double energy_kin(double var);
172 
173  /// Compute the potential part of the energy density
174  double energy_pot(double var);
175 
176 #endif
177 
178  public:
179 
180  /** \brief Compute the potential and kinetic parts separately
181  */
182  virtual int calc_e_sep(fermion &ne, fermion &pr, double &ed_kin,
183  double &ed_pot, double &mu_n_kin, double &mu_p_kin,
184  double &mu_n_pot, double &mu_p_pot);
185 
186  /// Test the separation of the potential and kinetic energy parts
187  virtual int test_separation(fermion &ne, fermion &pr, test_mgr &t);
188 
189  };
190 
191  /** \brief Construct an EOS with an arbitrary choice for the terms
192  in the symmetry energy that are quartic in the isospin asymmetry
193 
194  \hline
195  <b>References:</b>
196 
197  Created for \ref Steiner06.
198  */
200 
201 #ifndef DOXYGEN_INTERNAL
202 
203  protected:
204 
205  /// The base equation of state to use
207 
208 #endif
209 
210  public:
211 
212  /// The strength of the quartic terms
213  double alpha;
214 
215  /// Set the base equation of state
216  int set_base_eos(eos_had_sym4_base &seb);
217 
218  /** \brief Test the equation of state
219 
220  This compares the chemical potentials from calc_e_sep() to
221  their finite-difference approximations in order to ensure that
222  the separation into potential and kinetic parts is done
223  properly.
224  */
225  virtual int test_eos(fermion &ne, fermion &pr, thermo &lth);
226 
227  /** \brief Equation of state as a function of density
228  */
229  virtual int calc_e(fermion &ne, fermion &pr, thermo &lth);
230 
231  };
232 
233 #ifndef DOXYGEN_NO_O2NS
234 }
235 #endif
236 
237 #endif
Generalized potential model equation of state.
fermion e
An electron for the computation of the .
Definition: eos_had_sym4.h:64
virtual double calc_muhat(fermion &ne, fermion &pr)
Compute , the out-of-whack parameter.
Construct an EOS with an arbitrary choice for the terms in the symmetry energy that are quartic in th...
Definition: eos_had_sym4.h:199
double alpha
The strength of the quartic terms.
Definition: eos_had_sym4.h:213
virtual int calc_e_sep(fermion &ne, fermion &pr, double &ed_kin, double &ed_pot, double &mu_n_kin, double &mu_p_kin, double &mu_n_pot, double &mu_p_pot)=0
Compute the potential and kinetic parts separately (to be overwritten in children) ...
A class to compute quartic contributions to the symmetry energy [abstract base].
Definition: eos_had_sym4.h:57
Relativistic mean field theory EOS.
Definition: eos_had_rmf.h:295
virtual int calc_e_alpha(fermion &ne, fermion &pr, thermo &lth, double &alphak, double &alphap, double &alphat, double &diff_kin, double &diff_pot, double &ed_kin_nuc, double &ed_pot_nuc)
Compute alpha at the specified density.
fermion_zerot fzt2
Zero-temperature fermion thermodynamics.
Definition: eos_had_sym4.h:67
A version of eos_had_potential to separate potential and kinetic contributions.
Definition: eos_had_sym4.h:163
A version of eos_had_skyrme to separate potential and kinetic contributions.
Definition: eos_had_sym4.h:144
A hadronic EOS based on a function of the densities [abstract base].
Definition: eos_had_base.h:932
A version of eos_had_apr to separate potential and kinetic contributions.
Definition: eos_had_sym4.h:125
A version of eos_had_rmf to separate potential and kinetic contributions.
Definition: eos_had_sym4.h:105
Skyrme hadronic equation of state.
EOS from Akmal, Pandharipande, and Ravenhall.
Definition: eos_had_apr.h:124
eos_had_sym4_base * sp
The base equation of state to use.
Definition: eos_had_sym4.h:206

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