
Numerical simulation is a computational method used to model and analyze physical systems mathematically.Numerical simulation replaces the continuous differential equations describing physics with difference schemes, where the computational domain is divided into a discrete grid or particle cloud. At each time step, field values (density, velocity, temperature) are updated using approximate formulas that respect conservation laws. This approach allows studying nonlinear systems like turbulence or galaxy formation, for which analytical solutions are absent.
The origins go back to manual numerical orbit calculations performed by 19th-century astronomers. Decisive impetus came from research in turbulence and nuclear physics in the mid-20th century (work by von Neumann and Ulam on the Monte Carlo method). In astrophysics, pioneering were the works of Hénon and Aarseth on modeling star clusters in the 1960s. Henri Poincaré laid the foundations of dynamical systems theory, crucial for understanding chaos in numerical calculations. With the growth of supercomputers in the 1980s–2000s, full-scale cosmological simulations emerged (Millennium, EAGLE, Illustris).
It is based on discretizing partial differential equations. For example, in hydrodynamics, the conservation laws for mass, momentum, and energy are written as ∂U/∂t + ∇·F = S, where U is the vector of conservative variables, F are fluxes, and S are sources. The heart of the algorithm is the Courant–Friedrichs–Lewy (CFL) condition ensuring stability: Courant number C = c·Δt/Δx ≤ 1, where c is the wave speed, Δt and Δx are time and space steps. Modern codes use adaptive mesh refinement and parallelization over thousands of cores. For gravity problems, fast Fourier transforms or hierarchical tree methods are used.
Creation of virtual prototypes in aviation, climate prediction, discovery of gravitational waves by comparing real signals with simulated templates.
The IllustrisTNG project reproduced the evolution of a cube with a side of 300 million light-years, containing millions of galaxies, and scientists can "fly" inside any of them.






























