Skip to content

How to implement a transition in Omega_cdm(a) in CLASS? #631

@DahmaniSafae

Description

@DahmaniSafae

Hello,

I’m working on a dark matter model with a transition at a specific redshift z_tr. Instead of using a Heaviside function directly, I have used a simple condition in the code like:

if (pba->has_cdm == TRUE) {
if (a > 1./(1.+z_tr)) {
pvecback[pba->index_bg_rho_cdm] = expression_1;
} else {
pvecback[pba->index_bg_rho_cdm] = expression_2;
}

rho_tot += pvecback[pba->index_bg_rho_cdm];
rho_m += pvecback[pba->index_bg_rho_cdm];
p_tot += 0.;
}

My goal is to simulate a transition in the background evolution, and I want to confirm whether this kind of implementation is sufficient within the CLASS framework. Is this conditional statement enough to define a sharp transition in the energy density of dark matter in CLASS, or are there additional changes needed.

Also, is there a recommended way to implement a smooth or sharp Heaviside step in CLASS?

Thank you for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions