Contact force - friction term
Posted: Tue May 27, 2014 8:16 am
Hi everybody,
I am studying and trying to understand how contact forces are implemented in Simbody, more particularly Hunt Crossley Contact Force implemented in HuntCrossleyForce.cpp, what I found is the the friction force is always dependent on the slip velocity, which means that friction force is included in the total contact force only when the two object in contact are moving.
This is the c++ code:
// Calculate the friction force.
const Real vslip = vtangent.norm();
if (vslip != 0) {
const bool hasStatic = (param1.staticFriction != 0 || param2.staticFriction != 0);
const bool hasDynamic= (param1.dynamicFriction != 0 || param2.dynamicFriction != 0);
const bool hasViscous = (param1.viscousFriction != 0 || param2.viscousFriction != 0);
const Real us = hasStatic ? 2*param1.staticFriction*param2.staticFriction/(param1.staticFriction+param2.staticFriction) : 0;
const Real ud = hasDynamic ? 2*param1.dynamicFriction*param2.dynamicFriction/(param1.dynamicFriction+param2.dynamicFriction) : 0;
const Real uv = hasViscous ? 2*param1.viscousFriction*param2.viscousFriction/(param1.viscousFriction+param2.viscousFriction) : 0;
const Real vrel = vslip/getTransitionVelocity();
const Real ffriction = f*(std::min(vrel, Real(1))*(ud+2*(us-ud)/(1+vrel*vrel))+uv*vslip);
force += ffriction*vtangent/vslip;
}
In reality, we can have friction force effect even if both surfaces in contact are static. According to the code above, the frictional term of the contact force will be excluded when the two object are not moving, and up to my knowledge this is not a complete expression of friction force. Can you please help me to understand what is missing here?
It's very important for me to include friction force between non-moving surfaces.
Thanks
Ali
I am studying and trying to understand how contact forces are implemented in Simbody, more particularly Hunt Crossley Contact Force implemented in HuntCrossleyForce.cpp, what I found is the the friction force is always dependent on the slip velocity, which means that friction force is included in the total contact force only when the two object in contact are moving.
This is the c++ code:
// Calculate the friction force.
const Real vslip = vtangent.norm();
if (vslip != 0) {
const bool hasStatic = (param1.staticFriction != 0 || param2.staticFriction != 0);
const bool hasDynamic= (param1.dynamicFriction != 0 || param2.dynamicFriction != 0);
const bool hasViscous = (param1.viscousFriction != 0 || param2.viscousFriction != 0);
const Real us = hasStatic ? 2*param1.staticFriction*param2.staticFriction/(param1.staticFriction+param2.staticFriction) : 0;
const Real ud = hasDynamic ? 2*param1.dynamicFriction*param2.dynamicFriction/(param1.dynamicFriction+param2.dynamicFriction) : 0;
const Real uv = hasViscous ? 2*param1.viscousFriction*param2.viscousFriction/(param1.viscousFriction+param2.viscousFriction) : 0;
const Real vrel = vslip/getTransitionVelocity();
const Real ffriction = f*(std::min(vrel, Real(1))*(ud+2*(us-ud)/(1+vrel*vrel))+uv*vslip);
force += ffriction*vtangent/vslip;
}
In reality, we can have friction force effect even if both surfaces in contact are static. According to the code above, the frictional term of the contact force will be excluded when the two object are not moving, and up to my knowledge this is not a complete expression of friction force. Can you please help me to understand what is missing here?
It's very important for me to include friction force between non-moving surfaces.
Thanks
Ali