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,
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,
961 double relax=0.5,
double precis = 1.e-9,
962 double ecart = 1.e-8) ;
1053 int get_typeos()
const {
return typeos;};
1059 void set_auxiliary() ;
1062 void determine_type() ;
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,
1320 double relax=0.5,
double precis = 1.e-9,
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 ;
1768 void calcule_interpol(
const Cmp& ent1,
const Cmp& ent2,
const Cmp& delta2,
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,
1885 const double delta_car)
const ;
1897 virtual double press_ent_p(
const double ent1,
const double ent2,
1898 const double delta_car)
const ;
1907 virtual double press_ent_p1(
const double ent1)
const ;
1914 virtual double press_ent_p2(
const double ent2)
const ;
1928 virtual double alpha_ent_p(
const double ent1,
const double ent2,
1929 const double delta_car)
const ;
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 double get_K12(const double n1, const double n2, const double x) const =0
Computes the derivative of the energy with respect to .
double get_m2() const
Return the individual particule mass .
virtual bool operator!=(const Eos_bifluid &) const =0
Comparison operator (difference)
virtual void sauve(FILE *) const
Save in a file.
virtual double get_K22(const double n1, const double n2, const double x) const =0
Computes the derivative of the energy/(baryonic density 2) .
double m_1
Individual particle mass [unit: ].
double get_gam5() const
Returns the adiabatic index .
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
double kap2
Pressure coefficient , see Eq.
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.
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...
Tbl * d3lpsdlent1dlent2ddelta_car
if necessary for the interpolation to find alpha (derivee seconde croisee) ie, if it's possible to ca...
Tbl * logent2
Table of where .
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 relax
Parameters needed for some inversions of the EOS.
double get_kap2() const
Returns the pressure coefficient [unit: ], where .
Tbl * d2lpsdlent2ddelta_car
Table of .
Equation of state base class.
virtual int identify() const =0
Returns a number to identify the sub-classe of Eos_bifluid the object belongs to. ...
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.
Analytic equation of state for two fluids (relativistic case).
double ent1_min
Lower boundary of the log-enthalpy interval (fluid 1 = n)
double get_kap3() const
Returns the pressure coefficient [unit: ], where .
Tbl * dlpsdlent1
Table of .
void operator=(const Eos_bifluid &)
Assignment to another Eos_bifluid.
Tbl * logent1
Table of where .
double ecart
contains the precision required in the relaxation nbar_ent_p
Tbl * d2lpsdlent1ddelta_car
Table of .
2-fluids equation of state base class.
int typeos
The bi-fluid analytical EOS type:
double get_gam4() const
Returns the adiabatic index .
double beta
Coefficient , see Eq.
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_gam1() const
Returns the adiabatic index .
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) .
static Eos_bifluid * eos_from_file(FILE *)
Construction of an EOS from a binary file.
double m_2
Individual particle mass [unit: ].
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 bool operator==(const Eos_bifluid &) const =0
Comparison operator (egality)
Tbl * dlpsddelta_car
Table of .
virtual Eos * trans2Eos() const =0
Makes a translation from Eos_bifluid to Eos .
Eos_bifluid()
Standard constructor.
double ent2_max
Upper boundary of the log-enthalpy interval (fluid 2 = p)
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.
double get_kap1() const
Returns the pressure coefficient [unit: ], where .
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...
double kap3
Pressure coefficient , see Eq.
double delta_car_min
Lower boundary of the relative velocity interval –> 0 ?
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...
Tbl * d2lpsdlent1dlent1
Table of .
Analytic equation of state for two fluids (Newtonian case).
double get_gam2() const
Returns the adiabatic index .
double ent1_max
Upper boundary of the log-enthalpy interval (fluid 1 = n)
friend ostream & operator<<(ostream &, const Eos_bifluid &)
Display.
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...
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 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.
double precis
contains the precision required in zerosec_b
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...
double get_gam6() const
Returns the adiabatic index .
double get_beta() const
Returns the coefficient [unit: ], where .
Tbl * dlpsdlent2
Table of .
Tbl * delta_car
Table of .
virtual ~Eos_bifluid()
Destructor.
string get_name() const
Returns the EOS name.
Tbl * d2lpsdlent2dlent2
Table of .
double gam5
Adiabatic indexes , see Eq.~eeosbfpolye}.
Class for a two-fluid (tabulated) equation of state.
Tbl * d2lpsdlent1dlent2
Table of .
double kap1
Pressure coefficient , see Eq.
double delta_car_max
Upper boundary of the relative velocity interval –> 1 ?
virtual ostream & operator>>(ostream &) const =0
Operator >>
double ent2_min
Lower boundary of the log-enthalpy interval (fluid 2 = p)
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 .
string tablename
Name of the file containing the tabulated data (be careful, Eos_bifluid uses char*) ...
double gam1
Adiabatic indexes , see Eq.~eeosbfpolye}.
double get_gam3() const
Returns the adiabatic index .
double gam6
Adiabatic indexes , see Eq.~eeosbfpolye}.
double gam3
Adiabatic indexes , see Eq.~eeosbfpolye}.
double get_m1() const
Return the individual particule mass .
double gam4
Adiabatic indexes , see Eq.~eeosbfpolye}.
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).
double gam2
Adiabatic indexes , see Eq.~eeosbfpolye}.