public abstract class ContactForceBehavior extends MaterialBase
Modifier and Type | Field and Description |
---|---|
static int |
TWO_WAY_CONTACT
Flag indicating that vertex penetrations are being calculated for
both collidables, which means that the effective area should be
divided by two in order to produce the same contact pressures as for
one-way contact.
|
myProps
Constructor and Description |
---|
ContactForceBehavior() |
Modifier and Type | Method and Description |
---|---|
static double |
computeContactArea(ContactPoint cpnt0,
ContactPoint cpnt1,
Vector3d normal)
Compute the local contact area for a contact described by contact points
cpnt0 and cpnt1 and a normal normal . |
abstract void |
computeResponse(double[] fres,
double dist,
ContactPoint cpnt0,
ContactPoint cpnt1,
Vector3d normal,
double contactArea,
int flags)
Computes the force response for a given contact.
|
static java.lang.Class<?>[] |
getSubClasses() |
static void |
registerSubclass(java.lang.Class<? extends FemMaterial> cls)
Allow adding of classes (for use in control panels)
|
advanceState, clone, createStateObject, getAllPropertyInfo, getProperty, getPropertyHost, getPropertyInfo, hasProperty, hasState, hasSymmetricTangent, isWritable, postscan, scaleDistance, scaleMass, scan, setPropertyHost, setPropertyInfo, symmetryOrStateChanged, updateMaterial, write, writeItems
public static final int TWO_WAY_CONTACT
public static void registerSubclass(java.lang.Class<? extends FemMaterial> cls)
cls
- class to registerpublic static java.lang.Class<?>[] getSubClasses()
public abstract void computeResponse(double[] fres, double dist, ContactPoint cpnt0, ContactPoint cpnt1, Vector3d normal, double contactArea, int flags)
fres
. The force is defined as the restoring
force
force = f(dist)computed in response to the interpenetration distance
dist
.
Note that in general, dist
will be negative, and a
negative force will be expected in response. The compliance is the
reciprocal of the derivative of f(dist)
evaluated at
dist
. The damping is a positive damping parameter used to
generate damping forces in response to motion in the contact direction.
Other information the can be used includes the two contact points associated the contact, and the contact normal, which is facing outward from the contact surface.
fres
- returns the force, compliance and damping for a given
contact distance.dist
- contact interpenetration distance. This value is usually
negative, with greater negativity indicating greater interpenetration.cpnt0
- first contact pointcpnt1
- second contact pointnormal
- contact normal, directed from cpnt0 to cpnt1contactArea
- average area associated with the contact, or
-1 if this information is not availableflags
- flags providing additional information to the calculation.
These include TWO_WAY_CONTACT
, which indicates two-way vertex
penetration contact.public static double computeContactArea(ContactPoint cpnt0, ContactPoint cpnt1, Vector3d normal)
cpnt0
and cpnt1
and a normal normal
. This methid
required that the contact was produced by vertex penetration contact;
otherwise, it returns -1.cpnt0
- first contact pointcpnt1
- second contact pointnormal
- contact normal, directed from cpnt0 to cpnt1