https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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");
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
36{
37 switch (type)
38 {
39 case Moose::MortarType::Secondary:
40 return _test_secondary[_i][_qp] * _lambda[_qp];
41
42 case Moose::MortarType::Primary:
43 return -_test_primary[_i][_qp] * _lambda[_qp];
44
45 default:
46 return 0;
47 }
48}
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("ContactApp", CartesianMortarMechanicalContact)
const ADVariableValue & _lambda
This class enforces mortar constraints on lower dimensional domains, skipping interior nodes.
static InputParameters validParams()
Applies mortar generalized forces from Lagrange multipliers defined in the global Cartesian frame of ...
CartesianMortarMechanicalContact(const InputParameters &parameters)
ADReal computeQpResidual(Moose::MortarType type) final
unsigned int _qp
unsigned int _i
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
const std::string & type() const
const VariableTestValue & _test_secondary
const VariableTestValue & _test_primary