LORENE
|
Ideal-gas (temperature-dependent) equation of state, with mass-term in the energy density. More...
#include <hoteos.h>
Public Member Functions | |
Ideal_gas (double gamma, double kappa, double mass=1.) | |
Standard constructor. | |
Ideal_gas (const Ideal_gas &) | |
Copy constructor. | |
virtual | ~Ideal_gas () |
Destructor. | |
void | operator= (const Ideal_gas &) |
Assignment to another Ideal_gas . | |
virtual bool | operator== (const Hot_eos &) const |
Comparison operator (egality) | |
virtual bool | operator!= (const Hot_eos &) const |
Comparison operator (difference) | |
virtual int | identify () const |
Returns a number to identify the sub-classe of Hot_eos the object belongs to. | |
double | get_gam () const |
Returns the adiabatic index ![]() | |
double | get_kap () const |
Returns the pressure coefficient ![]() | |
double | get_m_0 () const |
Return the individual particule mass ![]() | |
virtual const Eos & | new_cold_Eos () const |
Returns the corresponding cold Eos . | |
virtual void | sauve (FILE *) const |
Save in a file. | |
virtual double | nbar_Hs_p (double ent, double sb) const |
Computes the baryon density from the log-enthalpy and entropy per baryon (virtual function implemented in the derived classes). | |
virtual double | ener_Hs_p (double ent, double sb) const |
Computes the total energy density from the log-enthalpy and entropy per baryon (virtual function implemented in the derived classes). | |
virtual double | press_Hs_p (double ent, double sb) const |
Computes the pressure from the log-enthalpy and entropy per baryon (virtual function implemented in the derived classes). | |
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). | |
const string & | get_name () const |
Returns the hot EOS name. | |
void | set_name (const char *) |
Sets the hot EOS name. | |
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. | |
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. | |
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. | |
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. | |
Static Public Member Functions | |
static Hot_eos * | hoteos_from_file (FILE *) |
Construction of an EOS from a binary file. | |
static Hot_eos * | hoteos_from_file (ifstream &) |
Construction of a hot EOS from a formatted file. | |
Protected Member Functions | |
Ideal_gas (FILE *) | |
Constructor from a binary file (created by the function sauve(FILE*) ). | |
Ideal_gas (ifstream &) | |
Constructor from a formatted file. | |
void | set_auxiliary () |
Computes the auxiliary quantities gam1 , unsgam1 , gam1sgamkap from the values of gam and kap . | |
virtual ostream & | operator>> (ostream &) const |
Operator >> | |
virtual void | del_deriv () const |
Deletes all the derived quantities. | |
void | set_der_0x0 () const |
Sets to 0x0 all the pointers on derived quantities. | |
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. | |
Protected Attributes | |
double | gam |
Adiabatic index ![]() | |
double | kap |
Pressure coefficient ![]() | |
double | m_0 |
Individual particule mass ![]() | |
double | gam1 |
![]() | |
double | unsgam1 |
![]() | |
double | gam1sgamkap |
![]() | |
string | name |
EOS name. | |
Eos * | p_cold_eos |
Corresponding cold Eos. | |
Friends | |
Hot_eos * | Hot_eos::hoteos_from_file (FILE *) |
The construction functions from a file. | |
Hot_eos * | Hot_eos::hoteos_from_file (ifstream &) |
Ideal-gas (temperature-dependent) equation of state, with mass-term in the energy density.
and
()
Standard constructor.
Unless specified, the individual particle mass
gamma | adiabatic index ![]() |
kappa | pressure coefficient ![]() |
mass | individual particule mass ![]() |
Definition at line 64 of file ideal_gas.C.
References set_auxiliary().
|
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 82 of file ideal_gas.C.
References Lorene::fread_be(), gam, kap, m_0, and set_auxiliary().
|
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 96 of file ideal_gas.C.
References gam, kap, m_0, and set_auxiliary().
|
virtual |
Destructor.
Definition at line 110 of file ideal_gas.C.
|
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. |
|
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: ![]() ![]() ![]() |
sb | [input, unit: ![]() ![]() |
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::Tensor::get_mp().
Computes the total energy density from the log-enthalpy and entropy per baryon (virtual function implemented in the derived classes).
ent | [input, unit: ![]() ![]() ![]() |
sb | [input, unit: ![]() ![]() |
Implements Lorene::Hot_eos.
Definition at line 263 of file ideal_gas.C.
References Lorene::exp(), gam, gam1, gam1sgamkap, kap, m_0, Lorene::pow(), and unsgam1.
double Lorene::Ideal_gas::get_gam | ( | ) | const |
Returns the adiabatic index
Definition at line 143 of file ideal_gas.C.
References gam.
double Lorene::Ideal_gas::get_kap | ( | ) | const |
Returns the pressure coefficient
Definition at line 147 of file ideal_gas.C.
References kap.
double Lorene::Ideal_gas::get_m_0 | ( | ) | const |
Return the individual particule mass
Eq. (1))
Definition at line 151 of file ideal_gas.C.
References m_0.
Returns the hot EOS name.
Definition at line 120 of file hoteos.h.
References Lorene::Hot_eos::name.
Construction of an EOS from a binary file.
The file must have been created by the function sauve(FILE*)
.
Definition at line 67 of file hoteos_from_file.C.
References Lorene::fread_be().
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 104 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 58 of file hoteos_from_file.C.
|
inherited |
Computes the baryon density field from the log-enthalpy field and entropy per baryon.
ent | [input, unit: ![]() ![]() ![]() |
sb | [input, unit: ![]() ![]() |
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::Tensor::get_mp().
Computes the baryon density from the log-enthalpy and entropy per baryon (virtual function implemented in the derived classes).
ent | [input, unit: ![]() ![]() ![]() |
sb | [input, unit: ![]() ![]() |
Implements Lorene::Hot_eos.
Definition at line 250 of file ideal_gas.C.
References Lorene::exp(), gam1sgamkap, Lorene::pow(), and unsgam1.
Returns the corresponding cold Eos
.
Implements Lorene::Hot_eos.
Definition at line 160 of file ideal_gas.C.
References gam, kap, m_0, and Lorene::Hot_eos::p_cold_eos.
Comparison operator (difference)
Implements Lorene::Hot_eos.
Definition at line 212 of file ideal_gas.C.
References operator==().
Assignment to another Ideal_gas
.
Definition at line 116 of file ideal_gas.C.
References gam, kap, m_0, Lorene::Hot_eos::name, and set_auxiliary().
Comparison operator (egality)
Implements Lorene::Hot_eos.
Definition at line 175 of file ideal_gas.C.
References gam, identify(), Lorene::Hot_eos::identify(), kap, and m_0.
|
inherited |
Computes the pressure from the log-enthalpy and entropy per baryon.
ent | [input, unit: ![]() ![]() ![]() |
sb | [input, unit: ![]() ![]() |
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::Tensor::get_mp().
Computes the pressure from the log-enthalpy and entropy per baryon (virtual function implemented in the derived classes).
ent | [input, unit: ![]() ![]() ![]() |
sb | [input, unit: ![]() ![]() |
Implements Lorene::Hot_eos.
Definition at line 279 of file ideal_gas.C.
References Lorene::exp(), gam, gam1, gam1sgamkap, kap, Lorene::pow(), and unsgam1.
Save in a file.
Reimplemented from Lorene::Hot_eos.
Definition at line 221 of file ideal_gas.C.
References Lorene::fwrite_be(), gam, kap, m_0, and Lorene::Hot_eos::sauve().
|
protected |
Computes the auxiliary quantities gam1
, unsgam1
, gam1sgamkap
from the values of gam
and kap
.
Definition at line 133 of file ideal_gas.C.
|
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 |
Computes the temperature field from the log-enthalpy field and entropy per baryon.
ent | [input, unit: ![]() ![]() ![]() |
sb | [input, unit: ![]() ![]() |
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::Tensor::get_mp().
Computes the temperature from the log-enthalpy and entropy per baryon (virtual function implemented in the derived classes).
ent | [input, unit: ![]() ![]() ![]() |
sb | [input, unit: ![]() ![]() |
Implements Lorene::Hot_eos.
Definition at line 294 of file ideal_gas.C.
References Lorene::exp(), gam1sgamkap, and kap.
|
friend |
The construction functions from a file.
|
protected |
|
protected |
|
mutableprotectedinherited |