public abstract class ContactForceBehavior extends MaterialBase
| Modifier and Type | Field and Description |
|---|---|
static int |
TWO_WAY_CONTACT
Deprecated.
This flag is no longer set. Instead, for two-way contact,
the
contactArea argument of computeResponse(double[], double, artisynth.core.modelbase.ContactPoint, artisynth.core.modelbase.ContactPoint, maspack.matrix.Vector3d, double, int) is
halved for vertex contacts, so that no further scaling is required. |
myProps| Constructor and Description |
|---|
ContactForceBehavior() |
| Modifier and Type | Method and Description |
|---|---|
static double |
computeContactArea(ContactPoint cpnt0,
ContactPoint cpnt1,
Vector3d normal)
Deprecated.
The contact area is now supplied directly to
computeResponse(double[], double, artisynth.core.modelbase.ContactPoint, artisynth.core.modelbase.ContactPoint, maspack.matrix.Vector3d, double, int) via its contactArea argument, which should be
used instead. Note that for two-way vertex contact, the value returned
by this method is twice the effective area supplied by contactArea. |
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, createChangeEvent, createStateObject, getAllPropertyInfo, getProperty, getPropertyHost, getPropertyInfo, hasProperty, hasState, hasSymmetricTangent, isWritable, postscan, scaleDistance, scaleMass, scan, setPropertyHost, setPropertyInfo, symmetryOrStateChanged, updateMaterial, write, writeItems@Deprecated public static final int TWO_WAY_CONTACT
contactArea argument of computeResponse(double[], double, artisynth.core.modelbase.ContactPoint, artisynth.core.modelbase.ContactPoint, maspack.matrix.Vector3d, double, int) is
halved for vertex contacts, so that no further scaling is required.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. Entries
that are not set default to 0. 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.
The step damping is an optional dimensionless factor that specifies a
minimum damping proportional to the step size h, such that the
effective damping d is given by
d = max (damping, stepDamping*h/compliance)This allows the damping time constant
d*compliance to be kept at
or above h/2, which is the minimum required for stable compliant
contact, without the behavior needing to know h. Damping and step
damping are applied only if the compliance is greater than 0.
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, damping and step 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 - area associated with the contact. For vertex
penetration contacts, this is one third of the area of each face
surrounding the penetrating vertex; for edge-edge contacts, it is one
third of the area of each face adjacent to the first edge; in both
cases, the area is projected onto the plane perpendicular to the
normal. For contour region contacts, it is the area of the contact
region divided by the number of contact points. For two-way contact
(when vertex penetrations are computed for both collidables), the area
of vertex contacts is halved, since the vertices of both collidables
then cover the same contact patch.flags - flags providing additional information to the calculation.
No flags are currently defined.@Deprecated public static double computeContactArea(ContactPoint cpnt0, ContactPoint cpnt1, Vector3d normal)
computeResponse(double[], double, artisynth.core.modelbase.ContactPoint, artisynth.core.modelbase.ContactPoint, maspack.matrix.Vector3d, double, int) via its contactArea argument, which should be
used instead. Note that for two-way vertex contact, the value returned
by this method is twice the effective area supplied by contactArea.cpnt0 and cpnt1 and a normal normal, using
ContactPoint.computeContactArea(maspack.matrix.Vector3d).cpnt0 - first contact pointcpnt1 - second contact pointnormal - contact normal, directed from cpnt0 to cpnt1cpnt0 is not associated
with a vertex or edge