![]() |
Equation of State Sub-Library: Version 0.910
|
00001 /* 00002 ------------------------------------------------------------------- 00003 00004 Copyright (C) 2006-2012, 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_BPS_EOS_H 00024 #define O2SCL_BPS_EOS_H 00025 00026 #include <o2scl/part.h> 00027 #include <o2scl/mroot.h> 00028 #include <o2scl/eos.h> 00029 #include <o2scl/gsl_mroot_hybrids.h> 00030 #include <o2scl/fermion.h> 00031 #include <o2scl/nuclear_mass.h> 00032 00033 #ifndef DOXYGENP 00034 namespace o2scl { 00035 #endif 00036 00037 /** \brief Baym-Pethick-Sutherland equation of state 00038 00039 This calculates the equation of state of electrons and nuclei 00040 using the approach of \ref Baym71 (based on the discussion in 00041 \ref Shapiro83) between about \f$8 \times 10^{6} 00042 ~\mathrm{g}/\mathrm{cm}^3\f$ and \f$4.3 \times 10^{11} 00043 ~\mathrm{g}/\mathrm{cm}^3\f$. Below these densities, more 00044 complex Coulomb corrections need to be considered, and above 00045 these densities, neutron drip is important. 00046 00047 The default mass formula is semi-empirical 00048 \f{eqnarray*} 00049 M(A,Z)&=&(A-Z) m_n+Z (m_p+m_e)- 00050 15.76 A-17.81 A^{2/3} \\ 00051 && -0.71 Z^2 /A^{1/3}- 00052 94.8/A \left(A/2-Z\right)^2+E_{\mathrm{pair}} 00053 \f} 00054 where 00055 \f[ 00056 E_{\mathrm{pair}} = \pm 39/A^{3/4} 00057 \f] 00058 if the nucleus is odd-odd (plus sign) or even-even (minus sign) 00059 and \f$E_{\mathrm{pair}}\f$ is zero for odd-even and even-odd 00060 nuclei. The nuclei are assumed not to contribute to the 00061 pressure. The electronic contribution to the pressure is assumed 00062 to be equal to the Fermi gas contribution plus a "lattice" 00063 contribution 00064 \f[ 00065 \varepsilon_L = -1.444 Z^{2/3} e^2 n_e^{4/3} 00066 \f] 00067 This is Eq. 2.7.2 in \ref Shapiro83. The rest mass energy of 00068 the nucleons is included in the energy density. 00069 00070 The original results from \ref Baym71 are stored as a \ref table 00071 in file <tt>data/o2scl/bps.eos</tt>. The testing code for this 00072 class compares the calculations to the table and matches to 00073 within .2 percent for the energy density and 9 percent for the 00074 pressure (for a fixed baryon number density). 00075 00076 \future Can the pressure be made to match more closely? 00077 \future Convert to a \ref hadronic_eos object and offer an 00078 associated interface? 00079 00080 */ 00081 class bps_eos : public eos { 00082 public: 00083 00084 bps_eos(); 00085 00086 virtual ~bps_eos() {}; 00087 00088 /** \brief Calculate the equation of state as a function of 00089 the baryon number density \c barn 00090 00091 This calculates the equation of state as a function of the 00092 baryon number density in \f$\mathrm{fm}^{-3}\f$, returning the 00093 representative nucleus with proton number \c Z and atomic 00094 number \c A. The pressure and energy density are returned 00095 in \c th in \f$\mathrm{fm}^{-4}\f$. 00096 */ 00097 virtual int calc_density(double barn, thermo &th, int &Z, int &A); 00098 00099 /** \brief Calculate the equation of state as a function of 00100 the pressure 00101 00102 This calculates the equation of state as a function of the 00103 pressure, returning the representative nucleus with proton 00104 number \c Z and atomic number \c A and the baryon number 00105 density \c barn in \f$\mathrm{fm}^{-3}\f$. The energy density 00106 is also returned in \f$\mathrm{fm}^{-4}\f$ in \c th. 00107 */ 00108 virtual int calc_pressure(thermo &th, double &barn, int &Z, int &A); 00109 00110 /** \brief The electron lattice energy */ 00111 virtual double lattice_energy(int Z); 00112 00113 /** \brief Get a pointer to the electron 00114 */ 00115 virtual const fermion &get_electron() { return e; } 00116 00117 /** \brief The mass formula 00118 00119 The nuclear mass without the contribution of the rest mass 00120 of the electrons. The electron rest mass energy is included 00121 in the electron thermodynamics elsewhere. 00122 */ 00123 virtual double mass_formula(int Z, int A); 00124 00125 /// Return string denoting type ("bps_eos") 00126 virtual const char *type() { return "bps_eos"; } 00127 00128 /// Default mass formula 00129 semi_empirical_mass def_mass; 00130 00131 /// Set the nuclear mass formula to be used 00132 int set_mass_formula(nuclear_mass &nm) { 00133 nmp=&nm; 00134 return 0; 00135 } 00136 00137 /// Compute the ground state assuming a fixed atomic number 00138 int calc_density_fixedA(double barn, thermo &th, int &Z, int A); 00139 00140 /** \brief The electron thermodynamics 00141 00142 \note The electron rest mass is included by default in 00143 the energy density and the chemical potential 00144 */ 00145 fermion e; 00146 00147 protected: 00148 00149 #ifndef DOXYGEN_INTERNAL 00150 00151 /// Desc 00152 fermion_zerot fzt; 00153 00154 /// Solve Equation 2.7.4 for a given pressure 00155 virtual int eq274(size_t nv, const ovector_base &nx, ovector_base &ny, 00156 int &Zt); 00157 00158 /// The Gibbs free energy 00159 double gibbs(int Z, int A); 00160 00161 /// The energy density 00162 double energy(double barn, int Z, int A); 00163 00164 /// A solver to solve Eq. 2.7.4 00165 gsl_mroot_hybrids<mm_funct<> > gs; 00166 00167 /// The nuclear mass formula 00168 nuclear_mass *nmp; 00169 00170 #endif 00171 00172 }; 00173 00174 #ifndef DOXYGENP 00175 } 00176 #endif 00177 00178 #endif
Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).