All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
eos_had_sym4.h
Go to the documentation of this file.
1 /*
2  -------------------------------------------------------------------
3 
4  Copyright (C) 2006-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_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 was disabled in HDF conversion. Fix this.
55  */
57 
58 #ifndef DOXYGEN_INTERNAL
59 
60  protected:
61 
62  /// An electron for the computation of the \f$ \hat{\mu}\f$
64 
65  /// Zero-temperature fermion thermodynamics
67 
68 #endif
69 
70  public:
71 
73 
74  virtual ~eos_had_sym4_base() {}
75 
76  /** \brief Compute alpha at the specified density
77  */
78  virtual int calc_e_alpha(fermion &ne, fermion &pr, thermo &lth,
79  double &alphak, double &alphap, double &alphat,
80  double &diff_kin, double &diff_pot,
81  double &ed_kin_nuc, double &ed_pot_nuc);
82 
83  /** \brief Compute \f$ \hat{\mu} \f$, the out-of-whack parameter
84  */
85  virtual double calc_muhat(fermion &ne, fermion &pr);
86 
87  /** \brief Compute the potential and kinetic parts separately (to
88  be overwritten in children)
89  */
90  virtual int calc_e_sep(fermion &ne, fermion &pr, double &ed_kin,
91  double &ed_pot, double &mu_n_kin, double &mu_p_kin,
92  double &mu_n_pot, double &mu_p_pot)=0;
93 
94  };
95 
96  /** \brief A version of \ref eos_had_rmf to separate potential and kinetic
97  contributions
98 
99  \hline
100  <b>References:</b>
101 
102  Created for \ref Steiner06.
103  */
105 
106  public:
107 
108  /** \brief Compute the potential and kinetic parts separately
109  */
110  virtual int calc_e_sep(fermion &ne, fermion &pr, double &ed_kin,
111  double &ed_pot, double &mu_n_kin, double &mu_p_kin,
112  double &mu_n_pot, double &mu_p_pot);
113 
114  };
115 
116  /** \brief A version of \ref eos_had_apr to separate potential and kinetic
117  contributions
118 
119  \hline
120  <b>References:</b>
121 
122  Created for \ref Steiner06.
123  */
125 
126  public:
127 
128  /** \brief Compute the potential and kinetic parts separately
129  */
130  virtual int calc_e_sep(fermion &ne, fermion &pr, double &ed_kin,
131  double &ed_pot, double &mu_n_kin, double &mu_p_kin,
132  double &mu_n_pot, double &mu_p_pot);
133  };
134 
135  /** \brief A version of \ref eos_had_skyrme to separate potential and kinetic
136  contributions
137 
138  \hline
139  <b>References:</b>
140 
141  Created for \ref Steiner06.
142  */
144 
145  public:
146 
147  /** \brief Compute the potential and kinetic parts separately
148  */
149  virtual int calc_e_sep(fermion &ne, fermion &pr, double &ed_kin,
150  double &ed_pot, double &mu_n_kin, double &mu_p_kin,
151  double &mu_n_pot, double &mu_p_pot);
152  };
153 
154  /** \brief A version of \ref eos_had_potential to
155  separate potential and kinetic contributions
156 
157  \hline
158  <b>References:</b>
159 
160  Created for \ref Steiner06.
161  */
163  public eos_had_sym4_base {
164 
165 #ifndef DOXYGEN_INTERNAL
166 
167  protected:
168 
169  /// Compute the kinetic part of the energy density
170  double energy_kin(double var);
171 
172  /// Compute the potential part of the energy density
173  double energy_pot(double var);
174 
175 #endif
176 
177  public:
178 
179  /** \brief Compute the potential and kinetic parts separately
180  */
181  virtual int calc_e_sep(fermion &ne, fermion &pr, double &ed_kin,
182  double &ed_pot, double &mu_n_kin, double &mu_p_kin,
183  double &mu_n_pot, double &mu_p_pot);
184 
185  /// Test the separation of the potential and kinetic energy parts
186  virtual int test_separation(fermion &ne, fermion &pr, test_mgr &t);
187 
188  };
189 
190  /** \brief Construct an EOS with an arbitrary choice for the terms
191  in the symmetry energy that are quartic in the isospin asymmetry
192 
193  \hline
194  <b>References:</b>
195 
196  Created for \ref Steiner06.
197  */
199 
200 #ifndef DOXYGEN_INTERNAL
201 
202  protected:
203 
204  /// The base equation of state to use
206 
207 #endif
208 
209  public:
210 
211  /// The strength of the quartic terms
212  double alpha;
213 
214  /// Set the base equation of state
216 
217  /** \brief Test the equation of state
218 
219  This compares the chemical potentials from calc_e_sep() to
220  their finite-difference approximations in order to ensure that
221  the separation into potential and kinetic parts is done
222  properly.
223  */
224  virtual int test_eos(fermion &ne, fermion &pr, thermo &lth);
225 
226  /** \brief Equation of state as a function of density
227  */
228  virtual int calc_e(fermion &ne, fermion &pr, thermo &lth);
229 
230  };
231 
232 #ifndef DOXYGEN_NO_O2NS
233 }
234 #endif
235 
236 #endif
Generalized potential model equation of state.
virtual int test_eos(fermion &ne, fermion &pr, thermo &lth)
Test the equation of state.
fermion e
An electron for the computation of the .
Definition: eos_had_sym4.h:63
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:198
double alpha
The strength of the quartic terms.
Definition: eos_had_sym4.h:212
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) ...
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)
Compute the potential and kinetic parts separately.
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)
Compute the potential and kinetic parts separately.
A class to compute quartic contributions to the symmetry energy [abstract base].
Definition: eos_had_sym4.h:56
Relativistic mean field theory EOS.
Definition: eos_had_rmf.h:294
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.
double energy_kin(double var)
Compute the kinetic part of the energy density.
virtual int calc_e(fermion &ne, fermion &pr, thermo &lth)
Equation of state as a function of density.
fermion_zerot fzt2
Zero-temperature fermion thermodynamics.
Definition: eos_had_sym4.h:66
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)
Compute the potential and kinetic parts separately.
A version of eos_had_potential to separate potential and kinetic contributions.
Definition: eos_had_sym4.h:162
A version of eos_had_skyrme to separate potential and kinetic contributions.
Definition: eos_had_sym4.h:143
A hadronic EOS based on a function of the densities [abstract base].
Definition: eos_had_base.h:825
A version of eos_had_apr to separate potential and kinetic contributions.
Definition: eos_had_sym4.h:124
virtual int test_separation(fermion &ne, fermion &pr, test_mgr &t)
Test the separation of the potential and kinetic energy parts.
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)
Compute the potential and kinetic parts separately.
A version of eos_had_rmf to separate potential and kinetic contributions.
Definition: eos_had_sym4.h:104
int set_base_eos(eos_had_sym4_base &seb)
Set the base equation of state.
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:205
double energy_pot(double var)
Compute the potential part of the energy density.

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..