Piston
TEST PAGE

Init piston.

Piston Test Page

The Piston Physlet is an extension of the MolecularPiston Physlet.  It is part of the molecular dynamics package and is downloaded whenever the Molecular.jar file is specified in the archive tag. 

The movable piston in the above simulation acts upon an ensemble in one of two ways.   In "parse mode" the piston is scripted to follow a fixed path, h(t).   If "parse mode" is set to false, the piston is a freely falling object that is acted on by a constant downward force.  Both the piston mass and the force can be set when the applet is embedded.

The MolecularPiston Physlet is embedded using the following syntax. The [location] parameter should be the URL of the directory that contains the jar file and the [name] should be a unique variable name by which JavaScript can refer to this applet.

<applet
    CODEBASE=[location]
    CODE="molecular.MolecularPiston.class"
    ARCHIVE="Molecular.jar"
    NAME=[script_name]
    ID=[script_name]>

<param name=[par_name] value=[par_Value]>
.
.
</applet>

The applet that you see on this page was embedded as follows.

<applet
    CODEBASE="../classes/"
    ARCHIVE="Molecular.jar"
    CODE="molecular.MolecularPiston.class"
    NAME="Molecular" ID="Molecular"
    WIDTH="300"
    HEIGHT="300"
    HSPACE="0"
    VSPACE="0"
    ALIGN="middle">

<param name="ShowControls" value="false">
<param name="InitialP" value="25">
<param name="FPS" value="10">
<param name="dt" value="0.05">
<param name="PeriodicH" value="false">
<param name="PistonMass" value="300">
<param name="Gravity" value="-2.0">
<param name="InitialPistonPos" value="10.0">
<param name="ParseMode" value="false">
<param name="ParseString" value="10-(+20*t)">
<param name="Orientation" value="vertical">
<param name="InitialPistonPos" value="15">
</applet>
<\code>