Monday 16 November 2015

Calculate Linear Velocity and Angular Velocity After Collision, in SceneKit



Here is an attached scheme which i want to write my own custom wall reflection method to simulate the ball collision having right (or left, or top/back) spin. Scheme


As an example, i have created wall node and ball node having left spin, in sceneKit to get linear Velocity and Angular Velocity values from its simulation. As it is seen that after ball collides to wall, there is a loss on Angular Velocity, and this loss is transferred as increase the x value of the linear velocity. (based on spin effect)


In my custom simulation, after Ball hit to wall, how can i calculate the accurate angular velocity (especially the amount of loss) and based on this, i want to decide the proper linear velocity, to provide accurate angle to the ball after hitting to wall (caused by the spin).



Or, if any other approach, i would greatly appreciate. Finally, this approach should work fine in left/right spin, top/backspin of the ball.


Thanks for your support…



Answer



Inevitably, for a physically accurate representation of this kind of collision, there will be some vector equations. I'm going to have to assume that you know a bit of mechanics.


Firstly, the spherical ball is characterized by three parameters: its radius $R$, its mass $m$, and its moment of inertia $I$. You have some choice here depending on how you imagine the mass is distributed in the sphere:



  • Concentrated in a thin spherical shell on the outer surface: $I=2mR^2/3$

  • Uniformly distributed throughout the sphere: $I=2mR^2/5$

  • Concentrated near the centre: $I=$ as small as you like, down to zero (although that limit would be somewhat unphysical).



This choice will affect the amount of change in angular momentum that is generated by the collision. It is convenient to define a loading factor $\kappa=I/mR^2$ which will appear in the following equations: from the above values of $I$, you could choose any positive value $\kappa\leq 2/3$ to represent a physically realistic scenario.


Next, the effect of the wall will be to exert an impulsive (i.e. instantaneous) force on the sphere at the point of contact. Let the impulse be $\mathbf{C}$. If the velocity of the centre of the sphere is $\mathbf{v}$ before the collision, and $\mathbf{v}'$ afterwards, and its angular velocity about its centre is $\boldsymbol{\omega}$ before, and $\boldsymbol{\omega}'$ afterwards, then $$ m\mathbf{v}' = m\mathbf{v} + \mathbf{C} \qquad I\boldsymbol{\omega}' = I\boldsymbol{\omega} - R\mathbf{n}\times\mathbf{C} $$ where $\mathbf{n}$ is a unit vector normal to the wall, pointing towards the centre of the sphere, and $\times$ means vector product (cross product). These equations express the fact that the impulse changes the linear momentum and the angular momentum of the sphere in a consistent way.


The impulse $\mathbf{C}$ may be worked out, if we know the velocity of the point on the surface of the sphere at the moment of contact. This is given by $$ \mathbf{g}=\mathbf{v}-R\boldsymbol{\omega}\times\mathbf{n}, $$ and we need to resolve this into a component parallel to $\mathbf{n}$ and a perpendicular component $$ \mathbf{g}_{\parallel} = (\mathbf{g}\cdot\mathbf{n})\mathbf{n}, \qquad \mathbf{g}_{\perp}= \mathbf{g} - \mathbf{g}_{\parallel} $$ Finally, we can write $\mathbf{C}=\mathbf{C}_{\parallel}+\mathbf{C}_{\perp}$ where $$ \mathbf{C}_{\parallel} = -2m \mathbf{g}_{\parallel}, \qquad \mathbf{C}_{\perp} = -2m \frac{\kappa}{\kappa+1} \mathbf{g}_{\perp} $$ I haven't given all the details of where these two equations come from. Basically, they conserve the kinetic energy of the sphere, and they reverse the velocity of the point of contact, which is the so-called rough collision condition. (An alternative is the smooth collision condition, which has the same $\mathbf{C}_{\parallel}$, but $\mathbf{C}_{\perp}=0$: this will have no effect on the angular velocity at all).


So the above scheme allows you to calculate the velocity and angular velocity after the collision, from a knowledge of the values before the collision, and a specification of the geometry and the parameters characterizing the sphere. The equations are not completely trivial, but they do cover all the cases you asked for in your question.


No comments:

Post a Comment

Understanding Stagnation point in pitot fluid

What is stagnation point in fluid mechanics. At the open end of the pitot tube the velocity of the fluid becomes zero.But that should result...