# Resolving contact force to prevent penetration and LCP

This topic is 2205 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello,
Im working through "Dynamic Simulations Of Multibody Systems" by Murilo Coutinho.
Ive got a ball rigid body (B1) and a plane. I've been trying to setup the LCP problem to calculate the force require to prevent pentration.
The problem is

a = AF + b
a >= 0
F >= 0
aF = 0

where
a = relative acceletaion at the contact point (to solve)
A = a constant (roughly the inverse mass at the contact point)
F = relative force at the contact point (to solve)
b = current relative acceleration at contact point + relative velocity x contactFrame time derivate.

The ball has a gravity force of -10 units, and mass = 1 so -10 acceleration too.
When there is no rotation, all works fine. But when there is rotation, the contact point on the ball gets a centrepetal acceleration so its accelertaion becomes -9.

So it calculates a force of +9 to apply at the contact. But the body still has an accn of -10, so applying this force won't prevent penetration. I could just calculate the force required to prevent penetraion but that would violate the aF = 0 constraint.

I've been googling all over the place the past 2 days and im nearly bald from tearing my hair out so Id be really really grateful for any help.
I know someone posted a similate comment (Bastian1978) but it doesnt help me maintain the constraints which I need so I can extend the system to sovling multiple simultaneous contacts.

Formule are:

b = B1.netForce/B1.mass + (B1.inertia^-1 * B1.Torque + B1.angualMomentum X B1.W) X r1
+ B1.W X (B1.W X r1);
+ (B1.V + B1.W X r1) * (coordFrame time derivate)

A = (I * B1.invMass) - (x1 * B1.inertia^-1 * x1);

where:
r1 = contactPoint - B1.centre of mass
x1 = r1.skewSymmetric
I = identity matrix

The final term of 'b' is zero as the contactFrame remains stationary.

1. 1
2. 2
3. 3
frob
15
4. 4
5. 5

• 20
• 12
• 13
• 14
• 83
• ### Forum Statistics

• Total Topics
632144
• Total Posts
3004413

×