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
54void
56{
57 // Takes care of WeightedGapUserObject::initialize() as well
60}
61
62void
68
69void
75
76const ADVariableValue &
81
82const 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 initializeNodalScaling()
The node-based scaling steps, kept out of initialize()/finalize()/computeQpIProperties() so that a cl...
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 void initialize() override
This class inherits WeightedGapUserObject through both of its bases, each of which overrides these me...
virtual void computeQpIProperties() override
Computes properties that are functions both of _qp and _i, for example the weighted gap.
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.
virtual void computeQpIProperties() override
Computes properties that are functions both of _qp and _i, for example the weighted gap.
VariableValueTempl< true > ADVariableValue