ISEN-Brest. Kany. TD: Mouvement d’une balle de tennis
In[12]:= g=9.81;v0=30;theta=18 Degree; x=.;y=.;z=.;t=.;tmax=2;
ax=0; vx0=N[v0*Cos[theta]];x0=0.; az=-g;vz0=N[v0*Sin[theta]];z0=0.;
NDSolve[{x’’[t]==ax,x’[0]==vx0,x[0]==x0, z’’[t]==az,z’[0]==vz0,z[0]==z0},{x[t],z[t]},
{t,0,tmax}]; Xvide=x[t]/.%[[1]][[1]]; Zvide=z[t]/.%%[[1]][[2]];
In[19]:= g=9.81;v0=30;theta=18 Degree; x=.;y=.;z=.;t=.;tmax=2;
Cx=0.3;m=N[55 10^-3];d=N[78 10^-3];T=293;M=N[29 10^-3];P=10^5;
R=8.31;mu=P M /(R T); S=N[Pi d^2/4]; k=Cx mu S;
ax=-k Sqrt[x’[t]^2+z’[t]^2] x’[t]/m;vx0=N[v0*Cos[theta]];x0=0.;
az=-g-k Sqrt[x’[t]^2+z’[t]^2] z’[t]/m;vz0=N[v0*Sin[theta]];z0=0.;
NDSolve[{x’’[t]==ax,x’[0]==vx0,x[0]==x0, z’’[t]==az,z’[0]==vz0,z[0]==z0},{x[t],z[t]},
{t,0,tmax}]; X=x[t]/.%[[1]][[1]]; Z=z[t]/.%%[[1]][[2]];
In[28]:= ParametricPlot[{{X,Z},{Xvide,Zvide}},{t,0,tmax}]
Out[28]=
dans le vide
dans l’air distance [m]
altitude [m]
Port´ee maximale
In[29]:=g=9.81;v0=30; theta=.;PorteeVide=.;PorteeVide[theta ]=.;
PorteeVide[theta ]:=( x=.;y=.;z=.;t=.;tmax=200;tmp=.;
ax=0; vx0=N[v0*Cos[theta]];x0=0.; az=-g;vz0=N[v0*Sin[theta]];z0=0.;
tmp=NDSolve[{x’’[t]==ax,x’[0]==vx0,x[0]==x0, z’’[t]==az,z’[0]==vz0,z[0]==z0},
{x[t],z[t]},{t,0,tmax}]; Xvide=x[t]/.tmp[[1]][[1]]; Zvide=z[t]/.tmp[[1]][[2]];
tmp=FindRoot[Zvide==0,{t,tmax}]; Xvide/.tmp)
In[32]:=g=9.81;v0=30; Cx=0.3;m=N[55 10^-3];d=N[78 10^-3];T=293;M=N[29 10^-3];P=10^5;
R=8.31;mu=P M /(R T); S=N[Pi d^2/4]; k=Cx mu S;
theta=.;Portee=.;Portee[theta ]=.;
Portee[theta ]:=( x=.;y=.;z=.;t=.;tmax=200;tmp=.;
ax=-k Sqrt[x’[t]^2+z’[t]^2] x’[t]/m;vx0=N[v0*Cos[theta]];x0=0.;
az=-g-k Sqrt[x’[t]^2+z’[t]^2] z’[t]/m;vz0=N[v0*Sin[theta]];z0=0.;
tmp=NDSolve[{x’’[t]==ax,x’[0]==vx0,x[0]==x0, z’’[t]==az,z’[0]==vz0,z[0]==z0},
{x[t],z[t]},{t,0,tmax}]; X=x[t]/.tmp[[1]][[1]]; Z=z[t]/.tmp[[1]][[2]];
tmp=FindRoot[Z==0,{t,tmax}]; X/.tmp)
In[37]:= Plot[{PorteeVide[theta Degree],Portee[theta Degree]},{theta,1,60}]
2