Velocic
Velocic
160;
phi = 1.047; % input angle
xA = 0; yA = 0; rA = [xA yA 0];
xB = AB*cos(phi); yB = AB*sin(phi);
rB = [xB yB 0];
xC = 0;
%yC=sqrt(BC^2-xC^2);
yc=181.3;
% yC = xB+sqrt(BC^2-(yC-yB)^2);
rC = [xC yC 0];
omega1 = [0 0 104]; % (rad/s)
vA = [0 0 0 ]; % (m/s) % velocity of A
vB1 = vA + cross(omega1,rB); % velocity of B1
vB2 = vB1;
vB = norm(vB1); % norm() is the vector norm
fprintf('omega1 = [ %g, %g, %g ] (rad/s)\n', omega1)
fprintf('vB=vB1=vB2 = [ %g, %g, %g ] (m/s)\n', vB1)
fprintf('|vB|= %g (m/s)\n', vB)
omega2z = sym('omega2z','real');
vCy = sym('vCy','real');
omega2 = [ 0 0 omega2z ];
vC = [0 vCy 0 ];
eqvC = vC - (vB2 + cross(omega2,rC));
eqvCx = eqvC(1); % equation component on x-axis
eqvCy = eqvC(2); % equation component on y-axis
solvC = solve(eqvCx,eqvCy);
omega2zs = eval(solvC.omega2z);
vCys = eval(solvC.vCy);
Omega2 = [0 0 omega2zs];
VC = [0 vCys 0];
vCB = cross(Omega2,rC-rB);
qvCx = vpa(eqvCx,6);
fprintf('vC = [ %g, %g, %g ] (rad/s)\n',VC )
% fprintf('is: %s = 0 \n', char(qvCx))
% qvCy = vpa(eqvCy,6);
% fprintf('y-axis: %s = 0 \n', char(qvCy))