Window mechanism

(C) 2004 - Roberto Lot

[Maple Metafile]      [Maple Plot]

 

> restart: mylib :="C:/libs": libname := mylib,libname: with(MBsymba):

Kinematic Model

points definition

> A := make_POINT(ground,0,0,0): show(A); frame pin joint

> B := make_POINT(ground,xB,yB,0): show(B);

> C := make_POINT(ground,xC,yC,0): show(C);

> E := make_POINT(ground, 0,yE,0): show(E); slider

> F := make_POINT(ground,xF,yF,0): show(F);

A = POINT(coords = matrix([[0], [0], [0], [1]]),fra...

B = POINT(coords = matrix([[xB], [yB], [0], [1]]),f...

C = POINT(coords = matrix([[xC], [yC], [0], [1]]),f...

E = POINT(coords = matrix([[0], [yE], [0], [1]]),fr...

F = POINT(coords = matrix([[xF], [yF], [0], [1]]),f...

variables set

> q := {xB,yB,xC,yC,yE,xF,yF}; nq := nops(q);

q := {xB, yB, xC, xF, yF, yE, yC}

nq := 7

Since the single-degree-of-freedom mechanism is described by means of 7 variables, 6 constraint equations must be written.

distance between A and C

> AC := make_VECTOR(A,C): phi[1] := dot_prod(AC,AC)-lAC^2;

phi[1] := xC^2+yC^2-lAC^2

AB is linearly dependent of AC

> AB := make_VECTOR(A,B):
AA := 1/lAB*AB-1/lAC*AC: show(AA);
phi[2] := simplify(lAC*lAB*Xcomp(AA));
phi[3] := simplify(lAC*lAB*Ycomp(AA));

AA = VECTOR(comps = matrix([[-1/lAC*xC+1/lAB*xB], [...

phi[2] := -xC*lAB+xB*lAC

phi[3] := -yC*lAB+yB*lAC

distance between E and F

> EF := make_VECTOR(E,F): phi[4] := dot_prod(EF,EF)-lEF^2;

phi[4] := xF^2+(-yE+yF)^2-lEF^2

distance between B and E

> BE := make_VECTOR(B,E): phi[5] := dot_prod(BE,BE)-lBE^2;

phi[5] := xB^2+(-yB+yE)^2-lBE^2

distance between C and F

> CF := make_VECTOR(C,F): phi[6] := dot_prod(CF,CF)-lCF^2;

phi[6] := (-xC+xF)^2+(-yC+yF)^2-lCF^2

assembly constraints

> constraints := convert(phi,list):

Numerical solution (Newton-Rapson algorithm)

mechanims characteristics

> geometric_data := lAB=0.30, lBE=0.40, lEF=0.08, lAC=0.40:

> geometric_data := geometric_data , subs(geometric_data, lCF = lAB+lBE+lEF-lAC);

geometric_data := lAB = .30, lBE = .40, lEF = .8e-1...

numerical equations

> eqns := convert(subs(geometric_data,constraints),set);

eqns := {xB^2+(-yB+yE)^2-.1600, xF^2+(-yE+yF)^2-.64...

definition of the independent variable and unknowns variables

> yE;
unks := q minus {%};

yE

unks := {xB, yB, xC, xF, yF, yC}

numerical solution

> np:=15: solz:=array[np]:
for i from 1 to np do
x := 0.69999-0.15*(i-1)/(np-1):
solz[i] := {yE=x} union fsolve(subs(yE=x,eqns),unks, {xF=0..1} )
end do:

tabbed results

> printf(" | xB yB | xC yC | xE yE | xF yF |");
for i from 1 to np do
printf("%2.0f | %+06.3f %+06.3f | %+06.3f %+06.3f | %+06.3f %+06.3f | %+06.3f %+06.3f |",
i ,op( subs(solz[i],geometric_data, [xB,yB,xC,yC,0,yE,xF,yF])));
writeline(default):
end do:

   |     xB      yB   |     xC      yC   |    xE     yE    |    xF     yF    |
 1 |  +0.002  +0.300  |  +0.002  +0.400  |  +0.000 +0.700  |  +0.001 +0.780  |
 2 |  +0.060  +0.294  |  +0.081  +0.392  |  +0.000 +0.689  |  +0.019 +0.767  |
 3 |  +0.085  +0.288  |  +0.113  +0.384  |  +0.000 +0.679  |  +0.027 +0.754  |
 4 |  +0.104  +0.282  |  +0.138  +0.375  |  +0.000 +0.668  |  +0.033 +0.741  |
 5 |  +0.119  +0.275  |  +0.159  +0.367  |  +0.000 +0.657  |  +0.038 +0.727  |
 6 |  +0.133  +0.269  |  +0.177  +0.359  |  +0.000 +0.646  |  +0.043 +0.714  |
 7 |  +0.145  +0.263  |  +0.193  +0.350  |  +0.000 +0.636  |  +0.046 +0.701  |
 8 |  +0.156  +0.256  |  +0.207  +0.342  |  +0.000 +0.625  |  +0.050 +0.688  |
 9 |  +0.166  +0.250  |  +0.221  +0.334  |  +0.000 +0.614  |  +0.053 +0.674  |
10 |  +0.175  +0.244  |  +0.233  +0.325  |  +0.000 +0.604  |  +0.056 +0.661  |
11 |  +0.183  +0.237  |  +0.245  +0.317  |  +0.000 +0.593  |  +0.058 +0.648  |
12 |  +0.191  +0.231  |  +0.255  +0.308  |  +0.000 +0.582  |  +0.061 +0.634  |
13 |  +0.199  +0.224  |  +0.265  +0.299  |  +0.000 +0.571  |  +0.063 +0.621  |
14 |  +0.206  +0.218  |  +0.275  +0.291  |  +0.000 +0.561  |  +0.065 +0.607  |
15 |  +0.213  +0.211  |  +0.284  +0.282  |  +0.000 +0.550  |  +0.067 +0.594  |

mechanism drawing

> with(plots): with(plottools):

> draw_mechanism := proc(q)
local revj_A,revj_B,revj_C,revj_E,revj_F, AC,BE,EF,slider,window:
revj_A := disk([ 0, 0], 0.02, color=yellow);
revj_B := disk(subs(q,[xB,yB]), 0.02, color=yellow);
revj_C := disk(subs(q,[xC,yC]), 0.02, color=yellow);
revj_E := disk(subs(q,[ 0,yE]), 0.02, color=yellow);
revj_F := disk(subs(q,[xF,yF]), 0.02, color=yellow);
AC := line( [ 0, 0] ,subs(q,[xC,yC]), color=red, thickness=5);
BE := line( subs(q,[xB,yB]),subs(q,[ 0,yE]), color=blue, thickness=5);
EF := line( subs(q,[ 0,yE]),subs(q,[xF,yF]), color=red, thickness=5);
slider := rectangle( subs(q,[-0.03, yE+0.05]), subs(q,[+0.03, yE-0.05]), color=grey ):
window := line( subs(q,[xF,yF]),subs(q,[xC+1.3*(xC-xF),yC+1.3*(yC-yF)]), color=black, thickness=5);

display( revj_A,revj_B,revj_C,revj_E,revj_F, AC,BE,EF,slider,window, scaling=constrained);
end:

Warning, the name changecoords has been redefined
Warning, the name arrow has been redefined
Warning, the previous bindings of the names project rotate, and translate have been removed and they now have an assigned value

display a single configuration

> draw_mechanism(solz[8]);

[Maple Plot]

animation

> display([seq(display(draw_mechanism(solz[i])),i=1..np)], insequence=true, scaling=constrained);

[Maple Plot]