# Help on physics

#### udg

##### Expert
Longtime User
Hi all,

there's something surely easy that eludes me.
I have a rigid bar of known characteristics, free to rotate along a perpendicular axis through its center. The bar is sitting on the ground (which should provide the friction).
An instantaneous bump is applied to one of its edges.
So, the bar starts a rotation and after some seconds stops. I need to know the final angle.

I considered the momentum of inertia of the bar, I could estimate the initial bump force applied to it, but how do I determine the friction so to evalutate the time for the rotation and consequentely the final angle?

I'd like to program a model where I could change any of the elements above (bar characteristics, friction, bump force, axis of rotation..) but as of now I'll be glad to simulate a simple "make it turn and see where it stops" situation.

TIA

#### Erel

##### B4X founder
Staff member
Longtime User
It should be quite simple to implement with XUI2D.

#### Roycefer

##### Well-Known Member
Longtime User
If you're going to use pure physics, you need to know the coefficient of dynamic friction between the bar and floor. Then you need to know the bar's linear mass density (how much mass it has per infinitesimal length element). Using the equation for friction (F=N*mu where N is the normal force and mu is dynamic friction coeff), you can calculate how much friction force each infinitesimal length element provides.

Next, you need to calculate the friction torque which will require some easy calculus. You need to integrate along the long axis of the bar, starting at the center of rotation (probably the middle of the bar, right?) and go out to one edge. You are going to be integrating the torque formula (F*r*sin theta where sin theta=1 and r=distance from center of rotation) with respect to r. Then double that result for the two lengths of bar on either side of the center of rotation. Now you know the torque provide by friction.

From there, it should be a straightforward kinematics problem to calculate the results you want. Left as an exercise for the reader.

Last edited: