The 2 DOF dynamical system in figure is composed of two massless rigid bodies and a massive one.
Compute the mass matrix of the system with reference to the degrees of freedom indicated in figure, in the hypotesis of small displacements.
We are going to use symbols for the relevant quantities.
In [3]:
m, L, x1, x2 = symbols('m L x_1 x_2')
We constrain $x_2$ to zero (i.e., the roller becomes a hinge) and impose a unit displacement $x_1=1$.
The Centre of Instantaneous Rotation (CIR) of the massive bar, at the intersection of the dashed lines in figure, coincides with the CIR of the left bar, hence the rotation of the two bars are the same.
Because the two rotations are $\phi_1=1/2L$ the displacements of the centre of mass are $u_{G1} = -\phi_1\times L/2 = -1/4$ and $v_{G1} = +\phi_1\times L=1/2$.
In [4]:
ug1, vg1, 𝜙1 = -x1/4, +x1/2, +x1/(2*L)
We constrain $x_1$ to zero (i.e., we introduce a roller) and impose a unit displacement $x_2=1$.
The left beam can't move, hence the CIR of the massive bar is the top internal hinge. The CIR of the bottom hinge is at an infinite distance in the vertical direction (the bottom bar undergos a horizontal motion) and by continuity we have $\phi_2=1/L$, $u_{G2}=-\phi_2\times(-L/2)=+1/2$ and $v_{G2}=0$.
In [5]:
ug2, vg2, 𝜙2 = +x2/2, 0, +x2/L
In [6]:
ug, vg, 𝜙 = ug1+ug2, vg1+vg2, 𝜙1+𝜙2
dot_u, dot_v, ω = diff_t(ug), diff_t(vg), diff_t(𝜙)
In [8]:
T = m * (dot_u**2 + dot_v**2 + ω**2*L**2/12) / 2
display(Latex('$$T=' + latex(T.expand()) + '.$$'))
In [7]:
for i, xi in enumerate((x1, x2), 1):
for j, xj in enumerate((x1, x2), 1):
display(Latex('$$m_{%d%d}='%(i,j)+latex(T.diff(xi,xj))+'.$$'))
In [1]:
from sympy import symbols, init_printing, latex
init_printing(use_latex=1)
from IPython.display import HTML, Latex
display(HTML(open('01.css').read()))
def diff_t(expr): return expr