Professional Documents
Culture Documents
=
I
1
. n - (-cI
1
. n )
Jt
n
F
]
= . |F
n
| t
= -|F
]
|. R z
And the accelerations in this step are being defined as:
XF
x
= m. x, XF
y
= m. y , XH = I. o
Where n is the normal unit vector to the contact surface and c is coefficient of restitution the
surface. I
And Jt are the velocity vector and the time step of simulation respectively. At last all
the forces on the x and y direction are divided by the mass of the ball to return the acceleration.
GraficFunction.m:
Role of this function is to change the handles of the plots in the animation window. The ball
linear and angular positions are the inputs of the function and all the points of the ball surface
and its center lines are calculated based on the ball linear and angular position. When the handles
are changed the ball new plots will replace the old ones.
Next figure shows the animation window in the middle of simulation before(left) and after
contact(right).
Left: before contact, right: after contact
Simulation and animation of a falling rod on a flat surface:
For this case the same set of files are being used. In the main file the difference is plotting a line
instead of the ball and a flat surface instead of the sine wave surface. The animation window at
the end of the main code for theta0=pi/3 looks like the next figure.
The developed simulink model for this case is shown in the next figure.
The inputs of the RCalc.m function are x,dx,y,dy,th,dth as shown in the simulink file. To detect
happening of contact and defining that on which end of the rod contact happens x,y,th are being
used. The other parameters are being used to calculate the accelerations. For the following
problem (Next figure) when contact happens we have the following relationships [1].
Where P
n
, , c are the normal force friction and restitution coefficient respectively. I
n
, I
t
and
are the normal velocity tangential velocity and angular velocity after contact and :
n
, :
t
and are
the normal velocity tangential velocity and angular velocity before contact. By rearranging the
above equation in the matrix form we have.
|
-1 m u u
- u m u
-J
n
+ J
t
u u I
u 1 u -J
t
|
p
n
I
n
I
t
0
} =
mv
n
mv
t
I
-c(v
n
- J
t
)
And the variables after contact can be found in the next equations.
p
n
I
n
I
t
0
} = |
-1 m u u
- u m u
-J
n
+ J
t
u u I
u 1 u -J
t
|
-1
mv
n
mv
t
I
-c(v
n
- J
t
)
The accelerations in the contact step can be found as.
o
x
=
I
n
- v
n
Jt
, o
y
=
I
t
- v
t
Jt
, 0
=
0 -
Jt
Again the outputs to the graphic function x,y, th are being re plotted by getting the handle of
these plots.
Simulations of the described equations were done for different cases. In the next figures the
frame before contact and after contact is shown.
Left: before contact, right: after contact
References:
[1]- HuaShan,JianzhongSu,FlorinBadiu,JiansenZhuandLeonXu," Multiple Impact Dynamics of a
Falling Rod and Its Numerical Solution",2006,257269,Bookchapter,SpringerLink