Double pendulum damping and spring forces If I have the equations of motion for a double pendulum (from https://www.phys.lsu.edu/faculty/gonzalez/Teaching/Phys7221/DoublePendulum.pdf), can I include a time dependent damping and spring force term to model the system in the picture?
If so, where would I introduce them and can I still use the same methodologies describe in the link (Newtonian mechanics and Lagrangian mechanics)?
(The function describing how the damping force varies with theta and d(theta)/dt is known)
 A: $\def \b {\mathbf}$
with the components of the damper and spring forces ( John Alexiou)
\begin{align*}
 &\b F_d(\phi_1)=\begin{bmatrix}
           Fd_x \\
           Fd_y\\
         \end{bmatrix}\quad,
  \b F_s(\phi_1,\phi_2)=\begin{bmatrix}
           Fs_x \\
           Fs_y\\
         \end{bmatrix}       
\end{align*}
add to the differential equations $~(69,70)~$
\begin{align*}
  &\b \tau_q=\left[ \begin {array}{c} l_{{1}}\cos \left( \phi_{{1}} \right) {\it
Fd}_{{x}}+l_{{1}}\sin \left( \phi_{{1}} \right) {\it Fd}_{{y}}+l_{{1}}
\cos \left( \phi_{{1}} \right) {\it Fs}_{{x}}+l_{{1}}\sin \left( \phi_
{{1}} \right) {\it Fs}_{{y}}+\tau_d\\  l_{{2}}\cos \left(
\phi_{{2}} \right) {\it Fs}_{{x}}+l_{{2}}\sin \left( \phi_{{2}}
 \right) {\it Fs}_{{y}}\end {array} \right]
\end{align*}
where $~\tau_d~$ is the "damper torque"  about $~(0,0)~$
\begin{align*}
   &\tau_d=\left[\b R_d\times \b F_d\right]\cdot\b e_z=l_d\,\left[\cos(\phi_1)\,Fd_x+\sin(\phi_1)\,Fd_y \right]
\end{align*}

Theory
The generalized  torques are
\begin{align*}
 &\b\tau_q=\sum\left[\frac{\partial \b R_i}{\partial \b q_i}\right]^T\,\b F_i
\end{align*}

*

*$~\b R_i~$ position vectors to the CM

*$~\b F_i~$ external forces at the CM

*$\b q_i~$ generalized coordinates vector

$~\b\tau_q~$  appeared at the right hand side of the NEWTON and EL equations
Example double pendulum
\begin{align*}
  &\b R_1=\left[ \begin {array}{c} \sin \left( \phi_{{1}} \right) l_{{1}}
\\ -\cos \left( \phi_{{1}} \right) l_{{1}}
\end {array} \right]
\quad,
\b R_2= \left[ \begin {array}{c} \sin \left( \phi_{{1}} \right) l_{{1}}+\sin
 \left( \phi_{{2}} \right) l_{{2}}\\ -\cos \left(
\phi_{{1}} \right) l_{{1}}-\cos \left( \phi_{{2}} \right) l_{{2}}
\end {array} \right]\\
&\b F_1= \left[ \begin {array}{c} {\it Fd}_{{x}}\\ {\it Fd}_
{{y}}\end {array} \right]
\quad,
\b F_2=\left[ \begin {array}{c} {\it Fs}_{{x}}\\ {\it Fs}_
{{y}}\end {array} \right]\quad\Rightarrow\\
&\b\tau_q=\left[\frac{\partial \b R_1}{\partial \phi_1}\right]^{T}\,\b F_1+
\left[\frac{\partial \b R_2}{\partial \phi_1}+
\frac{\partial \b R_2}{\partial \phi_2}\right]^T\,\b F_2
\end{align*}
to obtain the "damper torque" you can put a dummy mass at the connection point between the damper and the pendulum thus
\begin{align*}
&\b R_d= \left[ \begin {array}{c} l_{{d}}\sin \left( \phi_{{1}} \right) 
\\  -l_{{d}}\cos \left( \phi_{{1}} \right) 
\end {array} \right]\,
\b F_d= \left[ \begin {array}{c} {\it Fd}_{{x}}\\  {\it Fd}_
{{y}}\end {array} \right]\quad\Rightarrow\\
&\b\tau_d=\left[\frac{\partial \b R_d}{\partial \phi_1}\right]^{T}\,\b F_d=
 \left[ \begin {array}{c} l_{{d}}\cos \left( \phi_{{1}} \right) {\it 
Fd}_{{x}}+l_{{d}}\sin \left( \phi_{{1}} \right) {\it Fd}_{{y}}
\\ 0\end {array} \right] 
\end{align*}
A: What is missing from your diagram is that in order to describe the forces generated by the spring and the damper, you need to track their endpoints.

Generally, figuring out what locations are important, and tracking them are the first step in such analysis. In the attached paper this is done in equations (10)-(20).
In your case, choose a designation for these points, and track their position and velocity.
Once you have that you can describe the force elements as

*

*Damper $$\boldsymbol{F}_d = -b \left( \boldsymbol{e}_{34} \cdot ( \boldsymbol{\dot{r}_3}-\boldsymbol{\dot{r}_4})\right) \boldsymbol{e}_{34} $$ where $\boldsymbol{e}_{34}$ is the direction vector for the damper.


*Spring $$\boldsymbol{F}_s = -k \left( \boldsymbol{e}_{25} \cdot ( \boldsymbol{{r}_2}- \boldsymbol{{r}_5}) - \ell_{25}\right) \boldsymbol{e}_{25} $$ where $\boldsymbol{e}_{25}$ is the direction vector for the spring, and $\ell_{25}$ its free length.
Then add these forces to equations (30)-(31) as needed.
But because the 0-1 rod has the damper attached in the middle of it, an additional equation is needed at this point, making sure the sum of forces on the red rod is zero (since it is assumed massless).
