This applet presents a simulation of four simple transformations in a contained ideal monoatomic or diatomic gas. The user chooses the type of transformation and, depending on the type of transformation, adds or removes heat, or adjusts the gas volume manually. The applet displays the values of the three variables of state P, V, and T, as well as a PV or PT graph in real time.
A few notes:
The rest of this page presents some results of thermodynamics and sketches of theorem proofs.


The kinetic theory is an analysis of the concept of pressure applied by a contained gas on the walls of the container based on the mechanical aspect of the repeated collisions and "bouncing off" of the gas molecules against the walls of the container.
The result of the Kinetic Theory:
Proof: The change in momentum in the xdirection for each individual molecule and each collision is In a time interval Δt the number of collisions for a given molecule is , where L is the box length in the xdirection. Thus, the momentum change for an individual molecule over a time interval Δt is . Generalizing to N molecules, . Using spatial symmetry: . The force applied in the xdirection is: . Using the definition of pressure: , or Two additional results that follow (more or less directly): The temperature is a direct measure of the average translational kinetic energy of molecules: Each degree of freedom (i.e. each axis of rotation or translation that can contribute to the total kinetic energy of the molecule) contributes the following amount to the total kinetic energy: 
The following expresses the work done on a contained fluid in terms of it state variables.
The mechanical expression of work done on a fluid:
Proof Work is defined as W=F x displacement. Here F = P.A, so W = P.A ΔL, or W = P ΔV. Finally, the sign of the work done on the gas is positive when its volume decreases, so: 
The following expresses the internal energy of a contained ideal gas in terms of its state variables.
U as a function of the state variables for gases
Proof From the kinetic theory and the equipartition of energy, each degree of freedom contributes 1/2 k_{B}T to the total enery of a system. A monoatomic gas has 3 degrees of freedom (3 translations, 0 rotation) and a diatomic gas has 5 degrees of freedom (3 translations, 2 rotations) 
Isochoric transformations
Isochoric means constant volume. P and T are the only changing variables.
(Monoatomic) (Diatomic) By integration, we get: (monoatomic) (diatomic) We can then find P using the gas Law. This result can also be written with c_{v}= 3/2 R for monoatomic gases and c_{v} = 5/2 R for diatomic gases. 
Isobaric transformations
Isobaric means constant pressure. V and T are the only changing variables.
(monoatomic) (diatomic) or (monoatomic) (diatomic) By integration, we find: (monoatomic) (diatomic) We can then find V using the gas Law. This result can also be written with c_{p}= 5/2 R for monoatomic gases and c_{p} = 7/2 R for diatomic gases. Two additional results: c_{p}c_{v} = R for both mono and diatomic gases. = 5/3 for monoatomic gases and = 7/5 for diatomic gases. 
Isothermal transformations
Isothermal means constant temperature. P and V are the only changing variables.
By integration, 
Adiabatic transformations
Adiabatic means no heat exchange.
separating the variables: By integration: 