www.mooseframework.org
TangentialMortarMechanicalContact.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
13 
16  ADMortarConstraint,
17 
18  MooseEnum component("x=0 y=1 z=2");
19  params.addRequiredParam<MooseEnum>(
20  "component", component, "The force component constraint that this object is supplying");
21  params.addClassDescription(
22  "Used to apply tangential stresses from frictional contact using lagrange multipliers");
23  params.set<bool>("compute_lm_residual") = false;);
24 
25 template <ComputeStage compute_stage>
27  const InputParameters & parameters)
28  : ADMortarConstraint<compute_stage>(parameters), _component(getParam<MooseEnum>("component"))
29 {
30 }
31 
32 template <ComputeStage compute_stage>
33 ADReal
35 {
36  switch (type)
37  {
38  case Moose::MortarType::Slave:
39  // We have taken the convention the lagrange multiplier must have the same sign as the
40  // relative slip velocity of the slave face. So positive lambda indicates that force is being
41  // applied in the negative direction, so we want to decrease the momentum in the system, which
42  // means we want an outflow of momentum, which means we want the residual to be positive in
43  // that case. Negative lambda means force is being applied in the positive direction, so we
44  // want to increase momentum in the system, which means we want an inflow of momentum, which
45  // means we want the residual to be negative in that case. So the sign of this residual should
46  // be the same as the sign of lambda
47  return _test_slave[_i][_qp] * _lambda[_qp] * _tangents[_qp][0](_component) /
48  _tangents[_qp][0].norm();
49 
50  case Moose::MortarType::Master:
51  // Equal and opposite reactions so we put a negative sign here
52  return -_test_master[_i][_qp] * _lambda[_qp] * _tangents[_qp][0](_component) /
53  _tangents[_qp][0].norm();
54 
55  default:
56  return 0;
57  }
58 }
TangentialMortarMechanicalContact
Definition: TangentialMortarMechanicalContact.h:15
registerADMooseObject
registerADMooseObject("MooseApp", TangentialMortarMechanicalContact)
defineADValidParams
defineADValidParams(TangentialMortarMechanicalContact, ADMortarConstraint, MooseEnum component("x=0 y=1 z=2");params.addRequiredParam< MooseEnum >("component", component, "The force component constraint that this object is supplying");params.addClassDescription("Used to apply tangential stresses from frictional contact using lagrange multipliers");params.set< bool >("compute_lm_residual")=false;)
TangentialMortarMechanicalContact.h
MaterialTensorCalculatorTools::component
Real component(const SymmTensor &symm_tensor, unsigned int index)
Definition: MaterialTensorCalculatorTools.C:16
TangentialMortarMechanicalContact::computeQpResidual
ADReal computeQpResidual(Moose::MortarType type) final
Definition: TangentialMortarMechanicalContact.C:34
TangentialMortarMechanicalContact::TangentialMortarMechanicalContact
TangentialMortarMechanicalContact(const InputParameters &parameters)
Definition: TangentialMortarMechanicalContact.C:26