Balls in a Box JS Model Documents

This material has 3 associated documents. Select a document title to view a document's information.

Main Document

Balls in a Box JS Model 

written by Wolfgang Christian

The Balls in a Box model shows that a system of particles is very sensitive to its initial conditions. In general, an isolated system of many particles that is prepared in a nonrandom configuration will change in time so as to approach its most random configuration where it is in equilibrium. This model explores what happens if the initial conditions are chosen in a very special way.

The default initial condition corresponds to eight stationary particles perfectly aligned on the x-axis. Two particles approach from the left and the right and collide with the aligned balls. The Ejs model solves Newton's second law of motion numerically, pauses when a collision is detected, applies conservation of energy and momentum to the collision, and then the simulation is resumed. Small changes in the initial conditions of the system can be made to explore the sensitivity of the motion to perturbations.

The Balls in a Box model was created using the JavaScript version of the Easy Java Simulations (Ejs) modeling tool.

Published October 3, 2023
Last Modified October 3, 2023

Source Code Documents (2)

Balls In Box Source Code 

EJS JavaScript source code for the Balls in Box model.

Last Modified October 3, 2023

Web EJS version of Balls in Box 

Web EJS saves the EJS model in a Jason file.  This format is not compatible with desktop EJS.

Last Modified November 3, 2023

This file has previous versions.