LORENE
|
Out of beta-equilibrium tabulated equation of state, read from a file. More...
#include <hoteos.h>
Public Member Functions | |
Ye_eos_tabul (const string &filename) | |
Standard constructor from a filename. More... | |
Ye_eos_tabul (const Ye_eos_tabul &) | |
Copy constructor. More... | |
virtual | ~Ye_eos_tabul () |
Destructor. More... | |
const string | get_tablename () const |
Assignment to another c Ye_eos_tabul void | operator= (const Ye_eos_tabul &) |
Comparison | operator (egality) virtual bool operator |
Comparison | operator (difference) virtual bool operator! |
virtual int | identify () const |
Returns a number to identify the sub-classe of Hot_eos the object belongs to. More... | |
virtual const Eos & | new_cold_Eos () const |
Returns the corresponding cold Eos . More... | |
virtual void | sauve (FILE *) const |
Save in a file. More... | |
virtual double | nbar_Hs_p (double ent, double ye) const |
Computes the baryon density from the log-enthalpy and electronic fraction (virtual function implemented in the derived classes). More... | |
virtual double | ener_Hs_p (double ent, double ye) const |
Computes the total energy density from the log-enthalpy and electronic fraction (virtual function implemented in the derived classes). More... | |
virtual double | press_Hs_p (double ent, double ye) const |
Computes the pressure from the log-enthalpy and electronic fraction (virtual function implemented in the derived classes). More... | |
virtual double | temp_Hs_p (double ent, double sb) const |
Computes the temperature from the log-enthalpy and entropy per baryon (virtual function implemented in the derived classes). More... | |
virtual double | csound_square_Hs_p (double ent, const double ye) const |
Computes the sound speed squared from the enthapy with electronic fraction (virtual function implemented in the derived classes). More... | |
virtual double | chi2_Hs_p (double ent, const double ye) const |
Computes the chi^2 coefficient from the enthapy with electronic fraction (virtual function implemented in the derived classes). More... | |
virtual double | mul_Hs_p (double ent, const double ye) const |
Computes the electronic chemical potential from the enthapy with electronic fraction (virtual function implemented in the derived classes). More... | |
virtual double | sigma_Hs_p (double ent, const double ye) const |
Computes the source terms for electronic fraction advection equation from the enthapy with electronic fraction (virtual function implemented in the derived classes). More... | |
const string & | get_name () const |
Returns the hot EOS name. More... | |
void | set_name (const char *) |
Sets the hot EOS name. More... | |
virtual bool | operator== (const Hot_eos &) const =0 |
Comparison operator (egality) More... | |
virtual bool | operator!= (const Hot_eos &) const =0 |
Comparison operator (difference) More... | |
Scalar | nbar_Hs (const Scalar &ent, const Scalar &sb, int nzet, int l_min=0) const |
Computes the baryon density field from the log-enthalpy field and entropy per baryon. More... | |
Scalar | ener_Hs (const Scalar &ent, const Scalar &sb, int nzet, int l_min=0) const |
Computes the total energy density from the log-enthalpy and entropy per baryon. More... | |
Scalar | press_Hs (const Scalar &ent, const Scalar &sb, int nzet, int l_min=0) const |
Computes the pressure from the log-enthalpy and entropy per baryon. More... | |
Scalar | temp_Hs (const Scalar &ent, const Scalar &sb, int nzet, int l_min=0) const |
Computes the temperature field from the log-enthalpy field and entropy per baryon. More... | |
Scalar | chi2_Hs (const Scalar &ent, const Scalar &Ye, int nzet, int l_min=0) const |
Computes the chi^2 coefficient from the enthalpy with ye. More... | |
Scalar | mul_Hs (const Scalar &ent, const Scalar &Ye, int nzet, int l_min=0) const |
Computes the electronic chemical potential from the enthalpy with ye. More... | |
Scalar | csound_square_Hs (const Scalar &ent, const Scalar &Y_e, int nzet, int l_min=0) const |
Computes the sound speed squared from the enthalpy with ye. More... | |
Scalar | sigma_Hs (const Scalar &ent, const Scalar &Y_e, int nzet, int l_min=0) const |
Computes the source terms for electronic fraction advection equation from the enthalpy with ye. More... | |
Static Public Member Functions | |
static Hot_eos * | hoteos_from_file (FILE *) |
Construction of an EOS from a binary file. More... | |
static Hot_eos * | hoteos_from_file (ifstream &) |
Construction of a hot EOS from a formatted file. More... | |
Protected Member Functions | |
Ye_eos_tabul (FILE *) | |
Constructor from a binary file (created by the function sauve(FILE*) ). More... | |
Ye_eos_tabul (ifstream &) | |
Constructor from a formatted file. More... | |
void | read_table () |
Reads the file containing the table and initializes in the arrays hhh , s_B , ppp , ... More... | |
Sets all the arrays to the null pointer void | set_arrays_0x0 () |
virtual ostream & | operator>> (ostream &) const |
Operator >> More... | |
virtual void | del_deriv () const |
Deletes all the derived quantities. More... | |
void | set_der_0x0 () const |
Sets to 0x0 all the pointers on derived quantities. More... | |
void | calcule (const Scalar &thermo1, const Scalar &thermo2, int nzet, int l_min, double(Hot_eos::*fait)(double, double) const, Scalar &resu) const |
General computational method for Scalar 's. More... | |
Protected Attributes | |
string | tablename |
Name of the file containing the tabulated data. More... | |
string | authors |
Authors - reference for the table. More... | |
double | hmin |
Lower boundary of the enthalpy interval. More... | |
double | hmax |
Upper boundary of the enthalpy interval. More... | |
double | yemin |
Lower boundary of the electronic fraction interval. More... | |
double | yemax |
Upper boundary of the electronic fraction interval. More... | |
Tbl * | hhh |
Table of . More... | |
Tbl * | Y_e |
Table of , electronic fraction (dimensionless). More... | |
Tbl * | c_sound2 |
Table of , sound speed squared (units of c^2). More... | |
Tbl * | mu_l |
Table of , the electronic chemical potential (MeV) More... | |
Tbl * | nnn |
Table of. More... | |
Table of pressure $P Tbl * | ppp |
Table of f partial P partial H f Tbl * | dpdh |
Table of f partial P partial Y_e f Tbl * | dpdye |
Table of f partial P partial Y_e partial H f Tbl * | d2p |
Table of electronic fraction source Tbl * | Sourcetbl |
string | name |
EOS name. More... | |
Eos * | p_cold_eos |
Corresponding cold Eos. More... | |
Friends | |
The construction functions from a file friend Hot_eos * | Hot_eos::hoteos_from_file (FILE *) |
Hot_eos * | Hot_eos::hoteos_from_file (ifstream &) |
Out of beta-equilibrium tabulated equation of state, read from a file.
()
Lorene::Ye_eos_tabul::Ye_eos_tabul | ( | const string & | filename | ) |
Standard constructor from a filename.
Definition at line 55 of file ye_eos_tabul.C.
References read_table().
Lorene::Ye_eos_tabul::Ye_eos_tabul | ( | const Ye_eos_tabul & | ) |
Copy constructor.
|
protected |
Constructor from a binary file (created by the function sauve(FILE*)
).
This constructor is protected because any hot EOS construction from a binary file must be done via the function Hot_eos::eos_from_file(FILE*)
.
Definition at line 66 of file ye_eos_tabul.C.
References read_table(), and tablename.
|
protected |
Constructor from a formatted file.
This constructor is protected because any EOS construction from a formatted file must be done via the function Hot_eos::hoteos_from_file(ifstream&)
.
Definition at line 85 of file ye_eos_tabul.C.
References read_table(), and tablename.
|
virtual |
|
protectedinherited |
General computational method for Scalar
's.
thermo1 | [input] first thermodynamical quantity (for instance the enthalpy field) from which the thermodynamical quantity resu is to be computed. |
thermo2 | [input] second thermodynamical quantity (for instance the entropy field) from which the thermodynamical quantity resu is to be computed. |
nzet | [input] number of domains where resu is to be computed. |
l_min | [input] index of the innermost domain is which resu is to be computed [default value: 0]; resu is computed only in domains whose indices are in [l_min,l_min+nzet-1] . In the other domains, it is set to zero. |
fait | [input] pointer on the member function of class Hot_eos which performs the pointwise calculation. |
resu | [output] result of the computation. |
Definition at line 153 of file hoteos.C.
References Lorene::Scalar::get_etat().
|
inherited |
Computes the chi^2 coefficient from the enthalpy with ye.
ent | [input, unit: c^2] enthalpy |
nzet | number of domains where the derivative dln(e)/dln(H) is to be computed. |
l_min | index of the innermost domain is which the coefficient dln(n)/dln(H) is to be computed [default value: 0]; the derivative dln(e)/dln(H) is computed only in domains whose indices are in [l_min,l_min+nzet-1] . In the other domains, it is set to zero. |
ye | [input, unit: ] electronic fraction |
Definition at line 306 of file hoteos.C.
References Lorene::Hot_eos::calcule(), Lorene::Hot_eos::chi2_Hs_p(), and Lorene::Tensor::get_mp().
|
virtual |
Computes the chi^2 coefficient from the enthapy with electronic fraction (virtual function implemented in the derived classes).
ent | [input, unit: c^2] enthalpy |
ye | [input, unit: ] electronic fraction |
Implements Lorene::Hot_eos.
Definition at line 539 of file ye_eos_tabul.C.
|
inherited |
Computes the sound speed squared from the enthalpy with ye.
ent | [input, unit: c^2] enthalpy |
nzet | number of domains where the derivative dln(e)/dln(H) is to be computed. |
l_min | index of the innermost domain is which the coefficient dln(n)/dln(H) is to be computed [default value: 0]; the derivative dln(e)/dln(H) is computed only in domains whose indices are in [l_min,l_min+nzet-1] . In the other domains, it is set to zero. |
ye | [input, unit: ] electronic fraction |
Definition at line 294 of file hoteos.C.
References Lorene::Hot_eos::calcule(), Lorene::Hot_eos::csound_square_Hs_p(), and Lorene::Tensor::get_mp().
|
virtual |
Computes the sound speed squared from the enthapy with electronic fraction (virtual function implemented in the derived classes).
ent | [input, unit: c^2] enthalpy |
ye | [input, unit: ] electronic fraction |
Implements Lorene::Hot_eos.
Definition at line 497 of file ye_eos_tabul.C.
References c_sound2, Lorene::extract_column(), Lorene::Tbl::get_dim(), hhh, hmax, hmin, Lorene::Tbl::set_etat_qcq(), Y_e, yemax, and yemin.
|
protectedvirtualinherited |
Deletes all the derived quantities.
Definition at line 109 of file hoteos.C.
References Lorene::Hot_eos::p_cold_eos, and Lorene::Hot_eos::set_der_0x0().
|
inherited |
Computes the total energy density from the log-enthalpy and entropy per baryon.
ent | [input, unit: ] log-enthalpy H defined by , where e is the (total) energy density, p the pressure, n the baryon density, and the baryon mass |
sb | [input, unit: ] entropy per baryon |
nzet | number of domains where the energy density is to be computed. |
l_min | index of the innermost domain is which the energy density is to be computed [default value: 0]; the energy density is computed only in domains whose indices are in [l_min,l_min+nzet-1] . In the other domains, it is set to zero. |
Definition at line 252 of file hoteos.C.
References Lorene::Hot_eos::calcule(), Lorene::Hot_eos::ener_Hs_p(), and Lorene::Tensor::get_mp().
|
virtual |
Computes the total energy density from the log-enthalpy and electronic fraction (virtual function implemented in the derived classes).
ent | [input, unit: ] log-enthalpy H defined by , where e is the (total) energy density, p the pressure, n the baryon density, and the baryon mass |
ye | [input, unit: ] electronic fraction |
Implements Lorene::Hot_eos.
Definition at line 403 of file ye_eos_tabul.C.
References Lorene::Tbl::get_dim(), hhh, hmax, hmin, Y_e, yemax, and yemin.
|
inlineinherited |
Returns the hot EOS name.
Definition at line 138 of file hoteos.h.
References Lorene::Hot_eos::name.
|
staticinherited |
Construction of an EOS from a binary file.
The file must have been created by the function sauve(FILE*)
.
Definition at line 78 of file hoteos_from_file.C.
References Lorene::fread_be().
|
staticinherited |
Construction of a hot EOS from a formatted file.
The fist line of the file must start by the EOS number, according to the following conventions:
Ideal_gas
).Ideal_gas_norel
).The second line in the file should contain a name given by the user to the EOS. The following lines should contain the EOS parameters (one parameter per line), in the same order than in the class declaration.
Definition at line 120 of file hoteos_from_file.C.
|
virtual |
Returns a number to identify the sub-classe of Hot_eos
the object belongs to.
Implements Lorene::Hot_eos.
Definition at line 71 of file hoteos_from_file.C.
|
inherited |
Computes the electronic chemical potential from the enthalpy with ye.
ent | [input, unit: c^2] enthalpy |
nzet | number of domains where the derivative dln(e)/dln(H) is to be computed. |
l_min | index of the innermost domain is which the coefficient dln(n)/dln(H) is to be computed [default value: 0]; the derivative dln(e)/dln(H) is computed only in domains whose indices are in [l_min,l_min+nzet-1] . In the other domains, it is set to zero. |
ye | [input, unit: ] electronic fraction |
Definition at line 318 of file hoteos.C.
References Lorene::Hot_eos::calcule(), Lorene::Tensor::get_mp(), and Lorene::Hot_eos::mul_Hs_p().
|
virtual |
Computes the electronic chemical potential from the enthapy with electronic fraction (virtual function implemented in the derived classes).
ent | [input, unit: c^2] enthalpy |
ye | [input, unit: ] electronic fraction |
Implements Lorene::Hot_eos.
Definition at line 548 of file ye_eos_tabul.C.
References Lorene::extract_column(), Lorene::Tbl::get_dim(), hhh, hmax, hmin, mu_l, Lorene::Tbl::set_etat_qcq(), Y_e, yemax, and yemin.
|
inherited |
Computes the baryon density field from the log-enthalpy field and entropy per baryon.
ent | [input, unit: ] log-enthalpy H defined by , where e is the (total) energy density, p the pressure, n the baryon density, and the baryon mass |
sb | [input, unit: ] entropy per baryon |
nzet | number of domains where the baryon density is to be computed. |
l_min | index of the innermost domain is which the baryon density is to be computed [default value: 0]; the baryon density is computed only in domains whose indices are in [l_min,l_min+nzet-1] . In the other domains, it is set to zero. |
Definition at line 236 of file hoteos.C.
References Lorene::Hot_eos::calcule(), Lorene::Tensor::get_mp(), and Lorene::Hot_eos::nbar_Hs_p().
|
virtual |
Computes the baryon density from the log-enthalpy and electronic fraction (virtual function implemented in the derived classes).
ent | [input, unit: ] log-enthalpy H defined by , where e is the (total) energy density, p the pressure, n the baryon density, and the baryon mass |
ye | [input, unit: ] electronic fraction |
Implements Lorene::Hot_eos.
Definition at line 311 of file ye_eos_tabul.C.
References Lorene::exp(), hhh, hmax, hmin, Y_e, yemax, and yemin.
|
virtual |
Returns the corresponding cold Eos
.
Implements Lorene::Hot_eos.
Definition at line 265 of file ye_eos_tabul.C.
References Lorene::Hot_eos::p_cold_eos, and tablename.
|
pure virtualinherited |
Comparison operator (difference)
Implemented in Lorene::Hoteos_tabul, and Lorene::Ideal_gas.
|
pure virtualinherited |
Comparison operator (egality)
Implemented in Lorene::Hoteos_tabul, and Lorene::Ideal_gas.
|
protectedvirtual |
Operator >>
Implements Lorene::Hot_eos.
Definition at line 135 of file ye_eos_tabul.C.
References authors, Lorene::Tbl::get_dim(), hhh, and tablename.
|
inherited |
Computes the pressure from the log-enthalpy and entropy per baryon.
ent | [input, unit: ] log-enthalpy H defined by , where e is the (total) energy density, p the pressure, n the baryon density, and the baryon mass |
sb | [input, unit: ] entropy per baryon |
nzet | number of domains where the pressure is to be computed. |
l_min | index of the innermost domain is which the pressure is to be computed [default value: 0]; the pressure is computed only in domains whose indices are in [l_min,l_min+nzet-1] . In the other domains, it is set to zero. |
Definition at line 266 of file hoteos.C.
References Lorene::Hot_eos::calcule(), Lorene::Tensor::get_mp(), and Lorene::Hot_eos::press_Hs_p().
|
virtual |
Computes the pressure from the log-enthalpy and electronic fraction (virtual function implemented in the derived classes).
ent | [input, unit: ] log-enthalpy H defined by , where e is the (total) energy density, p the pressure, n the baryon density, and the baryon mass |
ye | [input, unit: ] electronic fraction |
Implements Lorene::Hot_eos.
Definition at line 452 of file ye_eos_tabul.C.
References Lorene::Tbl::get_dim(), hhh, hmax, hmin, Y_e, yemax, and yemin.
|
protected |
Reads the file containing the table and initializes in the arrays hhh
, s_B
, ppp
, ...
Definition at line 152 of file ye_eos_tabul.C.
References authors, c_sound2, hhh, hmax, hmin, mu_l, nnn, Lorene::Tbl::set(), Lorene::Tbl::set_etat_qcq(), tablename, Y_e, yemax, and yemin.
|
virtual |
Save in a file.
Reimplemented from Lorene::Hot_eos.
Definition at line 126 of file ye_eos_tabul.C.
References Lorene::Hot_eos::sauve(), and tablename.
|
protectedinherited |
Sets to 0x0
all the pointers on derived quantities.
Definition at line 114 of file hoteos.C.
References Lorene::Hot_eos::p_cold_eos.
|
inherited |
|
inherited |
Computes the source terms for electronic fraction advection equation from the enthalpy with ye.
ent | [input, unit: c^2] enthalpy |
nzet | number of domains where the derivative dln(e)/dln(H) is to be computed. |
l_min | index of the innermost domain is which the coefficient dln(n)/dln(H) is to be computed [default value: 0]; the derivative dln(e)/dln(H) is computed only in domains whose indices are in [l_min,l_min+nzet-1] . In the other domains, it is set to zero. |
ye | [input, unit: ] electronic fraction |
Definition at line 330 of file hoteos.C.
References Lorene::Hot_eos::calcule(), Lorene::Tensor::get_mp(), and Lorene::Hot_eos::sigma_Hs_p().
|
virtual |
Computes the source terms for electronic fraction advection equation from the enthapy with electronic fraction (virtual function implemented in the derived classes).
ent | [input, unit: c^2] enthalpy |
ye | [input, unit: ] electronic fraction |
Implements Lorene::Hot_eos.
Definition at line 592 of file ye_eos_tabul.C.
References Lorene::extract_column(), Lorene::Tbl::get_dim(), hhh, hmax, hmin, Lorene::Tbl::set_etat_qcq(), Y_e, yemax, and yemin.
|
inherited |
Computes the temperature field from the log-enthalpy field and entropy per baryon.
ent | [input, unit: ] log-enthalpy H defined by , where e is the (total) energy density, p the pressure, n the baryon density, and the baryon mass |
sb | [input, unit: ] entropy per baryon |
nzet | number of domains where the baryon density is to be computed. |
l_min | index of the innermost domain is which the baryon density is to be computed [default value: 0]; the baryon density is computed only in domains whose indices are in [l_min,l_min+nzet-1] . In the other domains, it is set to zero. |
Definition at line 280 of file hoteos.C.
References Lorene::Hot_eos::calcule(), Lorene::Tensor::get_mp(), and Lorene::Hot_eos::temp_Hs_p().
|
virtual |
Computes the temperature from the log-enthalpy and entropy per baryon (virtual function implemented in the derived classes).
ent | [input, unit: ] log-enthalpy H defined by , where e is the (total) energy density, p the pressure, n the baryon density, and the baryon mass |
sb | [input, unit: ] entropy per baryon |
Implements Lorene::Hot_eos.
Definition at line 636 of file ye_eos_tabul.C.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotectedinherited |
|
protected |
|
protected |
|
protected |
|
protected |