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!

/htdocs/ntnujava/ejsuser/2/users/ntnu/fkh/chargedParticlesAndWalls2_pkg/chargedParticlesAndWalls2.propertiesFull screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
Download EJS jar file(1417.4kB):double click downloaded file to run it. (12 times by 10 users) , Download EJS source (8 times by 4 users) View EJS source