Lecture23

advertisement
Lecture 23
Given N bodies you can write 2N or (3N in 3D) force/motion equations.
A non-holonomic constraint is one that cannot be written as a position equation. Only as a velocity. The position of
a non-holonomic system can only be found if you integrate velocity, it depends on the HISTORY of where it has
been. It is very strange.
10.3 #2
> restart;
> with(linalg):
> i := vector([1,0,0]): j:=vector([0,1,0]): k:= vector([0,0,1]):
> dot := (VectorOne,VectorTwo) -> dotprod(VectorOne,VectorTwo,'orthogonal'):
> cross := (a,b) -> crossprod(a,b):
> Ve := (VectorEquation,VectorDirection) -> dot(lhs(VectorEquation),VectorDirection) =
dot(rhs(VectorEquation),VectorDirection):
Warning, new definition for norm
Warning, new definition for trace
Draw fbds and sum forces and moments. I am going to use the fact that the angle between
bc and the ground is theta.
>
forceab := Ay*j+Ax*i -m*g*j + Bx*i+By*j;
>
forcebc := C*j -Bx*i-By*j;
compute the moment on AB at point A.
> momabAtA := -m*g*L/2*cos(theta)+ By*L*cos(theta) -Bx*L*sin(theta);
>
mombc := C*L/2*cos(theta) + Bx*L/2*sin(theta) +By*L/2*cos(theta);
find accelerations
> accelab := thetaddot*L/2*p1-thetadot^2*L/2*n1;
>
accelbc := xddot*i + thetaddot*L/2*p2 - thetadot^2*L/2*n2;
find moment of inertias.
> inerab := 1/3*m*L^2; inerbc := 1/12*m*L^2;
Now f = ma
> e1 := forceab = m*accelab;
>
e2 := forcebc = m*accelbc;
Now moment = d/dt(H) = I alpha in this case.
> e3 := momabAtA = inerab*thetaddot;
>
e4 := mombc = -inerbc*thetaddot;
I have two motions, should only have one. need a loop OR in this simple case...
> constraint := x = 2*L*cos(theta);
>
diff(2*L*cos(theta(t)),t,t);
>
cddot := xddot = -2*L*cos(theta)*thetadot^2 - 2*L*sin(theta)*thetaddot;
Now put in the i and j of the n and p.
> n1 := cos(theta)*i+sin(theta)*j; p1 := cross(k,n1);
>
n2 := -cos(theta)*i + sin(theta)*j; p2 := cross(k,-n2);
Gather up all the equations.
> eqs := {Ve(e1,n1), Ve(e1,p1), Ve(e2,n2), Ve(e2,p2), e3, e4, cddot};
solve the equations for forces and double dots.
> ans := simplify(solve(eqs,{Ax, Ay, Bx, By, C, thetaddot, xddot}));
Notice that thetaddot is a differential equation that can be solved. If you did, you would
have theta and thetadot at all time. You could then use these values in all the other
expressions to find them for all time.
Put in some numbers for RIGHT NOW.
> num := {g = 9.81, m = 1, L = .1, theta = 60*Pi/180, thetadot = 0};
>
evalf(subs(num,ans));
Notice that thetaddot is negative, ok, A is right and up, B is left and up, C is up and xddot is
right.
>
10.1 #10
> restart;
> with(linalg):
> i := vector([1,0,0]): j:=vector([0,1,0]): k:= vector([0,0,1]):
> dot := (VectorOne,VectorTwo) -> dotprod(VectorOne,VectorTwo,'orthogonal'):
> cross := (a,b) -> crossprod(a,b):
> Ve := (VectorEquation,VectorDirection) -> dot(lhs(VectorEquation),VectorDirection) =
dot(rhs(VectorEquation),VectorDirection):
Warning, new definition for norm
Warning, new definition for trace
Pick some numbers to use.
> num := {g=9.81, R = 1, r = .5, mus=.2, muk=.1, m=1, gyration = .75};
Now for the problem.
> n1 := cos(theta)*i+sin(theta)*j: p1 := -sin(theta)*i+cos(theta)*j:
Draw fbds and sum forces and moments. When slipping each has 1 dof.
For the left object, it rolls at Q, friction points up.
> force := T*n1 - m*g*j + N*p1 +f*n1;
I'll do both objects at the same time so you can compare the equations as its done. I'll put
an R on the end to indicate the Right diagram. I will only give the things that change.
> forceR := T*n1 -m*g*j + N*p1 -f*n1;
>
moment := -T*r + f*R; momentR := +T*r - f*R;
>
accel := -xddot * n1;
>
e1 := force = m*accel; e1R := forceR = m*accel;
>
e2 := moment = m*gyration^2*betaddot; e2R := momentR = m*gyration^2*betaddot;
First assume sticks and determine f to find where it lets go. Since it sticks, ddots are zero.
> stickeqs := simplify(subs({xddot=0,betaddot=0},{Ve(e1,n1), Ve(e1,p1), e2}));
subs(num,%);
>
stickeqsR := simplify(subs({xddot=0,betaddot=0},{Ve(e1R,n1), Ve(e1R,p1), e2R}));
subs(num,%);
>
stickans := solve(stickeqs,{T,N,f}); subs(num,%);
>
stickansR := solve(stickeqsR,{T,N,f}); subs(num,%);
>
subs(stickans,f=mus*N); theta[slip] := solve(%,theta); evalf(subs(num,%)*180/Pi);
>
subs(stickansR,f=mus*N); theta[Rslip] := solve(%,theta); evalf(subs(num,%)*180/Pi);
Now assume theta = theta[slip] so it will slip. also note that f > 0 in the above so we have the
correct direction. f = mu*N
> f := muk*N;
Count the unknowns, T, N, xddot, betaddot. Should only have one ddot, need a relation. Q
is temporary contact no slip with string so...
> posQ := -x*n1 -r*p1 + r*n;
>
accelQ := -xddot*n1 + betaddot*r*p - betadot^2*r*n;
At contact this is true...
> n := p1: p := -n1:
> constraint := simplify(dot(accelQ,n1) = 0);
For the right one this is true...
> n := -p1: p := n1:
> constraintR := simplify(dot(accelQ,n1) = 0);
Now solve...
> eqs := {Ve(e1,n1), Ve(e1,p1), e2, constraint}; evalf(subs(num,%));
>
eqsR := {Ve(e1R,n1), Ve(e1R,p1), e2R, constraintR}; evalf(subs(num,%));
>
ans := solve(eqs,{xddot, betaddot, T, N}); subs(num,ans);
>
ansR := solve(eqsR,{xddot, betaddot, T, N}); subs(num,ans);
>
xddotans := simplify(subs(theta=theta[slip],subs(ans,xddot))); subs(num,%);
>
xddotansR := simplify(subs(theta=theta[Rslip],subs(ansR,xddot))); subs(num,%);
>
solve(subs(num,3 = 1/2*xddotans*t^2),t);
>
solve(subs(num,3 = 1/2*xddotansR*t^2),t);
>
Download