Commit 003d05d0 authored by Julia Stadler's avatar Julia Stadler
Browse files

testd modifications to thermodynamics module

parent f288bd82
......@@ -37,5 +37,5 @@
-> only if has_coupling_nuDM is TRUE
* in function 'thermodynamics_indices'
line 952: asign index to pth->index_dmu_nuDM
line 952: asign index to pth->index_th_dmu_nuDM
-> only if has_coupling_nuDM is TRUE
......@@ -175,7 +175,7 @@ struct thermo
int index_th_ddcb2; /**< second derivative wrt conformal time of squared baryon sound speed \f$ d^2 [c_b^2] / d \tau^2 \f$ (only computed if some non0-minimal tight-coupling schemes is requested) */
int index_th_rate; /**< maximum variation rate of \f$ exp^{-\kappa}\f$, g and \f$ (d g / d \tau) \f$, used for computing integration step in perturbation module */
int index_th_r_d; /**< simple analytic approximation to the photon comoving damping scale */
int index_th_dmu_nDM; /**< rate for DM-neutrino scattering */
int index_th_dmu_nuDM; /**< rate for DM-neutrino scattering */
int th_size; /**< size of thermodynamics vector */
//@}
......
......@@ -23,7 +23,7 @@ N_ur = 3.046
-------------------
---> g-cdm coupling
-------------------
u_nuDM = 0.01
u_nuDM = 0.0
gauge = newtonian
k_pivot = 0.05
sBBN file = ./bbn/sBBN.dat
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
# List of input/precision parameters actually read
# (all other parameters set to default values)
# Obtained with CLASS v2.4.1 (for developpers: svn version 6142M)
#
# This file can be used as the input file of another run
#
h = 0.67556
T_cmb = 2.7255
omega_b = 0.022032
N_ur = 3.046
omega_cdm = 0.12038
Omega_dcdmdr = 0.0
Gamma_dcdm = 0.0
N_ncdm = 0
Omega_k = 0.
Omega_fld = 0
Omega_scf = 0
YHe = BBN
recombination = RECFAST
reio_parametrization = reio_camb
z_reio = 11.357
reionization_exponent = 1.5
reionization_width = 0.5
helium_fullreio_redshift = 3.5
helium_fullreio_width = 0.5
annihilation = 0.
annihilation_variation = 0.
annihilation_z = 1000
annihilation_zmax = 2500
annihilation_zmin = 30
annihilation_f_halo = 20
annihilation_z_halo = 8
on the spot = yes
decay = 0.
output = tCl,pCl,lCl
modes = s
lensing = yes
ic = ad
gauge = synchronous
P_k_ini type = analytic_Pk
k_pivot = 0.05
A_s = 2.215e-9
n_s = 0.9619
alpha_s = 0.
l_max_scalars = 2500
headers = yes
format = class
write background = no
write thermodynamics = no
write primordial = no
write parameters = yeap
input_verbose = 1
background_verbose = 1
thermodynamics_verbose = 1
perturbations_verbose = 1
transfer_verbose = 1
primordial_verbose = 1
spectra_verbose = 1
nonlinear_verbose = 1
lensing_verbose = 1
output_verbose = 1
root = output/explanatory00_
#
# List of input/precision parameters passed
# but not used (just for info)
#
deprecated) (one more remark: if you have respectively 1,2,3 massive neutrinos, if you stick to the default value T_ncdm equal to 0.71611, designed to give m/omega of 93.14 eV, and if you want to use N_ur to get N_eff = 3.046 in the early universe, then you should pass here respectively 2.0328,1.0196,0.00641)
ncdm_psd_filenames = psd_FD_single.dat
ncdm_psd_parameters = 0.3 ,0.5, 0.05
m_ncdm = 0.04, 0.04, 0.04
w0_fld = -0.9
wa_fld = 0.
cs2_fld = 1
attractor_ic_scf = yes
scf_parameters = 10.0, 0.0, 0.0, 0.0, 100.0, 0.0
scf_tuning_index = 0
binned_reio_num = 3
binned_reio_z = 8,12,16
binned_reio_xe = 0.8,0.2,0.1
binned_reio_step_sharpness = 0.3
f_bi = 1.
n_bi = 1.5
f_cdi = 1.
f_nid = 1.
n_nid = 2.
alpha_nid = 0.01
c_ad_bi = 0.5
c_ad_cdi = -1.
c_bi_nid = 1.
r = 1.
n_t = scc
alpha_t = scc
potential = polynomial
2.b.2) for 'inflation_V' and 'polynomial': enter either the coefficients 'V_0', 'V_1', 'V_2', 'V_3', 'V_4' of the Taylor expansion (in units of Planck mass to appropriate power), or their ratios 'R_0', 'R_1', 'R_2', 'R_3', 'R_4' corresponding to (128pi/3)*V_0^3/V_1^2, V_1^2/V_0^2, V_2/V_0, V_1*V_3/V_0, V_1^2*V_4/V_0^3, or the potential-slow-roll parameters 'PSR_0', 'PSR_1', 'PSR_2', 'PSR_3', 'PSR_4', equal respectively to R_0, epsilon_V = R_1/(16pi), eta_V=R_2/(8pi), ksi_V=R_3/(8pi)^2, omega_V=R_4/(8pi)^3 (default: 'V_0' set to 1.25e-13, 'V_1' to 1.12e-14, 'V_2' to 6.95e-14, 'V_3' and 'V_4' to zero).
V_0 = 1.e-13
V_1 = -1.e-14
V_2 = 7.e-14
H_0 = 1.e-13
H_1 = -1.e-14
H_2 = 7.e-14
full_potential = polynomial
ln_aH_ratio = 50
k1 = 0.002
k2 = 0.1
P_{RR}^1 = 2.3e-9
P_{RR}^2 = 2.3e-9
P_{II}^1 = 1.e-11
P_{II}^2 = 1.e-11
P_{RI}^1 = -1.e-13
|P_{RI}^2| = 1.e-13
command = cat external_Pk/Pk_example.dat
custom1 = 0.05
custom2 = 2.215e-9
custom3 = 0.9624
custom4 = 2e-10
custom5 = -0.1
l_max_tensors = 500
P_k_max_h/Mpc = 1.
z_pk = 0
selection = gaussian
selection_mean = 0.98,0.99,1.0,1.1,1.2
selection_width = 0.1
non_diagonal = 4
bias = 1.
s_bias = 0.
......@@ -375,6 +375,15 @@ int thermodynamics_init(
pth->error_message,
"CDM decay effects require the presence of CDM!");
/* test nuDM scattering parameters */
class_test((pth->u_nuDM<0.),
pth->error_message,
"DM-nu coupling strength can't be smaller than zero!");
class_test((pth->has_coupling_nuDM==_TRUE_)&&(pba->K!=0),
pth->error_message,
"DM-nu coupling not implemented with non-flat curvature");
/* tests in order to prevent segmentation fault in the following */
class_test(_not4_ == 0.,
pth->error_message,
......@@ -622,7 +631,7 @@ int thermodynamics_init(
/* compute dmu_nuDM */
if(pth->has_coupling_nuDM==_TRUE_){
for (index_tau=0; index_tau < pth->tt_size; index_tau++) {
pth->thermodynamics_table[index_tau*pth->th_size+pth->index_th_dmu_nDM] = 3./8./_PI_/_G_*(pth->z_table[index_tau]+1.)*(pth->z_table[index_tau]+1.)*pba->Omega0_cdm*pba->H0*pba->H0*pth->u_nuDM*pow(_c_,4)*_sigma_/1.e11/_eV_/_Mpc_over_m_;
pth->thermodynamics_table[index_tau*pth->th_size+pth->index_th_dmu_nuDM] = 3./8./_PI_/_G_*(pth->z_table[index_tau]+1.)*(pth->z_table[index_tau]+1.)*pba->Omega0_cdm*pba->H0*pba->H0*pth->u_nuDM*pow(_c_,4)*_sigma_/1.e11/_eV_/_Mpc_over_m_;
}
}
......@@ -939,6 +948,11 @@ int thermodynamics_indices(
index++;
}
if(pth->has_coupling_nuDM==_TRUE_){
pth->index_th_dmu_nuDM = index;
index++;
}
/* end of indices */
pth->th_size = index;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment