Hover over the menu bar to pick a physics animation.

In this animation, the gas is the spring and a piston is propelled by thr Left-Right difference in gas pressure. The initial condition here is that the total gas energy on the left side of the piston is equal to that on the right side of the piston but the piston is initially set at coordinate xP which is not at the center of the cylinder.

The piston is like an atom with just one degree of freedom (its x velocity) while the atoms have 3 degrees of freedom. Since most of the kinetic energy is that of the gas and no heat is being added we can model the gas expansion as that of a monoatomic adiabatic expansion. The pressure variation for this expansion can be written as

`P*V^(5/3)=P0*V0^(5/3)`

where P is pressure and V is volume and 0 indicates the initial condition. For this gas the value of P0*V0 is `P0*V0=(2/3)*E0` where E0 is the initial energy. Solving the first equation of P we obtain:`P=(2/3)E0*V0^(2/3)/V^(5/3)`.

A similar expression for the value of E in terms of the initial energy is`E=E0*(V0/V)^(2/3)`

This latter expression does not include the cyclical gas energy reduction due to the kinetic energy of the piston. Since the the gas volume is its length multiplied by the piston area, Ap, we can rewrite the above expressions in terms of the piston position, `x_P`, i.e. `V=A_p*x_P` where `x_P` is the distance of the left side of the piston from the left end of the cylinder:`P=(2/3)E_0*(x_(P0)*A_p)^(2/3)/(x_P*A_p)^(5/3)=(2/3)E_0/Ap*x_(P0)^(2/3)/x_P^(5/3)`

and`E=E_0*(x_(P0)*A_p/(x_P*A_p))^(2/3)=E_0*(x_(P0)/x_P)^(2/3)`

An expression for the force on the left side of the piston is then `P*A_p`. Similar expressions for the force on the right hand side of the piston are gotten by substituting `L-x_(P0)` and `L-x_P` for `x_(P0)` and `x_P` where `L` is the length of the cylinder. These expressions assume that the piston thickness is negligible and that the piston energy is small compared to the gas energy. The plots of the pertinent quantities are color coded. The learner should note that energy is conserved in this system as long as no heat flows from one side of the piston to the other and as long as no heat flows through the walls. Also, the orange trace which plots the actual net force on the piston is plotted with an averaging time lag set by the learner. It is difficult to find the time when the piston position crosses the mid point of the cylinder but one can find the value of the piston position when the net force on it is zero. Using the above equations, solve for `x_P` when `P-(Left)=P_(Right)` Define:
`ratio=x_(P0)/(L-x_(P0))`

`ratio_(25)=ratio^(2/5)`

`x_P(F_p=0)=L*ratio25/(1+ratio_(25))`

Note that the force does not vary symmetrically about this position, so this oscillator is not at all harmonic but energy is conserved. The following parameters are learner adjustable:1. Starting Energy of Each Atom

2. Total Number of Atoms

3. Piston Mass (atom mass=1 and only the ratio is important)

4. Total Length of Cylinder

5. Piston Starting Position

6. Piston Force Averaging Lag