rmf_eos.h

00001 /*
00002   -------------------------------------------------------------------
00003   
00004   Copyright (C) 2006, 2007, 2008, 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_RMF_EOS_H
00025 #define O2SCL_RMF_EOS_H
00026 
00027 #include <string>
00028 #include <cmath>
00029 #include <o2scl/lib_settings.h>
00030 #include <o2scl/constants.h>
00031 #include <o2scl/collection.h>
00032 #include <o2scl/part.h>
00033 #include <o2scl/hadronic_eos.h>
00034 #include <o2scl/fermion.h>
00035 #include <o2scl/mm_funct.h>
00036 
00037 #ifndef DOXYGENP
00038 namespace o2scl {
00039 #endif
00040 
00041   /** 
00042       \brief Relativistic mean field theory EOS
00043       
00044       Before sending neutrons and protons to these member functions,
00045       the masses should be set to their vacuum values and the
00046       degeneracy factor should be 2. If an internal model is used
00047       (using load()), then the neutron and proton masses should be set
00048       to \ref mnuc.
00049     
00050       It is important to point out that expressions for the energy
00051       densities are often simplified in the literature using the field
00052       equations. These expressions are not used in this code since
00053       they are only applicable in infinite matter where the field
00054       equations hold, and are not suitable for use in applications
00055       (such as to finite nuclei) where the spatial derivatives of the
00056       fields are non-zero. Notice that in the proper expressions for
00057       the energy density the similarity between terms in the pressure
00058       up to a sign. This procedure allows one to verify the
00059       thermodynamic identity even if the field equations are not
00060       solved and allows the user to add gradient terms to the energy
00061       density and pressure.
00062 
00063       \note Since this EOS uses the effective masses and chemical
00064       potentials in the fermion class, the values of
00065       part::non_interacting for neutrons and protons are set to false
00066       in many of the functions.
00067 
00068       \todo 
00069       - The number of couplings is getting unmanagable, maybe new
00070       organization is required.
00071       - Check the formulas in the "Background" section
00072       - Overload hadronic_eos::fcomp() with an exact version
00073       - Fix calc_p() to be better at guessing
00074       - There are two calc_e() functions that solve. One is
00075       specially designed to work without a good initial guess.
00076       Possible the other calc_e() function should be 
00077       similarly designed?
00078       - Make sure that this class properly handles particles for which 
00079       inc_rest_mass is true/false
00080       - It might be nice to remove explicit reference to the
00081       meson masses in functions which only compute nuclear matter
00082       since they are unnecessary. This might, however, demand 
00083       redefining some of the couplings. 
00084 
00085       \hline
00086 
00087       \b Background
00088 
00089       The full Lagragian is:
00090 
00091       \f[
00092       {\cal L} = {\cal L}_{Dirac} + {\cal L}_{\sigma} + 
00093       {\cal L}_{\omega} + {\cal L}_{\rho} 
00094       \f]
00095     
00096       \f{eqnarray*}
00097       {\cal L}_{Dirac} &=& 
00098       \bar{\Psi} \left[ i {{\partial}\!\!\!{\slash}} - 
00099       g_{\omega} {{\omega}\!\!\!{\slash}} - \frac{g_{\rho}}{2} 
00100       {{\vec{\rho}}\!\!\!{\slash}}
00101       \vec{\tau} - M + g_{\sigma} \sigma - \frac{e}{2} 
00102       \left( 1 + \tau_3 \right) A_{\mu} \right] \Psi \nonumber \\
00103       {\cal L}_{\sigma} &=& 
00104       {\textstyle \frac{1}{2}} \left( \partial_{\mu} \sigma \right)^2 
00105       - {\textstyle \frac{1}{2}} m^2_{\sigma} \sigma^2 
00106       - \frac{b M}{3} \left( g_{\sigma} \sigma\right)^3 
00107       - \frac{c}{4} \left( g_{\sigma} \sigma\right)^4  \nonumber \\
00108       {\cal L}_{\omega} &=& 
00109       - {\textstyle \frac{1}{4}} f_{\mu \nu} f^{\mu \nu} 
00110       + {\textstyle \frac{1}{2}} m^2_{\omega}\omega^{\mu}\omega_{\mu} 
00111       + \frac{\zeta}{24} g_{\omega}^4 \left(\omega^\mu \omega_\mu\right)^2
00112       \nonumber \\
00113       {\cal L}_{\rho} &=& 
00114       - {\textstyle \frac{1}{4}} \vec{B}_{\mu \nu} \cdot \vec{B}^{\mu \nu}
00115       + {\textstyle \frac{1}{2}} m^2_{\rho} \vec{\rho}^{~\mu} \cdot 
00116       \vec{\rho}_{~\mu} 
00117       + \frac{\xi}{24} g_{\rho}^4 \left(\vec{\rho}^{~\mu}\right) \cdot 
00118       \vec{\rho}_{~\mu} 
00119       + g_{\rho}^2 f (\sigma, \omega) \vec{\rho}^{~\mu} \cdot 
00120       \vec{\rho}_{~\mu} \nonumber \\
00121       \f}
00122     
00123       The coefficients \f$ b \f$ and \f$ c \f$ are related to the somewhat
00124       standard \f$ \kappa \f$ and \f$ \lambda \f$ by:
00125     
00126       \f[
00127       \kappa=2 M b \quad \lambda=6 c;
00128       \f]
00129     
00130       The function \f$ f \f$ is the coefficient of \f$ g_r^2 \rho^2 \f$ 
00131     
00132       \f$ f(\sigma,\omega) = b_1 \omega^2 + b_2 \omega^4 + b_3 \omega^6 +
00133       a_1 \sigma + a_2 \sigma^2 + a_3 \sigma^3 + a_4 \sigma^4 +
00134       a_5 \sigma^5 + a_6 \sigma^6 \f$ 
00135     
00136       where the notation from \ref Horowitz01 is:
00137     
00138      \f$ f(\sigma,\omega) = \lambda_4 g_s^2 \sigma^2 + 
00139       \lambda_v g_w^2 \omega^2 \f$ 
00140     
00141       This implies \f$ b_1=\lambda_v g_w^2 \f$ and 
00142      \f$ a_2=\lambda_4 g_s^2 \f$ 
00143     
00144       The field equations are:
00145     
00146       \f[
00147       0 = m_{\sigma}^2 \sigma - g_{\sigma} \left( n_{s n} + n_{s p} \right)
00148       + b M g_{\sigma}^3 \sigma^2 + c g_{\sigma}^4 \sigma^3 -
00149       g_{\rho}^2 \rho^2 \frac{\partial f}{\partial \sigma}
00150       \f]
00151 
00152       \f[
00153       0 = m_{\omega}^2 \omega - g_{\omega} \left(n_n+n_p\right)
00154       + \frac{\zeta}{6} g_{\omega}^4 \omega^3 g_{\rho}^2 \rho^2 
00155       \frac{\partial f}{\partial \omega}
00156       \f]
00157 
00158       \f[
00159       0 = m_{\rho}^2 \rho + \frac{1}{2} g_{\rho} \left(n_n-n_p\right)
00160       + 2 g_{\rho}^2 \rho f + \frac{\xi}{6} g_{\rho}^4 \rho^3
00161       \f]
00162 
00163       When the variable zm_mode is true, the effective mass is fixed using
00164       the approach of \ref Zimanyi90 .
00165     
00166       Defining
00167     
00168       \f[
00169       U(\sigma)=\frac{1}{2} m_\sigma^2\sigma^2+\frac{b M}{3}(g_\sigma\sigma)^3
00170       +\frac{c}{4}(g_\sigma\sigma)^4\;, 
00171       \f]
00172     
00173       the binding energy per particle in symmetric matter at equilibrium
00174       is given by
00175     
00176       \f[
00177       \frac{E}{A} = \frac{1}{n_0} \left[U(\sigma_0)+
00178       \frac{1}{2} m_\omega\omega_0^2+
00179       \frac{\zeta}{8}(g_\omega\omega_0)^4+\frac{2}{\pi^2}
00180       \int\limits_0^{k_F} dk k^2\sqrt{k^2+M^{*2}} \right]\;.
00181       \f]
00182     
00183       where the Dirac
00184       effective mass is  \f$ M^{*} = M - g_{\sigma}\sigma_0 \f$ .
00185       The compressibility is given by
00186     
00187       \f[
00188       K=9\frac{g_\omega^2}{m_\omega^2}n_0+3\frac{k_F^2}{E_F^*}
00189       -9n_0\frac{M^{*2}}{E_F^{*2}}\left[\left(\frac{1}{g_\sigma^2}
00190       \frac{\partial^2}{\partial\sigma_0^2}+\frac{3}{g_\sigma M^*}
00191       \frac{\partial}{\partial\sigma_0}\right)
00192       U(\sigma_0)-3\frac{n_0}{E_F^*}\right]^{-1}\;.
00193       \f]
00194     
00195       The symmetry energy of bulk matter is given by
00196     
00197       \f[
00198       E_{sym} = \frac{k_F^2}{6 E_F^{*}} + \frac{ n }
00199       {8 \left(g_{\rho}^2/m_{\rho}^2 + 2 f (\sigma_0, \omega_0) \right)} 
00200       \f]
00201     
00202       In the above equations, the subscipt `` \f$ 0 \f$ '' denotes the mean
00203       field values of \f$ \sigma \f$ and \f$ \omega \f$ .  For the case
00204       \f$ f=0 \f$ , the symmetry energy varies linearly with the density at
00205       large densities. The function \f$ f \f$ permits variations in the
00206       density dependence of the symmetry energy above nuclear matter
00207       density.
00208     
00209       See also \ref Muller96, \ref Zimanyi90.
00210       
00211   */
00212   class rmf_eos : public hadronic_eos {
00213   public:
00214 
00215     /// Modifies method of calculating effective masses
00216     bool zm_mode;
00217 
00218     /// \name Masses
00219     //@{
00220 
00221     /** 
00222         \brief nucleon mass
00223 
00224         This need not be exactly equal to the neutron or proton mass, 
00225         but provides the scale for the coupling \c b.
00226     */
00227     double mnuc;
00228 
00229     /// \f$ \sigma \f$ mass (in \f$ \mathrm{fm}^{-1} \f$ )
00230     double ms;
00231 
00232     /// \f$ \omega \f$ mass (in \f$ \mathrm{fm}^{-1} \f$ )
00233     double mw;
00234 
00235     /// \f$ \rho \f$ mass (in \f$ \mathrm{fm}^{-1} \f$ )
00236     double mr;
00237 
00238     //@}
00239 
00240     /// \name Standard couplings (including nonlinear sigma terms)
00241     //@{
00242     double cs, cw, cr, b, c;
00243     //@}
00244 
00245     /// \name Non-linear terms for omega and rho.
00246     //@{
00247     double zeta, xi;
00248     //@}
00249   
00250     /// \name Additional isovector couplings
00251     //@{
00252     double a1, a2, a3, a4, a5, a6, b1, b2, b3;
00253     //@}
00254 
00255     rmf_eos();
00256 
00257     /** 
00258         \brief Load parameters for model named 'model'
00259         
00260         Presently accepted values from file rmfdata/model_list:
00261         \include rmfdata/model_list
00262         
00263         In these files, the nucleon and meson masses are by default
00264         specified in MeV, and cs, cw, and cr are given in fm. The
00265         parameters b and c are both unitless. If the bool 'oakstyle' is
00266         true, then load() assumes that gs, gw, and gr have been given
00267         where gs and gw are as usual, but gr is a factor of two smaller
00268         than usual, and g2 and g3 have been given where g2 = -b M gs^3
00269         and g3 = c gs^4. If tokistyle is true, then it is additionally
00270         assumed that c3 is given where c3=zeta/6*gw^4.
00271         
00272         If \c external is true, then model is the filename (relative
00273         to the current directory) of the file containing the model
00274         parameters. Otherwise, the model is assumed to be present in
00275         the O2scl library data directory.
00276     */
00277     int load(std::string model, bool external=false);
00278 
00279     /// \name Compute EOS from densities at zero temperature
00280     //@{
00281     /** 
00282         \brief Equation of state as a function of density
00283 
00284         Initial guesses for the chemical potentials are taken
00285         from the user-given values. Initial guesses for the fields
00286         can be set by set_fields(), or default values will be used.
00287         After the call to calc_e(), the final values of the fields
00288         can be accessed through get_fields(). 
00289 
00290         This is a little more robust than the standard version
00291         in the parent \ref hadronic_eos.
00292         
00293         \todo This doesn't always work well when the proton density
00294         is zero.
00295        
00296     */
00297     virtual int calc_e(fermion &ne, fermion &pr, thermo &lth);
00298   
00299     /** 
00300         \brief Equation of state as a function of density
00301         
00302         \todo This doesn't always work well when the proton density
00303         is zero.
00304         \todo Rename this function to distinguish between calc_e()'s
00305        
00306     */
00307     virtual int calc_e(fermion &ne, fermion &pr, thermo &lth,
00308                        double &sig, double &ome, double &rho);
00309     //@}
00310   
00311     /// \name Compute EOS from chemical at zero temperature
00312     //@{
00313     /**  
00314          \brief Equation of state as a function of chemical potential
00315          
00316          Solves for the field equations automatically.
00317          
00318          \note This may not be too robust. Fix?
00319     */
00320     virtual int calc_p(fermion &ne, fermion &pr, thermo &lth);
00321 
00322     /** 
00323         \brief Equation of state and meson field equations 
00324         as a function of chemical potentials
00325       
00326         This calculates the pressure and energy density as a function of
00327         \f$ \mu_n,\mu_p,\sigma,\omega,rho \f$ . When the field equations
00328         have been solved, \c f1, \c f2, and \c f3 are all zero. 
00329         
00330         The thermodynamic identity is satisfied even when the field
00331         equations are not solved.
00332     */
00333     virtual int calc_eq_p(fermion& neu, fermion& p, double sig, double ome, 
00334                           double rho, double& f1, double& f2, double& f3, 
00335                           thermo& th);
00336     //@}
00337 
00338     /// \name Compute EOS from chemical potentials at finite temperature
00339     //@{
00340     /** \brief Equation of state and meson field equations as a 
00341         function of chemical potentials
00342     */
00343     virtual int calc_eq_temp_p(fermion &ne, fermion &pr, const double temper, 
00344                                double sig, double ome, double rho, double &f1, 
00345                                double &f2, double &f3, thermo &th);
00346 
00347     /**  
00348          \brief Equation of state as a function of chemical potential
00349          
00350          Solves for the field equations automatically.
00351     */
00352     virtual int calc_temp_p(fermion &ne, fermion &pr, const double T,
00353                             thermo &lth);
00354     //@}
00355 
00356     int calc_temp_e(fermion &ne, fermion &pr, const double T, 
00357                     thermo &lth);
00358       
00359     /** 
00360         \brief Calculate cs, cw, cr, b, and c from the saturation 
00361         properties
00362 
00363         Note that the meson masses and \ref mnuc must be specified
00364         before calling this function.
00365 
00366         This function does not give correct results when bool zm_mode 
00367         is true. 
00368         
00369         \c guess_cs, \c guess_cw, \c guess_b, and \c guess_c are
00370         initial guesses for \c cs, \c cw, \c b, and \c c respectively.
00371 
00372         \todo 
00373         - Fix this for zm_mode=true
00374         - Ensure solver is more robust
00375         
00376     */
00377     int fix_saturation(double guess_cs=4.0, double guess_cw=3.0, 
00378                        double guess_b=0.001, double guess_c=-0.001);
00379     
00380     /** \brief Calculate properties for nuclear matter at the
00381         saturation density
00382         
00383         This requires initial guesses to the chemical 
00384         potentials, etc.
00385     */
00386     virtual int saturation();
00387   
00388     /** \brief Calculate symmetry energy assuming the field
00389         equations have already been solved
00390         
00391         This may only work at saturation density. Used by saturation().
00392     */
00393     double fesym_fields(double sig, double ome, double nb);
00394 
00395     /** \brief Calculate the compressibility assuming the field
00396         equations have already been solved
00397         
00398         This may only work at saturation density.
00399     */
00400     double fcomp_fields(double sig, double ome, double nb);
00401 
00402     /** \brief Calculate compressibilty and \c kprime assuming the field
00403         equations have already been solved
00404 
00405         This may only work at saturation density. Used by
00406         saturation(). 
00407 
00408         \todo Does this work? Fix fkprime_fields() if it does not.
00409     */
00410     int fkprime_fields(double sig, double ome, double nb,
00411                        double &k, double &kprime);
00412     
00413     /** 
00414         \brief A function for solving the field equations
00415 
00416         x[0], x[1], and x[2] should be set to \f$ \sigma, \omega \f$ , 
00417         and \f$ \rho \f$ on input (in \f$ \mathrm{fm}^{-1} \f$ ) and
00418         on exit, y[0], y[1] and y[2] contain the field equations 
00419         and are zero when the field equations have been solved.
00420         The \c pa parameter is ignored.
00421     */
00422     int field_eqs(size_t nv, const ovector_view &x, ovector_view &y, 
00423                   void *&pa);
00424 
00425     /** 
00426         \brief A function for solving the field equations at finite 
00427         temperature
00428         
00429         x[0], x[1], and x[2] should be set to \f$ \sigma, \omega \f$ , 
00430         and \f$ \rho \f$ on input (in \f$ \mathrm{fm}^{-1} \f$ ) and
00431         on exit, y[0], y[1] and y[2] contain the field equations 
00432         and are zero when the field equations have been solved.
00433         The \c pa parameter is ignored.
00434     */
00435     int field_eqsT(size_t nv, const ovector_view &x, ovector_view &y, 
00436                    void *&pa);
00437 
00438     /** \brief Set a guess for the fields for the next call to calc_e(), 
00439         calc_p(), or saturation()
00440     */
00441     virtual int set_fields(double sig, double ome, double lrho) {
00442       sigma=sig;
00443       omega=ome;
00444       rho=lrho;
00445       guess_set=true;
00446       return 0;
00447     }
00448 
00449     /** 
00450         \brief Return the most recent values of the meson fields 
00451         
00452         This returns the most recent values of the meson fields set by
00453         a call to saturation(), calc_e(), or calc_p(fermion &, fermion
00454         &, thermo &).
00455     */
00456     int get_fields(double &sig, double &ome, double &lrho) {
00457       sig=sigma;
00458       ome=omega;
00459       lrho=rho;
00460       return 0;
00461     }
00462 
00463     /// Return string denoting type ("rmf_eos")
00464     virtual const char *type() { return "rmf_eos"; }
00465 
00466     // Removed cause we can use sat_mroot
00467     // The default solver for calculating the saturation properties
00468     // gsl_mroot_hybrids<void *,mm_funct<void *> > def_cp_mroot;
00469 
00470     /** \brief Set the coefficients of a rmf_eos object to their 
00471         limits from naturalness
00472 
00473         As given in muller and Serot, npa 606, 508
00474 
00475         The definition of the vector-isovector field and coupling
00476         matches what is done here. Compare the Lagrangian above
00477         with Eq. 10 from the reference.
00478 
00479         The following couplings should all be of the same
00480         size:
00481         \f[
00482         \frac{1}{2 c_s^2 M^2}, \frac{1}{2 c_v^2 M^2} 
00483         \frac{1}{8 c_{\rho}^2 M^2},~\mathrm{and}~\frac{
00484         \bar{a}_{ijk} M^{i+2 j+2 k-4}}{2^{2 k}}
00485         \f]
00486         which are equivalent to 
00487         \f[
00488         \frac{m_s^2}{2 g_s^2 M^2}, \frac{m_v^2}{2 g_v^2 M^2} 
00489         \frac{m_{\rho}^2}{8 g_{\rho}^2 M^2},~\mathrm{and}~\frac{
00490         a_{ijk} M^{i+2 j+2 k-4}}{g_s^i g_v^{2 j} 
00491         g_{\rho}^{2 k} 2^{2 k}}
00492         \f]
00493         
00494         The connection the \f$ a_{ijk} \f$ 's and the coefficients 
00495         that are used here is 
00496         \f{eqnarray*}
00497         \frac{b M}{3} g_{\sigma}^3 \sigma^3 &=& a_{300}~\sigma^3
00498         \nonumber \\
00499         \frac{c}{4} g_{\sigma}^4 \sigma^4 &=& a_{400}~\sigma^4
00500         \nonumber \\
00501         \frac{\zeta}{24} g_{\omega}^4 \omega^4 &=& a_{020}~\omega^4
00502         \nonumber \\
00503         \frac{\xi}{24} g_{\rho}^4 \rho^4 &=& a_{002}~\rho^4
00504         \nonumber \\
00505         b_1 g_{\rho}^2 \omega^2 \rho^2 &=& a_{011}~\omega^2 \rho^2 
00506         \nonumber \\
00507         b_2 g_{\rho}^2 \omega^4 \rho^2 &=& a_{021}~\omega^4 \rho^2 
00508         \nonumber \\
00509         b_3 g_{\rho}^2 \omega^6 \rho^2 &=& a_{031}~\omega^6 \rho^2 
00510         \nonumber \\
00511         a_1 g_{\rho}^2 \sigma^1 \rho^2 &=& a_{101}~\sigma^1 \rho^2 
00512         \nonumber \\
00513         a_2 g_{\rho}^2 \sigma^2 \rho^2 &=& a_{201}~\sigma^2 \rho^2 
00514         \nonumber \\
00515         a_3 g_{\rho}^2 \sigma^3 \rho^2 &=& a_{301}~\sigma^3 \rho^2 
00516         \nonumber \\
00517         a_4 g_{\rho}^2 \sigma^4 \rho^2 &=& a_{401}~\sigma^4 \rho^2 
00518         \nonumber \\
00519         a_5 g_{\rho}^2 \sigma^5 \rho^2 &=& a_{501}~\sigma^5 \rho^2 
00520         \nonumber \\
00521         a_6 g_{\rho}^2 \sigma^6 \rho^2 &=& a_{601}~\sigma^6 \rho^2 
00522         \nonumber
00523         \f}
00524 
00525         Note that Muller and Serot use the notation 
00526         \f[
00527         \frac{\bar{\kappa} g_s^3 }{2} = \frac{\kappa}{2} = b M 
00528         g_s^3 \qquad \mathrm{and} \qquad
00529         \frac{\bar{\lambda} g_s^4}{6} = \frac{\lambda}{6}
00530         = c g_s^4
00531         \f]
00532         which differs slightly from the "standard" notation above.
00533 
00534         We need to compare the values of
00535         \f{eqnarray*}
00536         &\frac{m_s^2}{2 g_s^2 M^2}, \frac{m_v^2}{2 g_v^2 M^2} 
00537         \frac{m_{\rho}^2}{8 g_{\rho}^2 M^2},\frac{b}{3},
00538         \frac{c}{4}
00539         &
00540         \nonumber \\
00541         &\frac{\zeta}{24}, \frac{\xi}{384},
00542         \frac{b_1}{4 g_{\omega}^2},
00543         \frac{b_2 M^2}{4 g_{\omega}^4},
00544         \frac{b_3 M^4}{4 g_{\omega}^6},
00545         \frac{a_1}{4 g_{\sigma} M},&
00546         \nonumber \\
00547         &\frac{a_2}{4 g_{\sigma}^2},
00548         \frac{a_3 M}{4 g_{\sigma}^3},
00549         \frac{a_4 M^2}{4 g_{\sigma}^4},
00550         \frac{a_5 M^3}{4 g_{\sigma}^5},~\mathrm{and}~\frac{a_6 M^4}
00551         {4 g_{\sigma}^6}\, .&
00552         \f}
00553 
00554         These values are stored in the variables cs, cw, cr, b, c,
00555         zeta, xi, b1, etc. in the specified \ref rmf_eos object. All
00556         of the numbers should be around 0.001 or 0.002.
00557 
00558         For the scale \f$ M \f$, \ref mnuc is used.
00559 
00560         \todo I may have ignored some signs in the above, which are
00561         unimportant for this application, but it would be good to fix
00562         them for posterity.
00563 
00564     */
00565     int check_naturalness(rmf_eos &re) {
00566       
00567       double gs=cs*ms;
00568       double gw=cw*mw;
00569       double gr=cr*mr;
00570 
00571       re.cs=0.5/cs/cs/mnuc/mnuc;
00572       re.cw=0.5/cw/cw/mnuc/mnuc;
00573       re.cr=0.125/cr/cr/mnuc/mnuc;
00574       re.b=b/3.0;
00575       re.c=c/4.0;
00576 
00577       re.zeta=zeta/24.0;
00578       re.xi=xi/384.0;
00579 
00580       re.b1=b1/gw/gw/4.0;
00581       re.b2=b2/pow(gw,4.0)/4.0*mnuc*mnuc;
00582       re.b3=b3/pow(gw,6.0)/4.0*pow(mnuc,4.0);
00583 
00584       re.a1=a1/gs/4.0/mnuc;
00585       re.a2=a2/pow(gs,2.0)/4.0;
00586       re.a3=a3/pow(gs,3.0)/4.0*mnuc;
00587       re.a4=a4/pow(gs,4.0)/4.0*mnuc*mnuc;
00588       re.a5=a5/pow(gs,5.0)/4.0*pow(mnuc,3.0);
00589       re.a6=a6/pow(gs,6.0)/4.0*pow(mnuc,4.0);
00590 
00591       return 0;
00592     }
00593     
00594     /** \brief Provide the maximum values of the couplings assuming
00595         a limit on naturalness
00596 
00597         The limits for the couplings are function of the nucleon and
00598         meson masses, except for the limits on \c b, \c c, \c zeta,
00599         and \c xi which are independent of the masses because of the
00600         way that these four couplings are defined.
00601     */
00602     int naturalness_limits(double value, rmf_eos &re) {
00603       
00604       double gs=cs*ms;
00605       double gw=cw*mw;
00606       double gr=cr*mr;
00607 
00608       re.cs=value*2.0*mnuc*mnuc;
00609       re.cw=value*2.0*mnuc*mnuc;
00610       re.cr=value*8.0*mnuc*mnuc;
00611       re.b=value*3.0;
00612       re.c=value*4.0;
00613 
00614       re.zeta=value*24.0;
00615       re.xi=value*384.0;
00616       
00617       re.b1=value*gw*gw*4.0;
00618       re.b2=value*pow(gw,4.0)*4.0/mnuc/mnuc;
00619       re.b3=value*pow(gw,6.0)*4.0/pow(mnuc,4.0);
00620 
00621       re.a1=value*gs*4.0*mnuc;
00622       re.a2=value*pow(gs,2.0)*4.0;
00623       re.a3=value*pow(gs,3.0)*4.0/mnuc;
00624       re.a4=value*pow(gs,4.0)*4.0/mnuc/mnuc;
00625       re.a5=value*pow(gs,5.0)*4.0/pow(mnuc,3.0);
00626       re.a6=value*pow(gs,6.0)*4.0/pow(mnuc,4.0);
00627       
00628       return 0;
00629     }
00630 
00631     /** \brief Set class mroot object for use calculating saturation density
00632      */
00633     virtual int set_sat_mroot(mroot<void *,mm_funct<void *> > &mrx) {
00634       sat_mroot=&mrx;
00635       return 0;
00636     }
00637 
00638     /** \brief The default solver for calculating the saturation 
00639         density
00640         
00641         Used by fn0() (which is called by saturation()) to solve
00642         saturation_matter_e() (1 variable).
00643     */
00644     gsl_mroot_hybrids<void *,mm_funct<void *> > def_sat_mroot;
00645 
00646 #ifndef DOXYGEN_INTERNAL
00647 
00648   protected:
00649     
00650     /** 
00651         \brief Temporary charge density 
00652 
00653         \todo Should use hadronic_eos::proton_frac instead?
00654     */
00655     double n_charge;
00656 
00657     /// \name The meson fields
00658     //@{
00659     double sigma, omega, rho;
00660     //@}
00661 
00662     /// Temperature for solving field equations at finite temperature
00663     double fe_temp;
00664 
00665     /// For calc_e(), if true, then solve for neutron matter
00666     bool ce_neut_matter;
00667     
00668     /// For calc_e(), if true, then solve for proton matter
00669     bool ce_prot_matter;
00670 
00671     /// True if a guess for the fields has been given
00672     bool guess_set;
00673 
00674     /// The solver to compute saturation properties
00675     mroot<void *,mm_funct<void *> > *sat_mroot;
00676 
00677     /// The function for fix_saturation()
00678     int fix_saturation_fun(size_t nv, const ovector_view &x, ovector_view &y, 
00679                    void *&pa);
00680     
00681     /// Compute matter at zero pressure (for saturation())
00682     virtual int zero_pressure(size_t nv, const ovector_view &ex, 
00683                               ovector_view &ey, void *&pa);
00684 
00685     /// The function for calc_e()
00686     virtual int calc_e_solve_fun(size_t nv, const ovector_view &ex, 
00687                                  ovector_view &ey, void *&pa);
00688     /// The function for calc_temp_e()
00689     virtual int calc_temp_e_solve_fun(size_t nv, const ovector_view &ex, 
00690                                  ovector_view &ey, void *&pa);
00691 
00692     /** \brief Calculate the \c cr coupling given \c sig and \c ome 
00693         at the density 'nb'.
00694         
00695         Used by fix_saturation().
00696     */
00697     int calc_cr(double sig, double ome, double nb);
00698 
00699     double ce_temp;
00700 
00701 #endif
00702 
00703   };
00704 
00705   template<> int io_tlate<rmf_eos>::input
00706     (cinput *co, in_file_format *ins, rmf_eos *sk);
00707   template<> int io_tlate<rmf_eos>::output
00708     (coutput *co, out_file_format *outs, rmf_eos *sk);
00709   template<> const char *io_tlate<rmf_eos>::type();
00710 
00711   typedef io_tlate<rmf_eos> rmf_eos_io_type;
00712 
00713 #ifndef DOXYGENP
00714 }
00715 #endif
00716 
00717 #endif

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page