Skip to content

Commit 8e2899c

Browse files
committed
first upload
0 parents  commit 8e2899c

31 files changed

+12215
-0
lines changed

DAE.mlx

61.2 KB
Binary file not shown.

DRS_DAE2.m

+563
Large diffs are not rendered by default.

DRS_DAE3.asv

+586
Large diffs are not rendered by default.

DRS_DAE3.m

+583
Large diffs are not rendered by default.

DRS_DAE4.m

+491
Large diffs are not rendered by default.

Pod_pull.mw

+1,213
Large diffs are not rendered by default.

Pods_n_rocker.mw

+1,026
Large diffs are not rendered by default.

lib/DRS-DRAWING.maplet

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
with(MBSymba_r6):
3+
4+
draw_mech := proc(sol::{list(`=`),set(`=`)}, data::{list(`=`),set(`=`)}, dof)
5+
6+
local p0,p1,p2,p3,p3b,p4,p5,rRj,g3,p_act;
7+
rRj := 0.002: # radius of joint symbols
8+
9+
p0 := evalf(subs(sol,data,dof, [comp_XYZ(P0, ground)])):
10+
p1 := evalf(subs(sol,data,dof, [comp_XYZ(P1, ground)])):
11+
p2 := evalf(subs(sol,data,dof, [comp_XYZ(P2, ground)])):
12+
p3 := evalf(subs(sol,data,dof, [comp_XYZ(P3, ground)])):
13+
p3b := evalf(subs(sol,data,dof, [comp_XYZ(P3b, ground)])):
14+
p4 := evalf(subs(sol,data,dof, [comp_XYZ(P4, ground)])):
15+
g3 := evalf(subs(sol,data,dof, [comp_XYZ(Gflap, ground)])):
16+
p5 := evalf(subs(sol,data,dof, [comp_XYZ(P5, ground)])):
17+
p_act := evalf(subs(sol,data,dof, [x1,y1])):
18+
19+
display( #plottools:-disk(p0[1..2],rRj,color="Yellow"),
20+
plottools:-disk(p1[1..2],rRj,color="Orange"),
21+
plottools:-disk(p2[1..2],rRj,color="Red"),
22+
plottools:-disk(p3[1..2],rRj,color="Violet"),
23+
plottools:-disk(p3b[1..2],rRj,color="Violet"),
24+
plottools:-disk(p4[1..2],rRj,color="Violet"),
25+
plottools:-disk(g3[1..2],rRj,color="Violet"),
26+
plottools:-disk(p5[1..2],rRj,color="Violet"),
27+
28+
#plottools:-line(p0[1..2],p1[1..2],thickness=1,color="orange"),
29+
plottools:-line(p1[1..2],p2[1..2],thickness=3,color="DodgerBlue"),
30+
plottools:-line(p2[1..2],p3[1..2],thickness=3,color="orange"),
31+
plottools:-line(p4[1..2],p5[1..2],thickness=3,color="Violet"),
32+
plottools:-line(p4[1..2],p3b[1..2],thickness=3,color="Violet"),
33+
plottools:-line(p_act[1..2],p1[1..2],thickness=5,color="Red"),
34+
plottools:-polygon([p4[1..2],p5[1..2],g3[1..2]],color="Violet"),
35+
36+
37+
scaling = constrained,size=[800,300]);
38+
39+
end proc:

lib/DRS-DRAWING.mw

+164
Large diffs are not rendered by default.

lib/dynamics/PLV.mw

+129
Large diffs are not rendered by default.

lib/kinematics/GLOBAL-APPROACH.maplet

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
2+
with(MBSymba_r6):
3+
with(LinearAlgebra):
4+
5+
# GLOBAL APPROACH
6+
P0 := origin(ground):
7+
P011 := make_POINT(ground,x1,y1,0):
8+
P40 := make_POINT(ground,x4,y4,0):
9+
10+
printf("\nReference frame 1"):
11+
RF1 := combine(translate(x0(t),y0(t),0).rotate('Z',theta0(t))):
12+
P01 := origin(%):
13+
Gact := make_POINT(RF1,(s(t)+L1)/2,0,0):
14+
P1 := make_POINT(RF1,s(t),0,0):
15+
P2 := make_POINT(RF1,s(t)+L1,0,0):
16+
print(RF1):
17+
18+
19+
20+
printf("\nReference frame 2"):
21+
RF2 := combine(translate(x2(t),y2(t),0).rotate('Z',theta1(t))):
22+
Gpod := origin(%):
23+
P22 := make_POINT(RF2,-LP/2,0,0):
24+
P3 := make_POINT(RF2, LP/2,0,0):
25+
print(RF2):
26+
27+
printf("\nReference frame 3"):
28+
RF3 := combine(translate(x3(t),y3(t),0).rotate('Z',theta3(t))):
29+
P4 := origin(%):
30+
P3b := make_POINT(RF3,anc,0,0):
31+
P5 := make_POINT(RF3,LF,0,0):
32+
Gflap := make_POINT(RF3.rotate('Z',psi),LFb,0,0):
33+
print(RF3):
34+
35+
# Constraint equations
36+
# Constraint equations : prismatic joint in P1
37+
join_points(P011,P01):
38+
Phi1 := map(simplify,[comp_X(%,ground),comp_Y(%,ground)]):
39+
40+
# Constraint equations : revolute joint in P2
41+
join_points(P2,P22):
42+
Phi2 := map(simplify,[comp_X(%,ground),comp_Y(%,ground)]):
43+
44+
# Constraint equations : revolute joint in P3
45+
join_points(P3,P3b):
46+
Phi3 := map(simplify,[comp_X(%,ground),comp_Y(%,ground)]):
47+
48+
# Constraint equations : revolute joint in P4
49+
join_points(P4,P40):
50+
Phi4 := map(simplify,[comp_X(%,ground),comp_Y(%,ground)]):
51+
52+
# Constraint equations: prismatic joint in RF1
53+
Phi5 := [dot_prod(uvec_Y(RF1),uvec_X(ground))]:
54+
55+
# Assembling the constraint equations
56+
printf("\nThe constraint equations are"):
57+
Phi := Phi1 union Phi2 union Phi3 union Phi4 union Phi5: print(<Phi>):
58+
59+
# Define the list of variables
60+
printf("\nKinematics variables"):
61+
q_vars := {theta0(t),theta1(t),theta3(t),s(t),x0(t),y0(t),x2(t),y2(t),x3(t),y3(t)}:
62+
print(%):
63+
# Check the DOFs of the system
64+
# Check jacobian of constraints for consistency
65+
printf("\nCheck the consistency of the system (Implict function theorem)"):
66+
combine(jacobianF(Phi, q_vars)); Dimensions(%);
67+
combine(GaussianElimination(%%)); Dimensions(%);
68+
69+
# the system is consistent so i can apply the general formula to compute the degree of freedom of a body
70+
;
71+
# Number of degree of freedom
72+
nq := nops(q_vars):
73+
nc := nops(Phi):
74+
75+
printf("\nThe DOFs of the system are"):
76+
n_dof = nq - nc;
77+
# Analytic solution
78+
q_I := {theta3(t)}:
79+
q_D := q_vars minus q_I;
80+
81+
printf("Analytic solution"):
82+
sol_kine_all := op(solve(Phi, convert(q_D,list), explicit=true)): <%>;
83+
84+
printf("Let's find the right configuration, evaluating the solutions for %a=%f",theta3(t),flap_closed):
85+
evalf(subs(data,param_not_opt, theta3(t)=flap_closed, sol_kine_all[1]));
86+
evalf(subs(data,param_not_opt, theta3(t)=flap_closed, sol_kine_all[2]));
87+
evalf(subs(data,param_not_opt, theta3(t)=flap_closed, sol_kine_all[3]));
88+
evalf(subs(data,param_not_opt, theta3(t)=flap_closed, sol_kine_all[4]));
89+
90+
sol_kine := sol_kine_all[1]:
91+
read("./lib/kinematics/OPTIMIZATION.maplet"):
92+
read("./lib/kinematics/PVAanalysis.maplet"):

0 commit comments

Comments
 (0)