-
Notifications
You must be signed in to change notification settings - Fork 0
Oscillator
Nawaf Abdullah edited this page Jan 25, 2019
·
12 revisions
The Oscillator class, contained in the script oscillator.py, allows the user to create an oscillator object with specific parameters simulate it's oscillatory motion.
The Euler-Cromer numerical method is used for solving the oscillator.

# Standard plot
m = Oscillator(i_length=9.8, i_ang=0.2, i_o=0, i_damp=0.5, ohm_d=0.66, f_d=1.2)
m.oscillate(1000, 0.04)
m.plot()

# poincare plot
m = Oscillator(i_length=9.8, i_ang=0.2, i_o=0, i_damp=0.5, ohm_d=0.66, f_d=1.2)
m.oscillate(1000, 0.04)
m.poincare_plot()
