<jupyter_start><jupyter_text>Driving forces for moving systemsIn this case study, you want to accelerate a 0.1-kg flywheel with apiston. The desiredacceleration of the flywheel is $\alpha=50~rad/s^2.$ The piston isattached to the link and creates a horizontal driving force. Thisexample demonstrates how we can describe constraints in mathematicalforms. We have two moving bodies:1. a flywheel with radius $r=0.2~m$ and mass $m=0.1~kg$2. a massless connecting linkBoth objects move in a horizontal plane, so their positions have twodegrees of freedom to describe position and one degree of freedom thatdescribes orientation. $DOF = 3 + 3 = 6$<jupyter_code>from IPython.display import SVG
SVG(filename = './images/piston-flywheel.svg')<jupyter_output><empty_output><jupyter_text>Describing constraints There are six degrees of freedom for a flywheel and a link, but thereare 6 constraints on the system's motion:1. the flywheel is pinned to the ground in the x-dir1. the flywheel is pinned to the ground in the y-dir2. the top of the link is pinned to the flywheel2. the top of the link is pinned to the flywheel3. the bottom of the link slides along the horizontal line4. the angle of the flywheel has acceleration, $\alpha=50~rad/s^2$$system~DOF = 6 - 6 = 0~DOF$> __Note:__ In general, a pin in a planar system creates 2 constraints on motion.You should recognize at this point that there are _0 differentialequations to solve_. Once you have calculated the kinematics based uponthe system constraints, you can plug in the values and solve for forceof the piston. So, start with the kinematic description of motion. $\mathbf{r}_2 =\mathbf{r}_{2/3} + \mathbf{r}_3$<jupyter_code>SVG(filename = './images/flywheel-constraints.svg')<jupyter_output><empty_output><jupyter_text>$r(\sin\theta\hat{i} - \cos\theta \hat{j}) =-L(\cos\theta_{L}\hat{i}-\sin\theta_L\hat{j}) + d\hat{i}$this description creates two independent equations1. $-r\sin\theta = -L\cos\theta_{L}+ d$2. $r\cos\theta = -L\sin\theta_L$The constraint on $\theta$ says that $\theta(t)=\frac{\alpha t^2}{2}$.You need to solve for $\theta_L$ and $d$ to determine the fullstate of the system. $\theta_L = \sin^{-1}\left(\frac{r}{L}\cos\theta\right)$$d = L\cos\theta_{L}-r\sin\theta$<jupyter_code>r = 0.2
L = 0.5
theta = np.linspace(0,2*np.pi,100)
thetaL = np.arcsin(r/L*np.cos(theta))
d = L*np.cos(thetaL)-r*np.sin(theta)
f, ax = plt.subplots()
ax.plot(theta*180/np.pi, thetaL*180/np.pi,'b-',label = r'\theta_L')
ax.set_xlabel(r'$\theta$ (degrees)')
ax.set_ylabel(r'$\theta_L$ (degrees)',color = 'blue')
plt.xticks(np.arange(0,360,30))
ax2 = ax.twinx()
ax2.plot(theta*180/np.pi, d, 'g--', label = 'piston d')
ax2.set_ylabel('d (meter)', color = 'green');
plt.show()<jupyter_output><empty_output><jupyter_text>--- Exercise:What is the angular velocity and angular acceleration of the link?$\dot{\theta}_L$ and $\ddot{\theta}_L$---Now, we have solved all of the kinematics we need tosolve for the applied piston force. Sometimes, you canlook at the Newton-Euler equations for the syatem as awhole, but here we need to separate each component andsum forces and moments. Flywheel:$\sum\mathbf{F}=\mathbf{0}$$\sum M_G = I \alpha$> __Note:__ If a body is moving, you either have to sum moments about a fixed point or its center of mass. Otherwise, the description of angular acceleration is more involved.Link:$\sum\mathbf{F}=\mathbf{0}$$\sum M = 0$> __Note:__ when links, cables, or pulleys are assumed to> be massless they still obey Newtonian mechanics, but> momentum is always zero. So the sum of forces or> moments is equal to 0.The three kinetic equations for the wheel are as such,1. $\sum \mathbf{F}\cdot\hat{i} = F_{2x}+F_{1x} = 0$2. $\sum \mathbf{F}\cdot\hat{j} = F_{2y}+F_{1y} = 0$3. $\sum M_{1} = r\hat{e}_r \times (F_{2x}\hat{i}+F_{2y}\hat{j}) = \frac{mr^2}{2}\alpha$and the three kinetic equations for the link are as such,1. $\sum \mathbf{F}\cdot\hat{i} = R-F_{2x} = 0$2. $\sum \mathbf{F}\cdot\hat{j} = -F_{2y} - F_{piston} = 0$3. $\sum M_{2} = L\hat{b}_1 \times (-F_{piston}\hat{i} + R\hat{j}) = 0$The third equation for the link is rearranged to solve for $R =F\tan\theta_L$. The third equation for the flywheel is rearranged tosolve for $F$ as such$rF\cos\theta -rF\tan\theta_L\sin\theta = \frac{mr^2}{2}\alpha$finally arriving at$F = \frac{mr\alpha}{2}\left(\cos\theta-\tan\theta_L\sin\theta\right)^{-1}$Plotted below as a function of flywheel angle, $\theta$,<jupyter_code>m = 0.1
F = m*r/2*(np.cos(theta)-np.tan(thetaL)*np.sin(theta))**(-1)
plt.plot(theta*180/np.pi, F)
plt.ylim(-0.1,0.1)
plt.xticks(np.arange(0,360,30))
plt.xlabel(r'$\theta$ (degrees)')
plt.ylabel('Piston Force');<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14755498612000853, 'fraction_numerical': 0.024343369634849454, 'mean_word_length': 4.825870646766169, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '34491', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 1716, 'n_tokens_neox': 1619, 'n_words': 526, 'path': 'module_02/driving-forces.ipynb', 'repo_name': 'UConn-Cooper/engineering-dynamics', 'size': '4683'}