https://mooseframework.inl.gov
LMWeightedVelocitiesUserObject.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 #include "MooseVariableFE.h"
12 #include "SystemBase.h"
13 
15 
18 {
21  params.addClassDescription("Provides the mortar contact Lagrange multipliers (normal and "
22  "tangential) for constraint enforcement.");
23  params.renameCoupledVar("lm_variable", "lm_variable_normal", "");
24  params.addRequiredCoupledVar(
25  "lm_variable_tangential_one",
26  "The Lagrange multiplier variable representing the tangential contact pressure along the "
27  "first tangential direction (the only one in two dimensions).");
28  params.addCoupledVar("lm_variable_tangential_two",
29  "The Lagrange multiplier variable representing the tangential contact "
30  "pressure along the second tangential direction.");
31  return params;
32 }
33 
35  : WeightedGapUserObject(parameters),
36  WeightedVelocitiesUserObject(parameters),
37  LMWeightedGapUserObject(parameters),
38  _lm_variable_tangential_one(getVar("lm_variable_tangential_one", 0)),
39  _lm_variable_tangential_two(isParamValid("lm_variable_tangential_two")
40  ? getVar("lm_variable_tangential_two", 0)
41  : nullptr)
42 {
43  // Check that user inputted a variable
44  checkInput(_lm_variable_tangential_one, "lm_variable_tangential_one");
46  checkInput(_lm_variable_tangential_two, "lm_variable_tangential_two");
47 
48  // Check that user inputted the right type of variable
49  verifyLagrange(*_lm_variable_tangential_one, "lm_variable_tangential_one");
51  verifyLagrange(*_lm_variable_tangential_two, "lm_variable_tangential_two");
52 }
53 
54 const ADVariableValue &
56 {
58 }
59 
60 const ADVariableValue &
62 {
64 }
LMWeightedVelocitiesUserObject(const InputParameters &parameters)
void renameCoupledVar(const std::string &old_name, const std::string &new_name, const std::string &new_docstring)
Creates dof object to weighted tangential velocities map.
Nodal-based mortar contact user object for frictional problem.
User object for computing weighted gaps and contact pressure for Lagrange multipler based mortar cons...
void checkInput(const MooseVariable *const var, const std::string &var_name) const
Check user input validity for provided variable.
void addCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void verifyLagrange(const MooseVariable &var, const std::string &var_name) const
Verify that the provided variables have degrees of freedom at nodes.
Creates dof object to weighted gap map.
const MooseVariableFE< Real > *const _lm_variable_tangential_one
The Lagrange multiplier variables representing the tangential contact pressure.
virtual const ADVariableValue & contactTangentialPressureDirOne() const override
const MooseVariableFE< Real > *const _lm_variable_tangential_two
void addClassDescription(const std::string &doc_string)
const ADTemplateVariableValue< Real > & adSlnLower() const
registerMooseObject("ContactApp", LMWeightedVelocitiesUserObject)
virtual const ADVariableValue & contactTangentialPressureDirTwo() const override
static InputParameters newParams()
New parameters that this sub-class introduces.