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