LORENE
eos.h
1 /*
2  * Definition of Lorene classes Eos
3  * Eos_poly
4  * Eos_poly_newt
5  * Eos_incomp
6  * Eos_incomp_newt
7  * Eos_strange
8  * Eos_strange_c
9  *
10  */
11 
12 /*
13  * Copyright (c) 2000-2001 Eric Gourgoulhon
14  *
15  * This file is part of LORENE.
16  *
17  * LORENE is free software; you can redistribute it and/or modify
18  * it under the terms of the GNU General Public License as published by
19  * the Free Software Foundation; either version 2 of the License, or
20  * (at your option) any later version.
21  *
22  * LORENE is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  * GNU General Public License for more details.
26  *
27  * You should have received a copy of the GNU General Public License
28  * along with LORENE; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  *
31  */
32 
33 
34 #ifndef __EOS_H_
35 #define __EOS_H_
36 
37 /*
38  * $Id: eos.h,v 1.27 2023/06/28 13:27:31 g_servignat Exp $
39  * $Log: eos.h,v $
40  * Revision 1.27 2023/06/28 13:27:31 g_servignat
41  * Updated eos_from_file constructor and data of Pseudo_polytrope_1D to support GPP-like formalism in the fitted region
42  *
43  * Revision 1.26 2023/06/14 15:52:09 g_servignat
44  * Files that implement the analytical formulae for the Pseudo-polytrope and Generalised Piecewise-polytrope (not fully working yet)
45  *
46  * Revision 1.25 2021/05/14 15:39:22 g_servignat
47  * Added sound speed computation from enthalpy to Eos class and tabulated+polytropic derived classes
48  *
49  * Revision 1.24 2021/05/06 14:33:17 j_novak
50  * New conversion function from Eos to Dyn_eos.
51  *
52  * Revision 1.23 2017/12/15 15:36:37 j_novak
53  * Improvement of the MEos class. Implementation of automatic offset computation accross different EoSs/domains.
54  *
55  * Revision 1.22 2015/08/04 14:41:28 j_novak
56  * Back to previous version for Eos_CompOSE. Enthalpy-consistent EoS can be accessed using Eos_consistent class (derived from Eos_CompOSE).
57  *
58  * Revision 1.21 2015/03/17 14:19:59 j_novak
59  * New class Hot_eos to deal with temperature-dependent EOSs.
60  *
61  * Revision 1.20 2014/10/13 08:52:33 j_novak
62  * Lorene classes and functions now belong to the namespace Lorene.
63  *
64  * Revision 1.19 2014/10/06 15:09:39 j_novak
65  * Modified #include directives to use c++ syntax.
66  *
67  * Revision 1.18 2012/10/26 14:09:13 e_gourgoulhon
68  * Added new class Eos_Fermi
69  *
70  * Revision 1.17 2011/06/16 10:49:18 j_novak
71  * New class Eos_mag for EOSs depending on density and magnetic field.
72  *
73  * Revision 1.16 2010/02/02 13:21:52 j_novak
74  * New class Eos_Compstar.
75  *
76  * Revision 1.15 2010/01/23 16:27:11 e_gourgoulhon
77  * Improved documentation.
78  *
79  * Revision 1.14 2005/05/22 20:49:12 k_taniguchi
80  * Introduction of a new class Eos_fit_AkmalPR.
81  *
82  * Revision 1.13 2004/09/26 18:51:47 k_taniguchi
83  * Introduction of new classes Eos_fitting, Eos_fit_SLy4, and Eos_fit_FPS
84  *
85  * Revision 1.12 2004/05/07 08:08:29 k_taniguchi
86  * Add the case of Eos_multi_poly.C
87  *
88  * Revision 1.11 2004/03/22 16:10:20 j_novak
89  * Excluding some files
90  *
91  * Revision 1.10 2004/03/22 13:12:40 j_novak
92  * Modification of comments to use doxygen instead of doc++
93  *
94  * Revision 1.9 2004/01/14 15:52:26 f_limousin
95  * Added methods calcule, nbar_ent, der_nbar_ent and der_ener_ent for Scalar.
96  *
97  * Revision 1.8 2003/12/08 15:48:12 m_bejger
98  * GlendNH3 (Glendenning 1985, case 3) added
99  *
100  * Revision 1.7 2002/10/16 14:36:28 j_novak
101  * Reorganization of #include instructions of standard C++, in order to
102  * use experimental version 3 of gcc.
103  *
104  * Revision 1.6 2002/09/13 09:17:31 j_novak
105  * Modif. commentaires
106  *
107  * Revision 1.5 2002/06/17 14:05:16 j_novak
108  * friend functions are now also declared outside the class definition
109  *
110  * Revision 1.4 2002/04/11 13:27:48 e_gourgoulhon
111  * *** empty log message ***
112  *
113  * Revision 1.3 2002/04/09 15:19:03 e_gourgoulhon
114  * Add EOS number 100 in the comments of eos_from_file
115  *
116  * Revision 1.2 2002/04/09 14:32:14 e_gourgoulhon
117  * 1/ Added extra parameters in EOS computational functions (argument par)
118  * 2/ New class MEos for multi-domain EOS
119  *
120  * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
121  * LORENE
122  *
123  * Revision 2.15 2001/09/12 15:54:17 eric
124  * Modif documentation eos_from_file.
125  *
126  * Revision 2.14 2001/06/13 14:12:18 eric
127  * Modif commentaires (mise en conformite Doc++ 3.4.7)
128  *
129  * Revision 2.13 2001/02/07 09:33:42 eric
130  * Suppression des fonctions derent_ent et derent_ent_p.
131  * Ajout des fonctions donnant les derivees de l'EOS:
132  * der_nbar_ent
133  * der_ener_ent
134  * der_press_ent
135  *
136  * Revision 2.12 2000/11/23 14:45:33 eric
137  * Ajout de l'EOS Eos_strange_cr.
138  *
139  * Revision 2.11 2000/11/22 19:28:45 eric
140  * Ajout de #include "eos_tabul.h" a la fin.
141  *
142  * Revision 2.10 2000/10/25 10:55:08 eric
143  * Eos_strange: modif commentaires.
144  *
145  * Revision 2.9 2000/10/24 15:28:43 eric
146  * Ajout de l'EOS matiere etrange (Eos_strange).
147  *
148  * Revision 2.8 2000/06/20 08:34:20 eric
149  * Ajout des membres get_gam(), ... a Eos_ploy
150  *
151  * Revision 2.7 2000/02/14 14:43:22 eric
152  * Modif commentaires.
153  *
154  * Revision 2.6 2000/02/14 14:32:46 eric
155  * Ajout des constructeurs par lecture de fichier formate.
156  *
157  * Revision 2.5 2000/01/21 16:21:12 eric
158  * Modif commentaires.
159  *
160  * Revision 2.4 2000/01/21 15:16:10 eric
161  * Ajout de la fonction identify()
162  * Ajout de la fonction de construction a partir d'un fichier
163  * static Eos* Eos::eos_from_file(FILE* ).
164  * Ajout des operateurs de comparaison == et !=
165  *
166  * Revision 2.3 2000/01/18 16:10:57 eric
167  * Ajout des EOS Eos_incomp et Eos_incomp_newt.
168  *
169  * Revision 2.2 2000/01/18 15:13:28 eric
170  * Ajout de l'equation d'etat Eos_poly_newt.
171  *
172  * Revision 2.1 2000/01/18 13:46:50 eric
173  * Premiere version operationnelle
174  *
175  * Revision 2.0 2000/01/18 10:46:08 eric
176  * *** empty log message ***
177  *
178  *
179  * $Header: /cvsroot/Lorene/C++/Include/eos.h,v 1.27 2023/06/28 13:27:31 g_servignat Exp $
180  *
181  */
182 
183 // Standard C++
184 #include "headcpp.h"
185 #include "utilitaires.h"
186 
187 // Headers C
188 #include <cstdio>
189 
190 // Lorene classes
191 namespace Lorene {
192 class Tbl ;
193 class Cmp ;
194 class Scalar ;
195 class Param ;
196 
197  //------------------------------------//
198  // base class Eos //
199  //------------------------------------//
200 
206 class Eos {
207 
208  // Data :
209  // -----
210 
211  protected:
212  char name[100] ;
213 
214 
215  // Constructors - Destructor
216  // -------------------------
217  protected:
218  Eos() ;
219 
221  explicit Eos(const char* name_i) ;
222 
223  Eos(const Eos& ) ;
224 
225  protected:
232  Eos(FILE* ) ;
233 
239  Eos(ifstream& ) ;
240 
241 
242  public:
243  virtual ~Eos() ;
244 
245 
246  // Name manipulation
247  // -----------------
248  public:
249  const char* get_name() const ;
250 
251 
253  void set_name(const char* name_i) ;
254 
255  // Miscellaneous
256  // -------------
257  public:
261  static Eos* eos_from_file(FILE* ) ;
262 
294  static Eos* eos_from_file(ifstream& ) ;
295 
297  virtual bool operator==(const Eos& ) const = 0 ;
298 
300  virtual bool operator!=(const Eos& ) const = 0 ;
301 
305  virtual int identify() const = 0 ;
306 
307  // Outputs
308  // -------
309 
310  public:
311  virtual void sauve(FILE* ) const ;
312 
314  friend ostream& operator<<(ostream& , const Eos& ) ;
315 
316  protected:
317  virtual ostream& operator>>(ostream &) const = 0 ;
318 
319 
320  // Computational functions
321  // -----------------------
322  protected:
340  void calcule(const Cmp& thermo, int nzet, int l_min,
341  double (Eos::*fait)(double, const Param*) const,
342  Param* par, Cmp& resu) const ;
343 
363  void calcule(const Scalar& thermo, int nzet, int l_min,
364  double (Eos::*fait)(double, const Param*) const,
365  Param* par, Scalar& resu) const ;
366 
367  public:
380  virtual double nbar_ent_p(double ent, const Param* par=0x0) const = 0 ;
381 
402  Cmp nbar_ent(const Cmp& ent, int nzet, int l_min = 0, Param* par=0x0) const ;
403 
425  Scalar nbar_ent(const Scalar& ent, int nzet, int l_min = 0, Param* par=0x0) const ;
426 
439  virtual double ener_ent_p(double ent, const Param* par=0x0) const = 0 ;
440 
460  Cmp ener_ent(const Cmp& ent, int nzet, int l_min = 0, Param* par=0x0) const ;
461 
482  Scalar ener_ent(const Scalar& ent, int nzet, int l_min = 0, Param* par=0x0) const ;
483 
496  virtual double press_ent_p(double ent, const Param* par=0x0) const = 0 ;
497 
498 
518  Cmp press_ent(const Cmp& ent, int nzet, int l_min = 0, Param* par=0x0) const ;
519 
540  Scalar press_ent(const Scalar& ent, int nzet, int l_min = 0, Param* par=0x0) const ;
541 
554  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const = 0 ;
555 
577  Cmp der_nbar_ent(const Cmp& ent, int nzet, int l_min = 0, Param* par=0x0) const ;
578 
601  Scalar der_nbar_ent(const Scalar& ent, int nzet, int l_min = 0, Param* par=0x0) const ;
602 
615  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const = 0 ;
616 
638  Cmp der_ener_ent(const Cmp& ent, int nzet, int l_min = 0, Param* par=0x0) const ;
639 
662  Scalar der_ener_ent(const Scalar& ent, int nzet, int l_min = 0, Param* par=0x0) const ;
663 
676  virtual double der_press_ent_p(double ent, const Param* par=0x0) const = 0 ;
677 
699  Cmp der_press_ent(const Cmp& ent, int nzet, int l_min = 0, Param* par=0x0) const ;
700 
723  Scalar der_press_ent(const Scalar& ent, int nzet, int l_min = 0, Param* par=0x0) const ;
724 
735  virtual double csound_square_ent_p(double ent, const Param* par=0x0) const = 0 ;
736 
756  Scalar csound_square_ent(const Scalar& ent, int nzet, int l_min = 0, Param* par=0x0) const ;
757 };
758 ostream& operator<<(ostream& , const Eos& ) ;
759 
760 
761  //------------------------------------//
762  // class Eos_poly //
763  //------------------------------------//
764 
765 
809 class Eos_poly : public Eos {
810 
811  // Data :
812  // -----
813 
814  protected:
816  double gam ;
817 
823  double kap ;
824 
828  double m_0 ;
829 
834  double mu_0 ;
835 
836 
837 
838  double gam1 ;
839  double unsgam1 ;
840  double gam1sgamkap ;
841  double rel_mu_0 ;
842  double ent_0 ;
843 
844  // Constructors - Destructor
845  // -------------------------
846  public:
847 
861  Eos_poly(double gamma, double kappa) ;
862 
875  Eos_poly(double gamma, double kappa, double mass) ;
876 
893  Eos_poly(double gamma, double kappa, double mass, double mu_zero) ;
894 
895  Eos_poly(const Eos_poly& ) ;
896 
897  protected:
904  Eos_poly(FILE* ) ;
905 
911  Eos_poly(ifstream& ) ;
912 
914  friend Eos* Eos::eos_from_file(FILE* ) ;
915  friend Eos* Eos::eos_from_file(ifstream& ) ;
916 
917  public:
918  virtual ~Eos_poly() ;
919 
920  // Assignment
921  // ----------
923  void operator=(const Eos_poly& ) ;
924 
925 
926  // Miscellaneous
927  // -------------
928 
929  public :
931  virtual bool operator==(const Eos& ) const ;
932 
934  virtual bool operator!=(const Eos& ) const ;
935 
939  virtual int identify() const ;
940 
942  double get_gam() const ;
943 
949  double get_kap() const ;
950 
955  double get_m_0() const ;
956 
960  double get_mu_0() const ;
961 
962  protected:
966  void set_auxiliary() ;
967 
968 
969  // Outputs
970  // -------
971 
972  public:
973  virtual void sauve(FILE* ) const ;
974 
975  protected:
976  virtual ostream& operator>>(ostream &) const ;
977 
978 
979  // Computational functions
980  // -----------------------
981 
982  public:
992  virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
993 
1003  virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
1004 
1014  virtual double press_ent_p(double ent, const Param* par=0x0) const ;
1015 
1025  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
1026 
1036  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
1037 
1047  virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
1048 
1059  virtual double csound_square_ent_p(double ent, const Param* par=0x0) const ;
1060 };
1061 
1062  //------------------------------------//
1063  // class Eos_poly_newt //
1064  //------------------------------------//
1065 
1066 
1067 
1107 class Eos_poly_newt : public Eos_poly {
1108 
1109  // Data :
1110  // -----
1111 
1112  // no new data with respect to Eos_poly
1113 
1114  // Constructors - Destructor
1115  // -------------------------
1116  public:
1117 
1131  Eos_poly_newt(double gamma, double kappa) ;
1132 
1133  Eos_poly_newt(const Eos_poly_newt& ) ;
1134 
1135  protected:
1142  Eos_poly_newt(FILE* ) ;
1143 
1149  Eos_poly_newt(ifstream& ) ;
1150 
1152  friend Eos* Eos::eos_from_file(FILE* ) ;
1153  friend Eos* Eos::eos_from_file(ifstream& ) ;
1154 
1155 
1156  public:
1157  virtual ~Eos_poly_newt() ;
1158 
1159  // Assignment
1160  // ----------
1162  void operator=(const Eos_poly_newt& ) ;
1163 
1164  // Miscellaneous
1165  // -------------
1166 
1167  public :
1169  virtual bool operator==(const Eos& ) const ;
1170 
1172  virtual bool operator!=(const Eos& ) const ;
1173 
1177  virtual int identify() const ;
1178 
1179  // Outputs
1180  // -------
1181 
1182  public:
1183  virtual void sauve(FILE* ) const ;
1184 
1185  protected:
1186  virtual ostream& operator>>(ostream &) const ;
1187 
1188 
1189  // Computational functions
1190  // -----------------------
1191 
1192  public:
1201  virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
1202 
1211  virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
1212 
1221  virtual double press_ent_p(double ent, const Param* par=0x0) const ;
1222 
1231  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
1232 
1241  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
1242 
1251  virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
1252 
1263  virtual double csound_square_ent_p(double, const Param*) const {
1264  c_est_pas_fait(__FILE__) ;
1265  return 0;
1266  } ;
1267 };
1268 
1269  //------------------------------------//
1270  // class Pseudo_polytrope_1D //
1271  //------------------------------------//
1272 
1273 /*
1274  Pseudo-polytropic fit of cold EoS
1275  [Doc to be written]
1276 */
1277 class Pseudo_polytrope_1D : public Eos {
1278  // Data :
1279  // -----
1280 
1281  Tbl* coefs;
1282  double gamma_low, kappa_low, n_lim, ent_lim, m_n, mu_0, Lambda;
1283  int n_coefs ;
1284  Eos_poly* eos_low ;
1285 
1286 
1287  // Constructors - Destructor
1288  // -------------------------
1289  public:
1290 
1299  Pseudo_polytrope_1D(const Tbl&, double, double) ;
1300 
1302 
1303  protected:
1310  Pseudo_polytrope_1D(FILE* ) ;
1311 
1317  Pseudo_polytrope_1D(ifstream& ) ;
1318 
1320  friend Eos* Eos::eos_from_file(FILE* ) ;
1321  friend Eos* Eos::eos_from_file(ifstream& ) ;
1322 
1323 
1324  public:
1325  virtual ~Pseudo_polytrope_1D() ;
1326 
1327  // Assignment
1328  // ----------
1330  void operator=(const Pseudo_polytrope_1D& ) ;
1331 
1332  // Miscellaneous
1333  // -------------
1334 
1335  public :
1337  virtual bool operator==(const Eos& ) const ;
1338 
1340  virtual bool operator!=(const Eos& ) const ;
1341 
1345  virtual int identify() const ;
1346 
1347  // Outputs
1348  // -------
1349 
1350  public:
1351  virtual void sauve(FILE* ) const ;
1352 
1353  protected:
1354  virtual ostream& operator>>(ostream &) const ;
1355 
1356 
1357  // Computational functions
1358  // -----------------------
1359 
1360  public:
1369  virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
1370 
1379  virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
1380 
1389  virtual double press_ent_p(double ent, const Param* par=0x0) const ;
1390 
1399  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
1400 
1409  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
1410 
1419  virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
1420 
1431  virtual double csound_square_ent_p(double, const Param*) const ;
1432 
1433  double get_ent_lim() const { return ent_lim ;} ;
1434  double get_n_lim() const { return n_lim ;} ;
1435 };
1436 
1437  //------------------------------------//
1438  // class Piecewise_polytrope_1D //
1439  //------------------------------------//
1440 
1441 /*
1442  Pseudo-polytropic fit of cold EoS
1443  [Doc to be written]
1444 */
1445 class Piecewise_polytrope_1D : public Eos {
1446  // Data :
1447  // -----
1448 
1449  Tbl *gamma_high, *kappa_high, *Lambda_high, *a_high, *n_lim_high, *ent_lim_high;
1450  double gamma_low, kappa_low, n_lim, ent_lim;
1451  int n_param_high ;
1452  Eos_poly* eos_low ;
1453 
1454 
1455  // Constructors - Destructor
1456  // -------------------------
1457  public:
1458 
1476  Piecewise_polytrope_1D(const Tbl&, const Tbl&, const Tbl&, const Tbl&, const Tbl&, const Tbl&, double, double, double) ;
1477 
1479 
1480  protected:
1487  Piecewise_polytrope_1D(FILE* ) ;
1488 
1494  Piecewise_polytrope_1D(ifstream& ) ;
1495 
1497  friend Eos* Eos::eos_from_file(FILE* ) ;
1498  friend Eos* Eos::eos_from_file(ifstream& ) ;
1499 
1500 
1501  public:
1502  virtual ~Piecewise_polytrope_1D() ;
1503 
1504  // Assignment
1505  // ----------
1507  void operator=(const Piecewise_polytrope_1D& ) ;
1508 
1509  // Miscellaneous
1510  // -------------
1511 
1512  public :
1514  virtual bool operator==(const Eos& ) const ;
1515 
1517  virtual bool operator!=(const Eos& ) const ;
1518 
1522  virtual int identify() const ;
1523 
1524  // Outputs
1525  // -------
1526 
1527  public:
1528  virtual void sauve(FILE* ) const ;
1529 
1530  protected:
1531  virtual ostream& operator>>(ostream &) const ;
1532 
1533 
1534  // Computational functions
1535  // -----------------------
1536 
1537  public:
1546  virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
1547 
1556  virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
1557 
1566  virtual double press_ent_p(double ent, const Param* par=0x0) const ;
1567 
1576  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
1577 
1586  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
1587 
1596  virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
1597 
1608  virtual double csound_square_ent_p(double, const Param*) const ;
1609 
1610  double get_ent_lim() const { return ent_lim ;} ;
1611  Tbl* get_gamma_high() const { return gamma_high;} ;
1612  Tbl* get_kappa_high() const { return kappa_high;} ;
1613  Tbl* get_n_lim_high() const { return n_lim_high;} ;
1614  Tbl* get_ent_lim_high() const { return ent_lim_high;} ;
1615  Tbl* get_Lambda_high() const { return Lambda_high;} ;
1616  Tbl* get_a_high() const { return a_high;} ;
1617 };
1618 
1619  //------------------------------------//
1620  // class Eos_incomp //
1621  //------------------------------------//
1622 
1623 
1632 class Eos_incomp : public Eos {
1633 
1634  // Data :
1635  // -----
1636 
1637  protected:
1639  double rho0 ;
1640 
1644  double ent0 ;
1645 
1646  // Constructors - Destructor
1647  // -------------------------
1648  public:
1649 
1659  Eos_incomp(double rho_c) ;
1660 
1671  Eos_incomp(double rho_c, double ent_c) ;
1672 
1673  Eos_incomp(const Eos_incomp& ) ;
1674 
1675  protected:
1682  Eos_incomp(FILE* ) ;
1683 
1689  Eos_incomp(ifstream& ) ;
1690 
1692  friend Eos* Eos::eos_from_file(FILE* ) ;
1693  friend Eos* Eos::eos_from_file(ifstream& ) ;
1694 
1695  public:
1696  virtual ~Eos_incomp() ;
1697 
1698  // Assignment
1699  // ----------
1701  void operator=(const Eos_incomp& ) ;
1702 
1703 
1704  // Miscellaneous
1705  // -------------
1706 
1707  public :
1709  virtual bool operator==(const Eos& ) const ;
1710 
1712  virtual bool operator!=(const Eos& ) const ;
1713 
1717  virtual int identify() const ;
1718 
1719  // Outputs
1720  // -------
1721 
1722  public:
1723  virtual void sauve(FILE* ) const ;
1724 
1725  protected:
1726  virtual ostream& operator>>(ostream &) const ;
1727 
1728 
1729  // Computational functions
1730  // -----------------------
1731 
1732  public:
1740  virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
1741 
1749  virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
1750 
1758  virtual double press_ent_p(double ent, const Param* par=0x0) const ;
1759 
1767  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
1768 
1776  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
1777 
1785  virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
1786 
1797  virtual double csound_square_ent_p(double, const Param*) const {
1798  c_est_pas_fait(__FILE__) ;
1799  return 0;
1800  } ;
1801 };
1802 
1803  //------------------------------------//
1804  // class Eos_incomp_newt //
1805  //------------------------------------//
1806 
1807 
1816 class Eos_incomp_newt : public Eos_incomp {
1817 
1818  // Data :
1819  // -----
1820 
1821  // no new data with respect to Eos_incomp
1822 
1823  // Constructors - Destructor
1824  // -------------------------
1825  public:
1826 
1836  Eos_incomp_newt(double rho_c) ;
1837 
1848  Eos_incomp_newt(double rho_c, double ent_c) ;
1849 
1850  Eos_incomp_newt(const Eos_incomp_newt& ) ;
1851 
1852  protected:
1859  Eos_incomp_newt(FILE* ) ;
1860 
1866  Eos_incomp_newt(ifstream& ) ;
1867 
1869  friend Eos* Eos::eos_from_file(FILE* ) ;
1870  friend Eos* Eos::eos_from_file(ifstream& ) ;
1871 
1872  public:
1873  virtual ~Eos_incomp_newt() ;
1874 
1875  // Assignment
1876  // ----------
1878  void operator=(const Eos_incomp_newt& ) ;
1879 
1880 
1881  // Miscellaneous
1882  // -------------
1883 
1884  public :
1886  virtual bool operator==(const Eos& ) const ;
1887 
1889  virtual bool operator!=(const Eos& ) const ;
1890 
1894  virtual int identify() const ;
1895 
1896  // Outputs
1897  // -------
1898 
1899  public:
1900  virtual void sauve(FILE* ) const ;
1901 
1902  protected:
1903  virtual ostream& operator>>(ostream &) const ;
1904 
1905 
1906  // Computational functions
1907  // -----------------------
1908 
1909  public:
1917  virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
1918 
1926  virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
1927 
1935  virtual double press_ent_p(double ent, const Param* par=0x0) const ;
1936 
1944  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
1945 
1953  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
1954 
1962  virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
1963 
1974  virtual double csound_square_ent_p(double, const Param*) const {
1975  c_est_pas_fait(__FILE__) ;
1976  return 0;
1977  } ;
1978 };
1979 
1980 
1981  //------------------------------------//
1982  // class Eos_strange //
1983  //------------------------------------//
1984 
1985 
1994 class Eos_strange : public Eos {
1995 
1996  // Data :
1997  // -----
1998 
1999  protected:
2003  double n0_b60 ;
2004 
2006  double b60 ;
2007 
2011  double ent0 ;
2012 
2017  double eps_fit ;
2018 
2022  double rho0_b60 ;
2023 
2027  double n0 ;
2028 
2033  double rho0 ;
2034 
2038  double b34 ;
2039 
2043  double fach ;
2044 
2045  // Constructors - Destructor
2046  // -------------------------
2047  public:
2048 
2064  Eos_strange(double n0_b60_i, double b60_i, double ent0_i,
2065  double eps_fit_i, double rho0_b60_i) ;
2066 
2067 
2068  Eos_strange(const Eos_strange& ) ;
2069 
2070  protected:
2077  Eos_strange(FILE* ) ;
2078 
2084  Eos_strange(ifstream& ) ;
2085 
2087  friend Eos* Eos::eos_from_file(FILE* ) ;
2088  friend Eos* Eos::eos_from_file(ifstream& ) ;
2089 
2090  public:
2091  virtual ~Eos_strange() ;
2092 
2093  // Assignment
2094  // ----------
2096  void operator=(const Eos_strange& ) ;
2097 
2098 
2099  // Miscellaneous
2100  // -------------
2101 
2102  public :
2104  virtual bool operator==(const Eos& ) const ;
2105 
2107  virtual bool operator!=(const Eos& ) const ;
2108 
2112  virtual int identify() const ;
2113 
2117  double get_n0_b60() const {return n0_b60;} ;
2118 
2120  double get_b60() const {return b60;} ;
2121 
2125  double get_ent0() const {return ent0;} ;
2126 
2131  double get_eps_fit() const {return eps_fit;} ;
2132 
2136  double get_rho0_b60() const {return rho0_b60;} ;
2137 
2138  protected:
2143  void set_auxiliary() ;
2144 
2145 
2146  // Outputs
2147  // -------
2148 
2149  public:
2150  virtual void sauve(FILE* ) const ;
2151 
2152  protected:
2153  virtual ostream& operator>>(ostream &) const ;
2154 
2155 
2156  // Computational functions
2157  // -----------------------
2158 
2159  public:
2167  virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
2168 
2176  virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
2177 
2185  virtual double press_ent_p(double ent, const Param* par=0x0) const ;
2186 
2194  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
2195 
2203  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
2204 
2212  virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
2213 
2224  virtual double csound_square_ent_p(double, const Param*) const {
2225  c_est_pas_fait(__FILE__) ;
2226  return 0;
2227  } ;
2228 };
2229 
2230 
2231  //------------------------------------//
2232  // class Eos_strange_cr //
2233  //------------------------------------//
2234 
2235 
2247 class Eos_strange_cr : public Eos {
2248 
2249  // Data :
2250  // -----
2251 
2252  protected:
2256  double n0_b60 ;
2257 
2259  double b60 ;
2260 
2264  double ent0 ;
2265 
2270  double eps_fit ;
2271 
2275  double rho0_b60 ;
2276 
2281  double ent_nd ;
2282 
2288  double rho_nd ;
2289 
2293  double gam ;
2294 
2295  // Derived data:
2296  // -------------
2297 
2301  double n0 ;
2302 
2307  double rho0 ;
2308 
2312  double b34 ;
2313 
2317  double fach ;
2318 
2324  double rho_nd_nucl ;
2325 
2329  double x_nd ;
2330 
2332  double ncr_nd ;
2333 
2335  double delent ;
2336 
2338  double unsgam1 ;
2339 
2341  double gam1sx ;
2342 
2343 
2344  // Constructors - Destructor
2345  // -------------------------
2346  public:
2347 
2369  Eos_strange_cr(double n0_b60_i, double b60_i, double ent0_i,
2370  double eps_fit_i, double rho0_b60_i,
2371  double ent_nd_i, double rho_nd_i,
2372  double gam_i) ;
2373 
2374 
2375  Eos_strange_cr(const Eos_strange_cr& ) ;
2376 
2377  protected:
2384  Eos_strange_cr(FILE* ) ;
2385 
2391  Eos_strange_cr(ifstream& ) ;
2392 
2394  friend Eos* Eos::eos_from_file(FILE* ) ;
2395  friend Eos* Eos::eos_from_file(ifstream& ) ;
2396 
2397  public:
2398  virtual ~Eos_strange_cr() ;
2399 
2400  // Assignment
2401  // ----------
2403  void operator=(const Eos_strange_cr& ) ;
2404 
2405 
2406  // Miscellaneous
2407  // -------------
2408 
2409  public :
2411  virtual bool operator==(const Eos& ) const ;
2412 
2414  virtual bool operator!=(const Eos& ) const ;
2415 
2419  virtual int identify() const ;
2420 
2424  double get_n0_b60() const {return n0_b60;} ;
2425 
2427  double get_b60() const {return b60;} ;
2428 
2432  double get_ent0() const {return ent0;} ;
2433 
2438  double get_eps_fit() const {return eps_fit;} ;
2439 
2443  double get_rho0_b60() const {return rho0_b60;} ;
2444 
2448  double get_ent_nd() const {return ent_nd;} ;
2449 
2455  double get_rho_nd() const {return rho_nd;} ;
2456 
2459  double get_gam() const {return gam;} ;
2460 
2461 
2462 
2463  protected:
2468  void set_auxiliary() ;
2469 
2470 
2471  // Outputs
2472  // -------
2473 
2474  public:
2475  virtual void sauve(FILE* ) const ;
2476 
2477  protected:
2478  virtual ostream& operator>>(ostream &) const ;
2479 
2480 
2481  // Computational functions
2482  // -----------------------
2483 
2484  public:
2492  virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
2493 
2501  virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
2502 
2510  virtual double press_ent_p(double ent, const Param* par=0x0) const ;
2511 
2519  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
2520 
2528  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
2529 
2537  virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
2538 
2549  virtual double csound_square_ent_p(double, const Param*) const {
2550  c_est_pas_fait(__FILE__) ;
2551  return 0;
2552  } ;
2553 };
2554 
2555 
2556  //----------------------------//
2557  // class Eos_Fermi //
2558  //----------------------------//
2559 
2560 
2572 class Eos_Fermi : public Eos {
2573 
2574  // Data :
2575  // -----
2576 
2577  protected:
2581  double m_0 ;
2582 
2585  int g_s ;
2586 
2587 
2589  double n_0 ;
2590 
2594  double ener_0 ;
2595 
2596 
2600  double p_0 ;
2601 
2602  // Constructors - Destructor
2603  // -------------------------
2604  public:
2605 
2611  Eos_Fermi(double mass) ;
2612 
2619  Eos_Fermi(double mass, int g_degen) ;
2620 
2621  Eos_Fermi(const Eos_Fermi& ) ;
2622 
2623  protected:
2630  Eos_Fermi(FILE* ) ;
2631 
2637  Eos_Fermi(ifstream& ) ;
2638 
2640  friend Eos* Eos::eos_from_file(FILE* ) ;
2641  friend Eos* Eos::eos_from_file(ifstream& ) ;
2642 
2643  public:
2644  virtual ~Eos_Fermi() ;
2645 
2646  // Assignment
2647  // ----------
2649  void operator=(const Eos_Fermi& ) ;
2650 
2651 
2652  // Miscellaneous
2653  // -------------
2654 
2655  public :
2657  virtual bool operator==(const Eos& ) const ;
2658 
2660  virtual bool operator!=(const Eos& ) const ;
2661 
2665  virtual int identify() const ;
2666 
2668  double get_m() const ;
2669 
2671  int get_g_degen() const ;
2672 
2673  protected:
2676  void set_auxiliary() ;
2677 
2678 
2679  // Outputs
2680  // -------
2681 
2682  public:
2683  virtual void sauve(FILE* ) const ;
2684 
2685  protected:
2686  virtual ostream& operator>>(ostream &) const ;
2687 
2688 
2689  // Computational functions
2690  // -----------------------
2691 
2692  public:
2700  virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
2701 
2709  virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
2710 
2718  virtual double press_ent_p(double ent, const Param* par=0x0) const ;
2719 
2727  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
2728 
2736  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
2737 
2745  virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
2746 
2757  virtual double csound_square_ent_p(double, const Param*) const {
2758  c_est_pas_fait(__FILE__) ;
2759  return 0;
2760  } ;
2761 };
2762 
2763 
2764 
2765 
2766  //------------------------------//
2767  // EOS with domain dependency //
2768  //------------------------------//
2769 
2775 class MEos : public Eos {
2776 
2777  // Data :
2778  // -----
2779 
2780  protected:
2782  const Eos** mono_eos ;
2783 
2785  int ndom ;
2786 
2789 
2790  // Constructors - Destructor
2791  // -------------------------
2792  public:
2793 
2798  MEos(int ndom_i, const Eos** mono_eos_i) ;
2799 
2801  MEos(const Eos& eos1, const Eos& eos2) ;
2802 
2804  MEos(const Eos& eos1, const Eos& eos2, const Eos& eos3) ;
2805 
2807  MEos(const Eos& eos1, const Eos& eos2, const Eos& eos3, const Eos& eos4) ;
2808 
2809  MEos(const MEos& ) ;
2810 
2811  protected:
2818  MEos(FILE* ) ;
2819 
2825  MEos(ifstream& ) ;
2826 
2828  friend Eos* Eos::eos_from_file(FILE* ) ;
2829  friend Eos* Eos::eos_from_file(ifstream& ) ;
2830 
2831  public:
2832  virtual ~MEos() ;
2833 
2834  // Assignment
2835  // ----------
2837  void operator=(const MEos& ) ;
2838 
2839 
2840  // Miscellaneous
2841  // -------------
2842 
2843  public :
2845  virtual bool operator==(const Eos& ) const ;
2846 
2848  virtual bool operator!=(const Eos& ) const ;
2849 
2853  virtual int identify() const ;
2854 
2855  // Outputs
2856  // -------
2857 
2858  public:
2859  virtual void sauve(FILE* ) const ;
2860 
2861  protected:
2862  virtual ostream& operator>>(ostream &) const ;
2863 
2864 
2865  // Computational functions
2866  // -----------------------
2867 
2868  public:
2878  virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
2879 
2889  virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
2890 
2900  virtual double press_ent_p(double ent, const Param* par=0x0) const ;
2901 
2911  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
2912 
2922  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
2923 
2933  virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
2934 
2945  virtual double csound_square_ent_p(double, const Param*) const {
2946  c_est_pas_fait(__FILE__) ;
2947  return 0;
2948  } ;
2949 };
2950 
2951 }
2952  //------------------//
2953  // Remaining EOS //
2954  //------------------//
2955 
2956 #include "eos_tabul.h"
2957 #include "eos_compose.h"
2958 #include "eos_mag.h"
2959 
2960 #endif
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
Definition: eos_poly.C:398
virtual bool operator==(const Eos &) const =0
Comparison operator (egality)
double eps_fit
Fitting parameter related to the square of sound velocity by .
Definition: eos.h:2270
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the log-enthalpy.
Definition: eos_strange.C:317
double get_rho0_b60() const
Returns the energy density at zero pressure divided by .
Definition: eos.h:2136
virtual ostream & operator>>(ostream &) const
Operator >>
virtual bool operator==(const Eos &) const
Comparison operator (egality)
double get_n0_b60() const
Returns the baryon density at zero pressure divided by [unit: ].
Definition: eos.h:2117
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the specific enthalpy.
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_poly.C:455
virtual ~Eos_incomp_newt()
Destructor.
double unsgam1
Definition: eos.h:839
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the specific enthalpy.
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
double b34
Definition: eos.h:2038
int get_g_degen() const
Returns the degeneracy factor.
Definition: eos_fermi.C:169
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
Definition: eos_strange.C:332
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: meos.C:326
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: meos.C:348
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition: cmp.h:446
double rho_nd_nucl
Energy density at neutron drip point, defining the boundary between crust and core [unit: rho_unit ]...
Definition: eos.h:2324
Cmp ener_ent(const Cmp &ent, int nzet, int l_min=0, Param *par=0x0) const
Computes the total energy density from the log-enthalpy and extra parameters.
Definition: eos.C:387
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
void operator=(const Eos_poly_newt &)
Assignment to another Eos_poly_newt.
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual double der_press_ent_p(double ent, const Param *par=0x0) const =0
Computes the logarithmic derivative from the log-enthalpy and extra parameters (virtual function imp...
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the specific enthalpy.
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const =0
Computes the logarithmic derivative from the log-enthalpy and extra parameters (virtual function imp...
Cmp der_nbar_ent(const Cmp &ent, int nzet, int l_min=0, Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy and extra parameters.
Definition: eos.C:431
const char * get_name() const
Returns the EOS name.
Definition: eos.C:179
virtual ostream & operator>>(ostream &) const
Operator >>
void operator=(const Eos_strange &)
Assignment to another Eos_strange.
Definition: eos_strange.C:175
double x_nd
Ratio of pressure to energy density at neutron drip point.
Definition: eos.h:2329
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_strange.C:382
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_fermi.C:314
void operator=(const MEos &)
Assignment to another MEos.
Definition: meos.C:204
virtual double csound_square_ent_p(double, const Param *) const
Computes the sound speed squared from the enthapy with extra parameters (virtual function implemente...
Definition: eos.h:1797
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual bool operator==(const Eos &) const
Comparison operator (egality)
Definition: meos.C:248
Lorene prototypes.
Definition: app_hor.h:67
virtual ~Eos_Fermi()
Destructor.
Definition: eos_fermi.C:126
MEos(int ndom_i, const Eos **mono_eos_i)
Standard constructor.
Definition: meos.C:88
Equation of state base class.
Definition: eos.h:206
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
void operator=(const Piecewise_polytrope_1D &)
Assignment to another Piecewise_polytrope_1D.
virtual ~Eos_incomp()
Destructor.
Definition: eos_incomp.C:148
int ndom
Number of domains.
Definition: eos.h:2785
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
Definition: eos_incomp.C:202
virtual int identify() const =0
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_incomp.C:286
Tensor field of valence 0 (or component of a tensorial field).
Definition: scalar.h:393
Scalar csound_square_ent(const Scalar &ent, int nzet, int l_min=0, Param *par=0x0) const
Computes the sound speed squared from the enthalpy with extra parameters.
Definition: eos.C:499
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
virtual ~Eos_poly()
Destructor.
Definition: eos_poly.C:230
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the specific enthalpy.
virtual void sauve(FILE *) const
Save in a file.
Definition: eos_strange.C:278
virtual bool operator==(const Eos &) const
Comparison operator (egality)
Definition: eos_strange.C:214
virtual void sauve(FILE *) const
Save in a file.
double get_gam() const
Returns the adiabatic index for the crust model.
Definition: eos.h:2459
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the specific enthalpy.
virtual void sauve(FILE *) const
Save in a file.
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_fermi.C:304
void operator=(const Eos_Fermi &)
Assignment to another Eos_Fermi.
Definition: eos_fermi.C:135
double ent_nd
Log-enthalpy at neutron drip point, defining the boundary between crust and core. ...
Definition: eos.h:2281
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
double rho0
Constant density .
Definition: eos.h:1639
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the log-enthalpy.
Definition: eos_fermi.C:251
double rel_mu_0
Definition: eos.h:841
double rho_nd
Energy density at neutron drip point, defining the boundary between crust and core [unit: ]...
Definition: eos.h:2288
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the specific enthalpy.
virtual double csound_square_ent_p(double, const Param *) const
Computes the sound speed squared from the enthapy with extra parameters (virtual function implemente...
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_poly.C:421
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: meos.C:228
double get_b60() const
Returns the bag constant [unit: ].
Definition: eos.h:2427
double ent_0
Enthalpy at zero pressure ( )
Definition: eos.h:842
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the specific enthalpy.
double ener_0
Energy density scale [unit: ], where ].
Definition: eos.h:2594
double rho0_b60
Energy density at zero pressure divided by .
Definition: eos.h:2022
virtual bool operator!=(const Eos &) const =0
Comparison operator (difference)
virtual double press_ent_p(double ent, const Param *par=0x0) const =0
Computes the pressure from the log-enthalpy and extra parameters (virtual function implemented in the...
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: eos_incomp.C:223
EOS with domain dependency.
Definition: eos.h:2775
double n0_b60
Baryon density at zero pressure divided by .
Definition: eos.h:2003
Piecewise_polytrope_1D(const Tbl &, const Tbl &, const Tbl &, const Tbl &, const Tbl &, const Tbl &, double, double, double)
Standard constructor.
double get_gam() const
Returns the adiabatic index (cf. Eq. (3))
Definition: eos_poly.C:271
virtual void sauve(FILE *) const
Save in a file.
Definition: eos_fermi.C:224
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the specific enthalpy.
Eos_strange_cr(double n0_b60_i, double b60_i, double ent0_i, double eps_fit_i, double rho0_b60_i, double ent_nd_i, double rho_nd_i, double gam_i)
Standard constructor.
void set_auxiliary()
Computes the auxiliary quantities n_0 , ener_0.
Definition: eos_fermi.C:151
double kap
Pressure coefficient (cf.
Definition: eos.h:823
virtual void sauve(FILE *) const
Save in a file.
Definition: eos.C:189
Eos()
Standard constructor.
Definition: eos.C:118
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_fermi.C:324
virtual double ener_ent_p(double ent, const Param *par=0x0) const =0
Computes the total energy density from the log-enthalpy and extra parameters (virtual function implem...
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
double ncr_nd
Rescaled number density at neutron drip point.
Definition: eos.h:2332
double ent0
Log-enthalpy threshold for setting the energy density to a non zero value (should be negative)...
Definition: eos.h:2011
Cmp nbar_ent(const Cmp &ent, int nzet, int l_min=0, Param *par=0x0) const
Computes the baryon density field from the log-enthalpy field and extra parameters.
Definition: eos.C:362
virtual void sauve(FILE *) const
Save in a file.
Definition: eos_incomp.C:214
double get_b60() const
Returns the bag constant [unit: ].
Definition: eos.h:2120
Strange matter EOS (MIT Bag model).
Definition: eos.h:1994
double gam1sgamkap
Definition: eos.h:840
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_incomp.C:314
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
Definition: meos.C:315
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: eos_fermi.C:233
double gam1
Definition: eos.h:838
Eos_strange(double n0_b60_i, double b60_i, double ent0_i, double eps_fit_i, double rho0_b60_i)
Standard constructor.
Definition: eos_strange.C:101
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
Degenerate ideal Fermi gas.
Definition: eos.h:2572
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: eos_poly.C:362
double n0
Baryon density at zero pressure.
Definition: eos.h:2301
virtual double csound_square_ent_p(double, const Param *) const
Computes the sound speed squared from the enthapy with extra parameters (virtual function implemente...
Definition: eos.h:2224
double rho0
Energy density at zero pressure.
Definition: eos.h:2033
virtual double nbar_ent_p(double ent, const Param *par=0x0) const =0
Computes the baryon density from the log-enthalpy and extra parameters (virtual function implemented ...
double m_0
Individual particule mass (cf.
Definition: eos.h:828
static Eos * eos_from_file(FILE *)
Construction of an EOS from a binary file.
void set_auxiliary()
Computes the auxiliary quantities gam1 , unsgam1 , gam1sgamkap from the values of gam and kap...
Definition: eos_poly.C:257
double get_kap() const
Returns the pressure coefficient (cf.
Definition: eos_poly.C:275
double get_m_0() const
Return the individual particule mass (cf.
Definition: eos_poly.C:279
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
virtual bool operator==(const Eos &) const
Comparison operator (egality)
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the specific enthalpy.
double get_ent0() const
Returns the log-enthalpy threshold for setting the energy density to a non zero value (should be nega...
Definition: eos.h:2125
Pseudo_polytrope_1D(const Tbl &, double, double)
Standard constructor.
double p_0
Pressure scale [unit: ], where ].
Definition: eos.h:2600
double fach
Factor .
Definition: eos.h:2043
void operator=(const Eos_poly &)
Assignment to another Eos_poly.
Definition: eos_poly.C:239
const Eos ** mono_eos
Array (upon the domains) containing the various EOS.
Definition: eos.h:2782
virtual ~Eos_strange_cr()
Destructor.
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_strange.C:367
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the log-enthalpy.
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the log-enthalpy.
Definition: eos_poly.C:383
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_incomp.C:300
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the specific enthalpy.
double delent
Enthalpy shift in quark phase.
Definition: eos.h:2335
Parameter storage.
Definition: param.h:125
Polytropic equation of state (relativistic case).
Definition: eos.h:809
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the specific enthalpy.
double m_0
Individual particule mass [unit: eV/c2].
Definition: eos.h:2581
virtual void sauve(FILE *) const
Save in a file.
Definition: eos_poly.C:350
virtual double csound_square_ent_p(double, const Param *) const
Computes the sound speed squared from the enthapy with extra parameters (virtual function implemente...
virtual double csound_square_ent_p(double ent, const Param *par=0x0) const
Computes the sound speed squared from the enthapy with extra parameters (virtual function implemente...
Definition: eos_poly.C:469
double fach
Factor .
Definition: eos.h:2317
virtual double csound_square_ent_p(double ent, const Param *par=0x0) const =0
Computes the sound speed squared from the enthapy with extra parameters (virtual function implemente...
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the specific enthalpy.
Eos_poly(double gamma, double kappa)
Standard constructor (sets both m_0 and mu_0 to 1).
Definition: eos_poly.C:141
void operator=(const Eos_strange_cr &)
Assignment to another Eos_strange.
double ent0
Log-enthalpy threshold for setting the energy density to a non zero value (should be negative)...
Definition: eos.h:2264
virtual bool operator==(const Eos &) const
Comparison operator (egality)
virtual bool operator==(const Eos &) const
Comparison operator (egality)
Definition: eos_incomp.C:170
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
Definition: eos_poly.C:410
double get_ent0() const
Returns the log-enthalpy threshold for setting the energy density to a non zero value (should be nega...
Definition: eos.h:2432
double rho0_b60
Energy density at zero pressure divided by .
Definition: eos.h:2275
double get_eps_fit() const
Returns the fitting parameter related to the square of sound velocity by .
Definition: eos.h:2131
double get_mu_0() const
Return the relativistic chemical potential at zero pressure [unit: , with ].
Definition: eos_poly.C:283
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the specific enthalpy.
virtual bool operator==(const Eos &) const
Comparison operator (egality)
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
Definition: meos.C:303
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
Definition: eos_incomp.C:257
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the log-enthalpy.
Definition: eos_incomp.C:243
virtual double csound_square_ent_p(double, const Param *) const
Computes the sound speed squared from the enthapy with extra parameters (virtual function implemente...
Definition: eos.h:2757
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
Definition: eos_strange.C:268
double rho0
Energy density at zero pressure.
Definition: eos.h:2307
virtual double csound_square_ent_p(double, const Param *) const
Computes the sound speed squared from the enthapy with extra parameters (virtual function implemente...
Definition: eos.h:2549
bool constructed_from_file
Indicates wether the EOS has been constructed from a file.
Definition: eos.h:2788
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the specific enthalpy.
Polytropic equation of state (Newtonian case).
Definition: eos.h:1107
void operator=(const Eos_incomp_newt &)
Assignment to another Eos_incomp_newt.
void set_auxiliary()
Computes the auxiliary quantities n0 , rh0 , b34 and fach from the values of the other parameters...
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the specific enthalpy.
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
Definition: eos_fermi.C:213
virtual double csound_square_ent_p(double, const Param *) const
Computes the sound speed squared from the enthapy with extra parameters (virtual function implemente...
Definition: eos.h:2945
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: meos.C:337
double get_rho0_b60() const
Returns the energy density at zero pressure divided by .
Definition: eos.h:2443
double n0
Baryon density at zero pressure.
Definition: eos.h:2027
double gam
Adiabatic index (cf. Eq. (3))
Definition: eos.h:816
virtual bool operator==(const Eos &) const
Comparison operator (egality)
Definition: eos_poly.C:293
void operator=(const Pseudo_polytrope_1D &)
Assignment to another Pseudo_polytrope_1D.
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: eos_strange.C:290
double ent0
Log-enthalpy threshold for setting the energy density to a non zero value (should be negative)...
Definition: eos.h:1644
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
Definition: eos_strange.C:350
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual ostream & operator>>(ostream &) const
Operator >>
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the specific enthalpy.
double eps_fit
Fitting parameter related to the square of sound velocity by .
Definition: eos.h:2017
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
Definition: eos_incomp.C:271
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the specific enthalpy.
void c_est_pas_fait(const char *)
Helpful function to say something is not implemented yet.
virtual ~Eos()
Destructor.
Definition: eos.C:162
double gam
Adiabatic index for the crust model.
Definition: eos.h:2293
void set_name(const char *name_i)
Sets the EOS name.
Definition: eos.C:173
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
Definition: eos_poly.C:339
double n0_b60
Baryon density at zero pressure divided by .
Definition: eos.h:2256
void set_auxiliary()
Computes the auxiliary quantities n0 , rh0 , b34 and fach from the values of the other parameters...
Definition: eos_strange.C:194
Cmp der_ener_ent(const Cmp &ent, int nzet, int l_min=0, Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy and extra parameters.
Definition: eos.C:454
void operator=(const Eos_incomp &)
Assignment to another Eos_incomp.
Definition: eos_incomp.C:157
double n_0
Number density scale [unit: ].
Definition: eos.h:2589
double get_n0_b60() const
Returns the baryon density at zero pressure divided by [unit: ].
Definition: eos.h:2424
virtual ~MEos()
Destructor.
Definition: meos.C:188
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the specific enthalpy.
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the specific enthalpy.
double b60
Bag constant [unit: ].
Definition: eos.h:2259
virtual ostream & operator>>(ostream &) const =0
Operator >>
double get_m() const
Returns the fermion mass in eV/c2.
Definition: eos_fermi.C:165
double b60
Bag constant [unit: ].
Definition: eos.h:2006
double get_rho_nd() const
Returns the energy density at neutron drip point, defining the boundary between crust and core [unit:...
Definition: eos.h:2455
char name[100]
EOS name.
Definition: eos.h:212
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the specific enthalpy.
virtual bool operator==(const Eos &) const
Comparison operator (egality)
Definition: eos_fermi.C:180
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
Definition: meos.C:276
int g_s
Degeneracy parameter.
Definition: eos.h:2585
Basic array class.
Definition: tbl.h:161
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
Definition: eos_fermi.C:285
virtual ~Eos_poly_newt()
Destructor.
Eos_incomp_newt(double rho_c)
Standard constructor.
virtual ~Pseudo_polytrope_1D()
Destructor.
double get_eps_fit() const
Returns the fitting parameter related to the square of sound velocity by .
Definition: eos.h:2438
virtual ~Piecewise_polytrope_1D()
Destructor.
virtual ostream & operator>>(ostream &) const
Operator >>
double get_ent_nd() const
Returns the log-enthalpy at neutron drip point, defining the boundary between crust and core...
Definition: eos.h:2448
virtual ostream & operator>>(ostream &) const
Operator >>
Equation of state of incompressible matter (Newtonian case).
Definition: eos.h:1816
double mu_0
Relativistic chemical potential at zero pressure [unit: , with ].
Definition: eos.h:834
Cmp der_press_ent(const Cmp &ent, int nzet, int l_min=0, Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy and extra parameters.
Definition: eos.C:476
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_strange.C:400
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the specific enthalpy.
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the specific enthalpy.
Eos_incomp(double rho_c)
Standard constructor.
Definition: eos_incomp.C:102
virtual double csound_square_ent_p(double, const Param *) const
Computes the sound speed squared from the enthapy with extra parameters (virtual function implemente...
Definition: eos.h:1974
virtual void sauve(FILE *) const
Save in a file.
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the specific enthalpy.
Strange matter EOS (MIT Bag model) with crust.
Definition: eos.h:2247
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
void calcule(const Cmp &thermo, int nzet, int l_min, double(Eos::*fait)(double, const Param *) const, Param *par, Cmp &resu) const
General computational method for Cmp &#39;s.
Definition: eos.C:213
virtual bool operator==(const Eos &) const
Comparison operator (egality)
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_poly.C:436
friend ostream & operator<<(ostream &, const Eos &)
Display.
Definition: eos.C:201
virtual double csound_square_ent_p(double, const Param *) const
Computes the sound speed squared from the enthapy with extra parameters (virtual function implemente...
Definition: eos.h:1263
Equation of state of incompressible matter (relativistic case).
Definition: eos.h:1632
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const =0
Computes the logarithmic derivative from the log-enthalpy with extra parameters (virtual function im...
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
Definition: eos_fermi.C:267
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the log-enthalpy.
Definition: meos.C:290
Cmp press_ent(const Cmp &ent, int nzet, int l_min=0, Param *par=0x0) const
Computes the pressure from the log-enthalpy and extra parameters.
Definition: eos.C:409
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the specific enthalpy.
Eos_poly_newt(double gamma, double kappa)
Standard constructor.
Definition: eos_poly_newt.C:97
virtual void sauve(FILE *) const
Save in a file.
Definition: meos.C:216
virtual ~Eos_strange()
Destructor.
Definition: eos_strange.C:165
Eos_Fermi(double mass)
Standard constructor (sets g_s to 2).
Definition: eos_fermi.C:65
virtual void sauve(FILE *) const
Save in a file.
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
virtual void sauve(FILE *) const
Save in a file.