Skip to content

Commit 560cc66

Browse files
schoenebergschoeneberg
andauthored
Corrected the initial conditions for the IDM-g temperature (and some minor beauty changes) (#224)
Co-authored-by: schoeneberg <schoeneberg@github.com>
1 parent da2a7a6 commit 560cc66

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

source/thermodynamics.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4742,14 +4742,14 @@ int thermodynamics_idm_initial_temperature(
47424742

47434743
/* idm-idr steady state */
47444744
if ((pth->has_idm_dr == _TRUE_) && (pth->n_index_idm_dr == 0)) {
4745-
epsilon = 2*4./3.*pvecback[pba->index_bg_rho_idr]/pvecback[pba->index_bg_rho_idm]*
4746-
pth->a_idm_dr*pow((1.+ z_ini)/1.e7,pth->n_index_idm_dr)*pba->Omega0_idm*pow(pba->h,2) / pvecback[pba->index_bg_H]*(1.+z_ini);
4745+
ptdw->dmu_idm_dr = pth->a_idm_dr*pow((1.+ z_ini)/1.e7,pth->n_index_idm_dr)*pba->Omega0_idm*pow(pba->h,2); // constant
4746+
ptdw->Sinv_idm_dr = 4./3.*pvecback[pba->index_bg_rho_idr]/pvecback[pba->index_bg_rho_idm]; // propto (1+z_ini)
4747+
epsilon = 2*ptdw->Sinv_idm_dr*ptdw->dmu_idm_dr / pvecback[pba->index_bg_H]*(1.+z_ini); // constant
47474748
}
47484749
/* idm_g steady state */
47494750
else if (pth->has_idm_g == _TRUE_ && pth->n_index_idm_g == -2) {
4750-
ptdw->dmu_idm_dr = pth->a_idm_dr*pow((1.+ z_ini)/1.e7,pth->n_index_idm_dr)*pba->Omega0_idm*pow(pba->h,2);
4751-
ptdw->Sinv_idm_dr = 4./3.*pvecback[pba->index_bg_rho_idr]/pvecback[pba->index_bg_rho_idm];
4752-
alpha = 2.* ptdw->dmu_idm_dr * ptdw->Sinv_idm_dr;
4751+
ptdw->dmu_idm_g = 3./8./_PI_/_G_*pow(1.+z_ini, 2+pth->n_index_idm_g)*pba->Omega0_idm*pba->H0*pba->H0*pth->u_idm_g*pow(_c_,4)*_sigma_/1.e11/_eV_/_Mpc_over_m_; // constant
4752+
beta = 2.*4./3. * pvecback[pba->index_bg_rho_g]/pvecback[pba->index_bg_rho_idm] * ptdw->dmu_idm_g / pvecback[pba->index_bg_H] * (1+z_ini); // constant
47534753
}
47544754
/* idm_b steady state */
47554755
else if (pth->has_idm_b == _TRUE_ && pth->n_index_idm_b == -3) {
@@ -4760,7 +4760,7 @@ int thermodynamics_idm_initial_temperature(
47604760
ptdw->R_idm_b = (pvecback[pba->index_bg_a]*pvecback[pba->index_bg_rho_b]*pth->cross_idm_b*pth->n_coeff_idm_b/(m_b+pth->m_idm))
47614761
*pow(T_diff_idm_b,(pth->n_index_idm_b+1.0)/2.0)*FHe
47624762
*(3.e-4*pow(_c_,4.)/(8.*_PI_*_Mpc_over_m_*_G_*_eV_));
4763-
alpha = 2.*pth->m_idm/(pth->m_idm + m_b)*ptdw->R_idm_b;
4763+
alpha = 2.*pth->m_idm/(pth->m_idm + m_b)*ptdw->R_idm_b; // approximately constant
47644764
}
47654765

47664766
/* This formula (assuming alpha,beta,epsilon=const) approximates the steady-state solution of the IDM temperature evolution equation */

0 commit comments

Comments
 (0)