1 Introduction

Cosmological and astrophysical observations including the Type-Ia supernovae (SNIa), cosmic microwave background radiation (CMB), baryon acoustic oscillations (BAOs) and large-scale structure (LSS) suggest that our universe is now in an acceleration phase of expansion. One of the straightforward ways to explain this acceleration is to introduce the cosmological constant \(\Lambda \) back to play the role of the so-called dark energy and construct the \(\Lambda \) cold dark matter (\(\Lambda \)CDM) model. This model proves to be quite accurate and successful. However, from the theoretical point of view, the cosmological constant \(\Lambda \) lacks a physical origin and its observed value is too small to be explained by any fundamental theories. Moreover, this simple model also suffers from the cosmic coincident problem, i.e., the densities of matter and dark energy of the universe are of the same order. To alleviate these problems, various dark energy models have been proposed and studied (for comprehensive reviews, see, e.g., Refs. [1,2,3,4]). Another angle to address these problems is to consider modifications of gravity and see General Relativity (GR) as an approximation to the real theory of gravity yet to be discovered. One of the simplest schemes to modify Einstein’s gravity is the f(R) gravity, where the curvature scalar R in the gravitational Lagrangian is replaced by a function f of R (see, e.g., Refs. [5,6,7,8] for extensive reviews). On the other hand, based on an equivalent description of Einstein’s gravity, known as the Teleparallel Equivalent of General Relativity (TEGR) [9, 10] where the torsion scalar T takes the place of the curvature scalar R, the f(T) modification of gravity is proposed and widely studied (see, e.g., Refs. [11,12,13,14]).

In most studies of cosmology, may that be within the framework of GR or modified gravities, the universe media are usually simplified as perfect fluids. From the hydrodynamic point of view, a less ideal fluid may involve the dissipative effects that lead to a deviation from the thermal equilibrium. Such dissipative processes in the cosmic expansion include heat conduction, bulk viscosity, and shear viscosity, which have been carefully studied (see, e.g., Refs. [15,16,17]). Due to the homogeneous and isotropic assumption of the cosmic background, considering the bulk viscosity as the only relevant dissipative phenomenon in cosmology is appropriate. Pioneer studies to include bulk viscosities in cosmology follow conceptually different trains of thought, partly such as

  • Viscosity as a sole drive of acceleration: Either some part or the unity of the universe medium has viscosity which is the sole mechanism to drive the cosmic acceleration [18,19,20,21,22,23,24,25,26,27,28]. This idea utilizes the fact that the bulk viscosity of the fluid may act as an effective pressure, possibly negative, to recover the local thermodynamic equilibrium [29], and explores the possibility that this effective pressure may be the culprit of the accelerated expansion of the universe. Such a consideration can be seen as one of the approaches to a unifying model of (dark) matter and dark energy.

  • Dust matter and viscous dark sector: The known contents of the universe are still without viscosity, while the dark sector that has already the mechanism to drive the acceleration may be viscous [30,31,32,33,34,35,36,37]. Since the properties of dark energy or dark matter or the unification of both are still not very conclusive, this idea puts more physical and realistic considerations into the model of dark sector.

  • Viscous matter and effective dark energy: The material contents may have viscosities, while the accelerated expansion is of geometric or gravitational origin, e.g., cosmological constant or modified gravities [36, 38,39,40,41,42,43,44,45,46,47,48]. This idea sees the viscosities to be the physical properties that may be possessed by any material fluid in the real world and considers the viscosity as one of the realistic corrections of imperfectness to the perfect fluid model. The inclusion of viscosities in the fluid models is put to the test within the various frameworks of successful cosmological models.

In this work, we follow the last route and intend to include the viscosities in the cosmological context of the f(T) gravity. In Refs. [44,45,46], the authors have analyzed the cosmology in f(T) gravity where the universe is filled with a single viscous fluid by considering specific evolutionary functions given by \(H(t)\propto 1/t^\lambda \), where H is the Hubble parameter, t is the cosmic time and \(\lambda \) is a constant parameter. Moreover, f(T) gravity has also been used to reconstruct the generalized Chaplygin gas model with viscosity [49]. In the current work, to accommodate some of the existing late time viscous models, we propose a simple unifying bulk viscous model of the matters that can be applied to different epochs of the universe. Using this new model, we intend to study the evolutionary history of the universe with bulk viscous matter in f(T) gravity, where different cosmic contents, i.e., radiation and viscous baryonic and dark matters, are included. The motivation of this consideration is twofold. Firstly, we can model the whole evolutionary history of the universe including the radiation dominating era, matter dominating era and the acceleration era. As such, we can include the rather stringent datasets of CMB and BAO in addition to the late time SNIa datasets and various estimations of H dependence on the redshift z (denoted as Hz in the following) in the parameter fitting. Secondly, the physics before the last scattering can be different from the standard model not only for the modification of f(T) gravity but also for the bulk viscosity. This could be significant. For example, the recently revealed tension between the Hubble constant \(H_0\) measured locally and that fitted by the global observation [50] may, among various possibilities, be a result of modified prerecombination physics [51,52,53].

The paper is arranged as follows. Section 2 contains brief descriptions of the bulk viscous model of matter contents and the f(T) gravity. In Sect. 3, we use the observational datasets of CMB, BAO, SNIa, and Hz to fit and evaluate the model, presenting constraints and best-fit values of the cosmological and model parameters. Some cosmological implications including the dissipation of the matters, the evolutionary history of the universe, f(T) modification as an effective dark energy, and the Hubble tension problems are presented in Sect. 4. We conclude our study in the last section.

Throughout the paper, we use the natural unit with \(c=8\pi G=1\), where c is the speed of light and G is the gravitational constant.

2 Overview of the f(T) gravity and the viscous cosmology

2.1 Cosmological model with bulk viscous matter

We assume a Friedmann–Lemaître–Robertson–Walker (FLRW) metric for the spatial flat universe, which is given by

$$\begin{aligned} \textrm{d}s^2=\textrm{d}t^2-a(t)^2\delta _{ij}\textrm{d}x^i\textrm{d}x^j, \end{aligned}$$
(1)

where a(t) is the cosmic scale factor.

For the matter source we consider an imperfect fluid with viscosity, where the dissipative effects resulted from microscopic interactions are described by transport coefficients. Since the universe is treated to be isotropic and expanding, only bulk viscosity should be relevant and it can be expressed as a first order deviation from the thermodynamic equilibrium. The energy–momentum tensor for such a fluid is then given by [15,16,17, 29, 36],

$$\begin{aligned} \bar{{{\mathcal {T}}}}_\mu ^{\;\nu }=\left( \rho +{{\bar{p}}} \right) u_\mu u^\nu - {{\bar{p}}}\delta _\mu ^\nu , \end{aligned}$$
(2)

with

$$\begin{aligned} {{\bar{p}}}=p-\zeta \nabla _\mu u^\mu , \end{aligned}$$
(3)

where p and \(\rho \) are the pressure and energy density of the fluid, respectively, \(u^\mu \) is the 4-velocity, and \(\zeta \) is the bulk viscosity arising from deviation from the local thermodynamic equilibrium. The viscosity is then encoded in a viscous pressure term \(-\zeta \nabla _\mu u^\mu \) in addition to the usual material pressure. In the cosmological scenario, this term can be written as \(-3\zeta H\), where \(H=\dot{a}/a\) is the Hubble parameter.

The continuous equation \(\nabla _\nu \bar{{{\mathcal {T}}}}_\mu ^{\;\nu }=0\) is equivalent to

$$\begin{aligned} \nabla _\nu {{\mathcal {T}}}_\mu ^{\;\nu }=\nabla _\nu \left[ \left( \delta _\mu ^\nu -u_\mu u^\nu \right) \left( {{\bar{p}}}-p \right) \right] , \end{aligned}$$
(4)

where \({{\mathcal {T}}}_\mu ^{\;\nu }\) is the energy–momentum tensor of a usual perfect fluid. For cosmological metric and the assumption \(p=0\),

$$\begin{aligned} \nabla _\nu {{\mathcal {T}}}_0^{\;\nu }=-3H{{\bar{p}}}, \end{aligned}$$
(5)

where the right-hand side can be either seen as a sink of energy if \({{\bar{p}}}\) is positive, or a source if \({{\bar{p}}}\) is negative. It reflects that there is energy transference between the kinetic energy of cosmological expansion and the material fluid due to the bulk viscosity.

The transport coefficient \(\zeta \) should depend on the dynamics of the material fluid. A general model for viscous effects that emerge at late time is proposed and can be written as [25, 36, 40, 43, 54, 55]

$$\begin{aligned} \zeta =\zeta _0+\zeta _1 H, \end{aligned}$$
(6)

where both \(\zeta _0\) and \(\zeta _1\) are constants. This can be viewed as an agreement with a generalized equation of state (EOS) of a dark fluid [56, 57] since the pressure now can be written as

$$\begin{aligned} {{\bar{p}}} = p(\rho )+w_0 H+w_1 H^2, \end{aligned}$$
(7)

where \(w_0=-3\zeta _0\) and \(w_1=-3\zeta _1\) are new constant coefficients of EOS. Another widely considered model of material bulk viscosity is of the form [36, 55, 58,59,60,61]

$$\begin{aligned} \zeta \sim \rho ^s. \end{aligned}$$
(8)

For late time universe when matter is dominating and \(H^2\sim \rho _m\), these two forms (6) and (8) can reach some common ground for \(s=1/2\).

However, for early times of the universe, both forms will lead to an unbounded viscosity or a growing Hubble parameter, which seems to be contrary to our conventional understanding of the evolutionary history of the universe. Therefore, to cover the early times, we consider the merits of both forms of the viscosity and propose a simple new form

$$\begin{aligned} \zeta =\zeta _0\sqrt{\Omega }+\zeta _1\Omega H, \end{aligned}$$
(9)

where \(\Omega =\rho /(3H^2)\) is the density parameter of the corresponding content with bulk viscosity. While Eq. (9) preserves the property (8), it will reduce to the form (6) at the era when the universe is dominated by the corresponding viscous content with \(\Omega \sim 1\), and will be suppressed when the viscous content is not dominating.

In the current work, for simplicity, we only consider the imperfectness and bulk viscosity of the material contents including both the baryonic and dark matters, leaving the relativistic contents to be described by the EOS \(w=p/\rho =\frac{1}{3}\). In addition, we assume that the viscosities of the baryonic and dark matters have the same coefficients. That is,

$$\begin{aligned} \overline{p_b}= & {} p_b-3H(\zeta _0\sqrt{\Omega _b}+\zeta _1\Omega _b H),\nonumber \\ \overline{p_m}= & {} p_m-3H(\zeta _0\sqrt{\Omega _m}+\zeta _1\Omega _m H), \end{aligned}$$
(10)

where the subscripts b and m indicate the baryonic and dark matters, respectively. One can easily check that

$$\begin{aligned} \overline{p_i}=p_i-\zeta _0\sqrt{3\rho _i}-\zeta _1\rho _i, \end{aligned}$$
(11)

where \(i=b,m\). So, the \(\zeta _1\) term is in effect a correction to the pressureless EOS \(w_i=0\), and one can assume the material pressure \(p_i=0\) without loss of generality.

It is noted here that the viscous effects of the baryonic and dark matters must be considered separately even it is simply assumed that they have the same viscous coefficients. Otherwise the viscosity will become another interaction between the baryonic and dark matters other than gravitation. At late time, this does not seem very important in that the same viscous coefficients and EOSs make sure both the baryonic and dark matters evolve synchronously. However, before the last scattering, the propagation of the sound wave of the photon-baryon fluid depends closely on the EOS of the baryon matter, but is not so sensitive to that of the dark matter. Specifically, around some primordial and initial clumps of matter, the pressure of the photon-baryon fluid resists the gravitational clustering. The resulting sound waves propagate at the sound speed \(c_s\) given by

$$\begin{aligned} c_s^2=\frac{\partial p}{\partial \rho }=\frac{\overline{p_b}'+p_\gamma '}{\rho _b'+\rho _\gamma '}, \end{aligned}$$
(12)

where the subscript \(\gamma \) indicates the photon and the prime denotes derivative with respect to some common variable, e.g., the scale factor a. The propagations continued until the universe became transparent for photons, leaving dramatic oscillations CMB anisotropic data we see today, as well as imprints in the galaxy distributions. This is the key to our model in the era before the last scattering and include the CMB and BAO datasets in the following section to perform the observational fit.

2.2 Viscous cosmology in f(T) gravity

Although the bulk viscosity may provide a possibly negative pressure, as seen in Eq. (10), it can hardly be the main cause of the late time acceleration of the universe. As we will see in the next section, the densities and viscosities of the matters are quite stringently constrained by the observation. The effective pressures from viscosities do not seem to be of the same order of the energy densities and hence cannot account for the missing dark energy that are around 70% of the cosmic contents. Therefore, the drive of the acceleration is still needed elsewhere. In this work, we consider the cosmic evolution under the framework of f(T) gravity, attributing the late time acceleration to the modification of gravitational theory in the teleparallel description.

On the parallelizable spacetime manifold \({\mathcal {M}}\) with a metric g, one can generally find a set of tetrad \(\{e_A^{\;\mu }\}\) and its dual \(\{e^A_{\;\mu }\}\), such that

$$\begin{aligned} e^A_{\;\mu }e_B^{\;\mu }=\delta _B^A,\quad e_A^{\;\mu }e^A_{\;\nu }=\delta _\nu ^\mu . \end{aligned}$$
(13)

They are related to the metric tensor via

$$\begin{aligned} g_{\mu \nu }=\eta _{AB}e^A_{\;\mu }e^B_{\;\nu },\quad \eta _{AB}=g_{\mu \nu }e_A^{\;\mu }e_B^{\;\nu }. \end{aligned}$$
(14)

Then, the torsion scalar T is defined as

$$\begin{aligned} T\equiv T^\alpha _{\;\mu \nu }S_\alpha ^{\;\mu \nu }, \end{aligned}$$
(15)

where the torsion tenser is

$$\begin{aligned} T^{\alpha }_{\;\mu \nu }=e_{A}^{\;\alpha }\left( \partial _{\mu } e^{A}_{\;\nu } - \partial _{\nu }e^{A}_{\;\mu } \right) \end{aligned}$$
(16)

and the superpotential is

$$\begin{aligned} S_\alpha ^{\,\beta \gamma }=\frac{1}{4} \left( T_\alpha ^{\,\beta \gamma }+T^{\gamma \beta }_{\,\;\,\;\alpha }-T^{\beta \gamma }_{\,\;\,\;\alpha } \right) +\frac{1}{2} \left( \delta ^\beta _\alpha T^{\lambda \gamma }_{\,\;\,\;\lambda }-\delta ^\gamma _\alpha T^{\lambda \beta }_{\,\;\,\;\lambda } \right) .\nonumber \\ \end{aligned}$$
(17)

TEGR uses this scalar T as its gravitational Lagrangian, and the f(T) gravity considers an arbitrary function of T instead, i.e.,

$$\begin{aligned} {\mathcal {S}}=-\frac{1}{2}\int |e|f(T)\textrm{d}^4 x+\int |e|{\mathcal {L}}_M\textrm{d}^4x, \end{aligned}$$
(18)

where \(|e|=\det (e^A_{\alpha })=\sqrt{-g}\) is the determinant of the tetrad \(e^A_{\alpha }\), and \({{\mathcal {L}}}_M\) is the Lagrangian of matter.

Varying the above action (18) with respect to the tetrad \(e^A_{\alpha }\), one can obtain the field equation

$$\begin{aligned} \frac{2}{|e|}\partial _\beta \left( |e|S_\sigma ^{\,\alpha \beta }e_A^{\,\sigma }f_T \right) +\frac{f}{2} e_A^{\,\alpha }={{\mathcal {T}}}_\beta ^\alpha e_A^{\,\beta }, \end{aligned}$$
(19)

where \(f_T\) denotes \(\textrm{d}f/\textrm{d}T\), and the energy–momentum tensor \({{\mathcal {T}}}_\beta ^\alpha \) of matter is given by

$$\begin{aligned} \frac{\delta (|e|{\mathcal {L}}_M)}{\delta e^A_{\,\alpha }}=|e|{\mathcal {T}}_\beta ^\alpha e_A^{\,\beta }. \end{aligned}$$
(20)

For the cosmological metric given in Eq. (1), one can easily find that \(T=-6H^2\). Then, since the Hubble parameter H is generally a decreasing function of cosmic time, one would expect that a f(T) model with a modification term more significant at smaller |T| is appropriate in that it could give explanation to the late time (smaller H and |T|) acceleration and would not mess up the early time evolution. We therefore choose a concrete f(T) model in the form

$$\begin{aligned} f(T)=T+\frac{\alpha }{T}, \end{aligned}$$
(21)

where \(\alpha \) is the model parameter. Studies show that the modifications with inverse powers of T may indeed provide the drive of the accelerated expansion [62,63,64].

Taking the model (21) and the energy–momentum (2) into the field equation (19), one can obtain the modified Friedmann equations

$$\begin{aligned} 3H^{2}-\frac{\alpha }{4H^{2}}= & {} \rho _r+\rho _b+\rho _m,\nonumber \\ 2{\dot{H}}\left( 1+\frac{\alpha }{12H^{4}} \right)= & {} -p_r-\overline{p_b}-\overline{p_m}-\rho _r-\rho _b-\rho _m, \end{aligned}$$
(22)

where the subscript r denotes the radiation including both the photons and relativistic neutrinos.

3 Observational fit

In this section, we perform an observational fit to the cosmological model we introduce in the previous section. In most studies of viscous cosmology, the authors usually focus on a certain epoch of the evolutionary history of the universe. Since the newly proposed model of viscosity in the current work depends on \(\Omega \) instead of H or \(\rho \), we can consider the cosmic evolution as a whole and, more importantly, utilize the observational datasets of both early and late time eras in a joint fitting procedure.

For the late time SNIa data, we consider the latest Pantheon compilation [65] consisting of a total of 1048 SNIa with the cosmic redshift z ranging from 0.01 to 2.3. We also utilize 57 data points of Hz [66]. These two sets of data represent the observations of the acceleration phase of the universe and provide the late time constraints of the model.

Table 1 Best-fitted parameters for \(\Lambda \)CDM, v\(\Lambda \)CDM, and our viscous model in f(T) gravity

For earlier era, we consider the CMB and BAO datasets. The CMB temperature power spectrum is sensitive to the matter densities, and it also measures precisely the sound horizon, which is given by

$$\begin{aligned} r_s^*=\int _{z^*}^\infty \frac{c_s}{H(z)}\textrm{d}z, \end{aligned}$$
(23)

where \(z^*\sim 1000\) is the cosmic redshift of the last-scattering surface and \(c_s\) is the sound speed of the photon-baryon fluid before the last scattering. In viscous cosmology, such consideration is only possible when the viscosities of baryonic and dark matters are separated in that \(c_s\) is closely related to the EOS of baryonic matter but not sensitive to that of dark matter. By using the viscosity model (10) proposed in the previous section, we can substitute \(c_s\) with Eq. (12). We will be using the CMB data inferred from Refs. [67, 68]. Moreover, the BAO measurement provides a standard ruler to probe the angular diameter distance versus the redshift by performing a spherical average of their scale measurement. We will use the BAO data given in Refs. [69,70,71].

We perform a cosmological fit for the viscous model in f(T) gravity based on a Markov chain Monte Carlo method using the datasets mentioned above. As references, we also perform the same fitting procedure for the concord cosmological model \(\Lambda \)CDM, and a viscous model that is described by Eq. (10) but still leaves the dark energy to the mysterious cosmological constant (denoted as v\(\Lambda \)CDM, for detailed analysis of similar models, see Refs. [36, 41, 42]). The fitting results and best-fitted parameters are listed in Table 1, where \(\Omega _{b0}\) and \(\Omega _{m0}\) are the values of \(\Omega _b\) and \(\Omega _m\) at present time, respectively, and \(h=H_0/(100\,{\textrm{km}}/{\textrm{s}}/{\textrm{Mpc}})\). In the fitting procedure, we consider the radiation density parameter at present \(\Omega _{r0}=\Omega _{\gamma 0}(1+0.2271N_\text {eff})\), where the photon density parameter at present is fixed \(\Omega _{\gamma 0}=2.469\times 10^{-5}h^{-2}\) in this work and \(N_\text {eff}\) is the effective number of neutrino species with \(N_\text {eff}=3.046\) for the current standard value. Figure 1 illustrates the \(1\sigma (68.3\%)\) and \(2\sigma (95.4\%)\) confidence levels of the parameters of our model.

Fig. 1
figure 1

Constraints on the parameters from \(1\sigma \) to \(2\sigma \) confidence level obtained by the fitting procedure

4 Cosmological discussions

4.1 Matter density parameters

As shown in Table 1, the two viscous coefficients in our model, \(\zeta _0\) and \(\zeta _1\), have different signs, which, according to Eq. (10), means the effective pressures \({{\bar{p}}}\) may have different signs depending on the densities. And Eq. (5) shows that the signs of \({{\bar{p}}}\) indicate the direction of energy transference. So, the matters may acquire or lose energy due to the universe expansion through viscosity at different cosmic time. Moreover, the viscous model (10) suggests that the baryonic and dark matters will acquire or lose energy at different rates once they have different densities. Figures 2 and 3 illustrate the evolutions of the effective pressures and density parameters of the baryonic and dark matters, where in the latter the standard \(\Lambda \)CDM case has also been plotted for reference.

At early time (large redshift z), the effective pressures are negative and the matters acquire energy from the expansion, while at later time (smaller redshift z), the pressures are positive and the matters lose energy to the cosmic expansion. The changes of signs of the effective pressures happen at \(z=5.54462,\,8.87689\), and 4.77607 for total matter, baryonic matter, and dark matter, respectively. In the future (\(-1<z<0\)), the effective pressures will return to zero because the matters dissipate and the densities vanish successively, which will happen at \(z=-0.803174\), and \(-0.884895\) for the baryonic and dark matters, respectively.

As mentioned before, the different paces of evolutions of the baryonic and dark matters will lead to an evolving ratio K between the baryonic and dark matters, which is plotted in Fig. 4.

In the future, when \(\Omega _b\) reaches zero at \(z=-0.803174\), K vanishes. In the remote past, \(K=\Omega _b/\Omega _m=0.2009\), which is in fact inferred from the power spectrum of CMB. On the other hand, while K is difficult to observe, the baryon-to-photon ratio \(\eta \) plays a significant role in the light element abundances. And since the photon number in the universe can be directly observed, the visible difference in the evolutions of \(\Omega _b\) between our model and the standard \(\Lambda \)CDM model may then be subjected to the test of observations. There are several epochs of the cosmic evolutionary history where \(\eta \) can be determined independently. For the Big Bang nucleosynthesis epoch (\(z\sim 10^9\)), \(\eta \) can be derived from the abundances of primordial elements (see, e.g., [72]). For the recombination epoch (\(z\sim 1100\)), inference of \(\eta \) from CMB in fact has already been taken into account in this work when we include the CMB and BAO datasets. At later time (\(2\lesssim z\lesssim 6\)), the abundances of light elements, and hence \(\eta \), can be determined from the so-called Lyman \(\alpha \) forest (see, e.g., Refs. [73,74,75]), where for the standard model, the cosmic gas doing the absorption is considered nearly primordial in that it has not been processed during many generations of stars. In our model, the energy transference between the baryonic matter and the cosmic expansion leads to the deviation of \(\Omega _b\) from the standard model, which may result in possibly observable difference of such absorption.

Most of these results rely on the modeling of the evolutionary history as a whole so that one can see the effects of the unified form of viscosities in different eras. Moreover, the different evolutionary paces of the baryonic and dark matters essentially come from the separation of viscosities of the two matters in our model, which makes it possible to discern or even observe the effects of viscosities. However, the time-dependent ratio between the baryonic and dark matters is not a special result of simply setting the same form of bulk viscosities for them. In fact, as long as the baryonic and dark matters do not interact through viscosity (so that dark matter is still dark and prerecombination BAO can happen), they most likely feel the viscosity differently, and acquire/lose energy at different paces. The model with synchronized evolution and constant ratio is actually the special one and possibly needs some fine tuning.

4.2 Evolutionary history

Due to the rather stringent constraints from the CMB dataset [67, 68], the best-fitted parameters for \(\Lambda \)CDM is quite close to the Planck CMB results [68] even though we have included late time datasets of SNIa and Hz. To check the evolutionary history of the universe, one can, as usually done in the cosmological study of modified gravities, consider the extra geometric term from the f(T) modification as an effective fluid. Then, this f(T) fluid has its own density, namely,

$$\begin{aligned} \rho _{f(T)}\equiv \frac{\alpha }{4H^2}. \end{aligned}$$
(24)

Using the best-fitted parameters in Table 1, we illustrate the evolutions of the density parameters \(\Omega = \rho /3H^2\) in Fig. 5. The radiation dominating era, matter dominating era, and late time accelerating era are obviously recovered. Note that in the future, the density parameters of the baryonic and dark matters will vanish in finite time due to the existence of viscosities, as discussed in the previous subsection.

Fig. 2
figure 2

Evolutions of the effective pressures of the total matter, baryonic matter and dark matter, plotted in unit of \(H_0^2\)

Fig. 3
figure 3

Evolutions of density parameters \(\Omega _b\) and \(\Omega _m\)

Fig. 4
figure 4

Evolution of the ratio between the baryonic and dark matter density parameters

Fig. 5
figure 5

The evolutions of the density parameters. \(\Omega _{f(T)}\) denotes the effective density parameter of the f(T) modification

The EOS of the effective f(T) fluid is given by

$$\begin{aligned} w_{f(T)}=-1-\frac{1}{3} \frac{\textrm{d}\ln \rho _{f(T)}}{\textrm{d}\ln a}, \end{aligned}$$
(25)

the evolution of which is illustrated in Fig. 6. At present time with \(z=0\) and \(\ln a=0\), \(w_{f(T)}^{(0)}=-1.081\), whereas the EOS of matter \(w_M^{(0)}=0.140\). Or, equivalently, the density parameter of the f(T) fluid \(\Omega _{f(T)}=0.732\), while the contribution from the effective pressures of the viscosities \({{\bar{p}}}_M/3H_0^2=0.012\). This suggests that the main contribution to the accelerating expansion at present time comes from the f(T) modification. In fact, the viscosity model (10) we have introduced in this work allows for consideration of the physics of the prerecombination era, for which the observational datasets give rather stringent constraints and suppress the possible magnitude of the viscosities.

At future infinity with \(z\rightarrow -1\) and \(\ln a\rightarrow +\infty \), \(w_{f(T)}\) approach to \(-1\), indicating a de Sitter fate of the universe. Before that, the matter densities will reach zero in the finite future.

Fig. 6
figure 6

The evolution of the EOS of the geometric term from f(T) modification. The best-fitted parameters given in Table 1 have be used

Therefore, we can conclude that the inclusion of bulk viscosities of the matters and considering the f(T) modification of gravity as the main drive of the present acceleration will not violate the known history of the universe. The density parameters of the baryonic and dark matters will vanish in the finite future due to the viscosities. The universe will continue to evolve without them, and will finally enter a de Sitter expansion phase under the effect of f(T) modification.

4.3 f(T) modification as an effective dark energy

Although the f(T) model that drives the accelerated expansion is not considered as a dynamical field in this work, it effectively plays the role of dark energy and does evolve over the cosmic time. To discriminate different time-varying models of dark energy or effective dark energy, the statefinder parameters (rs) have been introduced [76]. This pair (rs) is defined as

$$\begin{aligned} r=\frac{\dddot{a}}{aH^{3}},\quad s=\frac{r-1}{3\left( q-\frac{1}{2}\right) }, \end{aligned}$$
(26)

with \(q=-{a\ddot{a} }/{{\dot{a}}^{2} }\) being the deceleration parameter. Since H and q are composed from the scale factor a and its first and second order of derivatives, the geometric parameter r is then naturally related to the next order of derivative. And s is a combination of r and q. Based on the values of the pair (rs), the (effective) dark energy models can be put into three categories:

  • \(r>1,\,s<0\), Chaplygin gas model;

  • \(r<1,\,s>0\), quintessence models;

  • \(r=1,\,s=0\), the standard \(\Lambda \)CDM model.

Using the best-fitted parameters in Table 1, we plot the r-s diagram of our model in Fig. 7, where we also plot the specific quintessence and Chaplygin gas models described in Ref. [76] for comparison. One can see that our model mimics a kind of Chaplygin gas model, and eventually it will arrive at the \(\Lambda \)CDM point (1, 0). Therefore, the late time behavior described in the previous subsection, i.e., that the universe is currently experiencing a phantom-like dark energy but eventually will enter a de Sitter phase, is originated from the feature of the f(T) model.

Fig. 7
figure 7

The statefinder pair (rs) for our model, as well as a specific quintessence model and a Chaplygin gas model described in [76]. The solid rounded points on the lines indicate the present states. The solid rounded point at (0, 1) denotes the \(\Lambda \)CDM model

Another useful tool to tell apart time-dependent dark energy models is the Om diagnostic [77]. Om is defined as

$$\begin{aligned} Om\left( z \right) =\frac{H^{2}\left( z \right) /H_0^2 -1}{\left( 1+z \right) ^{3}-1 }, \end{aligned}$$
(27)

which provides a null test of the (effective) dark energy being a cosmological constant \(\Lambda \). The sloping of the trajectory on the Om-z diagram is used to categorize the different types of (effective) dark energy:

  • a negative slope indicates a quintessence type of dark energy;

  • a positive slope indicates a phantom-like dark energy;

  • \(\Lambda \)CDM model gives a horizontal line.

In Fig. 8 we plot the Om-z diagram of our model, as well as those of a specific quintessence model and a Chaplygin gas model described in Ref. [76] for comparison. Obviously, the viscous f(T) model under consideration provides a phantom-like effective dark energy like the Chaplygin gas model, which is in accordance with the effective EOS \(w_{f(T)}\) shown in Fig. 6.

Fig. 8
figure 8

Om-z diagram for our model, as well as a specific quintessence model and a Chaplygin gas model described in [76] for contrast

4.4 Hubble tension

Recently, more precise observations seem to reveal that there are discrepancies among the values of the cosmological parameters fitted by the different datasets (see, e.g., Ref. [50] for a historical review). One of the most shocking tensions is between the inferences of \(H_0\) from the Planck CMB data, reporting \(H_0=67.4\pm 0.5\,\text {km}/(\text {s}\,\text {Mpc})\) [68], and that from local distance ladder measurements by Hubble Space Telescope (HST) which reports \(H_0=74.03\pm 1.42\,\text {km}/(\text {s}\,\text {Mpc})\) [78]. The two different inferred values of \(H_0\) are at a \(4.4\sigma \) difference. From Table 1, another immediate observation is that in our model \(H_0\) is raised to a value close to the astrophysical measurements by HST. Comparing with the v\(\Lambda \)CDM column, one can see that adding bulk viscosity corrections to the material contents in the \(\Lambda \)CDM does not help with this tension very much. A semi-quantitative explanation is that an extra geometric term in the form \(1/T\sim 1/H^2\) makes the sloping of H over the cosmic time more gently than a dark content with a constant energy density. This changes both the sound horizon \(r_s^*\) given in (2326) and the angular diameter distance to the last-scattering surface

$$\begin{aligned} d_A^*=\int _0^{z^*}\frac{\textrm{d}z}{H(z)}, \end{aligned}$$
(28)

since both of which are integrands of 1/H over the cosmic time (represented by the redshift z). While the peak spacing of the CMB spectrum determines quite precisely the ratio \(\theta ^*=r_s^*/d_A^*\), a more gently sloping H may then lead to a larger \(H_0\). In this sense, the alleviation of the Hubble tension in our model in fact comes from the 1/T term of modification. In the current work, the new model of viscosity allows one to describe the early and late time evolution as a whole, which makes it possible to compare the local and global measurements of \(H_0\) and hence to discuss Hubble tension problem. However, the viscosity terms that are not negligible in this model also change the physics before the last scattering a little bit, giving a slightly smaller sound speed of the photon-baryon fluid and hence a smaller sound horizon \(r_s^*\), which in turn slightly lower the \(H_0\) value. Nonetheless, the fitting result shows that the inclusion of viscosities does not diminish the model’s successful alleviation of the Hubble tension.

5 Concluding remarks

In this work, we have studied the bulk viscous cosmology under the framework of f(T) gravity. In order to consider the whole evolutionary history including both the early time prerecombination physics and late time acceleration, we have proposed a new simple viscous model for the baryonic and dark matters that absorbs the merits of the viscous models in the literature. Due to the stringent constraints from the observations, viscosities are not likely significant enough to account for the accelerating expansion of the universe, we therefore treat the viscosities as the corrections of imperfectness to the fluid models of the baryonic and dark matters, and leave the major drive of the acceleration to the f(T) modification.

Using the CMB, BAO, Hz, and the Pantheon compilation of SNIa data, we have performed an observational fit for the cosmological and model parameters. The fitting result shows that the two viscous coefficients in our model have different signs, which means both the baryonic and dark matters will lose or acquire energy due to the viscosities at different times. Since the viscosity model considered in this work is related to the material density, the baryonic and dark matters will have different rates of energy transference, and the ratio between the densities of them will not be a constant. Both the baryonic and dark matters acquire energy to the cosmic expansion at early time, while they lose energy at late time. The changes of directions of energy transference happen at redshifts \(z=8.87689\), and 4.77607 for the baryonic and dark matters, respectively. In the future, they will vanish in finite time due to dissipation, which will happen at \(z=-0.803174\) and \(-0.884895\) for the baryonic and dark matters, respectively.

With the fitting result, it is shown that our model can recover the known history of the universe including the radiation dominating era, matter dominating era, and the acceleration era. The main contribution to the accelerating expansion comes from the f(T) fluid of the modification. The diagnostic analyses show that our model mimics a phantom-like dark energy. Nonetheless, at the future infinity, the universe will eventually enter a de Sitter expansion phase.

The Hubble constant \(H_0\) is fitted to be 73.15 (km/s/Mpc), significantly alleviating the Hubble tension. This is mainly because the f(T) modification makes the sloping of H over the cosmic time more gently, which raises the value of \(H_0\) while fitting the CMB peak spacings. The viscosity in fact acts in an opposite direction in this problem, namely, it makes the sound horizon \(r_s^*\) slightly smaller and hence, lowers \(H_0\) a little bit.

Conceptually, viscosity arises from the interaction between material particles. However, a viscosity model that contains only the geometric part, e.g., Eq. (6), will lead to a corresponding term in the field equation that is purely geometrical, which can in effect be interpreted as some modification to the spacetime geometry. That is, starting from some modified gravity model without viscosity, one may arrive in the same field equation. Or, one can understand this the other way around. The viscosity may be yet another physical interpretation of modified gravity. Similarly, a viscous model involves both the energy of the matter and the spacetime geometry can also be interpreted as some modified gravity that considers nonminimal interactions between matter and gravity. For example, a nonminimal coupling f(T) model without viscosity (see, e.g., Refs. [63, 64]) may have the same behavior as the viscous model considered in this work. This is also referred to as the degeneracy of the viscous cosmologies [41].

Nonetheless, viscosity is one of the realistic ways to consider material interactions of the cosmic contents. The viscous model we employ in this work, although based on the models in the literature, is chosen for simplicity. And we have also assumed that it has the same form and has the same coefficients for both the baryonic and dark matters. A more sophistic model may start from the thermodynamic theory that takes the dark matter model into account, and should leave the viscous coefficients all to the observational fit. Moreover, beyond this study of background evolution of the cosmological model with viscosities in f(T) gravity, the growth of perturbation should also be interesting once viscosity is not negligible [27]. Future works can be done considering these issues.