https://github.com/miguelzuma/hi_class_public
Raw File
Tip revision: 16ae0f6ccfcee513146ec36b690678f34fb687f4 authored by Miguel Zumalacarregui on 23 May 2020, 00:31:57 UTC
Merge pull request #8 from emiliobellini/hi_class
Tip revision: 16ae0f6
hi_class.ini
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
*  hi_class input parameter file  *
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*

> This example input file lists all the new parameters implemented in hi_class
> with detailed comments. The idea here is that the parameters used also in CLASS
> are not specified here, i.e. they assume their standard value. For a complete
> list of these parameters look at the "explanatory.ini" file.
> All the quantities related to the scalar field introduced in hi_class have been
> marked with the "_smg" label (scalar modified gravity).
> Only lines containing an equal sign not preceded by a sharp sign "#" are
> considered by the code. Hence, do not write an equal sign within a comment,
> the whole line would be interpreted as relevant input. Input files must have
> an extension ".ini".

> If you use the code in a publication please cite the original CLASS paper plus
>
> "hi_class: Horndeski in the Cosmic Linear Anisotropy Solving System"
> M. Zumalacarregui, E. Bellini, I. Sawicki, J. Lesgourgues, P. Ferreira
> arXiv:1605.06102 10.1088/1475-7516/2017/08/019 JCAP 1708 (2017) no.08, 019.
>
> AND
>
> "hi_class: Background Evolution, Initial Conditions and Approximation Schemes"
> E. Bellini, I. Sawicki, M. Zumalacarregui
> arXiv:1909.01828

> For more details on the hi_class course please visit the websites
> 
>    hiclass-code.net
>    class-code.net
> 
> Check out section "Resources" of the hi-class website for additional materials


----------------------------
----> background parameters:
----------------------------

1a) Omega_smg is the fractional density of the scalar field today. There are three possibilities
    i)    Omega_smg unspecified or equivalently set to 0. In this case the code will
          ignore the scalar field equations and will use the standard CLASS equations
    ii)   Omega_smg has a value larger than 0 but smaller than 1. In this case you should
          leave either Omega_Lambda or Omega_fld unspecified. Then, hi_class will run# default: no
          with the scalar field equations, and Omega_Lambda or Omega_fld will be inferred
          using the closure equation (sum_i Omega_i) equals (1 + Omega_k)
    iii)  Omega_smg has a negqative value. In this case the equations for the scalar field
          will be used, you have to specify both Omega_Lambda and Omega_fld, and Omega_smg will
          be inferred by the code using the closure equation
    (see the "explanatory.ini" file for details on perfect fluid options)

Omega_Lambda = 0 
Omega_fld = 0
Omega_smg = -1


1b) For debugging purposes one can replace Omega_smg -> Omega_smg_debug 
    (Omega_smg_debug won't be read unless Omega_smg is left unspecified).
    In this case the code will not attempt to adjust Omega_smg, the closure relation will
    not be satisfied, unless the guessed parameters are correct

# Omega_smg_debug = 0.


----------------------------------
----> modified gravity parameters:
----------------------------------

2)  hi_class can handle two types of gravity models
    i)    covariant theories are based on a scalar-tensor Lagrangian (see Bellini+ 1909.01828) 
    ii)   parameterized modifications of gravity are based on the EFT of DE (see Zumalacarregui+ 1605.06102)
    The theory of gravity is specified through "gravity_model" with parameter values in "parameters_smg".
    For parameterizations, one needs to specify an additional "expansion_model" with parameters "expansion_smg" (see below)

2a) In covariant models the parameters control both the expansion history and perturbations
    (internally, covariant theories are distinguished via the "field_evolution_smg" flag)
    One of the paramters needs to be varied to fix the value of Omega_smg (see 2d)
    Currently the following covariant theories are implemented
    i)    "brans dicke"
    ii)   "monomial quintessence"
    iii)  "galileon" (includes "cubic galileon", "quartic galileon" and "quintic galileon"
    iv)   "nkgb" (Kinetic Gravity Braiding)
    The parameters of each covariant theory are explained in a separate "theory_name.ini" file
    located in the "gravity_models" directory

#gravity_model = brans dicke 
#parameters_smg =   0.7, 50, 1., 0


2b) For parameterizations the theory of gravity is described by the alpha functions at the linear level.
    There are several possible parametrizations of the alpha functions currently implemented
    i)    "propto_omega": all the alphas are proportional to the fractional density of the Dark
          Energy fluid at the background. Then, you have to provide a vector containg the
          factor of proportionality of each alpha and the initial value of the Planck Mass
    ii)   "propto_scale": all the alphas are proportional to the scale factor. Then, you have
          to provide a vector containg the factor of proportionality of each alpha and the
          initial value of the Planck Mass
    iii)  "constant_alphas": all the alphas are constant in time. Then, you have to provide a
          vector containg the value of each alpha and the initial value of the Planck Mass
    iv)   "eft_alphas_power_law": delta_M, alpha_{K, B, T} are proportional to the scale factor to
	  some power. Then, you have to provide a vector containg eight parameters, the four
	  proportionality constants and the four exponents of the scale factor. This generalize
	  the "propto_scale" parametrization with the remarkable exception that in that case
	  alpha_M was proportional to the scale factor, while here it is the Planck mass that
	  scales with the scale factor
    v)    "eft_gammas_power_law": this parametrization uses the basis of the eft framework
	  (Omega, gamma_i) and assumes that they are power laws of the scale factor
	  (g1_0*pow(a,g1_exp)). You have to provide a vector containing eight parameters,
	  the four proportionality constants and the four exponents of the scale factor
    vi)   "eft_gammas_exponential": this parametrization uses the basis of the eft framework
	  (Omega, gamma_i) and assumes that they are exponentials in the scale factor. In a
	  schematic way it reads: exp(gi_0*pow(a,gi_exp))-1. You have to provide a vector
	  containing eight parameters, the four proportionality constants and the four
	  exponents of the scale factor
    The parametrization you want to used is stored in the variable "gravity_model", while the
    value of the parameters is stored in the vector "parameters_smg"
    i)    "propto_omega" -> x_k, x_b, x_m, x_t, M*^2_ini (default)
    ii)   "propto_scale" -> x_k, x_b, x_m, x_t, M*^2_ini
    iii)  "constant_alphas" -> x_k, x_b, x_m, x_t, M*^2_ini
    iv)   "eft_alphas_power_law" -> delta_M_0, x_k, x_b, x_t, delta_M_0_exp, x_k_exp, x_b_exp, x_t_exp
    v)    "eft_gammas_power_law" -> Om_0, g_1, g_2, g_3, Om_0_exp, g_1_exp, g_2_exp, g_3_exp
    vi)   "eft_gammas_exponential" -> Om_0, g_1, g_2, g_3, Om_0_exp, g_1_exp, g_2_exp, g_3_exp


gravity_model = propto_omega
parameters_smg = 1., 0., 0., 0., 1.


2c) When choosing parameterizations one needs to provide an expansion history of the universe.
    i)    "lcdm": fixes the expansion history to be the one predicted by a cosmological constant
    ii)   "wowa": introduces a fluid with equation of state p/rho equal to w0+wa(1-a/a0)
    iii)  " wede": early dark energy + constant equation of state at late times  (Doran-Robbers model astro-ph/0601544 implemented as in Pettorino et al. 1301.5279)
    This information is stored in the "expansion_model" variable. After specifying it, you have
    to provide the values for the parameters to fully specify the parametrization you chose. These
    are stored in the vector "expansion_smg"
    i)    "lcdm" -> Omega_smg (default)
    ii)   "wowa" -> Omega_smg, w0, wa
    iii)  "wede" -> Omega_smg, w0, Omega_ede

expansion_model = lcdm
expansion_smg = 0.5 #this value will be overwritten using the closure equation.
# expansion_model = wowa
# expansion_smg = 0.5, -1., 0.


2d) Given a vector containing the values of the parameters needed to fully fix the background
    evolution you chose, you should specify which parameter you want to vary to satisfy the
    closure equation (tuning_index_smg, default: 0) and  your initial guess on how much you want
    to vary it (tuning_dxdy_guess_smg, default: 1)
    This choice is necessary for covariant theories and parameterizations

# tuning_index_smg = 0
# tuning_dxdy_guess_smg = 1.


2e) Parameter controling how much smg information do you want on the background.dat file
    (works as _verbose parameters, all lower priority are included)
    0 -> rho,p
    1 -> alpha functions, stability parameters (c_s^2, D)
    2 -> phi, phi', phi'' and Friedmann constraint equations (only covariant theories)
    3 -> functions useful to calculate perturbations (lambda_i, ...)

output_background_smg = 10


---------------------------
----> stability parameters:
---------------------------

3a) The absence of ghost and gradient instabilities is tested in the code for both scalars
    and tensors. It is possible to avoid these tests altoghether by changing

skip_stability_tests_smg = no 

3b) If skip_stability_tests_smg is set to no, it is possible to relax the stability conditions
    to accept slightly negative values  (moslty to avoid numerical noise around 0).
    Indeed, the code internally verify that the following conditions are satisfied at all times
    i)    cs2_smg > - abs(cs2_safe_smg). Sound speed of the scalar sector
    ii)   ct2_smg > - abs(ct2_safe_smg). Sound speed of the tensor sector
    iii)  D_smg > - abs(D_safe_smg). Kinetic term of the scalar sector
    iv)   M2_smg > - abs(M2_safe_smg). Kinetic term of the tensor sector
    Negative values skip a test altogether (all default values are zero)

cs2_safe_smg = 0.
D_safe_smg = 0.
ct2_safe_smg = 0.
M2_safe_smg = 0.

3c) It is also possible to omit stability tests before a certain scale factor (default 0).
    Useful for models where the stability failure is due to numerical errors (e.g. brans_dicke)

a_min_stability_test_smg = 0


----------------------------------------
----> background integration parameters:
----------------------------------------

4a) hi_class integrates a combination of the dynamical equation and the Friedmann constraint
    to avoid problems associated with having different branches and constraint violations due to
    numerical integration. The constraint acts as a friction term
    i)    evolve the dynamical equation (change uses the constraint equation and will NOT work for most Lagrangian-based theories)
    ii)   coefficient to the constraint-damping friction term 

hubble_evolution = y 
hubble_friction = 3. 


-------------------------------------------------
----> perturbation initial conditions parameters:
-------------------------------------------------

5a) There are two possible initial conditions for the perturbations of the scalar field
    i)     "ext_field_attr": assumes that scalar does not gravitate (no modified gravity) at early times
           but only follows the superhorizon potential created by radiation (default)
    ii)    "gravitating_attr": allows the scalar to gravitate (gravity is modified) at early times
           modifying the superhorizon evolution of other species.
    iii)   "single_clock": single_clock IC given with respect to photons
    iv)    "zero": set the initial value of the scalar field and its first derivative to 0

pert_initial_conditions_smg = ext_field_attr

5b) Precision parameters used to set/test initial conditions: for certain choices of parameters models, 
    it may well be that a new fast growing mode appears. This would then dominate the initial evolution 
    and decouple the initial conditions from those given by inflation. We test to disallow such situations.
    i)     pert_ic_ini_z_ref_smg -> redshift at which initial IC stability test performed */
    ii)    pert_ic_tolerance_smg -> tolerance to deviations from standard ICs h~tau^2 as evaluated at redshift pert_ic_ini_z_ref_smg (negative values override test)
    iii)   pert_ic_regulator_smg -> minimum size of denominator in IC expressions: regulate to prevent infinities (negative values set off regulator)
    iv)    pert_qs_ic_tolerance_test_smg -> Max contribution of QS SMG at superhorizon scales to zeta non-conservation as fraction of standard contributon from radiation
    
    
pert_ic_ini_z_ref_smg = 1e10    
pert_ic_tolerance_smg = 2e-2 
pert_ic_regulator_smg = 1e-15
pert_qs_ic_tolerance_test_smg = 10
    

--------------------------------------------
----> quasi-static approximation parameters:
--------------------------------------------

6a) This function set the method used for the qs_smg approximation during the run of the code.
    The options are:
    i)    "automatic" -> uses the approximation scheme implemented
    ii)   "fully_dynamic" -> forces the fully-dynamical evolution of the perturbations at all times (default)
    iii)  "quasi_static" -> forces the quasi-static evolution of the perturbations at all times
    iv)   "fully_dynamic_debug" -> forces the fully-dynamic evolution but evaluates the approximation scheme
    v)    "quasi_static_debug" -> forces the quasi-static evolution but evaluates the approximation scheme

method_qs_smg = fully_dynamic

6b) Precision parameters used in the quasi-static approximation (only if "automatic" is used)
    i)    z_fd_qs_smg -> minimum redshift after which the user requires the fully-dynamic evolution
    ii)   trigger_mass_qs_smg -> minimum effective mass above which the quasi-static approximation is switched on
    iii)  trigger_rad_qs_smg -> minimum radiation trigger for quasi-static approximation
    iv)   eps_s_qs_smg -> minimum relative decay of oscillating solution before switching on quasi-static approximation
    Note that all the conditions need to be satisfied for the quasi-static approximation to be used

z_fd_qs_smg = 10. 
trigger_mass_qs_smg = 1.e3 
trigger_rad_qs_smg = 1.e3 
eps_s_qs_smg = 0.01

6c) Sampling to determine intervals for quasi-static approximation
    i)    n_min_qs_smg -> minimum number of steps used to sample quantities in the quasi-static approximation 
    ii)   n_max_qs_smg -> maximum number of steps used to sample quantities in the quasi-static approximation 
    
n_min_qs_smg = 1e2 
n_max_qs_smg = 1e4 


---------------------------
----> precision parameters:
---------------------------

7a) Sometimes the evolution of the perturbations is slown down due to the presence of rapid
    oscillations of the scalar field at early times. We noticed that it is possible to speed
    up the code by artificially adding a constant value to the kineticity. This should not
    affect observable scales, but you use it at your own risk! (default: 0.)
    NOTE: it is advised to use a QS approximation instead (after V2)

# kineticity_safe_smg = 1e-4

7b) When studying early dark energy models, sometimes the code complaints if radiation is
    not sufficiently dominant at early times. Then, you can try to modify the CLASS precision
    parameter tol_initial_Omega_r (default: 1.e-4)

# tol_initial_Omega_r = 1.e-4

7c) We noticed that some precision parameter of CLASS has to be modified to get precise enough
    results in hi_class. We then changed their default values in "source/input.c". These are

start_small_k_at_tau_c_over_tau_h = 1e-4
start_large_k_at_tau_h_over_tau_k = 1e-4
perturb_sampling_stepsize = 0.05
l_logstep = 1.045
l_linstep = 50


--------------------------------
----> standard CLASS parameters:
--------------------------------

8) Here we report for completeness some parameters that are present in CLASS, see explanatory.ini
   for details.

8a) list of output spectra requested

output = tCl,pCl,lCl,mPk

8b) file name root 'root' for all output files

root = output/test_

8c) Do you want to write a file with the input parameters you used? Do you want to write a table
    of background quantitites in a file?

write parameters = yeap
write background = yeah
k_output_values = 0.1, 0.01, 0.0001


8d) Verbose parameters
input_verbose = 1
background_verbose = 1
output_verbose = 1
thermodynamics_verbose = 1
perturbations_verbose = 1
spectra_verbose = 1
back to top