Professional Documents
Culture Documents
Out[121]=
In[122]:= Funciones
Out[122]= Funciones
In[126]:=
Out[128]= {1, 2}
In[129]:= Datos
Out[129]= Datos
2 Analisis de mecanismos 1.nb
In[141]:= Clear[θ2, θ3, θ4, ω2, ω3, ω4, α2, α3, α4];
borra
(*Posicion*)
r2 = {x2, 0, 0};
r3 = {x3, 0, 0};
r4 = {x4, 0, 0};
R2 = Rz[θ2].r2;
R3 = Rz[θ3].r3;
R4 = Rz[θ4].r4;
R1 = {- x1, y1, 0};
(*Velocidad*)
omega2 = {0, 0, ω2};
omega3 = {0, 0, ω3};
omega4 = {0, 0, ω4};
V2 = omega2 ⨯ R2;
V3 = omega3 ⨯ R3;
V4 = omega4 ⨯ R4;
V1 = {0, 0, 0};
(*Aceleracion*)
Pos // MatrixForm
forma de matriz
Vel // MatrixForm
forma de matriz
Acel // MatrixForm
forma de matriz
4 Analisis de mecanismos 1.nb
Out[166]//MatrixForm=
- 0.26 + 0.04 Cos[θ2] + 0.28 Cos[θ3] - 0.4 Cos[θ4]
0.04 + 0.04 Sin[θ2] + 0.28 Sin[θ3] - 0.4 Sin[θ4]
0.
Out[167]//MatrixForm=
0. - 0.04 ω2 Sin[θ2] - 0.28 ω3 Sin[θ3] + 0.4 ω4 Sin[θ4]
0. + 0.04 ω2 Cos[θ2] + 0.28 ω3 Cos[θ3] - 0.4 ω4 Cos[θ4]
0.
Out[168]//MatrixForm=
0. - 0.04 ω22 Cos[θ2] - 0.28 ω32 Cos[θ3] + 0.4 ω42 Cos[θ4] - 0.04 α2 Sin[θ2] - 0.28 α3 Sin[θ
0. + 0.04 α2 Cos[θ2] + 0.28 α3 Cos[θ3] - 0.4 α4 Cos[θ4] - 0.04 ω22 Sin[θ2] - 0.28 ω32 Sin[θ3
0.
In[171]:=
Out[174]= 94.3121
Out[175]= 127.059
In[176]:=
In[178]:= Clear[θ2, θ3, θ4, ω2, ω3, ω4, α2, α3, α4];
borra
θ3i = θ3 /. PosInicial;
θ4i = θ4 /. PosInicial;
For[i = 0, i ≤ 360, i += 1,
para cada
θ2 = i * Degree;
grado
SolPos[i] = FindRoot[{Pos[[1]] == 0, Pos[[2]] ⩵ 0},
encuentra raíz
{θ3, θ3i}, {θ4, θ4i}, MaxIterations → 15];
máximo de iteraciones
θ3i = θ3 /. SolPos[i];
θ4i = θ4 /. SolPos[i];
];
θ3 /. SolPos[90]
θ4 /. SolPos[90]
Out[182]= 1.32221
Out[183]= 2.06892
In[184]:=
In[186]:=
100
95
90
θ3
Out[189]=
85
80
75
135
130
θ4
Out[190]=
125
120
In[193]:= Clear[θ2, θ3, θ4, ω2, ω3, ω4, α2, α3, α4];
borra
ω2 = 2 π 1;(*1 rev 1 seg*)
For[i = 0, i ≤ 360, i += 1,
para cada
θ2 = i * Degree ;
grado
SolVel[i] =
Solve[{Vel[[1]] ⩵ 0, Vel[[2]] ⩵ 0} /. SolPos[i], {ω3, ω4}] // Flatten;
resuelve aplana
];
SolVel[40]
1.0
ω4
0.5
0.0
ω
Out[202]=
ω3
-0.5
-1.0
-1.5
In[205]:= Clear[θ2, θ3, θ4, ω2, ω3, ω4, α2, α3, α4];
borra
ω2 = 2 π 1;(*1 rev 1 seg*)
α2 = 0;(*Porque la velocidad es constante = 0 rad/s al cuadrado*)
For[i = 0, i ≤ 360, i += 1,
para cada
θ2 = i * Degree ;
grado
SolAcel[i] =
Solve[{Acel[[1]] ⩵ 0, Acel[[2]] ⩵ 0} /. SolPos[i] /. SolVel[i], {α3, α4}] //
resuelve
Flatten;
aplana
];
SolAcel[300]
5 α3
0 α4
α
Out[215]=
-5
-10
In[216]:= Trayectoria
Out[216]= Trayectoria
12 Analisis de mecanismos 1.nb
RR1 = T2D[R1];
RR2 = T2D[R2];
RR3 = T2D[R3];
RR3p = T2D[R3P];
RR3pp = T2D[R3pp];
RR4 = T2D[R4];
RR4p = T2D[R4p]
0.34
0.32
Out[235]=
0.30
0.28
0.288
0.287
0.286
Out[236]=
0.285
0.284
In[237]:= Animacion
Out[237]= Animacion
14 Analisis de mecanismos 1.nb
In[238]:= Animate[
anima
θ2 = i * Degree;
grado
cero = {0, 0};
linea2 = Line[{cero, RR2}];
línea
linea3 = Line[{RR2, RR2 + RR3}] /. SolPos[i];
línea
linea3p = Line[{RR2 + RR3, RR2 + RR3 + RR3p}] /. SolPos[i];
línea
linea3pp = Line[{RR2 + RR3 + RR3p, RR2 + RR3 + RR3p - RR3pp}] /. SolPos[i];
línea
linea4 = Line[{RR2 + RR3, - RR1}] /. SolPos[i];
línea
linea4p = Line[{- RR1, - RR1 + RR4p}] /. SolPos[i];
línea
punto1 = Point[cero];
punto
punto2 = Point[RR2];
punto
punto3 = Point[RR2 + RR3] /. SolPos[i];
punto
punto4 = Point[- RR1];
punto
(*Se definen los colores de las barras*)
barra2 = Graphics[{Thickness[0.03], RGBColor[0, 1, 0], linea2}];
gráfico grosor color RGB
barra3 = Graphics[{Thickness[0.03], RGBColor[0, 0, 1], linea3}];
gráfico grosor color RGB
barra3p = Graphics[{Thickness[0.03], RGBColor[0, 0, 1], linea3p}];
gráfico grosor color RGB
barra3pp = Graphics[{Thickness[0.03], RGBColor[0, 0, 1], linea3pp}];
gráfico grosor color RGB
barra4 = Graphics[{Thickness[0.03], RGBColor[1, 0, 0], linea4}];
gráfico grosor color RGB
barra4p = Graphics[{Thickness[0.03], RGBColor[1, 0, 0], linea4p}];
gráfico grosor color RGB
0.5
0.4
0.3
Out[238]=
0.2
0.1
16 Analisis de mecanismos 1.nb
0.0
-0.1
-0.1 0.0 0.1 0.2
In[239]:=
In[240]:=