The term cosmological simulation is used for simulations of a significant portion of the universe over a significant portion of the universe's life, a type of computational astrophysics. Such simulations incorporate models of physics and cosmology, using numerical analysis to trace changes happening over gigayears. Typical is to begin at some point in the early universe, matching what is known or believed to have been the case on a statistical level, i.e., simulating a portion of "a universe" like ours that follows the same physical laws. It would commence with its mass statistically distributed as expected from quantum fluctuations and inflation (matching the initial fluctuation spectrum derived from the CMB), subsequently playing out the resulting ever-changing configuration of the universe presuming the known laws of physics, Hubble expansion, dark matter, and dark energy, aiming to reproduce a large scale structure analogous to those observed, basically playing out the Lambda-CDM model or something similar that looks promising. The simulation necessarily lacks detail, but may spell out more detailed (smaller scale) processes such as galaxy formation in select subregions (cosmological zoom simulation), but even so, star formation is likely handled in an "averaged" manner, i.e., not individual stars: even modeling that recognizes individual galaxies or galaxy clusters would require the model to focus on a small percentage of the universe.
Some of the highest-capacity research computing facilities are used to run such models: given any particular means to represent the materials and processes of the universe can be more precise given more computing power. The models contribute to the confirmation of cosmological theories and are used to test variations and new theories. Output of such models are often used to produce illustrations showing a credible snapshot of the current distribution of matter over a substantial portion of the universe, and animations showing its development. Some facts observed within cosmological simulations are generally accepted, used for other modeling, and inspiring surveys to attempt to confirm them. Some cosmological simulation projects:
Some codes used: