31char eos_strange_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Eos/eos_strange.C,v 1.7 2014/10/13 08:52:54 j_novak Exp $" ;
88#include "utilitaires.h"
99 double eps_fit_i,
double rho0_b60_i) :
100 Eos(
"Strange matter EOS from Zdunik (2000)"),
105 rho0_b60(rho0_b60_i) {
116 n0_b60(eos_i.n0_b60),
119 eps_fit(eos_i.eps_fit),
120 rho0_b60(eos_i.rho0_b60) {
149 fich >>
n0_b60 ; fich.getline(blabla, 80) ;
150 fich >>
b60 ; fich.getline(blabla, 80) ;
151 fich >>
ent0 ; fich.getline(blabla, 80) ;
152 fich >>
eps_fit ; fich.getline(blabla, 80) ;
153 fich >>
rho0_b60 ; fich.getline(blabla, 80) ;
216 cout <<
"The second EOS is not of type Eos_strange !" << endl ;
225 <<
"The two Eos_strange have different n0_b60 : " <<
n0_b60 <<
" <-> "
232 <<
"The two Eos_strange have different b60 : " <<
b60 <<
" <-> "
239 <<
"The two Eos_strange have different ent0 : " <<
ent0 <<
" <-> "
240 << eos.
ent0 << endl ;
246 <<
"The two Eos_strange have different eps_fit : " <<
eps_fit
247 <<
" <-> " << eos.
eps_fit << endl ;
253 <<
"The two Eos_strange have different rho0_b60 : " <<
rho0_b60
254 <<
" <-> " << eos.
rho0_b60 << endl ;
290 "EOS of class Eos_strange (Strange matter EOS from Zdunik (2000)) : "
292 ost <<
" Baryon density at zero pressure : " <<
n0_b60
293 <<
" * B_{60}^{3/4}" << endl ;
294 ost <<
" Bag constant B : " <<
b60 <<
" * 60 MeV/fm^3"<< endl ;
296 " Log-enthalpy threshold for setting the energy density to non-zero: "
297 << endl <<
" " <<
ent0 << endl ;
298 ost <<
" Fitting parameter eps_fit : " <<
eps_fit << endl ;
299 ost <<
" Energy density at zero pressure : " <<
rho0_b60
300 <<
" * B_{60} MeV/fm^3" << endl ;
318 return n0 *
exp(
double(3) * ent / (
double(1) +
eps_fit)) ;
336 return rho0 + double(3) * pp / (double(1) +
eps_fit) ;
368 return double(3) * ent / ( double(1) +
eps_fit ) ;
383 double xx =
fach * ent ;
385 return xx / ( double(1) +
386 ( double(1) +
eps_fit ) /
double(3) *
exp(-xx) ) ;
401 double xx =
fach * ent ;
403 return xx / ( double(1) -
exp(-xx) ) ;
Strange matter EOS (MIT Bag model).
double rho0
Energy density at zero pressure.
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
double eps_fit
Fitting parameter related to the square of sound velocity by .
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
double n0
Baryon density at zero pressure.
virtual void sauve(FILE *) const
Save in a file.
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Eos_strange(double n0_b60_i, double b60_i, double ent0_i, double eps_fit_i, double rho0_b60_i)
Standard constructor.
virtual bool operator==(const Eos &) const
Comparison operator (egality)
void set_auxiliary()
Computes the auxiliary quantities n0 , rh0 , b34 and fach from the values of the other parameters.
double b60
Bag constant [unit: ].
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
double ent0
Log-enthalpy threshold for setting the energy density to a non zero value (should be negative).
virtual ~Eos_strange()
Destructor.
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
double rho0_b60
Energy density at zero pressure divided by .
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
void operator=(const Eos_strange &)
Assignment to another Eos_strange.
virtual ostream & operator>>(ostream &) const
Operator >>
double n0_b60
Baryon density at zero pressure divided by .
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the log-enthalpy.
Equation of state base class.
virtual int identify() const =0
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual void sauve(FILE *) const
Save in a file.
void set_name(const char *name_i)
Sets the EOS name.
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.