I just modified the above simulation so that you can change mass for each particles. (But the size is not changed.) Click [b]change mass[/b] checkbox, than every mass being clicked will be change to the mass in the box. When the checkbox is not checked. The mass being clicked will be displayed in the text field.
You should be able to save the state into memory. If you download it and run it as a java application. You can save the state to a file.
The above simulation was built for arbituary walls.
The walls are consists with segment between adjacent points.
So that the slope of the segment can be used to calculate the collision between particles and walls.
The size of particles are either 4 or 5. It is useless to have circles which is too small to trap particles inside.
If you need a bunchs of circular walls. I believe you have another different situation. May be you want charticles to collide with small circular walls. That is a different simulation.
You can check out [url=http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=296.0]particle model for solid/liquid/gas states[/url] or [url=http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=120.0]Collision 2D [/url]
(However, the above simulations are not for charged particles).
You can download EJS source and modify the code to suit your need! Everything can be changed!