Simulator details, demo video and interesting results

Simulation Program Details

Project Motivation

  • Develope a comprehensive and an optimized 2-D gas simulation program involving fluid dynamics and chemical reactivity simulation capabilities
  • Provide a user-friendly testbed to easily experiment with different scenarios
  • Independently tackle a particle dynamics problem from first principles by using the knowledge of basic collision physics, vector algebra and MATLAB scripting
  • Validate various laws and theoretical results of physics such as ideal gas law and Boltzmann speed distribution using fundamental collision dynamics of gas particles

Key features of the simulation program

  • Accurate elastic collision physics simulation of inter-particle and particle-wall collisions
  • Capable of simulating the effects of gravity, heat transfer and inter/intra-species associative chemical reactions for an isolated gas system
  • Hash grid optimization implementation for reduced number of collision checks and low simulation times
  • Region probing capability together with a wide range of post-processed output for better analysis and validation of results
  • Intuitive and user-friendly graphical input for specifying the location of initial particle region and walls
  • Animation video and plot image saving features

Performance comparison of hash grid based and brute force collision checking algorithms

  1. These simulations are done considering a particle diameter of 2 Angstrom in a 120x120 Angstrom box with an initial speed of 0.5 Angstrom/fs. Total time taken is 1000 fs with a timestep of 1 fs.
  2. Consider an uncertainity of +/- 1 sec. in the simulation time observation values

Future planned updates

  • Add inter-particle interation via Lennard-Jones potential to simulate real gas
  • Extend the dimensions from 2-D to 3-D
  • Translate MATLAB code to GNU Octave equivalent code for open and easy access to all
  • Add progress bar and animation video re-play features in the GUI
Click here to see project notes

Simulator MATLAB app demonstration

Particle-in-box gas dynamics

Gas flow dynamics

Interesting Results

Free expansion of an ideal gas in a vacuum chamber



Free expansion of an ideal gas through a hole



Chemical reaction of nascent oxygen atoms at 298 K



Brownian motion of a particle suspended in gas


Bluff body flow of an ideal gas