Example 5: Parametrically excited Duffing oscillator
MMS example on the Duffing oscillator subject to parametric forcing. This configuration was studied by Nayfeh and Mook in Nonlinear Oscillations (1995), section 5.7.3.
System description
Illustration of a parametrically forced Duffing oscillator through the time-varying stiffness \(\omega_0^2 + 2 F \cos(\omega t)\).
The system’s equation is
where
\(x\) is the oscillator’s coordinate,
\(t\) is the time,
\(\dot{(\bullet)} = \mathrm{d}(\bullet)/\mathrm{d}t\) is a time derivative,
\(c\) is the linear viscous damping coefficient,
\(\omega_0\) is the oscillator’s natural frequency,
\(\gamma\) is the nonlinear coefficient,
\(F\) is the forcing amplitude,
\(\omega\) is the forcing frequency.
A parametric response at twice the oscillator’s frequency is sought so the frequency is set to
where
\(\epsilon\) is a small parameter involved in the MMS,
\(\sigma\) is the detuning wrt the reference frequency \(\omega_0\).
The parameters are then scaled to indicate how weak they are:
\(c = \epsilon \tilde{c}\) indicates that damping is weak,
\(F = \epsilon \tilde{F}\) indicates that forcing is weak,
\(\gamma = \epsilon \tilde{\gamma}\) indicates that nonlinearities are weak.
Code description
The script below allows to
Construct the dynamical system.
Apply the MMS to the system,
Evaluate the MMS results at steady state,
Compute the forced response and the backbone curve,
Evaluate the stability of the computed forced solution.
1# -*- coding: utf-8 -*-
2
3#%% Imports and initialisation
4from sympy import symbols, Function
5from sympy.physics.vector.printing import init_vprinting, vlatex
6init_vprinting(use_latex=True, forecolor='White') # Initialise latex printing
7from oscilate import MMS
8
9# Parameters and variables
10omega0, F, c = symbols(r'\omega_0, F, c', real=True,positive=True)
11gamma = symbols(r'\gamma',real=True)
12t = symbols('t')
13x = Function(r'x', real=True)(t)
14
15# Dynamical system
16Eq = x.diff(t,2) + omega0**2*x + gamma*x**3 + c*x.diff(t)
17fF = -2*x # Parametric forcing
18dyn = MMS.Dynamical_system(t, x, Eq, omega0, fF=fF, F=F)
19
20# Initialisation of the MMS sytem
21eps = symbols(r"\epsilon", real=True, positive=True) # Small parameter epsilon
22Ne = 1 # Order of the expansions
23omega_ref = omega0 # Reference frequency
24ratio_omegaMMS = 2 # Look for a solution around n*omega_ref
25
26param_to_scale = (gamma, F , c )
27scaling = (1 , Ne, Ne)
28param_scaled, sub_scaling = MMS.scale_parameters(param_to_scale, scaling, eps)
29
30mms = MMS.Multiple_scales_system(dyn, eps, Ne, omega_ref, sub_scaling, ratio_omegaMMS=ratio_omegaMMS)
31
32# Application of the MMS
33mms.apply_MMS(rewrite_polar="all")
34
35# Evaluation at steady state
36ss = MMS.Steady_state(mms)
37
38# Solve the evolution equations for a given dof
39solve_dof = 0 # dof to solve for
40ss.solve_bbc(solve_dof=solve_dof, c=param_scaled[-1])
41ss.solve_forced(solve_dof=solve_dof)
42
43# Stability analysis
44ss.stability_analysis(coord="polar", eigenvalues=True)
45
46# %%
Validation
The notations used in the above code are related to those in Nonlinear Oscillations as follows:
Current Notation |
Nonlinear Oscillations |
Description |
|---|---|---|
\(u\) |
\(x\) |
Oscillator’s dof |
\(\omega_0\) |
\(\omega\) |
Natural frequency |
\(\omega\) |
1 |
Forcing frequency |
\(2\omega_0+\epsilon\sigma\) |
\(\omega+\epsilon\sigma\) |
Forcing frequency definition |
\(F\) |
\(1\) |
Forcing amplitude |
\(\tilde{c}\) |
\(2\mu\) |
Damping coefficient (scaled) |
\(\tilde{\gamma}\) |
\(\alpha\) |
Nonlinear coefficient (scaled) |
\(x_0^{\textrm{h}}\) |
[no name] |
Leading order homogeneous solution |
\(a_0\) |
\(a\) |
Oscillator’s amplitude |
\(2\beta_0\) |
\(\psi\) |
Oscillator’s autonomous phase |
\(\textrm{D}_1(\bullet)\) |
\((\bullet)'\) |
Slow time derivative |
\(\lambda_i\) |
\(\lambda_i\) |
Eigenvalues of the Jacobian matrix |
Note that the above table implies that the detuning \(\sigma\) in Nonlinear Oscillations’s notations is half that of the current notation. Section 5.7.3 from Nonlinear Oscillations gives the following results
In the current notations, this is equivalent to
which are the outputs for ss.sol.x[0][0].simplify(), ss.sol.faO[0][1], ss.sol.fbetaO[0][1] and ss.stab.eigvals, respectively.
Note the \(\epsilon\) factor for the eigenvalues. It is related to the eigenvalues being computed from the reconstituted modulation equations rather than just the \(1^{\textrm{st}\) order slow time modulation equations.