31char Eos_strange_cr_cr_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Eos/eos_strange_cr.C,v 1.7 2014/10/13 08:52:54 j_novak Exp $" ;
90#include "utilitaires.h"
101 double eps_fit_i,
double rho0_b60_i,
102 double ent_nd_i,
double rho_nd_i,
double gam_i) :
103 Eos(
"Strange matter EOS from Zdunik (2000) with crust"),
108 rho0_b60(rho0_b60_i),
122 n0_b60(eos_i.n0_b60),
125 eps_fit(eos_i.eps_fit),
126 rho0_b60(eos_i.rho0_b60),
127 ent_nd(eos_i.ent_nd),
128 rho_nd(eos_i.rho_nd),
161 fich >>
n0_b60 ; fich.getline(blabla, 80) ;
162 fich >>
b60 ; fich.getline(blabla, 80) ;
163 fich >>
ent0 ; fich.getline(blabla, 80) ;
164 fich >>
eps_fit ; fich.getline(blabla, 80) ;
165 fich >>
rho0_b60 ; fich.getline(blabla, 80) ;
166 fich >>
ent_nd ; fich.getline(blabla, 80) ;
167 fich >>
rho_nd ; fich.getline(blabla, 80) ;
168 fich >>
gam ; fich.getline(blabla, 80) ;
235 cout <<
"ncr_nd =" <<
ncr_nd << endl ;
237 cout <<
"eos ent_nd, x_nd, delent, ent_nd +delent " <<
ent_nd <<
" "<<
x_nd <<
" "
247 cout <<
" eos sqm fach =" <<
fach <<
" PNS_s " <<
248 psq <<
" PNS_cr = " << pcr << endl ;
251 cout <<
" log(miu) " <<
255 cout <<
" miu_rate -1 " << miu_rate -1. ;
259 cout <<
"aa0, aa1, aa0-aa1 : " << aa0 <<
" " << aa1 <<
" " <<
261 cout <<
"fach : " <<
fach << endl ;
277 cout <<
"The second EOS is not of type Eos_strange_cr !" << endl ;
286 <<
"The two Eos_strange_cr have different n0_b60 : " <<
n0_b60 <<
" <-> "
293 <<
"The two Eos_strange_cr have different b60 : " <<
b60 <<
" <-> "
300 <<
"The two Eos_strange_cr have different ent0 : " <<
ent0 <<
" <-> "
301 << eos.
ent0 << endl ;
307 <<
"The two Eos_strange_cr have different eps_fit : " <<
eps_fit
308 <<
" <-> " << eos.
eps_fit << endl ;
314 <<
"The two Eos_strange_cr have different rho0_b60 : " <<
rho0_b60
315 <<
" <-> " << eos.
rho0_b60 << endl ;
322 <<
"The two Eos_strange_cr have different ent_nd : "
324 <<
" <-> " << eos.
ent_nd << endl ;
331 <<
"The two Eos_strange_cr have different rho_nd : "
333 <<
" <-> " << eos.
rho_nd << endl ;
340 <<
"The two Eos_strange_cr have different gam : " <<
gam
341 <<
" <-> " << eos.
gam << endl ;
381 "EOS of class Eos_strange_cr " << endl
382 <<
" (Strange matter EOS from Zdunik (2000) with crust) "
384 ost <<
" Baryon density at zero pressure : " <<
n0_b60
385 <<
" * B_{60}^{3/4}" << endl ;
386 ost <<
" Bag constant B : " <<
b60 <<
" * 60 MeV/fm^3"<< endl ;
388 " Log-enthalpy threshold for setting the energy density to non-zero: "
389 << endl <<
" " <<
ent0 << endl ;
390 ost <<
" Fitting parameter eps_fit : " <<
eps_fit << endl ;
391 ost <<
" Energy density at zero pressure : " <<
rho0_b60
392 <<
" * B_{60} MeV/fm^3" << endl ;
393 ost <<
" Log-enthalpy at neutron drip point : " <<
ent_nd << endl ;
394 ost <<
" Energy density at neutron drip point : " <<
rho_nd
395 <<
" MeV/fm^3" << endl ;
396 ost <<
" Adiabatic index for the crust : " <<
gam << endl ;
416 double entsqm = ent +
delent ;
418 return n0 *
exp(
double(3) * entsqm / (
double(1) +
eps_fit)) ;
444 double entsqm = ent +
delent ;
448 return rho0 + double(3) * pp / (double(1) +
eps_fit) ;
474 double entsqm = ent +
delent ;
503 double entsqm = ent +
delent ;
505 return double(3) * entsqm / ( double(1) +
eps_fit ) ;
509 cout <<
"Eos_strange_cr::der_nbar_ent_p not ready yet !" << endl ;
529 double entsqm = ent +
delent ;
531 double xx =
fach * entsqm ;
533 return xx / ( double(1) +
534 ( double(1) +
eps_fit ) /
double(3) *
exp(-xx) ) ;
538 cout <<
"Eos_strange_cr::der_ener_ent_p not ready yet !" << endl ;
558 double entsqm = ent +
delent ;
560 double xx =
fach * entsqm ;
562 return xx / ( double(1) -
exp(-xx) ) ;
566 cout <<
"Eos_strange_cr::der_press_ent_p not ready yet !" << endl ;
Strange matter EOS (MIT Bag model) with crust.
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
double delent
Enthalpy shift in quark phase.
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
double rho0
Energy density at zero pressure.
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
double rho_nd_nucl
Energy density at neutron drip point, defining the boundary between crust and core [unit: rho_unit ].
virtual ~Eos_strange_cr()
Destructor.
double rho_nd
Energy density at neutron drip point, defining the boundary between crust and core [unit: ].
double rho0_b60
Energy density at zero pressure divided by .
double ent0
Log-enthalpy threshold for setting the energy density to a non zero value (should be negative).
double ent_nd
Log-enthalpy at neutron drip point, defining the boundary between crust and core.
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
double n0_b60
Baryon density at zero pressure divided by .
double b60
Bag constant [unit: ].
Eos_strange_cr(double n0_b60_i, double b60_i, double ent0_i, double eps_fit_i, double rho0_b60_i, double ent_nd_i, double rho_nd_i, double gam_i)
Standard constructor.
double ncr_nd
Rescaled number density at neutron drip point.
double x_nd
Ratio of pressure to energy density at neutron drip point.
virtual ostream & operator>>(ostream &) const
Operator >>
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
void operator=(const Eos_strange_cr &)
Assignment to another Eos_strange.
void set_auxiliary()
Computes the auxiliary quantities n0 , rh0 , b34 and fach from the values of the other parameters.
virtual bool operator==(const Eos &) const
Comparison operator (egality)
virtual void sauve(FILE *) const
Save in a file.
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the log-enthalpy.
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
double eps_fit
Fitting parameter related to the square of sound velocity by .
double n0
Baryon density at zero pressure.
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
double gam
Adiabatic index for the crust model.
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 .
Cmp log(const Cmp &)
Neperian logarithm.
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.