Skip to content

Simulate 2d Brownian Motion from hard-sphere collision

Notifications You must be signed in to change notification settings

Yangliu20/physics-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Simulation of 2-D Brownian Motion from Scattering

This project simulates 2-dimensional Brownian Motion based on HTML5 and JavaScript. Use hard sphere model. Assume the interaction between two particles to be perfect elastic collision.

In this project, you can

  • Visualize the motion of all particles in the system. For example, how they scatter with each other, whether the trajectory of pollen particle looks random...
  • Visualize the velocity distribution of all particles and check if it follows Maxwell distribution.
  • Visualize the distribution of colliding points on pollen particle.
  • Change boundary condition as you like (periodic or rigid). Periodic boundary can be used to simulate a system of infinite size.
  • Change parameters as you like, including number of particles, their radius and the initial velocity distribution (uniform or Gaussian).

Usage

To begin, first install Chart.js.

Open the project in your browser (recommend: Chrome). Click Start! then the program will begin with default parameters showing in the parameter table. To change parameters, modify the table and click Submit and Restart!. After the simulation starts, you can click on Show / Hide Trajectory and Periodic / Rigid Boundary to adjust settings. Plots of velocity distribution and colliding points would update automatically.

To-do list

About

Simulate 2d Brownian Motion from hard-sphere collision

Topics

Resources

Stars

Watchers

Forks

Languages