-
Notifications
You must be signed in to change notification settings - Fork 30
Introducing new models
For a step-by-step example see the exercises on hi_class (Cosmo Tools 2017 @ IFT, Madrid)
All the hi_class related variables are suffixed by the letters smg
, standing for scalar modified gravity. This notation allows one to find all the modifications simply by typing grep smg */*.*
in the terminal from the hi_class directory. The model for the background expansion and the expansion_model_smg
and gravity_model_smg
variables. The only methods that depend explicitly on the model are the following:
-
input_read_parameters
reads the value ofgravity_model_smg
andexpansion_model_smg
, together with the parameters describing the parameterisation and the expansion. Then it applies different options and tests depending on the specific case. -
background_gravity_functions
computes the value of$\rho_{\rm DE}$ and the$\alpha$ functions and obtains the value of the Hubble rate by solving the Friedmann equation. -
background_initial_conditions
sets the initial conditions in the case that some variable needs to be integrated (e.g. the effective Planck mass$M_*^2$ in terms of$\alpha_M$ ). -
background_gravity_parameters
prints the values of the expansion and gravity model and their parameters. This is done automatically if the value ofbackground_verbose
is high.
The above methods run a loop over the different expansion and gravity models, as determined by the variables gravity_model_smg
and expansion_model_smg
in the background structure, with the different possibilities specified through enum gravity_model
and enum expansion_model
at the beginning of background.h
. Other modifications within hi_class do not depend explicitly on the model under consideration. This is the case of the modified perturbation equations (contained in perturb_einstein
), which only depend on the values of the α functions and other background quantities.
Introducing a new model (for either expansion or gravity) on top of the ones available by default (summarised in table 1 of the hi_class paper) is as simple as finding all the instances of an already existing case (i.e. type grep propto_omega */*.*
in the terminal from the hi_class directory), copying these functions and adapting them to the physics of the new model.
Planck Mass variation: The effective Planck mass $M_^2$ and $\alpha_M$ are related by $ \alpha_M}\equiv\frac{\mathrm{d}\ln M_{}^{2}}{\mathrm{d}\ln a}$ For models with variations of the effective Planck mass
- By setting
M_pl_evolution_smg == _TRUE_
(ininput.c
)$M_*^2$ is obtained by integrating$\alpha_M$ (with an initial condition) - Otherwise
$\alpha_M$ will be obtained by differentiating$M_*^2$ .
This option can be set in input.c
for each model.
Home
Installation
Basic usage
classy: the python wrapper
Introducing new models
The code:
- Code 1: Philosophy and structure
- Code 2: Indexing
- Code 3: Errors
- Code 4: input.c
- Code 5: background.c
- Code 6: thermodynamics.c
- Code 7: perturbations.c
- Code 8: primordial.c
- Code 10: output.c
- Other modules
- classy: classy.pyx and classy.pxd
Examples: