This is an old revision of the document!
In this commit, a new contact traction element was created to set the traction force to zero at the nodes that are in contact within a specified contact interaction. This feature is required in the coupling procedure with Metalub (see commit 3186 of Metafor and commit 1456 of Metalub for more details).
ContactTraction3DElement is created like a
Traction3DElement. The only additional property that has to be set is
NBR_CONTACT_INTERACTION, which is the number of the contact interaction. For instance,
prp = ElementProperties(ContactTraction2DElement) prp.put(PRESSURE, -p['pMax']) prp.put(NBR_CONTACT_INTERACTION, 3)
Hence, if nodes in this
ContactTraction2DElement are slave nodes in contact (in the previous mechanical iteration) in the contact interaction 3, the traction force applied to these nodes is set to zero.
Instead of implementing the new feature directly in the
TractionElement of the
mtElement package, a new template class
ContactTractionElement was created in the
mtContact (elements) package. It had to be moved to the
mtContact package (instead of the
mtElement package) in order to have access to the contact features via
include “ContactInteraction.h”. Moreover, the
ContactTractionElement derives of
TractionElement to minimize duplicate code. In a similar way to the
TractionElement, 2D and 3D elements were created:
ContactTraction3DElement. This required to export all methods of
ELEMENT_CPP_MACRO2 extension), which only had to be added in
Traction3DElement since it was already done for
Traction2DElement, certainly to derive it in
Some minor modifications:
NBR_CONTACT_INTERACTIONwas added in
mtElements.h/cppas an integer property.
ContactTraction3DElementto the functions
LoadingInteraction.cppin order to be able to add them to the
LoadInteractionin the Python data set.
getSlaveNode(), previously private method in
ContactElement.h/cpp, becomes protected to use it in
isInContactPrev()was added in
ContactElement.h/cppto get the contact status at the end of the previous time iteration. Using this contact status has the advantage that the contact traction activation/deactivation does not happen during the same time step, i.e. during the mechanical iteration. It might be possible to use the current contact status but this could introduce some undesired oscillations.
Concerning the implementation, the
ContactTractionElement is very similar to the
TractionElement except from parts of the following virtual functions:
checkProps: This function checks whether the new property
NBR_CONTACT_INTERACTIONwas set during the initialization of the elements. If this property was set, it checks whether the specified number corresponds to an existing contact interaction. Once this interaction is found, pointers to the slave nodes corresponding to the nodes of the
ContactionTractionElementare saved in the new
cesprivate vector of contact elements in the
fillExternalForces: This function uses the
TractionElementfirst and then it sets all contact forces corresponding to nodes in contact equal to zero. As mentionned earlier, the contact state is determined based on the results of the previous time integration for reasons of possible oscillation minimization.
noAnalyticalStiffnessAvailable: An analytical stiffness matrix was defined for the
ContactTractionElement. Hence, this function can return
fillAnalyticalStiffness: Similar to the
TractionElementis used first and then the rows corresponding to the traction forces that were set equal to zero are also set equal to zero. The structure of this matrix is illustrated in a comment of the
fillAnalyticalStiffnessfunction to understand the details.
Two test cases were created in the folder
mtContact/tests to test the
ContactTractionElement in 2D and 3D. Hence, they have the same names than the elements that are tested:
contactTraction3DElement. The 3D test is the natural extension of the 2D case. Hence, only some details about the 2D case are explained here.
As shown in the previous figure, two squares are crushed by a compression pressure and a contact tool. In the case on the left, the traditional
Traction2DElement is used, while the new
ContactTraction2DElement is on the right.