3 #ifndef __THERMODYNAMICS__ 4 #define __THERMODYNAMICS__ 46 #define f1(x) (-0.75*x*(x*x/3.-1.)+0.5) 47 #define f2(x) (x*x*(0.5-x/3.)*6.) 507 double * energy_rate,
508 ErrorMsg error_message
516 double * energy_rate,
517 ErrorMsg error_message
580 void * fixed_parameters,
581 ErrorMsg error_message
593 char titles[_MAXTITLESTRINGLENGTH_]
596 int thermodynamics_output_data(
struct background * pba,
598 int number_of_titles,
602 int thermodynamics_tanh(
double x,
631 #define _m_e_ 9.10938215e-31 632 #define _m_p_ 1.672621637e-27 633 #define _m_H_ 1.673575e-27 634 #define _not4_ 3.9715 635 #define _sigma_ 6.6524616e-29 645 #define _RECFAST_INTEG_SIZE_ 3 647 #define _Lambda_ 8.2245809 648 #define _Lambda_He_ 51.3 649 #define _L_H_ion_ 1.096787737e7 650 #define _L_H_alpha_ 8.225916453e6 651 #define _L_He1_ion_ 1.98310772e7 652 #define _L_He2_ion_ 4.389088863e7 653 #define _L_He_2s_ 1.66277434e7 654 #define _L_He_2p_ 1.71134891e7 655 #define _A2P_s_ 1.798287e9 656 #define _A2P_t_ 177.58e0 657 #define _L_He_2Pt_ 1.690871466e7 658 #define _L_He_2St_ 1.5985597526e7 659 #define _L_He2St_ion_ 3.8454693845e6 660 #define _sigma_He_2Ps_ 1.436289e-22 661 #define _sigma_He_2Pt_ 1.484872e-22 671 #define _a_PPB_ 4.309 672 #define _b_PPB_ -0.6166 673 #define _c_PPB_ 0.6703 674 #define _d_PPB_ 0.5300 675 #define _T_0_ pow(10.,0.477121) 676 #define _a_VF_ pow(10.,-16.744) 678 #define _T_1_ pow(10.,5.114) 679 #define _a_trip_ pow(10.,-16.306) 680 #define _b_trip_ 0.761 690 #define _YHE_BIG_ 0.5 691 #define _YHE_SMALL_ 0.01 692 #define _Z_REC_MAX_ 2000. 693 #define _Z_REC_MIN_ 500. int index_re_cb2
Definition: thermodynamics.h:375
int thermodynamics_merge_reco_and_reio(struct precision *ppr, struct thermo *pth, struct recombination *preco, struct reionization *preio)
Definition: thermodynamics.c:3591
short has_on_the_spot
Definition: thermodynamics.h:325
short inter_normal
Definition: thermodynamics.h:248
double rs_rec
Definition: thermodynamics.h:204
double tau_ini
Definition: thermodynamics.h:230
int index_re_dkappadtau
Definition: thermodynamics.h:376
double CB1_He2
Definition: thermodynamics.h:317
int index_th_tau_d
Definition: thermodynamics.h:162
double CB1_He1
Definition: thermodynamics.h:316
Definition: background.h:25
int index_th_ddcb2
Definition: thermodynamics.h:172
double da_rec
Definition: thermodynamics.h:207
int rt_size
Definition: thermodynamics.h:387
int index_reio_width
Definition: thermodynamics.h:408
int index_re_xe
Definition: thermodynamics.h:279
double CDB_He
Definition: thermodynamics.h:307
Definition: thermodynamics.h:27
reionization_z_or_tau
Definition: thermodynamics.h:37
int index_th_dddkappa
Definition: thermodynamics.h:164
int index_reio_first_z
Definition: thermodynamics.h:418
double tau_free_streaming
Definition: thermodynamics.h:222
double decay
Definition: thermodynamics.h:327
int index_reio_first_xe
Definition: thermodynamics.h:419
int th_size
Definition: thermodynamics.h:175
int index_re_Tb
Definition: thermodynamics.h:374
double annihilation_zmax
Definition: thermodynamics.h:143
int index_reio_step_sharpness
Definition: thermodynamics.h:420
int thermodynamics_indices(struct thermo *pth, struct recombination *preco, struct reionization *preio)
Definition: thermodynamics.c:857
int re_size
Definition: thermodynamics.h:379
double annihilation
Definition: thermodynamics.h:323
double CT
Definition: thermodynamics.h:305
double reionization_width
Definition: thermodynamics.h:84
ErrorMsg error_message
Definition: thermodynamics.h:259
int thermodynamics_reionization_function(double z, struct thermo *pth, struct reionization *preio, double *xe)
Definition: thermodynamics.c:1434
double Tnow
Definition: thermodynamics.h:312
Definition: thermodynamics.h:26
double ds_rec
Definition: thermodynamics.h:205
double annihilation_variation
Definition: thermodynamics.h:128
double YHe
Definition: thermodynamics.h:66
Definition: thermodynamics.h:58
int index_re_cb2
Definition: thermodynamics.h:281
Definition: thermodynamics.h:30
int thermodynamics_free(struct thermo *pth)
Definition: thermodynamics.c:835
reionization_parametrization
Definition: thermodynamics.h:24
int re_size
Definition: thermodynamics.h:283
double CK_He
Definition: thermodynamics.h:308
double annihilation_z
Definition: thermodynamics.h:138
int index_th_dg
Definition: thermodynamics.h:167
double CK
Definition: thermodynamics.h:303
double n_e
Definition: thermodynamics.h:238
double z_d
Definition: thermodynamics.h:209
int index_th_xe
Definition: thermodynamics.h:160
int thermodynamics_init(struct precision *ppr, struct background *pba, struct thermo *pth)
Definition: thermodynamics.c:252
int index_reio_xe_after
Definition: thermodynamics.h:410
Definition: thermodynamics.h:29
double tau_rec
Definition: thermodynamics.h:203
int index_re_z
Definition: thermodynamics.h:372
int thermodynamics_get_xe_before_reionization(struct precision *ppr, struct thermo *pth, struct recombination *preco, double z, double *xe)
Definition: thermodynamics.c:1673
short has_on_the_spot
Definition: thermodynamics.h:124
int index_th_r_d
Definition: thermodynamics.h:174
int thermodynamics_helium_from_bbn(struct precision *ppr, struct background *pba, struct thermo *pth)
Definition: thermodynamics.c:1054
double angular_rescaling
Definition: thermodynamics.h:214
double * thermodynamics_table
Definition: thermodynamics.h:185
int thermodynamics_recombination_with_recfast(struct precision *ppr, struct background *pba, struct thermo *pth, struct recombination *preco, double *pvecback)
Definition: thermodynamics.c:2932
double fHe
Definition: thermodynamics.h:306
double annihilation_z
Definition: thermodynamics.h:339
int thermodynamics_at_z(struct background *pba, struct thermo *pth, double z, short inter_mode, int *last_index, double *pvecback, double *pvecthermo)
Definition: thermodynamics.c:97
int index_th_ddg
Definition: thermodynamics.h:168
double annihilation_zmax
Definition: thermodynamics.h:344
Definition: thermodynamics.h:449
int index_re_Tb
Definition: thermodynamics.h:280
int thermodynamics_derivs_with_recfast(double z, double *y, double *dy, void *parameters_and_workspace, ErrorMsg error_message)
Definition: thermodynamics.c:3327
double * z_table
Definition: thermodynamics.h:184
int index_re_z
Definition: thermodynamics.h:278
double * reionization_table
Definition: thermodynamics.h:388
double CDB
Definition: thermodynamics.h:301
int index_reio_xe_before
Definition: thermodynamics.h:409
double ds_d
Definition: thermodynamics.h:211
double annihilation_f_halo
Definition: thermodynamics.h:151
double rs_d
Definition: thermodynamics.h:212
int index_th_Tb
Definition: thermodynamics.h:169
double YHe
Definition: thermodynamics.h:319
int index_th_g
Definition: thermodynamics.h:166
double * d2thermodynamics_dz2_table
Definition: thermodynamics.h:193
int index_th_exp_m_kappa
Definition: thermodynamics.h:165
Definition: thermodynamics.h:39
int index_reio_exponent
Definition: thermodynamics.h:407
int index_th_ddkappa
Definition: thermodynamics.h:163
double tau_reio
Definition: thermodynamics.h:74
double annihilation
Definition: thermodynamics.h:122
short compute_cb2_derivatives
Definition: thermodynamics.h:78
int index_reio_start
Definition: thermodynamics.h:424
double annihilation_f_halo
Definition: thermodynamics.h:352
int index_reco_when_reio_start
Definition: thermodynamics.h:439
Definition: thermodynamics.h:28
double tau_cut
Definition: thermodynamics.h:213
int index_helium_fullreio_fraction
Definition: thermodynamics.h:411
int index_helium_fullreio_redshift
Definition: thermodynamics.h:412
double reionization_exponent
Definition: thermodynamics.h:86
int thermodynamics_reionization(struct precision *ppr, struct background *pba, struct thermo *pth, struct recombination *preco, struct reionization *preio, double *pvecback)
Definition: thermodynamics.c:1716
double helium_fullreio_width
Definition: thermodynamics.h:90
double * binned_reio_xe
Definition: thermodynamics.h:98
Definition: thermodynamics.h:25
Definition: thermodynamics.h:366
double * reio_inter_xe
Definition: thermodynamics.h:118
double annihilation_zmin
Definition: thermodynamics.h:147
double * binned_reio_z
Definition: thermodynamics.h:96
Definition: thermodynamics.h:272
double annihilation_variation
Definition: thermodynamics.h:329
double * reionization_parameters
Definition: thermodynamics.h:430
int thermodynamics_onthespot_energy_injection(struct precision *ppr, struct background *pba, struct recombination *preco, double z, double *energy_rate, ErrorMsg error_message)
Definition: thermodynamics.c:1279
double CL_He
Definition: thermodynamics.h:309
double ra_rec
Definition: thermodynamics.h:206
int index_reio_redshift
Definition: thermodynamics.h:406
double annihilation_z_halo
Definition: thermodynamics.h:152
double * many_tanh_z
Definition: thermodynamics.h:106
int index_th_rate
Definition: thermodynamics.h:173
recombination_algorithm
Definition: thermodynamics.h:15
double rd_rec
Definition: thermodynamics.h:208
double z_rec
Definition: thermodynamics.h:202
int index_helium_fullreio_width
Definition: thermodynamics.h:413
int index_re_xe
Definition: thermodynamics.h:373
int index_th_cb2
Definition: thermodynamics.h:170
double CB1
Definition: thermodynamics.h:315
int index_th_dcb2
Definition: thermodynamics.h:171
Definition: thermodynamics.h:38
double H0
Definition: thermodynamics.h:318
short compute_damping_scale
Definition: thermodynamics.h:80
double CR
Definition: thermodynamics.h:302
int reio_inter_num
Definition: thermodynamics.h:114
int index_re_dkappadz
Definition: thermodynamics.h:377
int index_th_dkappa
Definition: thermodynamics.h:161
double annihilation_zmin
Definition: thermodynamics.h:348
double * recombination_table
Definition: thermodynamics.h:292
int thermodynamics_recombination(struct precision *ppr, struct background *pba, struct thermo *pth, struct recombination *preco, double *pvecback)
Definition: thermodynamics.c:2574
int reio_num_params
Definition: thermodynamics.h:431
double fu
Definition: thermodynamics.h:310
double H_frac
Definition: thermodynamics.h:311
int thermodynamics_recombination_with_hyrec(struct precision *ppr, struct background *pba, struct thermo *pth, struct recombination *preco, double *pvecback)
Definition: thermodynamics.c:2623
double Nnow
Definition: thermodynamics.h:313
int thermodynamics_energy_injection(struct precision *ppr, struct background *pba, struct recombination *preco, double z, double *energy_rate, ErrorMsg error_message)
Definition: thermodynamics.c:1343
double z_reio
Definition: thermodynamics.h:76
short thermodynamics_verbose
Definition: thermodynamics.h:257
double Bfact
Definition: thermodynamics.h:314
double * many_tanh_xe
Definition: thermodynamics.h:108
int binned_reio_num
Definition: thermodynamics.h:94
double * reio_inter_z
Definition: thermodynamics.h:116
double binned_reio_step_sharpness
Definition: thermodynamics.h:100
double annihilation_z_halo
Definition: thermodynamics.h:353
int thermodynamics_reionization_sample(struct precision *ppr, struct background *pba, struct thermo *pth, struct recombination *preco, struct reionization *preio, double *pvecback)
Definition: thermodynamics.c:2246
int thermodynamics_output_titles(struct background *pba, struct thermo *pth, char titles[_MAXTITLESTRINGLENGTH_])
Definition: thermodynamics.c:3666
int rt_size
Definition: thermodynamics.h:291
double reionization_optical_depth
Definition: thermodynamics.h:396
double decay
Definition: thermodynamics.h:126
short inter_closeby
Definition: thermodynamics.h:249
double many_tanh_width
Definition: thermodynamics.h:110
double CL
Definition: thermodynamics.h:304
int index_re_dkappadtau
Definition: thermodynamics.h:282
double tau_d
Definition: thermodynamics.h:210
int reio_num_z
Definition: thermodynamics.h:417
int tt_size
Definition: thermodynamics.h:183
int index_re_d3kappadz3
Definition: thermodynamics.h:378
double helium_fullreio_redshift
Definition: thermodynamics.h:88
int many_tanh_num
Definition: thermodynamics.h:104