You should take some time to read the posts that describe the relationship between the Lab framework (which provides the modeling engines and view for interactive authors) and the lab-interactives-site (which contains the model definitions and interactive specifications). Rather than make a new interactive from scratch (with a new model), it would be simpler to look at the modeling engine code to see where the obstacle elasticity parameter could be added and how a collision with the obstacle could be included in the incremental calculations done in the simulation loop. We use a Lennard-Jones potential to calculate the forces between atoms, but the interactions with obstacles are much simpler. Right now they behave as an ideal reflector in which no kinetic energy is lost (or converted to potential) upon collision with an obstacle. There is a notion of an obstacle having mass and the ability to move, so sometimes the kinetic energy of the atom is transferred to the obstacle, but this is not done through force potential calculations as is done with “collisions” between atoms. I put that in quotes because we don’t calculate inter-atom collisions, just the LJ forces. With obstacles we do determine collisions and adjust the distribution of energies appropriately (if the obstacle can move). Currently obstacles act as objects with 100% elasticity. The idea was to make this more flexible, so that an atom might lose KE upon collision with an obstacle that is fixed in place. This could simulate having a “cold” wall or heat sink.
The places to start looking at this in the Lab framework are here:
In particular you should start looking at:
There is no need to create a new interactive yet to test out a new obstacle property. If you made changes in Lab to add this property to obstacles, an existing interactive with a non-moving obstacle could first be used as a test case.