The existence of a hierarchy of cosmic structures, spanning a wide range of scales, has been unveiled by the astronomical observations of the last century. Galaxy clusters hold a special position within this hierarchy : they are the most massive objects that have formed according to the currently favoured hierarchical scenario of structure formation. In this scenario, small objects collapse first and later merge to form increasingly large ones. The new generation of cosmological surveys of galaxy clusters are now reaching the statistical precision needed to constrain the nature of the force driving the accelerated expansion of the Universe. However, they require an improvement of our understanding of cluster physics, especially of the physical processes of galaxy formation (which are now the limiting systematic uncertainty), and of non-linear structure formation, in order to make the constraints they place on cosmology more trustworthy. Any progress in that domain must stem from a confrontation between theoretical modelling, simulations and observations.
I will thus present cosmo-OWLS (Le Brun et al. 2014), the largest suite of ab initio cosmological hydrodynamical simulations ever carried out, and show that the models that invoke efficient AGN feedback reproduce a very wide range of properties of the local group/cluster population. I will then present an investigation of the scatter and evolution of the hot gas properties (as probed by X-ray and Sunyaev-Zel’dovich (SZ) observations) of galaxy groups and clusters as a function of the important non-gravitational physics of galaxy formation carried out using the same suite of simulations (Le Brun et al. 2017) as well as the results of a study of the robustness of the some of the SZ stacking results reported by the Planck collaboration at the end of 2012 which was conducted using Sunyaev-Zel’dovich maps generated using a newly-developed multi-purpose lightcone software (Le Brun et al. 2015). Taken at face value, the Planck results seem to favour a close to self-similar relation between the SZ flux and total mass all the way down to individual galaxies, which is in contradiction with X-ray and absorption lines observations. Finally, I will present the first results of a new simulation campaign aimed at producing large cosmological simulations (1 Gpc/h on a side) of medium mass and spatial resolution and very-high resolution zoom simulations which are progressively including the non-gravitational physics of galaxy formation such as star formation, supernova and AGN feedback. These simulations are produced using the AMR code RAMSES and are being tailor-made to compare the evolution of the dark matter profiles of the most massive galaxy clusters since redshift 1 in simulations and observations (Le Brun et al. 2018). Additionally, if time allows, I will discuss why galaxy groups are crucial for cosmology (Eckert et al. 2021).