LORENE
Lorene::Ye_eos_tabul Class Reference

Out of beta-equilibrium tabulated equation of state, read from a file. More...

#include <hoteos.h>

Inheritance diagram for Lorene::Ye_eos_tabul:
Lorene::Hot_eos

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
 
void operator= (const Ye_eos_tabul &)
 Assignment to another Ye_eos_tabul. More...
 
virtual bool operator== (const Hot_eos &) const
 Comparison operator (egality) More...
 
virtual bool operator!= (const Hot_eos &) const
 Comparison operator (difference) More...
 
virtual int identify () const
 Returns a number to identify the sub-classe of Hot_eos the object belongs to. More...
 
virtual const Eosnew_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 $ c_s^2 = c^2 \frac{dp}{de}$ 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...
 
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 $ c_s^2 = c^2 \frac{dp}{de}$ 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_eoshoteos_from_file (FILE *)
 Construction of an EOS from a binary file. More...
 
static Hot_eoshoteos_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...
 
void set_arrays_0x0 ()
 Sets all the arrays to the null pointer. More...
 
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...
 
Tblhhh
 Table of $H = \log ( e + P ) / n_B$. More...
 
TblY_e
 Table of $Y_e$, electronic fraction (dimensionless). More...
 
Tblc_sound2
 Table of $c_s^2$, sound speed squared (units of c^2). More...
 
Tblmu_l
 Table of $\mu_l$, the electronic chemical potential (MeV) More...
 
Tblppp
 Table of pressure $P$. More...
 
Tbldpdh
 Table of $\partial P/\partial H$. More...
 
Tbldpdye
 Table of $\partial P/\partial Y_e$. More...
 
Tbld2p
 Table of $\partial^2 P/\partial Y_e \partial H$. More...
 
TblSourcetbl
 Table of electronic fraction source. More...
 
string name
 EOS name. More...
 
Eosp_cold_eos
 Corresponding cold Eos. More...
 

Friends

Hot_eosHot_eos::hoteos_from_file (FILE *)
 The construction functions from a file. More...
 
Hot_eosHot_eos::hoteos_from_file (ifstream &)
 

Detailed Description

Out of beta-equilibrium tabulated equation of state, read from a file.

()

Definition at line 980 of file hoteos.h.

Constructor & Destructor Documentation

◆ Ye_eos_tabul() [1/4]

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(), and set_arrays_0x0().

◆ Ye_eos_tabul() [2/4]

Lorene::Ye_eos_tabul::Ye_eos_tabul ( const Ye_eos_tabul )

Copy constructor.

◆ Ye_eos_tabul() [3/4]

Lorene::Ye_eos_tabul::Ye_eos_tabul ( FILE *  fich)
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(), set_arrays_0x0(), and tablename.

◆ Ye_eos_tabul() [4/4]

Lorene::Ye_eos_tabul::Ye_eos_tabul ( ifstream &  fich)
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(), set_arrays_0x0(), and tablename.

◆ ~Ye_eos_tabul()

Lorene::Ye_eos_tabul::~Ye_eos_tabul ( )
virtual

Destructor.

Definition at line 110 of file ye_eos_tabul.C.

References d2p, dpdh, dpdye, hhh, ppp, Sourcetbl, and Y_e.

Member Function Documentation

◆ calcule()

void Lorene::Hot_eos::calcule ( const Scalar thermo1,
const Scalar thermo2,
int  nzet,
int  l_min,
double(Hot_eos::*)(double, double) const  fait,
Scalar resu 
) const
protectedinherited

General computational method for Scalar 's.

Parameters
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().

◆ chi2_Hs()

Scalar Lorene::Hot_eos::chi2_Hs ( const Scalar ent,
const Scalar Ye,
int  nzet,
int  l_min = 0 
) const
inherited

Computes the chi^2 coefficient from the enthalpy with ye.

Parameters
ent[input, unit: c^2] enthalpy
nzetnumber of domains where the derivative dln(e)/dln(H) is to be computed.
l_minindex 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: $dimensionless$] electronic fraction $Y_e$
Returns
$\chi^2 $ [unit: c^2]

Definition at line 306 of file hoteos.C.

References Lorene::Hot_eos::calcule(), Lorene::Hot_eos::chi2_Hs_p(), and Lorene::Tensor::get_mp().

◆ chi2_Hs_p()

double Lorene::Ye_eos_tabul::chi2_Hs_p ( double  ent,
const double  ye 
) const
virtual

Computes the chi^2 coefficient from the enthapy with electronic fraction (virtual function implemented in the derived classes).

Parameters
ent[input, unit: c^2] enthalpy
ye[input, unit: $dimensionless$] electronic fraction $Y_e$
Returns
$\chi^2 $ [unit: c^2]

Implements Lorene::Hot_eos.

Definition at line 452 of file ye_eos_tabul.C.

◆ csound_square_Hs()

Scalar Lorene::Hot_eos::csound_square_Hs ( const Scalar ent,
const Scalar Y_e,
int  nzet,
int  l_min = 0 
) const
inherited

Computes the sound speed squared $ c_s^2 = c^2 \frac{dp}{de}$ from the enthalpy with ye.

Parameters
ent[input, unit: c^2] enthalpy
nzetnumber of domains where the derivative dln(e)/dln(H) is to be computed.
l_minindex 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: $dimensionless$] electronic fraction $Y_e$
Returns
$c_s^2 $ [unit: c^2]

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().

◆ csound_square_Hs_p()

double Lorene::Ye_eos_tabul::csound_square_Hs_p ( double  ent,
const double  ye 
) const
virtual

Computes the sound speed squared $ c_s^2 = c^2 \frac{dp}{de}$ from the enthapy with electronic fraction (virtual function implemented in the derived classes).

Parameters
ent[input, unit: c^2] enthalpy
ye[input, unit: $dimensionless$] electronic fraction $Y_e$
Returns
$c_s^2 $ [unit: c^2]

Implements Lorene::Hot_eos.

Definition at line 410 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.

◆ del_deriv()

void Lorene::Hot_eos::del_deriv ( ) const
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().

◆ ener_Hs()

Scalar Lorene::Hot_eos::ener_Hs ( const Scalar ent,
const Scalar sb,
int  nzet,
int  l_min = 0 
) const
inherited

Computes the total energy density from the log-enthalpy and entropy per baryon.

Parameters
ent[input, unit: $c^2$] log-enthalpy H defined by $H = c^2 \ln\left( {e+p \over m_B c^2 n} \right) $, where e is the (total) energy density, p the pressure, n the baryon density, and $m_B$ the baryon mass
sb[input, unit: $k_B$] entropy per baryon $s_b$
nzetnumber of domains where the energy density is to be computed.
l_minindex 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.
Returns
energy density [unit: $\rho_{\rm nuc} c^2$], where $\rho_{\rm nuc} := 1.66\ 10^{17} \ {\rm kg/m}^3$

Definition at line 252 of file hoteos.C.

References Lorene::Hot_eos::calcule(), Lorene::Hot_eos::ener_Hs_p(), and Lorene::Tensor::get_mp().

◆ ener_Hs_p()

double Lorene::Ye_eos_tabul::ener_Hs_p ( double  ent,
double  ye 
) const
virtual

Computes the total energy density from the log-enthalpy and electronic fraction (virtual function implemented in the derived classes).

Parameters
ent[input, unit: $c^2$] log-enthalpy H defined by $H = c^2 \ln\left( {e+p \over m_B c^2 n} \right) $, where e is the (total) energy density, p the pressure, n the baryon density, and $m_B$ the baryon mass
ye[input, unit: $dimensionless$] electronic fraction $Y_e$
Returns
energy density e [unit: $\rho_{\rm nuc} c^2$], where $\rho_{\rm nuc} := 1.66\ 10^{17} \ {\rm kg/m}^3$

Implements Lorene::Hot_eos.

Definition at line 343 of file ye_eos_tabul.C.

References d2p, dpdh, dpdye, hhh, hmax, hmin, ppp, Y_e, yemax, and yemin.

◆ get_name()

const string& Lorene::Hot_eos::get_name ( ) const
inlineinherited

Returns the hot EOS name.

Definition at line 135 of file hoteos.h.

References Lorene::Hot_eos::name.

◆ hoteos_from_file() [1/2]

Hot_eos * Lorene::Hot_eos::hoteos_from_file ( FILE *  fich)
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().

◆ hoteos_from_file() [2/2]

Hot_eos * Lorene::Hot_eos::hoteos_from_file ( ifstream &  fich)
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:

  • 1 = relativistic ideal gas (class Ideal_gas ).
  • 2 = non-relativistic ideal gas (class 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.

◆ identify()

int Lorene::Ye_eos_tabul::identify ( ) const
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.

◆ mul_Hs()

Scalar Lorene::Hot_eos::mul_Hs ( const Scalar ent,
const Scalar Ye,
int  nzet,
int  l_min = 0 
) const
inherited

Computes the electronic chemical potential from the enthalpy with ye.

Parameters
ent[input, unit: c^2] enthalpy
nzetnumber of domains where the derivative dln(e)/dln(H) is to be computed.
l_minindex 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: $dimensionless$] electronic fraction $Y_e$
Returns
$\mu_l $ [unit: m_n]

Definition at line 318 of file hoteos.C.

References Lorene::Hot_eos::calcule(), Lorene::Tensor::get_mp(), and Lorene::Hot_eos::mul_Hs_p().

◆ mul_Hs_p()

double Lorene::Ye_eos_tabul::mul_Hs_p ( double  ent,
const double  ye 
) const
virtual

Computes the electronic chemical potential from the enthapy with electronic fraction (virtual function implemented in the derived classes).

Parameters
ent[input, unit: c^2] enthalpy
ye[input, unit: $dimensionless$] electronic fraction $Y_e$
Returns
$\mu_l $ [unit: m_n]

Implements Lorene::Hot_eos.

Definition at line 461 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.

◆ nbar_Hs()

Scalar Lorene::Hot_eos::nbar_Hs ( const Scalar ent,
const Scalar sb,
int  nzet,
int  l_min = 0 
) const
inherited

Computes the baryon density field from the log-enthalpy field and entropy per baryon.

Parameters
ent[input, unit: $c^2$] log-enthalpy H defined by $H = c^2 \ln\left( {e+p \over m_B c^2 n} \right) $, where e is the (total) energy density, p the pressure, n the baryon density, and $m_B$ the baryon mass
sb[input, unit: $k_B$] entropy per baryon $s_b$
nzetnumber of domains where the baryon density is to be computed.
l_minindex 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.
Returns
baryon density [unit: $n_{\rm nuc} := 0.1 \ {\rm fm}^{-3}$]

Definition at line 236 of file hoteos.C.

References Lorene::Hot_eos::calcule(), Lorene::Tensor::get_mp(), and Lorene::Hot_eos::nbar_Hs_p().

◆ nbar_Hs_p()

double Lorene::Ye_eos_tabul::nbar_Hs_p ( double  ent,
double  ye 
) const
virtual

Computes the baryon density from the log-enthalpy and electronic fraction (virtual function implemented in the derived classes).

Parameters
ent[input, unit: $c^2$] log-enthalpy H defined by $H = c^2 \ln\left( {e+p \over m_B c^2 n} (to be modified) \right) $, where e is the (total) energy density, p the pressure, n the baryon density, and $m_B$ the baryon mass
ye[input, unit: $dimensionless$] electronic fraction $Y_e$
Returns
baryon density [unit: $n_{\rm nuc} := 0.1 \ {\rm fm}^{-3}$]

Implements Lorene::Hot_eos.

Definition at line 305 of file ye_eos_tabul.C.

References d2p, dpdh, dpdye, Lorene::exp(), hhh, hmax, hmin, ppp, Y_e, yemax, and yemin.

◆ new_cold_Eos()

const Eos & Lorene::Ye_eos_tabul::new_cold_Eos ( ) const
virtual

Returns the corresponding cold Eos.

Implements Lorene::Hot_eos.

Definition at line 259 of file ye_eos_tabul.C.

References Lorene::Hot_eos::p_cold_eos, and tablename.

◆ operator!=()

bool Lorene::Ye_eos_tabul::operator!= ( const Hot_eos eos_i) const
virtual

Comparison operator (difference)

Implements Lorene::Hot_eos.

Definition at line 293 of file ye_eos_tabul.C.

References operator==().

◆ operator=()

void Lorene::Ye_eos_tabul::operator= ( const Ye_eos_tabul )

Assignment to another Ye_eos_tabul.

◆ operator==()

bool Lorene::Ye_eos_tabul::operator== ( const Hot_eos eos_i) const
virtual

Comparison operator (egality)

Implements Lorene::Hot_eos.

Definition at line 280 of file ye_eos_tabul.C.

References Lorene::Hot_eos::identify(), and identify().

◆ operator>>()

ostream & Lorene::Ye_eos_tabul::operator>> ( ostream &  ost) const
protectedvirtual

Operator >>

Implements Lorene::Hot_eos.

Definition at line 133 of file ye_eos_tabul.C.

References authors, Lorene::Tbl::get_dim(), hhh, and tablename.

◆ press_Hs()

Scalar Lorene::Hot_eos::press_Hs ( const Scalar ent,
const Scalar sb,
int  nzet,
int  l_min = 0 
) const
inherited

Computes the pressure from the log-enthalpy and entropy per baryon.

Parameters
ent[input, unit: $c^2$] log-enthalpy H defined by $H = c^2 \ln\left( {e+p \over m_B c^2 n} \right) $, where e is the (total) energy density, p the pressure, n the baryon density, and $m_B$ the baryon mass
sb[input, unit: $k_B$] entropy per baryon $s_b$
nzetnumber of domains where the pressure is to be computed.
l_minindex 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.
Returns
pressure [unit: $\rho_{\rm nuc} c^2$], where $\rho_{\rm nuc} := 1.66\ 10^{17} \ {\rm kg/m}^3$

Definition at line 266 of file hoteos.C.

References Lorene::Hot_eos::calcule(), Lorene::Tensor::get_mp(), and Lorene::Hot_eos::press_Hs_p().

◆ press_Hs_p()

double Lorene::Ye_eos_tabul::press_Hs_p ( double  ent,
double  ye 
) const
virtual

Computes the pressure from the log-enthalpy and electronic fraction (virtual function implemented in the derived classes).

Parameters
ent[input, unit: $c^2$] log-enthalpy H defined by $H = c^2 \ln\left( {e+p \over m_B c^2 n} \right) $, where e is the (total) energy density, p the pressure, n the baryon density, and $m_B$ the baryon mass
ye[input, unit: $dimensionless$] electronic fraction $Y_e$
Returns
pressure p [unit: $\rho_{\rm nuc} c^2$], where $\rho_{\rm nuc} := 1.66\ 10^{17} \ {\rm kg/m}^3$

Implements Lorene::Hot_eos.

Definition at line 378 of file ye_eos_tabul.C.

References d2p, dpdh, dpdye, hhh, hmax, hmin, ppp, Y_e, yemax, and yemin.

◆ read_table()

void Lorene::Ye_eos_tabul::read_table ( )
protected

Reads the file containing the table and initializes in the arrays hhh , s_B, ppp, ...

Definition at line 150 of file ye_eos_tabul.C.

References authors, c_sound2, d2p, dpdh, dpdye, hhh, hmax, hmin, mu_l, ppp, Lorene::Tbl::set(), Lorene::Tbl::set_etat_qcq(), Sourcetbl, tablename, Y_e, yemax, and yemin.

◆ sauve()

void Lorene::Ye_eos_tabul::sauve ( FILE *  fich) const
virtual

Save in a file.

Reimplemented from Lorene::Hot_eos.

Definition at line 124 of file ye_eos_tabul.C.

References Lorene::Hot_eos::sauve(), and tablename.

◆ set_arrays_0x0()

void Lorene::Ye_eos_tabul::set_arrays_0x0 ( )
protected

Sets all the arrays to the null pointer.

Definition at line 94 of file ye_eos_tabul.C.

References c_sound2, d2p, dpdh, dpdye, hhh, mu_l, ppp, Sourcetbl, and Y_e.

◆ set_der_0x0()

void Lorene::Hot_eos::set_der_0x0 ( ) const
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.

◆ set_name()

void Lorene::Hot_eos::set_name ( const char *  name_i)
inherited

Sets the hot EOS name.

Definition at line 118 of file hoteos.C.

References Lorene::Hot_eos::name.

◆ sigma_Hs()

Scalar Lorene::Hot_eos::sigma_Hs ( const Scalar ent,
const Scalar Y_e,
int  nzet,
int  l_min = 0 
) const
inherited

Computes the source terms for electronic fraction advection equation from the enthalpy with ye.

Parameters
ent[input, unit: c^2] enthalpy
nzetnumber of domains where the derivative dln(e)/dln(H) is to be computed.
l_minindex 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: $dimensionless$] electronic fraction $Y_e$
Returns
$\Sigma $ [unit: 1/t_unit]

Definition at line 330 of file hoteos.C.

References Lorene::Hot_eos::calcule(), Lorene::Tensor::get_mp(), and Lorene::Hot_eos::sigma_Hs_p().

◆ sigma_Hs_p()

double Lorene::Ye_eos_tabul::sigma_Hs_p ( double  ent,
const double  ye 
) const
virtual

Computes the source terms for electronic fraction advection equation from the enthapy with electronic fraction (virtual function implemented in the derived classes).

Parameters
ent[input, unit: c^2] enthalpy
ye[input, unit: $dimensionless$] electronic fraction $Y_e$
Returns
$\Sigma $ [unit: 1/t_unit]

Implements Lorene::Hot_eos.

Definition at line 504 of file ye_eos_tabul.C.

References Lorene::extract_column(), Lorene::Tbl::get_dim(), hhh, hmax, hmin, Lorene::Tbl::set_etat_qcq(), Sourcetbl, Y_e, yemax, and yemin.

◆ temp_Hs()

Scalar Lorene::Hot_eos::temp_Hs ( const Scalar ent,
const Scalar sb,
int  nzet,
int  l_min = 0 
) const
inherited

Computes the temperature field from the log-enthalpy field and entropy per baryon.

Parameters
ent[input, unit: $c^2$] log-enthalpy H defined by $H = c^2 \ln\left( {e+p \over m_B c^2 n} \right) $, where e is the (total) energy density, p the pressure, n the baryon density, and $m_B$ the baryon mass
sb[input, unit: $k_B$] entropy per baryon $s_b$
nzetnumber of domains where the baryon density is to be computed.
l_minindex 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.
Returns
temperature [unit: MeV]

Definition at line 280 of file hoteos.C.

References Lorene::Hot_eos::calcule(), Lorene::Tensor::get_mp(), and Lorene::Hot_eos::temp_Hs_p().

◆ temp_Hs_p()

double Lorene::Ye_eos_tabul::temp_Hs_p ( double  ent,
double  sb 
) const
virtual

Computes the temperature from the log-enthalpy and entropy per baryon (virtual function implemented in the derived classes).

Parameters
ent[input, unit: $c^2$] log-enthalpy H defined by $H = c^2 \ln\left( {e+p \over m_B c^2 n} (to be modified) \right) $, where e is the (total) energy density, p the pressure, n the baryon density, and $m_B$ the baryon mass
sb[input, unit: $k_B$] entropy per baryon $s_b$
Returns
temperature [unit: MeV]

Implements Lorene::Hot_eos.

Definition at line 547 of file ye_eos_tabul.C.

Friends And Related Function Documentation

◆ Hot_eos::hoteos_from_file

Hot_eos* Hot_eos::hoteos_from_file ( FILE *  )
friend

The construction functions from a file.

Member Data Documentation

◆ authors

string Lorene::Ye_eos_tabul::authors
protected

Authors - reference for the table.

Definition at line 989 of file hoteos.h.

◆ c_sound2

Tbl* Lorene::Ye_eos_tabul::c_sound2
protected

Table of $c_s^2$, sound speed squared (units of c^2).

Definition at line 1010 of file hoteos.h.

◆ d2p

Tbl* Lorene::Ye_eos_tabul::d2p
protected

Table of $\partial^2 P/\partial Y_e \partial H$.

Definition at line 1025 of file hoteos.h.

◆ dpdh

Tbl* Lorene::Ye_eos_tabul::dpdh
protected

Table of $\partial P/\partial H$.

Definition at line 1019 of file hoteos.h.

◆ dpdye

Tbl* Lorene::Ye_eos_tabul::dpdye
protected

Table of $\partial P/\partial Y_e$.

Definition at line 1022 of file hoteos.h.

◆ hhh

Tbl* Lorene::Ye_eos_tabul::hhh
protected

Table of $H = \log ( e + P ) / n_B$.

Definition at line 1004 of file hoteos.h.

◆ hmax

double Lorene::Ye_eos_tabul::hmax
protected

Upper boundary of the enthalpy interval.

Definition at line 995 of file hoteos.h.

◆ hmin

double Lorene::Ye_eos_tabul::hmin
protected

Lower boundary of the enthalpy interval.

Definition at line 992 of file hoteos.h.

◆ mu_l

Tbl* Lorene::Ye_eos_tabul::mu_l
protected

Table of $\mu_l$, the electronic chemical potential (MeV)

Definition at line 1013 of file hoteos.h.

◆ name

string Lorene::Hot_eos::name
protectedinherited

EOS name.

Definition at line 87 of file hoteos.h.

◆ p_cold_eos

Eos* Lorene::Hot_eos::p_cold_eos
mutableprotectedinherited

Corresponding cold Eos.

Definition at line 123 of file hoteos.h.

◆ ppp

Tbl* Lorene::Ye_eos_tabul::ppp
protected

Table of pressure $P$.

Definition at line 1016 of file hoteos.h.

◆ Sourcetbl

Tbl* Lorene::Ye_eos_tabul::Sourcetbl
protected

Table of electronic fraction source.

Definition at line 1028 of file hoteos.h.

◆ tablename

string Lorene::Ye_eos_tabul::tablename
protected

Name of the file containing the tabulated data.

Definition at line 987 of file hoteos.h.

◆ Y_e

Tbl* Lorene::Ye_eos_tabul::Y_e
protected

Table of $Y_e$, electronic fraction (dimensionless).

Definition at line 1007 of file hoteos.h.

◆ yemax

double Lorene::Ye_eos_tabul::yemax
protected

Upper boundary of the electronic fraction interval.

Definition at line 1001 of file hoteos.h.

◆ yemin

double Lorene::Ye_eos_tabul::yemin
protected

Lower boundary of the electronic fraction interval.

Definition at line 998 of file hoteos.h.


The documentation for this class was generated from the following files: