Cholla 3.0.1-dev
Cholla - Massively parallel hydro on GPUs
Loading...
Searching...
No Matches
cosmology.h
1#ifdef COSMOLOGY
2
3 #ifndef COSMOLOGY_H
4 #define COSMOLOGY_H
5
6 #include <stdio.h>
7
8 #include <cmath>
9 #include <memory>
10
11 #include "../global/global.h"
12 #include "../gravity/grav3D.h"
13 #include "../particles/particles_3D.h"
15
16class Cosmology
17{
18 public:
19 Real H0;
20 Real Omega_M;
21 Real Omega_L;
22 Real Omega_K;
23 Real Omega_b;
24 Real Omega_R;
25 Real w0;
26 Real wa;
27
29 Real Get_DE_Density_from_a(Real a);
30
32 std::unique_ptr<TabulatedDynamicalDarkEnergyEoS> tab_dynamicalDE_EoS;
33
35 bool Using_DynamicalDE_Table() { return tab_dynamicalDE_EoS != nullptr; }
36
37 Real cosmo_G;
38 Real cosmo_h;
39 Real current_z;
40 Real current_a;
41 Real max_delta_a;
42 Real delta_a;
43
44 Real r_0_dm;
45 Real t_0_dm;
46 Real v_0_dm;
47 Real rho_0_dm;
48 Real phi_0_dm;
49 Real rho_mean_baryon;
50
51 Real time_conversion;
52 Real dt_secs;
53 Real t_secs;
54
55 // Real dens_avrg;
56
57 Real r_0_gas;
58 Real v_0_gas;
59 Real t_0_gas;
60 Real phi_0_gas;
61 Real rho_0_gas;
62 Real p_0_gas;
63 Real e_0_gas;
64
65 int n_outputs;
66 int next_output_indx;
67 real_vector_t scale_outputs;
68 Real next_output;
69 bool exit_now;
70
71 Cosmology(void);
72 void Initialize(struct Parameters *P, Grav3D &Grav, Particles3D &Particles);
73
74 void Load_Scale_Outputs(struct Parameters *P);
75 void Set_Scale_Outputs(struct Parameters *P);
76
77 void Set_Next_Scale_Output();
78
79 Real Get_Hubble_Parameter(Real a);
80
81 Real dtda_cosmo(Real da, Real a);
82 Real Get_dt_from_da_rk(Real da, Real a);
83 Real Get_da_from_dt(Real dt);
84 Real Get_dt_from_da(Real da, Real a);
85
86 // write expansion history log file
87 void Create_Expansion_History_File(struct Parameters *P);
88 void Write_Expansion_History_Entry(void);
89};
90
91 #endif
92#endif
Definition grav3D.h:38
Definition global.h:217