Computer Program Detail Page

Item Picture

This ComPADRE record has not been chosen for inclusion into the Physics To Go collection. If you feel this record should be included, you may contact the editor using our feedback form.

written by Todd Timberlake
The EJS Ideal Gas Expansion model simulates a two-dimensional ideal gas in a square box.   This simulation can be used as part of the activity described in "The Statistical Interpretation of Entropy: An Activity" by Todd Timberlake, to be published in The Physics Teacher.

In the model, the particles are initially all on the left (red) side of the box with otherwise random positions and random velocities (distributed according to a Maxwell distribution). Separate windows show the motion of the gas particles, a plot of the number of particles on each side versus time, and a histogram of the number of occurrences of a given number of particles on the left.  The user can modify this simulation if EJS is installed locally by right-clicking within the plot and selecting "Open Ejs Model" from the pop-up menu item.

EJS Ideal Gas Expansion model was created using the Easy Java Simulations (EJS) modeling tool.  It is distributed as a ready-to-run (compiled) Java archive.   Double clicking the ejs_entropy_IdealGasExpansion.jar file will run the program if  Java is installed.  EJS is a part of the Open Source Physics Project and is designed to make it easier to access, modify, and generate computer models.  Additional EJS models re available.  They can be found by searching ComPADRE for  Open Source Physics, OSP, or EJS.

Please note that this resource requires at least version 1.5 of Java (JRE).
View the source code document attached to this resource
  • Ideal Gas Expansion Source Code
    The source code zip archive contains an XML representation of the EJS Ideal Gas Expansion Model.   Unzip this archive in your EJS workspace to compile and run this model using EJS.
Subjects Levels Resource Types
- Models
= Ideal Gas
- Second and Third Law
= Entropy
- Statistical Physics
- Lower Undergraduate
- High School
- Instructional Material
= Activity
= Interactive Simulation
Intended Users Formats Ratings
- Learners
- Educators
- application/java
  • Currently 3.0/5

Rated 3.0 stars by 1 person

Want to rate this material?
Login here!

Access Rights: Free access
License: This material is released under a GNU General Public License Version 2 license.
Rights Holder: Todd Timberlake
Keywords: EJS, Easy Java Simulations, OSP, Open Source Physics, entropy, equilibrium, free expansion, ideal gas
Record Creator: Metadata instance created June 17, 2010 by Todd Timberlake
Record Updated: Jun 09, 2014 by Andreu Glasmann
Last Update
when Cataloged:
June 17, 2010
Other Collections:
ComPADRE is beta testing Citation Styles!

Record Link
AIP Format
T. Timberlake, Computer Program IDEAL GAS EXPANSION (2010), WWW Document, (
T. Timberlake, Computer Program IDEAL GAS EXPANSION (2010), <>.
APA Format
Timberlake, T. (2010). Ideal Gas Expansion [Computer software]. Retrieved September 25, 2017, from
Chicago Format
Timberlake, Todd. "Ideal Gas Expansion." (accessed 25 September 2017).
MLA Format
Timberlake, Todd. Ideal Gas Expansion. Computer software. 2010. Java (JRE) 1.5. 25 Sep. 2017 <>.
BibTeX Export Format
@misc{ Author = "Todd Timberlake", Title = {Ideal Gas Expansion}, Month = {June}, Year = {2010} }
Refer Export Format

%A Todd Timberlake
%T Ideal Gas Expansion
%D June 17, 2010
%O application/java

EndNote Export Format

%0 Computer Program
%A Timberlake, Todd
%D June 17, 2010
%T Ideal Gas Expansion
%8 June 17, 2010

Disclaimer: ComPADRE offers citation styles as a guide only. We cannot offer interpretations about citations as this is an automated procedure. Please refer to the style manuals in the Citation Source Information area for clarifications.

Citation Source Information

The AIP Style presented is based on information from the AIP Style Manual.

The APA Style presented is based on information from APA Electronic References.

The Chicago Style presented is based on information from Examples of Chicago-Style Documentation.

The MLA Style presented is based on information from the MLA FAQ.

Ideal Gas Expansion:

Is Based On Easy Java Simulations Modeling and Authoring Tool

The Easy Java Simulations Modeling and Authoring Tool is needed to explore the computational model used in the Ideal Gas Expansion.

relation by Mario Belloni

Know of another related resource? Login to relate this resource to it.

Have experience with this material? Login to leave a comment sharing your experience.

Know of a related resource? Login to relate this resource to other material across the web.

Know of a better resource? Suggest it!

See a problem with this material's physics or description? Contact us!