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(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(double nb, 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(double nb, 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(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(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(double nb, 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(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(double nb, 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(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 the second \ref deriv object to use to find 00391 saturation properties 00392 00393 Computing the slope of the symmetry energy at the saturation 00394 density requires two derivative objects, because it has to 00395 take an isospin derivative and a density derivative. Thus this 00396 second \ref deriv object is used in the function 00397 fesym_slope(). 00398 */ 00399 virtual int set_sat_deriv2(deriv<bool,funct<bool> > &de); 00400 00401 /// Set neutron and proton 00402 virtual int set_n_and_p(fermion &n, fermion &p); 00403 //@} 00404 00405 /// The defaut neutron 00406 fermion def_neutron; 00407 00408 /// The defaut proton 00409 fermion def_proton; 00410 00411 /// \name Default solvers and derivative classes 00412 //@{ 00413 /** 00414 \brief The default object for derivatives 00415 00416 The value of gsl_deriv::h is set to \f$ 10^{-3} \f$ in 00417 the hadronic_eos constructor. 00418 */ 00419 gsl_deriv<int,funct<int> > def_deriv; 00420 00421 /** 00422 \brief The second default object for derivatives 00423 00424 The value of gsl_deriv::h is set to \f$ 10^{-3} \f$ in 00425 the hadronic_eos constructor. 00426 */ 00427 gsl_deriv<bool,funct<bool> > def_deriv2; 00428 00429 /** 00430 \brief The default solver 00431 00432 Used by calc_e() to solve nuc_matter_p() (2 variables) and by 00433 calc_p() to solve nuc_matter_e() (2 variables). 00434 */ 00435 gsl_mroot_hybrids<double *,mm_funct<double *> > def_mroot; 00436 00437 /** \brief The default solver for calculating the saturation 00438 density 00439 00440 Used by fn0() (which is called by saturation()) to solve 00441 saturation_matter_e() (1 variable). 00442 */ 00443 cern_mroot_root<int,funct<int> > def_sat_root; 00444 //@} 00445 00446 /// Return string denoting type ("hadronic_eos") 00447 virtual const char *type() { return "hadronic_eos"; } 00448 00449 #ifndef DOXYGEN_INTERNAL 00450 00451 protected: 00452 00453 /// Compute t1 for gradient_qij(). 00454 double t1_fun(double barn, int &vp); 00455 00456 /// Compute t2 for gradient_qij(). 00457 double t2_fun(double barn, int &vp); 00458 00459 /// The EOS solver 00460 mroot<double *,mm_funct<double *> > *eos_mroot; 00461 00462 /// The solver to compute saturation properties 00463 root<int,funct<int> > *sat_root; 00464 00465 /// The derivative object for saturation properties 00466 deriv<int,funct<int> > *sat_deriv; 00467 00468 /// The second derivative object for saturation properties 00469 deriv<bool,funct<bool> > *sat_deriv2; 00470 00471 /// The neutron object 00472 fermion *neutron; 00473 00474 /// The proton object 00475 fermion *proton; 00476 00477 /// Temporary proton fraction 00478 double proton_frac; 00479 00480 /// Temporary baryon number 00481 double n_baryon; 00482 00483 #endif 00484 00485 }; 00486 00487 /// A hadronic EOS based on a function of the densities [abstract base] 00488 class hadronic_eos_eden : public hadronic_eos { 00489 public: 00490 00491 /** 00492 \brief Equation of state as a function of density 00493 */ 00494 virtual int calc_e(fermion &n, fermion &p, thermo &th)=0; 00495 00496 /** 00497 \brief Equation of state as a function of the chemical potentials 00498 */ 00499 virtual int calc_p(fermion &n, fermion &p, thermo &th); 00500 00501 }; 00502 00503 /** \brief A hadronic EOS based on a function of the chemical 00504 potentials [abstract base] 00505 */ 00506 class hadronic_eos_pres : public hadronic_eos { 00507 public: 00508 00509 /** 00510 \brief Equation of state as a function of the chemical potentials 00511 */ 00512 virtual int calc_p(fermion &n, fermion &p, thermo &th)=0; 00513 00514 /** 00515 \brief Equation of state as a function of density 00516 */ 00517 virtual int calc_e(fermion &n, fermion &p, thermo &th); 00518 00519 }; 00520 00521 /// A finite temperature hadronic EOS 00522 class hadronic_eos_temp : public hadronic_eos { 00523 00524 #ifndef DOXYGEN_INTERNAL 00525 00526 protected: 00527 00528 /// The neutron object 00529 fermion_T *neutron_T; 00530 00531 /// The proton object 00532 fermion_T *proton_T; 00533 00534 /// The temperature 00535 double lT; 00536 00537 /// Solve for nuclear matter at finite temperature given density 00538 int nuc_matter_temp_e(size_t nv, const ovector_base &x, 00539 ovector_base &y, double *&pa); 00540 00541 /// Solve for nuclear matter at finite temperature given mu 00542 int nuc_matter_temp_p(size_t nv, const ovector_base &x, 00543 ovector_base &y, double *&pa); 00544 00545 #endif 00546 00547 public: 00548 00549 /// The defaut neutron 00550 eff_fermion def_neutron_T; 00551 00552 /// The defaut proton 00553 eff_fermion def_proton_T; 00554 00555 hadronic_eos_temp() { 00556 def_neutron_T.init(939.0/o2scl_const::hc_mev_fm,2.0); 00557 def_proton_T.init(939.0/o2scl_const::hc_mev_fm,2.0); 00558 def_neutron_T.non_interacting=false; 00559 def_proton_T.non_interacting=false; 00560 neutron_T=&def_neutron_T; 00561 proton_T=&def_proton_T; 00562 } 00563 00564 virtual ~hadronic_eos_temp() {} 00565 00566 /// Set neutron and proton 00567 virtual int set_n_and_p_T(fermion_T &n, fermion_T &p); 00568 00569 /** 00570 \brief Equation of state as a function of density 00571 */ 00572 virtual int calc_e(fermion &n, fermion &p, thermo &th)=0; 00573 00574 /** 00575 \brief Equation of state as a function of densities at 00576 finite temperature 00577 */ 00578 virtual int calc_temp_e(fermion_T &n, fermion_T &p, double T, 00579 thermo &th)=0; 00580 00581 /** 00582 \brief Equation of state as a function of the chemical potentials 00583 */ 00584 virtual int calc_p(fermion &n, fermion &p, thermo &th)=0; 00585 00586 /** 00587 \brief Equation of state as a function of the chemical potentials 00588 at finite temperature 00589 */ 00590 virtual int calc_temp_p(fermion_T &n, fermion_T &p, double T, 00591 thermo &th)=0; 00592 00593 }; 00594 00595 /** \brief A hadronic EOS at finite temperature 00596 based on a function of the densities [abstract base] 00597 */ 00598 class hadronic_eos_temp_eden : public hadronic_eos_temp { 00599 public: 00600 00601 /** 00602 \brief Equation of state as a function of density 00603 */ 00604 virtual int calc_e(fermion &n, fermion &p, thermo &th)=0; 00605 00606 /** 00607 \brief Equation of state as a function of densities at 00608 finite temperature 00609 */ 00610 virtual int calc_temp_e(fermion_T &n, fermion_T &p, double T, 00611 thermo &th)=0; 00612 00613 /** 00614 \brief Equation of state as a function of the chemical potentials 00615 */ 00616 virtual int calc_p(fermion &n, fermion &p, thermo &th); 00617 00618 /** 00619 \brief Equation of state as a function of the chemical potentials 00620 at finite temperature 00621 */ 00622 virtual int calc_temp_p(fermion_T &n, fermion_T &p, double T, 00623 thermo &th); 00624 00625 }; 00626 00627 /** \brief A hadronic EOS at finite temperature based on a function 00628 of the chemical potentials [abstract base] 00629 */ 00630 class hadronic_eos_temp_pres : public hadronic_eos_temp { 00631 public: 00632 00633 /** 00634 \brief Equation of state as a function of the chemical potentials 00635 */ 00636 virtual int calc_p(fermion &n, fermion &p, thermo &th)=0; 00637 00638 /** 00639 \brief Equation of state as a function of the chemical potentials 00640 at finite temperature 00641 */ 00642 virtual int calc_temp_p(fermion_T &n, fermion_T &p, double T, 00643 thermo &th)=0; 00644 00645 /** 00646 \brief Equation of state as a function of density 00647 */ 00648 virtual int calc_e(fermion &n, fermion &p, thermo &th); 00649 00650 /** 00651 \brief Equation of state as a function of densities at 00652 finite temperature 00653 */ 00654 virtual int calc_temp_e(fermion_T &n, fermion_T &p, double T, 00655 thermo &th); 00656 }; 00657 00658 #ifndef DOXYGENP 00659 } 00660 #endif 00661 00662 #endif 00663
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