00001 /* 00002 ------------------------------------------------------------------- 00003 00004 Copyright (C) 2006, 2007, 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_SCHEMATIC_EOS_H 00024 #define O2SCL_SCHEMATIC_EOS_H 00025 00026 #include <iostream> 00027 #include <cmath> 00028 #include <o2scl/hadronic_eos.h> 00029 00030 #ifndef DOXYGENP 00031 namespace o2scl { 00032 #endif 00033 00034 /** 00035 \brief Schematic hadronic equation of state 00036 00037 Equation of state defined by the energy density: 00038 \f[ 00039 \epsilon = n \left\{ M+eoa+\frac{comp}{18}(n/n0-1)^2+ 00040 \frac{kprime}{162}(n/n0-1)^3+ 00041 \frac{kpp}{1944}(n/n0-1)^4+(1- 2 x)^2 00042 \left[a \left(\frac{n}{n0}\right)^{2/3}+ 00043 b \left(\frac{n}{n0}\right)^{\gamma} \right] \right\} 00044 \f] 00045 00046 Symmetry energy at nuclear matter density is a+b. 00047 00048 */ 00049 class schematic_eos : public hadronic_eos { 00050 00051 public: 00052 00053 /** 00054 \brief The kinetic energy symmetry coefficient in MeV (default 17) 00055 00056 The default value corresponds to an effective mass of about 00057 0.7. 00058 */ 00059 double a; 00060 00061 /// The potential energy symmetry coefficient in MeV (default 13) 00062 double b; 00063 00064 /// The coefficient of a density to the fourth term (default 0) 00065 double kpp; 00066 00067 /// The exponent of the high-density symmetry energy (default 1.0) 00068 double gamma; 00069 00070 schematic_eos(); 00071 00072 virtual ~schematic_eos() {}; 00073 00074 /** 00075 \brief Equation of state as a function of density 00076 */ 00077 virtual int calc_e(fermion &ln, fermion &lp, thermo <h); 00078 00079 /** \brief Set kprime so that the energy per baryon of zero-density 00080 matter is zero 00081 */ 00082 virtual int set_kprime_zeroden() { 00083 kprime=162.0*eoa+9.0*comp; 00084 return 0; 00085 } 00086 00087 /** \brief Set kpp so that the energy per baryon of zero-density 00088 matter is zero 00089 */ 00090 virtual int set_kpp_zeroden() { 00091 kpp=12.0*kprime-108.0*comp-1944.0*eoa; 00092 return 0; 00093 } 00094 00095 /** \brief Fix the kinetic energy symmetry coefficient from 00096 the nucleon effective mass and the saturation density 00097 00098 This assumes the nucleons are non-relativistic and that the 00099 neutrons and protons have equal mass. The relativistic 00100 corrections are around 1 part in \f$ 10^{6} \f$. 00101 00102 \todo This was computed in schematic_sym.nb, which might be 00103 added to the documentation? 00104 */ 00105 virtual int set_a_from_mstar(double u_msom, double mnuc) { 00106 a=cbrt(n0*n0*o2scl_const::pi2*o2scl_const::pi2/4.0/3.0)/ 00107 (2.0*u_msom*mnuc/o2scl_const::hc_mev_fm); 00108 return 0; 00109 } 00110 00111 /** 00112 \brief Return the energy per baryon of matter at zero density 00113 00114 This is inaccessible from calc_e() so is available separately 00115 here. Using set_kprime_zeroden() or set_kpp_zeroden() will 00116 fix kprime or kpp (respectively) to ensure that this is zero. 00117 00118 The result provided here does not include the nucleon mass and 00119 is given in \f$ fm^{-1} \f$. 00120 */ 00121 virtual double eoa_zeroden() { 00122 return eoa+comp/18.0-kprime/162.0+kpp/1944.0; 00123 } 00124 00125 /// Return string denoting type ("schematic_eos") 00126 virtual const char *type() { return "schematic_eos"; } 00127 00128 }; 00129 00130 template<> int io_tlate<schematic_eos>::input 00131 (cinput *co, in_file_format *ins, schematic_eos *sc); 00132 template<> int io_tlate<schematic_eos>::output 00133 (coutput *co, out_file_format *outs, schematic_eos *sc); 00134 template<> const char *io_tlate<schematic_eos>::type(); 00135 00136 typedef io_tlate<schematic_eos> schematic_eos_io_type; 00137 00138 #ifndef DOXYGENP 00139 } 00140 #endif 00141 00142 #endif