Class eos_had_phen (o2scl)¶
-
class o2scl::eos_had_phen : public o2scl::eos_had_temp_eden_base¶
Phenomenological EOS for homogeneous nucleonic matter.
Main EOS parameters [protected]
-
double qmc_alpha¶
The first exponent for density in the QMC EOS (unitless)
-
double qmc_a¶
The first coefficient for the QMC EOS (in MeV)
-
double phi¶
The speed of sound in neutron star matter at \( n_B=2~\mathrm{fm}^{-3} \).
-
double eos_S¶
The symmetry energy.
-
double eos_L¶
The slope of the symmetry energy.
-
int i_ns¶
The index of the neutron star model.
-
int i_skyrme¶
The index of the Skyrme model.
Internal variables [protected]
-
o2scl::table_units nstar_tab¶
The table which stores the neutron star EOS results.
-
o2scl::table_units UNEDF_tab¶
The table which stores the Skyrme fits.
-
bool model_selected¶
If true, a model has been selected (default false)
EOS outputs
-
double f_deg¶
The free energy of degenerate matter.
-
double f_virial¶
The virial free energy.
-
double s_virial¶
The virial entropy.
-
double Lambda_bar_14¶
The value of \( \bar{\Lambda} \) for a 1.4 solar mass neutron star.
The fit to the neutron star EOS [protected]
-
std::vector<double> ns_fit_parms¶
Parameters for the function which fits the neutron star EOS.
-
double chi2_ns¶
The chi-squared for the neutron star fit.
-
double ns_nb_max¶
The maximum baryon density at which the neutron star EOS is causal.
This quantity is determined by ns_fit()
-
double energy_density_ns(double nn)¶
Compute the energy density (in \( \mathrm{fm}^{-4} \)) of neutron matter at high density from the neutron star data using the most recent fit (without the rest mass contribution)
Note
Currently this just returns the value of ed_fit() .
-
double fit_fun(size_t np, const std::vector<double> &parms, double nb)¶
The fit function for the energy per particle in units of MeV as a function of the baryon density (in \( \mathrm{fm}^{-3} \) )
Note this function does not include the rest mass energy density for the nucleons.
-
double ed_fit(double nb)¶
The energy density (in \( \mathrm{fm}^{-4} \) ) as a function of baryon density (in \( \mathrm{fm}^{-3} \) )
Note this function does not include the rest mass energy density for the nucleons.
-
double dmudn_fit(double nb)¶
The inverse susceptibility (in \( \mathrm{fm}^{2} \) ) as a function of baryon density (in \( \mathrm{fm}^{-3} \) )
-
double cs2_fit(double nb)¶
The speed of sound as a function of baryon density (in \( \mathrm{fm}^{-3} \) )
-
void min_max_cs2(double &cs2_min, double &cs2_max)¶
Compute the minimum and maximum speed of sound between 0.08 and ns_nb_max.
-
void ns_fit(int row)¶
Fit neutron star data from Bamr to an analytical expression.
-
double mu_fit(double nb)¶
The baryon number chemical potential (in \( \mathrm{fm}^{-1} \) ) as a function of number density (in \( \mathrm{fm}^{-3} \) )
Note this function does not include the rest mass for the nucleons.
Particle objects [protected]
-
o2scl::fermion electron¶
Electron/positron.
-
o2scl::fermion muon¶
Muon/anti-muon.
-
o2scl::fermion neutron¶
Neutron.
-
o2scl::fermion proton¶
Proton.
-
o2scl::fermion n_chiral¶
Neutron for chiral part.
-
o2scl::fermion p_chiral¶
Proton for chiral part.
-
o2scl::fermion neutrino¶
Neutrino.
Base physics objects [protected]
-
eos_had_virial_deriv vsd¶
The virial equation solver.
-
eos_had_virial vs¶
Old virial solver.
-
o2scl::fermion_rel relf¶
Object for computing electron/positron thermodynamic integrals.
-
o2scl::thermo th2¶
Thermodynamic quantities.
-
o2scl::thermo th_chiral¶
Thermodynamic quantities for chiral part.
-
o2scl::eos_had_skyrme sk¶
Base EOS model.
-
o2scl::eos_had_skyrme sk_Tcorr¶
Skyrme model for finite-temperature correction.
-
o2scl::eos_had_temp_eden_base *eos_Tcorr¶
Pointer to EOS for finite-temperature corrections.
-
eos_crust_virial_v2 ecv¶
The virial EOS.
-
o2scl::eos_had_skyrme sk_alt¶
Alternative skryme model.
-
o2scl::eos_had_temp_base *eosp_alt¶
Pointer to alternative model.
The parameters for the QMC energy density [protected]
-
double qmc_beta¶
The second exponent for density in the QMC EOS (unitless)
-
double qmc_b¶
The second coefficient for the QMC EOS (in MeV)
-
double qmc_n0¶
The saturation density of the QMC EOS, equal to \( 0.16~\mathrm{fm}^{-3} \).
Output saturation properties [protected]
-
double eos_EoA¶
The binding energy per particle.
-
double eos_K¶
The incompressibility.
-
double eos_n0¶
The saturation density.
Settings [public]
-
bool old_version¶
If true, use the EOS from the Du et al. (2019) paper instead of the Du et al. (2020) update (default false)
-
bool use_skalt¶
Use a Skyrme model rather than the Du et al. combined EOS.
-
bool test_ns_cs2¶
If true, test the neutron star speed of sound (default true)
-
bool ns_record¶
If true, save the results of the neutron star fit to a file, and immediately exit (default false)
-
bool old_ns_fit¶
If true, use the old neutron star fit (default true)
This defaults to true because the old fit performs a bit better than the new one. The new fit was never used in a publication.
-
int verbose¶
Verbose parameter.
-
bool output_files¶
If true, create output files for individual EOSs.
-
double a_virial¶
Coefficient for modulation of virial EOS.
-
double b_virial¶
Coefficient for modulation of virial EOS.
-
bool include_muons¶
If true, include muons (default false)
-
bool select_cs2_test¶
If true, test cs2 in the select_internal() function (default true)
-
inline virtual int calc_temp_e(fermion &n, fermion &p, double T, thermo &th)¶
Equation of state as a function of densities at finite temperature.
-
inline virtual int calc_e(fermion &n, fermion &p, thermo &th)¶
Equation of state as a function of densities at zero temperature.
Basic EOS functions [protected]
-
double free_energy_density(o2scl::fermion &n, o2scl::fermion &p, double T, o2scl::thermo &th)¶
Return the total free energy density of matter (without the rest mass contribution for the nucleons)
-
double free_energy_density_detail(o2scl::fermion &n, o2scl::fermion &p, double T, o2scl::thermo &th, double &zn, double &zp, double &f1, double &f2, double &f3, double &f4, double &g_virial, double &dgvirialdT)¶
Compute the free energy returning several details as output parameters.
f1 is g*f_virial f2 is (1-g)*f_skyrme f3 is (1-g)*delta^2*esym f4 is (1-g)*delta f_hot
so that the total homogeneous free energy is f1+f2+f3+f4
-
virtual double free_energy_density_virial(o2scl::fermion &n, o2scl::fermion &p, double T, o2scl::thermo &th, double &dmundnn, double &dmundnp, double &dmupdnn, double &dmupdnp, double &dmundT, double &dmupdT)¶
Compute the free energy density using the virial expansion including derivative information.
-
inline virtual double free_energy_density_virial(o2scl::fermion &n, o2scl::fermion &p, double T, o2scl::thermo &th)¶
Compute the free energy density using the virial expansion.
-
double free_energy_density_alt(o2scl::fermion &n, o2scl::fermion &p, double nn, double np, double T, o2scl::thermo &th)¶
Alternate form of free_energy_density() for computing derivatives.
This function does not include electrons or photons.
-
double free_energy_density_ep(double nn, double np, double T)¶
Alternate form of free_energy_density() which includes electrons, positrons, and photons.
-
double entropy(o2scl::fermion &n, o2scl::fermion &p, double nn, double np, double T, o2scl::thermo &th)¶
Compute the entropy density including photons, electrons, and positrons.
-
double ed(o2scl::fermion &n, o2scl::fermion &p, double nn, double np, double T, o2scl::thermo &th)¶
Compute energy density including photons and electons (without the rest mass energy density for the nucleons)
-
double cs2_func(o2scl::fermion &n, o2scl::fermion &p, double T, o2scl::thermo &th)¶
Compute the squared speed of sound.
Other EOS functions [protected]
-
double energy_density_qmc(double nn, double pn)¶
Compute the energy density (in \( \mathrm{fm}^{-4} \)) of neutron matter from quantum Monte Carlo (without the rest mass contribution)
-
int new_ns_eos(double nb, o2scl::fermion &n, double &e_ns, double &densdnn)¶
Construct a new neutron star EOS which ensures causality at high densities.
-
double dfdnn_total(o2scl::fermion &n, o2scl::fermion &p, double nn, double pn, double T, o2scl::thermo &th)¶
Compute dfdnn including photons and electons.
-
double dfdnp_total(o2scl::fermion &n, o2scl::fermion &p, double nn, double pn, double T, o2scl::thermo &th)¶
Compute dfdnp including photons and electons.
-
int solve_Ye(size_t nv, const ubvector &x, ubvector &y, double nb, double T, double muL)¶
Solve for Ye to ensure a specified value of muL at fixed T.
-
int solve_coeff_big(size_t nv, const ubvector &x, ubvector &y, double nb_last, double cs_ns_2, double cs_ns_last)¶
solve for a1 and a2 when cs_ns(2.0)>cs_ns(1.28)
-
int solve_coeff_small(size_t nv, const ubvector &x, ubvector &y, double nb_last, double cs_ns_2, double cs_ns_last)¶
solve for a1 and a2 when cs_ns(2.0)<cs_ns(1.28)
-
int select_internal(int i_ns_loc, int i_skyrme_loc, double qmc_alpha_loc, double qmc_a_loc, double eos_L_loc, double eos_S_loc, double phi_loc)¶
Internal select function.
Constructor and destructor
-
eos_had_phen()¶
-
inline virtual ~eos_had_phen()¶
-
void load_files()¶
Load the required data files.
Command-line interface functions [public]
-
int table_Ye(std::vector<std::string> &sv, bool itive_com)¶
Construct a table at fixed electron fraction.
-
int table_nB(std::vector<std::string> &sv, bool itive_com)¶
Construct a table at fixed baryon density.
-
int pns_eos(std::vector<std::string> &sv, bool itive_com)¶
Construct the EOS for a proto-neutron star.
-
int table_full(std::vector<std::string> &sv, bool itive_com)¶
Construct a full table.
-
int test_deriv(std::vector<std::string> &sv, bool itive_com)¶
Test the code.
-
int select_model(std::vector<std::string> &sv, bool itive_com)¶
Select a model by specifying the parameters.
-
int vir_comp(std::vector<std::string> &sv, bool itive_com)¶
Compare the full free energy with the free energy from the virial expansion.
-
int point(std::vector<std::string> &sv, bool itive_com)¶
Evaluate the EOS at one point.
-
int random()¶
Select a random model.
-
int comp_figs(std::vector<std::string> &sv, bool itive_com)¶
Compute the data for the comparison figures.
-
int mcarlo_data(std::vector<std::string> &sv, bool itive_com)¶
Compute the data for the Monte Carlo figures.
-
int vir_fit(std::vector<std::string> &sv, bool itive_com)¶
Perform the virial fit.
-
int test_eg(std::vector<std::string> &sv, bool itive_com)¶
Test the electron and photon contribution.
-
int eos_sn(std::vector<std::string> &sv, bool itive_com)¶
Compute the EOS from previously generated EOS tables at several points.
Miscellaneous functions [public]
-
int solve_fixed_sonb_YL(size_t nv, const ubvector &x, ubvector &y, double nB, double sonb, double YL)¶
Solve for fixed entropy per baryon and fixed lepton fraction.
-
int solve_T(size_t nv, const ubvector &x, ubvector &y, double nb, double Ye, double sonb)¶
Solve for T to ensure a specified value of sonb at fixed Ye.
-
double qmc_alpha¶