https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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", "");
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),
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
54const ADVariableValue &
59
60const ADVariableValue &
registerMooseObject("ContactApp", LMWeightedVelocitiesUserObject)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void renameCoupledVar(const std::string &old_name, const std::string &new_name, const std::string &new_docstring)
void addClassDescription(const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
User object for computing weighted gaps and contact pressure for Lagrange multipler based mortar cons...
void verifyLagrange(const MooseVariable &var, const std::string &var_name) const
Verify that the provided variables have degrees of freedom at nodes.
void checkInput(const MooseVariable *const var, const std::string &var_name) const
Check user input validity for provided variable.
static InputParameters newParams()
New parameters that this sub-class introduces.
Nodal-based mortar contact user object for frictional problem.
virtual const ADVariableValue & contactTangentialPressureDirTwo() const override
virtual const ADVariableValue & contactTangentialPressureDirOne() const override
const MooseVariableFE< Real > *const _lm_variable_tangential_two
const MooseVariableFE< Real > *const _lm_variable_tangential_one
The Lagrange multiplier variables representing the tangential contact pressure.
LMWeightedVelocitiesUserObject(const InputParameters &parameters)
const ADTemplateVariableValue< OutputType > & adSlnLower() const
Creates dof object to weighted gap map.
Creates dof object to weighted tangential velocities map.
VariableValueTempl< true > ADVariableValue