29 #ifndef __EOS_BIFLUID_H_
30 #define __EOS_BIFLUID_H_
147 #define MAX_EOSNAME 100
198 explicit Eos_bifluid(
const char* name_i,
double mass1,
double mass2) ;
308 virtual void sauve(FILE* )
const ;
314 virtual ostream&
operator>>(ostream &)
const = 0 ;
342 int nzet,
int l_min = 0)
const ;
356 virtual bool nbar_ent_p(
const double ent1,
const double ent2,
357 const double delta2,
double& nbar1,
358 double& nbar2)
const = 0 ;
366 virtual double nbar_ent_p1(
const double ent1)
const = 0 ;
374 virtual double nbar_ent_p2(
const double ent2)
const = 0 ;
397 Cmp& nbar1,
Cmp& nbar2,
int nzet,
int l_min = 0)
412 virtual double ener_nbar_p(
const double nbar1,
const double nbar2,
413 const double delta2)
const = 0 ;
435 int nzet,
int l_min = 0)
const ;
449 virtual double press_nbar_p(
const double nbar1,
const double nbar2,
450 const double delta2)
const = 0 ;
471 int nzet,
int l_min = 0)
const ;
489 virtual double get_K11(
const double n1,
const double n2,
const
490 double x)
const = 0 ;
508 virtual double get_K12(
const double n1,
const double n2,
const
509 double x)
const = 0 ;
526 virtual double get_K22(
const double n1,
const double n2,
const
527 double x)
const = 0 ;
552 int nzet,
int l_min = 0)
const ;
577 x2,
int nzet,
int l_min = 0)
const ;
603 int nzet,
int l_min = 0)
const ;
629 x2,
int nzet,
int l_min,
double
630 (
Eos_bifluid::*fait)(
double,
double,
double)
const,
657 int nzet,
int l_min = 0)
const ;
682 x2,
int nzet,
int l_min = 0)
const ;
708 int nzet,
int l_min = 0)
const ;
733 x2,
int nzet,
int l_min,
double
734 (
Eos_bifluid::*fait)(
double,
double,
double)
const,
752 ostream& operator<<(ostream& ,
const Eos_bifluid& ) ;
929 Eos_bf_poly(
double kappa1,
double kappa2,
double kappa3,
double beta) ;
957 Eos_bf_poly(
double gamma1,
double gamma2,
double gamma3,
958 double gamma4,
double gamma5,
double gamma6,
959 double kappa1,
double kappa2,
double kappa3,
960 double beta,
double mass1=1,
double mass2=1,
962 double ecart = 1.e-8) ;
1053 int get_typeos()
const {
return typeos;};
1068 virtual void sauve(FILE* )
const ;
1071 virtual ostream&
operator>>(ostream &)
const ;
1090 virtual bool nbar_ent_p(
const double ent1,
const double ent2,
1091 const double delta2,
double& nbar1,
1092 double& nbar2)
const ;
1099 virtual double nbar_ent_p1(
const double ent1)
const ;
1106 virtual double nbar_ent_p2(
const double ent2)
const ;
1119 virtual double ener_nbar_p(
const double nbar1,
const double nbar2,
1120 const double delta2)
const ;
1133 virtual double press_nbar_p(
const double nbar1,
const double nbar2,
1134 const double delta2)
const ;
1161 virtual double get_K11(
const double n1,
const double n2,
const
1162 double delta2)
const ;
1179 virtual double get_K12(
const double n1,
const double n2,
const
1180 double delta2)
const ;
1196 virtual double get_K22(
const double n1,
const double n2,
const
1197 double delta2)
const ;
1317 double gamma4,
double gamma5,
double gamma6,
1318 double kappa1,
double kappa2,
double kappa3,
1319 double beta,
double mass1,
double mass2,
1321 double ecart = 1.e-8) ;
1374 virtual void sauve(FILE* )
const ;
1377 virtual ostream&
operator>>(ostream &)
const ;
1396 virtual bool nbar_ent_p(
const double ent1,
const double ent2,
1397 const double delta2,
double& nbar1,
1398 double& nbar2)
const ;
1406 virtual double nbar_ent_p1(
const double ent1)
const ;
1413 virtual double nbar_ent_p2(
const double ent2)
const ;
1426 virtual double ener_nbar_p(
const double nbar1,
const double nbar2,
1427 const double delta2)
const ;
1440 virtual double press_nbar_p(
const double nbar1,
const double nbar2,
1441 const double delta2)
const ;
1468 virtual double get_K11(
const double n1,
const double n2,
const
1469 double delta2)
const ;
1486 virtual double get_K12(
const double n1,
const double n2,
const
1487 double delta2)
const ;
1503 virtual double get_K22(
const double n1,
const double n2,
const
1504 double delta2)
const ;
1644 Eos_bf_tabul(
const char* name_i,
const char* table,
const char* path,
double mass1,
double mass2) ;
1654 Eos_bf_tabul(
const char* name_i,
const char* file_name,
double mass1,
double mass2) ;
1734 virtual void sauve(FILE* )
const ;
1738 virtual ostream&
operator>>(ostream &)
const ;
1771 int nzet,
int l_min = 0)
const ;
1784 virtual bool nbar_ent_p(
const double ent1,
const double ent2,
1785 const double delta2,
double& nbar1,
1786 double& nbar2)
const ;
1793 virtual double nbar_ent_p1(
const double ent1)
const ;
1800 virtual double nbar_ent_p2(
const double ent2)
const ;
1813 virtual double ener_nbar_p(
const double nbar1,
const double nbar2,
1814 const double delta2)
const ;
1827 virtual double press_nbar_p(
const double nbar1,
const double nbar2,
1828 const double delta2)
const ;
1842 virtual double get_K11(
const double delta2,
const double ent1,
1843 const double ent2)
const ;
1857 virtual double get_K12(
const double delta2,
const double ent1 ,
1858 const double ent2)
const ;
1871 virtual double get_K22(
const double delta2,
const double ent1,
1872 const double ent2)
const ;
1884 virtual double ener_ent_p(
const double ent1,
const double ent2,
1897 virtual double press_ent_p(
const double ent1,
const double ent2,
1928 virtual double alpha_ent_p(
const double ent1,
const double ent2,
void nbar_ent(const Cmp &ent1, const Cmp &ent2, const Cmp &delta2, Cmp &nbar1, Cmp &nbar2, int nzet, int l_min=0) const
Computes both baryon density fields from the log-enthalpy fields and the relative velocity.
virtual bool operator!=(const Eos_bifluid &) const
Comparison operator (difference)
virtual double press_ent_p(const double ent1, const double ent2, const double delta_car) const
Computes the pressure from the baryonic log-enthalpies and the relative velocity.
Tbl * logent2
Table of where .
double gam1
Adiabatic indexes , see Eq.~eeosbfpolye}.
double get_beta() const
Returns the coefficient [unit: ], where .
double get_gam4() const
Returns the adiabatic index .
virtual double get_K11(const double delta2, const double ent1, const double ent2) const
Computes the derivative of the energy with respect to (baryonic density 1) .
double gam4
Adiabatic indexes , see Eq.~eeosbfpolye}.
Tbl * d2lpsdlent2ddelta_car
Table of .
Tbl * logent1
Table of where .
virtual double press_nbar_p(const double nbar1, const double nbar2, const double delta2) const =0
Computes the pressure from the baryonic densities and the relative velocity.
void operator=(const Eos_bf_poly &)
Assignment to another Eos_bf_poly.
void operator=(const Eos_bf_tabul &)
Assignment to another Eos_bf_tabul.
void determine_type()
Determines the type of the analytical EOS (see typeos )
double get_kap3() const
Returns the pressure coefficient [unit: ], where .
double kap2
Pressure coefficient , see Eq.
friend ostream & operator<<(ostream &, const Eos_bifluid &)
Display.
Eos_bf_poly(double kappa1, double kappa2, double kappa3, double beta)
Standard constructor.
virtual double get_K12(const double delta2, const double ent1, const double ent2) const
Computes the derivative of the energy with respect to .
virtual double get_K12(const double n1, const double n2, const double delta2) const
Computes the derivative of the energy with respect to .
virtual double get_K12(const double n1, const double n2, const double delta2) const
Computes the derivative of the energy with respect to .
virtual void calcule_tout(const Cmp &ent1, const Cmp &ent2, const Cmp &delta2, Cmp &nbar1, Cmp &nbar2, Cmp &ener, Cmp &press, int nzet, int l_min=0) const
General computational method for Cmp 's, it computes both baryon densities, energy and pressure profi...
virtual double ener_ent_p(const double ent1, const double ent2, const double delta_car) const
Computes the total energy density from the baryonic log-enthalpies and the relative velocity.
void operator=(const Eos_bf_poly_newt &)
Assignment to another Eos_bf_poly_newt.
virtual bool operator==(const Eos_bifluid &) const
Comparison operator (egality)
2-fluids equation of state base class.
virtual double nbar_ent_p2(const double ent2) const =0
Computes baryon density out of the log-enthalpy assuming that only fluid 2 is present (virtual functi...
Tbl * dlpsdlent2
Table of .
Tbl * dlpsdlent1
Table of .
string get_name() const
Returns the EOS name.
Eos_bf_poly_newt(double kappa1, double kappa2, double kappa3, double beta)
Standard constructor.
double get_kap2() const
Returns the pressure coefficient [unit: ], where .
virtual double ener_nbar_p(const double nbar1, const double nbar2, const double delta2) const
Computes the total energy density from the baryonic densities and the relative velocity.
Tbl * d2lpsdlent2dlent2
Table of .
Tbl * d3lpsdlent1dlent2ddelta_car
if necessary for the interpolation to find alpha (derivee seconde croisee) ie, if it's possible to ca...
virtual ~Eos_bifluid()
Destructor.
void calcule(const Cmp &nbar1, const Cmp &nbar2, const Cmp &x2, int nzet, int l_min, double(Eos_bifluid::*fait)(double, double, double) const, Cmp &resu) const
General computational method for Cmp 's ( 's).
virtual Eos * trans2Eos() const
Makes a translation from Eos_bifluid to Eos .
double ent2_min
Lower boundary of the log-enthalpy interval (fluid 2 = p)
Equation of state base class.
virtual ostream & operator>>(ostream &) const
Operator >>
double get_gam5() const
Returns the adiabatic index .
virtual ostream & operator>>(ostream &) const =0
Operator >>
double ent1_max
Upper boundary of the log-enthalpy interval (fluid 1 = n)
virtual bool nbar_ent_p(const double ent1, const double ent2, const double delta2, double &nbar1, double &nbar2) const
Computes both baryon densities from the log-enthalpies.
virtual double get_K22(const double n1, const double n2, const double delta2) const
Computes the derivative of the energy/(baryonic density 2) .
void calcule_interpol(const Cmp &ent1, const Cmp &ent2, const Cmp &delta2, Cmp &nbar1, Cmp &nbar2, Cmp &ener, Cmp &press, Cmp &K_nn, Cmp &K_np, Cmp &K_pp, int nzet, int l_min=0) const
General computational method for Cmp 's, it computes both baryon densities, energy and pressure profi...
Cmp get_Knp(const Cmp &nbar1, const Cmp &nbar2, const Cmp &x2, int nzet, int l_min=0) const
Computes the derivatives of the energy with respect to .
double ent1_min
Lower boundary of the log-enthalpy interval (fluid 1 = n)
double precis
contains the precision required in zerosec_b
double kap3
Pressure coefficient , see Eq.
Tbl * d2lpsdlent1dlent2
Table of .
virtual ~Eos_bf_tabul()
Destructor.
virtual double press_nbar_p(const double nbar1, const double nbar2, const double delta2) const
Computes the pressure from the baryonic densities and the relative velocity.
virtual int identify() const
Returns a number to identify the sub-classe of Eos_bifluid the object belongs to.
virtual ~Eos_bf_poly_newt()
Destructor.
double get_gam2() const
Returns the adiabatic index .
double ecart
contains the precision required in the relaxation nbar_ent_p
void calcule_ent(const Cmp &ent1, const Cmp &ent2, const Cmp &x2, int nzet, int l_min, double(Eos_bifluid::*fait)(double, double, double) const, Cmp &resu) const
General computational method for Cmp 's ( 's).
virtual double get_K12(const double n1, const double n2, const double x) const =0
Computes the derivative of the energy with respect to .
Analytic equation of state for two fluids (relativistic case).
virtual double get_K11(const double n1, const double n2, const double delta2) const
Computes the derivative of the energy with respect to (baryonic density 1) .
void read_table()
Reads the file containing the table and initializes the arrays logent1, logent2, delta_car,...
Cmp get_Kpp(const Cmp &nbar1, const Cmp &nbar2, const Cmp &x2, int nzet, int l_min=0) const
Computes the derivatives of the energy/(baryonic density 2) .
virtual bool operator!=(const Eos_bifluid &) const
Comparison operator (difference)
virtual bool operator!=(const Eos_bifluid &) const =0
Comparison operator (difference)
virtual ostream & operator>>(ostream &) const
Operator >>
virtual double nbar_ent_p2(const double ent2) const
Computes baryon density out of the log-enthalpy assuming that only fluid 2 is present.
virtual void sauve(FILE *) const
Save in a file.
Class for a two-fluid (tabulated) equation of state.
double get_m1() const
Return the individual particule mass
virtual void sauve(FILE *) const
Save in a file.
double get_m2() const
Return the individual particule mass
virtual bool nbar_ent_p(const double ent1, const double ent2, const double delta2, double &nbar1, double &nbar2) const
Computes both baryon densities from the log-enthalpies.
Analytic equation of state for two fluids (Newtonian case).
virtual Eos * trans2Eos() const
Makes a translation from Eos_bifluid to Eos .
Cmp press_ent(const Cmp &ent1, const Cmp &ent2, const Cmp &delta2, int nzet, int l_min=0) const
Computes the pressure from the log-enthalpy fields and the relative velocity.
Tbl * delta_car
Table of .
virtual double nbar_ent_p1(const double ent1) const =0
Computes baryon density out of the log-enthalpy asuming that only fluid 1 is present (virtual functio...
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
double m_1
Individual particle mass [unit: ].
virtual double get_K22(const double n1, const double n2, const double x) const =0
Computes the derivative of the energy/(baryonic density 2) .
int typeos
The bi-fluid analytical EOS type:
virtual int identify() const =0
Returns a number to identify the sub-classe of Eos_bifluid the object belongs to.
virtual void sauve(FILE *) const
Save in a file.
virtual bool operator==(const Eos_bifluid &) const
Comparison operator (egality)
Tbl * d2lpsdlent1ddelta_car
Table of .
virtual double nbar_ent_p1(const double ent1) const
Computes baryon density out of the log-enthalpy asuming that only fluid 1 is present (virtual functio...
virtual void sauve(FILE *) const
Save in a file.
virtual double press_ent_p2(const double ent2) const
Computes the pressure from the baryonic log-enthalpies assuming that only fluid 2 is present.
virtual bool operator!=(const Eos_bifluid &) const
Comparison operator (difference)
virtual double press_nbar_p(const double nbar1, const double nbar2, const double delta2) const
Computes the pressure from the baryonic densities and the relative velocity.
double get_gam1() const
Returns the adiabatic index .
double delta_car_min
Lower boundary of the relative velocity interval --> 0 ?
double beta
Coefficient , see Eq.
virtual double nbar_ent_p2(const double ent2) const
Computes baryon density out of the log-enthalpy assuming that only fluid 2 is present.
Cmp get_Knn_ent(const Cmp &ent1, const Cmp &ent2, const Cmp &x2, int nzet, int l_min=0) const
Computes the derivatives of the energy/(baryonic density 1) .
double get_gam6() const
Returns the adiabatic index .
virtual double press_nbar_p(const double nbar1, const double nbar2, const double delta2) const
Computes the pressure from the baryonic densities and the relative velocity.
virtual double get_K22(const double delta2, const double ent1, const double ent2) const
Computes the derivative of the energy/(baryonic density 2) .
Cmp ener_ent(const Cmp &ent1, const Cmp &ent2, const Cmp &delta2, int nzet, int l_min=0) const
Computes the total energy density from the log-enthalpy fields and the relative velocity.
void operator=(const Eos_bifluid &)
Assignment to another Eos_bifluid.
virtual double alpha_ent_p(const double ent1, const double ent2, const double delta_car) const
Computes alpha, the derivative of the total energy density with respect to from the baryonic log-ent...
virtual ostream & operator>>(ostream &) const
Operator >>
Tbl * d2lpsdlent1dlent1
Table of .
double gam3
Adiabatic indexes , see Eq.~eeosbfpolye}.
void set_auxiliary()
Computes the auxiliary quantities gam1m1 , gam2m1 and gam3m1.
virtual double press_ent_p1(const double ent1) const
Computes the pressure from the baryonic log-enthalpies asuming that only fluid 1 is present.
virtual double ener_nbar_p(const double nbar1, const double nbar2, const double delta2) const
Computes the total energy density from the baryonic densities and the relative velocity.
virtual int identify() const
Returns a number to identify the sub-classe of Eos_bifluid the object belongs to.
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
Eos_bf_tabul(const char *name_i, const char *table, const char *path, double mass1, double mass2)
Standard constructor.
virtual double get_K11(const double n1, const double n2, const double delta2) const
Computes the derivative of the energy with respect to (baryonic density 1) .
virtual double nbar_ent_p1(const double ent1) const
Computes baryon density out of the log-enthalpy asuming that only fluid 1 is present.
Tbl * dlpsddelta_car
Table of
Cmp get_Knn(const Cmp &nbar1, const Cmp &nbar2, const Cmp &x2, int nzet, int l_min=0) const
Computes the derivatives of the energy/(baryonic density 1) .
double get_gam3() const
Returns the adiabatic index .
double m_2
Individual particle mass [unit: ].
virtual bool operator==(const Eos_bifluid &) const =0
Comparison operator (egality)
double kap1
Pressure coefficient , see Eq.
double gam2
Adiabatic indexes , see Eq.~eeosbfpolye}.
virtual double get_K22(const double n1, const double n2, const double delta2) const
Computes the derivative of the energy/(baryonic density 2) .
Eos_bifluid()
Standard constructor.
double get_kap1() const
Returns the pressure coefficient [unit: ], where .
virtual Eos * trans2Eos() const
Makes a translation from Eos_bifluid to Eos .
Cmp get_Kpp_ent(const Cmp &ent1, const Cmp &ent2, const Cmp &x2, int nzet, int l_min=0) const
Computes the derivatives of the energy/(baryonic density 2) .
virtual double ener_nbar_p(const double nbar1, const double nbar2, const double delta2) const
Computes the total energy density from the baryonic densities and the relative velocity.
virtual Eos * trans2Eos() const =0
Makes a translation from Eos_bifluid to Eos .
double ent2_max
Upper boundary of the log-enthalpy interval (fluid 2 = p)
double relax
Parameters needed for some inversions of the EOS.
virtual bool nbar_ent_p(const double ent1, const double ent2, const double delta2, double &nbar1, double &nbar2) const
Computes both baryon densities from the log-enthalpies.
Cmp get_Knp_ent(const Cmp &ent1, const Cmp &ent2, const Cmp &x2, int nzet, int l_min=0) const
Computes the derivatives of the energy with respect to .
virtual double nbar_ent_p1(const double ent1) const
Computes baryon density out of the log-enthalpy asuming that only fluid 1 is present.
string tablename
Name of the file containing the tabulated data (be careful, Eos_bifluid uses char*)
double delta_car_max
Upper boundary of the relative velocity interval --> 1 ?
virtual double nbar_ent_p2(const double ent2) const
Computes baryon density out of the log-enthalpy assuming that only fluid 2 is present.
virtual bool nbar_ent_p(const double ent1, const double ent2, const double delta2, double &nbar1, double &nbar2) const =0
Computes both baryon densities from the log-enthalpies (virtual function implemented in the derived c...
static Eos_bifluid * eos_from_file(FILE *)
Construction of an EOS from a binary file.
virtual double get_K11(const double n1, const double n2, const double x) const =0
Computes the derivative of the energy with respect to (baryonic density 1) .
virtual ~Eos_bf_poly()
Destructor.
double gam6
Adiabatic indexes , see Eq.~eeosbfpolye}.
virtual bool operator==(const Eos_bifluid &) const
Comparison operator (egality)
double gam5
Adiabatic indexes , see Eq.~eeosbfpolye}.
virtual double ener_nbar_p(const double nbar1, const double nbar2, const double delta2) const =0
Computes the total energy density from the baryonic densities and the relative velocity.