29char ideal_gas_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Eos/ideal_gas.C,v 1.3 2015/09/10 13:54:04 j_novak Exp $" ;
53#include "utilitaires.h"
65 Hot_eos(
"Ideal gas EOS"), gam(gam0), kap(kappa), m_0(mass) {
74 Hot_eos(eosi), gam(eosi.gam), kap(eosi.kap), m_0(eosi.m_0)
99 fich >>
gam ; fich.ignore(80,
'\n') ;
100 fich >>
kap ; fich.ignore(80,
'\n') ;
101 fich >>
m_0 ; fich.ignore(80,
'\n') ;
180 cout <<
"The second EOS is not of type Ideal_gas !" << endl ;
189 <<
"The two Ideal_gas have different gamma : " <<
gam <<
" <-> "
196 <<
"The two Ideal_gas have different kappa : " <<
kap <<
" <-> "
203 <<
"The two Ideal_gas have different m_0 : " <<
m_0 <<
" <-> "
233 ost <<
"Hot EOS of class Ideal_gas (relativistic ideal gas) : " << endl ;
234 ost <<
" Adiabatic index gamma : " <<
gam << endl ;
235 ost <<
" Pressure coefficient kappa : " <<
kap <<
236 " rho_nuc c^2 / n_nuc^gamma" << endl ;
237 ost <<
" Mean particle mass : " <<
m_0 <<
" m_B" << endl ;
Polytropic equation of state (relativistic case).
Equation of state base class.
Base class for temperature-dependent equations of state (abstract class).
virtual int identify() const =0
Returns a number to identify the sub-classe of Hot_eos the object belongs to.
Eos * p_cold_eos
Corresponding cold Eos.
virtual void sauve(FILE *) const
Save in a file.
Ideal-gas (temperature-dependent) equation of state, with mass-term in the energy density.
void set_auxiliary()
Computes the auxiliary quantities gam1 , unsgam1 , gam1sgamkap from the values of gam and kap.
double get_m_0() const
Return the individual particule mass (cf.
virtual double nbar_Hs_p(double ent, double sb) const
Computes the baryon density from the log-enthalpy and entropy per baryon (virtual function implemente...
Ideal_gas(double gamma, double kappa, double mass=1.)
Standard constructor.
virtual void sauve(FILE *) const
Save in a file.
double get_kap() const
Returns the pressure coefficient (cf. Eq. (1)).
double m_0
Individual particule mass (cf.
virtual bool operator==(const Hot_eos &) const
Comparison operator (egality)
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 t...
double get_gam() const
Returns the adiabatic index (cf. Eq. (1)).
virtual ostream & operator>>(ostream &) const
Operator >>
virtual bool operator!=(const Hot_eos &) const
Comparison operator (difference)
virtual ~Ideal_gas()
Destructor.
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 impl...
virtual double temp_Hs_p(double ent, double sb) const
Computes the temperature from the log-enthalpy and entropy per baryon (virtual function implemented i...
virtual const Eos & new_cold_Eos() const
Returns the corresponding cold Eos.
virtual int identify() const
Returns a number to identify the sub-classe of Hot_eos the object belongs to.
double gam
Adiabatic index .
void operator=(const Ideal_gas &)
Assignment to another Ideal_gas.
double kap
Pressure coefficient (cf.
Cmp exp(const Cmp &)
Exponential.
Cmp pow(const Cmp &, int)
Power .
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
int fwrite_be(const int *aa, int size, int nb, FILE *fich)
Writes integer(s) into a binary file according to the big endian convention.
Standard units of space, time and mass.