HyperWorks Solvers

GET_CONTACT_POST

GET_CONTACT_POST

Previous topic Next topic No expanding text in this topic  

GET_CONTACT_POST

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Subroutine Type

Utility/Data Access

Definition

Used to extract rigid body contact results.

Use

This subroutine can be used to extract rigid body contact results from within the CONTACTPOST subroutine in MotionSolve.

Calling Syntax

Fortran

CALL GET_CONTACT_POST(ID, I_GRA_ID, J_GRA_ID, TYPE, RM, INDEX, RESULT, NRESULTS, ERRFLG)

 

C

c_get_contact_post(id, i_gra_id, j_gra_id, type, rm, index, result, nresults, errflg)

 

Python

[result, errflg] = py_get_contact_post (id, i_gra_id, j_gra_id, type, rm, index):

Input Arguments

[integer] ID

The ID of the contact force modeling element (Force_Contact in the XML) for which the results are desired.

 

[integer] I_GRA_ID

The ID of the I body’s graphic representation.

 

[integer] J_GRA_ID

The ID of the J body’s graphic representation.

 

[string] TYPE

The type of contact result that is requested. Choose from:

type =

Description

“PD”

Penetration depth (scalar).

“PD_VEL”

Penetration rate, in other words, the first time derivative of the penetration depth (scalar).

“SLIP_VEL”

Slip velocity (scalar).

“POS”

Position of the point of contact (vector).

“VEL”

Velocity of the point of contact (vector).

“NORMAL_FORCE”

Normal contact force (vector).

“TANGENTIAL_FORCE”

Tangential contact force (vector).

“TOTAL_FORCE”

Total contact force (vector).

“HAS_TRIA_ID”

A flag for determining whether the geometry in contact is tessellated (scalar).

“TRIA_ID_I”

The ID of the triangle(s) that is/are in contact on the I body (scalar or list, based on the number of triangles in contact).

This type only makes sense if HAS_TRIA_ID is true.

“TRIA_ID_J”

The ID of the triangle(s) that is/are in contact on the J body (scalar or list, based on the number of triangles in contact).

“INTERSECTION_ID”

An ID that is common between all the contact points that belong to the same contact patch. This is useful for determining the number of contact patches at the current time in the simulation. See Comment 2 for a definition of contact patch.

All the above quantities are represented in model units, wherever applicable.

 

[integer] RM

The ID of a reference marker that allows you to request for contact states with respect to a frame of reference of your choice. This frame of reference is only applicable to the following types:

type = “POS”
type = “VEL”
type = “NORMAL_FORCE”
type = “TANGENTIAL_FORCE”
type = “TOTAL_FORCE”

 

[integer] INDEX

There may be several locations where contact occurs between the I and J body at a particular time in the simulation. The INDEX input tells MotionSolve which contact the states are being requested for. The INDEX is a 1-based index and can have a maximum value of what is returned by the utility function GET_NCONTACTS. Thus,

1 <= INDEX <= GET_NCONTACTS().

Output Values

[double] RESULT

A scalar, vector, or a list of the values returned by GET_CONTACT_POST.

 

[integer] NRESULTS

The size of RESULT. This is not required while using the Python utility function.

 

[logical] ERRFLG

A value that is true if an error occurs during the call to GET_CONTACT_POST.

Comments

1.The GET_CONTACT_POOST utility function is applicable to both mesh based and semi-analytical (for example, sphere-mesh) based contact modeling. However, this utility function is not supported for legacy models that make use of the old (OPCODE) collision engine.
2.A contact patch is defined as a collection of points of contact between body I and J. If these points of contacts are not connected with one another, then these are termed as separate contact patches.

Figure 1 shows two spur gears in contact with each other; two separate contact patches are illustrated.

get_contact_post

Figure 1: Illustration of contact patches

You may use the type = “INTERSECTION_ID” to keep track of different contact patches at the given time in the simulation.

Note: The intersection ID may change across time steps.

See Also:

Data Access Subroutines