Physion is a freely available physics simulation software developed by Dimitris Xanthopoulos. It is available for multiple platforms, and has a physics engine based on Box2D, which is also freely available. The Box2D engine simulates translation, rotation, collision of rigid bodies, and composite objects (like chains) made out of rigid bodies. There are several linkage types with different properties. Once a world is constructed by assembling objects and assigning properties, the simulator steps time and solves for the dynamics of the system while performing checks for any unphysical behavior.
Physion consists of an environment where objects can be drawn and properties can be assigned using a WYSIWYG editor. Actions can also be coded by using scripts based on javascript. The physics is very realistic, and the user has a lot of control over the various parameters that control the physics. The various elements on the screen are labelled in the picture to the right. The screen area is divided into a workspace for the simulation, a property editor, a "world" editor, and a toolbar containing objects, joints and linkages for use in simulations. The environment is simple to use and one draws with the mouse. There is also an interesting "freehand" tool using which the user can draw a rigid object of any shape.
Below, I'll provide some examples of how Physion could be used as a classroom module or lab module in an introductory mechanics course. We'll set up and run different simulations involving oscillatory motion. There are two generic kinds - a pendulum, and a spring. A pendulum swings back and forth under gravity and the oscillation frequency does not depend on the mass of the bob. This is not very intuitive, as, to most who don't have experience with it, it seems like a heavier bob should make the pendulum swing slower. The spring on the other hand produces oscillations due to elasticity or the coiled geometry. In this case the oscillation frequency does actually depend on the mass of the object.
The first video shows how to set up and run the pendulum simulation.
Here are the steps:
- Set up a "static" object to hang the pendulum from.
- Draw the pendulum bob - it's weight can be adjusted by changing the radius or the density in the properties panel.
- Draw a "distance" joint, i.e., a fixed length constraint between the bob and the ceiling. This could also be done using a "rope" or "chain" or a rod made from a rectangle, but since all these elements have mass, we keep it simple here by employing the distance joint. Once the animation is started, we can kick the pendulum around with the cursor.
- We can now in real time change the mass of the bob (via the radius) and see that it has no effect on the oscillations.
- We can also change the length of the string and see that this in fact changes the oscillation frequency. The longer it is, the less frequent the oscillations.
In the next two videos, I show the oscillation of an object at the end of a spring. We'll first do it in a horizontal direction, to eliminate gravity. Also we'll set friction to zero. I'll then add gravity to the spring problem. We can end up getting unwanted sideways motion here, so we'll constrain the block to slide in a groove.
In the next example, I'll show via a very simple machine that circular motion and oscillation are essentially the same thing and one can be described in terms of another. The machine forms the basis of an engine that converts oscillatory motion into circular motion. For this we'll have to use a feature called a "revolute" joint which has a motor that can be switched on and off. Objects can be linked to any part of the disc using one of the several linkages available. Physical properties such as damping etc. can also be tuned.
In the penultimate video, I'll demonstrate the beautiful phenomenon of phase (anti)synchronization.
Two oscillators that are coupled, i.e, somehow connected with each other either by sitting on the same surface or being tied onto the same string, etc., will either try to get exactly in phase or out of phase with each other. If that doesn't happen, they keep transferring energy back and forth. This can be demonstrated by suspending two pendula from a movable platform and swinging them out of phase. Slowly, the pendula go in and out of sync thus demonstrating two things: a really cool phenomenon, and a very realistic physics engine!
The above are simple demonstrations that could be used as a part of a lab or class on oscillations. The software has scripting capabilities too. There are three main functions that are called. One when the simulation starts, one when it stops, and one at every time step of the simulation. Each object can have different instructions for any of these three functions. Objects can be manipulated according to a set of rules (regarding their parameters). Also to create multiple similar objects in an array or preset positions, scripting is very useful. Objects can also be generated at regular time intervals, allowing a wide variety of simulations to be constructed.
So, finally, a simulation of a wonderful demonstration I had seen at the Boston Science museum of the central limit theorem:
The random variable is the position of the ball, which has mean value zero and some small variance around it. Each new ball is a new random variable, and the result is visible as the balls collect in bins below the apparatus.