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_HADRONIC_EOS_H 00024 #define O2SCL_HADRONIC_EOS_H 00025 00026 #include <iostream> 00027 #include <string> 00028 #include <o2scl/eos.h> 00029 #include <o2scl/part.h> 00030 #include <o2scl/deriv.h> 00031 #include <o2scl/gsl_deriv.h> 00032 #include <o2scl/mroot.h> 00033 #include <o2scl/gsl_mroot_hybrids.h> 00034 #include <o2scl/collection.h> 00035 #include <o2scl/eff_fermion.h> 00036 #include <o2scl/mm_funct.h> 00037 00038 #ifndef DOXYGENP 00039 namespace o2scl { 00040 #endif 00041 00042 /** 00043 \brief Hadronic equation of state [abstract base] 00044 00045 In the method documentation below, \f$ n \f$ is baryon number density, 00046 \f$ \epsilon \f$ is energy density, and \f$ P \f$ is pressure. 00047 00048 \htmlonly 00049 See more about Svprime in the Mathematica notebook at 00050 <a href="hadronic_eos.nb"> 00051 hadronic_eos.nb</a>, and 00052 <a href="hadronic_eos.ps"> 00053 hadronic_eos.ps</a>. 00054 \endhtmlonly 00055 \latexonly 00056 See more about Svprime in the Mathematica notebook at 00057 \begin{verbatim} 00058 doc/o2scl/extras/hadronic_eos.nb 00059 doc/o2scl/extras/hadronic_eos.ps 00060 \end{verbatim} 00061 \endlatexonly 00062 00063 \future Could write a function to compute the "symmetry free energy" 00064 or the "symmetry entropy" 00065 */ 00066 class hadronic_eos : public eos { 00067 public: 00068 00069 hadronic_eos(); 00070 00071 virtual ~hadronic_eos() {}; 00072 00073 /// Binding energy 00074 double eoa; 00075 00076 /// Compressibility 00077 double comp; 00078 00079 /// Symmetry energy 00080 double esym; 00081 00082 /// Saturation density 00083 double n0; 00084 00085 /// Effective mass 00086 double msom; 00087 00088 /// Skewness 00089 double kprime; 00090 00091 /// Symmetry energy derivative 00092 double sprime; 00093 00094 /// \name Equation of state 00095 //@{ 00096 /** 00097 \brief Equation of state as a function of the chemical potentials 00098 */ 00099 virtual int calc_p(fermion &n, fermion &p, thermo &th)=0; 00100 00101 /** 00102 \brief Equation of state as a function of density 00103 */ 00104 virtual int calc_e(fermion &n, fermion &p, thermo &th)=0; 00105 //@} 00106 00107 /// \name Physical properties 00108 //@{ 00109 /** 00110 \brief Calculate compressibility of nuclear matter using calc_e() 00111 00112 The compression modulus is defined here by: \f$ \chi = -1/V 00113 (dV/dP) = 1/n (dP/dn)^{-1} \f$ It is customary to use the 00114 incompressibility modulus \f$ K=9/(n \chi) \f$ . This is the value 00115 denoted \c comp in the code and can be written: \f$ K = 9 n d^2 00116 \epsilon /(d n^2) = 9 d P / (d n) \f$ . It is often referred to as 00117 the "compressibility" and is about 220 MeV at saturation 00118 density. (Taken from Chabanat, et. al. NPA 627 (1997) 710.) Note 00119 that this differs from \f$ K_2 = 9 n^2 d^2(\epsilon/n) / (d n^2) 00120 \f$ by \f$ 18 P/n \f$ at any density except the saturation 00121 density. 00122 */ 00123 virtual double fcomp(const double nb); 00124 00125 /** 00126 \brief Calculate binding energy using calc_e() 00127 00128 \c eoa = (energy density/baryon number density-nucleon mass) at 00129 \f$ n=n_0 \f$ . \f$ E_b \approx -16/(\hbar c) \f$ 00130 */ 00131 virtual double feoa(const double nb, const double pf=0.5); 00132 00133 /** 00134 \brief Calculate symmetry energy of matter using calc_e() 00135 00136 \c esym = 00137 \f[ 00138 \left(\frac{1}{2 n}\frac{d^2 \epsilon}{d \delta^2} 00139 \right)_{n=n_B,\delta=\delta_0} 00140 \f] 00141 00142 where \f$ \delta=1-2 x \f$ , \f$ \delta_0=1-2 x \f$ 00143 and \f$ x \f$ is the proton fraction 00144 (for x=0.5 at saturation density, esym \f$ \approx 32/ \hbar c \f$ ) 00145 */ 00146 virtual double fesym(const double nb, const double pf=0.5); 00147 00148 /** 00149 \brief The symmetry energy slope parameter 00150 00151 This returns the value of the "slope parameter" 00152 of the symmetry energy 00153 \f[ 00154 L=3 n_{B} \left(\frac{\partial E_{sym}}{\partial n_{B}}\right) 00155 \f] 00156 in inverse Fermis. 00157 00158 where \f$ n_B \f$ is the baryon density. This ranges 00159 between about zero and 200 MeV for many EOSs. If \c alt_sym 00160 is false (the default), then \ref fesym() is used to 00161 compute the symmetry energy, otherwise \ref fesym_diff() 00162 is used. 00163 */ 00164 virtual double fesym_slope(const double nb, bool alt_sym=false); 00165 00166 /** \brief Calculate symmetry energy of matter as energy of 00167 neutron matter minus the energy of nuclear matter 00168 00169 This function returns the energy per baryon of neutron matter 00170 minus the energy per baryon of nuclear matter. This will 00171 deviate significantly from the results from fesym() only if 00172 the dependence of the symmetry energy on \f$ \delta \f$ is not 00173 quadratic. 00174 */ 00175 virtual double fesym_diff(const double nb); 00176 00177 /** 00178 \brief Calculate \f$ S^{\prime} \f$ in matter using calc_e() 00179 00180 \c sprime = 00181 \f[ 00182 \left[n \frac{d}{d n} 00183 \left(\frac{1}{2 n}\frac{d^2 \epsilon}{d \delta^2} 00184 \right)\right]_{n=n_B,\delta=\delta_0} 00185 \f] 00186 00187 where \f$ \delta=1-2 x \f$ , \f$ \delta_0=1-2 (\mathrm{pf}) \f$ 00188 and \f$ x \f$ is the proton fraction 00189 */ 00190 virtual double fsprime(const double nb, const double pf=0.5); 00191 00192 /** 00193 \brief Calculate skewness of nuclear matter using calc_e() 00194 00195 The skewness is defined to be 00196 \f$ 27 n^3 d^3 (\epsilon/n)/(d n^3) = 00197 27 n^3 d^2 (P/n^2) / (d n^2) \f$ 00198 00199 and is denoted 'kprime'. 00200 This definition seems to be ambiguous for densities other than the 00201 saturation density and is not quite analogous to the compressibility. 00202 */ 00203 virtual double fkprime(const double nb); 00204 00205 /** 00206 \brief Calculate reduced neutron effective mass using calc_e() 00207 00208 Neutron effective mass (n.ms) divided by vacuum mass (n.m) in 00209 nuclear matter at saturation density. Note that this simply uses 00210 the value of n.ms from calc_e(), so that this effective mass could 00211 be either the Landau or Dirac mass depending on the context. Note 00212 that this may not be equal to the reduced proton effective mass. 00213 */ 00214 virtual double fmsom(const double nb, const double pf=0.5); 00215 00216 /** 00217 \brief Calculate saturation density using calc_e() 00218 00219 This function finds the density for which the pressure vanishes 00220 in matter with \f$ n_n=n_p \f$ . 00221 00222 \f$ n_0 \f$ = baryon number density at which 00223 \f$ P=0, n_0 \approx 0.16 \f$ 00224 */ 00225 virtual double fn0(const double protfrac, double &leoa); 00226 00227 /// Calculates all of the properties at the saturation density 00228 virtual int saturation(); 00229 //@} 00230 00231 /** 00232 \brief Calculate coefficients for \gradient \part of Hamiltonian 00233 00234 \note This is still somewhat experimental. 00235 00236 We want the \gradient \part of the Hamiltonian in the form 00237 \f[ 00238 {\cal H}_{\mathrm{grad}} = \frac{1}{2} \sum_{i=n,p} 00239 \sum_{j=n,p} Q_{ij} 00240 \vec{\nabla} n_i \cdot \vec{\nabla} n_j 00241 \f] 00242 00243 The expression for the \gradient terms from \ref Pethick95 is 00244 \f{eqnarray*} 00245 {\cal H}_{\mathrm{grad}}&=&-\frac{1}{4} 00246 \left(2 P_1 + P_{1;f}-P_{2;f}\right) 00247 \nonumber \\ 00248 && +\frac{1}{2} \left( Q_1+Q_2 \right) 00249 \left(n_n \nabla^2 n_n+n_p \nabla^2 n_p\right) \nonumber \\ 00250 && + \frac{1}{4}\left( Q_1-Q_2 \right) 00251 \left[\left(\nabla n_n\right)^2+\left(\nabla n_p\right)^2 00252 \right] \nonumber \\ 00253 && + \frac{1}{2} \frac{d Q_2}{d n} 00254 \left( n_n \nabla n_n + n_p \nabla n_p \right) \cdot \nabla n 00255 \f} 00256 This can be rewritten 00257 \f{eqnarray*} 00258 {\cal H}_{\mathrm{grad}}&=&\frac{1}{2}\left(\nabla n\right)^2 00259 \left[ \frac{3}{2} P_1+n \frac{d P_1}{d n}\right] \nonumber \\ 00260 && - \frac{3}{4} \left[ \left( \nabla n_n\right)^2 + 00261 \left( \nabla n_p \right)^2 \right] \nonumber \\ 00262 && -\frac{1}{2} \left[ \right] \cdot \nabla n \frac{d Q_1}{d n} 00263 \nonumber \\ && - \frac{1}{4} \left( \nabla n\right)^2 P_2 00264 - \frac{1}{4} \left[ \left( \nabla n_n\right)^2 + 00265 \left( \nabla n_p \right)^2 \right] Q_2 00266 \f} 00267 or 00268 \f{eqnarray*} 00269 {\cal H}_{\mathrm{grad}}&=&\frac{1}{4} \left( \nabla n\right)^2 00270 \left[3 P_1 + 2 n \frac{d P_1}{d n}-P_2\right] \nonumber \\ 00271 && - \frac{1}{4} \left( 3 Q_1+Q_2 \right) 00272 \left[ \left( \nabla n_n\right)^2 + 00273 \left( \nabla n_p \right)^2 \right] \nonumber \\ 00274 && - \frac{1}{2} \frac{d Q_1}{d n} 00275 \left[ n_n \nabla n_n + n_p \nabla n_p \right] 00276 \cdot \nabla n 00277 \f} 00278 or 00279 \f{eqnarray*} 00280 {\cal H}_{\mathrm{grad}}&=&\frac{1}{4} \left( \nabla n\right)^2 00281 \left[3 P_1 + 2 n \frac{d P_1}{d n}-P_2\right] \nonumber \\ 00282 && - \frac{1}{4} \left( 3 Q_1+Q_2 \right) 00283 \left[ \left( \nabla n_n\right)^2 + 00284 \left( \nabla n_p \right)^2 \right] \nonumber \\ 00285 && - \frac{1}{2} \frac{d Q_1}{d n} 00286 \left[ n_n \left( \nabla n_n \right)^2 + 00287 n_p \left( \nabla n_p \right)^2 + n \nabla n_n \cdot 00288 \nabla n_p \right] 00289 \f} 00290 00291 Generally, for Skyrme-like interactions 00292 \f{eqnarray*} 00293 P_i &=& \frac{1}{4} t_i \left(1+\frac{1}{2} x_i \right) \nonumber \\ 00294 Q_i &=& \frac{1}{4} t_i \left(\frac{1}{2} + x_i \right) \, . 00295 \f} 00296 for \f$ i=1,2 \f$ . 00297 00298 This function uses the assumption \f$ x_1=x_2=0 \f$ to 00299 calculate \f$ t_1 \f$ and \f$ t_2 \f$ from the neutron 00300 and proton effective masses assuming the Skyrme form. The 00301 values of \f$ Q_{ij} \f$ and their derivatives are then computed. 00302 00303 The functions set_n_and_p() and set_thermo() will be called by 00304 gradient_qij(), to facilitate the use of the \c n, \c p, and 00305 \c th parameters. 00306 00307 */ 00308 int gradient_qij(fermion &n, fermion &p, thermo &th, 00309 double &qnn, double &qnp, double &qpp, 00310 double &dqnndnn, double &dqnndnp, 00311 double &dqnpdnn, double &dqnpdnp, 00312 double &dqppdnn, double &dqppdnp); 00313 00314 /// \name Functions for calculating physical properties 00315 //@{ 00316 /** 00317 \brief Calculate pressure of nuclear matter 00318 as a function of baryon density 00319 00320 Used by fcomp(), <tt>pa</tt> is unused. 00321 */ 00322 double calc_pressure(double nb, int &pa); 00323 00324 /** \brief Calculate pressure / baryon density squared in nuclear 00325 matter as a function of baryon density 00326 00327 Used by fkprime(), <tt>pa</tt> is unused. 00328 */ 00329 double calc_press_on2(double nb, int &pa); 00330 00331 /** 00332 \brief Calculate energy density as a function of 'delta' 00333 00334 Used by fesym(), <tt>pa</tt> is unused. 00335 */ 00336 double calc_edensity(double delta, int &pa); 00337 00338 /** 00339 \brief Calculate symmetry energy as a function of 'delta' 00340 00341 Used by fsprime(), <tt>pa</tt> is unused. 00342 */ 00343 double calc_esym(double nb, int &pa); 00344 00345 /** 00346 \brief Return the symmetry energy at density \c nb. 00347 00348 Used by fesym_slope(). 00349 */ 00350 double calc_esym(double nb, bool &alt); 00351 00352 /** 00353 \brief Solve for zero pressure as a function of baryon density 00354 00355 Used by fn0(). 00356 */ 00357 int saturation_matter_e(double x, double &y, int &pa); 00358 //@} 00359 00360 /// \name Other functions 00361 //@{ 00362 /** 00363 \brief Nucleonic matter from calc_p() 00364 */ 00365 int nuc_matter_p(size_t nv, const ovector_base &x, ovector_base &y, 00366 double *&pa); 00367 00368 /** 00369 \brief Nucleonic matter from calc_e() 00370 */ 00371 int nuc_matter_e(size_t nv, const ovector_base &x, ovector_base &y, 00372 double *&pa); 00373 //@} 00374 00375 /// \name Set auxilliary objects 00376 //@{ 00377 /** \brief Set class mroot object for use in calculating chemical 00378 potentials from densities 00379 */ 00380 virtual int set_mroot(mroot<double *,mm_funct<double *> > &mr); 00381 00382 /** \brief Set class mroot object for use calculating saturation density 00383 */ 00384 virtual int set_sat_root(root<int,funct<int> > &mr); 00385 00386 /// Set \ref deriv object to use to find saturation properties 00387 virtual int set_sat_deriv(deriv<int,funct<int> > &de); 00388 00389 /** 00390 \brief Set \ref deriv object to use to find saturation properties 00391 00392 \todo Document the distinction between this and set_sat_deriv(). 00393 */ 00394 virtual int set_sat_deriv2(deriv<bool,funct<bool> > &de); 00395 00396 /// Set neutron and proton 00397 virtual int set_n_and_p(fermion &n, fermion &p); 00398 //@} 00399 00400 /// The defaut neutron 00401 fermion def_neutron; 00402 00403 /// The defaut proton 00404 fermion def_proton; 00405 00406 /// \name Default solvers and derivative classes 00407 //@{ 00408 /** 00409 \brief The default object for derivatives 00410 00411 The value of gsl_deriv::h is set to \f$ 10^{-3} \f$ in 00412 the hadronic_eos constructor. 00413 */ 00414 gsl_deriv<int,funct<int> > def_deriv; 00415 00416 /** 00417 \brief The second default object for derivatives 00418 00419 The value of gsl_deriv::h is set to \f$ 10^{-3} \f$ in 00420 the hadronic_eos constructor. 00421 */ 00422 gsl_deriv<bool,funct<bool> > def_deriv2; 00423 00424 /** 00425 \brief The default solver 00426 00427 Used by calc_e() to solve nuc_matter_p() (2 variables) and by 00428 calc_p() to solve nuc_matter_e() (2 variables). 00429 */ 00430 gsl_mroot_hybrids<double *,mm_funct<double *> > def_mroot; 00431 00432 /** \brief The default solver for calculating the saturation 00433 density 00434 00435 Used by fn0() (which is called by saturation()) to solve 00436 saturation_matter_e() (1 variable). 00437 */ 00438 cern_mroot_root<int,funct<int> > def_sat_root; 00439 //@} 00440 00441 /// Return string denoting type ("hadronic_eos") 00442 virtual const char *type() { return "hadronic_eos"; } 00443 00444 #ifndef DOXYGEN_INTERNAL 00445 00446 protected: 00447 00448 /// Compute t1 for gradient_qij(). 00449 double t1_fun(double barn, int &vp); 00450 00451 /// Compute t2 for gradient_qij(). 00452 double t2_fun(double barn, int &vp); 00453 00454 /// The EOS solver 00455 mroot<double *,mm_funct<double *> > *eos_mroot; 00456 00457 /// The solver to compute saturation properties 00458 root<int,funct<int> > *sat_root; 00459 00460 /// The derivative object for saturation properties 00461 deriv<int,funct<int> > *sat_deriv; 00462 00463 /// The second derivative object for saturation properties 00464 deriv<bool,funct<bool> > *sat_deriv2; 00465 00466 /// The neutron object 00467 fermion *neutron; 00468 00469 /// The proton object 00470 fermion *proton; 00471 00472 /// Temporary proton fraction 00473 double proton_frac; 00474 00475 /// Temporary baryon number 00476 double n_baryon; 00477 00478 #endif 00479 00480 }; 00481 00482 /// A hadronic EOS based on a function of the densities [abstract base] 00483 class hadronic_eos_eden : public hadronic_eos { 00484 public: 00485 00486 /** 00487 \brief Equation of state as a function of density 00488 */ 00489 virtual int calc_e(fermion &n, fermion &p, thermo &th)=0; 00490 00491 /** 00492 \brief Equation of state as a function of the chemical potentials 00493 */ 00494 virtual int calc_p(fermion &n, fermion &p, thermo &th); 00495 00496 }; 00497 00498 /** \brief A hadronic EOS based on a function of the chemical 00499 potentials [abstract base] 00500 */ 00501 class hadronic_eos_pres : public hadronic_eos { 00502 public: 00503 00504 /** 00505 \brief Equation of state as a function of the chemical potentials 00506 */ 00507 virtual int calc_p(fermion &n, fermion &p, thermo &th)=0; 00508 00509 /** 00510 \brief Equation of state as a function of density 00511 */ 00512 virtual int calc_e(fermion &n, fermion &p, thermo &th); 00513 00514 }; 00515 00516 /// A finite temperature hadronic EOS 00517 class hadronic_eos_temp : public hadronic_eos { 00518 00519 #ifndef DOXYGEN_INTERNAL 00520 00521 protected: 00522 00523 /// The neutron object 00524 fermion_T *neutron_T; 00525 00526 /// The proton object 00527 fermion_T *proton_T; 00528 00529 /// The temperature 00530 double lT; 00531 00532 /// Solve for nuclear matter at finite temperature given density 00533 int nuc_matter_temp_e(size_t nv, const ovector_base &x, 00534 ovector_base &y, double *&pa); 00535 00536 /// Solve for nuclear matter at finite temperature given mu 00537 int nuc_matter_temp_p(size_t nv, const ovector_base &x, 00538 ovector_base &y, double *&pa); 00539 00540 #endif 00541 00542 public: 00543 00544 /// The defaut neutron 00545 eff_fermion def_neutron_T; 00546 00547 /// The defaut proton 00548 eff_fermion def_proton_T; 00549 00550 hadronic_eos_temp() { 00551 def_neutron_T.init(939.0/o2scl_const::hc_mev_fm,2.0); 00552 def_proton_T.init(939.0/o2scl_const::hc_mev_fm,2.0); 00553 def_neutron_T.non_interacting=false; 00554 def_proton_T.non_interacting=false; 00555 neutron_T=&def_neutron_T; 00556 proton_T=&def_proton_T; 00557 } 00558 00559 virtual ~hadronic_eos_temp() {} 00560 00561 /// Set neutron and proton 00562 virtual int set_n_and_p_T(fermion_T &n, fermion_T &p); 00563 00564 /** 00565 \brief Equation of state as a function of density 00566 */ 00567 virtual int calc_e(fermion &n, fermion &p, thermo &th)=0; 00568 00569 /** 00570 \brief Equation of state as a function of densities at 00571 finite temperature 00572 */ 00573 virtual int calc_temp_e(fermion_T &n, fermion_T &p, const double T, 00574 thermo &th)=0; 00575 00576 /** 00577 \brief Equation of state as a function of the chemical potentials 00578 */ 00579 virtual int calc_p(fermion &n, fermion &p, thermo &th)=0; 00580 00581 /** 00582 \brief Equation of state as a function of the chemical potentials 00583 at finite temperature 00584 */ 00585 virtual int calc_temp_p(fermion_T &n, fermion_T &p, const double T, 00586 thermo &th)=0; 00587 00588 }; 00589 00590 /** \brief A hadronic EOS at finite temperature 00591 based on a function of the densities [abstract base] 00592 */ 00593 class hadronic_eos_temp_eden : public hadronic_eos_temp { 00594 public: 00595 00596 /** 00597 \brief Equation of state as a function of density 00598 */ 00599 virtual int calc_e(fermion &n, fermion &p, thermo &th)=0; 00600 00601 /** 00602 \brief Equation of state as a function of densities at 00603 finite temperature 00604 */ 00605 virtual int calc_temp_e(fermion_T &n, fermion_T &p, const double T, 00606 thermo &th)=0; 00607 00608 /** 00609 \brief Equation of state as a function of the chemical potentials 00610 */ 00611 virtual int calc_p(fermion &n, fermion &p, thermo &th); 00612 00613 /** 00614 \brief Equation of state as a function of the chemical potentials 00615 at finite temperature 00616 */ 00617 virtual int calc_temp_p(fermion_T &n, fermion_T &p, const double T, 00618 thermo &th); 00619 00620 }; 00621 00622 /** \brief A hadronic EOS at finite temperature based on a function 00623 of the chemical potentials [abstract base] 00624 */ 00625 class hadronic_eos_temp_pres : public hadronic_eos_temp { 00626 public: 00627 00628 /** 00629 \brief Equation of state as a function of the chemical potentials 00630 */ 00631 virtual int calc_p(fermion &n, fermion &p, thermo &th)=0; 00632 00633 /** 00634 \brief Equation of state as a function of the chemical potentials 00635 at finite temperature 00636 */ 00637 virtual int calc_temp_p(fermion_T &n, fermion_T &p, const double T, 00638 thermo &th)=0; 00639 00640 /** 00641 \brief Equation of state as a function of density 00642 */ 00643 virtual int calc_e(fermion &n, fermion &p, thermo &th); 00644 00645 /** 00646 \brief Equation of state as a function of densities at 00647 finite temperature 00648 */ 00649 virtual int calc_temp_e(fermion_T &n, fermion_T &p, const double T, 00650 thermo &th); 00651 }; 00652 00653 #ifndef DOXYGENP 00654 } 00655 #endif 00656 00657 #endif 00658
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