Contact class#

struct cell_type#
#include <openfdem_cell.h>

Public Functions

cell_type() = default#
void resize(Int size, UInt value = 0)#
void clear()#

Public Members

UInt n_e = 0#
std::vector<UInt> ele#
struct ConCell#
#include <openfdem_cell.h>

Public Functions

void resize()#
void clear()#

Public Members

UInt cellsize = 0#
UInt xstart = 0#
UInt ystart = 0#
UInt xSize = 0#
UInt ySize = 0#
Real radius = 0.0#
std::vector<cell_type> cell#
class Contact_detection : public ns_contact::Contact_utils#

Subclassed by ns_contact::ContactModule

Public Functions

inline Contact_detection()#
inline ~Contact_detection()#

Public Static Functions

static void Contact_dection_method_NBS(Contact contact, General general, Element element, Cohelement cohelement, Nodal nodal, Solidmat solidmat)#

NBS contact detection algorithm, memory saving but not explict.

Parameters:
  • contact

  • general

  • element

  • cohelement

  • nodal

  • solidmat

static void Contact_dection_method_mNBS(Contact contact, General general, Element element, Cohelement cohelement, Nodal nodal, Solidmat solidmat)#

modeifed NBS detection algorithm which is time dependent.

Parameters:
  • contact

  • general

  • element

  • cohelement

  • nodal

  • solidmat

static void Contact_dection_method_CELL(Contact contact, General general, Element element, Cohelement cohelement, Nodal nodal, Solidmat solidmat)#

cell based contact detection algorithm, self-proposed, parallable.

Parameters:
  • contact

  • general

  • element

  • cohelement

  • nodal

  • solidmat

struct Contact_structure#

Public Functions

void resize(Int size, Int initialsize = 0)#
void clear()#

Public Members

Int _elementSize = 0#
UInt n_contact = 0#
Int detection_count = 0#
Int contact_count = 0#
std::vector<bool> potentional_contact_element#
std::vector<contact_type> con#
contact_detection detection = contact_detection::LIG#
contact_force contactForceRule = contact_force::SHAPE_FUNCTION#
Real contact_trigger = 1.0e15#
Real contact_buffer = 0.0#
struct contact_type#

Public Functions

contact_type() = default#
void resize(UInt ielem, UInt jelem, Element_structure *element, Solid_mat_structure *solidmat)#
void clear()#

Public Members

UInt con_n = 0#
Int head = -1#
std::vector<Int> hold#
std::vector<Real> sliding_distance[2 * POLYGON_NODE_SIZE]#
std::vector<short> sliding_state[2 * POLYGON_NODE_SIZE]#
std::vector<Int> target#
std::vector<short> type#
std::vector<short> slip_flag#
std::vector<short> mat#
class Contact_utils : public OpenFdemAbstract#
#include <contact_utils.h>

Subclassed by ns_contact::ContactForcePhysicalModels, ns_contact::ContactForceQ2TShapeFunctionMethod, ns_contact::ContactForceUtils, ns_contact::Contact_detection

Public Functions

inline Contact_utils()#
inline ~Contact_utils()#

Public Static Functions

static void getPotentionalContactPairs(General general, Nodal nodal, Element element, Contact contact, Cohelement cohelement, Solidmat solidmat)#
static void exclude_over_contacts(Element element, Contact contact, Cohelement cohelement)#
static void contact_add_list_from_cohesive(Contact contact, UInt ielem, UInt jelem, short slip, Element element, Solidmat solidmat)#
static void realloc_contact(Contact contact, UInt ielem, UInt jelem, Element element, Solidmat solidmat)#
static void realloc_Particle2ParticleContact(PContact pcontact, UInt ielem, UInt jelem, Particle particle, Solidmat solidmat)#
static void realloc_Particle2ElementContact(PContact pcontact, UInt ielem, UInt jelem, Particle particle, Element element, Solidmat solidmat)#
static void realloc_Point2ElementContact(MPM mpm, UInt ielem, UInt jelem, Element element, Solidmat solidmat)#
static void realloc_Point2particleContact(MPM mpm, UInt ielem, UInt jelem, Particle particle, Solidmat solidmat)#
static void malloc_Point2ElementContact(MPM mpm, UInt ielem, UInt jelem, Element element, Solidmat solidmat)#
static void malloc_contact(Contact contact, UInt ielem, UInt jelem, Element element, Solidmat solidmat)#
static void malloc_Particle2ParticleContact(PContact pcontact, UInt ielem, UInt jelem, Particle particle, Solidmat solidmat)#
static void malloc_Particle2ElementContact(PContact pcontact, UInt ielem, UInt jelem, Particle particle, Element element, Solidmat solidmat)#
static void malloc_Point2ParticleContact(MPM mpm, UInt ielem, UInt jelem, Particle particle, Solidmat solidmat)#
static void get_potentional_contact_for_JWL(Element element, Contact contact, Solidmat solidmat, Nodal nodal)#
static inline Real getLineSlope(Nodal nodal, const Int n1, const Int n2)#
static inline Real getLineIntercept(Nodal nodal, const Int n1, const Int n2)#
static inline void getMirrorPoint(Nodal nodal, const Int n1, const Int n2, Real x, Real y, Vector2 points[])#
static inline void getMirrorPoint(Nodal nodal, const Int n1, const Int n2, const Vector2 &P, Vector2 points[])#
static inline bool PushNodeOrder(Vector2 *points, Real &Area)#
static inline Int tofindContactMat(const Int ielem, const Int jelem, Element element, Solidmat solidmat)#
static inline Int tofindMPMelementContactMat(const Int ielem, const Int jelem, MPM mpm, Element element, Solidmat solidmat)#
static inline Int tofindMPMparticleContactMat(const Int ielem, const Int jelem, MPM mpm, Particle particle, Solidmat solidmat)#
static inline Int tofindpContactMat(const Int ielem, const Int jelem, Particle particle, Solidmat solidmat)#
static inline Int tofindwContactMat(const Int ielem, const Int jelem, Particle particle, Element element, Solidmat solidmat)#
static Real getMaxelementdiameter(Element element, Contact contact)#
static void getContactCellid(Element element, Contact contact, ConCell &cell)#
static void getContactCellid(Element element, ConCell &cell)#
static void getContactCellid(Element element, Particle particle, Contact contact, ConCell &cell)#
static void getContactCellid(Element element, Particle particle, MPM mpm, Contact contact, ConCell &cell)#
static void createContactCells(General general, Element element, Contact contact, ConCell &cell_elememt)#
static void createContactCells(General general, Particle particle, Contact contact, ConCell &cell_particle)#
static inline void deactivateContact(Contact contact, const Int masterid, const Int coni)#

deactivate the contact pair when it is not contacted. The memory is not released and just the flag is marked.

Parameters:
  • contact

  • masterid

  • coni

static inline Int getQuadraticnodeCount(const Int masterid, Element element)#

return the count of vertex of the element. The quadratic nodal will be ignored.

Parameters:
  • masterid

  • element

Returns:

class ContactForceArbitaryBlockShapeFunctionMethod : public ns_contact::ContactForceArbitaryLineShapeFunctionMethod#

Public Functions

inline ContactForceArbitaryBlockShapeFunctionMethod()#
inline ~ContactForceArbitaryBlockShapeFunctionMethod()#

Public Static Functions

static void contactForceModelArbitaryElement(General general, Element element, Solidmat solidmat, Contact contact, Nodal nodal, Thermal thermal)#
static void contactForceModelArbitaryQuadraticElement(General general, Element element, Solidmat solidmat, Contact contact, Nodal nodal, Thermal thermal)#
class ContactForceArbitaryLineShapeFunctionMethod : public ns_contact::ContactForceUtils#

Subclassed by ns_contact::ContactForceArbitaryBlockShapeFunctionMethod

Public Functions

inline ContactForceArbitaryLineShapeFunctionMethod()#
inline ~ContactForceArbitaryLineShapeFunctionMethod()#

Public Static Functions

static void contact_force_lineArbitary(General general, Element element, Solidmat solidmat, Contact contact, Nodal nodal, Int &icontact, Real &dmin2, Int ielem, Int coni)#
static void contact_force_quadratic_lineArbitary(General general, Element element, Solidmat solidmat, Contact contact, Nodal nodal, Int &icontact, Real &dmin2, Int ielem, Int coni)#
class ContactForcePhysicalModels : public ns_contact::Contact_utils#

Public Functions

inline ContactForcePhysicalModels()#
inline ~ContactForcePhysicalModels()#

Public Static Functions

static Real getContactNormalforce(const Real PG, const Real ain, Real &energydensity, Solidmat solidmat, const Int conmat)#
static Real getContactTangentialforce(const Real fn, const Int icoupID, const Int coni, const Int ielem, const Real relativeVelcity, Contact contact, Solidmat solidmat, const Int conmat)#
static Real getresidualMCTangentialforce(const Real fn, const Real relativeVelcity, Solidmat solidmat, const Int conmat)#
static Real getDynamicMCTangentialforce(const Real fn, const Int icoupID, const Int coni, const Int ielem, const Real relativeVelcity, Contact contact, Solidmat solidmat, const Int conmat)#
static Real getRoughshearTangentialforce(const Real fn, const Int icoupID, const Int coni, const Int ielem, const Real relativeVelcity, Contact contact, Solidmat solidmat, const Int conmat)#
static Real getMCTangentialforce(const Real fn, const Int icoupID, const Int coni, const Int ielem, Contact contact, Solidmat solidmat, const Int conmat)#
class ContactForceQ2TShapeFunctionMethod : public ns_contact::Contact_utils#

Public Functions

inline ContactForceQ2TShapeFunctionMethod()#
inline ~ContactForceQ2TShapeFunctionMethod()#

Public Static Functions

static void contact_force_Q2T_LIG(General general, Element element, Solidmat solidmat, Contact contact, Nodal nodal)#

contact force module only for quadrangle -triangle contact pair.

Parameters:
  • general

  • element

  • solidmat

  • contact

  • nodal

static void contact_force_quadratic_Q2T_LIG(General general, Element element, Solidmat solidmat, Contact contact, Nodal nodal)#

contact force module only for quadratic quadrangle -triangle contact pair.

Parameters:
  • general

  • element

  • solidmat

  • contact

  • nodal

class ContactForceT2TDefaultMethod : public ns_contact::ContactForceUtils#

Public Functions

inline ContactForceT2TDefaultMethod()#
inline ~ContactForceT2TDefaultMethod()#

Public Static Functions

static void contactForceDefaultT2TElement(General general, Element element, Solidmat solidmat, Contact contact, Nodal nodal)#
class ContactForceT2TShapeFunctionMethod : public ns_contact::ContactForceUtils#

Public Functions

inline ContactForceT2TShapeFunctionMethod()#
inline ~ContactForceT2TShapeFunctionMethod()#

Public Static Functions

static void Contact_force_T2T_LIG(General general, Element element, Solidmat solidmat, Contact contact, Nodal nodal)#
static void Contact_force_quadratic_T2T_LIG(General general, Element element, Solidmat solidmat, Contact contact, Nodal nodal)#
class ContactForceUtils : public ns_contact::Contact_utils#

Subclassed by ns_contact::ContactForceArbitaryLineShapeFunctionMethod, ns_contact::ContactForceT2TDefaultMethod, ns_contact::ContactForceT2TShapeFunctionMethod, ns_contact::ContactModule

Public Functions

inline ContactForceUtils()#
inline ~ContactForceUtils()#

Public Static Functions

static inline void getContactNodecouples(const Int couple[], Int (&couple_nodes)[2][POLYGON_NODE_SIZE], Element element)#
static inline void getquadraticContactNodecouples(const Int couple[], Int (&NodeCount)[], Int (&couple_nodes)[2][POLYGON_NODE_SIZE], Element element)#
static inline void getcontactCoupleCoords(const Int couple[], Int (&couple_nodes)[2][POLYGON_NODE_SIZE], Vector2 (&coord)[2][POLYGON_NODE_SIZE], Element element, Nodal nodal)#
static inline void getquadraticcontactCoupleCoords(const Int (&NodeCount)[], Int (&couple_nodes)[2][POLYGON_NODE_SIZE], Vector2 (&coord)[2][POLYGON_NODE_SIZE], Nodal nodal)#
static inline void getcontactCoupleDisplacement(const Int couple[], Int (&couple_nodes)[2][POLYGON_NODE_SIZE], Vector2 (&displacement)[2][POLYGON_NODE_SIZE], Element element, Nodal nodal)#
static inline void getquadraticcontactCoupleDisplacement(const Int (&NodeCount)[], Int (&couple_nodes)[2][POLYGON_NODE_SIZE], Vector2 (&displacement)[2][POLYGON_NODE_SIZE], Nodal nodal)#
static inline void getcontactCoupleVelocity(const Int couple[], Int (&couple_nodes)[2][POLYGON_NODE_SIZE], Vector2 (&velocity)[2][POLYGON_NODE_SIZE], Element element, Nodal nodal)#
static inline void getquadraticcontactCoupleVelocity(const Int (&NodeCount)[], Int (&couple_nodes)[2][POLYGON_NODE_SIZE], Vector2 (&velocity)[2][POLYGON_NODE_SIZE], Nodal nodal)#
static inline void getcontactCoupleEdgeVector(const Int couple[], const Vector2 (&coord)[2][POLYGON_NODE_SIZE], Vector2 (&edge)[2][POLYGON_NODE_SIZE], Real (&area)[], Element element)#
static inline void getquadraticcontactCoupleEdgeVector(const Int couple[], const Int (&NodeCount)[], const Vector2 (&coord)[2][POLYGON_NODE_SIZE], Vector2 (&edge)[2][POLYGON_NODE_SIZE], Real (&area)[], Element element)#
static inline void setcontactProjection(const Int couple[], const Vector2 (&coord)[2][POLYGON_NODE_SIZE], const Vector2 (&edge)[2][POLYGON_NODE_SIZE], const Real (&area)[], Real (&projection)[2][POLYGON_NODE_SIZE][POLYGON_NODE_SIZE], Element element)#
static inline void setquadraticcontactProjection(const Int couple[], const Int (&NodeCount)[], const Vector2 (&coord)[2][POLYGON_NODE_SIZE], const Vector2 (&edge)[2][POLYGON_NODE_SIZE], const Real (&area)[], Real (&projection)[2][POLYGON_NODE_SIZE][POLYGON_NODE_SIZE])#
static inline void getSlaveContactProjection(Real a[], const Real (&projection)[2][POLYGON_NODE_SIZE][POLYGON_NODE_SIZE], const Int iele, const Int iNode, const Int slave_nnode)#
static inline void getMasterContactProjection(Real a[], const Real (&projection)[2][POLYGON_NODE_SIZE][POLYGON_NODE_SIZE], const Int ielement, const Int iNode, const Int master_nnode)#
static inline void getMasterContactEdgeLength(Real length[], const Int ielement, const Real (&area)[], const Vector2 (&edge)[2][POLYGON_NODE_SIZE], const Int master_nnode)#
static inline bool isNotIntersect(const Real c[], const Real a[], const Real b[], const Real length[], Real &dmin2, const Int master_nnode, const Int slave_nnode)#
static inline void initializeContactforce(Vector2 masterforce[POLYGON_NODE_SIZE], const Int master_nnode)#
static inline bool getIntersectedPotentional(Real &smax, Real &smin, const Real a[], const Real b[], const Int slave_nnode)#
static inline bool isFullinElement(bool intersect, const Real a[], const Real b[], const Int slave_nnode)#
static inline Real getContactPG(const Real s, Real (&projection)[2][POLYGON_NODE_SIZE][POLYGON_NODE_SIZE], Real (&slaveShape)[], const Int iNode, const Int jNode, const Vector2 (&coord)[2][POLYGON_NODE_SIZE], const Int iele, const Int slave_nnode)#
static inline void getContactWeights(Real weights[2][POLYGON_NODE_SIZE][POLYGON_NODE_SIZE], Real (&projection)[2][POLYGON_NODE_SIZE][POLYGON_NODE_SIZE], const Int couple[2], const Vector2 (&coord)[2][POLYGON_NODE_SIZE], Element element)#
static inline Real getContactRelativeVelocity(const Real (&masterShape)[], const Real (&slaveShape)[], const Vector2 (&velocity)[2][POLYGON_NODE_SIZE], const Vector2 (&length)[2][POLYGON_NODE_SIZE], const Int iNode, const Int iele, const Int jNode, const Int slave_nnode)#
static inline Real getContactRelativeDisplacement(const Real (&masterShape)[], const Real (&slaveShape)[], const Vector2 (&displacement)[2][POLYGON_NODE_SIZE], const Vector2 (&length)[2][POLYGON_NODE_SIZE], const Int iNode, const Int iele, const Int jNode, const Int slave_nnode)#
static inline Real get3DcontactMasterPlaneTemperature(Real masterShapeN[], Thermal thermal, const Int iNode, const Int jNode)#
static inline Real get3DcontactTargetTemperature(Real targetShapeN[], Thermal thermal, const Int *couple_nodes, const Int slave_nnode)#
static inline void getMasterContactforce(const Int (&couple_nodes)[2][POLYGON_NODE_SIZE], const Int masterid, const Int iele, const Vector2 force[POLYGON_NODE_SIZE], Element element, Nodal nodal)#
static inline void getMasterContactflux(const Int (&couple_nodes)[2][POLYGON_NODE_SIZE], const Int masterid, const Int iele, const Real flux[POLYGON_NODE_SIZE], Element element, Thermal thermal)#
static inline Vector2 traction2force(Vector2 localforce, Vector2 length)#
static inline void getMasterQuadraticContactforce(const Int (&couple_nodes)[2][POLYGON_NODE_SIZE], const Int masterid, const Int iele, const Vector2 force[POLYGON_NODE_SIZE], Element element, Nodal nodal)#
static inline void getMasterQuadraticContactFlux(const Int (&couple_nodes)[2][POLYGON_NODE_SIZE], const Int masterid, const Int iele, const Real flux[POLYGON_NODE_SIZE], Element element, Thermal thermal)#
static inline void getSlaveContactforce(const Int (&couple_nodes)[2][POLYGON_NODE_SIZE], const Int couple[], const Int iele, const Real fx[POLYGON_NODE_SIZE], const Real fy[POLYGON_NODE_SIZE], const Real weights[2][POLYGON_NODE_SIZE][POLYGON_NODE_SIZE], Element element, Nodal nodal)#
static inline void getContactEnergy(General general, const Real fn, const Real ft, const Real area, const Real edgelength, const Real relativeslip)#
class ContactModule : public ns_contact::Contact_detection, public ns_contact::ContactForceUtils#

Public Functions

inline ContactModule()#
inline ~ContactModule()#

Public Static Functions

static void Openfdem_contact_dection(Openfdem openfdem)#

main function to run contact detect steps.

Parameters:

openfdem

static void Openfdem_contact_force(Openfdem openfdem)#

main function to run contact force steps.

Parameters:

openfdem

namespace ns_common
namespace ns_contact#
file contact_detection.h
file contact_force_arbitaryBlock.h
#include “common/openfdem_message.h”
file contact_force_arbitaryLine.h
#include “common/openfdem_message.h”
file contact_force_Q2T_LIG.h
#include “common/openfdem_message.h”
file contact_force_T2T_default.h
#include “common/openfdem_message.h”
file contact_force_T2T_LIG.h
#include “common/openfdem_message.h”
file contact_force_utils.h
#include “common/openfdem_message.h”
file contact_physcial_models.h
#include “common/openfdem_message.h”
file contact_utils.h
#include “common/memory_manager.h”
#include “common/openfdem_abstract.h”
#include “common/openfdem_message.h”
#include “solver/openfdem.h”
file openfdem_cell.h
#include “common/openfdem_common.h”
file openfdem_solid_contact.h
#include “common/openfdem_common.h”

Typedefs

typedef struct Contact_structure *Contact#
file solid_mechanics_contact_module.h
dir contact
dir contact detection
dir contact force
dir contact_utils
dir src