57 #include "utilitaires.h" 68 Dyn_eos(
"Relativistic polytropic EOS"),
69 gam(gam0), kap(kappa), m_0(double(1)), mu_0(double(1))
77 Dyn_eos(
"Relativistic polytropic EOS"),
78 gam(gam0), kap(kappa), m_0(mass), mu_0(double(1))
86 Dyn_eos(
"Relativistic polytropic EOS"),
87 gam(gam0), kap(kappa), m_0(mass), mu_0(mu_zero)
96 gam(eosi.gam), kap(eosi.kap), m_0(eosi.m_0), mu_0(eosi.mu_0)
127 fich >>
gam ; fich.ignore(1000,
'\n') ;
128 fich >>
kap ; fich.ignore(1000,
'\n') ;
129 fich >>
m_0 ; fich.ignore(1000,
'\n') ;
134 fich >>
mu_0 ; fich.ignore(1000,
'\n') ;
210 cout <<
"The second EOS is not of type Dyn_eos_poly !" << endl ;
219 <<
"The two Dyn_eos_poly have different gamma : " <<
gam <<
" <-> " 226 <<
"The two Dyn_eos_poly have different kappa : " <<
kap <<
" <-> " 233 <<
"The two Dyn_eos_poly have different m_0 : " <<
m_0 <<
" <-> " 240 <<
"The two Dyn_eos_poly have different mu_0 : " <<
mu_0 <<
" <-> " 241 << eos.
mu_0 << endl ;
264 double tempo = -
m_0 ;
265 fwrite_be(&tempo,
sizeof(
double), 1, fich) ;
271 ost <<
"EOS of class Dyn_eos_poly (relativistic polytrope) : " << endl ;
272 ost <<
" Adiabatic index gamma : " <<
gam << endl ;
273 ost <<
" Pressure coefficient kappa : " <<
kap <<
274 " rho_nuc c^2 / n_nuc^gamma" << endl ;
275 ost <<
" Mean particle mass : " <<
m_0 <<
" m_B" << endl ;
276 ost <<
" Relativistic chemical potential at zero pressure : " 277 <<
mu_0 <<
" m_B c^2" << endl ;
322 double ngam =
pow(nbar,
gam1) ;
virtual double ent_nbar_p(double nbar, const Param *par=0x0) const
Computes the log-enthalpy from the baryon density and extra parameters (virtual function implemented ...
void set_name(const string &)
Sets the EOS name.
virtual ~Dyn_eos_poly()
Destructor.
Cmp log(const Cmp &)
Neperian logarithm.
double mu_0
Relativistic chemical potential at zero pressure [unit: , with ].
virtual int identify() const
Returns a number to identify the sub-classe of Dyn_eos the object belongs to.
virtual double csound_square_nbar_p(double nbar, const Param *par=0x0) const
Computes the sound speed squared from the baryon density with extra parameters.
virtual void sauve(FILE *) const
Save in a file.
virtual bool operator==(const Dyn_eos &) const
Comparison operator (egality)
virtual int identify() const =0
Returns a number to identify the sub-classe of Dyn_eos the object belongs to.
Dyn_eos_poly(double gamma, double kappa)
Standard constructor (sets both m_0 and mu_0 to 1).
virtual double press_nbar_p(double nbar, const Param *par=0x0) const
Computes the pressure from the baryon density and extra parameters (virtual function implemented in t...
Polytropic equation of state (relativistic case) for use in dynamical code.
void set_auxiliary()
Computes the auxiliary quantities gam1 , unsgam1 , gam1sgamkap from the values of gam and kap...
double get_gam() const
Returns the adiabatic index (cf. Eq. (3))
virtual double ener_nbar_p(double nbar, const Param *par=0x0) const
Computes the total energy density from the baryon density and extra parameters (virtual function impl...
void operator=(const Dyn_eos_poly &)
Assignment to another Dyn_eos_poly.
Equation of state for use in dynamical code base class.
virtual ostream & operator>>(ostream &) const
Operator >>
double get_mu_0() const
Return the relativistic chemical potential at zero pressure [unit: , with ].
double gam
Adiabatic index (cf. Eq. (3))
double get_kap() const
Returns the pressure coefficient (cf.
virtual bool operator!=(const Dyn_eos &) const
Comparison operator (difference)
double get_m_0() const
Return the individual particule mass (cf.
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.
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.
double kap
Pressure coefficient (cf.
virtual void sauve(FILE *) const
Save in a file.
double m_0
Individual particule mass (cf.