Mass Matrix

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.

Solution

We are going to use symbols for the relevant quantities.


In [3]:
m, L, x1, x2 = symbols('m L x_1 x_2')

Contribution of $x_1$ to the displacements of the massive bar

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)

Contribution of $x_2$ to the displacements of the massive bar

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

Total Displacements and Velocities

The total displacement components are the sum of the two cuntributions, the total rotation is the sum of the two contributions.

The velocities are obtained differentiating w/r to time.


In [6]:
ug, vg, 𝜙 = ug1+ug2, vg1+vg2, 𝜙1+𝜙2
dot_u, dot_v, ω = diff_t(ug), diff_t(vg), diff_t(𝜙)

Kinetic Energy


In [8]:
T = m * (dot_u**2 + dot_v**2 + ω**2*L**2/12) / 2
display(Latex('$$T=' + latex(T.expand()) + '.$$'))


$$T=\frac{m x_{1}^{2}}{6} - \frac{m x_{1}}{12} x_{2} + \frac{m x_{2}^{2}}{6}.$$

Mass Matrix Coefficients

The coefficient can be computed as

$$m_{ij} = \frac{\partial^2 T}{\partial x_i \partial x_j}.$$

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))+'.$$'))


$$T=\frac{m x_{1}^{2}}{6} - \frac{m x_{1}}{12} x_{2} + \frac{m x_{2}^{2}}{6}.$$
$$m_{11}=\frac{m}{3}.$$
$$m_{12}=- \frac{m}{12}.$$
$$m_{21}=- \frac{m}{12}.$$
$$m_{22}=\frac{m}{3}.$$

Initialization


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