|
AGX Dynamics 2.41.2.0
|
This class store the combine material properties between two agx::Material's. More...
#include <Material.h>
Inheritance diagram for agx::ContactMaterial:Public Types | |
| enum | ContactReductionMode { REDUCE_NONE , REDUCE_GEOMETRY , REDUCE_ALL } |
| Specifies the mode for contact reduction. More... | |
| enum | FrictionDirection { PRIMARY_DIRECTION , SECONDARY_DIRECTION , BOTH_PRIMARY_AND_SECONDARY } |
| Specifies the direction of friction. More... | |
Public Member Functions | |
| ContactMaterial (const ContactMaterial *other, bool implicit) | |
Create a ContactMaterial copying attributes from other. | |
| ContactMaterial (const Material *m1, const Material *m2, bool implicit=false) | |
Constructor which associates this ContactMaterial to the two given materials m1 and m2. | |
| Real | getAdhesion () const |
| Real | getAdhesiveOverlap () const |
| agx::UInt8 | getContactReductionBinResolution () const |
| ContactReductionMode | getContactReductionMode () const |
| Returns whether contact reduction is enabled for this surface material. | |
| Real | getDamping () const |
| The value is the time the contact constraint has to fulfill its violation. | |
| Real | getFrictionCoefficient (FrictionDirection direction=PRIMARY_DIRECTION) const |
| FrictionModel * | getFrictionModel () const |
| agx::Real | getImpactCompliance () const |
| const Material * | getMaterial1 () const |
| const Material * | getMaterial2 () const |
| Real | getMaxElasticRestLength () const |
| Get the maximum elastic rest length of the contact material. | |
| Real | getMinElasticRestLength () const |
| Get the minimum elastic rest length of the contact material. | |
| Real | getRestitution () const |
| agx::Real | getRollingResistanceCoefficient () const |
| agx::Real | getRollingResistanceCompliance () const |
| bool | getSurfaceFrictionEnabled () const |
| Real | getSurfaceViscosity (FrictionDirection direction=PRIMARY_DIRECTION) const |
| Real | getTangentialCohesion (FrictionDirection direction=PRIMARY_DIRECTION) const |
| Real | getTangentialRestitution (FrictionDirection direction=PRIMARY_DIRECTION) const |
| agx::Real | getTwistingResistanceCoefficient () const |
| agx::Real | getTwistingResistanceCompliance () const |
| bool | getUseContactAreaApproach () const |
| Should contacts using this contact material use the new approach for computing contact area? Default false. | |
| Real | getWireFrictionCoefficient (FrictionDirection direction=PRIMARY_DIRECTION) const |
| Real | getYoungsModulus () const |
| bool | isExplicit () const |
| void | setAdhesion (Real adhesion, Real adhesiveOverlap) |
| Set the adhesive force and allowed overlap between two colliding objects. | |
| void | setContactReductionBinResolution (agx::UInt8 binResolution) |
| Specify the resolution used when evaluating contacts for reduction between geometry contacts. | |
| void | setContactReductionMode (ContactReductionMode mode) |
| Specify if contact reduction should be enabled. | |
| void | setDamping (Real damping) |
| Set the damping of the material. | |
| void | setEnableSurfaceFriction (bool flag) |
| Specify if surface friction should be calculated in the solver for this contact material. | |
| void | setFrictionCoefficient (Real friction, FrictionDirection direction=BOTH_PRIMARY_AND_SECONDARY) |
| Set the friction coefficient. | |
| void | setFrictionModel (FrictionModel *frictionModel) |
| Set friction model for this contact material. | |
| void | setImpactCompliance (agx::Real impactCompliance) |
| Sets the compliance used for calculating impact forces. | |
| bool | setMinMaxElasticRestLength (Real minElasticRestLength, Real maxElasticRestLength) |
| Set the minimum and maximum elastic rest length of the contact material. | |
| void | setRestitution (Real restitution) |
| Set the restitution parameter. | |
| void | setRollingResistanceCoefficient (agx::Real rollingCoefficient) |
| Sets the rolling resistance coefficient of the contact material. | |
| void | setRollingResistanceCompliance (agx::Real compliance) |
| Sets the rolling resistance compliance in the contact material. | |
| void | setSurfaceViscosity (Real viscosity, FrictionDirection direction=BOTH_PRIMARY_AND_SECONDARY) |
| Assign the surface viscosity, i.e., how wet the friction is between the colliding materials. | |
| void | setTangentialCohesion (Real cohesion, FrictionDirection direction=BOTH_PRIMARY_AND_SECONDARY) |
| Set the tangential cohesion (Pa) of the contact material. | |
| void | setTangentialRestitution (Real restitution, FrictionDirection direction=BOTH_PRIMARY_AND_SECONDARY) |
| Set the tangential restitution coefficient for a given tangential direction, or both. | |
| void | setTwistingResistanceCoefficient (agx::Real twistingCoefficient) |
| Sets the twisting resistance coefficient of the contact material. | |
| void | setTwistingResistanceCompliance (agx::Real compliance) |
| Sets the twisting resistance compliance in the contact material. | |
| void | setUseContactAreaApproach (bool useContactAreaApproach) |
| Should contacts using this contact material use the new approach for computing contact area? Default false. | |
| void | setWireFrictionCoefficient (Real friction, FrictionDirection direction=BOTH_PRIMARY_AND_SECONDARY) |
| Set the friction coefficient used by the contact nodes in the wires. | |
| void | setYoungsModulus (Real youngsModulus) |
| Set the YoungsModulus of the material, same as spring coefficient k. | |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
Public Member Functions inherited from agxStream::Serializable | |
| virtual | ~Serializable () |
| Destructor for normal C++ use but hidden from SWIG bindings. | |
| virtual const char * | getClassName () const |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. | |
| virtual StorageAgent * | getStorageAgent () const =0 |
| agx::Uuid | getUuid () const |
| bool | isFinished () const |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. | |
Protected Member Functions | |
| ContactMaterial () | |
| virtual | ~ContactMaterial () |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Protected Member Functions inherited from agxStream::Serializable | |
| Serializable () | |
| Default constructor. | |
| Serializable (const Serializable &other) | |
| Copy constructor. | |
| void | generateUuid () |
Additional Inherited Members | |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Static Public Member Functions inherited from agxStream::Serializable | |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. | |
Static Protected Member Functions inherited from agx::Referenced | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. | |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
This class store the combine material properties between two agx::Material's.
It can both be implicit, i.e. calculated (by the MaterialManager) during impact between two Geometry's materials. Or it can be explicit, i.e. created by the user and parameterized through the class interface.
Definition at line 515 of file Material.h.
Specifies the mode for contact reduction.
Definition at line 526 of file Material.h.
Specifies the direction of friction.
| Enumerator | |
|---|---|
| PRIMARY_DIRECTION | |
| SECONDARY_DIRECTION | |
| BOTH_PRIMARY_AND_SECONDARY | |
Definition at line 519 of file Material.h.
| agx::ContactMaterial::ContactMaterial | ( | const Material * | m1, |
| const Material * | m2, | ||
| bool | implicit = false |
||
| ) |
Constructor which associates this ContactMaterial to the two given materials m1 and m2.
| m1 | - A Material |
| m2 | - A Material |
| implicit | - If true this will be marked as an implicit ContactMaterial. |
| agx::ContactMaterial::ContactMaterial | ( | const ContactMaterial * | other, |
| bool | implicit | ||
| ) |
Create a ContactMaterial copying attributes from other.
| other | - Attributes will be copied from this ContactMaterial |
| implicit | - If true this will be marked as an implicit ContactMaterial. |
|
protected |
|
protectedvirtual |
| Real agx::ContactMaterial::getAdhesion | ( | ) | const |
Definition at line 1105 of file Material.h.
| Real agx::ContactMaterial::getAdhesiveOverlap | ( | ) | const |
Definition at line 1110 of file Material.h.
| agx::UInt8 agx::ContactMaterial::getContactReductionBinResolution | ( | ) | const |
Definition at line 1155 of file Material.h.
| ContactMaterial::ContactReductionMode agx::ContactMaterial::getContactReductionMode | ( | ) | const |
Returns whether contact reduction is enabled for this surface material.
Definition at line 1150 of file Material.h.
| Real agx::ContactMaterial::getDamping | ( | ) | const |
The value is the time the contact constraint has to fulfill its violation.
Definition at line 1125 of file Material.h.
| Real agx::ContactMaterial::getFrictionCoefficient | ( | FrictionDirection | direction = PRIMARY_DIRECTION | ) | const |
Definition at line 1095 of file Material.h.
| FrictionModel * agx::ContactMaterial::getFrictionModel | ( | ) | const |
Definition at line 1130 of file Material.h.
| agx::Real agx::ContactMaterial::getImpactCompliance | ( | ) | const |
Definition at line 1230 of file Material.h.
| const Material * agx::ContactMaterial::getMaterial1 | ( | ) | const |
Definition at line 1140 of file Material.h.
Referenced by agxSDK::MaterialManager::getSymmetricPair().
| const Material * agx::ContactMaterial::getMaterial2 | ( | ) | const |
Definition at line 1145 of file Material.h.
Referenced by agxSDK::MaterialManager::getSymmetricPair().
| Real agx::ContactMaterial::getMaxElasticRestLength | ( | ) | const |
Get the maximum elastic rest length of the contact material.
This is only used if the contact area approach is used (getUseContactAreaApproach()==true). For the effect of the elastic rest length, see the user manual.
| maxElasticRestLength | The max elastic rest length. |
| Real agx::ContactMaterial::getMinElasticRestLength | ( | ) | const |
Get the minimum elastic rest length of the contact material.
This is only used if the contact area approach is used (getUseContactAreaApproach()==true). For the effect of the elastic rest length, see the user manual.
| minElasticRestLength | The min elastic rest length. |
| Real agx::ContactMaterial::getRestitution | ( | ) | const |
Definition at line 1090 of file Material.h.
| agx::Real agx::ContactMaterial::getRollingResistanceCoefficient | ( | ) | const |
Definition at line 1215 of file Material.h.
| agx::Real agx::ContactMaterial::getRollingResistanceCompliance | ( | ) | const |
Definition at line 1220 of file Material.h.
| bool agx::ContactMaterial::getSurfaceFrictionEnabled | ( | ) | const |
Definition at line 1115 of file Material.h.
| Real agx::ContactMaterial::getSurfaceViscosity | ( | FrictionDirection | direction = PRIMARY_DIRECTION | ) | const |
Definition at line 1100 of file Material.h.
| Real agx::ContactMaterial::getTangentialCohesion | ( | FrictionDirection | direction = PRIMARY_DIRECTION | ) | const |
| Real agx::ContactMaterial::getTangentialRestitution | ( | FrictionDirection | direction = PRIMARY_DIRECTION | ) | const |
| agx::Real agx::ContactMaterial::getTwistingResistanceCoefficient | ( | ) | const |
| agx::Real agx::ContactMaterial::getTwistingResistanceCompliance | ( | ) | const |
Definition at line 1225 of file Material.h.
| bool agx::ContactMaterial::getUseContactAreaApproach | ( | ) | const |
Should contacts using this contact material use the new approach for computing contact area? Default false.
Definition at line 1235 of file Material.h.
| Real agx::ContactMaterial::getWireFrictionCoefficient | ( | FrictionDirection | direction = PRIMARY_DIRECTION | ) | const |
Definition at line 1240 of file Material.h.
| Real agx::ContactMaterial::getYoungsModulus | ( | ) | const |
Definition at line 1120 of file Material.h.
| bool agx::ContactMaterial::isExplicit | ( | ) | const |
Definition at line 1135 of file Material.h.
Set the adhesive force and allowed overlap between two colliding objects.
| adhesion | - adhesive force >= 0, i.e., the attractive force. The value is clamped between zero and INFINITY. |
| adhesiveOverlap | - allowed overlap (length >= 0) from surface for resting contact. At this overlap, no force is applied. At lower overlap, the adhesion force will work, at higher overlap, the (usual) contact force. The value is clamped between zero and INFINITY. |
| void agx::ContactMaterial::setContactReductionBinResolution | ( | agx::UInt8 | binResolution | ) |
Specify the resolution used when evaluating contacts for reduction between geometry contacts.
A high value will keep more contacts, lower will result in more aggressive reduction the default. Commonly a value of 2 or 3 will give good result. Values from 0 to 10 are valid, where a value of 0 means this will be overridden by the ContactReductionBinResolution from Space.
| binResolution | - parameter to ContactReducer. |
| void agx::ContactMaterial::setContactReductionMode | ( | ContactReductionMode | mode | ) |
Specify if contact reduction should be enabled.
| mode | - The mode, default is REDUCE_GEOMETRY |
| void agx::ContactMaterial::setDamping | ( | Real | damping | ) |
Set the damping of the material.
The value is the time the contact constraint has to fulfill its violation.
| damping | The new damping value |
| void agx::ContactMaterial::setEnableSurfaceFriction | ( | bool | flag | ) |
Specify if surface friction should be calculated in the solver for this contact material.
| void agx::ContactMaterial::setFrictionCoefficient | ( | Real | friction, |
| FrictionDirection | direction = BOTH_PRIMARY_AND_SECONDARY |
||
| ) |
Set the friction coefficient.
The value is clamped between zero and INFINITY
| friction | - New friction coefficient |
| direction | - Specifies for which direction the friction value will be set. Default is BOTH_PRIMARY_AND_SECONDARY |
| void agx::ContactMaterial::setFrictionModel | ( | FrictionModel * | frictionModel | ) |
Set friction model for this contact material.
| void agx::ContactMaterial::setImpactCompliance | ( | agx::Real | impactCompliance | ) |
Sets the compliance used for calculating impact forces.
Only used by granular body system impacts.
| impactCompliance | The compliance of the impact constraint. |
| bool agx::ContactMaterial::setMinMaxElasticRestLength | ( | Real | minElasticRestLength, |
| Real | maxElasticRestLength | ||
| ) |
Set the minimum and maximum elastic rest length of the contact material.
This is only used if the contact area approach is used (getUseContactAreaApproach()==true). It sets the minimum and maximum allowed value for the elastic rest length of the material - values below will be clamped to the min, values above will be clamped to the max. If the value has not been set: in contact between materials m1 and m2, the min elastic rest of the contact material cm(m1, m2) will have the sum of m1's and m2's min elastic rest length, and the max elastic rest length of cm(m1, m2) will be the sum of m1's and m2's max elastic rest length. For the effect of the elastic rest length, see the user manual.
| minElasticRestLength | The min elastic rest length. Only values > 0 allowed. Has to be <= maxElasticRestLength. |
| maxElasticRestLength | The max elastic rest length. Only values > 0 allowed. Has to be >= minElasticRestLength. |
| Success | - Are the values in the allowed range and have thus been applied? |
| void agx::ContactMaterial::setRestitution | ( | Real | restitution | ) |
Set the restitution parameter.
The value is clamped between zero and INFINITY
| restitution | - New restitution value. |
| void agx::ContactMaterial::setRollingResistanceCoefficient | ( | agx::Real | rollingCoefficient | ) |
Sets the rolling resistance coefficient of the contact material.
Only works with contacts that include particles from GranularBodySystem.
| rollingCoefficient | - The coefficient of the rolling resistance. |
| void agx::ContactMaterial::setRollingResistanceCompliance | ( | agx::Real | compliance | ) |
Sets the rolling resistance compliance in the contact material.
Only works with contacts that include particles from GranularBodySystem.
| compliance | The compliance of the rolling resistance constraint. |
| void agx::ContactMaterial::setSurfaceViscosity | ( | Real | viscosity, |
| FrictionDirection | direction = BOTH_PRIMARY_AND_SECONDARY |
||
| ) |
Assign the surface viscosity, i.e., how wet the friction is between the colliding materials.
Default: ~1E-8. It's possible to have different viscosities in primary and secondary directions.
| viscosity | - New viscosity value. |
| direction | - Specifies for which direction the viscosity value will be set. Default is BOTH_PRIMARY_AND_SECONDARY |
| void agx::ContactMaterial::setTangentialCohesion | ( | Real | cohesion, |
| FrictionDirection | direction = BOTH_PRIMARY_AND_SECONDARY |
||
| ) |
Set the tangential cohesion (Pa) of the contact material.
The value is clamped between zero and INFINITY
| cohesion | - The tangential cohesion (Pa) |
| direction | - Specifies for which direction the tangential cohesion value will be set. Default is BOTH_PRIMARY_AND_SECONDARY |
| void agx::ContactMaterial::setTangentialRestitution | ( | Real | restitution, |
| FrictionDirection | direction = BOTH_PRIMARY_AND_SECONDARY |
||
| ) |
Set the tangential restitution coefficient for a given tangential direction, or both.
The default tangential restitutions are zero and restitution will be clamped between zero and infinity.
| restitution | - New tangential restitution value. |
| direction | - Specifies for which direction the tangential restitution value will be set. Default is BOTH_PRIMARY_AND_SECONDARY. |
| void agx::ContactMaterial::setTwistingResistanceCoefficient | ( | agx::Real | twistingCoefficient | ) |
Sets the twisting resistance coefficient of the contact material.
Only works with contacts that include particles from GranularBodySystem.
| twistingCoefficient | - The coefficient of the twisting resistance. |
| void agx::ContactMaterial::setTwistingResistanceCompliance | ( | agx::Real | compliance | ) |
Sets the twisting resistance compliance in the contact material.
Only works with contacts that include particles from GranularBodySystem.
| compliance | The compliance of the twisting resistance constraint. |
| void agx::ContactMaterial::setUseContactAreaApproach | ( | bool | useContactAreaApproach | ) |
Should contacts using this contact material use the new approach for computing contact area? Default false.
| void agx::ContactMaterial::setWireFrictionCoefficient | ( | Real | friction, |
| FrictionDirection | direction = BOTH_PRIMARY_AND_SECONDARY |
||
| ) |
Set the friction coefficient used by the contact nodes in the wires.
The primary direction is along the wire and the secondary direction is long the contact edge on the object the wire contact is sliding (close to orthogonal to the wire direction). The value is clamped between zero and INFINITY
| friction | - New friction coefficient |
| direction | - Specifies for which direction the friction value will be set. Default is BOTH_PRIMARY_AND_SECONDARY. |
| void agx::ContactMaterial::setYoungsModulus | ( | Real | youngsModulus | ) |
Set the YoungsModulus of the material, same as spring coefficient k.