# Contact

Model ElementContact defines a 3-D contact force between two bodies.

## Class Name

Contact

## Description

Each body is characterized by a set of one or more geometries. Whenever any geometry on the first body penetrates any geometry on the second body, a contact normal and frictional force are generated. The normal force tends to repulse motion along the common normal at the contact point. The frictional force tends to oppose relative sliding velocity at the contact point. The contact force vanishes when the geometries no longer intersect.

## Attribute Summary

Name | Property | Modifiable by Command? | Designable? |
---|---|---|---|

id | Int () | ||

label | Str () | Yes | |

igeom | Reference (Graphics, count=0) | ||

iflex | Reference (FlexBody) | ||

iflip_flex | Bool(False) | ||

jgeom | Reference (Graphics, count=0) | ||

jflex | Reference (FlexBody) | ||

jflip_flex | Bool(False) | ||

type | Enum ("NONE IMPACT POISSON VOLUME USER") | ||

stiffness | Double (0.0) | Yes | FD Only |

exponent | Double (1.5) | Yes | FD Only |

damping | Double (0.0) | Yes | FD Only |

dmax | Double (0.0) | Yes | FD Only |

penalty | Double (0.1) | Yes | FD Only |

restitution_coefficient | Double (0.0) | Yes | FD Only |

coulomb_friction | Enum ("ON OFF DYNAMICS_ONLY") | ||

mu_static | Double (0.0) | Yes | FD Only |

mu_dynamic | Double (0.0) | Yes | FD Only |

stiction_transition_velocity | Double (1E-3) | Yes | FD Only |

friction_transition_velocity | Double (1E-3) | Yes | FD Only |

i_elastic_modulus | Double (0.0) | Yes | FD Only |

i_layer_depth | Double (1.0) | Yes | FD Only |

j_elastic_modulus | Double (0.0) | FD Only | |

j_layer_depth | Double (1) | FD Only | |

master_surface | Enum ("AUTO I J IANDJ", default="AUTO") | Yes | |

normal_routine | Routine () | ||

friction_routine | Routine () | ||

friction_function | Function () | ||

normal_function | Function () | ||

active | Bool () | Yes |

## Usage

- type = "IMPACT"
- type = "VOLUME"
- type = "POISSON"
- type = "USER"

Contact also supports some optional parameters that are independent of the choice of the normal force. You may specify any combination of these.

- Coulomb friction
- Your own custom friction model

```
# Type = "IMPACT"
Contact (type="IMPACT", igeom=list, jgeom=list, stiffness=Double, exponent=Double, damping=Double, dmax=Double, optional_attributes)
# Type = "Volume"
Contact (type="VOLUME", igeom=list, jgeom=list, i_elastic_modulus=Double, i_layer_depth=Double, j_elastic_modulus=Double, j_layer_depth=Double, exponent=Double, damping=Double, optional_attributes)
# Type = "POISSON"
Contact (type="POISSON", igeom=list, jgeom=list, penalty=Double, normal_trans_vel=Double, restitution_coefficient=Double, optional_attributes)
# Type = "USER"
Contact (type="USER", igeom=list, jgeom=list, normal_routine=String or Python function pointer, normal_function=userString, optional_attributes)
```

## Attributes

- General
- If body I is rigid, then you must define the attribute
`igeom`and omit`iflex`. If body I is flexible, then`iflex`is mandatory, and the attribute`igeom`needs to be omitted. The same applies to body J. `igeom`- List of Graphics objects.
`iflex`- This argument specifies the ID of Flex_Body for the first body to be considered for contact.
`jgeom`- List of Graphics objects.
`jflex`- This argument specifies the ID of Flex_Body for the second body to be considered for contact.
`type`- String, choose between "IMPACT", "VOLUME", "POISSON", or "USER".

## Normal force type = "IMPACT"

`stiffness`- Double
`damping`- Double
`exponent`- Double
`dmax`- Double

## Normal force type = "VOLUME"

`i_elastic_modulus`- Double
`i_layer_depth`- Double
`j_elastic_modulus`- Double
`j_layer_depth`- Double
`EXPONENT`- Double
`damping`- Double

## Normal force type = "POISSON"

`penalty`- Double
`restitution_coef`- Double
`normal_trans_vel`- Double

## Normal force type = "USER"

`TYPE`- String "USER"
`normal_function`- String
`normal_routine`- String or a pointer to a Python function.

## Optional Parameters

`id`- Integer
`label`- String
`master_surface`- String. Choose one from: "I", "J", "IANDJ", "AUTO"
`active`- Bool
`iflex_flip`- Reverses the direction of the surface normal on flexible body I. This argument is optional. Choose from TRUE or FALSE.
`jflex_flip`- Reverses the direction of the surface normal on flexible body J. This argument is optional. Choose from TRUE or FALSE.

## Optional Friction Force Specification

These can be used with all normal force models.

There are two options: Using the built-in friction model or using your own custom friction model. You can only select one.

`coulomb_friction`- String. Choose one from: "ON", "OFF", "DYNAMICONLY", "USERCFF"
`mu_static`- Double
`mu_dynamic`- Double
`stiction_transition_velocity`- Double
`friction_transition_velocity`- Double

`friction_function`- String
`friction_routine`- String or a pointer to a Python function.

## Example

- Create a Contact object with the properties shown
below:
`<Force_Contact id = "2" num_i_graphics = "1" i_graphics_id = "93" num_j_graphics = "1" j_graphics_id = "73" cnf_type = "POISSON" penalty = "1E6" restitution_coef = "0.52" cff_type = "COULOMB_ON" mu_static = "0.08" mu_dynamic = "0.06" stiction_trans_vel = "0.005" friction_trans_vel = "0.01" />`

Equivalent Python`contact1 = Contact (type="POISSON", igeom=[gra93], jgeom=[gra73], penalty=1E6, restitution_coefficient=0.52, coulomb_friction="ON", mu_static=0.08, mu_dynamic=0.06, stiction_transition_velocity=0.005, friction_transition_velocity=0.01)`

## Comments

- See Properties for an explanation about what properties are, why they are used, and how you can extend these.
- For a more detailed explanation about Contact, normal force types, and fiction types, see the Comments in the Force: Contact model statement.