lesgourg / class_public

Public repository of the Cosmic Linear Anisotropy Solving System (master for the most recent version of the standard code; GW_CLASS to include Cosmic Gravitational Wave Background anisotropies; classnet branch for acceleration with neutral networks; ExoCLASS branch for exotic energy injection; class_matter branch for FFTlog)
220 stars 291 forks source link

Shooting errors while running with two dark matter species #500

Open Tulipray opened 1 year ago

Tulipray commented 1 year ago

Hi, I am very new to CLASS and I am working with scalar field dark matter model where I am considering dark matter to interact with the scalar field. In my case, I took two dark matter, first is cdm ( as usual but with negligible density) and second is dm1 (new dark matter whose density is same as present day cdm). In CLASS, for synchronous gauge, the velocity divergence θcdm is exactly vanishing at all times. In order to not violate the definition of synchronous gauge, I considered two dark matter as defined above. I modified the new dark matter, scalar field and metric perturbation equations in perturbation.c similar to eqs. 2.19 to 2.23 in https://arxiv.org/pdf/1505.03154.pdf. I kept the cdm background and perturbation equations unchanged. I also modified the background.c to include rho_dm1 equations similar to eq. 2.6 and modified the scalar field Klein Gorden eq. 2.4. Lastly, I did the necessary modifications in background.h, perturbation.h and input.c to take into account this new dark matter. But now, I am getting this errors after implementing ./class trial.ini and I don't understand where could I have made any mistakes or how to correct them.

Reading input parameters Computing unknown input parameter 'scf_shooting_parameter' using input parameter 'Omega_scf' -> matched budget equations by adjusting Omega_scf = 0.690026 -> matched budget equations by adjusting Omega_scf = 0.690026 Not using attractor initial conditions -> found 'scf_shooting_parameter = 0.00000000000000000000e+00' -> matched budget equations by adjusting Omega_scf = 0.690026 Running CLASS version v3.2.0 Computing background

Error running background_init =>background_init(L:846) :condition (pba->shooting_failed == TRUE) is true; Shooting failed, try optimising input_get_guess(). Error message:

input_shooting(L:646) :error in input_find_root(&xzero, &fevals, ppr->tol_shooting_deltax_rel, &fzw, errmsg); =>input_find_root(L:928) :error in input_fzerofun_1d(x1, pfzw, &f1, errmsg); =>input_fzerofun_1d(L:997) :error in input_try_unknown_parameters(&input, 1, pfzw, output, error_message); =>input_try_unknown_parameters(L:1373) :error in background_init(&pr,&ba); =>background_init(L:862) :error in background_solve(ppr,pba); =>background_solve(L:1952) :error in background_initial_conditions(ppr,pba,pvecback,pvecback_integration,&(loga_ini)); =>background_initial_conditions(L:2339) :condition (fabs(pvecback[pba->index_bg_Omega_r]-1.) > ppr->tol_initial_Omega_r) is true; Omega_r = 0.000000e+00, not close enough to 1. Decrease a_ini_over_a_today_default in order to start from radiation domination.

Please guide me as this is really important.