CLASSpp Manual
Cosmology reference and developer manual
Loading...
Searching...
No Matches
axion_ede_fluid.h
1#pragma once
2
3#include "fluid.h"
4
19 public:
20 AxionEDEFluid(const background& pba,
21 double omega0_fld,
22 double a_c,
23 double n_axion,
24 double nu,
25 double w_i,
26 double w_f,
27 double theta_i);
28
29 // ── closed-form pieces (unit-testable without a background pipeline) ──────
31 static double WFinal(double n);
33 static double Integral3OnePlusWOverA(double a, double a_c, double nu, double w_i, double w_f);
35 static double OmegaZeroFromOmegaAc(
36 double omega_ac, double a_c, double nu, double w_i, double w_f);
37 static double OmegaAcFromOmegaZero(double omega0, double a_c, double nu, double w_i, double w_f);
38
39 void ComputeWFld(double a,
40 double* w_fld,
41 double* dw_over_da_fld,
42 double* integral_fld) const override;
43 double Cs2(double k2, double a) const override;
44 bool ReachesPhantomDivide() const override {
45 // w(a) = w_i + (w_f - w_i)/(1 + (a_c/a)^r) > w_i = -1 strictly for all a > 0;
46 // the exact -1 at the a = 0 asymptote lies outside the integration domain.
47 return false;
48 }
49 bool HyrecCplApproximation(double* /*w0*/, double* /*wa*/) const override {
50 // No CPL pair represents a frozen->dilution sigmoid: HyRec would extrapolate
51 // rho_DE ~ a^(-3(1+w_f)) from today's density to all redshifts and destroy the
52 // recombination-era expansion rate. Callers must use RECFAST (reads the true
53 // background) or implement true-H(z) feeding for HyRec.
54 return false;
55 }
57 double* y,
58 const PerturbIcContext& ctx) override;
59 void SetBackgroundModule(const BackgroundModule* bgm) override;
60
61 double a_c() const {
62 return a_c_;
63 }
64 double n_axion() const {
65 return n_axion_;
66 }
67 double omega_axion() const {
68 return omega_axion_;
69 }
71 void SetOmegaAxionForTest(double omega_axion) {
72 omega_axion_ = omega_axion;
73 }
74
75 private:
79 void DeriveAxionScales();
80
81 double a_c_ = 0.;
82 double n_axion_ = 3.;
83 double nu_ = 1.;
84 double w_i_ = -1.;
85 double w_f_ = 0.5;
86 double theta_i_ = 0.;
87 const background& pba_ref_; // FluidSpecies::pba_ is private; keep our own ref for H0
88 double omega_ac_ = 0.; // rho_fld(a_c)/rho_crit0
89 double m_fld_ = 0.; // axion mass in units of H0 (derived, diagnostic)
90 double alpha_fld_ = 0.; // decay constant in reduced-Planck units (derived, diagnostic)
91 double omega_axion_ = 0.; // characteristic oscillation frequency today [1/Mpc]
92};
Definition axion_ede_fluid.h:18
void SetBackgroundModule(const BackgroundModule *bgm) override
Definition axion_ede_fluid.cpp:116
static double OmegaZeroFromOmegaAc(double omega_ac, double a_c, double nu, double w_i, double w_f)
Definition axion_ede_fluid.cpp:48
double Cs2(double k2, double a) const override
Definition axion_ede_fluid.cpp:86
bool ReachesPhantomDivide() const override
Definition axion_ede_fluid.h:44
void ApplyInitialConditions(const BaseSpecies::PerturbLayout &layout, double *y, const PerturbIcContext &ctx) override
Definition axion_ede_fluid.cpp:93
static double Integral3OnePlusWOverA(double a, double a_c, double nu, double w_i, double w_f)
Definition axion_ede_fluid.cpp:39
void ComputeWFld(double a, double *w_fld, double *dw_over_da_fld, double *integral_fld) const override
Definition axion_ede_fluid.cpp:58
static double WFinal(double n)
Definition axion_ede_fluid.cpp:35
void SetOmegaAxionForTest(double omega_axion)
Definition axion_ede_fluid.h:71
bool HyrecCplApproximation(double *, double *) const override
Definition axion_ede_fluid.h:49
Definition fluid.h:22
Definition base_species.h:89
Definition perturb_source_context.h:125