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.8 2022/05/06 09:51:29 g_servignat Exp $
31  * $Log: hoteos.h,v $
32  * Revision 1.8 2022/05/06 09:51:29 g_servignat
33  * Removed chi2 computation function from Ye EoS representation
34  *
35  * Revision 1.7 2022/04/06 12:38:06 g_servignat
36  * Added source computation routine and source reading in table for electronic fraction advection equation
37  *
38  * Revision 1.6 2022/03/01 10:03:07 g_servignat
39  * Corrected all pure virtual interference between Hot_eos derived classes ; amended use of interpol_linear_2D
40  *
41  * Revision 1.5 2022/02/25 11:59:43 g_servignat
42  * Compilation error corrections (correctly using class inheritance)
43  *
44  * Revision 1.4 2022/02/25 10:44:50 g_servignat
45  * Added Ye_eos_tabul derived class to Hot_eos class for tabulated 2D equations of state with H and Y_e as parameters
46  *
47  * Revision 1.3 2015/12/08 10:52:17 j_novak
48  * New class Hoteos_tabul for tabulated temperature-dependent EoSs.
49  *
50  * Revision 1.2 2015/09/10 13:28:00 j_novak
51  * New methods for the class Hot_Eos
52  *
53  * Revision 1.1 2015/03/17 14:19:59 j_novak
54  * New class Hot_eos to deal with temperature-dependent EOSs.
55  *
56  *
57  * $Header: /cvsroot/Lorene/C++/Include/hoteos.h,v 1.8 2022/05/06 09:51:29 g_servignat Exp $
58  *
59  */
60 
61 //C++ headers
62 #include "headcpp.h"
63 
64 //C headers
65 #include<cstdio>
66 #include "tbl.h"
67 
68 namespace Lorene{
69 
70 class Scalar ;
71 class Param ;
72 class Eos ;
73  //------------------------------------//
74  // class Hot_eos //
75  //------------------------------------//
76 
82  class Hot_eos {
83 
84  // Data :
85  // -----
86  protected:
87  string name ;
88 
89  // Constructors - Destructor
90  // -------------------------
91  protected:
92  Hot_eos() ;
93 
95  explicit Hot_eos(const string&) ;
96 
98  explicit Hot_eos(const char*) ;
99 
100  Hot_eos(const Hot_eos& ) ;
101 
108  Hot_eos(FILE* ) ;
109 
115  Hot_eos(ifstream& ) ;
116 
117  public:
118  virtual ~Hot_eos() ;
119 
120  // Derived data :
121  // ------------
122  protected:
123  mutable Eos* p_cold_eos ;
124 
126  virtual void del_deriv() const ;
127 
129  void set_der_0x0() const ;
130 
131  // Name manipulation
132  // -----------------
133  public:
135  const string& get_name() const {return name; };
136 
138  void set_name(const char* ) ;
139 
140  // Miscellaneous
141  // -------------
142  public:
146  static Hot_eos* hoteos_from_file(FILE* ) ;
147 
159  static Hot_eos* hoteos_from_file(ifstream& ) ;
160 
162  virtual bool operator==(const Hot_eos& ) const = 0 ;
163 
165  virtual bool operator!=(const Hot_eos& ) const = 0 ;
166 
170  virtual int identify() const = 0 ;
171 
172  // Outputs
173  // -------
174 
175  public:
176  virtual void sauve(FILE* ) const ;
177 
179  friend ostream& operator<<(ostream& , const Hot_eos& ) ;
180 
181  protected:
182  virtual ostream& operator>>(ostream &) const = 0 ;
183 
184  public:
186  virtual const Eos& new_cold_Eos() const = 0 ;
187 
188  // virtual const string fetch_
189 
190  // Computational functions
191  // -----------------------
192  protected:
211  void calcule(const Scalar& thermo1, const Scalar& thermo2, int nzet, int l_min,
212  double (Hot_eos::*fait)(double, double) const, Scalar& resu) const ;
213 
214  public:
227  virtual double nbar_Hs_p(double ent, double sb) const = 0 ;
228 
249  Scalar nbar_Hs(const Scalar& ent, const Scalar& sb, int nzet, int l_min = 0) const ;
250 
263  virtual double ener_Hs_p(double ent, double sb) const = 0 ;
264 
284  Scalar ener_Hs(const Scalar& ent, const Scalar& sb, int nzet, int l_min = 0) const ;
285 
298  virtual double press_Hs_p(double ent, double sb) const = 0 ;
299 
318  Scalar press_Hs(const Scalar& ent, const Scalar& sb, int nzet, int l_min = 0) const ;
319 
332  virtual double temp_Hs_p(double ent, double sb) const = 0 ;
333 
354  Scalar temp_Hs(const Scalar& ent, const Scalar& sb, int nzet, int l_min = 0) const ;
355 
356 
367  virtual double csound_square_Hs_p(double ent, const double ye) const = 0;
368 
379  virtual double chi2_Hs_p(double ent, const double ye) const = 0;
380 
400  Scalar chi2_Hs(const Scalar& ent, const Scalar& Ye, int nzet, int l_min = 0) const ;
401 
412  virtual double mul_Hs_p(double ent, const double ye) const = 0;
413 
433  Scalar mul_Hs(const Scalar& ent, const Scalar& Ye, int nzet, int l_min = 0) const ;
434 
454  Scalar csound_square_Hs(const Scalar& ent, const Scalar& Y_e, int nzet, int l_min = 0) const ;
455 
466  virtual double sigma_Hs_p(double ent, const double ye) const = 0 ;
467 
487  Scalar sigma_Hs(const Scalar& ent, const Scalar& Y_e, int nzet, int l_min = 0) const ;
488  };
489  ostream& operator<<(ostream& , const Hot_eos& ) ;
490 
491  //------------------------------------//
492  // class Ideal_gas //
493  //----------------------------------//
494 
510  class Ideal_gas : public Hot_eos {
511 
512  // Data :
513  //-------
514 
515  protected:
517  double gam ;
518 
524  double kap ;
525 
529  double m_0 ;
530 
531  double gam1 ;
532  double unsgam1 ;
533  double gam1sgamkap ;
534 
535  // Constructors - Destructor
536  // -------------------------
537  public:
538 
548  Ideal_gas(double gamma, double kappa, double mass=1.) ;
549 
550  Ideal_gas(const Ideal_gas& ) ;
551 
552  protected:
559  Ideal_gas(FILE* ) ;
560 
566  Ideal_gas(ifstream& ) ;
567 
569  friend Hot_eos* Hot_eos::hoteos_from_file(FILE* ) ;
570  friend Hot_eos* Hot_eos::hoteos_from_file(ifstream& ) ;
571 
572  public:
573  virtual ~Ideal_gas() ;
574 
575  // Assignment
576  // ----------
578  void operator=(const Ideal_gas& ) ;
579 
580  // Miscellaneous
581  // -------------
582 
583  public :
585  virtual bool operator==(const Hot_eos& ) const ;
586 
588  virtual bool operator!=(const Hot_eos& ) const ;
589 
593  virtual int identify() const ;
594 
596  double get_gam() const ;
597 
599  double get_kap() const ;
600 
604  double get_m_0() const ;
605 
606  virtual const Eos& new_cold_Eos() const ;
607 
608  protected:
612  void set_auxiliary() ;
613 
614  // Outputs
615  // -------
616 
617  public:
618  virtual void sauve(FILE* ) const ;
619 
620  protected:
621  virtual ostream& operator>>(ostream &) const ;
622 
623 
624  // Computational functions
625  // -----------------------
626 
627  public:
640  virtual double nbar_Hs_p(double ent, double sb) const ;
641 
654  virtual double ener_Hs_p(double ent, double sb) const ;
655 
668  virtual double press_Hs_p(double ent, double sb) const ;
669 
682  virtual double temp_Hs_p(double ent, double sb) const ;
683 
694  virtual double csound_square_Hs_p(double ent, const double ye) const ;
695 
706  virtual double chi2_Hs_p(double ent, const double ye) const ;
707 
718  virtual double mul_Hs_p(double ent, const double ye) const ;
719 
730  virtual double sigma_Hs_p(double ent, const double ye) const ;
731 
732 };
733 
734  //------------------------------------//
735  // class Hoteos_tabul //
736  //------------------------------------//
737 
745  class Hoteos_tabul : public Hot_eos {
746 
747  // Data :
748  //-------
749 
750  protected:
752  string tablename ;
753 
754  string authors ;
755 
757  double hmin ;
758 
760  double hmax ;
761 
763  double sbmin ;
764 
766  double sbmax ;
767 
769  Tbl* hhh ;
770 
772  Tbl* s_B ;
773 
775  Tbl* ppp ;
776 
779 
782 
784  Tbl* d2p ;
785 
786 
787  // Constructors - Destructor
788  // -------------------------
789  public:
790 
793  Hoteos_tabul(const string& filename) ;
794 
795  Hoteos_tabul(const Hoteos_tabul& ) ;
796 
797  protected:
804  Hoteos_tabul(FILE* ) ;
805 
811  Hoteos_tabul(ifstream& ) ;
812 
814  friend Hot_eos* Hot_eos::hoteos_from_file(FILE* ) ;
815  friend Hot_eos* Hot_eos::hoteos_from_file(ifstream& ) ;
816 
817  public:
818  virtual ~Hoteos_tabul() ;
819 
821  void operator=(const Hoteos_tabul& ) ;
822 
823  // Miscellaneous
824  // -------------
825 
826  protected:
830  void read_table() ;
831 
833  void set_arrays_0x0() ;
834 
835  public :
837  virtual bool operator==(const Hot_eos& ) const ;
838 
840  virtual bool operator!=(const Hot_eos& ) const ;
841 
845  virtual int identify() const ;
846 
847  virtual const Eos& new_cold_Eos() const ;
848 
849  // Outputs
850  // -------
851 
852  public:
853  virtual void sauve(FILE* ) const ;
854 
855  protected:
856  virtual ostream& operator>>(ostream &) const ;
857 
858 
859  // Computational functions
860  // -----------------------
861 
862  public:
875  virtual double nbar_Hs_p(double ent, double sb) const ;
876 
889  virtual double ener_Hs_p(double ent, double sb) const ;
890 
903  virtual double press_Hs_p(double ent, double sb) const ;
904 
917  virtual double temp_Hs_p(double ent, double sb) const ;
918 
929  virtual double csound_square_Hs_p(double ent, const double ye) const ;
930 
941  virtual double chi2_Hs_p(double ent, const double ye) const ;
942 
953  virtual double mul_Hs_p(double ent, const double ye) const ;
954 
965  virtual double sigma_Hs_p(double ent, const double ye) const ;
966 
967 };
968 
969  //------------------------------------//
970  // class Ye_eos_tabul //
971  //------------------------------------//
972 
980  class Ye_eos_tabul : public Hot_eos {
981 
982  // Data :
983  //-------
984 
985  protected:
987  string tablename ;
988 
989  string authors ;
990 
992  double hmin ;
993 
995  double hmax ;
996 
998  double yemin ;
999 
1001  double yemax ;
1002 
1005 
1008 
1011 
1014 
1017 
1020 
1023 
1026 
1029 
1030  // Constructors - Destructor
1031  // -------------------------
1032  public:
1033 
1036  Ye_eos_tabul(const string& filename) ;
1037 
1038  Ye_eos_tabul(const Ye_eos_tabul& ) ;
1039 
1040  protected:
1047  Ye_eos_tabul(FILE* ) ;
1048 
1054  Ye_eos_tabul(ifstream& ) ;
1055 
1057  friend Hot_eos* Hot_eos::hoteos_from_file(FILE* ) ;
1058  friend Hot_eos* Hot_eos::hoteos_from_file(ifstream& ) ;
1059 
1060  public:
1061  virtual ~Ye_eos_tabul() ;
1062 
1063  const string get_tablename() const { return tablename ;} ;
1064 
1066  void operator=(const Ye_eos_tabul& ) ;
1067 
1068  // Miscellaneous
1069  // -------------
1070 
1071  protected:
1075  void read_table() ;
1076 
1078  void set_arrays_0x0() ;
1079 
1080  public :
1082  virtual bool operator==(const Hot_eos& ) const ;
1083 
1085  virtual bool operator!=(const Hot_eos& ) const ;
1086 
1090  virtual int identify() const ;
1091 
1092  virtual const Eos& new_cold_Eos() const ;
1093 
1094  // Outputs
1095  // -------
1096 
1097  public:
1098  virtual void sauve(FILE* ) const ;
1099 
1100  protected:
1101  virtual ostream& operator>>(ostream &) const ;
1102 
1103 
1104  // Computational functions
1105  // -----------------------
1106  protected:
1107 
1108  public:
1121  virtual double nbar_Hs_p(double ent, double ye) const ;
1122 
1123 
1124 
1137  virtual double ener_Hs_p(double ent, double ye) const ;
1138 
1151  virtual double press_Hs_p(double ent, double ye) const ;
1152 
1165  virtual double temp_Hs_p(double ent, double sb) const ;
1166 
1167 
1178  virtual double csound_square_Hs_p(double ent, const double ye) const ;
1179 
1180 
1191  virtual double chi2_Hs_p(double ent, const double ye) const ;
1192 
1193 
1204  virtual double mul_Hs_p(double ent, const double ye) const ;
1205 
1216  virtual double sigma_Hs_p(double ent, const double ye) const ;
1217 };
1218 
1219 }
1220 #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
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:781
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:989
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:452
virtual ~Ideal_gas()
Destructor.
Definition: ideal_gas.C:122
double unsgam1
Definition: hoteos.h:532
string name
EOS name.
Definition: hoteos.h:87
Eos * p_cold_eos
Corresponding cold Eos.
Definition: hoteos.h:123
Tbl * mu_l
Table of , the electronic chemical potential (MeV)
Definition: hoteos.h:1013
void set_arrays_0x0()
Sets all the arrays to the null pointer.
Definition: ye_eos_tabul.C:94
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:524
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:135
Equation of state base class.
Definition: eos.h:206
double m_0
Individual particule mass (cf.
Definition: hoteos.h:529
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:133
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:510
string tablename
Name of the file containing the tabulated data.
Definition: hoteos.h:987
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:745
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:784
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:305
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:772
double hmax
Upper boundary of the enthalpy interval.
Definition: hoteos.h:760
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:461
Tbl * dpdh
Table of .
Definition: hoteos.h:778
double gam
Adiabatic index .
Definition: hoteos.h:517
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:754
friend ostream & operator<<(ostream &, const Hot_eos &)
Display.
Definition: hoteos.C:143
double hmin
Lower boundary of the enthalpy interval.
Definition: hoteos.h:757
Tbl * c_sound2
Table of , sound speed squared (units of c^2).
Definition: hoteos.h:1010
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
void operator=(const Ye_eos_tabul &)
Assignment to another Ye_eos_tabul.
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:752
virtual ostream & operator>>(ostream &) const =0
Operator >>
Tbl * Y_e
Table of , electronic fraction (dimensionless).
Definition: hoteos.h:1007
Out of beta-equilibrium tabulated equation of state, read from a file.
Definition: hoteos.h:980
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:410
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:124
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...
Tbl * dpdh
Table of .
Definition: hoteos.h:1019
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:343
Hot_eos()
Standard constructor.
Definition: hoteos.C:56
virtual ~Ye_eos_tabul()
Destructor.
Definition: ye_eos_tabul.C:110
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:547
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:1001
virtual void del_deriv() const
Deletes all the derived quantities.
Definition: hoteos.C:109
Tbl * Sourcetbl
Table of electronic fraction source.
Definition: hoteos.h:1028
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
Tbl * d2p
Table of .
Definition: hoteos.h:1025
virtual bool operator!=(const Hot_eos &) const
Comparison operator (difference)
Definition: ye_eos_tabul.C:293
double gam1
Definition: hoteos.h:531
virtual bool operator!=(const Hot_eos &) const =0
Comparison operator (difference)
Base class for 2-parameters equations of state (abstract class).
Definition: hoteos.h:82
Tbl * dpdye
Table of .
Definition: hoteos.h:1022
virtual bool operator==(const Hot_eos &) const
Comparison operator (egality)
Definition: ye_eos_tabul.C:280
virtual ~Hoteos_tabul()
Destructor.
Definition: hoteos_tabul.C:137
virtual const Eos & new_cold_Eos() const =0
Returns the corresponding cold Eos.
Tbl * ppp
Table of pressure $P$.
Definition: hoteos.h:1016
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:150
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:504
virtual const Eos & new_cold_Eos() const
Returns the corresponding cold Eos.
Definition: ye_eos_tabul.C:259
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:995
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:161
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:1004
Tbl * ppp
Table of pressure $P$.
Definition: hoteos.h:775
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:766
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:378
Tbl * hhh
Table of .
Definition: hoteos.h:769
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:998
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:533
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:992
double sbmin
Lower boundary of the entropy interval.
Definition: hoteos.h:763
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