LORENE
eos_bifluid.h
1/*
2 * Definition of Lorene classes Eos_bifluid
3 * Eos_bf_poly
4 * Eos_bf_tabul
5 */
6
7/*
8 * Copyright (c) 2001-2002 Jerome Novak
9 *
10 * This file is part of LORENE.
11 *
12 * LORENE is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * LORENE is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with LORENE; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 */
27
28
29#ifndef __EOS_BIFLUID_H_
30#define __EOS_BIFLUID_H_
31
32/*
33 * $Id: eos_bifluid.h,v 1.22 2015/06/26 14:10:08 j_novak Exp $
34 * $Log: eos_bifluid.h,v $
35 * Revision 1.22 2015/06/26 14:10:08 j_novak
36 * Modified comments.
37 *
38 * Revision 1.21 2015/06/11 13:50:18 j_novak
39 * Minor corrections
40 *
41 * Revision 1.20 2015/06/10 14:39:17 a_sourie
42 * New class Eos_bf_tabul for tabulated 2-fluid EoSs and associated functions for the computation of rotating stars with such EoSs.
43 *
44 * Revision 1.19 2014/10/13 08:52:33 j_novak
45 * Lorene classes and functions now belong to the namespace Lorene.
46 *
47 * Revision 1.18 2014/04/25 10:43:50 j_novak
48 * The member 'name' is of type string now. Correction of a few const-related issues.
49 *
50 * Revision 1.17 2004/09/01 09:49:46 r_prix
51 * adapted to change in read_variable() for strings
52 *
53 * Revision 1.16 2004/03/22 13:12:41 j_novak
54 * Modification of comments to use doxygen instead of doc++
55 *
56 * Revision 1.15 2004/01/30 13:21:29 r_prix
57 * add documentation about 'special' 2-fluid typeos=5: == type0 + slow-rot style inversion
58 *
59 * Revision 1.14 2003/12/17 23:12:30 r_prix
60 * replaced use of C++ <string> by standard ANSI char* to be backwards compatible
61 * with broken compilers like MIPSpro Compiler 7.2 on SGI Origin200. ;-)
62 *
63 * Revision 1.13 2003/12/05 15:08:38 r_prix
64 * - use read_variable() to read eos_bifluid from file
65 * - changed 'contructor from file' to take filename as an argument instead of ifstream
66 * - changed 'name' member of Eos_bifluid to C++-type string (for convenience&safety)
67 *
68 * Revision 1.12 2003/12/04 14:13:32 r_prix
69 * added method get_typeos {return typeos}; and fixed some comments.
70 *
71 * Revision 1.11 2003/11/18 18:25:15 r_prix
72 * moved particle-masses m_1, m_2 of the two fluids into class eos_bifluid (from eos_bf_poly)
73 *
74 * Revision 1.10 2002/10/16 14:36:29 j_novak
75 * Reorganization of #include instructions of standard C++, in order to
76 * use experimental version 3 of gcc.
77 *
78 * Revision 1.9 2002/09/13 09:17:31 j_novak
79 * Modif. commentaires
80 *
81 * Revision 1.8 2002/06/17 14:05:16 j_novak
82 * friend functions are now also declared outside the class definition
83 *
84 * Revision 1.7 2002/06/03 13:23:16 j_novak
85 * The case when the mapping is not adapted is now treated
86 *
87 * Revision 1.6 2002/05/31 16:13:36 j_novak
88 * better inversion for eos_bifluid
89 *
90 * Revision 1.5 2002/05/02 15:16:22 j_novak
91 * Added functions for more general bi-fluid EOS
92 *
93 * Revision 1.4 2002/01/16 15:03:27 j_novak
94 * *** empty log message ***
95 *
96 * Revision 1.3 2002/01/11 14:09:34 j_novak
97 * Added newtonian version for 2-fluid stars
98 *
99 * Revision 1.2 2001/11/29 15:05:26 j_novak
100 * The entrainment term in 2-fluid eos is modified
101 *
102 * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
103 * LORENE
104 *
105 * Revision 1.6 2001/08/31 15:47:35 novak
106 * The flag tronc has been added to nbar_ent.. functions
107 *
108 * Revision 1.5 2001/08/27 12:21:11 novak
109 * The delta2 Cmp argument put to const
110 *
111 * Revision 1.4 2001/08/27 09:50:15 novak
112 * New formula for "polytrope"
113 *
114 * Revision 1.3 2001/06/22 15:36:11 novak
115 * Modification de Eos_bifluid::trans2Eos
116 *
117 * Revision 1.2 2001/06/22 11:52:44 novak
118 * *** empty log message ***
119 *
120 * Revision 1.1 2001/06/21 15:21:22 novak
121 * Initial revision
122 *
123 *
124 * $Header: /cvsroot/Lorene/C++/Include/eos_bifluid.h,v 1.22 2015/06/26 14:10:08 j_novak Exp $
125 *
126 */
127
128// Standard C++
129#include "headcpp.h"
130#include <string>
131
132// Headers C
133#include <cstdio>
134
135// Lorene classes
136#include "param.h"
137namespace Lorene {
138class Tbl ;
139class Param ;
140class Cmp ;
141class Eos ;
142class Eos_poly ;
143
144 //------------------------------------//
145 // base class Eos for two fluids //
146 //------------------------------------//
147#define MAX_EOSNAME 100
148
174
175 // Data :
176 // -----
177
178 protected:
179 string name;
180
184 double m_1 ;
185
189 double m_2 ;
190
191
192 // Constructors - Destructor
193 // -------------------------
194 protected:
195 Eos_bifluid() ;
196
198 explicit Eos_bifluid(const char* name_i, double mass1, double mass2) ;
199
200 Eos_bifluid(const Eos_bifluid& ) ;
201
202 protected:
209 Eos_bifluid(FILE* ) ;
210
221 Eos_bifluid (const char *fname ) ;
222
230 Eos_bifluid (ifstream& fich) ;
231
232
233 public:
234 virtual ~Eos_bifluid() ;
235
236 // Assignment
237 // ----------
239 void operator=(const Eos_bifluid& ) ;
240
241
242 // Name manipulation
243 // -----------------
244 public:
246 string get_name() const {return name;} ;
247
248 // Miscellaneous
249 // -------------
250 public:
251
256 double get_m1() const {return m_1 ;};
257
262 double get_m2() const {return m_2 ;};
263
268 static Eos_bifluid* eos_from_file (FILE* ) ;
269
277 static Eos_bifluid* eos_from_file ( const char *fname ) ;
278
290 static Eos_bifluid* eos_from_file(ifstream& ) ;
291
292
294 virtual bool operator==(const Eos_bifluid& ) const = 0 ;
295
297 virtual bool operator!=(const Eos_bifluid& ) const = 0 ;
298
302 virtual int identify() const = 0 ;
303
304 // Outputs
305 // -------
306
307 public:
308 virtual void sauve(FILE* ) const ;
309
311 friend ostream& operator<<(ostream& , const Eos_bifluid& ) ;
312
313 protected:
314 virtual ostream& operator>>(ostream &) const = 0 ;
315
316
317 // Computational functions
318 // -----------------------
319 public:
340 virtual void calcule_tout(const Cmp& ent1, const Cmp& ent2, const Cmp& delta2,
341 Cmp& nbar1, Cmp& nbar2, Cmp& ener, Cmp& press,
342 int nzet, int l_min = 0) const ;
343
356 virtual bool nbar_ent_p(const double ent1, const double ent2,
357 const double delta2, double& nbar1,
358 double& nbar2) const = 0 ;
359
366 virtual double nbar_ent_p1(const double ent1) const = 0 ;
367
374 virtual double nbar_ent_p2(const double ent2) const = 0 ;
375
396 void nbar_ent(const Cmp& ent1, const Cmp& ent2, const Cmp& delta2,
397 Cmp& nbar1, Cmp& nbar2, int nzet, int l_min = 0)
398 const ;
399
412 virtual double ener_nbar_p(const double nbar1, const double nbar2,
413 const double delta2) const = 0 ;
414
434 Cmp ener_ent(const Cmp& ent1, const Cmp& ent2, const Cmp& delta2,
435 int nzet, int l_min = 0) const ;
436
449 virtual double press_nbar_p(const double nbar1, const double nbar2,
450 const double delta2) const = 0 ;
451
470 Cmp press_ent(const Cmp& ent1, const Cmp& ent2, const Cmp& delta2,
471 int nzet, int l_min = 0) const ;
472
489 virtual double get_K11(const double n1, const double n2, const
490 double x) const = 0 ;
491
508 virtual double get_K12(const double n1, const double n2,const
509 double x) const = 0 ;
510
526 virtual double get_K22(const double n1, const double n2, const
527 double x) const = 0 ;
528
551 Cmp get_Knn(const Cmp& nbar1, const Cmp& nbar2, const Cmp& x2,
552 int nzet, int l_min = 0) const ;
553
576 Cmp get_Kpp(const Cmp& nbar1, const Cmp& nbar2, const Cmp&
577 x2, int nzet, int l_min = 0) const ;
578
602 Cmp get_Knp(const Cmp& nbar1, const Cmp& nbar2, const Cmp& x2,
603 int nzet, int l_min = 0) const ;
604
605
628 void calcule(const Cmp& nbar1, const Cmp& nbar2, const Cmp&
629 x2, int nzet, int l_min, double
630 (Eos_bifluid::*fait)(double, double, double) const,
631 Cmp& resu)
632 const ;
633
656 Cmp get_Knn_ent(const Cmp& ent1, const Cmp& ent2, const Cmp& x2,
657 int nzet, int l_min = 0) const ;
658
681 Cmp get_Kpp_ent(const Cmp& ent1, const Cmp& ent2, const Cmp&
682 x2, int nzet, int l_min = 0) const ;
683
707 Cmp get_Knp_ent(const Cmp& ent1, const Cmp& ent2, const Cmp& x2,
708 int nzet, int l_min = 0) const ;
709
732 void calcule_ent(const Cmp& ent1, const Cmp& ent2, const Cmp&
733 x2, int nzet, int l_min, double
734 (Eos_bifluid::*fait)(double, double, double) const,
735 Cmp& resu)
736 const ;
737
738 // Conversion functions
739 // ---------------------
740
749 virtual Eos* trans2Eos() const = 0 ;
750
751};
752ostream& operator<<(ostream& , const Eos_bifluid& ) ;
753
754
755 //------------------------------------//
756 // class Eos_bf_poly //
757 //------------------------------------//
758
814class Eos_bf_poly : public Eos_bifluid {
815
816 // Data :
817 // -----
818
819 protected:
821 double gam1 ;
822
824 double gam2 ;
825
827 double gam3 ;
828
830 double gam4 ;
831
833 double gam5 ;
834
836 double gam6 ;
837
843 double kap1 ;
844
850 double kap2 ;
851
857 double kap3 ;
858
864 double beta ;
865
866 double gam1m1 ;
867 double gam2m1 ;
868 double gam34m1 ;
869 double gam56m1 ;
870
871 protected:
893 int typeos ;
894
899 double relax ;
900
901 double precis ;
902
904 double ecart ;
905
906
907 // Constructors - Destructor
908 // -------------------------
909 public:
910
929 Eos_bf_poly(double kappa1, double kappa2, double kappa3, double beta) ;
930
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) ;
963
964 Eos_bf_poly(const Eos_bf_poly& ) ;
965
966 protected:
973 Eos_bf_poly(FILE* ) ;
974
981 Eos_bf_poly (const char *fname) ;
982
985 friend Eos_bifluid* Eos_bifluid::eos_from_file(const char *fname ) ;
986
987 public:
988 virtual ~Eos_bf_poly() ;
989
990 // Assignment
991 // ----------
993 void operator=(const Eos_bf_poly& ) ;
994
995
996 // Miscellaneous
997 // -------------
998 public :
1000 virtual bool operator==(const Eos_bifluid& ) const ;
1001
1003 virtual bool operator!=(const Eos_bifluid& ) const ;
1004
1008 virtual int identify() const ;
1009
1011 double get_gam1() const {return gam1 ;};
1012
1014 double get_gam2() const {return gam2 ;};
1015
1017 double get_gam3() const {return gam3 ;};
1018
1020 double get_gam4() const {return gam4 ;};
1021
1023 double get_gam5() const {return gam5 ;};
1024
1026 double get_gam6() const {return gam6 ;};
1027
1032 double get_kap1() const {return kap1 ;};
1033
1038 double get_kap2() const {return kap2 ;};
1039
1044 double get_kap3() const {return kap3 ;};
1045
1050 double get_beta() const {return beta ;};
1051
1052 // Returns (sub)type of bifluid-eos (member \c typeos})
1053 int get_typeos() const {return typeos;};
1054
1055 protected:
1059 void set_auxiliary() ;
1060
1062 void determine_type() ;
1063
1064 // Outputs
1065 // -------
1066
1067 public:
1068 virtual void sauve(FILE* ) const ;
1069
1070 protected:
1071 virtual ostream& operator>>(ostream &) const ;
1072
1073
1074 // Computational functions
1075 // -----------------------
1076
1077 public:
1078
1090 virtual bool nbar_ent_p(const double ent1, const double ent2,
1091 const double delta2, double& nbar1,
1092 double& nbar2) const ;
1093
1099 virtual double nbar_ent_p1(const double ent1) const ;
1100
1106 virtual double nbar_ent_p2(const double ent2) const ;
1107
1119 virtual double ener_nbar_p(const double nbar1, const double nbar2,
1120 const double delta2) const ;
1121
1133 virtual double press_nbar_p(const double nbar1, const double nbar2,
1134 const double delta2) const ;
1135 // Conversion functions
1136 // ---------------------
1137
1144 virtual Eos* trans2Eos() const ;
1145
1161 virtual double get_K11(const double n1, const double n2, const
1162 double delta2) const ;
1163
1179 virtual double get_K12(const double n1, const double n2,const
1180 double delta2) const ;
1181
1196 virtual double get_K22(const double n1, const double n2, const
1197 double delta2) const ;
1198
1199};
1200
1201 //------------------------------------//
1202 // class Eos_bf_poly_newt //
1203 //------------------------------------//
1204
1259
1260 // Data :
1261 // -----
1262
1263 // no new data with respect to Eos_bf_poly
1264
1265 // Constructors - Destructor
1266 // -------------------------
1267 public:
1268
1287 Eos_bf_poly_newt(double kappa1, double kappa2, double kappa3,
1288 double beta) ;
1289
1316 Eos_bf_poly_newt(double gamma1, double gamma2, double gamma3,
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) ;
1322
1323
1325
1326 protected:
1333 Eos_bf_poly_newt(FILE* ) ;
1334
1340 Eos_bf_poly_newt(const char *fname ) ;
1341
1344 friend Eos_bifluid* Eos_bifluid::eos_from_file(const char *fname) ;
1345
1346 public:
1347 virtual ~Eos_bf_poly_newt() ;
1348
1349 // Assignment
1350 // ----------
1352 void operator=(const Eos_bf_poly_newt& ) ;
1353
1354
1355 // Miscellaneous
1356 // -------------
1357
1358 public :
1360 virtual bool operator==(const Eos_bifluid& ) const ;
1361
1363 virtual bool operator!=(const Eos_bifluid& ) const ;
1364
1368 virtual int identify() const ;
1369
1370 // Outputs
1371 // -------
1372
1373 public:
1374 virtual void sauve(FILE* ) const ;
1375
1376 protected:
1377 virtual ostream& operator>>(ostream &) const ;
1378
1379
1380 // Computational functions
1381 // -----------------------
1382
1383 public:
1384
1396 virtual bool nbar_ent_p(const double ent1, const double ent2,
1397 const double delta2, double& nbar1,
1398 double& nbar2) const ;
1399
1406 virtual double nbar_ent_p1(const double ent1) const ;
1407
1413 virtual double nbar_ent_p2(const double ent2) const ;
1414
1426 virtual double ener_nbar_p(const double nbar1, const double nbar2,
1427 const double delta2) const ;
1428
1440 virtual double press_nbar_p(const double nbar1, const double nbar2,
1441 const double delta2) const ;
1442 // Conversion functions
1443 // ---------------------
1444
1451 virtual Eos* trans2Eos() const ;
1452
1468 virtual double get_K11(const double n1, const double n2, const
1469 double delta2) const ;
1470
1486 virtual double get_K12(const double n1, const double n2,const
1487 double delta2) const ;
1488
1503 virtual double get_K22(const double n1, const double n2, const
1504 double delta2) const ;
1505
1506};
1507
1508
1509/* Declaration of the new class Eos_bf_tabul derived from Eos_bifluid */
1510
1511 //------------------------------------//
1512 // class Eos_bf_tabul //
1513 //------------------------------------//
1514
1533
1535
1536 // Data :
1537 // -----
1538
1539 protected:
1541 string tablename ;
1542
1544 string authors ;
1545
1548
1552
1553
1555 double ent1_min ;
1556
1558 double ent1_max ;
1559
1561 double ent2_min ;
1562
1564 double ent2_max ;
1565
1571
1577
1580
1583
1586
1589
1592
1597
1598
1601
1604
1607
1612
1613
1614 // to save the limit curve of nn = 0
1615 Tbl* delta_car_n0 ;
1616 Tbl* mu1_n0 ;
1617 Tbl* mu2_n0 ;
1618 // to save the limit curve of np = 0
1619 Tbl* delta_car_p0 ;
1620 Tbl* mu1_p0 ;
1621 Tbl* mu2_p0 ;
1622
1623 // to save the 1 fluid table //
1624 Tbl* mu1_N ;
1625 Tbl* n_n_N ;
1626 Tbl* press_N ;
1627 Tbl* mu2_P ;
1628 Tbl* n_p_P ;
1629 Tbl* press_P ;
1630
1631
1632 // Constructors - Destructor
1633 // -------------------------
1634 protected:
1635
1644 Eos_bf_tabul(const char* name_i, const char* table, const char* path, double mass1, double mass2) ;
1645
1654 Eos_bf_tabul(const char* name_i, const char* file_name, double mass1, double mass2) ;
1655
1656 private:
1658
1659 protected:
1660
1667 Eos_bf_tabul(FILE* ) ;
1668
1679 Eos_bf_tabul(ifstream& ist, const char* table) ;
1680
1690 Eos_bf_tabul(ifstream& ist) ;
1691
1694 friend Eos_bifluid* Eos_bifluid::eos_from_file(ifstream& ) ;
1695
1696 public:
1697 virtual ~Eos_bf_tabul() ;
1698
1699 // Assignment
1700 // ----------
1701 private :
1703 void operator=(const Eos_bf_tabul& ) ;
1704
1705
1706 // Miscellaneous
1707 // -------------
1708
1709 protected:
1715 void read_table() ;
1716
1717 public :
1719 virtual bool operator==(const Eos_bifluid& ) const ;
1720
1722 virtual bool operator!=(const Eos_bifluid& ) const ;
1723
1727 virtual int identify() const ;
1728
1729
1730 // Outputs
1731 // -------
1732
1733 public:
1734 virtual void sauve(FILE* ) const ;
1735
1736
1737 protected:
1738 virtual ostream& operator>>(ostream &) const ;
1739
1740
1741 // Computational functions
1742 // -----------------------
1743
1744 public:
1768 void calcule_interpol(const Cmp& ent1, const Cmp& ent2, const Cmp& delta2,
1769 Cmp& nbar1, Cmp& nbar2, Cmp& ener, Cmp& press,
1770 Cmp& K_nn, Cmp& K_np, Cmp& K_pp,
1771 int nzet, int l_min = 0) const ;
1772
1784 virtual bool nbar_ent_p(const double ent1, const double ent2,
1785 const double delta2, double& nbar1,
1786 double& nbar2) const ;
1787
1793 virtual double nbar_ent_p1(const double ent1) const ;
1794
1800 virtual double nbar_ent_p2(const double ent2) const ;
1801
1813 virtual double ener_nbar_p(const double nbar1, const double nbar2,
1814 const double delta2) const ;
1815
1827 virtual double press_nbar_p(const double nbar1, const double nbar2,
1828 const double delta2) const ;
1829
1842 virtual double get_K11(const double delta2, const double ent1,
1843 const double ent2) const ;
1844
1857 virtual double get_K12(const double delta2, const double ent1 ,
1858 const double ent2) const ;
1859
1871 virtual double get_K22(const double delta2, const double ent1,
1872 const double ent2) const ;
1873
1884 virtual double ener_ent_p(const double ent1, const double ent2,
1885 const double delta_car) const ;
1886
1897 virtual double press_ent_p(const double ent1, const double ent2,
1898 const double delta_car) const ;
1899
1900
1901
1907 virtual double press_ent_p1(const double ent1) const ;
1908
1914 virtual double press_ent_p2(const double ent2) const ;
1915
1916
1917
1928 virtual double alpha_ent_p(const double ent1, const double ent2,
1929 const double delta_car) const ;
1930
1931
1932 // Conversion function
1933 // ---------------------
1934
1940 virtual Eos* trans2Eos() const ;
1941
1942};
1943
1944
1945}
1946#endif
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition cmp.h:446
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.
Definition eos_bf_file.C:97
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.
Definition eos_bf_file.C:95
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.
Definition eos_bf_file.C:99
void operator=(const Eos_bf_tabul &)
Assignment to another Eos_bf_tabul.
Tbl * logp
Table of .
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 .
string authors
Authors.
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...
string name
EOS name.
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).
Definition eos.h:757
Equation of state base class.
Definition eos.h:190
Parameter storage.
Definition param.h:125
Basic array class.
Definition tbl.h:161
Lorene prototypes.
Definition app_hor.h:64
Coord x
x coordinate centered on the grid
Definition map.h:726