Direct Simulation Monte Carlo - MicroNanoFlows/OpenFOAM-2.4.0-MNF GitHub Wiki

Introduction

There are certain gaseous flows for which it is not suitable to use the Navier-Stokes-Fourier (NSF) equations in order to describe the gas' behaviour. The dimensionless Knudsen number, Kn = λ/L, is used to determine the degree of gas rarefaction, where λ is the mean free path (the average distance a molecule/atom travels between successive inter-molecular collisions) and L is a characteristic length scale.

When Kn is small (Kn < 0.01), the gas can be considered a continuum and the NSF equations can be applied. When the Knudsen number is very large (Kn > 10), inter-molecular collisions become unimportant and the gas can be adequately described by free-molecular theory. In between, the transition Knudsen number regime presents a challenge because the Boltzmann equation must be solved. A popular and successful method of simulating rarefied gas flows in the transition Knudsen number regime is direct simulation Monte Carlo (DSMC). DSMC is a stochastic particle-based method that emulates the physics of a real gas and returns a solution to the Boltzmann equation.

Algorithmic Overview

In a DSMC simulation, each simulator particle can represent any number of real atoms/molecules, which helps to reduce the computational expense. The simulation time step must be chosen to be smaller than the mean collision time of the gas, which allows for the decoupling of the particle movement and collision routines. A background mesh is required to restrict the inter-molecular collisions to nearest neighbours in a computationally efficient manner and the mesh size must remain smaller than the local mean free path to ensure this.

The basic algorithm that all DSMC solvers follow is:

The mesh is initially filled with particles according to a user-defined macroscopic state of density, velocity and temperature. The main time loop proceeds as:

  1. Particles are moved according to the time step and their velocity vectors. Any interactions with boundaries are computed during this section of the algorithm
  2. The particle indexing is updated, i.e. the list of particles in each cell is updated to be used to perform nearest neighbour collisions.
  3. Collisions are performed in a stochastic manner.

Steps 1 to 4 are repeated until a steady state solution is achieved and then macroscopic sampling over a large number of time steps takes place in order to reduce the statistical scatter to an acceptable level.