www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TangentialMortarLMMechanicalContact< compute_stage > Class Template Reference

#include <TangentialMortarLMMechanicalContact.h>

Inheritance diagram for TangentialMortarLMMechanicalContact< compute_stage >:
[legend]

Public Member Functions

 TangentialMortarLMMechanicalContact (const InputParameters &parameters)
 

Protected Member Functions

ADReal computeQpResidual (Moose::MortarType) final
 

Protected Attributes

const MooseVariableFE< Real > & _slave_disp_y
 
const MooseVariableFE< Real > & _master_disp_y
 
const MooseVariableFE< Real > & _contact_pressure_var
 
const ADVariableValue & _contact_pressure
 
const ADVariableValue & _slave_x_dot
 
const ADVariableValue & _master_x_dot
 
const ADVariableValue & _slave_y_dot
 
const ADVariableValue & _master_y_dot
 
const Real _friction_coeff
 
const Real _epsilon
 
const MooseEnum _ncp_type
 
const Real _c
 
 usingMortarConstraintMembers
 

Detailed Description

template<ComputeStage compute_stage>
class TangentialMortarLMMechanicalContact< compute_stage >

Definition at line 15 of file TangentialMortarLMMechanicalContact.h.

Constructor & Destructor Documentation

◆ TangentialMortarLMMechanicalContact()

template<ComputeStage compute_stage>
TangentialMortarLMMechanicalContact< compute_stage >::TangentialMortarLMMechanicalContact ( const InputParameters &  parameters)

Definition at line 41 of file TangentialMortarLMMechanicalContact.C.

43  : ADMortarConstraint<compute_stage>(parameters),
45  this->_subproblem.getStandardVariable(_tid, parameters.getMooseType("slave_disp_y"))),
47  isParamValid("master_disp_y")
48  ? this->_subproblem.getStandardVariable(_tid, parameters.getMooseType("master_disp_y"))
49  : this->_subproblem.getStandardVariable(_tid, parameters.getMooseType("slave_disp_y"))),
51  this->_subproblem.getStandardVariable(_tid, parameters.getMooseType("contact_pressure"))),
52  _contact_pressure(_contact_pressure_var.template adSlnLower<compute_stage>()),
53  _slave_x_dot(_slave_var.template adUDot<compute_stage>()),
54  _master_x_dot(_master_var.template adUDotNeighbor<compute_stage>()),
55  _slave_y_dot(_slave_disp_y.template adUDot<compute_stage>()),
56  _master_y_dot(_master_disp_y.template adUDotNeighbor<compute_stage>()),
57  _friction_coeff(getParam<Real>("friction_coefficient")),
58  _epsilon(std::numeric_limits<Real>::epsilon()),
59  _ncp_type(getParam<MooseEnum>("ncp_function_type")),
60  _c(getParam<Real>("c"))
61 {
62 }

Member Function Documentation

◆ computeQpResidual()

template<ComputeStage compute_stage>
ADReal TangentialMortarLMMechanicalContact< compute_stage >::computeQpResidual ( Moose::MortarType  mortar_type)
finalprotected

Definition at line 66 of file TangentialMortarLMMechanicalContact.C.

67 {
68  switch (mortar_type)
69  {
70  case Moose::MortarType::Lower:
71  {
72  // Check whether we project onto a master face
73  if (_has_master)
74  {
75  // Check whether we are actually in contact
76  if (_contact_pressure[_qp] > TOLERANCE * TOLERANCE)
77  {
78  // Build the velocity vector
79  ADRealVectorValue relative_velocity(
80  _slave_x_dot[_qp] - _master_x_dot[_qp], _slave_y_dot[_qp] - _master_y_dot[_qp], 0);
81 
82  // Get the component in the tangential direction
83  auto tangential_velocity = relative_velocity * _tangents[_qp][0];
84 
85  // NCP part 1: requirement that either there is no slip **or** slip velocity and
86  // frictional force exerted **by** the slave side are in the same direction
87  ADReal a;
88  if (tangential_velocity * _lambda[_qp] < 0)
89  a = -std::abs(tangential_velocity);
90  else
91  a = std::abs(tangential_velocity);
92  a *= _c;
93 
94  // NCP part 2: require that the frictional force can never exceed the frictional
95  // coefficient times the normal force
96  auto b = _friction_coeff * _contact_pressure[_qp] - std::abs(_lambda[_qp]);
97 
98  ADReal fb_function;
99  if (_ncp_type == "fb")
100  // The FB function (in its pure form) is not differentiable at (0, 0) but if we add some
101  // constant > 0 into the root function, then it is
102  fb_function = a + b - std::sqrt(a * a + b * b + _epsilon);
103  else
104  fb_function = std::min(a, b);
105 
106  return _test[_i][_qp] * fb_function;
107  }
108  else
109  // If not in contact then we force the tangential lagrange multiplier to zero
110  return _test[_i][_qp] * _lambda[_qp];
111  }
112  else
113  // If not in contact then we force the tangential lagrange multiplier to zero (if we don't
114  // project onto a master face, then we're definitely not in contact)
115  return _test[_i][_qp] * _lambda[_qp];
116  }
117 
118  default:
119  return 0;
120  }
121 }

Member Data Documentation

◆ _c

template<ComputeStage compute_stage>
const Real TangentialMortarLMMechanicalContact< compute_stage >::_c
protected

Definition at line 45 of file TangentialMortarLMMechanicalContact.h.

◆ _contact_pressure

template<ComputeStage compute_stage>
const ADVariableValue& TangentialMortarLMMechanicalContact< compute_stage >::_contact_pressure
protected

Definition at line 33 of file TangentialMortarLMMechanicalContact.h.

◆ _contact_pressure_var

template<ComputeStage compute_stage>
const MooseVariableFE<Real>& TangentialMortarLMMechanicalContact< compute_stage >::_contact_pressure_var
protected

Definition at line 31 of file TangentialMortarLMMechanicalContact.h.

◆ _epsilon

template<ComputeStage compute_stage>
const Real TangentialMortarLMMechanicalContact< compute_stage >::_epsilon
protected

Definition at line 41 of file TangentialMortarLMMechanicalContact.h.

◆ _friction_coeff

template<ComputeStage compute_stage>
const Real TangentialMortarLMMechanicalContact< compute_stage >::_friction_coeff
protected

Definition at line 40 of file TangentialMortarLMMechanicalContact.h.

◆ _master_disp_y

template<ComputeStage compute_stage>
const MooseVariableFE<Real>& TangentialMortarLMMechanicalContact< compute_stage >::_master_disp_y
protected

Definition at line 29 of file TangentialMortarLMMechanicalContact.h.

◆ _master_x_dot

template<ComputeStage compute_stage>
const ADVariableValue& TangentialMortarLMMechanicalContact< compute_stage >::_master_x_dot
protected

Definition at line 36 of file TangentialMortarLMMechanicalContact.h.

◆ _master_y_dot

template<ComputeStage compute_stage>
const ADVariableValue& TangentialMortarLMMechanicalContact< compute_stage >::_master_y_dot
protected

Definition at line 38 of file TangentialMortarLMMechanicalContact.h.

◆ _ncp_type

template<ComputeStage compute_stage>
const MooseEnum TangentialMortarLMMechanicalContact< compute_stage >::_ncp_type
protected

Definition at line 43 of file TangentialMortarLMMechanicalContact.h.

◆ _slave_disp_y

template<ComputeStage compute_stage>
const MooseVariableFE<Real>& TangentialMortarLMMechanicalContact< compute_stage >::_slave_disp_y
protected

Definition at line 28 of file TangentialMortarLMMechanicalContact.h.

◆ _slave_x_dot

template<ComputeStage compute_stage>
const ADVariableValue& TangentialMortarLMMechanicalContact< compute_stage >::_slave_x_dot
protected

Definition at line 35 of file TangentialMortarLMMechanicalContact.h.

◆ _slave_y_dot

template<ComputeStage compute_stage>
const ADVariableValue& TangentialMortarLMMechanicalContact< compute_stage >::_slave_y_dot
protected

Definition at line 37 of file TangentialMortarLMMechanicalContact.h.

◆ usingMortarConstraintMembers

template<ComputeStage compute_stage>
TangentialMortarLMMechanicalContact< compute_stage >::usingMortarConstraintMembers
protected

Definition at line 47 of file TangentialMortarLMMechanicalContact.h.


The documentation for this class was generated from the following files:
TangentialMortarLMMechanicalContact::_master_y_dot
const ADVariableValue & _master_y_dot
Definition: TangentialMortarLMMechanicalContact.h:38
TangentialMortarLMMechanicalContact::_contact_pressure_var
const MooseVariableFE< Real > & _contact_pressure_var
Definition: TangentialMortarLMMechanicalContact.h:31
TangentialMortarLMMechanicalContact::_master_disp_y
const MooseVariableFE< Real > & _master_disp_y
Definition: TangentialMortarLMMechanicalContact.h:29
TangentialMortarLMMechanicalContact::_contact_pressure
const ADVariableValue & _contact_pressure
Definition: TangentialMortarLMMechanicalContact.h:33
TangentialMortarLMMechanicalContact::_master_x_dot
const ADVariableValue & _master_x_dot
Definition: TangentialMortarLMMechanicalContact.h:36
TangentialMortarLMMechanicalContact::_slave_disp_y
const MooseVariableFE< Real > & _slave_disp_y
Definition: TangentialMortarLMMechanicalContact.h:28
TangentialMortarLMMechanicalContact::_slave_x_dot
const ADVariableValue & _slave_x_dot
Definition: TangentialMortarLMMechanicalContact.h:35
TangentialMortarLMMechanicalContact::_ncp_type
const MooseEnum _ncp_type
Definition: TangentialMortarLMMechanicalContact.h:43
TangentialMortarLMMechanicalContact::_slave_y_dot
const ADVariableValue & _slave_y_dot
Definition: TangentialMortarLMMechanicalContact.h:37
TangentialMortarLMMechanicalContact::_epsilon
const Real _epsilon
Definition: TangentialMortarLMMechanicalContact.h:41
TangentialMortarLMMechanicalContact::_c
const Real _c
Definition: TangentialMortarLMMechanicalContact.h:45
TangentialMortarLMMechanicalContact::_friction_coeff
const Real _friction_coeff
Definition: TangentialMortarLMMechanicalContact.h:40