Cosmic SimLab / Science

Real physics.
Useful limits.

A plain-language look at the mathematics behind the planned simulations, what is simplified, and how to read what you see.

i

Made for visual exploration and fun. Cosmic SimLab draws on real physical ideas, but its simulations are educational visualizations. They are not research-grade calculations, fitted reconstructions, or predictions of real astronomical systems. This page covers Cosmic SimLab; physics details for Relativity SimLab will be added when confirmed. The current project model may change before release.

01GALAXY ENCOUNTERS

Gravity shapes the large-scale motion.

The galaxy models use Newtonian gravity. Each galaxy center moves under the gravity of the other, while modeled stars, dark matter, and gas move through a smooth gravitational field around the galaxies. The field uses a softened Hernquist potential, a compact mathematical approximation for a galaxy’s extended mass distribution.

The equations of motion are advanced in small time steps with a kick–drift–kick leapfrog method: first update velocity from gravity, then position, then velocity again from the new gravitational force. This gives a responsive way to evolve the encounter on a mobile device.

PotentialΦ(r) = −GM / (r + a)G is gravity, M is represented mass, and a sets the field’s scale.

What is simplified?

  • In the default interactive encounter, the particles do not all pull on one another. The smooth galaxy fields stand in for unresolved mass, keeping large particle counts practical.
  • Particles represent broad populations or tracers, not individually resolved stars. Their starting positions and velocities are sampled from idealized distributions.
  • Gravity is softened at short distances to avoid unrealistically strong forces where the model has no fine spatial resolution.
02GAS AND STAR FORMATION

Gas responds to gravity and pressure.

For galaxy gas, the project includes a smoothed-particle hydrodynamics (SPH) model. It estimates density from nearby gas particles, calculates pressure forces, and uses artificial viscosity to represent unresolved shock dissipation. A simplified cooling rule moves gas toward a chosen temperature floor over a parameterized timescale.

Some models include a sub-grid star-formation recipe: gas that passes density and temperature thresholds can contribute to an unresolved young stellar population. This is a teaching approximation for exploring cause and effect, not a prediction of when or where stars will form in nature.

Processes not modeled in full

The project does not include a calibrated model of the interstellar medium. The current approximation does not solve detailed chemistry, radiation transport, magnetic fields, or realistic metallicity-dependent cooling. A bright point in a new-star layer represents a population, not one observed star.

03PROTOPLANETARY DISKS

A thin, two-dimensional disk model.

The disk simulations evolve gas surface density and in-plane motion on a polar grid. A finite-volume method moves mass and momentum between neighboring cells; pressure is approximated with a locally isothermal relation, P = cs2Σ. The central star’s softened gravity and idealized planet or binary-star forcing can create wakes and density patterns.

Mass conservation∂Σ/∂t + ∇·(Σv) = 0Surface density changes as gas flows into or out of a region.

The model is two-dimensional and vertically integrated. It does not evolve a full three-dimensional disk or a changing gas temperature. The display colors map quantities such as density contrast, radial flow, or vorticity; they are not photographs, direct telescope images, or temperature maps.

Seeded examples

Some examples begin with a prepared density feature, such as a gap-edge pressure bump and swirl. The simulation evolves that starting state; it does not demonstrate that the feature formed spontaneously. The disk model also omits dust as a separately evolving fluid.

04READING THE VISUALS

A model to explore, not a forecast.

Preset encounters and disks are illustrative analogues chosen to make physical mechanisms visible. They are not fitted to reproduce a specific observed system, and the rendered structures should not be interpreted as measured predictions. The visuals are designed to make scientific ideas approachable and enjoyable while keeping their assumptions in view.

See the planned apps
Model summary based on the current Cosmic SimLab project notes and source code. The planned release may differ.