HomeArticlesRarefied Gas Dynamics

DSMC and Rarefied Gas: Simulating a Gas That Won't Behave

Why the Knudsen number decides when Navier-Stokes fails, and how Direct Simulation Monte Carlo solves the Boltzmann equation statistically instead.

mysimulator teamUpdated June 2026≈ 8 min read▶ Open the simulation

When a gas stops behaving like a fluid

The Navier-Stokes equations that describe ordinary fluid flow rest on a hidden assumption: that a gas is dense enough for a molecule to collide with its neighbours far more often than the flow's own features change over the same distance. Push a gas rare enough - the upper atmosphere at spacecraft reentry altitudes, the near-vacuum inside a vacuum chamber, the gas around a MEMS device just microns across - and that assumption breaks down, and Navier-Stokes stops giving the right answer no matter how carefully you solve it.

live demo - particles streaming freely and colliding probabilistically● LIVE

The Knudsen number decides the regime

The dimensionless number that tells you which regime you are in is the Knudsen number, Kn = lambda / L, the ratio of a molecule's mean free path lambda (the average distance it travels between collisions) to some characteristic length L of the flow, such as an object's size or a channel's width.

Kn <  0.01   :  continuum flow      - Navier-Stokes is accurate (molecules collide constantly relative to L)
0.01 < Kn < 0.1  :  slip flow      - Navier-Stokes works if you add a velocity/temperature slip boundary condition
0.1  < Kn < 10  :  transition flow  - neither continuum PDEs nor free-molecular limits apply; need the full Boltzmann eq.
Kn >  10   :  free molecular flow  - molecules essentially never collide with each other, only with surfaces

In the transition regime, the exact governing equation is the Boltzmann equation, which tracks the full probability distribution of molecular positions and velocities rather than the coarse-grained averages (density, bulk velocity, temperature) that Navier-Stokes uses. The Boltzmann equation is notoriously difficult to solve directly for realistic three-dimensional geometries because of its high-dimensional collision integral, which is exactly the gap Direct Simulation Monte Carlo was built to fill.

How DSMC actually works

DSMC, developed by Graeme Bird starting in the 1960s, does not solve the Boltzmann equation as a differential equation at all - it simulates it statistically. Instead of tracking every one of the astronomically many real gas molecules, DSMC tracks a much smaller number of simulated particles, each representing a large number of real molecules, and advances them through repeated cycles of two decoupled steps:

for each time step:
    1. MOVE:    every simulated particle streams in a straight line for dt (collision-free motion, apply any boundary/surface interactions)
    2. COLLIDE: within each spatial cell, sample pairs of particles and let them collide probabilistically
               (acceptance probability proportional to relative speed x collision cross-section - the "No-Time-Counter" scheme is a common efficient choice)

Splitting motion and collisions into separate steps is only valid if the time step is kept smaller than the local mean collision time and the spatial cells are kept smaller than the local mean free path - otherwise particles that should have collided along the way get moved past each other undisturbed. Because collisions are handled statistically within a cell rather than by checking every possible pair of real molecules, DSMC scales far better than a literal N-body molecular dynamics simulation would, while still recovering correct macroscopic gas behaviour (density, velocity, temperature, even non-equilibrium effects like a bimodal or skewed velocity distribution) as an emergent statistical result rather than an assumed one.

What DSMC captures that Navier-Stokes cannot

Because DSMC works directly with the particle-level physics, it naturally captures non-equilibrium effects - situations where the gas's velocity distribution is not the smooth Maxwell-Boltzmann distribution Navier-Stokes assumes - such as the strong temperature and velocity jumps at a rarefied shock front, or the way gas molecules reflect off a solid surface with a different effective temperature (or even leave with a preferred direction) rather than perfectly thermalizing on contact. These effects are exactly what shows up in spacecraft reentry heating calculations, since the shock layer around a returning capsule at very high altitude sits deep in the rarefied/transition regime before the atmosphere gets dense enough for continuum equations to apply.

Where rarefied gas dynamics matters

Beyond reentry aerothermodynamics, DSMC and rarefied-gas analysis are essential wherever length scales get very small or pressures get very low: high-vacuum system design, ion and plasma thruster plume expansion into the near-vacuum of space, gas flow in microelectromechanical systems (MEMS) with channel widths of only a few microns, and the outer, collisionless fringes of planetary atmospheres and comet comas, where gas escapes to space in the free-molecular regime rather than flowing as a continuum fluid.

Frequently asked questions

Why can't you just use Navier-Stokes for rarefied gas flow?

Navier-Stokes is derived assuming molecules collide with each other far more often than the flow changes over the same distance, which lets you describe the gas with a handful of averaged quantities like density and bulk velocity. When the Knudsen number climbs above roughly 0.1, that separation of scales breaks down, the gas's velocity distribution can depart significantly from the Maxwell-Boltzmann shape Navier-Stokes assumes, and continuum equations start giving systematically wrong answers no matter the numerical accuracy.

Does each DSMC particle represent one real molecule?

No. A DSMC simulated particle typically represents a very large number of real gas molecules - often many billions or more, chosen so the total simulated particle count is computationally manageable. What matters is that the simulated particles reproduce the same statistical velocity distribution and collision rate as the real gas, not that particle counts match one-to-one.

What is the Knudsen number used for besides classifying flow regimes?

Beyond marking the boundary between continuum, slip, transition and free-molecular flow, the Knudsen number directly tells a simulation designer what numerical method is appropriate: low Kn favors a Navier-Stokes solver, high Kn favors DSMC or a direct kinetic solver, and the awkward transition regime in between is exactly where DSMC is most valuable because no simpler continuum method is reliably accurate there.

Try it live

Everything above runs in your browser — open Rarefied Gas and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Rarefied Gas simulation

What did you find?

Add reproduction steps (optional)