In [13]:
from IPython.display import display, Latex, HTML
def plvu(label,  value, units=""):
    print("%40s: %10g %s"%(label, value, units))
def css_styling():
    styles = open("00_custom.css", "r").read()
    return HTML(styles)
css_styling()


Out[13]:

Rigid System

Our problem is described by the following figure:

Solution

To solve this problem we we'll use fractions and dummy functions to formally compute incremental displacements, velocities and accelerations.


In [14]:
from fractions import Fraction as frac

def d(v):     return v
def delta(v): return v
def dot(v):   return v
def ddot(v):  return v

We use symbolic names to denote unit values of the various physical quantities involved, as well as the unit displacement corresponding to the free coordinate.


In [15]:
k  = 1; m = 1; p = 1; L = 1
uc = 1

Masses and Rotatory Inertias

The rigid bar CDE can be conveniently analyzed in terms of three, identical sub bars, and for each of them we have the same mass and the same rotatory inertia.


In [16]:
m1 = m*L ; j1 = frac(m1*L**2, 12)
m2 = m1  ; j2 = j1
m3 = m1  ; j3 = j1

Instantaneous Motion

Analyzing the instantaneous motion of the system, one can recognize that

  1. the top bar is constrained to move horizontally by an amount $u \equiv u_C$,
  2. the right bar is constrained to move vertically by an amount $v \equiv -u_C$,
  3. the central bar is rotating about the centre of the segment DE by an angle $\theta \equiv -u_C/L$.

On these premises we can write the generalized displacement (and the virtual displacements and the accelerations) of the various points of interest.

Displacements

The displacements in A


In [17]:
ua = uc ; va = 0

The displacements in D


In [18]:
theta_cde = frac(-uc,L)
# coordinates with respect to CDE's centre of instantaneous rotation
xd = -L ; yd = 0
ud = -theta_cde*yd
vd = +theta_cde*xd

The displacements of the centres of mass of the three sub bars (all the rotations are the same)


In [19]:
x1 = frac(-L,2) ; y1 = 0
x2 = 0 ; y2 = frac(+L,2)
x3 = frac(+L,2) ; y3 = 0

u1 = -theta_cde*y1 ; v1 = +theta_cde*x1
u2 = -theta_cde*y2 ; v2 = +theta_cde*x2
u3 = -theta_cde*y3 ; v3 = +theta_cde*x3

theta1 = theta_cde ; theta2 = theta_cde ; theta3 = theta_cde

Forces

Of course there is the external force, then the springs forces


In [20]:
fsa = -k*ua
fsd = -k*vd

the inertial forces (only the ones different from zero)


In [21]:
fi1 = -m1*ddot(v1)
fi2 = -m2*ddot(u2)
fi3 = -m3*ddot(v3)

and the inertial couples


In [22]:
wi1 = -j1*ddot(theta1)
wi2 = -j2*ddot(theta2)
wi3 = -j3*ddot(theta3)

Principle of Virtual Displacements

To have equilibrium it is necessary and sufficient that the virtual work of all the forces for the virtual rigid displacement is equal to zero (note that the work of reactive forces, for fixed constraints, is identically zero).

First the virtual work of inertial forces, then the work of spring forces and eventually the work of the autonomous forces:


In [23]:
vwif = fi1*delta(v1) + fi2*delta(u2) + fi3*delta(v3) + wi1*delta(theta1)
vwif+= wi2*delta(theta2) + wi3*delta(theta3)

vwsf = fsa*delta(ua) + fsd*delta(vd)

vwaf = p*delta(uc)

Simplifying the variation of $u_C$, expliciting the dependencies on fundamental units we eventually have the final result.


In [24]:
print ("   %s*m*ddot(u_c) %s*k*u_c +%s*p = 0"%(vwif,vwsf,vwaf))


   -1*m*ddot(u_c) -2*k*u_c +1*p = 0