This class is experimental.
For the verbose parameter, generally 0 means no output, 1 means the function will output the composition and thermodynamics for the first 10 or so nuclei in the distribution, and 2 means the function will output the entire distribution.
This class retains the usual mechanism using err_nonconv to handle what to do if one of the functions does not converge. In addition, calc_density_fixnp() and calc_density_noneq() return invalid_config for invalid configurations, which sometimes occur during normal execution. Since these invalid configurations are 'normal', they do not cause the error handler to be called, independent of the value of err_nonconv . Practically, this means the end-user must check the return value of these two functions every time they are called.
This class presumes that electrons include their rest mass, but nucleons and nuclei do not. The error handler is called by some functions if this is not the case (determined by the values in o2scl::part::inc_rest_mass
).
- Todo:
- I don't think inc_lept_phot=false works because then all WS cells have infinite size because of no electrons. For the moment, this variable is protected to discourage the user from changing it.
- Idea for Future:
There is a bit of duplication between calc_density_noneq() and calc_density_fixnp() which could be streamlined.
Add fermion and boson statistics to the nuclei in the distribution.
Definition at line 84 of file eos_nse_full.h.
|
int | verbose |
| Verbose parameter.
|
|
bool | err_nonconv |
| If true, call the error handler if calc_density() does not converge (default true)
|
|
bool | inc_prot_coul |
| If true, include dripped protons and neutrons in the nuclear mass (default true)
|
|
bool | include_muons |
| If true, include muons (default false)
|
|
o2scl::fermion_rel | relf |
| Relativistic fermions. More...
|
|
virtual int | solve_fixnp (size_t n, const ubvector &x, ubvector &y, dense_matter &dm, bool from_densities=true) |
| Function which is solved by calc_density_saha() More...
|
|
virtual int | bracket_mu_solve (double &mun_low, double &mun_high, double &mup_low, double &mup_high, dense_matter &dm) |
| Solve matter at fixed chemical potential by bracketing. More...
|
|
double | mup_for_Ye (double mup, double &mun_low, double &mun_high, dense_matter &dm) |
| Fix electron fraction by varying proton chemical potential. More...
|
|
virtual double | solve_mun (double mun, dense_matter &dm) |
| Fix the baryon density by varying the neutron chemical potential. More...
|
|
virtual int | calc_density_noneq (dense_matter &dm) |
| Compute the properties of matter from the densities, not presuming equilibrium. More...
|
|
virtual int | calc_density_fixnp (dense_matter &dm, bool from_densities=true) |
| Compute the properties of matter from neutron and proton densities, using the Saha equation. More...
|
|
virtual int | calc_density_by_min (dense_matter &dm) |
| Compute the free energy for a fixed composition by minimization. More...
|
|
virtual int | calc_density_saha (dense_matter &dm) |
| Compute properties of matter for baryon density and electron fraction using the Saha equation. More...
|
|
virtual void | output (dense_matter &dm, int output_level) |
| Output properties of a o2scl::dense_matter object to std::cout. More...
|
|
virtual int | density_match (dense_matter &dm) |
| Adjust the particle densities to match specified density and electron fraction. More...
|
|
virtual int o2scl::eos_nse_full::calc_density_fixnp |
( |
dense_matter & |
dm, |
|
|
bool |
from_densities = true |
|
) |
| |
|
virtual |
If the parameter from_densities
is true, then this computes nucleonic matter using the neutron and proton densities stored in dm.n.n
and dm.p.n
. Otherwise, nucleonic matter is computed using the chemical potential stored in dm.n.mu
and dm.p.mu
. Either way, electrons are computed assuming their density is given from o2scl::dense_matter::nB and o2scl::dense_matter::Ye. Muons are added assuming their chemical potential is equal to the electron chemical potential. Finally, the Saha equation is used to determine the nuclear chemical potentials and this gives the nuclear densities.
This function only works when inc_prot_coul is false
.
The values in o2scl::dense_matter::nB and o2scl::dense_matter::Ye are unchanged by this function. Note that, after this function completes, the value returned by o2scl::dense_matter::baryon_density() will not necessarily be the same as that stored in o2scl::dense_matter::nB (and similarly for the electron fraction).
This function is designed to return non-zero values for invalid configurations and can return the value invalid_config without calling the error handler, independent of the value of err_nonconv .
Possible invalid configurations are:
- negative nucleon densities, or
- proton radii larger than WS cell radii, i.e.
or
.
virtual int o2scl::eos_nse_full::calc_density_noneq |
( |
dense_matter & |
dm | ) |
|
|
virtual |
The values of dm.nB
and dm.Ye
are ignored and unchanged by this function. The electron and muon density are determined by charged neutrality and assuming their chemical potentials are equal. Photons are always included.
If the nuclear densities are all zero, then this just returns nuclear matter with leptons and photons as determined by charge neutrality.
This function is designed to return non-zero values for invalid configurations and can return the value invalid_config without calling the error handler, independent of the value of err_nonconv .
Possible invalid configurations are:
- negative nucleon or nucleus densities, or
- proton radii larger than WS cell radii, i.e.
or
.
double o2scl::eos_nse_full::mup_for_Ye |
( |
double |
mup, |
|
|
double & |
mun_low, |
|
|
double & |
mun_high, |
|
|
dense_matter & |
dm |
|
) |
| |