Analytic equation of state for two fluids (relativistic case). More...
#include <eos_bifluid.h>
Public Member Functions | |
Eos_bf_poly (double kappa1, double kappa2, double kappa3, double beta) | |
Standard constructor. | |
Eos_bf_poly (double gamma1, double gamma2, double gamma3, double gamma4, double gamma5, double gamma6, double kappa1, double kappa2, double kappa3, double beta, double mass1=1, double mass2=1, double relax=0.5, double precis=1.e-9, double ecart=1.e-8) | |
Standard constructor with all parameters. | |
Eos_bf_poly (const Eos_bf_poly &) | |
Copy constructor. | |
virtual | ~Eos_bf_poly () |
Destructor. | |
void | operator= (const Eos_bf_poly &) |
Assignment to another Eos_bf_poly . | |
virtual bool | operator== (const Eos_bifluid &) const |
Comparison operator (egality). | |
virtual bool | operator!= (const Eos_bifluid &) const |
Comparison operator (difference). | |
virtual int | identify () const |
Returns a number to identify the sub-classe of Eos_bifluid the object belongs to. | |
double | get_gam1 () const |
Returns the adiabatic index ![]() | |
double | get_gam2 () const |
Returns the adiabatic index ![]() | |
double | get_gam3 () const |
Returns the adiabatic index ![]() | |
double | get_gam4 () const |
Returns the adiabatic index ![]() | |
double | get_gam5 () const |
Returns the adiabatic index ![]() | |
double | get_gam6 () const |
Returns the adiabatic index ![]() | |
double | get_kap1 () const |
Returns the pressure coefficient ![]() ![]() ![]() | |
double | get_kap2 () const |
Returns the pressure coefficient ![]() ![]() ![]() | |
double | get_kap3 () const |
Returns the pressure coefficient ![]() ![]() ![]() | |
double | get_beta () const |
Returns the coefficient ![]() ![]() ![]() | |
int | get_typeos () const |
virtual void | sauve (FILE *) const |
Save in a file. | |
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 | nbar_ent_p1 (const double ent1) const |
Computes baryon density out of the log-enthalpy asuming that only fluid 1 is present. | |
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 Eos * | trans2Eos () const |
Makes a translation from Eos_bifluid to Eos . | |
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 ![]() | |
virtual double | get_K22 (const double n1, const double n2, const double delta2) const |
Computes the derivative of the energy/(baryonic density 2)![]() | |
string | get_name () const |
Returns the EOS name. | |
double | get_m1 () const |
Return the individual particule mass ![]() | |
double | get_m2 () const |
Return the individual particule mass ![]() | |
virtual bool | operator== (const Eos_bifluid &) const =0 |
Comparison operator (egality). | |
virtual bool | operator!= (const Eos_bifluid &) const =0 |
Comparison operator (difference). | |
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 profiles. | |
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. | |
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 | 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 | 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)![]() | |
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 (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 ![]() | |
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 (![]() | |
Static Public Member Functions | |
static Eos_bifluid * | eos_from_file (FILE *) |
Construction of an EOS from a binary file. | |
static Eos_bifluid * | eos_from_file (const char *fname) |
Construction of an EOS from a formatted file. | |
Protected Member Functions | |
Eos_bf_poly (FILE *) | |
Constructor from a binary file (created by the function sauve(FILE*) ). | |
Eos_bf_poly (const char *fname) | |
Constructor from a formatted file. | |
void | set_auxiliary () |
Computes the auxiliary quantities gam1m1 , gam2m1 and gam3m1 . | |
void | determine_type () |
Determines the type of the analytical EOS (see typeos ). | |
virtual ostream & | operator>> (ostream &) const |
Operator >>. | |
Protected Attributes | |
double | gam1 |
Adiabatic indexes ![]() | |
double | gam2 |
Adiabatic indexes ![]() | |
double | gam3 |
Adiabatic indexes ![]() | |
double | gam4 |
Adiabatic indexes ![]() | |
double | gam5 |
Adiabatic indexes ![]() | |
double | gam6 |
Adiabatic indexes ![]() | |
double | kap1 |
Pressure coefficient ![]() | |
double | kap2 |
Pressure coefficient ![]() | |
double | kap3 |
Pressure coefficient ![]() | |
double | beta |
Coefficient ![]() | |
double | gam1m1 |
![]() | |
double | gam2m1 |
![]() | |
double | gam34m1 |
![]() | |
double | gam56m1 |
![]() | |
int | typeos |
The bi-fluid analytical EOS type:. | |
double | relax |
Parameters needed for some inversions of the EOS. | |
double | precis |
contains the precision required in zerosec_b | |
double | ecart |
contains the precision required in the relaxation nbar_ent_p | |
string | name |
EOS name. | |
double | m_1 |
Individual particle mass ![]() ![]() | |
double | m_2 |
Individual particle mass ![]() ![]() | |
Friends | |
Eos_bifluid * | Eos_bifluid::eos_from_file (FILE *) |
The construction functions from a file. | |
Eos_bifluid * | Eos_bifluid::eos_from_file (const char *fname) |
ostream & | operator<< (ostream &, const Eos_bifluid &) |
Display. |
Analytic equation of state for two fluids (relativistic case).
This equation of state (EOS) corresponds to two types of relativistic particles of rest mass is and
, whose total energy density
is related to their numerical densities
,
and relative velocity
( and
being the 4-velocities of both fluids), by
The relativistic (i.e. including rest mass energy) chemical potentials are then
The pressure is given by the (zero-temperature) First Law of Thermodynamics: , so that
The log-enthalpies are defined as the logarithm of the ratio of the enthalpy per particle (see Eq.~eeosbfdefent}) by the particle rest mass energy :
From this system, the particle densities are obtained in term of the log-enthalpies. (The system (eeosbfentanal}) is a linear one if and
).
The energy density and pressure p can then be obtained as functions of baryonic densities. ()
Definition at line 673 of file eos_bifluid.h.
Eos_bf_poly::Eos_bf_poly | ( | double | kappa1, | |
double | kappa2, | |||
double | kappa3, | |||
double | beta | |||
) |
Standard constructor.
The adiabatic indexes and
are set to 2. All other adiabatic indexes
,
are set to 1. The individual particle masses
and
are set to the mean baryon mass
. The inversion parameters are set to their default values (see hereafter the consrtuctor with all parameters).
kappa1 | pressure coefficient ![]() | |
kappa2 | pressure coefficient ![]() | |
kappa3 | pressure coefficient ![]() | |
beta | coefficient in the entrainment term ![]() ![]() ![]() |
Definition at line 152 of file eos_bf_poly.C.
References determine_type(), and set_auxiliary().
Eos_bf_poly::Eos_bf_poly | ( | double | gamma1, | |
double | gamma2, | |||
double | gamma3, | |||
double | gamma4, | |||
double | gamma5, | |||
double | gamma6, | |||
double | kappa1, | |||
double | kappa2, | |||
double | kappa3, | |||
double | beta, | |||
double | mass1 = 1 , |
|||
double | mass2 = 1 , |
|||
double | relax = 0.5 , |
|||
double | precis = 1.e-9 , |
|||
double | ecart = 1.e-8 | |||
) |
Standard constructor with all parameters.
gamma1 | adiabatic index ![]() | |
gamma2 | adiabatic index ![]() | |
gamma3 | adiabatic index ![]() | |
gamma4 | adiabatic index ![]() | |
gamma5 | adiabatic index ![]() | |
gamma6 | adiabatic index ![]() | |
kappa1 | pressure coefficient ![]() | |
kappa2 | pressure coefficient ![]() | |
kappa3 | pressure coefficient ![]() | |
beta | coefficient in the entrainment term ![]() ![]() ![]() | |
mass1 | individual particule mass ![]() | |
mass2 | individual particule mass ![]() ![]() | |
relax | relaxation parameter (see par_inv ) | |
precis | precision parameter for zerosec_b (see par_inv ) | |
relax | precision parameter for relaxation procedure (see par_inv ) |
Definition at line 166 of file eos_bf_poly.C.
References determine_type(), and set_auxiliary().
Eos_bf_poly::Eos_bf_poly | ( | const Eos_bf_poly & | eosi | ) |
Eos_bf_poly::Eos_bf_poly | ( | FILE * | fich | ) | [protected] |
Constructor from a binary file (created by the function sauve(FILE*)
).
This constructor is protected because any EOS construction from a binary file must be done via the function Eos_bifluid::eos_from_file(FILE*)
.
Definition at line 200 of file eos_bf_poly.C.
References beta, determine_type(), ecart, fread_be(), gam1, gam2, gam3, gam4, gam5, gam6, kap1, kap2, kap3, precis, relax, and set_auxiliary().
Eos_bf_poly::Eos_bf_poly | ( | const char * | fname | ) | [protected] |
Constructor from a formatted file.
This constructor is protected because any EOS construction from a formatted file must be done via the function Eos_bifluid::eos_from_file(const char*)
.
Definition at line 226 of file eos_bf_poly.C.
References beta, determine_type(), ecart, gam1, gam2, gam3, gam4, gam5, gam6, kap1, kap2, kap3, precis, read_variable(), relax, set_auxiliary(), and typeos.
Eos_bf_poly::~Eos_bf_poly | ( | ) | [virtual] |
Destructor.
Definition at line 280 of file eos_bf_poly.C.
void Eos_bifluid::calcule | ( | const Cmp & | nbar1, | |
const Cmp & | nbar2, | |||
const Cmp & | x2, | |||
int | nzet, | |||
int | l_min, | |||
double(Eos_bifluid::*)(double, double, double) const | fait, | |||
Cmp & | resu | |||
) | const [inherited] |
General computational method for Cmp
's ('s).
nbar1 | [input, unit ![]() | |
nbar2 | [input, unit ![]() | |
x2 | [input, unit ![]() ![]() | |
nzet | [input] number of domains where resu is to be computed. | |
l_min | [input] index of the innermost domain is which resu is to be computed [default value: 0]; resu is computed only in domains whose indices are in [l_min,l_min+nzet-1] . In the other domains, it is set to zero. | |
fait | [input] pointer on the member function of class Eos_bifluid which performs the pointwise calculation. | |
resu | [output] result of the computation. |
Definition at line 619 of file eos_bifluid.C.
References Cmp::annule(), Valeur::c, Valeur::coef_i(), Tbl::get_etat(), Cmp::get_etat(), Cmp::get_mp(), Mg3d::get_nzone(), Tbl::get_taille(), Valeur::set_etat_c_qcq(), Tbl::set_etat_qcq(), Mtbl::set_etat_qcq(), Cmp::set_etat_qcq(), Cmp::set_etat_zero(), Tbl::t, Mtbl::t, and Cmp::va.
void Eos_bifluid::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 [inherited] |
General computational method for Cmp
's, it computes both baryon densities, energy and pressure profiles.
ent1 | [input] the first log-enthalpy field ![]() | |
ent2 | [input] the second log-enthalpy field ![]() | |
delta2 | [input] the relative velocity field ![]() | |
nbar1 | [output] baryonic density of the first fluid | |
nbar2 | [output] baryonic density of the second fluid [unit: ![]() | |
ener | [output] total energy density ![]() | |
press | [output] pressure p of both fluids together | |
nzet | [input] number of domains where resu is to be computed. | |
l_min | [input] index of the innermost domain is which resu is to be computed [default value: 0]; resu is computed only in domains whose indices are in [l_min,l_min+nzet-1] . In the other domains, it is set to zero. |
Definition at line 246 of file eos_bifluid.C.
References Cmp::allocate_all(), Cmp::annule(), Eos_bifluid::ener_nbar_p(), Cmp::get_etat(), Cmp::get_mp(), Mg3d::get_nzone(), Eos_bifluid::identify(), Eos_bifluid::nbar_ent_p(), Eos_bifluid::nbar_ent_p1(), Eos_bifluid::nbar_ent_p2(), Eos_bifluid::press_nbar_p(), Cmp::set(), and Cmp::set_etat_zero().
void Eos_bf_poly::determine_type | ( | ) | [protected] |
Cmp Eos_bifluid::ener_ent | ( | const Cmp & | ent1, | |
const Cmp & | ent2, | |||
const Cmp & | delta2, | |||
int | nzet, | |||
int | l_min = 0 | |||
) | const [inherited] |
Computes the total energy density from the log-enthalpy fields and the relative velocity.
ent1 | [input, unit: ![]() ![]() | |
ent2 | [input, unit: ![]() ![]() | |
delta2 | [input, unit: ![]() ![]() | |
nzet | number of domains where the energy density is to be computed. | |
l_min | index of the innermost domain is which the energy density is to be computed [default value: 0]; the energy density is computed only in domains whose indices are in [l_min,l_min+nzet-1] . In the other domains, it is set to zero. |
Definition at line 462 of file eos_bifluid.C.
References Eos_bifluid::ener_nbar_p(), Cmp::get_etat(), Map::get_mg(), Cmp::get_mp(), Mg3d::get_nzone(), Eos_bifluid::nbar_ent_p(), Eos_bifluid::nbar_ent_p1(), and Eos_bifluid::nbar_ent_p2().
double Eos_bf_poly::ener_nbar_p | ( | const double | nbar1, | |
const double | nbar2, | |||
const double | delta2 | |||
) | const [virtual] |
Computes the total energy density from the baryonic densities and the relative velocity.
nbar1 | [input] baryonic density of the first fluid | |
nbar2 | [input] baryonic density of the second fluid [unit: ![]() | |
delta2 | [input, unit: ![]() ![]() |
Implements Eos_bifluid.
Reimplemented in Eos_bf_poly_newt.
Definition at line 884 of file eos_bf_poly.C.
References beta, gam1, gam2, gam3, gam4, gam5, gam6, kap1, kap2, kap3, Eos_bifluid::m_1, Eos_bifluid::m_2, and pow().
Eos_bifluid * Eos_bifluid::eos_from_file | ( | const char * | fname | ) | [static, inherited] |
Construction of an EOS from a formatted file.
The following field has to be present:\ ident: [int] identifying the type of 2-fluid EOS 1 = relativistic polytropic EOS (class Eos_bf_poly
). \ 2 = Newtonian polytropic EOS (class Eos_bf_poly_newt
).
Definition at line 126 of file eos_bf_file.C.
References read_variable().
Eos_bifluid * Eos_bifluid::eos_from_file | ( | FILE * | fich | ) | [static, inherited] |
Construction of an EOS from a binary file.
The file must have been created by the function sauve(FILE*)
.
Definition at line 94 of file eos_bf_file.C.
References fread_be().
double Eos_bf_poly::get_beta | ( | ) | const [inline] |
Returns the coefficient [unit:
], where
.
Definition at line 909 of file eos_bifluid.h.
References beta.
double Eos_bf_poly::get_gam1 | ( | ) | const [inline] |
double Eos_bf_poly::get_gam2 | ( | ) | const [inline] |
double Eos_bf_poly::get_gam3 | ( | ) | const [inline] |
double Eos_bf_poly::get_gam4 | ( | ) | const [inline] |
double Eos_bf_poly::get_gam5 | ( | ) | const [inline] |
double Eos_bf_poly::get_gam6 | ( | ) | const [inline] |
double Eos_bf_poly::get_K11 | ( | const double | n1, | |
const double | n2, | |||
const double | delta2 | |||
) | const [virtual] |
Computes the derivative of the energy with respect to (baryonic density 1).
n1 | [input, unit ![]() | |
n2 | [input, unit ![]() | |
x | [input, unit ![]() ![]() |
Implements Eos_bifluid.
Reimplemented in Eos_bf_poly_newt.
Definition at line 925 of file eos_bf_poly.C.
References beta, gam1, gam3, gam4, gam5, gam6, kap1, kap3, Eos_bifluid::m_1, and pow().
double Eos_bf_poly::get_K12 | ( | const double | n1, | |
const double | n2, | |||
const double | delta2 | |||
) | const [virtual] |
Computes the derivative of the energy with respect to .
n1 | [input, unit ![]() | |
n2 | [input, unit ![]() | |
x | [input, unit ![]() ![]() |
Implements Eos_bifluid.
Reimplemented in Eos_bf_poly_newt.
Definition at line 955 of file eos_bf_poly.C.
double Eos_bf_poly::get_K22 | ( | const double | n1, | |
const double | n2, | |||
const double | delta2 | |||
) | const [virtual] |
Computes the derivative of the energy/(baryonic density 2).
n1 | [input, unit ![]() | |
n2 | [input, unit ![]() | |
x | [input, unit ![]() ![]() |
Implements Eos_bifluid.
Reimplemented in Eos_bf_poly_newt.
Definition at line 940 of file eos_bf_poly.C.
References beta, gam2, gam3, gam4, gam5, gam6, kap2, kap3, Eos_bifluid::m_2, and pow().
double Eos_bf_poly::get_kap1 | ( | ) | const [inline] |
Returns the pressure coefficient [unit:
], where
.
Definition at line 891 of file eos_bifluid.h.
References kap1.
double Eos_bf_poly::get_kap2 | ( | ) | const [inline] |
Returns the pressure coefficient [unit:
], where
.
Definition at line 897 of file eos_bifluid.h.
References kap2.
double Eos_bf_poly::get_kap3 | ( | ) | const [inline] |
Returns the pressure coefficient [unit:
], where
.
Definition at line 903 of file eos_bifluid.h.
References kap3.
Cmp Eos_bifluid::get_Knn | ( | const Cmp & | nbar1, | |
const Cmp & | nbar2, | |||
const Cmp & | x2, | |||
int | nzet, | |||
int | l_min = 0 | |||
) | const [inherited] |
Computes the derivatives of the energy/(baryonic density 1).
nbar1 | [input, unit ![]() | |
nbar2 | [input, unit ![]() | |
x2 | [input, unit ![]() ![]() | |
nzet | number of domains where the derivatives are to be computed. | |
l_min | index of the innermost domain is which the derivatives are to be computed [default value: 0]; the derivatives are computed only in domains whose indices are in [l_min,l_min+nzet-1] . In the other domains, it is set to zero. |
get_K11
) Definition at line 706 of file eos_bifluid.C.
References Eos_bifluid::calcule(), Eos_bifluid::get_K11(), and Cmp::get_mp().
Cmp Eos_bifluid::get_Knp | ( | const Cmp & | nbar1, | |
const Cmp & | nbar2, | |||
const Cmp & | x2, | |||
int | nzet, | |||
int | l_min = 0 | |||
) | const [inherited] |
Computes the derivatives of the energy with respect to .
nbar1 | [input, unit ![]() | |
nbar2 | [input, unit ![]() | |
x2 | [input, unit ![]() ![]() | |
nzet | number of domains where the derivatives are to be computed. | |
l_min | index of the innermost domain is which the derivatives are to be computed [default value: 0]; the derivatives are computed only in domains whose indices are in [l_min,l_min+nzet-1] . In the other domains, it is set to zero. |
get_K12
) Definition at line 717 of file eos_bifluid.C.
References Eos_bifluid::calcule(), Eos_bifluid::get_K12(), and Cmp::get_mp().
Cmp Eos_bifluid::get_Kpp | ( | const Cmp & | nbar1, | |
const Cmp & | nbar2, | |||
const Cmp & | x2, | |||
int | nzet, | |||
int | l_min = 0 | |||
) | const [inherited] |
Computes the derivatives of the energy/(baryonic density 2).
nbar1 | [input, unit ![]() | |
nbar2 | [input, unit ![]() | |
x2 | [input, unit ![]() ![]() | |
nzet | number of domains where the derivatives are to be computed. | |
l_min | index of the innermost domain is which the derivatives are to be computed [default value: 0]; the derivatives are computed only in domains whose indices are in [l_min,l_min+nzet-1] . In the other domains, it is set to zero. |
get_K12
) Definition at line 728 of file eos_bifluid.C.
References Eos_bifluid::calcule(), Eos_bifluid::get_K22(), and Cmp::get_mp().
double Eos_bifluid::get_m1 | ( | ) | const [inline, inherited] |
Return the individual particule mass .
[unit: ].
Definition at line 234 of file eos_bifluid.h.
References Eos_bifluid::m_1.
double Eos_bifluid::get_m2 | ( | ) | const [inline, inherited] |
Return the individual particule mass .
[unit: ].
Definition at line 240 of file eos_bifluid.h.
References Eos_bifluid::m_2.
string Eos_bifluid::get_name | ( | ) | const [inline, inherited] |
int Eos_bf_poly::identify | ( | ) | const [virtual] |
Returns a number to identify the sub-classe of Eos_bifluid
the object belongs to.
Implements Eos_bifluid.
Reimplemented in Eos_bf_poly_newt.
Definition at line 85 of file eos_bf_file.C.
void Eos_bifluid::nbar_ent | ( | const Cmp & | ent1, | |
const Cmp & | ent2, | |||
const Cmp & | delta2, | |||
Cmp & | nbar1, | |||
Cmp & | nbar2, | |||
int | nzet, | |||
int | l_min = 0 | |||
) | const [inherited] |
Computes both baryon density fields from the log-enthalpy fields and the relative velocity.
ent1 | [input, unit: ![]() ![]() | |
ent2 | [input, unit: ![]() ![]() | |
delta2 | [input, unit: ![]() ![]() | |
nbar1 | [output] baryonic density of the first fluid | |
nbar2 | [output] baryonic density of the second fluid [unit: ![]() | |
nzet | number of domains where the baryon density is to be computed. | |
l_min | index of the innermost domain is which the baryon density is to be computed [default value: 0]; the baryon density is computed only in domains whose indices are in [l_min,l_min+nzet-1] . In the other domains, it is set to zero. |
Definition at line 374 of file eos_bifluid.C.
References Cmp::allocate_all(), Cmp::annule(), Cmp::get_etat(), Cmp::get_mp(), Mg3d::get_nzone(), Eos_bifluid::nbar_ent_p(), Eos_bifluid::nbar_ent_p1(), Eos_bifluid::nbar_ent_p2(), Cmp::set(), and Cmp::set_etat_zero().
bool Eos_bf_poly::nbar_ent_p | ( | const double | ent1, | |
const double | ent2, | |||
const double | delta2, | |||
double & | nbar1, | |||
double & | nbar2 | |||
) | const [virtual] |
Computes both baryon densities from the log-enthalpies.
ent1 | [input, unit: ![]() ![]() | |
ent2 | [input, unit: ![]() ![]() | |
delta2 | [input, unit: ![]() ![]() | |
nbar1 | [output] baryonic density of the first fluid | |
nbar2 | [output] baryonic density of the second fluid [unit: ![]() |
Implements Eos_bifluid.
Reimplemented in Eos_bf_poly_newt.
Definition at line 502 of file eos_bf_poly.C.
References Param::add_double(), Param::add_double_mod(), beta, ecart, exp(), gam1, gam1m1, gam2, gam2m1, gam3, gam4, gam5, gam6, Param::get_double_mod(), kap1, kap2, kap3, log(), Eos_bifluid::m_1, Eos_bifluid::m_2, pow(), precis, relax, sqrt(), typeos, and zerosec_b().
double Eos_bf_poly::nbar_ent_p1 | ( | const double | ent1 | ) | const [virtual] |
Computes baryon density out of the log-enthalpy asuming that only fluid 1 is present.
ent1 | [input, unit: ![]() ![]() |
Implements Eos_bifluid.
Reimplemented in Eos_bf_poly_newt.
Definition at line 873 of file eos_bf_poly.C.
References exp(), gam1, gam1m1, kap1, and Eos_bifluid::m_1.
double Eos_bf_poly::nbar_ent_p2 | ( | const double | ent2 | ) | const [virtual] |
Computes baryon density out of the log-enthalpy assuming that only fluid 2 is present.
ent2 | [input, unit: ![]() ![]() |
Implements Eos_bifluid.
Reimplemented in Eos_bf_poly_newt.
Definition at line 877 of file eos_bf_poly.C.
References exp(), gam2, gam2m1, kap2, and Eos_bifluid::m_2.
virtual bool Eos_bifluid::operator!= | ( | const Eos_bifluid & | ) | const [pure virtual, inherited] |
Comparison operator (difference).
bool Eos_bf_poly::operator!= | ( | const Eos_bifluid & | eos_i | ) | const [virtual] |
Comparison operator (difference).
Reimplemented in Eos_bf_poly_newt.
Definition at line 436 of file eos_bf_poly.C.
References operator==().
void Eos_bf_poly::operator= | ( | const Eos_bf_poly & | eosi | ) |
Assignment to another Eos_bf_poly
.
Reimplemented from Eos_bifluid.
Reimplemented in Eos_bf_poly_newt.
Definition at line 289 of file eos_bf_poly.C.
References beta, ecart, gam1, gam2, gam3, kap1, kap2, kap3, precis, relax, set_auxiliary(), and typeos.
virtual bool Eos_bifluid::operator== | ( | const Eos_bifluid & | ) | const [pure virtual, inherited] |
Comparison operator (egality).
bool Eos_bf_poly::operator== | ( | const Eos_bifluid & | eos_i | ) | const [virtual] |
Comparison operator (egality).
Reimplemented in Eos_bf_poly_newt.
Definition at line 381 of file eos_bf_poly.C.
References beta, gam1, gam2, gam3, gam4, gam5, gam6, identify(), Eos_bifluid::identify(), kap1, kap2, kap3, Eos_bifluid::m_1, and Eos_bifluid::m_2.
ostream & Eos_bf_poly::operator>> | ( | ostream & | ost | ) | const [protected, virtual] |
Cmp Eos_bifluid::press_ent | ( | const Cmp & | ent1, | |
const Cmp & | ent2, | |||
const Cmp & | delta2, | |||
int | nzet, | |||
int | l_min = 0 | |||
) | const [inherited] |
Computes the pressure from the log-enthalpy fields and the relative velocity.
ent1 | [input, unit: ![]() ![]() | |
ent2 | [input, unit: ![]() ![]() | |
delta2 | [input, unit: ![]() ![]() | |
nzet | number of domains where the pressure is to be computed. | |
l_min | index of the innermost domain is which the pressure is to be computed [default value: 0]; the pressure is computed only in domains whose indices are in [l_min,l_min+nzet-1] . In the other domains, it is set to zero. |
Definition at line 542 of file eos_bifluid.C.
References Cmp::get_etat(), Map::get_mg(), Cmp::get_mp(), Mg3d::get_nzone(), Eos_bifluid::nbar_ent_p(), Eos_bifluid::nbar_ent_p1(), Eos_bifluid::nbar_ent_p2(), and Eos_bifluid::press_nbar_p().
double Eos_bf_poly::press_nbar_p | ( | const double | nbar1, | |
const double | nbar2, | |||
const double | delta2 | |||
) | const [virtual] |
Computes the pressure from the baryonic densities and the relative velocity.
nbar1 | [input] baryonic density of the first fluid | |
nbar2 | [input] baryonic density of the second fluid [unit: ![]() | |
delta2 | [input, unit: ![]() ![]() |
Implements Eos_bifluid.
Reimplemented in Eos_bf_poly_newt.
Definition at line 904 of file eos_bf_poly.C.
References beta, gam1, gam1m1, gam2, gam2m1, gam3, gam34m1, gam4, gam5, gam56m1, gam6, kap1, kap2, kap3, and pow().
void Eos_bf_poly::sauve | ( | FILE * | fich | ) | const [virtual] |
Save in a file.
Reimplemented from Eos_bifluid.
Reimplemented in Eos_bf_poly_newt.
Definition at line 447 of file eos_bf_poly.C.
References beta, ecart, fwrite_be(), gam1, gam2, gam3, gam4, gam5, gam6, kap1, kap2, kap3, precis, and relax.
void Eos_bf_poly::set_auxiliary | ( | ) | [protected] |
Eos * Eos_bf_poly::trans2Eos | ( | ) | const [virtual] |
Makes a translation from Eos_bifluid
to Eos
.
This is only useful for the construction of a Et_rot_bifluid
star and ought not to be used in other situations.
Implements Eos_bifluid.
Reimplemented in Eos_bf_poly_newt.
Definition at line 970 of file eos_bf_poly.C.
References gam1, kap1, and Eos_bifluid::m_1.
Eos_bifluid* Eos_bifluid::eos_from_file | ( | FILE * | ) | [friend] |
The construction functions from a file.
Reimplemented in Eos_bf_poly_newt.
ostream& operator<< | ( | ostream & | , | |
const Eos_bifluid & | ||||
) | [friend, inherited] |
Display.
double Eos_bf_poly::beta [protected] |
Coefficient , see Eq.
~eeosbfpolye} [unit: ], where
and
.
Definition at line 723 of file eos_bifluid.h.
double Eos_bf_poly::ecart [protected] |
contains the precision required in the relaxation nbar_ent_p
Definition at line 763 of file eos_bifluid.h.
double Eos_bf_poly::gam1 [protected] |
Adiabatic indexes , see Eq.~eeosbfpolye}.
Definition at line 680 of file eos_bifluid.h.
double Eos_bf_poly::gam1m1 [protected] |
Definition at line 725 of file eos_bifluid.h.
double Eos_bf_poly::gam2 [protected] |
Adiabatic indexes , see Eq.~eeosbfpolye}.
Definition at line 683 of file eos_bifluid.h.
double Eos_bf_poly::gam2m1 [protected] |
Definition at line 726 of file eos_bifluid.h.
double Eos_bf_poly::gam3 [protected] |
Adiabatic indexes , see Eq.~eeosbfpolye}.
Definition at line 686 of file eos_bifluid.h.
double Eos_bf_poly::gam34m1 [protected] |
Definition at line 727 of file eos_bifluid.h.
double Eos_bf_poly::gam4 [protected] |
Adiabatic indexes , see Eq.~eeosbfpolye}.
Definition at line 689 of file eos_bifluid.h.
double Eos_bf_poly::gam5 [protected] |
Adiabatic indexes , see Eq.~eeosbfpolye}.
Definition at line 692 of file eos_bifluid.h.
double Eos_bf_poly::gam56m1 [protected] |
Definition at line 728 of file eos_bifluid.h.
double Eos_bf_poly::gam6 [protected] |
Adiabatic indexes , see Eq.~eeosbfpolye}.
Definition at line 695 of file eos_bifluid.h.
double Eos_bf_poly::kap1 [protected] |
Pressure coefficient , see Eq.
~eeosbfpolye} [unit: ], where
and
.
Definition at line 702 of file eos_bifluid.h.
double Eos_bf_poly::kap2 [protected] |
Pressure coefficient , see Eq.
~eeosbfpolye} [unit: ], where
and
.
Definition at line 709 of file eos_bifluid.h.
double Eos_bf_poly::kap3 [protected] |
Pressure coefficient , see Eq.
~eeosbfpolye} [unit: ], where
and
.
Definition at line 716 of file eos_bifluid.h.
double Eos_bifluid::m_1 [protected, inherited] |
Individual particle mass [unit:
].
Definition at line 171 of file eos_bifluid.h.
double Eos_bifluid::m_2 [protected, inherited] |
Individual particle mass [unit:
].
Definition at line 176 of file eos_bifluid.h.
string Eos_bifluid::name [protected, inherited] |
EOS name.
Definition at line 166 of file eos_bifluid.h.
double Eos_bf_poly::precis [protected] |
contains the precision required in zerosec_b
Definition at line 760 of file eos_bifluid.h.
double Eos_bf_poly::relax [protected] |
Parameters needed for some inversions of the EOS.
In particular, it is used for type 4 EOS: contains the relaxation parameter needed in the iteration
Definition at line 758 of file eos_bifluid.h.
int Eos_bf_poly::typeos [protected] |
The bi-fluid analytical EOS type:.
0 - and
. In this case, the EOS can be inverted analytically.
1 - , but
or
.
2 - , but none of the previous cases.
3 - , but none of the previous cases.
4 - None of the previous cases (the most general)
5 - special case of comparison to slow-rotation approximation: this is identical to typeos=0, but using a modified EOS-inversion method, namely we don't switch to a 1-fluid EOS in 1-fluid regions.
Definition at line 752 of file eos_bifluid.h.