ESTER
Evolution STEllaire en Rotation
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
physics.h
Go to the documentation of this file.
1 #ifndef _PHYSICS_H
2 #define _PHYSICS_H
3 
4 #include "ester-config.h"
5 #include "matrix.h"
6 
7 struct nuc_struct {
9  char name[16];
10 };
11 struct eos_struct {
13  char name[16];
14 };
15 struct opa_struct {
17  char name[16];
18 };
19 
20 struct atm_struct {
22  char name[16];
23 };
24 
25 class composition_map : public matrix_map {
26 public:
28  std::map<std::string,matrix_map> jac;
30  composition_map(const matrix_map &map) : matrix_map(map) {};
31  matrix X() const;
32  matrix Y() const;
33  matrix Z() const;
34 };
35 
36 int opa_calc(const matrix &X,double Z,const matrix &T,const matrix &rho,
37  opa_struct &opa);
38 int eos_calc(const matrix &X,double Z,const matrix &T,const matrix &p,
39  matrix &rho,eos_struct &eos);
40 int nuc_calc(const matrix_map &X,const matrix &T,const matrix &rho,
41  nuc_struct &nuc);
42 int atm_calc(const matrix &X,double Z,const matrix &g,const matrix &Teff,
43  const char *eos_name,const char *opa_name,atm_struct &atm);
44 
45 int opa_opal(const matrix &X,double Z,const matrix &T,const matrix &rho,
46  opa_struct &opa);
47 int opa_houdek(const matrix &X,double Z,const matrix &T,const matrix &rho,
48  opa_struct &opa);
49 int opa_kramer(const matrix &T,const matrix &rho,
50  opa_struct &opa);
51 
52 int nuc_simple(const composition_map &comp,const matrix &T,const matrix &rho,
53  nuc_struct &nuc);
54 int nuc_cesam(const composition_map &comp,const matrix &T,const matrix &rho,
55  nuc_struct &nuc);
56 
57 int nuc_cesam_dcomp(composition_map &comp,const matrix &T,const matrix &rho,
58  nuc_struct &nuc);
59 
60 int eos_ideal(const matrix &X,double Z,const matrix &T,const matrix &p,
61  matrix &rho,eos_struct &eos);
62 int eos_idealrad(const matrix &X,double Z,const matrix &T,const matrix &p,
63  matrix &rho,eos_struct &eos);
64 int eos_opal(const matrix &X,double Z,const matrix &T,const matrix &p,
65  matrix &rho,eos_struct &eos);
66 
67 int atm_onelayer(const matrix &X,double Z,const matrix &g,const matrix &Teff,
68  const char *eos_name,const char *opa_name,atm_struct &atm);
69 
70 double_map initial_composition(double X,double Z);
71 
72 #endif
73 
int eos_ideal(const matrix &X, double Z, const matrix &T, const matrix &p, matrix &rho, eos_struct &eos)
Definition: eos_ideal.cpp:6
Definition: matrix.h:287
matrix X() const
Definition: composition.cpp:25
matrix cv
Definition: physics.h:12
Definition: physics.h:11
int eos_opal(const matrix &X, double Z, const matrix &T, const matrix &p, matrix &rho, eos_struct &eos)
Definition: eos_opal.cpp:17
int nuc_simple(const composition_map &comp, const matrix &T, const matrix &rho, nuc_struct &nuc)
Definition: nuc_simple.cpp:5
The matrix class is used to facilitate the work with regular dense matrices.
Definition: matrix.h:9
matrix dlnps_lng
Definition: physics.h:21
matrix pp
Definition: physics.h:8
int eos_calc(const matrix &X, double Z, const matrix &T, const matrix &p, matrix &rho, eos_struct &eos)
Definition: physics.cpp:25
int eos_idealrad(const matrix &X, double Z, const matrix &T, const matrix &p, matrix &rho, eos_struct &eos)
Definition: eos_idealrad.cpp:5
char name[16]
Definition: physics.h:13
char name[16]
Definition: physics.h:9
matrix xi
Definition: physics.h:16
double_map initial_composition(double X, double Z)
Definition: composition.cpp:4
matrix dlnps_lnTeff
Definition: physics.h:21
int nuc_cesam(const composition_map &comp, const matrix &T, const matrix &rho, nuc_struct &nuc)
Definition: nuc_cesam.cpp:84
matrix chi_T
Definition: physics.h:12
matrix cno
Definition: physics.h:8
Definition: physics.h:7
char name[16]
Definition: physics.h:22
matrix G3_1
Definition: physics.h:12
Definition: physics.h:15
matrix dlnTs_lng
Definition: physics.h:21
composition_map()
Definition: physics.h:29
matrix dlnxi_lnT
Definition: physics.h:16
double eos[10]
Definition: eos_opal.cpp:10
int opa_calc(const matrix &X, double Z, const matrix &T, const matrix &rho, opa_struct &opa)
Definition: physics.cpp:6
matrix dlnxi_lnrho
Definition: physics.h:16
matrix dlneps_lnT
Definition: physics.h:8
matrix d
Definition: physics.h:12
matrix Y() const
Definition: composition.cpp:31
Definition: matrix.h:248
matrix chi_rho
Definition: physics.h:12
matrix s
Definition: physics.h:12
matrix Z() const
Definition: composition.cpp:37
std::map< std::string, matrix_map > jac
Definition: physics.h:28
matrix dlnTs_lnTeff
Definition: physics.h:21
char name[16]
Definition: physics.h:17
matrix dlneps_lnrho
Definition: physics.h:8
matrix cp
Definition: physics.h:12
int opa_opal(const matrix &X, double Z, const matrix &T, const matrix &rho, opa_struct &opa)
Definition: opa_opal.cpp:30
int atm_calc(const matrix &X, double Z, const matrix &g, const matrix &Teff, const char *eos_name, const char *opa_name, atm_struct &atm)
Definition: physics.cpp:63
matrix Ts
Definition: physics.h:21
matrix G1
Definition: physics.h:12
int nuc_cesam_dcomp(composition_map &comp, const matrix &T, const matrix &rho, nuc_struct &nuc)
Definition: nuc_cesam.cpp:117
matrix del_ad
Definition: physics.h:12
composition_map(const matrix_map &map)
Definition: physics.h:30
matrix eps
Definition: physics.h:8
matrix ps
Definition: physics.h:21
Definition: physics.h:20
matrix_map dt
Definition: physics.h:27
Definition: physics.h:25
int opa_kramer(const matrix &T, const matrix &rho, opa_struct &opa)
Definition: opa_kramer.cpp:8
int opa_houdek(const matrix &X, double Z, const matrix &T, const matrix &rho, opa_struct &opa)
Definition: opa_houdek.cpp:29
matrix k
Definition: physics.h:16
int nuc_calc(const matrix_map &X, const matrix &T, const matrix &rho, nuc_struct &nuc)
Definition: physics.cpp:45
int atm_onelayer(const matrix &X, double Z, const matrix &g, const matrix &Teff, const char *eos_name, const char *opa_name, atm_struct &atm)
Definition: atm_onelayer.cpp:8
matrix prad
Definition: physics.h:12