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 00024 #ifndef O2SCL_SYM4_EOS_H 00025 #define O2SCL_SYM4_EOS_H 00026 00027 #include <iostream> 00028 #include <o2scl/ovector_tlate.h> 00029 #include <o2scl/apr_eos.h> 00030 #include <o2scl/rmf_eos.h> 00031 #include <o2scl/skyrme_eos.h> 00032 #include <o2scl/gen_potential_eos.h> 00033 00034 #ifndef DOXYGENP 00035 namespace o2scl { 00036 #endif 00037 00038 /** \brief A class to compute quartic contributions to the symmetry 00039 energy [abstract base] 00040 00041 The standard usage is that a child class implements the virtual 00042 function calc_e_sep() which is then used by calc_e_alpha() 00043 and calc_muhat(). These functions are employed by \ref sym4_eos 00044 to compute the EOS for an arbitrary dependence of the 00045 symmetry energy on the isospin. 00046 00047 \hline 00048 <b>References:</b> 00049 00050 Created for \ref Steiner06. 00051 */ 00052 class sym4_eos_base { 00053 00054 #ifndef DOXYGEN_INTERNAL 00055 00056 protected: 00057 00058 /// An electron for the computation of the \f$ \hat{\mu}\f$ 00059 fermion e; 00060 00061 #endif 00062 00063 public: 00064 00065 sym4_eos_base(); 00066 00067 virtual ~sym4_eos_base() {} 00068 00069 /** \brief Compute alpha at the specified density 00070 */ 00071 virtual int calc_e_alpha(fermion &ne, fermion &pr, thermo <h, 00072 double &alphak, double &alphap, double &alphat, 00073 double &diff_kin, double &diff_pot, 00074 double &ed_kin_nuc, double &ed_pot_nuc); 00075 00076 /** \brief Compute \f$ \hat{\mu} \f$, the out-of-whack parameter 00077 */ 00078 virtual double calc_muhat(fermion &ne, fermion &pr); 00079 00080 /** \brief Compute the potential and kinetic parts separately (to 00081 be overwritten in children) 00082 */ 00083 virtual int calc_e_sep(fermion &ne, fermion &pr, double &ed_kin, 00084 double &ed_pot, double &mu_n_kin, double &mu_p_kin, 00085 double &mu_n_pot, double &mu_p_pot)=0; 00086 00087 }; 00088 00089 /** \brief A version of \ref rmf_eos to separate potential and kinetic 00090 contributions 00091 00092 \hline 00093 <b>References:</b> 00094 00095 Created for \ref Steiner06. 00096 */ 00097 class rmf4_eos : public rmf_eos, public sym4_eos_base { 00098 00099 public: 00100 00101 rmf4_eos(); 00102 00103 /** \brief Compute the potential and kinetic parts separately 00104 */ 00105 virtual int calc_e_sep(fermion &ne, fermion &pr, double &ed_kin, 00106 double &ed_pot, double &mu_n_kin, double &mu_p_kin, 00107 double &mu_n_pot, double &mu_p_pot); 00108 00109 }; 00110 00111 /** \brief A version of \ref apr_eos to separate potential and kinetic 00112 contributions 00113 00114 \hline 00115 <b>References:</b> 00116 00117 Created for \ref Steiner06. 00118 */ 00119 class apr4_eos : public apr_eos, public sym4_eos_base { 00120 00121 public: 00122 00123 /** \brief Compute the potential and kinetic parts separately 00124 */ 00125 virtual int calc_e_sep(fermion &ne, fermion &pr, double &ed_kin, 00126 double &ed_pot, double &mu_n_kin, double &mu_p_kin, 00127 double &mu_n_pot, double &mu_p_pot); 00128 }; 00129 00130 /** \brief A version of \ref skyrme_eos to separate potential and kinetic 00131 contributions 00132 00133 \hline 00134 <b>References:</b> 00135 00136 Created for \ref Steiner06. 00137 */ 00138 class skyrme4_eos : public skyrme_eos, public sym4_eos_base { 00139 00140 public: 00141 00142 /** \brief Compute the potential and kinetic parts separately 00143 */ 00144 virtual int calc_e_sep(fermion &ne, fermion &pr, double &ed_kin, 00145 double &ed_pot, double &mu_n_kin, double &mu_p_kin, 00146 double &mu_n_pot, double &mu_p_pot); 00147 }; 00148 00149 /** \brief A version of \ref gen_potential_eos to 00150 separate potential and kinetic contributions 00151 00152 \hline 00153 <b>References:</b> 00154 00155 Created for \ref Steiner06. 00156 */ 00157 class mdi4_eos : public gen_potential_eos, public sym4_eos_base { 00158 00159 #ifndef DOXYGEN_INTERNAL 00160 00161 protected: 00162 00163 /// Compute the kinetic part of the energy density 00164 double energy_kin(double var); 00165 00166 /// Compute the potential part of the energy density 00167 double energy_pot(double var); 00168 00169 #endif 00170 00171 public: 00172 00173 /** \brief Compute the potential and kinetic parts separately 00174 */ 00175 virtual int calc_e_sep(fermion &ne, fermion &pr, double &ed_kin, 00176 double &ed_pot, double &mu_n_kin, double &mu_p_kin, 00177 double &mu_n_pot, double &mu_p_pot); 00178 00179 /// Test the separation of the potential and kinetic energy parts 00180 virtual int test_separation(fermion &ne, fermion &pr, test_mgr &t); 00181 00182 }; 00183 00184 /** \brief Construct an EOS with an arbitrary choice for the terms 00185 in the symmetry energy that are quartic in the isospin asymmetry 00186 00187 \hline 00188 <b>References:</b> 00189 00190 Created for \ref Steiner06. 00191 */ 00192 class sym4_eos : public hadronic_eos_eden { 00193 00194 #ifndef DOXYGEN_INTERNAL 00195 00196 protected: 00197 00198 /// The base equation of state to use 00199 sym4_eos_base *sp; 00200 00201 #endif 00202 00203 public: 00204 00205 /// The strength of the quartic terms 00206 double alpha; 00207 00208 /// Set the base equation of state 00209 int set_base_eos(sym4_eos_base &seb); 00210 00211 /** 00212 \brief Test the equation of state 00213 00214 This compares the chemical potentials from calc_e_sep() to 00215 their finite-difference approximations in order to ensure that 00216 the separation into potential and kinetic parts is done 00217 properly. 00218 */ 00219 virtual int test_eos(fermion &ne, fermion &pr, thermo <h); 00220 00221 /** 00222 \brief Equation of state as a function of density 00223 */ 00224 virtual int calc_e(fermion &ne, fermion &pr, thermo <h); 00225 00226 }; 00227 00228 #ifndef DOXYGENP 00229 } 00230 #endif 00231 00232 #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