This tutorial models a simple harmonic oscillator with a damping term. A physical example of this is an oscillating spring experiencing damping from friction.
Acceleration Equations
If you have not already done so, launch the Newton Tool. When the Newton Tool is first opened with one degree of freedom, the default equation specified is that of a simple harmonic oscillator. Simple harmonic motion is governed by equations that look like:
where c1 is the spring constant divided by the particle mass. ω, the frequency with which the system oscillates, is the square root of c1.
For a damped harmonic oscillator, the equation has an extra term that slows the oscillations as a function of the velocity. Now we have a second constant, c2, that determines how strong the damping is. This leads to the equation:
To model this using the Newton Tool, leave the number of dimensions 1 and change the expression in the first equation to that below:
Notice the velocity is entered as vx, not just v. Once this equation is entered, click 'Next'.
Initial Conditions
Now enter the initial conditions as shown below. These initial conditions mean we are displacing the spring by 1 meter, and releasing it at time = 0.
Once these initial conditions have been entered, click 'Calculate'. After the calculation finishes, click 'Next'.
Plots
Once the calculation has finished, we can make several plots. First, under 'plot on x-axis' select 'Time', and under 'plot on y-axis' select 'x position'. This will be a graph of the spring's displacement as a function of time. Because we're modeling a damped harmonic oscillator, we except to see the graph oscillate up and down but with a decreasing magnitude over time. Click 'View Plot' to see this graph.
A second interesting graph that can be generated for this problem is a phase portrait with vx on the y-axis and x on the x-axis. To do this, return to the Plot panel in the Newton Tool and change the parameters to look like the following.
This combination will yield a plot that looks like this:
The spiral in the phase portrait shows us that energy is not conserved for this problem. As we would suspect, the system slows down over time and will eventually come to rest.
Challenge
What happens if the constant in front of the vx in the equation is changed? How does the phase portrait illustrate this change?