https://mooseframework.inl.gov
CartesianMortarMechanicalContact.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 {
18 
19  MooseEnum component("x=0 y=1 z=2");
21  "component", component, "The force component constraint that this object is supplying");
22  params.addClassDescription(
23  "This class is used to apply normal contact forces using lagrange multipliers");
24  params.set<bool>("compute_lm_residual") = false;
25  return params;
26 }
27 
29  const InputParameters & parameters)
30  : ADMortarLagrangeConstraint(parameters), _component(getParam<MooseEnum>("component"))
31 {
32 }
33 
34 ADReal
36 {
37  switch (type)
38  {
40  return _test_secondary[_i][_qp] * _lambda[_qp];
41 
43  return -_test_primary[_i][_qp] * _lambda[_qp];
44 
45  default:
46  return 0;
47  }
48 }
ADReal computeQpResidual(Moose::MortarType type) final
CartesianMortarMechanicalContact(const InputParameters &parameters)
const VariableTestValue & _test_secondary
static const std::string component
Definition: NS.h:153
T & set(const std::string &name, bool quiet_mode=false)
unsigned int _i
DualNumber< Real, DNDerivativeType, true > ADReal
const ADVariableValue & _lambda
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
registerMooseObject("ContactApp", CartesianMortarMechanicalContact)
This class enforces mortar constraints on lower dimensional domains, skipping interior nodes...
const std::string & type() const
Applies mortar generalized forces from Lagrange multipliers defined in the global Cartesian frame of ...
void addClassDescription(const std::string &doc_string)
const VariableTestValue & _test_primary
unsigned int _qp