Spring-Mass Systems
Aims
-
To understand how to use numerical integration for 2nd order
differential equations.
-
To compare the Euler and Improved Euler integration methods.
-
To investigate linear spring-mass systems.
Exercises
-
Modify the Java projectile motion program which uses the
analytical solution to use numerial integration via the Euler
approach as discussed in Acheson (equation 4.35). Remember,
this is a two step process: use acceleration to update
velocity and velocity to update position.
-
Plot the trajectory of both the analytical and the numerical
approaches (use different colours) in the same window and
compare.
-
Add the improved Euler approach - including using the
variables as suggested in equation 4.35 in Acheson.
-
Compile and run the single spring mass sample program.
Modify it to use the improved Euler method.
-
Modify it further to use both the Euler and improved Euler
methods at the same time (two masses) and draws
the mass using each approach.
-
Modify the program so that it draws the position curve
(position versus time) Just a series of
dots will do in the first instance.
-
Adjust the parameters so that they match those in Figure 4.7
and then Figure 4.9 of the textbook. Run the program and
compare results.
-
Further modify the program so that the position of the mass is
plotted against its velocity, that is, a phase diagram. What
shape do you observe?