This application allows you to simulate a harmonic oscillator, an important physics model that is used to model many real-world processes:
- Masses on a spring, pendulums
- Vibrating objects - for instance a guitar string
- Electrical circuits
Jason V
This application allows you to simulate a harmonic oscillator, an important physics model that is used to model many real-world processes:
The oscillator has a 'Natural Frequency' based on it's inherent properties (k and m below). It also possess a 'Damping' mechanism (B) that reduces vibration much like a shock absorber in a car. Finally, it is subjected to a 'Driving Force' (F) that pushes the oscillator with a strength and rate that can vary. This force results in displacements from equilibrium position (X).
Adjust the sliders to see the effect these variables have on the model's dynamics. You can control the Natural Frequency, Damping Amplitude, Driving Amplitude, and Driving Frequency. The plot will automatically update with your changes and show the displacement over time.
qplot(time,displacement, xlab = "Time", ylab="Displacement",geom="line")

ShinyApps: Run the Simple Harmonic Oscillator Simulator
Github: Source Code
Rpubs: Presentation