
The mechanics models in this Launcher package are designed to show how Ejs can be used to teach modeling. The models presented have very simple user interfaces. Initial conditions and parameters, such as spring constants or the acceleration of gravity, are set within the Ejs modeling tool. Readers are encouraged to first run a model to observe how it behaves and then to open and study the model within Ejs to see how it is implemented. The activities listed with each model allow readers to test their understanding of how the physics behind the model. Readers are then encouraged to extend the model to new situations.
This package is an introduction to Ejs and is not a substitute for the Ejs manual. Readers should download and consult the Ejs manual for a more complete description.
First Law models Newton's First Law. Users can drag the particle to set its initial
position or an arrow to set its initial velocity. Only two lines of Java code are needed to create this model.
Free Fall models a ball falling vertically and rebounding from a table top. This model
demonstrates how to model a one dimensional differential equation that includes a collision event. The collision is
approximated using an Ejs state event that occurs when the ball passes below the table top. The differential equation
solver stops it time evolution, the impulse approximation is applied to reverse the direction of the ball, and the solver
resumes its time evolution.
Free Fall 2D extends the Free Fall model of a bouncing ball to two dimensions. In addition
to increasing the number differential equations, the model's view add a trace element that shows the trajectory. The
model's state event takes into account the finite width of the table top. A ball with an initial horizontal velocity
will bounce off the table top.
Simple Harmonic Oscillator models a mass on a spring. The model displays both an animation
of the spring-mass system and a graph of displacement as a function of time. Study the implementation of this model to
learn how easy it is to produce such a graph.
Driven Harmonic Oscillator extends the mass on a spring by adding a driving force. It is
one of the most frequently used examples in introductory courses on ordinary differential equations. Although the analytic
solution is well know, the numerical solution of this model allows us to visualize phenomena such as resonance or the
relationship between particular and homogeneous solutions.
Pendulum models the solution of a mass attached to a rigid rod attached to pivot. Although
small angle motion can be approximated by the simple harmonic oscillator differential equation, the motion at large angles
becomes nonlinear and the solution cannot be expressed in terms of simple analytic functions and numerical solution of the
differential equations is the preferred method.
Collisions models a two-dimensional collision between colliding disks using conservation of
momentum. The Hard Disk Gas simulation extends this model to multiple particles.
Central Force models the motion of a particle acted on by an inverse square law 1/r2 attractive force. The motion of the planets about our Sun is described by this model. A adaptive numerical algorithm is used to compute the trajectory because the force becomes large as the distance to the center r becomes small.
Advanced models are included in this package without explanation to demonstrate how the physics principles presented in this tutorial can are applied to more complex systems.