eos_bifluid.h
/*
* Definition of Lorene classes Eos_bifluid
* Eos_bf_poly
* Eos_bf_tabul
*/
/*
* Copyright (c) 2001-2002 Jerome Novak
*
* This file is part of LORENE.
*
* LORENE is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* LORENE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LORENE; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef __EOS_BIFLUID_H_
#define __EOS_BIFLUID_H_
/*
* $Id: eos_bifluid.h,v 1.22 2015/06/26 14:10:08 j_novak Exp $
* $Log: eos_bifluid.h,v $
* Revision 1.22 2015/06/26 14:10:08 j_novak
* Modified comments.
*
* Revision 1.21 2015/06/11 13:50:18 j_novak
* Minor corrections
*
* Revision 1.20 2015/06/10 14:39:17 a_sourie
* New class Eos_bf_tabul for tabulated 2-fluid EoSs and associated functions for the computation of rotating stars with such EoSs.
*
* Revision 1.19 2014/10/13 08:52:33 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.18 2014/04/25 10:43:50 j_novak
* The member 'name' is of type string now. Correction of a few const-related issues.
*
* Revision 1.17 2004/09/01 09:49:46 r_prix
* adapted to change in read_variable() for strings
*
* Revision 1.16 2004/03/22 13:12:41 j_novak
* Modification of comments to use doxygen instead of doc++
*
* Revision 1.15 2004/01/30 13:21:29 r_prix
* add documentation about 'special' 2-fluid typeos=5: == type0 + slow-rot style inversion
*
* Revision 1.14 2003/12/17 23:12:30 r_prix
* replaced use of C++ <string> by standard ANSI char* to be backwards compatible
* with broken compilers like MIPSpro Compiler 7.2 on SGI Origin200. ;-)
*
* Revision 1.13 2003/12/05 15:08:38 r_prix
* - use read_variable() to read eos_bifluid from file
* - changed 'contructor from file' to take filename as an argument instead of ifstream
* - changed 'name' member of Eos_bifluid to C++-type string (for convenience&safety)
*
* Revision 1.12 2003/12/04 14:13:32 r_prix
* added method get_typeos {return typeos}; and fixed some comments.
*
* Revision 1.11 2003/11/18 18:25:15 r_prix
* moved particle-masses m_1, m_2 of the two fluids into class eos_bifluid (from eos_bf_poly)
*
* Revision 1.10 2002/10/16 14:36:29 j_novak
* Reorganization of #include instructions of standard C++, in order to
* use experimental version 3 of gcc.
*
* Revision 1.9 2002/09/13 09:17:31 j_novak
* Modif. commentaires
*
* Revision 1.8 2002/06/17 14:05:16 j_novak
* friend functions are now also declared outside the class definition
*
* Revision 1.7 2002/06/03 13:23:16 j_novak
* The case when the mapping is not adapted is now treated
*
* Revision 1.6 2002/05/31 16:13:36 j_novak
* better inversion for eos_bifluid
*
* Revision 1.5 2002/05/02 15:16:22 j_novak
* Added functions for more general bi-fluid EOS
*
* Revision 1.4 2002/01/16 15:03:27 j_novak
* *** empty log message ***
*
* Revision 1.3 2002/01/11 14:09:34 j_novak
* Added newtonian version for 2-fluid stars
*
* Revision 1.2 2001/11/29 15:05:26 j_novak
* The entrainment term in 2-fluid eos is modified
*
* Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
* LORENE
*
* Revision 1.6 2001/08/31 15:47:35 novak
* The flag tronc has been added to nbar_ent.. functions
*
* Revision 1.5 2001/08/27 12:21:11 novak
* The delta2 Cmp argument put to const
*
* Revision 1.4 2001/08/27 09:50:15 novak
* New formula for "polytrope"
*
* Revision 1.3 2001/06/22 15:36:11 novak
* Modification de Eos_bifluid::trans2Eos
*
* Revision 1.2 2001/06/22 11:52:44 novak
* *** empty log message ***
*
* Revision 1.1 2001/06/21 15:21:22 novak
* Initial revision
*
*
* $Header: /cvsroot/Lorene/C++/Include/eos_bifluid.h,v 1.22 2015/06/26 14:10:08 j_novak Exp $
*
*/
// Standard C++
#include "headcpp.h"
#include <string>
// Headers C
#include <cstdio>
// Lorene classes
#include "param.h"
namespace Lorene {
class Tbl ;
class Param ;
class Cmp ;
class Eos ;
class Eos_poly ;
//------------------------------------//
// base class Eos for two fluids //
//------------------------------------//
#define MAX_EOSNAME 100
class Eos_bifluid {
// Data :
// -----
protected:
string name;
double m_1 ;
double m_2 ;
// Constructors - Destructor
// -------------------------
protected:
Eos_bifluid() ;
explicit Eos_bifluid(const char* name_i, double mass1, double mass2) ;
Eos_bifluid(const Eos_bifluid& ) ;
protected:
Eos_bifluid(FILE* ) ;
Eos_bifluid (const char *fname ) ;
Eos_bifluid (ifstream& fich) ;
public:
virtual ~Eos_bifluid() ;
// Assignment
// ----------
void operator=(const Eos_bifluid& ) ;
// Name manipulation
// -----------------
public:
string get_name() const {return name;} ;
// Miscellaneous
// -------------
public:
double get_m1() const {return m_1 ;};
double get_m2() const {return m_2 ;};
static Eos_bifluid* eos_from_file (FILE* ) ;
static Eos_bifluid* eos_from_file ( const char *fname ) ;
static Eos_bifluid* eos_from_file(ifstream& ) ;
virtual bool operator==(const Eos_bifluid& ) const = 0 ;
virtual bool operator!=(const Eos_bifluid& ) const = 0 ;
virtual int identify() const = 0 ;
// Outputs
// -------
public:
virtual void sauve(FILE* ) const ;
friend ostream& operator<<(ostream& , const Eos_bifluid& ) ;
protected:
virtual ostream& operator>>(ostream &) const = 0 ;
// Computational functions
// -----------------------
public:
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 ;
virtual bool nbar_ent_p(const double ent1, const double ent2,
const double delta2, double& nbar1,
double& nbar2) const = 0 ;
virtual double nbar_ent_p1(const double ent1) const = 0 ;
virtual double nbar_ent_p2(const double ent2) const = 0 ;
void nbar_ent(const Cmp& ent1, const Cmp& ent2, const Cmp& delta2,
Cmp& nbar1, Cmp& nbar2, int nzet, int l_min = 0)
const ;
virtual double ener_nbar_p(const double nbar1, const double nbar2,
const double delta2) const = 0 ;
Cmp ener_ent(const Cmp& ent1, const Cmp& ent2, const Cmp& delta2,
int nzet, int l_min = 0) const ;
virtual double press_nbar_p(const double nbar1, const double nbar2,
const double delta2) const = 0 ;
Cmp press_ent(const Cmp& ent1, const Cmp& ent2, const Cmp& delta2,
int nzet, int l_min = 0) const ;
virtual double get_K11(const double n1, const double n2, const
double x) const = 0 ;
virtual double get_K12(const double n1, const double n2,const
double x) const = 0 ;
virtual double get_K22(const double n1, const double n2, const
double x) const = 0 ;
Cmp get_Knn(const Cmp& nbar1, const Cmp& nbar2, const Cmp& x2,
int nzet, int l_min = 0) const ;
Cmp get_Kpp(const Cmp& nbar1, const Cmp& nbar2, const Cmp&
x2, int nzet, int l_min = 0) const ;
Cmp get_Knp(const Cmp& nbar1, const Cmp& nbar2, const Cmp& x2,
int nzet, int l_min = 0) const ;
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 ;
Cmp get_Knn_ent(const Cmp& ent1, const Cmp& ent2, const Cmp& x2,
int nzet, int l_min = 0) const ;
Cmp get_Kpp_ent(const Cmp& ent1, const Cmp& ent2, const Cmp&
x2, int nzet, int l_min = 0) const ;
Cmp get_Knp_ent(const Cmp& ent1, const Cmp& ent2, const Cmp& x2,
int nzet, int l_min = 0) const ;
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 ;
// Conversion functions
// ---------------------
virtual Eos* trans2Eos() const = 0 ;
};
ostream& operator<<(ostream& , const Eos_bifluid& ) ;
//------------------------------------//
// class Eos_bf_poly //
//------------------------------------//
class Eos_bf_poly : public Eos_bifluid {
// Data :
// -----
protected:
double gam1 ;
double gam2 ;
double gam3 ;
double gam4 ;
double gam5 ;
double gam6 ;
double kap1 ;
double kap2 ;
double kap3 ;
double beta ;
double gam1m1 ;
double gam2m1 ;
double gam34m1 ;
double gam56m1 ;
protected:
int typeos ;
double relax ;
double precis ;
double ecart ;
// Constructors - Destructor
// -------------------------
public:
Eos_bf_poly(double kappa1, double kappa2, double kappa3, double beta) ;
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) ;
Eos_bf_poly(const Eos_bf_poly& ) ;
protected:
Eos_bf_poly(FILE* ) ;
Eos_bf_poly (const char *fname) ;
friend Eos_bifluid* Eos_bifluid::eos_from_file(FILE* ) ;
friend Eos_bifluid* Eos_bifluid::eos_from_file(const char *fname ) ;
public:
virtual ~Eos_bf_poly() ;
// Assignment
// ----------
void operator=(const Eos_bf_poly& ) ;
// Miscellaneous
// -------------
public :
virtual bool operator==(const Eos_bifluid& ) const ;
virtual bool operator!=(const Eos_bifluid& ) const ;
virtual int identify() const ;
double get_gam1() const {return gam1 ;};
double get_gam2() const {return gam2 ;};
double get_gam3() const {return gam3 ;};
double get_gam4() const {return gam4 ;};
double get_gam5() const {return gam5 ;};
double get_gam6() const {return gam6 ;};
double get_kap1() const {return kap1 ;};
double get_kap2() const {return kap2 ;};
double get_kap3() const {return kap3 ;};
double get_beta() const {return beta ;};
// Returns (sub)type of bifluid-eos (member \c typeos})
int get_typeos() const {return typeos;};
protected:
void set_auxiliary() ;
void determine_type() ;
// Outputs
// -------
public:
virtual void sauve(FILE* ) const ;
protected:
virtual ostream& operator>>(ostream &) const ;
// Computational functions
// -----------------------
public:
virtual bool nbar_ent_p(const double ent1, const double ent2,
const double delta2, double& nbar1,
double& nbar2) const ;
virtual double nbar_ent_p1(const double ent1) const ;
virtual double nbar_ent_p2(const double ent2) const ;
virtual double ener_nbar_p(const double nbar1, const double nbar2,
const double delta2) const ;
virtual double press_nbar_p(const double nbar1, const double nbar2,
const double delta2) const ;
// Conversion functions
// ---------------------
virtual Eos* trans2Eos() const ;
virtual double get_K11(const double n1, const double n2, const
double delta2) const ;
virtual double get_K12(const double n1, const double n2,const
double delta2) const ;
virtual double get_K22(const double n1, const double n2, const
double delta2) const ;
};
//------------------------------------//
// class Eos_bf_poly_newt //
//------------------------------------//
class Eos_bf_poly_newt : public Eos_bf_poly {
// Data :
// -----
// no new data with respect to Eos_bf_poly
// Constructors - Destructor
// -------------------------
public:
Eos_bf_poly_newt(double kappa1, double kappa2, double kappa3,
double beta) ;
Eos_bf_poly_newt(double gamma1, double gamma2, double gamma3,
double gamma4, double gamma5, double gamma6,
double kappa1, double kappa2, double kappa3,
double beta, double mass1, double mass2,
double relax=0.5, double precis = 1.e-9,
double ecart = 1.e-8) ;
Eos_bf_poly_newt(const Eos_bf_poly_newt& ) ;
protected:
Eos_bf_poly_newt(FILE* ) ;
Eos_bf_poly_newt(const char *fname ) ;
friend Eos_bifluid* Eos_bifluid::eos_from_file(FILE* ) ;
friend Eos_bifluid* Eos_bifluid::eos_from_file(const char *fname) ;
public:
virtual ~Eos_bf_poly_newt() ;
// Assignment
// ----------
void operator=(const Eos_bf_poly_newt& ) ;
// Miscellaneous
// -------------
public :
virtual bool operator==(const Eos_bifluid& ) const ;
virtual bool operator!=(const Eos_bifluid& ) const ;
virtual int identify() const ;
// Outputs
// -------
public:
virtual void sauve(FILE* ) const ;
protected:
virtual ostream& operator>>(ostream &) const ;
// Computational functions
// -----------------------
public:
virtual bool nbar_ent_p(const double ent1, const double ent2,
const double delta2, double& nbar1,
double& nbar2) const ;
virtual double nbar_ent_p1(const double ent1) const ;
virtual double nbar_ent_p2(const double ent2) const ;
virtual double ener_nbar_p(const double nbar1, const double nbar2,
const double delta2) const ;
virtual double press_nbar_p(const double nbar1, const double nbar2,
const double delta2) const ;
// Conversion functions
// ---------------------
virtual Eos* trans2Eos() const ;
virtual double get_K11(const double n1, const double n2, const
double delta2) const ;
virtual double get_K12(const double n1, const double n2,const
double delta2) const ;
virtual double get_K22(const double n1, const double n2, const
double delta2) const ;
};
/* Declaration of the new class Eos_bf_tabul derived from Eos_bifluid */
//------------------------------------//
// class Eos_bf_tabul //
//------------------------------------//
class Eos_bf_tabul : public Eos_bifluid {
// Data :
// -----
protected:
string tablename ;
string authors ;
double delta_car_min ;
double delta_car_max ;
double ent1_min ;
double ent1_max ;
double ent2_min ;
double ent2_max ;
Tbl* logent1 ;
Tbl* logent2 ;
Tbl* delta_car ;
Tbl* logp ;
Tbl* dlpsdlent1 ;
Tbl* dlpsdlent2 ;
Tbl* d2lpsdlent1dlent2 ;
Tbl* d2lpsdlent1dlent1 ;
Tbl* d2lpsdlent2dlent2 ;
Tbl* dlpsddelta_car ;
Tbl* d2lpsdlent1ddelta_car ;
Tbl* d2lpsdlent2ddelta_car ;
Tbl* d3lpsdlent1dlent2ddelta_car ;
// to save the limit curve of nn = 0
Tbl* delta_car_n0 ;
Tbl* mu1_n0 ;
Tbl* mu2_n0 ;
// to save the limit curve of np = 0
Tbl* delta_car_p0 ;
Tbl* mu1_p0 ;
Tbl* mu2_p0 ;
// to save the 1 fluid table //
Tbl* mu1_N ;
Tbl* n_n_N ;
Tbl* press_N ;
Tbl* mu2_P ;
Tbl* n_p_P ;
Tbl* press_P ;
// Constructors - Destructor
// -------------------------
protected:
Eos_bf_tabul(const char* name_i, const char* table, const char* path, double mass1, double mass2) ;
Eos_bf_tabul(const char* name_i, const char* file_name, double mass1, double mass2) ;
private:
Eos_bf_tabul(const Eos_bf_tabul& ) ;
protected:
Eos_bf_tabul(FILE* ) ;
Eos_bf_tabul(ifstream& ist, const char* table) ;
Eos_bf_tabul(ifstream& ist) ;
friend Eos_bifluid* Eos_bifluid::eos_from_file(FILE* ) ;
friend Eos_bifluid* Eos_bifluid::eos_from_file(ifstream& ) ;
public:
virtual ~Eos_bf_tabul() ;
// Assignment
// ----------
private :
void operator=(const Eos_bf_tabul& ) ;
// Miscellaneous
// -------------
protected:
void read_table() ;
public :
virtual bool operator==(const Eos_bifluid& ) const ;
virtual bool operator!=(const Eos_bifluid& ) const ;
virtual int identify() const ;
// Outputs
// -------
public:
virtual void sauve(FILE* ) const ;
protected:
virtual ostream& operator>>(ostream &) const ;
// Computational functions
// -----------------------
public:
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 ;
virtual bool nbar_ent_p(const double ent1, const double ent2,
const double delta2, double& nbar1,
double& nbar2) const ;
virtual double nbar_ent_p1(const double ent1) const ;
virtual double nbar_ent_p2(const double ent2) const ;
virtual double ener_nbar_p(const double nbar1, const double nbar2,
const double delta2) const ;
virtual double press_nbar_p(const double nbar1, const double nbar2,
const double delta2) const ;
virtual double get_K11(const double delta2, const double ent1,
const double ent2) const ;
virtual double get_K12(const double delta2, const double ent1 ,
const double ent2) const ;
virtual double get_K22(const double delta2, const double ent1,
const double ent2) const ;
virtual double ener_ent_p(const double ent1, const double ent2,
const double delta_car) const ;
virtual double press_ent_p(const double ent1, const double ent2,
const double delta_car) const ;
virtual double press_ent_p1(const double ent1) const ;
virtual double press_ent_p2(const double ent2) const ;
virtual double alpha_ent_p(const double ent1, const double ent2,
const double delta_car) const ;
// Conversion function
// ---------------------
virtual Eos* trans2Eos() const ;
};
}
#endif
Lorene::Cmp
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition cmp.h:446
Lorene::Eos_bf_poly_newt::trans2Eos
virtual Eos * trans2Eos() const
Makes a translation from Eos_bifluid to Eos .
Definition eos_bf_poly_newt.C:733
Lorene::Eos_bf_poly_newt::operator!=
virtual bool operator!=(const Eos_bifluid &) const
Comparison operator (difference).
Definition eos_bf_poly_newt.C:232
Lorene::Eos_bf_poly_newt::operator=
void operator=(const Eos_bf_poly_newt &)
Assignment to another Eos_bf_poly_newt.
Definition eos_bf_poly_newt.C:165
Lorene::Eos_bf_poly_newt::get_K22
virtual double get_K22(const double n1, const double n2, const double delta2) const
Computes the derivative of the energy/(baryonic density 2) .
Definition eos_bf_poly_newt.C:710
Lorene::Eos_bf_poly_newt::identify
virtual int identify() const
Returns a number to identify the sub-classe of Eos_bifluid the object belongs to.
Definition eos_bf_file.C:97
Lorene::Eos_bf_poly_newt::nbar_ent_p1
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...
Definition eos_bf_poly_newt.C:653
Lorene::Eos_bf_poly_newt::get_K11
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) .
Definition eos_bf_poly_newt.C:700
Lorene::Eos_bf_poly_newt::operator>>
virtual ostream & operator>>(ostream &) const
Operator >>.
Definition eos_bf_poly_newt.C:248
Lorene::Eos_bf_poly_newt::operator==
virtual bool operator==(const Eos_bifluid &) const
Comparison operator (egality).
Definition eos_bf_poly_newt.C:176
Lorene::Eos_bf_poly_newt::nbar_ent_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.
Definition eos_bf_poly_newt.C:285
Lorene::Eos_bf_poly_newt::Eos_bf_poly_newt
Eos_bf_poly_newt(double kappa1, double kappa2, double kappa3, double beta)
Standard constructor.
Definition eos_bf_poly_newt.C:117
Lorene::Eos_bf_poly_newt::sauve
virtual void sauve(FILE *) const
Save in a file.
Definition eos_bf_poly_newt.C:243
Lorene::Eos_bf_poly_newt::nbar_ent_p2
virtual double nbar_ent_p2(const double ent2) const
Computes baryon density out of the log-enthalpy assuming that only fluid 2 is present.
Definition eos_bf_poly_newt.C:657
Lorene::Eos_bf_poly_newt::~Eos_bf_poly_newt
virtual ~Eos_bf_poly_newt()
Destructor.
Definition eos_bf_poly_newt.C:156
Lorene::Eos_bf_poly_newt::get_K12
virtual double get_K12(const double n1, const double n2, const double delta2) const
Computes the derivative of the energy with respect to .
Definition eos_bf_poly_newt.C:720
Lorene::Eos_bf_poly_newt::ener_nbar_p
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.
Definition eos_bf_poly_newt.C:664
Lorene::Eos_bf_poly_newt::press_nbar_p
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.
Definition eos_bf_poly_newt.C:682
Lorene::Eos_bf_poly::gam5
double gam5
Adiabatic indexes , see Eq.~eeosbfpolye}.
Definition eos_bifluid.h:833
Lorene::Eos_bf_poly::operator!=
virtual bool operator!=(const Eos_bifluid &) const
Comparison operator (difference).
Definition eos_bf_poly.C:441
Lorene::Eos_bf_poly::kap1
double kap1
Pressure coefficient , see Eq.
Definition eos_bifluid.h:843
Lorene::Eos_bf_poly::get_kap1
double get_kap1() const
Returns the pressure coefficient [unit: ], where .
Definition eos_bifluid.h:1032
Lorene::Eos_bf_poly::gam56m1
double gam56m1
Definition eos_bifluid.h:869
Lorene::Eos_bf_poly::determine_type
void determine_type()
Determines the type of the analytical EOS (see typeos ).
Definition eos_bf_poly.C:334
Lorene::Eos_bf_poly::gam1
double gam1
Adiabatic indexes , see Eq.~eeosbfpolye}.
Definition eos_bifluid.h:821
Lorene::Eos_bf_poly::kap2
double kap2
Pressure coefficient , see Eq.
Definition eos_bifluid.h:850
Lorene::Eos_bf_poly::operator=
void operator=(const Eos_bf_poly &)
Assignment to another Eos_bf_poly.
Definition eos_bf_poly.C:294
Lorene::Eos_bf_poly::gam4
double gam4
Adiabatic indexes , see Eq.~eeosbfpolye}.
Definition eos_bifluid.h:830
Lorene::Eos_bf_poly::get_gam6
double get_gam6() const
Returns the adiabatic index .
Definition eos_bifluid.h:1026
Lorene::Eos_bf_poly::gam3
double gam3
Adiabatic indexes , see Eq.~eeosbfpolye}.
Definition eos_bifluid.h:827
Lorene::Eos_bf_poly::get_K11
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) .
Definition eos_bf_poly.C:930
Lorene::Eos_bf_poly::get_K12
virtual double get_K12(const double n1, const double n2, const double delta2) const
Computes the derivative of the energy with respect to .
Definition eos_bf_poly.C:960
Lorene::Eos_bf_poly::get_gam4
double get_gam4() const
Returns the adiabatic index .
Definition eos_bifluid.h:1020
Lorene::Eos_bf_poly::get_gam1
double get_gam1() const
Returns the adiabatic index .
Definition eos_bifluid.h:1011
Lorene::Eos_bf_poly::gam34m1
double gam34m1
Definition eos_bifluid.h:868
Lorene::Eos_bf_poly::get_gam5
double get_gam5() const
Returns the adiabatic index .
Definition eos_bifluid.h:1023
Lorene::Eos_bf_poly::gam2m1
double gam2m1
Definition eos_bifluid.h:867
Lorene::Eos_bf_poly::operator==
virtual bool operator==(const Eos_bifluid &) const
Comparison operator (egality).
Definition eos_bf_poly.C:386
Lorene::Eos_bf_poly::operator>>
virtual ostream & operator>>(ostream &) const
Operator >>.
Definition eos_bf_poly.C:472
Lorene::Eos_bf_poly::trans2Eos
virtual Eos * trans2Eos() const
Makes a translation from Eos_bifluid to Eos .
Definition eos_bf_poly.C:975
Lorene::Eos_bf_poly::get_K22
virtual double get_K22(const double n1, const double n2, const double delta2) const
Computes the derivative of the energy/(baryonic density 2) .
Definition eos_bf_poly.C:945
Lorene::Eos_bf_poly::gam6
double gam6
Adiabatic indexes , see Eq.~eeosbfpolye}.
Definition eos_bifluid.h:836
Lorene::Eos_bf_poly::gam2
double gam2
Adiabatic indexes , see Eq.~eeosbfpolye}.
Definition eos_bifluid.h:824
Lorene::Eos_bf_poly::precis
double precis
contains the precision required in zerosec_b
Definition eos_bifluid.h:901
Lorene::Eos_bf_poly::identify
virtual int identify() const
Returns a number to identify the sub-classe of Eos_bifluid the object belongs to.
Definition eos_bf_file.C:95
Lorene::Eos_bf_poly::press_nbar_p
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.
Definition eos_bf_poly.C:909
Lorene::Eos_bf_poly::get_gam2
double get_gam2() const
Returns the adiabatic index .
Definition eos_bifluid.h:1014
Lorene::Eos_bf_poly::get_gam3
double get_gam3() const
Returns the adiabatic index .
Definition eos_bifluid.h:1017
Lorene::Eos_bf_poly::get_kap3
double get_kap3() const
Returns the pressure coefficient [unit: ], where .
Definition eos_bifluid.h:1044
Lorene::Eos_bf_poly::gam1m1
double gam1m1
Definition eos_bifluid.h:866
Lorene::Eos_bf_poly::get_beta
double get_beta() const
Returns the coefficient [unit: ], where .
Definition eos_bifluid.h:1050
Lorene::Eos_bf_poly::sauve
virtual void sauve(FILE *) const
Save in a file.
Definition eos_bf_poly.C:452
Lorene::Eos_bf_poly::set_auxiliary
void set_auxiliary()
Computes the auxiliary quantities gam1m1 , gam2m1 and gam3m1.
Definition eos_bf_poly.C:320
Lorene::Eos_bf_poly::get_kap2
double get_kap2() const
Returns the pressure coefficient [unit: ], where .
Definition eos_bifluid.h:1038
Lorene::Eos_bf_poly::ener_nbar_p
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.
Definition eos_bf_poly.C:889
Lorene::Eos_bf_poly::nbar_ent_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.
Definition eos_bf_poly.C:507
Lorene::Eos_bf_poly::typeos
int typeos
The bi-fluid analytical EOS type:
Definition eos_bifluid.h:893
Lorene::Eos_bf_poly::beta
double beta
Coefficient , see Eq.
Definition eos_bifluid.h:864
Lorene::Eos_bf_poly::kap3
double kap3
Pressure coefficient , see Eq.
Definition eos_bifluid.h:857
Lorene::Eos_bf_poly::nbar_ent_p2
virtual double nbar_ent_p2(const double ent2) const
Computes baryon density out of the log-enthalpy assuming that only fluid 2 is present.
Definition eos_bf_poly.C:882
Lorene::Eos_bf_poly::nbar_ent_p1
virtual double nbar_ent_p1(const double ent1) const
Computes baryon density out of the log-enthalpy asuming that only fluid 1 is present.
Definition eos_bf_poly.C:878
Lorene::Eos_bf_poly::ecart
double ecart
contains the precision required in the relaxation nbar_ent_p
Definition eos_bifluid.h:904
Lorene::Eos_bf_poly::Eos_bf_poly
Eos_bf_poly(double kappa1, double kappa2, double kappa3, double beta)
Standard constructor.
Definition eos_bf_poly.C:157
Lorene::Eos_bf_poly::relax
double relax
Parameters needed for some inversions of the EOS.
Definition eos_bifluid.h:899
Lorene::Eos_bf_poly::~Eos_bf_poly
virtual ~Eos_bf_poly()
Destructor.
Definition eos_bf_poly.C:285
Lorene::Eos_bf_tabul::d3lpsdlent1dlent2ddelta_car
Tbl * d3lpsdlent1dlent2ddelta_car
if necessary for the interpolation to find alpha (derivee seconde croisee) ie, if it's possible to ca...
Definition eos_bifluid.h:1611
Lorene::Eos_bf_tabul::press_ent_p
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.
Definition eos_bf_tabul.C:1316
Lorene::Eos_bf_tabul::ent1_max
double ent1_max
Upper boundary of the log-enthalpy interval (fluid 1 = n).
Definition eos_bifluid.h:1558
Lorene::Eos_bf_tabul::identify
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
Definition eos_bf_file.C:99
Lorene::Eos_bf_tabul::operator=
void operator=(const Eos_bf_tabul &)
Assignment to another Eos_bf_tabul.
Definition eos_bf_tabul.C:219
Lorene::Eos_bf_tabul::logp
Tbl * logp
Table of .
Definition eos_bifluid.h:1582
Lorene::Eos_bf_tabul::ent2_max
double ent2_max
Upper boundary of the log-enthalpy interval (fluid 2 = p).
Definition eos_bifluid.h:1564
Lorene::Eos_bf_tabul::ent2_min
double ent2_min
Lower boundary of the log-enthalpy interval (fluid 2 = p).
Definition eos_bifluid.h:1561
Lorene::Eos_bf_tabul::nbar_ent_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.
Definition eos_bf_tabul.C:1181
Lorene::Eos_bf_tabul::d2lpsdlent2ddelta_car
Tbl * d2lpsdlent2ddelta_car
Table of .
Definition eos_bifluid.h:1606
Lorene::Eos_bf_tabul::delta_car_max
double delta_car_max
Upper boundary of the relative velocity interval --> 1 ?
Definition eos_bifluid.h:1551
Lorene::Eos_bf_tabul::logent1
Tbl * logent1
Table of where .
Definition eos_bifluid.h:1570
Lorene::Eos_bf_tabul::authors
string authors
Authors.
Definition eos_bifluid.h:1544
Lorene::Eos_bf_tabul::operator!=
virtual bool operator!=(const Eos_bifluid &) const
Comparison operator (difference).
Definition eos_bf_tabul.C:312
Lorene::Eos_bf_tabul::calcule_interpol
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...
Definition eos_bf_tabul.C:876
Lorene::Eos_bf_tabul::dlpsdlent2
Tbl * dlpsdlent2
Table of .
Definition eos_bifluid.h:1588
Lorene::Eos_bf_tabul::~Eos_bf_tabul
virtual ~Eos_bf_tabul()
Destructor.
Definition eos_bf_tabul.C:185
Lorene::Eos_bf_tabul::tablename
string tablename
Name of the file containing the tabulated data (be careful, Eos_bifluid uses char*).
Definition eos_bifluid.h:1541
Lorene::Eos_bf_tabul::alpha_ent_p
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...
Definition eos_bf_tabul.C:1503
Lorene::Eos_bf_tabul::Eos_bf_tabul
Eos_bf_tabul(const Eos_bf_tabul &)
Copy constructor.
Lorene::Eos_bf_tabul::operator==
virtual bool operator==(const Eos_bifluid &) const
Comparison operator (egality).
Definition eos_bf_tabul.C:288
Lorene::Eos_bf_tabul::delta_car
Tbl * delta_car
Table of .
Definition eos_bifluid.h:1579
Lorene::Eos_bf_tabul::delta_car_min
double delta_car_min
Lower boundary of the relative velocity interval --> 0 ?
Definition eos_bifluid.h:1547
Lorene::Eos_bf_tabul::trans2Eos
virtual Eos * trans2Eos() const
Makes a translation from Eos_bifluid to Eos .
Definition eos_bf_tabul.C:1691
Lorene::Eos_bf_tabul::dlpsdlent1
Tbl * dlpsdlent1
Table of .
Definition eos_bifluid.h:1585
Lorene::Eos_bf_tabul::nbar_ent_p2
virtual double nbar_ent_p2(const double ent2) const
Computes baryon density out of the log-enthalpy assuming that only fluid 2 is present.
Definition eos_bf_tabul.C:1274
Lorene::Eos_bf_tabul::ener_nbar_p
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.
Definition eos_bf_tabul.C:1293
Lorene::Eos_bf_tabul::press_nbar_p
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.
Definition eos_bf_tabul.C:1304
Lorene::Eos_bf_tabul::get_K22
virtual double get_K22(const double delta2, const double ent1, const double ent2) const
Computes the derivative of the energy/(baryonic density 2) .
Definition eos_bf_tabul.C:1610
Lorene::Eos_bf_tabul::ent1_min
double ent1_min
Lower boundary of the log-enthalpy interval (fluid 1 = n).
Definition eos_bifluid.h:1555
Lorene::Eos_bf_tabul::read_table
void read_table()
Reads the file containing the table and initializes the arrays logent1, logent2, delta_car,...
Definition eos_bf_tabul.C:323
Lorene::Eos_bf_tabul::operator>>
virtual ostream & operator>>(ostream &) const
Operator >>.
Definition eos_bf_tabul.C:273
Lorene::Eos_bf_tabul::d2lpsdlent2dlent2
Tbl * d2lpsdlent2dlent2
Table of .
Definition eos_bifluid.h:1596
Lorene::Eos_bf_tabul::logent2
Tbl * logent2
Table of where .
Definition eos_bifluid.h:1576
Lorene::Eos_bf_tabul::d2lpsdlent1dlent1
Tbl * d2lpsdlent1dlent1
Table of .
Definition eos_bifluid.h:1594
Lorene::Eos_bf_tabul::d2lpsdlent1ddelta_car
Tbl * d2lpsdlent1ddelta_car
Table of .
Definition eos_bifluid.h:1603
Lorene::Eos_bf_tabul::press_ent_p1
virtual double press_ent_p1(const double ent1) const
Computes the pressure from the baryonic log-enthalpies asuming that only fluid 1 is present.
Definition eos_bf_tabul.C:1375
Lorene::Eos_bf_tabul::get_K12
virtual double get_K12(const double delta2, const double ent1, const double ent2) const
Computes the derivative of the energy with respect to .
Definition eos_bf_tabul.C:1656
Lorene::Eos_bf_tabul::get_K11
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) .
Definition eos_bf_tabul.C:1563
Lorene::Eos_bf_tabul::sauve
virtual void sauve(FILE *) const
Save in a file.
Definition eos_bf_tabul.C:262
Lorene::Eos_bf_tabul::ener_ent_p
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.
Definition eos_bf_tabul.C:1427
Lorene::Eos_bf_tabul::nbar_ent_p1
virtual double nbar_ent_p1(const double ent1) const
Computes baryon density out of the log-enthalpy asuming that only fluid 1 is present.
Definition eos_bf_tabul.C:1254
Lorene::Eos_bf_tabul::d2lpsdlent1dlent2
Tbl * d2lpsdlent1dlent2
Table of .
Definition eos_bifluid.h:1591
Lorene::Eos_bf_tabul::Eos_bf_tabul
Eos_bf_tabul(const char *name_i, const char *table, const char *path, double mass1, double mass2)
Standard constructor.
Definition eos_bf_tabul.C:128
Lorene::Eos_bf_tabul::dlpsddelta_car
Tbl * dlpsddelta_car
Table of .
Definition eos_bifluid.h:1600
Lorene::Eos_bf_tabul::press_ent_p2
virtual double press_ent_p2(const double ent2) const
Computes the pressure from the baryonic log-enthalpies assuming that only fluid 2 is present.
Definition eos_bf_tabul.C:1401
Lorene::Eos_bifluid
2-fluids equation of state base class.
Definition eos_bifluid.h:173
Lorene::Eos_bifluid::calcule
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).
Definition eos_bifluid.C:656
Lorene::Eos_bifluid::calcule_tout
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...
Definition eos_bifluid.C:281
Lorene::Eos_bifluid::operator>>
virtual ostream & operator>>(ostream &) const =0
Operator >>.
Lorene::Eos_bifluid::nbar_ent_p2
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...
Lorene::Eos_bifluid::get_Kpp_ent
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) .
Definition eos_bifluid.C:895
Lorene::Eos_bifluid::get_m1
double get_m1() const
Return the individual particule mass .
Definition eos_bifluid.h:256
Lorene::Eos_bifluid::sauve
virtual void sauve(FILE *) const
Save in a file.
Definition eos_bifluid.C:245
Lorene::Eos_bifluid::eos_from_file
static Eos_bifluid * eos_from_file(FILE *)
Construction of an EOS from a binary file.
Definition eos_bf_file.C:105
Lorene::Eos_bifluid::~Eos_bifluid
virtual ~Eos_bifluid()
Destructor.
Definition eos_bifluid.C:226
Lorene::Eos_bifluid::nbar_ent
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.
Definition eos_bifluid.C:411
Lorene::Eos_bifluid::operator==
virtual bool operator==(const Eos_bifluid &) const =0
Comparison operator (egality).
Lorene::Eos_bifluid::m_1
double m_1
Individual particle mass [unit: ].
Definition eos_bifluid.h:184
Lorene::Eos_bifluid::nbar_ent_p1
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...
Lorene::Eos_bifluid::name
string name
EOS name.
Definition eos_bifluid.h:179
Lorene::Eos_bifluid::get_m2
double get_m2() const
Return the individual particule mass .
Definition eos_bifluid.h:262
Lorene::Eos_bifluid::operator!=
virtual bool operator!=(const Eos_bifluid &) const =0
Comparison operator (difference).
Lorene::Eos_bifluid::calcule_ent
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).
Definition eos_bifluid.C:783
Lorene::Eos_bifluid::get_Knn
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) .
Definition eos_bifluid.C:745
Lorene::Eos_bifluid::identify
virtual int identify() const =0
Returns a number to identify the sub-classe of Eos_bifluid the object belongs to.
Lorene::Eos_bifluid::get_K22
virtual double get_K22(const double n1, const double n2, const double x) const =0
Computes the derivative of the energy/(baryonic density 2) .
Lorene::Eos_bifluid::get_K11
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) .
Lorene::Eos_bifluid::get_Kpp
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) .
Definition eos_bifluid.C:767
Lorene::Eos_bifluid::get_Knp_ent
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 .
Definition eos_bifluid.C:884
Lorene::Eos_bifluid::ener_nbar_p
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.
Lorene::Eos_bifluid::get_name
string get_name() const
Returns the EOS name.
Definition eos_bifluid.h:246
Lorene::Eos_bifluid::trans2Eos
virtual Eos * trans2Eos() const =0
Makes a translation from Eos_bifluid to Eos .
Lorene::Eos_bifluid::press_nbar_p
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.
Lorene::Eos_bifluid::get_K12
virtual double get_K12(const double n1, const double n2, const double x) const =0
Computes the derivative of the energy with respect to .
Lorene::Eos_bifluid::press_ent
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.
Definition eos_bifluid.C:579
Lorene::Eos_bifluid::ener_ent
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.
Definition eos_bifluid.C:499
Lorene::Eos_bifluid::get_Knp
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 .
Definition eos_bifluid.C:756
Lorene::Eos_bifluid::operator<<
friend ostream & operator<<(ostream &, const Eos_bifluid &)
Display.
Definition eos_bifluid.C:264
Lorene::Eos_bifluid::nbar_ent_p
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...
Lorene::Eos_bifluid::operator=
void operator=(const Eos_bifluid &)
Assignment to another Eos_bifluid.
Definition eos_bifluid.C:232
Lorene::Eos_bifluid::get_Knn_ent
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) .
Definition eos_bifluid.C:873
Lorene::Eos_bifluid::m_2
double m_2
Individual particle mass [unit: ].
Definition eos_bifluid.h:189
Lorene::Eos_bifluid::Eos_bifluid
Eos_bifluid()
Standard constructor.
Definition eos_bifluid.C:148
Lorene::Eos_poly
Polytropic equation of state (relativistic case).
Definition eos.h:757
Lorene::Eos
Equation of state base class.
Definition eos.h:190
Lorene::Param
Parameter storage.
Definition param.h:125
Lorene::Tbl
Basic array class.
Definition tbl.h:161
Lorene
Lorene prototypes.
Definition app_hor.h:64
Lorene::x
Coord x
x coordinate centered on the grid
Definition map.h:726