Simulation of a 2D gas of colliding circular balls

Version 1.0.0 (2.69 KB) by ofer v
Simple simulation of a 2D gas of elastically colliding circular balls of various masses and radii
115 Downloads
Updated 16 Jul 2019

View License

run_sim2d(N,mass,radius)

Simple simulation of a 2D gas of colliding circular balls.
N,mass & radius are vectors of the same length specifying the
number,masses & radii of the balls.

example : run_sim2d([400 100],[1 2],[0.005 0.01])
creates a simulation with 400 balls of mass 1 and radius 0.005, and 100
balls of mass 2 and radius 0.01

The box coordinates are defined such that min(width,height) is 1 unit.
The simulation is initialized with uniformly random positions and a
constant speed in the horizontal direction.

Cite As

ofer v (2024). Simulation of a 2D gas of colliding circular balls (https://www.mathworks.com/matlabcentral/fileexchange/72157-simulation-of-a-2d-gas-of-colliding-circular-balls), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2019a
Compatible with R2016b and later releases
Platform Compatibility
Windows macOS Linux
Categories
Find more on Oil, Gas & Petrochemical in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0