1 Introduction

Recent observational data from type Ia supernovae (SNeIa) [1, 2], the cosmic microwave background (CMB) anisotropies [3,4,5], large scale structures [6,7,8], and baryon acoustic oscillations (BAO) [9,10,11], confirm \({\Lambda }\)CDM as the concordance model of cosmology. On the other hand, \({\Lambda }\)CDM model which is based on the theory of general relativity (GR), encounters some observational discrepancies, principally \(\sigma _8\) and \(H_0\) tensions. To be more specific, there is a disagreement between low-redshift determinations and Planck CMB measurements of matter perturbation amplitude, \(\sigma _8\) [5, 12]. Moreover, direct measurements of Hubble constant are in significant tension with Planck observations [5, 13,14,15,16]. So, inconsistencies between local and global data, motivate cosmologists to prob beyond \({\Lambda }\)CDM model. Accordingly, it is suggested to consider some corrections on GR, describing as modified theory of gravity [17,18,19,20].

On the other hand, Calcagni proposed an effective quantum field theory which is power counting renormalizable and Lorentz invariant, living in a fractal universe [21, 22]. The fractal nature firstly introduced by Mandelbrot in 1983 [23] suggests conditional cosmological principle in fractal universe, where the universe appears the same from every galaxy. Thereafter, in 1986, Linde [24] propounded a model of an eternally existing chaotic inflationary universe, explaining a fractal cosmology. Accordingly, there are several investigations on the theory of fractal cosmology in literatures. Rassem and Ahmed [25] in 1996 considered a nonhomogeneous cosmological model with a fractal distribution of matter which evolves to a homogeneous universe as time passes. The conditional cosmological principle in fractal cosmology is discussed in [26, 27]. Calcagni [28] studies Multi-fractal geometry. Thermodynamics of the apparent horizon in a fractal universe is explored in [29]. In order to find more theoretical studies on fractal cosmology refer to e.g. [30,31,32,33,34]. Furthermore, it is interesting to explore fractal models with cosmological data as discussed in [35,36,37,38,39,40] (also see [41] for a review). Correspondingly, in the present work we are going to investigate the fractal universe in background and perturbation levels, as well as studying observational constraints on parameters of fractal cosmology.

The paper is organized as follows. Section 2 is dedicated to field equations in a fractal universe. In Sect. 3, we study the fractal model numerically, and further we constrain the model with current observational data in Sect. 4. We summarize our results in Sect. 5.

2 Field equations in a fractal universe

The total action in a fractal spacetime is given by [21]

$$\begin{aligned} S=\frac{1}{16\pi G}\int {{\textrm{d}}{\varrho }(x)\, \sqrt{-g}\big (R-2{\Lambda }-\omega \partial _{\mu }v\partial ^{\mu }v\big )}+S_m, \end{aligned}$$
(1)

where \(\omega \) is the fractal parameter, v is the fractional function, and \({\textrm{d}}{\varrho }(x)\) is a Lebesgue–Stieltjes measure. It is possible to derive field equations from action (1) similar to scalar–tensor theories. Thus, in a fractal universe we obtain [21]

$$\begin{aligned}&R_{\mu \nu }-\frac{1}{2}g_{\mu \nu }(R-2{\Lambda }) +g_{\mu \nu }\frac{\Box {v}}{v}-\frac{\nabla _{\mu } \nabla _{\nu } v}{v} \nonumber \\&\quad +\omega \Big (\frac{1}{2}g_{\mu \nu }\partial _{\sigma }v\partial ^{\sigma }v-\partial _{\mu }v\partial _{\nu }v\Big )=8\pi G T_{\mu \nu } . \end{aligned}$$
(2)

Furthermore, continuity equation in a fractal spacetime takes the form [21]

$$\begin{aligned} \nabla _{\mu }\big (vT^{\mu }_{\nu }\big )-\partial _{\nu }v {\mathscr {L}}_m=0. \end{aligned}$$
(3)

It should be noted that for \(v=1\), standard equations in GR will be recovered. Here, we focus on a timelike fractal, then v is only time dependent given by

$$\begin{aligned} v=H_0^{\beta }\Big (\frac{a}{a_0}\Big )^{\beta } , \end{aligned}$$
(4)

in which \(\beta =4(1-\alpha )\) is the fractal dimension, and the parameter \(\alpha \) ranges as \(0<\alpha \le 1\).

We consider a fractal universe with the following flat Friedmann–Lemaître–Robertson–Walker (FLRW) metric in the synchronous gauge

$$\begin{aligned} {\textrm{d}}s^2=a^2(\tau )\Big (-{\textrm{d}}\tau ^2+\big (\delta _{ij} +h_{ij}\big ){\textrm{d}}x^i{\textrm{d}}x^j\Big ), \end{aligned}$$
(5)

in which

$$\begin{aligned} h_{ij}({\textbf{x}},\tau )\!=\!\int {\textrm{d}}^3k\,e^{i{\textbf{k}}.{\textbf{x}}} \!\bigg (\hat{k}_i\hat{k}_jh({\textbf{k}},\tau )\!+\!\Big (\hat{k}_i\hat{k}_j -\frac{1}{3}\delta _{ij}\Big )6\eta ({\textbf{k}},\tau )\!\bigg ), \end{aligned}$$

with scalar perturbations h and \(\eta \), and \({\textbf{k}}=k\hat{k}\) [42]. Then, considering the energy content of the universe as a perfect fluid with \(T_{\mu \nu }=\big (\rho +p\big )u_{\mu }u_{\nu }+g_{\mu \nu }p\), field equations in background level take the form

$$\begin{aligned}&H^2\bigg (1+\beta -\frac{1}{6}\omega H_0^{2\beta }\beta ^2 \Big (\frac{a}{a_0}\Big )^{2\beta }\bigg )=\frac{8\pi G}{3}\sum _{i}\bar{\rho }_i , \end{aligned}$$
(6)
$$\begin{aligned}&(\beta +2)\frac{H'}{a}+H^2\bigg (3+2\beta +\beta ^2+\frac{1}{2}\omega H_0^{2\beta }\beta ^2 \Big (\frac{a}{a_0}\Big )^{2\beta }\bigg ) \nonumber \\&\quad =-8\pi G \sum _{i}\bar{p}_i , \end{aligned}$$
(7)

where a prime indicates a deviation with respect to the conformal time. It can be easily seen that, \(\beta =0\) restores field equations in standard cosmology. According to Eq. (6), total density parameter can be find as

$$\begin{aligned} {\Omega }_{\textrm{tot}}=1+\beta -\frac{1}{6}\omega H_0^{2\beta }\beta ^2 \Big (\frac{a}{a_0}\Big )^{2\beta } , \end{aligned}$$
(8)

where we have considered a universe filled with radiation (R), baryons (B), dark matter (DM) and cosmological constant (\({\Lambda }\)). Also field equations to linear order of perturbations can be written as

$$\begin{aligned}&\frac{a'}{a}\Big (1+\frac{1}{2}\beta \Big )h'-2k^2\eta =8\pi G a^2 \sum _{i}\delta \rho _{i} , \end{aligned}$$
(9)
$$\begin{aligned}&k^2\eta '=4\pi G a^2 \sum _{i}\big (\bar{\rho }_i+\bar{p}_i\big )\theta _{i} , \end{aligned}$$
(10)
$$\begin{aligned}&\frac{1}{2}h''+3\eta ''+\frac{a'}{a}\big (h'+6\eta '\big )\Big (1+\frac{1}{2}\beta \Big )-k^2\eta =0 , \end{aligned}$$
(11)
$$\begin{aligned}&\frac{a'}{a}\Big (2+\beta \Big )h'+h''-2k^2\eta =-24\pi G a^2 \sum _{i}\delta p_{i} . \end{aligned}$$
(12)

In addition, regarding Eq. (3), conservation equations of fractal cosmology for ith component of the universe in background and perturbation levels become

$$\begin{aligned} \bar{\rho }'_i+\big (3+\beta \big )\frac{a'}{a}\big (\bar{\rho }_i+\bar{p}_i\big )=0 , \end{aligned}$$
(13)
$$\begin{aligned} \delta '_{i}&=-\frac{a'}{a}\big (3+\beta \big )\bigg [\delta _{i}\big (c^2_{si}-w_i\big ) \nonumber \\&\quad +\big (c^2_{si}-c^2_{ai}\big )\frac{a'}{a}\big (3+\beta \big )\big (1+w_i\big )\frac{\theta _{i}}{k^2}\bigg ] \nonumber \\&\quad -\big (1+w_i\big )\theta _{i}-\frac{1}{2}\big (1+w_i\big )h' , \end{aligned}$$
(14)
$$\begin{aligned} \theta '_{i}&=\theta _{i}\bigg [-\frac{a'}{a}\big (4+\beta \big )+\frac{a'}{a}\big (3+\beta \big ) \big (1+w_i+c^2_{si}-c^2_{ai}\big )\bigg ] \nonumber \\&\quad +\frac{k^2c^2_{si}}{1+w_i}\delta _{i} . \end{aligned}$$
(15)

Then, choosing \(\beta =0\) would recover equations in concordance \({\Lambda }\)CDM model.

Now that we have described main equations in fractal cosmology, it is possible to derive observational constraints on fractal model, using a modified version of the CLASSFootnote 1 code [43], and also applying an MCMCFootnote 2 approach via the Monte Python code [44, 45].

3 Numerical results

In this section, we modify the CLASS cosmological Boltzmann code according to the field equations of fractal model outlined in Sect. 2. Correspondingly, we take into account the Planck 2018 data [5] (i.e. \({\Omega }_{{\textrm{B}},0}h^2=0.02242\), \({\Omega }_{{\textrm{DM}},0}h^2=0.11933\), \(H_0=67.66\,\hbox {km}\,\hbox {s}^{-1}\,\hbox {Mpc}^{-1}\), \(A_s=2.105\times 10^{-9}\), and \(\tau _{\textrm{reio}}=0.0561\)) in our numerical investigation.

In Fig. 1 we depict the CMB temperature power spectra in fractal cosmology compared to \({\Lambda }\)CDM model. Upper panels display the CMB power spectra for different values of \(\beta \), where we have considered \(\omega =0\). In lower panels the CMB temperature anisotropy diagrams are illustrated for different values of \(\omega \), while regarding \(\beta =0.04\). Furthermore, for a better comparison we have shown the relative ratio with respect to \(\omega =0\) in the bottom-right panel, which indicates that the effect of \(\omega \) is not significant in CMB power spectra.

Fig. 1
figure 1

Upper panels show the CMB power spectra diagrams (left) and their relative ratio with respect to standard cosmological model (right) for different values of \(\beta \), considering \(\omega =0\). Lower panels show the CMB power spectra diagrams for different values of \(\omega \), considering \(\beta =0.04\), compared to \({\Lambda }\)CDM model (left) and their relative ratio with respect to the case \(\omega =0\) (right)

Figure 2 demonstrates the matter power spectra of fractal model in comparison with standard cosmological model. In left panel we see matter power spectra for different values of \(\beta \), where \(\omega \) is considered to be zero. Right panel shows the power spectra for different values of \(\omega \), in which we have fixed \(\beta \) to be 0.04. Considering this figure, fractal cosmology predicts a higher growth of structure which is in conflict with local probes of large scale structures. In addition, this plot explains that the fractal parameter \(\omega \) has no remarkable influence on structure formation.

Fig. 2
figure 2

Matter power spectra diagrams for different values of \(\beta \) compared to \({\Lambda }\)CDM model, considering \(\omega =0\) (left), and analogous diagrams for different values of \(\omega \), where \(\beta =0.04\) (right)

Moreover, the evolution of Hubble parameter in fractal cosmology is depicted in Fig. 3. Accordingly, we can conclude that Hubble tension is aggravated in fractal model, and also the expansion history would not be affected by the fractal parameter \(\omega \).

Fig. 3
figure 3

Hubble parameter in term of conformal time for different values of \(\beta \) compared to \({\Lambda }\)CDM model, where \(\omega =0\) (left), and analogous diagrams for different values of \(\omega \), regarding \(\beta =0.04\) (right)

4 Constraints from observational data

In this part, we employ the MCMC sampling package Monte Python to investigate observational constraints on fractal model. In this respect, we use the following set of cosmological parameters: \(\{100\,{\Omega }_{{\textrm{B}},0} h^2\), \({\Omega }_{{\textrm{DM}},0} h^2\), \(100\,\theta _s\), \(\ln (10^{10} A_s)\), \(n_s\), \(\tau _{{\textrm{reio}}}\), \(\beta \},\) where \({\Omega }_{{\textrm{B}},0} h^2\) and \({\Omega }_{{\textrm{DM}},0} h^2\) stand for the baryon and cold dark matter densities respectively, \(\theta _s\) represents the ratio of the sound horizon to the angular diameter distance at decoupling, \(A_s\) indicates the amplitude of the primordial scalar perturbation spectrum, \(n_s\) stands for the scalar spectral index, \(\tau _{{\textrm{reio}}}\) is the optical depth to reionization, and \(\beta \) is the fractal dimension. We have also put constraints on four derived parameters which are reionization redshift (\(z_{\textrm{reio}}\)), the matter density parameter (\({\Omega }_{{\textrm{M}},0}\)), the Hubble constant (\(H_0\)), and the root-mean-square mass fluctuations on scales of 8 \(h^{-1}\) Mpc (\(\sigma _8\)). Additionally, preliminary numerical explorations consider the prior range [0, 0.04] for the fractal dimension. It is worth mentioning that, since the fractal parameter \(\omega \) is irrelevant to cosmological observable (based on numerical results in Sect. 3), we fix \(\omega \) to be zero in MCMC analysis.

The dataset we use to constrain fractal model includes the Planck likelihood with Planck 2018 data (containing high-l TT,TE,EE, low-l EE, low-l TT, and lensing) [5], the Planck-SZ likelihood for the Sunyaev–Zeldovich effect measured by Planck [46, 47], the CFHTLenS likelihood with the weak lensing data [48, 49], the Pantheon likelihood with the supernovae data [50], the BAO likelihood with the baryon acoustic oscillations data [51, 52], and the BAORSD likelihood for BAO and redshift-space distortions (RSD) measurements [53, 54].

The best fit and \(1\sigma \) and \(2\sigma \) confidence intervals for cosmological parameters of fractal model and also \({\Lambda }\)CDM as the reference model, from “Planck + Planck-SZ + CFHTLenS + Pantheon + BAO + BAORSD” dataset are summarized in Table 1.

Table 1 Best fit values and 68% and 95% confidence limits for cosmological parameters from “Planck + Planck-SZ + CFHTLenS + Pantheon + BAO + BAORSD” data set for \({\Lambda }\)CDM and fractal model

Correspondingly, contour plots for some selected parameters of fractal model compared to \({\Lambda }\)CDM are displayed in Fig. 4.

Fig. 4
figure 4

The one-dimensional posterior distribution and two-dimensional posterior contours with 68% and 95% confidence limits for the selected cosmological parameters of fractal model (orange) compared to \({\Lambda }\)CDM (blue)

Considering the obtained constraints on fractal dimension, observational data detect no significant deviation from \({\Lambda }\)CDM model.

Moreover, the Akaike information criterion (AIC) defined as \(\textrm{AIC}=-2\ln {{\mathscr {L}}_{\textrm{max}}}+2K\) where \({\mathscr {L}}_{\textrm{max}}\) is the maximum likelihood function and K indicates the number of free parameters [55, 56], results in \(\hbox {AIC}_{({\Lambda } {\textrm{CDM}})}=3847.12\) and \(\hbox {AIC}_{({\textrm{fractal}})}=3849.70\), then consequently \({\Delta AIC}=2.58\). Thus, \({\Lambda }\)CDM provides a better fit to observations, while fractal model is still allowed.

5 Conclusions

We have considered a fractal model of the universe introduced by Calcagni [21, 22], which is a power counting renormalizable and also Lorentz invariant model. Taking into account a timelike fractal, we have investigated the influence of fractal model on observables, mainly power spectra and Hubble constant, by using a modified version of the publicly available CLASS code. Considering matter power spectra diagrams in Fig. 2, there is an enhancement in structure growth for non-zero values of fractal dimension \(\beta \), being incompatible with low redshift structure formation. Moreover, according to Fig. 3, the current value of Hubble parameter decreases in fractal cosmology, which is inconsistent with local determinations of \(H_0\). Consequently, primary numerical results indicate that fractal cosmology has no positive impact on relieving cosmological tensions.

Furthermore, we put constraints on the parameters of the fractal universe by utilizing current observations, chiefly Planck CMB, weak lensing, supernovae, BAO, and RSD data. Numerical results based on MCMC analysis, detect no significant departure from standard cosmological model. On the other hand, the model selection criterion AIC affirms that \({\Lambda }\)CDM model is more favored by observations, however, the fractal model can not be ruled out.