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 ;
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 ;
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 ;
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,
752ostream& 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,
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
virtual Eos * trans2Eos() const
Makes a translation from Eos_bifluid to Eos .
virtual bool operator!=(const Eos_bifluid &) const
Comparison operator (difference).
void operator=(const Eos_bf_poly_newt &)
Assignment to another Eos_bf_poly_newt.
virtual double get_K22(const double n1, const double n2, const double delta2) const
Computes the derivative of the energy/(baryonic density 2) .
virtual int identify() const
Returns a number to identify the sub-classe of Eos_bifluid the object belongs 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 (virtual functio...
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 ostream & operator>>(ostream &) const
Operator >>.
virtual bool operator==(const Eos_bifluid &) const
Comparison operator (egality).
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.
Eos_bf_poly_newt(double kappa1, double kappa2, double kappa3, double beta)
Standard constructor.
virtual void sauve(FILE *) const
Save in a file.
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 ~Eos_bf_poly_newt()
Destructor.
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 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 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 gam5
Adiabatic indexes , see Eq.~eeosbfpolye}.
virtual bool operator!=(const Eos_bifluid &) const
Comparison operator (difference).
double kap1
Pressure coefficient , see Eq.
double get_kap1() const
Returns the pressure coefficient [unit: ], where .
void determine_type()
Determines the type of the analytical EOS (see typeos ).
double gam1
Adiabatic indexes , see Eq.~eeosbfpolye}.
double kap2
Pressure coefficient , see Eq.
void operator=(const Eos_bf_poly &)
Assignment to another Eos_bf_poly.
double gam4
Adiabatic indexes , see Eq.~eeosbfpolye}.
double get_gam6() const
Returns the adiabatic index .
double gam3
Adiabatic indexes , see Eq.~eeosbfpolye}.
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 get_K12(const double n1, const double n2, const double delta2) const
Computes the derivative of the energy with respect to .
double get_gam4() const
Returns the adiabatic index .
double get_gam1() const
Returns the adiabatic index .
double get_gam5() const
Returns the adiabatic index .
virtual bool operator==(const Eos_bifluid &) const
Comparison operator (egality).
virtual ostream & operator>>(ostream &) const
Operator >>.
virtual Eos * trans2Eos() const
Makes a translation from Eos_bifluid to Eos .
virtual double get_K22(const double n1, const double n2, const double delta2) const
Computes the derivative of the energy/(baryonic density 2) .
double gam6
Adiabatic indexes , see Eq.~eeosbfpolye}.
double gam2
Adiabatic indexes , see Eq.~eeosbfpolye}.
double precis
contains the precision required in zerosec_b
virtual int identify() const
Returns a number to identify the sub-classe of Eos_bifluid the object belongs to.
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_gam2() const
Returns the adiabatic index .
double get_gam3() const
Returns the adiabatic index .
double get_kap3() const
Returns the pressure coefficient [unit: ], where .
double get_beta() const
Returns the coefficient [unit: ], where .
virtual void sauve(FILE *) const
Save in a file.
void set_auxiliary()
Computes the auxiliary quantities gam1m1 , gam2m1 and gam3m1.
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.
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.
int typeos
The bi-fluid analytical EOS type:
double beta
Coefficient , see Eq.
double kap3
Pressure 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.
virtual double nbar_ent_p1(const double ent1) const
Computes baryon density out of the log-enthalpy asuming that only fluid 1 is present.
double ecart
contains the precision required in the relaxation nbar_ent_p
Eos_bf_poly(double kappa1, double kappa2, double kappa3, double beta)
Standard constructor.
double relax
Parameters needed for some inversions of the EOS.
virtual ~Eos_bf_poly()
Destructor.
Tbl * d3lpsdlent1dlent2ddelta_car
if necessary for the interpolation to find alpha (derivee seconde croisee) ie, if it's possible to ca...
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.
double ent1_max
Upper boundary of the log-enthalpy interval (fluid 1 = n).
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
void operator=(const Eos_bf_tabul &)
Assignment to another Eos_bf_tabul.
double ent2_max
Upper boundary of the log-enthalpy interval (fluid 2 = p).
double ent2_min
Lower boundary of the log-enthalpy interval (fluid 2 = p).
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.
Tbl * d2lpsdlent2ddelta_car
Table of .
double delta_car_max
Upper boundary of the relative velocity interval --> 1 ?
Tbl * logent1
Table of where .
virtual bool operator!=(const Eos_bifluid &) const
Comparison operator (difference).
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...
Tbl * dlpsdlent2
Table of .
virtual ~Eos_bf_tabul()
Destructor.
string tablename
Name of the file containing the tabulated data (be careful, Eos_bifluid uses char*).
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...
Eos_bf_tabul(const Eos_bf_tabul &)
Copy constructor.
virtual bool operator==(const Eos_bifluid &) const
Comparison operator (egality).
Tbl * delta_car
Table of .
double delta_car_min
Lower boundary of the relative velocity interval --> 0 ?
virtual Eos * trans2Eos() const
Makes a translation from Eos_bifluid to Eos .
Tbl * dlpsdlent1
Table of .
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 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 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) .
double ent1_min
Lower boundary of the log-enthalpy interval (fluid 1 = n).
void read_table()
Reads the file containing the table and initializes the arrays logent1, logent2, delta_car,...
virtual ostream & operator>>(ostream &) const
Operator >>.
Tbl * d2lpsdlent2dlent2
Table of .
Tbl * logent2
Table of where .
Tbl * d2lpsdlent1dlent1
Table of .
Tbl * d2lpsdlent1ddelta_car
Table of .
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 get_K12(const double delta2, const double ent1, const double ent2) const
Computes the derivative of the energy with respect to .
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) .
virtual void sauve(FILE *) const
Save in a file.
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.
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 * d2lpsdlent1dlent2
Table of .
Eos_bf_tabul(const char *name_i, const char *table, const char *path, double mass1, double mass2)
Standard constructor.
Tbl * dlpsddelta_car
Table of .
virtual double press_ent_p2(const double ent2) const
Computes the pressure from the baryonic log-enthalpies assuming that only fluid 2 is present.
2-fluids equation of state base class.
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 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 ostream & operator>>(ostream &) const =0
Operator >>.
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...
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) .
double get_m1() const
Return the individual particule mass .
virtual void sauve(FILE *) const
Save in a file.
static Eos_bifluid * eos_from_file(FILE *)
Construction of an EOS from a binary file.
virtual ~Eos_bifluid()
Destructor.
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 =0
Comparison operator (egality).
double m_1
Individual particle mass [unit: ].
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...
double get_m2() const
Return the individual particule mass .
virtual bool operator!=(const Eos_bifluid &) const =0
Comparison operator (difference).
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).
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) .
virtual int identify() const =0
Returns a number to identify the sub-classe of Eos_bifluid the object belongs to.
virtual double get_K22(const double n1, const double n2, const double x) const =0
Computes the derivative of the energy/(baryonic density 2) .
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) .
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) .
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 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.
string get_name() const
Returns the EOS name.
virtual Eos * trans2Eos() const =0
Makes a translation from Eos_bifluid to Eos .
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.
virtual double get_K12(const double n1, const double n2, const double x) const =0
Computes the derivative of the energy with respect to .
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.
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.
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 .
friend ostream & operator<<(ostream &, const Eos_bifluid &)
Display.
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...
void operator=(const Eos_bifluid &)
Assignment to another Eos_bifluid.
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 m_2
Individual particle mass [unit: ].
Eos_bifluid()
Standard constructor.
Polytropic equation of state (relativistic case).
Equation of state base class.
Coord x
x coordinate centered on the grid