Developed by K. Roos
In this set of exercises the student builds a computational model of a hanging mass-spring system that is constrained to move in 1D, using the simple Euler and the Euler-Cromer numerical schemes. The student is guided to discover, by using the model to produce graphs of the position, velocity, and energy of the mass as a function of time, that the Euler algorithm does not conserve energy, and that for this simple oscillatory system, a modified algorithm (Euler-Cromer) is necessary to avoid artificial behavior in the model.
Subject Area | Mechanics |
---|---|
Levels | First Year and Beyond the First Year |
Available Implementations | C/C++, Fortran, IPython/Jupyter Notebook, Mathematica, Octave*/MATLAB, Python, and Spreadsheet |
Learning Objectives |
Students who complete this set of exercises will
|