LORENE
hoteos.h
1 /*
2  * Definition of Lorene class Hot_eos.
3  *
4  */
5 
6 /*
7  * Copyright (c) 2015 Jerome Novak
8  *
9  * This file is part of LORENE.
10  *
11  * LORENE is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License version 2
13  * as published by the Free Software Foundation.
14  *
15  * LORENE is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with LORENE; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23  *
24  */
25 
26 #ifndef __HOTEOS_H_
27 #define __HOTEOS_H_
28 
29 /*
30  * $Id: hoteos.h,v 1.9 2024/01/26 17:44:25 g_servignat Exp $
31  * $Log: hoteos.h,v $
32  * Revision 1.9 2024/01/26 17:44:25 g_servignat
33  * Updated the Pseudopolytrope_1D class to be consistent with the paper (i.e. with a GPP in the middle)
34  *
35  * Revision 1.8 2022/05/06 09:51:29 g_servignat
36  * Removed chi2 computation function from Ye EoS representation
37  *
38  * Revision 1.7 2022/04/06 12:38:06 g_servignat
39  * Added source computation routine and source reading in table for electronic fraction advection equation
40  *
41  * Revision 1.6 2022/03/01 10:03:07 g_servignat
42  * Corrected all pure virtual interference between Hot_eos derived classes ; amended use of interpol_linear_2D
43  *
44  * Revision 1.5 2022/02/25 11:59:43 g_servignat
45  * Compilation error corrections (correctly using class inheritance)
46  *
47  * Revision 1.4 2022/02/25 10:44:50 g_servignat
48  * Added Ye_eos_tabul derived class to Hot_eos class for tabulated 2D equations of state with H and Y_e as parameters
49  *
50  * Revision 1.3 2015/12/08 10:52:17 j_novak
51  * New class Hoteos_tabul for tabulated temperature-dependent EoSs.
52  *
53  * Revision 1.2 2015/09/10 13:28:00 j_novak
54  * New methods for the class Hot_Eos
55  *
56  * Revision 1.1 2015/03/17 14:19:59 j_novak
57  * New class Hot_eos to deal with temperature-dependent EOSs.
58  *
59  *
60  * $Header: /cvsroot/Lorene/C++/Include/hoteos.h,v 1.9 2024/01/26 17:44:25 g_servignat Exp $
61  *
62  */
63 
64 //C++ headers
65 #include "headcpp.h"
66 
67 //C headers
68 #include<cstdio>
69 #include "tbl.h"
70 
71 namespace Lorene{
72 
73 class Scalar ;
74 class Param ;
75 class Eos ;
76  //------------------------------------//
77  // class Hot_eos //
78  //------------------------------------//
79 
85  class Hot_eos {
86 
87  // Data :
88  // -----
89  protected:
90  string name ;
91 
92  // Constructors - Destructor
93  // -------------------------
94  protected:
95  Hot_eos() ;
96 
98  explicit Hot_eos(const string&) ;
99 
101  explicit Hot_eos(const char*) ;
102 
103  Hot_eos(const Hot_eos& ) ;
104 
111  Hot_eos(FILE* ) ;
112 
118  Hot_eos(ifstream& ) ;
119 
120  public:
121  virtual ~Hot_eos() ;
122 
123  // Derived data :
124  // ------------
125  protected:
126  mutable Eos* p_cold_eos ;
127 
129  virtual void del_deriv() const ;
130 
132  void set_der_0x0() const ;
133 
134  // Name manipulation
135  // -----------------
136  public:
138  const string& get_name() const {return name; };
139 
141  void set_name(const char* ) ;
142 
143  // Miscellaneous
144  // -------------
145  public:
149  static Hot_eos* hoteos_from_file(FILE* ) ;
150 
162  static Hot_eos* hoteos_from_file(ifstream& ) ;
163 
165  virtual bool operator==(const Hot_eos& ) const = 0 ;
166 
168  virtual bool operator!=(const Hot_eos& ) const = 0 ;
169 
173  virtual int identify() const = 0 ;
174 
175  // Outputs
176  // -------
177 
178  public:
179  virtual void sauve(FILE* ) const ;
180 
182  friend ostream& operator<<(ostream& , const Hot_eos& ) ;
183 
184  protected:
185  virtual ostream& operator>>(ostream &) const = 0 ;
186 
187  public:
189  virtual const Eos& new_cold_Eos() const = 0 ;
190 
191  // virtual const string fetch_
192 
193  // Computational functions
194  // -----------------------
195  protected:
214  void calcule(const Scalar& thermo1, const Scalar& thermo2, int nzet, int l_min,
215  double (Hot_eos::*fait)(double, double) const, Scalar& resu) const ;
216 
217  public:
230  virtual double nbar_Hs_p(double ent, double sb) const = 0 ;
231 
252  Scalar nbar_Hs(const Scalar& ent, const Scalar& sb, int nzet, int l_min = 0) const ;
253 
266  virtual double ener_Hs_p(double ent, double sb) const = 0 ;
267 
287  Scalar ener_Hs(const Scalar& ent, const Scalar& sb, int nzet, int l_min = 0) const ;
288 
301  virtual double press_Hs_p(double ent, double sb) const = 0 ;
302 
321  Scalar press_Hs(const Scalar& ent, const Scalar& sb, int nzet, int l_min = 0) const ;
322 
335  virtual double temp_Hs_p(double ent, double sb) const = 0 ;
336 
357  Scalar temp_Hs(const Scalar& ent, const Scalar& sb, int nzet, int l_min = 0) const ;
358 
359 
370  virtual double csound_square_Hs_p(double ent, const double ye) const = 0;
371 
382  virtual double chi2_Hs_p(double ent, const double ye) const = 0;
383 
403  Scalar chi2_Hs(const Scalar& ent, const Scalar& Ye, int nzet, int l_min = 0) const ;
404 
415  virtual double mul_Hs_p(double ent, const double ye) const = 0;
416 
436  Scalar mul_Hs(const Scalar& ent, const Scalar& Ye, int nzet, int l_min = 0) const ;
437 
457  Scalar csound_square_Hs(const Scalar& ent, const Scalar& Y_e, int nzet, int l_min = 0) const ;
458 
469  virtual double sigma_Hs_p(double ent, const double ye) const = 0 ;
470 
490  Scalar sigma_Hs(const Scalar& ent, const Scalar& Y_e, int nzet, int l_min = 0) const ;
491  };
492  ostream& operator<<(ostream& , const Hot_eos& ) ;
493 
494  //------------------------------------//
495  // class Ideal_gas //
496  //----------------------------------//
497 
513  class Ideal_gas : public Hot_eos {
514 
515  // Data :
516  //-------
517 
518  protected:
520  double gam ;
521 
527  double kap ;
528 
532  double m_0 ;
533 
534  double gam1 ;
535  double unsgam1 ;
536  double gam1sgamkap ;
537 
538  // Constructors - Destructor
539  // -------------------------
540  public:
541 
551  Ideal_gas(double gamma, double kappa, double mass=1.) ;
552 
553  Ideal_gas(const Ideal_gas& ) ;
554 
555  protected:
562  Ideal_gas(FILE* ) ;
563 
569  Ideal_gas(ifstream& ) ;
570 
572  friend Hot_eos* Hot_eos::hoteos_from_file(FILE* ) ;
573  friend Hot_eos* Hot_eos::hoteos_from_file(ifstream& ) ;
574 
575  public:
576  virtual ~Ideal_gas() ;
577 
578  // Assignment
579  // ----------
581  void operator=(const Ideal_gas& ) ;
582 
583  // Miscellaneous
584  // -------------
585 
586  public :
588  virtual bool operator==(const Hot_eos& ) const ;
589 
591  virtual bool operator!=(const Hot_eos& ) const ;
592 
596  virtual int identify() const ;
597 
599  double get_gam() const ;
600 
602  double get_kap() const ;
603 
607  double get_m_0() const ;
608 
609  virtual const Eos& new_cold_Eos() const ;
610 
611  protected:
615  void set_auxiliary() ;
616 
617  // Outputs
618  // -------
619 
620  public:
621  virtual void sauve(FILE* ) const ;
622 
623  protected:
624  virtual ostream& operator>>(ostream &) const ;
625 
626 
627  // Computational functions
628  // -----------------------
629 
630  public:
643  virtual double nbar_Hs_p(double ent, double sb) const ;
644 
657  virtual double ener_Hs_p(double ent, double sb) const ;
658 
671  virtual double press_Hs_p(double ent, double sb) const ;
672 
685  virtual double temp_Hs_p(double ent, double sb) const ;
686 
697  virtual double csound_square_Hs_p(double ent, const double ye) const ;
698 
709  virtual double chi2_Hs_p(double ent, const double ye) const ;
710 
721  virtual double mul_Hs_p(double ent, const double ye) const ;
722 
733  virtual double sigma_Hs_p(double ent, const double ye) const ;
734 
735 };
736 
737  //------------------------------------//
738  // class Hoteos_tabul //
739  //------------------------------------//
740 
748  class Hoteos_tabul : public Hot_eos {
749 
750  // Data :
751  //-------
752 
753  protected:
755  string tablename ;
756 
757  string authors ;
758 
760  double hmin ;
761 
763  double hmax ;
764 
766  double sbmin ;
767 
769  double sbmax ;
770 
772  Tbl* hhh ;
773 
775  Tbl* s_B ;
776 
778  Tbl* ppp ;
779 
782 
785 
787  Tbl* d2p ;
788 
789 
790  // Constructors - Destructor
791  // -------------------------
792  public:
793 
796  Hoteos_tabul(const string& filename) ;
797 
798  Hoteos_tabul(const Hoteos_tabul& ) ;
799 
800  protected:
807  Hoteos_tabul(FILE* ) ;
808 
814  Hoteos_tabul(ifstream& ) ;
815 
817  friend Hot_eos* Hot_eos::hoteos_from_file(FILE* ) ;
818  friend Hot_eos* Hot_eos::hoteos_from_file(ifstream& ) ;
819 
820  public:
821  virtual ~Hoteos_tabul() ;
822 
824  void operator=(const Hoteos_tabul& ) ;
825 
826  // Miscellaneous
827  // -------------
828 
829  protected:
833  void read_table() ;
834 
836  void set_arrays_0x0() ;
837 
838  public :
840  virtual bool operator==(const Hot_eos& ) const ;
841 
843  virtual bool operator!=(const Hot_eos& ) const ;
844 
848  virtual int identify() const ;
849 
850  virtual const Eos& new_cold_Eos() const ;
851 
852  // Outputs
853  // -------
854 
855  public:
856  virtual void sauve(FILE* ) const ;
857 
858  protected:
859  virtual ostream& operator>>(ostream &) const ;
860 
861 
862  // Computational functions
863  // -----------------------
864 
865  public:
878  virtual double nbar_Hs_p(double ent, double sb) const ;
879 
892  virtual double ener_Hs_p(double ent, double sb) const ;
893 
906  virtual double press_Hs_p(double ent, double sb) const ;
907 
920  virtual double temp_Hs_p(double ent, double sb) const ;
921 
932  virtual double csound_square_Hs_p(double ent, const double ye) const ;
933 
944  virtual double chi2_Hs_p(double ent, const double ye) const ;
945 
956  virtual double mul_Hs_p(double ent, const double ye) const ;
957 
968  virtual double sigma_Hs_p(double ent, const double ye) const ;
969 
970 };
971 
972  //------------------------------------//
973  // class Ye_eos_tabul //
974  //------------------------------------//
975 
983  class Ye_eos_tabul : public Hot_eos {
984 
985  // Data :
986  //-------
987 
988  protected:
990  string tablename ;
991 
992  string authors ;
993 
995  double hmin ;
996 
998  double hmax ;
999 
1001  double yemin ;
1002 
1004  double yemax ;
1005 
1008 
1011 
1014 
1017 
1020 
1022  Tbl* ppp ;
1023 
1025  Tbl* dpdh ;
1026 
1028  Tbl* dpdye ;
1029 
1031  Tbl* d2p ;
1032 
1034  Tbl* Sourcetbl ;
1035 
1036  // Constructors - Destructor
1037  // -------------------------
1038  public:
1039 
1042  Ye_eos_tabul(const string& filename) ;
1043 
1044  Ye_eos_tabul(const Ye_eos_tabul& ) ;
1045 
1046  protected:
1053  Ye_eos_tabul(FILE* ) ;
1054 
1060  Ye_eos_tabul(ifstream& ) ;
1061 
1063  friend Hot_eos* Hot_eos::hoteos_from_file(FILE* ) ;
1064  friend Hot_eos* Hot_eos::hoteos_from_file(ifstream& ) ;
1065 
1066  public:
1067  virtual ~Ye_eos_tabul() ;
1068 
1069  const string get_tablename() const { return tablename ;} ;
1070 
1072  void operator=(const Ye_eos_tabul& ) ;
1073 
1074  // Miscellaneous
1075  // -------------
1076 
1077  protected:
1081  void read_table() ;
1082 
1084  void set_arrays_0x0() ;
1085 
1086  public :
1088  virtual bool operator==(const Hot_eos& ) const ;
1089 
1091  virtual bool operator!=(const Hot_eos& ) const ;
1092 
1096  virtual int identify() const ;
1097 
1098  virtual const Eos& new_cold_Eos() const ;
1099 
1100  // Outputs
1101  // -------
1102 
1103  public:
1104  virtual void sauve(FILE* ) const ;
1105 
1106  protected:
1107  virtual ostream& operator>>(ostream &) const ;
1108 
1109 
1110  // Computational functions
1111  // -----------------------
1112  protected:
1113 
1114  public:
1127  virtual double nbar_Hs_p(double ent, double ye) const ;
1128 
1129 
1130 
1143  virtual double ener_Hs_p(double ent, double ye) const ;
1144 
1157  virtual double press_Hs_p(double ent, double ye) const ;
1158 
1171  virtual double temp_Hs_p(double ent, double sb) const ;
1172 
1173 
1184  virtual double csound_square_Hs_p(double ent, const double ye) const ;
1185 
1186 
1197  virtual double chi2_Hs_p(double ent, const double ye) const ;
1198 
1199 
1210  virtual double mul_Hs_p(double ent, const double ye) const ;
1211 
1222  virtual double sigma_Hs_p(double ent, const double ye) const ;
1223 };
1224 
1225 }
1226 #endif
virtual double sigma_Hs_p(double ent, const double ye) const
Computes the source terms for electronic fraction advection equation from the enthapy with electronic...
Definition: ideal_gas.C:343
virtual void sauve(FILE *) const
Save in a file.
Definition: ideal_gas.C:233
Tbl * nnn
Table of.
Definition: hoteos.h:1019
virtual double press_Hs_p(double ent, double sb) const =0
Computes the pressure from the log-enthalpy and entropy per baryon (virtual function implemented in t...
Tbl * dpds
Table of .
Definition: hoteos.h:784
void set_auxiliary()
Computes the auxiliary quantities gam1 , unsgam1 , gam1sgamkap from the values of gam and kap...
Definition: ideal_gas.C:145
string authors
Authors - reference for the table.
Definition: hoteos.h:992
virtual int identify() const
Returns a number to identify the sub-classe of Hot_eos the object belongs to.
virtual double chi2_Hs_p(double ent, const double ye) const
Computes the chi^2 coefficient from the enthapy with electronic fraction (virtual function implemente...
Definition: ye_eos_tabul.C:539
virtual ~Ideal_gas()
Destructor.
Definition: ideal_gas.C:122
double unsgam1
Definition: hoteos.h:535
string name
EOS name.
Definition: hoteos.h:90
Eos * p_cold_eos
Corresponding cold Eos.
Definition: hoteos.h:126
Tbl * mu_l
Table of , the electronic chemical potential (MeV)
Definition: hoteos.h:1016
virtual double chi2_Hs_p(double ent, const double ye) const
Computes the chi^2 coefficient from the enthapy with electronic fraction (virtual function implemente...
Definition: hoteos_tabul.C:473
double kap
Pressure coefficient (cf.
Definition: hoteos.h:527
virtual double nbar_Hs_p(double ent, double sb) const =0
Computes the baryon density from the log-enthalpy and electronic fraction (virtual function implement...
virtual double sigma_Hs_p(double ent, const double ye) const
Computes the source terms for electronic fraction advection equation from the enthapy with electronic...
Definition: hoteos_tabul.C:489
virtual double nbar_Hs_p(double ent, double sb) const
Computes the baryon density from the log-enthalpy and entropy per baryon (virtual function implemente...
Definition: ideal_gas.C:262
virtual double temp_Hs_p(double ent, double sb) const =0
Computes the temperature from the log-enthalpy and entropy per baryon (virtual function implemented i...
virtual double temp_Hs_p(double ent, double sb) const
Computes the temperature from the log-enthalpy and entropy per baryon (virtual function implemented i...
Definition: ideal_gas.C:306
Lorene prototypes.
Definition: app_hor.h:67
const string & get_name() const
Returns the hot EOS name.
Definition: hoteos.h:138
Equation of state base class.
Definition: eos.h:209
double m_0
Individual particule mass (cf.
Definition: hoteos.h:532
Tensor field of valence 0 (or component of a tensorial field).
Definition: scalar.h:393
Scalar chi2_Hs(const Scalar &ent, const Scalar &Ye, int nzet, int l_min=0) const
Computes the chi^2 coefficient from the enthalpy with ye.
Definition: hoteos.C:306
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: ye_eos_tabul.C:135
virtual double csound_square_Hs_p(double ent, const double ye) const
Computes the sound speed squared from the enthapy with electronic fraction (virtual function impleme...
Definition: ideal_gas.C:319
Hoteos_tabul(const string &filename)
Standard constructor from a filename.
Definition: hoteos_tabul.C:85
double get_gam() const
Returns the adiabatic index (cf. Eq. (1)).
Definition: ideal_gas.C:155
virtual double press_Hs_p(double ent, double sb) const
Computes the pressure from the log-enthalpy and entropy per baryon (virtual function implemented in t...
Definition: hoteos_tabul.C:395
Ideal-gas (temperature-dependent) equation of state, with mass-term in the energy density...
Definition: hoteos.h:513
string tablename
Name of the file containing the tabulated data.
Definition: hoteos.h:990
virtual int identify() const
Returns a number to identify the sub-classe of Hot_eos the object belongs to.
virtual double mul_Hs_p(double ent, const double ye) const =0
Computes the electronic chemical potential from the enthapy with electronic fraction (virtual functio...
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: ideal_gas.C:243
virtual bool operator==(const Hot_eos &) const
Comparison operator (egality)
Definition: hoteos_tabul.C:295
virtual double sigma_Hs_p(double ent, const double ye) const =0
Computes the source terms for electronic fraction advection equation from the enthapy with electronic...
Hot (temperature-dependent) tabulated equation of state, read from a file.
Definition: hoteos.h:748
Scalar press_Hs(const Scalar &ent, const Scalar &sb, int nzet, int l_min=0) const
Computes the pressure from the log-enthalpy and entropy per baryon.
Definition: hoteos.C:266
Scalar temp_Hs(const Scalar &ent, const Scalar &sb, int nzet, int l_min=0) const
Computes the temperature field from the log-enthalpy field and entropy per baryon.
Definition: hoteos.C:280
virtual double chi2_Hs_p(double ent, const double ye) const
Computes the chi^2 coefficient from the enthapy with electronic fraction (virtual function implemente...
Definition: ideal_gas.C:327
Scalar ener_Hs(const Scalar &ent, const Scalar &sb, int nzet, int l_min=0) const
Computes the total energy density from the log-enthalpy and entropy per baryon.
Definition: hoteos.C:252
void set_name(const char *)
Sets the hot EOS name.
Definition: hoteos.C:118
Tbl * d2p
Table of .
Definition: hoteos.h:787
virtual double ener_Hs_p(double ent, double sb) const =0
Computes the total energy density from the log-enthalpy and entropy per baryon (virtual function impl...
virtual double nbar_Hs_p(double ent, double ye) const
Computes the baryon density from the log-enthalpy and electronic fraction (virtual function implement...
Definition: ye_eos_tabul.C:311
virtual bool operator!=(const Hot_eos &) const
Comparison operator (difference)
Definition: ideal_gas.C:224
Tbl * s_B
Table of , entropy per baryon (in units of Boltzmann constant).
Definition: hoteos.h:775
double hmax
Upper boundary of the enthalpy interval.
Definition: hoteos.h:763
virtual double mul_Hs_p(double ent, const double ye) const
Computes the electronic chemical potential from the enthapy with electronic fraction (virtual functio...
Definition: ye_eos_tabul.C:548
Tbl * dpdh
Table of .
Definition: hoteos.h:781
double gam
Adiabatic index .
Definition: hoteos.h:520
virtual double ener_Hs_p(double ent, double sb) const
Computes the total energy density from the log-enthalpy and entropy per baryon (virtual function impl...
Definition: ideal_gas.C:275
string authors
Authors - reference for the table.
Definition: hoteos.h:757
friend ostream & operator<<(ostream &, const Hot_eos &)
Display.
Definition: hoteos.C:143
double hmin
Lower boundary of the enthalpy interval.
Definition: hoteos.h:760
Tbl * c_sound2
Table of , sound speed squared (units of c^2).
Definition: hoteos.h:1013
Scalar csound_square_Hs(const Scalar &ent, const Scalar &Y_e, int nzet, int l_min=0) const
Computes the sound speed squared from the enthalpy with ye.
Definition: hoteos.C:294
virtual ~Hot_eos()
Destructor.
Definition: hoteos.C:101
Ye_eos_tabul(const string &filename)
Standard constructor from a filename.
Definition: ye_eos_tabul.C:55
string tablename
Name of the file containing the tabulated data.
Definition: hoteos.h:755
virtual ostream & operator>>(ostream &) const =0
Operator >>
Tbl * Y_e
Table of , electronic fraction (dimensionless).
Definition: hoteos.h:1010
Out of beta-equilibrium tabulated equation of state, read from a file.
Definition: hoteos.h:983
void set_arrays_0x0()
Sets all the arrays to the null pointer.
Definition: hoteos_tabul.C:124
void read_table()
Reads the file containing the table and initializes in the arrays hhh , s_B, ppp, ...
Definition: hoteos_tabul.C:176
virtual const Eos & new_cold_Eos() const
Returns the corresponding cold Eos.
Definition: ideal_gas.C:172
virtual double csound_square_Hs_p(double ent, const double ye) const
Computes the sound speed squared from the enthapy with electronic fraction (virtual function impleme...
Definition: hoteos_tabul.C:465
virtual int identify() const =0
Returns a number to identify the sub-classe of Hot_eos the object belongs to.
Scalar sigma_Hs(const Scalar &ent, const Scalar &Y_e, int nzet, int l_min=0) const
Computes the source terms for electronic fraction advection equation from the enthalpy with ye...
Definition: hoteos.C:330
virtual double mul_Hs_p(double ent, const double ye) const
Computes the electronic chemical potential from the enthapy with electronic fraction (virtual functio...
Definition: ideal_gas.C:335
Scalar mul_Hs(const Scalar &ent, const Scalar &Ye, int nzet, int l_min=0) const
Computes the electronic chemical potential from the enthalpy with ye.
Definition: hoteos.C:318
virtual double csound_square_Hs_p(double ent, const double ye) const
Computes the sound speed squared from the enthapy with electronic fraction (virtual function impleme...
Definition: ye_eos_tabul.C:497
Scalar nbar_Hs(const Scalar &ent, const Scalar &sb, int nzet, int l_min=0) const
Computes the baryon density field from the log-enthalpy field and entropy per baryon.
Definition: hoteos.C:236
virtual void sauve(FILE *) const
Save in a file.
Definition: ye_eos_tabul.C:126
void calcule(const Scalar &thermo1, const Scalar &thermo2, int nzet, int l_min, double(Hot_eos::*fait)(double, double) const, Scalar &resu) const
General computational method for Scalar &#39;s.
Definition: hoteos.C:153
virtual double csound_square_Hs_p(double ent, const double ye) const =0
Computes the sound speed squared from the enthapy with electronic fraction (virtual function impleme...
virtual double ener_Hs_p(double ent, double ye) const
Computes the total energy density from the log-enthalpy and electronic fraction (virtual function imp...
Definition: ye_eos_tabul.C:403
Hot_eos()
Standard constructor.
Definition: hoteos.C:56
virtual ~Ye_eos_tabul()
Destructor.
Definition: ye_eos_tabul.C:111
virtual double temp_Hs_p(double ent, double sb) const
Computes the temperature from the log-enthalpy and entropy per baryon (virtual function implemented i...
Definition: ye_eos_tabul.C:636
virtual const Eos & new_cold_Eos() const
Returns the corresponding cold Eos.
Definition: hoteos_tabul.C:276
virtual void sauve(FILE *) const
Save in a file.
Definition: hoteos_tabul.C:150
double yemax
Upper boundary of the electronic fraction interval.
Definition: hoteos.h:1004
virtual void del_deriv() const
Deletes all the derived quantities.
Definition: hoteos.C:109
virtual double press_Hs_p(double ent, double sb) const
Computes the pressure from the log-enthalpy and entropy per baryon (virtual function implemented in t...
Definition: ideal_gas.C:291
double gam1
Definition: hoteos.h:534
virtual bool operator!=(const Hot_eos &) const =0
Comparison operator (difference)
Base class for 2-parameters equations of state (abstract class).
Definition: hoteos.h:85
virtual ~Hoteos_tabul()
Destructor.
Definition: hoteos_tabul.C:137
virtual const Eos & new_cold_Eos() const =0
Returns the corresponding cold Eos.
virtual int identify() const
Returns a number to identify the sub-classe of Hot_eos the object belongs to.
virtual void sauve(FILE *) const
Save in a file.
Definition: hoteos.C:129
static Hot_eos * hoteos_from_file(FILE *)
Construction of an EOS from a binary file.
void read_table()
Reads the file containing the table and initializes in the arrays hhh , s_B, ppp, ...
Definition: ye_eos_tabul.C:152
void operator=(const Hoteos_tabul &)
Assignment to another Hoteos_tabul.
virtual bool operator==(const Hot_eos &) const =0
Comparison operator (egality)
virtual double sigma_Hs_p(double ent, const double ye) const
Computes the source terms for electronic fraction advection equation from the enthapy with electronic...
Definition: ye_eos_tabul.C:592
virtual const Eos & new_cold_Eos() const
Returns the corresponding cold Eos.
Definition: ye_eos_tabul.C:265
void operator=(const Ideal_gas &)
Assignment to another Ideal_gas.
Definition: ideal_gas.C:128
double hmax
Upper boundary of the enthalpy interval.
Definition: hoteos.h:998
virtual double temp_Hs_p(double ent, double sb) const
Computes the temperature from the log-enthalpy and entropy per baryon (virtual function implemented i...
Definition: hoteos_tabul.C:429
Basic array class.
Definition: tbl.h:164
virtual double chi2_Hs_p(double ent, const double ye) const =0
Computes the chi^2 coefficient from the enthapy with electronic fraction (virtual function implemente...
Tbl * hhh
Table of .
Definition: hoteos.h:1007
Tbl * ppp
Table of pressure $P$.
Definition: hoteos.h:778
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: hoteos_tabul.C:159
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Definition: hoteos.C:114
double sbmax
Upper boundary of the entropy interval.
Definition: hoteos.h:769
virtual double press_Hs_p(double ent, double ye) const
Computes the pressure from the log-enthalpy and electronic fraction (virtual function implemented in ...
Definition: ye_eos_tabul.C:452
Tbl * hhh
Table of .
Definition: hoteos.h:772
virtual bool operator!=(const Hot_eos &) const
Comparison operator (difference)
Definition: hoteos_tabul.C:308
double yemin
Lower boundary of the electronic fraction interval.
Definition: hoteos.h:1001
virtual double mul_Hs_p(double ent, const double ye) const
Computes the electronic chemical potential from the enthapy with electronic fraction (virtual functio...
Definition: hoteos_tabul.C:481
virtual bool operator==(const Hot_eos &) const
Comparison operator (egality)
Definition: ideal_gas.C:187
double gam1sgamkap
Definition: hoteos.h:536
virtual double nbar_Hs_p(double ent, double sb) const
Computes the baryon density from the log-enthalpy and entropy per baryon (virtual function implemente...
Definition: hoteos_tabul.C:320
double get_kap() const
Returns the pressure coefficient (cf. Eq. (1)).
Definition: ideal_gas.C:159
double hmin
Lower boundary of the enthalpy interval.
Definition: hoteos.h:995
double sbmin
Lower boundary of the entropy interval.
Definition: hoteos.h:766
Ideal_gas(double gamma, double kappa, double mass=1.)
Standard constructor.
Definition: ideal_gas.C:76
virtual double ener_Hs_p(double ent, double sb) const
Computes the total energy density from the log-enthalpy and entropy per baryon (virtual function impl...
Definition: hoteos_tabul.C:356
double get_m_0() const
Return the individual particule mass (cf.
Definition: ideal_gas.C:163