Conservation?

Post Reply
cayman
Posts: 1
Joined: Wed Nov 30, 2016 9:44 pm

Conservation?

Post by cayman »

Hi everybody.

I have a question about conservation in BulletPhysics.

In the world of Newtonian mechanics (classical physics), there are 7 conserved quantities: energy, 3 components of angular momentum and 3 components of momentum.

In the world of BulletPhysics, a very simple test indicates that the 3 components of momentum are conserved, but the 3 components of angular momentum are not conserved and therefore energy is not conserved.

My simple test involves firing two spheres at each other on trajectories that are parallel but not co-linear. Therefore, the spheres collide in a glancing blow. Here are the results...

Scenario 1: When There Is No Friction, It Works
When the spheres have zero friction, then the glancing blow does not cause the spheres to rotate during or after the collision. The 3 components of momentum are conserved and there is no rotation (no angular momentum) and the total energy of the system is conserved.

Scenario 2: When There Is Friction, It Doesn't Work
When the spheres have friction, then the glancing blow causes both spheres to rotate during and after the collision. The 3 components of momentum are conserved, but the angular momentum is not conserved and therefore the total energy of the system is not conserved.

Does BulletPhysics provide a solver and/or any params that would allow this experiment to work in Scenario 2 above?

Thanks!
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: Conservation?

Post by drleviathan »

I'm wondering how you measured the initial and final angular momentum. In particular, did you think the initial angular momentum of colliding offset spheres was zero or non-zero?

The conservation law says that the angular momentum of the system is conserved. It doesn't matter from which inertial frame it is measured but the obvious simple frame would be that where the center of mass (COM) of the system is at rest. In this frame, assuming the spheres collide with offsets such that they bounce off at interesting angles (and pick up some spin), the initial angular momentum is not zero -- the linear motion of the spheres around the COM contribute. If you didn't consider that term (before and after) and only measure the spin terms then we would expect a non-conservative result.

I'm also curious: did you actually measure the before and after kinetic energy or did you assume, since your angular momentum calculation showed non-conservation, that the energy was not conserved?

If you did all the math correctly I'm curious: how bad is the energy conservation law broken? Do you have a relative error value that you can share?
Post Reply