Table of Contents

Defining contact elements

Defining contact element is done is the same way as volume elements. First, a contact material is defined (without friction, sticking, …), then the material is included in an ElementProperties (Contact2DElement ou Contact3DElement), elements which are finally generated over the mesh with contact interactions (rigid-defo, defo-defo, …).

Materials

First, a contact material:

materialno = materialset.define (number, type)
materialno = materialset(number)
materialno.put(param, value)
materialno.depend(param, fct, Key(Lock)))
...
number contact material number (must be unique for all element in materialset, not just for contact materials)
type type of contact material (for example FrictionlessContactMaterial) - see Contact materials
param name of a contact parameter (for example PEN_NORMALE)
value value of the corresponding parameter
fct function which characterizes the dependency of the property (optional: no fct if no dependency)
Lock Lock which defines the dependency variable of the property (compulsory if there is a dependency)

All contact materials and corresponding parameters are found page Contact materials.

Elements

Second, contact elements are defined with ElementProperties, and the contact material is included.

prp = ElementProperties(typeEl)
prp.put(param1, value1)
prp.depend(param1, fct1, Lock1)) #optional
...
  

where

typeEl desired contact element (for example Contact[2|3]DElement)
param1 name of the property associated to the element (for example MATERIAL to associate the desired material)
value1 value of the corresponding property
fct1 function which characterizes the dependency of the property (optional: no fct if no dependency)
Lock1 Lock which defines the dependency variable of the property (compulsory if there is a dependency)

Contact elements and their parameters are found page Contact elements.

Interactions

Finally, contact elements are generated using Interactions. Several interactions exist, depending on the type of contact (rigid-defo, defo-defo, …). These interactions are the code used to generate them are found page Contact Interactions.

For example, to generate rigid-defo contact, RdContactInteraction is used :

ci = RdContactInteraction(number)
ci.setTool(gObject1)
ci.push(gObject2)
ci.setSmoothNormals(bool)
ci.addProperty(prp)
interactionset.add(ci) 

where

number number of the Interaction
gObject1 Reference of a geometric object (facetised contact), meshed or not
gObject2 Reference of a meshed geometric object
prp Properties of contact elements to generate
setTool Rigid tools
setSmoothNormals(bool) Facetised tool
= True (default) : continuous normal - projection on a MultiProjWire or MultiprojSkin
= False : discontinuous normal - projection on Wire or Skin