The Universe at a large scale is ruled by Einstein's equations. There is the "gravity part" (possibly with the cosmological constant) and the "matter part" (namely, the energy-momentum tensor).
Now, the energy-momentum tensor should include all the contributions that you may want (the number of ingredients, namely fields, and the complexity of the energy-momentum defines how realistic your model may be).
You should account for baryons, radiation, leptons... all those ingredients are typically treated as "fluids". An important ingredient to be incorporated into the energy-momentum tensor is the "equation of state" of the matter (when a hydrodynamic approach is used to describe matter). Usually, simple choices are made: the energy-momentum tensor is that of a perfect fluid (an even simpler choice is the one of dust).
Of course, you can write down more realistic models by accounting for fluids with more chemical species or dissipative fluids! This should not be surprising: the matter fluid filling the Universe undergoes friction and the Universe's entropy increases.
Bulk viscosity: as the universe expands/contracts the particles/fields in it undergo "chemical" reactions (e.g., the baryogenesis, the Big Bang nucleosynthesis, etc...). This gives rise to bulk viscosity! This is true for both Newtonian as well as for relativistic fluids, see e.g. "Bulk viscosity in relativistic fluids: from thermodynamics to hydrodynamics".
References:
Hiscock, W. A., and Salmonson, J. (1991). Dissipative Boltzmann-Robertson-walker Cosmologies. Phys. Rev. D. 43, 3249–3258.
Maartens, R. (1995). Dissipative Cosmology. Class. Quan. Grav. 12, 1455–1465.
In a seminal paper by Weinberg, he discusses the bulk viscosity, shear viscosity, and heat transport due to radiation in a relativistic fluid. He also evaluates the cosmological entropy production associated with a nonvanishing mean free time of photons and other particles.
An introduction to the relativistic hydrodynamic theory needed to understand these works (relativistic bulk viscosity, heat, radiation hydrodynamics) can be found here: see Section 8.2 for the equations describing a relativistic fluid with bulk viscosity.