The Harmonic oscillation under damping and driven force

The Content

Loading the package

1. The external force

Defining the force including the elastic force, frictious force and driven force

2. No friction and driven

Initial the parameters

We can get the trajectory by numerical way

Meanwhile, we can also obtain the analytic solution

Comparing the numerical and analytic solution

3. No driven with finite friction

Initial the parameters

3.1 Over-Damping $\gamma>2k$

Initial the friction

We can get the trajectory by numerical way

Meanwhile, we can also obtain the analytic solution

Comparing the numerical and analytic solution

3.2 Under-Damping $\gamma<2k$

Initial the friction

We can get the trajectory by numerical way

Meanwhile, we can also obtain the analytic solution

Comparing the numerical and analytic solution

3.3 Critical-Damping $\gamma=2k$

Initial the friction

We can get the trajectory by numerical way

Meanwhile, we can also obtain the analytic solution

Comparing the numerical and analytic solution

3.4 Comparing different damping

Defining the damping function for all case

Changing the damping coefficent, we can see the fast damping is critical damping

4. With finite damping and driven

4.1 The resonance

The resonance function is $x(t)=|Z_0|Cos(\omega_s t-\psi)$, where $tan(\psi)=\frac{2\omega_s\beta}{\omega_0^2-\omega_s^2}$ and the amplitude $|Z_0|$ is

Its maximum $Z_m(\beta)$ exists at $\omega_s=\sqrt{\omega_0^2-2\beta^2}$ with value

Initial the parameters

The amplitude vs $\omega_s$

4.2 The numerical solution

Initial the parameters

We can get the trajectory by numerical way

Meanwhile, we can also obtain the analytic solution

Comparing the numerical and analytic solution