-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contact Algorithm #636
Comments
Yes, I'm happy with this, I move to vote. 👍 or 💬 if you like to discuss more. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
We are currently waiting for benchmarks and validation problems. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Contact Algorithm
Summary
Implementation of a contact algorithm to handle the frictional interaction between adjacent materials at the region of contact between the two, also known as the multi-material contact or interface. This implementation is based on the procedures provided by Bardenhagen et al. (2000) and Nairn (2013).
Motivation
Currently, the CB-Geo MPM code computes a single velocity field for one-phase problems. This means that, upon computing the nodal velocities towards the end of each time step, the code will update the material point’s (or particle’s) position using the same velocity field, regardless of the distinct bodies being represented. The distinct bodies will thus behave as if they are "stuck" to each other. Nevertheless, this is not always the case for every model, since one may desire to attribute to the body the capacity of moving freely if separating, or of developing friction at the contact surface with another body if they are approaching.
The proposed feature, thus, allows one to develop simulations where multi-material interface interaction is essential in the analysis. Cases such as soil-structure interaction, slip surfaces in slope stability analyses, fracture movement/rupture, among others, represent common geotechnical problems that fit this contact requirement. By applying this feature, the user is able to assign the desired friction characteristics between every pair of bodies.
Design Detail
The MPM contact algorithm as described by Bardenhagen et al. (2000) can be summarized into the following stages: reset the nodal properties, map the particle’s properties to the nodes, compute the nodal kinematics of separate bodies by satisfying the conservation of linear momentum, correct the kinematics by applying contact law and no-interpenetration conditions at the interface between bodies, and update the particles’ kinematics. This brief overview of the contact algorithm stages also indicates that the nodal properties must be stored for separate bodies, instead of the singular nodal velocity field of the one-phase conventional MPM. Therefore, a data structure solution is included in this design detail to explain the chosen approach for implementing the algorithm to the current CB-Geo MPM code. The stages of the representative contact time-step loop are fulfilled by iterating over the particles or nodes to perform each of the tasks. Hence, new methods, hereafter referred to as contact-related methods, are added to the
Particle
,Node
, andMesh
classes to perform these tasks. An additional Contact class is proposed to store the parameters of the contact law and to orderly call the contact-related methods. Finally, a description of the input needed for using this feature is given.Data structure
As previously stated, the stored nodal properties in this scheme must differentiate between distinct bodies. Therefore, the suggested approach is to create a
NodalProperty
struct representing a property pool that will be responsible for storing and manipulating the data of each nodal property in the contact approach. The pool is declared and handled within theMesh
class under the aliasnodal_properties
In this entity, different properties are handled with a map container, where each property (
key
) is associated with its ownEigen::Matrix
(value
). The total number of columns in these matrices is the same as the number of materials in the model. The total number of rows is equal to the number of nodes multiplied by the dimension of the property – 1 if scalar andTdim
if vector.Accessing and modifying the values in these matrices is done with implemented methods in the
NodalProperties
struct. These methods include the property name, node id, and material id as arguments for returning, assigning, and updating property values in the specific property pool. For instance, in a 2D environment consisting of 2 nodes and 3 materials, each vectorial property will be stored in the following structure:where
p_ijk
is the momentum in thei
direction, at nodej
and materialk
. Accessing the property from node 0 and material 1 means thatp_001
andp_101
will be accessed.Before starting the time step iteration of the MPM solver, the property handle is initialized and the key-value pairs are created. Additionally, a handle to
nodal_properties_
is also created in each node to avoid passing the created struct object as an argument when its access is necessary fromNode
objects. This procedure is done within thecreate_nodal_property()
method inMesh
described below.The following are the keys (properties) stored in the map object in
nodal_properties
:"masses"
"momenta"
"displacements"
”domains”
”domain_gradients”
”normal_unit_vectors”
”internal_forces”
”external_forces”
”current_velocities”
"velocities"
”accelerations”
”relative_velocities”
All keys are saved as
std::string
, representing the name of the property in plural form.Contact-related methods
The multi-material contact approach proposed by Bardenhagen et al. (2000) can be subdivided into a series of steps in the code. Except for the creation of
nodal_properties
and each of its key-value pairs, which happens once at the start of the simulation, all steps happen sequentially within the time-step loop:nodal_properties
, setting all the parameters to zero.nodal_properties
.Node
Class by iterating over all nodes.nodal_properties
by iterating over all material points.nodal_properties
by iterating over all material points.The steps itemized above will either take place in the particle or node level. They are thus implemented as methods within the
Particle
orNode
classes and are called by iterating over all particles and nodes, respectively. Most of the functions are similar to the conventional MPM but an additional iteration over the material ids is done to account for distinct bodies and the obtained values are stored innodal_properties
. For instance, the function to map mass and momentum is as follows:The steps where the methods are similar to the original MPM code are steps 4, 5, 8-11. The remaining methods are either entirely new to the code or differ significantly from the corresponding conventional MPM methods.
Steps 1-3 correspond to the initialization of the
nodal_properties
and material ids that are mapped to the node. They represent the first steps taken within the time-step loop before any computation takes place. Step 1 sets all nodal properties to zero, step 2 clears the set of material ids in every node (happens withininitialise()
at theNode
class) and step 3 has a function of its own to append new material ids to the node as the code iterate through all particles:Steps 6 and 7 are the first to introduce a novelty to the code that is essential to the contact algorithm. These steps pertain to the computation of the normal unit vector at every node and with respect to each body. The normal unit vector computation follows the possible cases presented by Nairn (2013). The cases used in the context of this code are the pure volume gradient (PVG), the average volume gradient (AVG), or the maximum volume gradient (MVG). The three methods use the mapped volume (domain) and the volume gradient (domain gradient) that is determined in step 6 similarly to the way other properties are mapped to the nodes. Afterward, the normal is computed in step 7 in one of the three ways:
The normal computation method used must be user-defined as indicated in the input section of this document.
The core difference of the implementation of the contact algorithm to the code is the application of contact mechanics in steps 12 and 13. Step 12 simply computes the relative velocity at the node and body, which is the difference between the body's nodal velocity and the nodal velocity of the center of mass – the latter is the already computed nodal velocity as in the conventional MPM.
In Step 13, the contact-mechanics as described in Bardenhagen et al. (2000) is applied. At first, the approaching condition is verified. If the relative velocity’s normal component is greater than 0, the body is approaching another. Otherwise, it is considered to be separating. Only the former condition will result in corrections to the body’s nodal velocity.
The first correction represents the no-interpenetration of the bodies, and it translates as the deduction of the normal component of the relative velocity from the body’s current nodal velocity.
A second correction is applied to account for the frictional relationship between the bodies. This correction checks if the tangential component of the relative velocity exceeds the maximum frictional deduction at the node. If it does, this maximum friction is deducted from the body’s current nodal velocity. Otherwise, the tangential component of the relative velocity is deducted instead. This procedure was simply equated as shown in the figure below. An if-else statement was included in the code to deal with the tangential corrections in 2D or 3D.
Finally, the corrected nodal acceleration is assigned as the difference between the corrected nodal velocity and the initial nodal velocity, all divided by the time step. Moreover, the initial nodal velocity corresponds to the nodal velocity derived from mapping the particles' mass and momentum to the nodes (steps 4 and 5).
Contact class
To store the specific contact-related parameters, a
Contact
class is used in this implementation. This class also contains the ordered calls to the contact-related methods. This facilitates the future implementation of other contact laws (not just frictional), minimizing the changes to ideas and structure of the contact algorithm. The proceedings mentioned so far are all part of theContactFriction
class, derived fromContact
. A pointer to the contact object is declared in theMPMBase
class. It is initialized and called within the derivedMPMExplicit::solver()
method according to the input JSON file. The contact-related methods are used in separate methods of theContactFriction
to permit future changes to specific sections and to fit the order of calls to these functions with the already existing ones in the conventional MPM scheme. The following is a code snippet of theContactFriction
class:Input
To consider frictional contact in a model, the user must define the friction coefficient and the type of normal computation within the analysis object of the JSON file. For example, a coefficient of friction of 0.2 and the normal computation type of
MVG
are to be used, the JSON file would include the following:Notice that the use of contact can be toggled on and off by setting the "interface" entry to true or false, respectively.
Additionally, the user must define a new material with an id for each body that they intend to use in the model. The material ids used must start at 0 and must also be consecutive. The material parameters can be the same between materials, as long as different ids are used to represent distinct bodies.
Currently, the proposed code does not allow for the use of multiple coefficients of friction between bodies. Regardless of the material ids of the bodies that are approaching, the code will apply the same coefficient of friction and normal type detection.
Drawbacks
Rationale and Alternatives
Another alternative to the Algorithm implemented would be to directly store the information in the nodes instead of having a property pool (
nodal_properties
). This can even encompass dynamic allocation of memory to avoid the unnecessary usage of memory for the nodes with one or no adjacent materials. However, this alternative would result in a slower algorithm with the possibility of memory leaks happening if no proper release of memory is considered.Prior Art
This implementation is highly based on the directions provided by Bardenhagen et al. (2001) and Nairn (2013). In fact, the former reference is the one that introduces the portion of the contact algorithm envisioned for this design, whereas the latter introduced the Imperfect Interface Theory to deal with the cases where adjacent materials are not in contact but still constitute what the author calls imperfect interface. However, the details about the imperfect interface contribution is out of the scope of this design. The latter also presents additional directions on computing the normal unit vectors.
Unresolved questions
nodal_properties
to account only for the nodes where more than one material is identified to be adjacent to the node.The text was updated successfully, but these errors were encountered: