SetDirectory[NotebookDirectory[]]

Import["bacchetta.pdf"]

bacchetta=

Bacchetta su appoggi stretti con attrito. Q rotante

Blocco 1 di equazioni (NA negativa e NB positiva)

eq={
Q Sin[β]+ TB + TA - F Sin[α]==0,

Q Cos[β] +NB + NA + F Cos[α] == 0,

-NA a - NB (a+c) - Q Cos[β](a+b+c) + F Sin[α] y == 0,

TB == f  NB,

TA == -f  NA
}

soluzione=Solve[eq,{F,NA,NB,TA,TB}]//Simplify

FF1[α_,β_,a_,b_,c_,y_,f_,Q_]=F/.soluzione[[1]]

NNA1[α_,β_,a_,b_,c_,y_,f_,Q_]=NA/.soluzione[[1]]

NNB1[α_,β_,a_,b_,c_,y_,f_,Q_]=NB/.soluzione[[1]]

TTA1[α_,β_,a_,b_,c_,y_,f_,Q_]=TA/.soluzione[[1]]

TTB1[α_,β_,a_,b_,c_,y_,f_,Q_]=TB/.soluzione[[1]]

Blocco 2 di equazioni (NA e NB entrambe negative)

eq2={
Q Sin[β]+ TB + TA - F Sin[α]==0,

Q Cos[β] +NB + NA + F Cos[α] == 0,

-NA a - NB (a+c) - Q Cos[β](a+b+c) + F Sin[α] y == 0,

TB == -f  NB,

TA ==- f  NA
}

{TA+TB-F Sin[α]+Q Sin[β]==0,NA+NB+F Sin[α]+Q Cos[β]==0,-a NA-(a+c) NB+F y Cos[α]-(a+b+c) Q Cos[β]==0,TB==-f NB,TA==-f NA}

soluzione2=Solve[eq2,{F,NA,NB,TA,TB}]//Simplify

FF2[α_,β_,a_,b_,c_,y_,f_,Q_]=F/.soluzione2[[1]]

NNA2[α_,β_,a_,b_,c_,y_,f_,Q_]=NA/.soluzione2[[1]]

NNB2[α_,β_,a_,b_,c_,y_,f_,Q_]=NB/.soluzione2[[1]]

TTA2[α_,β_,a_,b_,c_,y_,f_,Q_]=TA/.soluzione2[[1]]

TTB2[α_,β_,a_,b_,c_,y_,f_,Q_]=TB/.soluzione2[[1]]

Blocco 3 di equazioni (NA positiva e NB negativa)

eq3={
Q Sin[β]+ TB + TA - F Sin[α]==0,

Q Cos[β] +NB + NA + F Cos[α] == 0,

-NA a - NB (a+c) - Q Cos[β](a+b+c)+ F Sin[α] y  == 0,

TB == -f NB,

TA == f  NA
}

{TA+TB-F Sin[α]+Q Sin[β]==0,NA+NB+F Sin[α]+Q Cos[β]==0,-a NA-(a+c) NB+F y Cos[α]-(a+b+c) Q Cos[β]==0,TB==-f NB,TA==f NA}

soluzione3=Solve[eq3,{F,NA,NB,TA,TB}]//Simplify

FF3[α_,β_,a_,b_,c_,y_,f_,Q_]=F/.soluzione3[[1]]

NNA3[α_,β_,a_,b_,c_,y_,f_,Q_]=NA/.soluzione3[[1]]

NNB3[α_,β_,a_,b_,c_,y_,f_,Q_]=NB/.soluzione3[[1]]

TTA3[α_,β_,a_,b_,c_,y_,f_,Q_]=TA/.soluzione3[[1]]

TTB3[α_,β_,a_,b_,c_,y_,f_,Q_]=TB/.soluzione3[[1]]

Blocco 4 di equazioni (NA e NB entrambe positive)

eq4={
Q Sin[β]+ TB + TA - F Sin[α]==0,

Q Cos[β] +NB + NA + F Cos[α] == 0,

-NA a - NB (a+c) - Q Cos[β](a+b+c) + F Sin[α] y == 0,

TB == f NB,

TA == f  NA
}

{TA+TB-F Sin[α]+Q Sin[β]==0,NA+NB+F Sin[α]+Q Cos[β]==0,-a NA-(a+c) NB+F y Cos[α]-(a+b+c) Q Cos[β]==0,TB==f NB,TA==f NA}

soluzione4=Solve[eq4,{F,NA,NB,TA,TB}]//Simplify

FF4[α_,β_,a_,b_,c_,y_,f_,Q_]=F/.soluzione4[[1]]

NNA4[α_,β_,a_,b_,c_,y_,f_,Q_]=NA/.soluzione4[[1]]

NNB4[α_,β_,a_,b_,c_,y_,f_,Q_]=NB/.soluzione4[[1]]

TTA4[α_,β_,a_,b_,c_,y_,f_,Q_]=TA/.soluzione4[[1]]

TTB4[α_,β_,a_,b_,c_,y_,f_,Q_]=TB/.soluzione4[[1]]

Forze effettive

TA (deve essere sempre positiva)

TAs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb},aa=TTA1[α ,β ,a,b,c,y,f ,Q];
bb=TTB1[α ,β ,a,b,c,y,f ,Q];
aa/;(aa>=0 &&bb>=0 )]

TAs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb},aa=TTA2[α ,β ,a,b,c,y,f ,Q];
bb=TTB2[α ,β ,a,b,c,y,f ,Q];
aa/;(aa>=0 &&bb>=0)]

TAs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb},aa=TTA3[α ,β ,a,b,c,y,f ,Q];
bb=TTB3[α ,β ,a,b,c,y,f ,Q];
aa/;(aa>=0 &&bb>=0)]

TAs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb},aa=TTA4[α ,β ,a,b,c,y,f ,Q];
bb=TTB4[α ,β ,a,b,c,y,f ,Q];
aa/;(aa>=0 &&bb>=0)]

TB (deve sempre essere positiva)

TBs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb},aa=TTA1[α ,β ,a,b,c,y,f ,Q];
bb=TTB1[α ,β ,a,b,c,y,f ,Q];
bb/;(aa>=0 &&bb>=0 )]

TBs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb},aa=TTA2[α ,β ,a,b,c,y,f ,Q];
bb=TTB2[α ,β ,a,b,c,y,f ,Q];
bb/;(aa>=0 &&bb>=0)]

TBs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb},aa=TTA3[α ,β ,a,b,c,y,f ,Q];
bb=TTB3[α ,β ,a,b,c,y,f ,Q];
bb/;(aa>=0 &&bb>=0)]

TBs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb},aa=TTA4[α ,β ,a,b,c,y,f ,Q];
bb=TTB4[α ,β ,a,b,c,y,f ,Q];
bb/;(aa>=0 &&bb>=0)]

NA (segno tale da rendere TA e TB entrambe positive)

NAs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb,cc},
aa=TTA1[α ,β ,a,b,c,y,f ,Q];
bb=TTB1[α ,β ,a,b,c,y,f ,Q];
cc=NNA1[α ,β ,a,b,c,y,f ,Q];
cc/;(aa>=0 &&bb>=0)]

NAs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb,cc},
aa=TTA2[α ,β ,a,b,c,y,f ,Q];
bb=TTB2[α ,β ,a,b,c,y,f ,Q];
cc=NNA2[α ,β ,a,b,c,y,f ,Q];
cc/;(aa>=0 &&bb>=0)]

NAs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb,cc},
aa=TTA3[α ,β ,a,b,c,y,f ,Q];
bb=TTB3[α ,β ,a,b,c,y,f ,Q];
cc=NNA3[α ,β ,a,b,c,y,f ,Q];
cc/;(aa>=0 &&bb>=0)]

NAs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb,cc},
aa=TTA4[α ,β ,a,b,c,y,f ,Q];
bb=TTB4[α ,β ,a,b,c,y,f ,Q];
cc=NNA4[α ,β ,a,b,c,y,f ,Q];
cc/;(aa>=0 &&bb>=0)]

NB (segno tale da rendere TA e TB entrambe positive)

NBs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb,cc},aa=TTA1[α ,β ,a,b,c,y,f ,Q];
bb=TTB1[α ,β ,a,b,c,y,f ,Q];
cc=NNB1[α ,β ,a,b,c,y,f ,Q];
cc/;(aa>=0 &&bb>=0)]

NBs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb,cc},aa=TTA2[α ,β ,a,b,c,y,f ,Q];
bb=TTB2[α ,β ,a,b,c,y,f ,Q];
cc=NNB2[α ,β ,a,b,c,y,f ,Q];
cc/;(aa>=0 &&bb>=0)]

NBs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb,cc},aa=TTA3[α ,β ,a,b,c,y,f ,Q];
bb=TTB3[α ,β ,a,b,c,y,f ,Q];
cc=NNB3[α ,β ,a,b,c,y,f ,Q];
cc/;(aa>=0 &&bb>=0)]

NBs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb,cc},aa=TTA4[α ,β ,a,b,c,y,f ,Q];
bb=TTB4[α ,β ,a,b,c,y,f ,Q];
cc=NNB4[α ,β ,a,b,c,y,f ,Q];
cc/;(aa>=0 &&bb>=0)]

forza motrice F (segno tale da rendere TA e TB entrambe positive)

FFs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb,cc},aa=TTA1[α ,β ,a,b,c,y,f ,Q];
bb=TTB1[α ,β ,a,b,c,y,f ,Q];
cc=FF1[α ,β ,a,b,c,y,f ,Q];
cc/;(aa≥ 0 &&bb≥ 0)]

FFs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb,cc},aa=TTA2[α ,β ,a,b,c,y,f ,Q];
bb=TTB2[α ,β ,a,b,c,y,f ,Q];
cc=FF2[α ,β ,a,b,c,y,f ,Q];
cc/;(aa≥ 0 &&bb≥ 0)]

FFs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb,cc},aa=TTA3[α ,β ,a,b,c,y,f ,Q];
bb=TTB3[α ,β ,a,b,c,y,f ,Q];
cc=FF3[α ,β ,a,b,c,y,f ,Q];
cc/;(aa≥ 0 &&bb≥ 0)]

FFs[α_,β_,a_,b_,c_,y_,f_,Q_]:=Module[{aa,bb,cc},aa=TTA4[α ,β ,a,b,c,y,f ,Q];
bb=TTB4[α ,β ,a,b,c,y,f ,Q];
cc=FF4[α ,β ,a,b,c,y,f ,Q];
cc/;(aa≥ 0 &&bb≥ 0)]

Resa grafica

Manipulate[Module[{a,b,β,y,s,e},(
y=0;
β=-ω *t+90.001;
s = V t;
e=5;
b= e+s;
a= e-s;
xpolig=12*range;
ypolig=12*range;

Row[{
Show[bacchetta,ImageSize->300],

fig=Show[Graphics[{
Thickness[0.021],Gray,Opacity[0.755],
Line[{{0,0},{6+4+c,0}}],
Line[{{a+b+c,0},{a+b+c,y}}],
Thin,Opacity[1],
Brown,
Line[{{b,0},{b+3c TBs[α Degree,β Degree,a,b,c,y,f,QQ]/NBs[α Degree,β Degree,a,b,c,y,f,QQ],3c }}],
Line[{{b,0},{b-3c TBs[α Degree,β Degree,a,b,c,y,f,QQ]/NBs[α Degree,β Degree,a,b,c,y,f,QQ],-3c }}],
Line[{{b+c,0},{b+c+3c TAs[α Degree,β Degree,a,b,c,y,f,QQ]/NAs[α Degree,β Degree,a,b,c,y,f,QQ],3c }}],
Line[{{b+c,0},{b+c-3c TAs[α Degree,β Degree,a,b,c,y,f,QQ]/NAs[α Degree,β Degree,a,b,c,y,f,QQ],-3c }}],
Line[{{a+b+c,y},{a+b+c-3c Tan[α Degree],3c+y }}],
Line[{{a+b+c,y},{a+b+c+3c Tan[α Degree],-3c +y}}],
Line[{{0,0},{3c Tan[β Degree],3c}}],
Line[{{0,0},{-3c Tan[β Degree],-3c}}],

Thickness[0.00452],Arrowheads[0.0324],

Red,
Arrow[{{b+c,0},
{b+c+
TAs[α Degree,β Degree,a,b,c,y,f,QQ],
0+
NAs[α Degree,β Degree,a,b,c,y,f,QQ]}
}],

Blue,
Arrow[{{b,0},
{b+TBs[α Degree,β Degree,a,b,c,y,f,QQ],
0+
NBs[α Degree,β Degree,a,b,c,y,f,QQ]}
}],

Black,
Arrow[{{a+b+c+Sin[α Degree]*FFs[α Degree,β Degree,a,b,c,y,f,QQ],-Cos[α Degree]*FFs[α Degree,β Degree,a,b,c,y,f,QQ]+y},{a+b+c,y}}],
(*Red,
Arrow[{{b+c,0},{b+c,NAs[α Degree,β Degree,a,b,c,y,f,QQ]}}],
Arrow[{{b+c,0},{b+c+TAs[α Degree,β Degree,a,b,c,y,f,QQ],0}}],
Blue,
Arrow[{{b,0},{b,NBs[α Degree,β Degree,a,b,c,y,f,QQ]}}],
Arrow[{{b,0},{b+TBs[α Degree,β Degree,a,b,c,y,f,QQ],0}}],*)
Darker[Darker[Green]],(*Orange,*)
Arrow[{-{QQ*Sin[β Degree],QQ*Cos[β Degree]},{0,0}}],

Opacity[op],


Arrow[{{xpolig,ypolig}-{QQ*Sin[β Degree],QQ*Cos[β Degree]},{xpolig,ypolig}}]

(*Arrow[{
{xpolig+
TBs[α Degree,β Degree,a,b,c,y,f,QQ]+
TAs[α Degree,β Degree,a,b,c,y,f,QQ]+
-Sin[α Degree]*FFs[α Degree,β Degree,a,b,c,y,f,QQ],

ypolig+
NBs[α Degree,β Degree,a,b,c,y,f,QQ]+
NAs[α Degree,β Degree,a,b,c,y,f,QQ]+
+Cos[α Degree]*FFs[α Degree,β Degree,a,b,c,y,f,QQ]},
{xpolig,ypolig}
}]*),


Red,
Arrow[{{xpolig,ypolig},
{xpolig+
TAs[α Degree,β Degree,a,b,c,y,f,QQ],
ypolig+
NAs[α Degree,β Degree,a,b,c,y,f,QQ]}
}],

Blue,
Arrow[{{xpolig+
TAs[α Degree,β Degree,a,b,c,y,f,QQ],
ypolig+
NAs[α Degree,β Degree,a,b,c,y,f,QQ]},
{xpolig+TAs[α Degree,β Degree,a,b,c,y,f,QQ]+TBs[α Degree,β Degree,a,b,c,y,f,QQ],
ypolig+
NAs[α Degree,β Degree,a,b,c,y,f,QQ]+NBs[α Degree,β Degree,a,b,c,y,f,QQ]}
}],

Black,
Arrow[{
{xpolig+TAs[α Degree,β Degree,a,b,c,y,f,QQ]+TBs[α Degree,β Degree,a,b,c,y,f,QQ],
ypolig+
NAs[α Degree,β Degree,a,b,c,y,f,QQ]+NBs[α Degree,β Degree,a,b,c,y,f,QQ]
},

{xpolig+TAs[α Degree,β Degree,a,b,c,y,f,QQ]+TBs[α Degree,β Degree,a,b,c,y,f,QQ]
-Sin[α Degree]*FFs[α Degree,β Degree,a,b,c,y,f,QQ],
ypolig+
NAs[α Degree,β Degree,a,b,c,y,f,QQ]+NBs[α Degree,β Degree,a,b,c,y,f,QQ]
+Cos[α Degree]*FFs[α Degree,β Degree,a,b,c,y,f,QQ]}
}]

}],PlotRange->range{{-5,20},{-10,20}},
AspectRatio->Automatic,
Axes->None,
ImageSize->500,
PlotLabel->"   rotating load in a translating rod with friction (M. Guiggiani - 21/5/2021 - All rights reserved)"
]
}]
)]
,
{{c,4},0.1,10,Appearance->"Labeled"},
{{α,60},0,180,Appearance->"Labeled"},
{{ω,10},0,100,Appearance->"Open"},
{{V,0.2},0,0.5,Appearance->"Open"},
{{f,0.2},0,1,Appearance->"Open"},
{{QQ,4},0,6,Appearance->"Open"},
{{range,1.2},0.2,4},
{{op,1},{1,0}},
{{t,0.1},0,25,Appearance->"Open",AnimationRate->1},

ControlPlacement->Right,
SaveDefinitions->True
]