Equations of State of Hadronic Matter¶
The hadronic equations of state (EOSs) treat nucleonic (neutrons and protons) matter at zero or finite temperature. There are models which are easily written in terms of the neutron and proton densities:
eos_had_potential, and
and those which are more easily written in terms of the neutron and proton chemical potentials:
All of these EOSs are built on the base class eos_had_base, which includes several methods which apply to all of these models. For example, methods which calculate the saturation properties of nuclear matter. These methods are sometimes overloaded in descendants when exact formulas are available.
There is also a set of classes to modify the quartic term of the symmetry energy: eos_had_sym4_rmf, eos_had_sym4_apr, eos_had_sym4_skyrme, and eos_had_sym4_mdi all based on eos_had_sym4_base which can be used in eos_had_sym4.
Akmal-Pandharipande-Ravenhall EOS example¶
This example computes the APR EOS with eos_had_apr. It computes nuclear and neutron matter and then matter in beta-equilibrium with both a Maxwell construction (as done in the [Akmal98eo]) and a Gibbs construction to match the low- and high-density phases. Afterwards it computes the properties of neutron stars from the EOS. Most of the data is stored in table_units objects and then written to HDF files in the examples directory.
This example is rather lengthy and the full source code is not duplicated here. The class created in that example is documented at ex_eos_had_apr . The EOS and mass radius curves for APR created by this example and for the Skyrme model SLy4 from the next example is below. The third figure below is the Gibbs phase transition for APR.
Typical output:
Skyrme EOS example¶
This example computes the EOS and neutron star properties using eos_had_skyrme from a Skyrme model.
This example is rather lengthy and the full source code is not duplicated here. The class created in that example is documented at ex_eos_had_skyrme .
Typical output:
RMF EOS example¶
This example computes the “FSUGold” EOS and neutron star properties using eos_had_rmf from a Rmf model.
Source code:
/* Example: ex_eos_had_rmf.cpp
-------------------------------------------------------------------
A simple example for an RMF EOS. See "License Information"
section of the documentation for license information.
*/
#include <o2scl/test_mgr.h>
#include <o2scl/eos_had_rmf.h>
#include <o2scl/nstar_cold.h>
#include <o2scl/hdf_eos_io.h>
#include <o2scl/fermion_deriv_rel.h>
using namespace std;
using namespace o2scl;
using namespace o2scl_hdf;
using namespace o2scl_const;
int main(void) {
cout.setf(ios::scientific);
test_mgr t;
t.set_output_level(2);
eos_had_rmf re;
re.def_sat_mroot.def_jac.set_epsrel(1.0e-6);
re.def_sat_mroot.def_jac.set_epsmin(1.0e-15);
re.def_sat_mroot.ntrial*=10;
rmf_load(re,"FSUGold");
cout << re.ms << " " << re.mw << " " << re.mr << endl;
cout << re.cs << " " << re.cw << " " << re.cr << endl;
cout << re.b << " " << re.c << " " << re.mnuc << endl;
cout << re.zeta << " " << re.b1 << endl;
// It turns out that FSUGold needs a better initial
// guess than the default to get saturation right
re.err_nonconv=false;
re.def_sat_mroot.err_nonconv=false;
re.def_sat_mroot.def_jac.err_nonconv=false;
re.def_mroot.err_nonconv=false;
re.def_mroot.def_jac.err_nonconv=false;
int sret=re.saturation();
if (sret!=0 || re.n0<0.08) {
re.set_fields(0.2,0.1,0.01);
re.def_neutron.mu=5.0;
re.def_proton.mu=5.0;
sret=re.saturation();
if (sret!=0) {
O2SCL_ERR("RMF EOS failed.",o2scl::exc_efailed);
}
}
// Return the convergence error flag to the default value
re.err_nonconv=true;
re.def_sat_mroot.err_nonconv=true;
re.def_sat_mroot.def_jac.err_nonconv=true;
re.def_mroot.err_nonconv=true;
re.def_mroot.def_jac.err_nonconv=true;
// Compute the saturation density and the symmetry energy
cout << "FSUGold: " << re.n0 << endl;
cout << "FSUGold: " << re.esym*hc_mev_fm << endl;
t.test_rel(re.n0,0.1481,4.0e-4,"FSUGold saturation density.");
// Commpute the beta-equilibrium EOS and solve the TOV equations
nstar_cold nc;
nc.set_eos(re);
nc.calc_eos();
nc.calc_nstar();
// Output gravitational mass-radius curve
cout << endl;
shared_ptr<table_units<>> tov=nc.get_tov_results();
for(size_t i=0;i<tov->get_nlines();i++) {
cout << tov->get("gm",i) << " " << tov->get("r",i) << endl;
}
t.report();
return 0;
}
Typical output: