CosmicGrain

CosmicGrain is an open-source dust simulation code built on GADGET-4 for cosmological galaxy simulations. Individual grain populations are represented by explicit superparticles that carry their own dynamics, size, composition, and stellar origin while evolving through creation, transport, growth, collisions, and destruction.

CosmicGrain is distributed as a complete GADGET-4-based simulation code rather than a standalone plug-in. It can be used to run the included dust model, explore alternative dust prescriptions and parameters, or serve as a foundation for new dust-physics implementations.

Motivation

Why evolve the grains explicitly?

Grain creation, processing, and destruction occur in very different environments. By following those grains directly, CosmicGrain can ask not only how much dust a galaxy contains, but where that dust came from, how its size distribution changed, and where it ultimately survives.

The same evolving grain population can then be connected to galaxy-scale dust scaling relations, grain-size distributions, and extinction properties such as R(V).

Using CosmicGrain

Run, experiment, extend

Run

Use the complete CosmicGrain model for cosmological or galaxy simulations.

Experiment

Change grain sources, sizes, efficiencies, processing rates, destruction prescriptions, and other dust parameters.

Extend

Use the existing dust-particle infrastructure as a foundation for implementing and testing new dust physics.

On-the-fly evolution

The dust-grain lifecycle

A controlled physics ladder illustrates how the simulated dust distribution responds as the principal CosmicGrain processes are introduced.

CosmicGrain simulation grid showing dust surface density as dust creation, cooling, drag, astration, sputtering, grain growth, clumping, shock destruction, coagulation, shattering, and radiation pressure are added
Dust surface density across the CosmicGrain physics ladder; the final panel shows the corresponding gas surface density.

Creation

SNII, AGB stars, and luminous red novae inject new grain superparticles.

Dynamics

Gravity and aerodynamic drag transport dust independently of the gas, with optional radiation pressure.

Growth & processing

Gas-phase accretion, coagulation, and shattering reshape the grain population.

Destruction

Thermal sputtering, supernova shocks, and astration remove grains from the population.

Tracked quantities

More than dust mass

Dust is represented as a dynamical population rather than a passive scalar attached to gas.

DynamicsPosition, velocity, drag, and transport
Grain physicsRadius, growth, collisions, and destruction
CompositionCarbonaceous and silicate populations
ProvenanceStellar source and subsequent processing
EnvironmentLocal gas conditions through the ISM and halo
ObservablesScaling relations, size distributions, and extinction

Open source

Explore CosmicGrain