22 "tangential) for constraint enforcement.");
27 "lm_variable_tangential_one",
28 "The Lagrange multiplier variable representing the tangential contact pressure along the "
29 "first tangential direction (the only one in two dimensions).");
31 "The Lagrange multiplier variable representing the tangential contact "
32 "pressure along the second tangential direction.");
40 _lm_variable_tangential_one(getVar(
"lm_variable_tangential_one", 0)),
41 _lm_variable_tangential_two(isParamValid(
"lm_variable_tangential_two")
42 ? getVar(
"lm_variable_tangential_two", 0)
84 const unsigned int direction)
const
86 mooseAssert(direction < 2,
"There are at most two tangent directions.");
87 const auto *
const lm_var =
89 mooseAssert(lm_var,
"The tangential Lagrange multiplier for this direction must exist.");
91 const auto sys_num = lm_var->sys().number();
92 const auto var_num = lm_var->number();
93 mooseAssert(node.n_dofs(sys_num, var_num),
94 "The tangential Lagrange multiplier must have a degree of freedom at this node.");
99 const auto dof_index = node.dof_number(sys_num, var_num, 0);
100 ADReal nodal_pressure = (*lm_var->sys().currentSolution())(dof_index);
103 return nodal_pressure;
109 mooseAssert(direction < 2,
"There are at most two tangent directions.");
110 const auto *
const lm_var =
112 mooseAssert(lm_var,
"The tangential Lagrange multiplier for this direction must exist.");
113 return lm_var->phiLower();
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("ContactApp", LMWeightedVelocitiesUserObject)
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 computeQpINodalScaling()
void finalizeNodalScaling()
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.
const MooseVariableFE< Real > *const _lm_var
The Lagrange multiplier variable representing the contact pressure.
static InputParameters newParams()
New parameters that this sub-class introduces.
Nodal-based mortar contact user object for frictional problem.
virtual const VariableTestValue & tangentialTractionBasis(unsigned int direction) const override
virtual void initialize() override
This class inherits WeightedGapUserObject through both of its bases, each of which overrides these me...
virtual void finalize() override
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
static InputParameters validParams()
const MooseVariableFE< Real > *const _lm_variable_tangential_one
The Lagrange multiplier variables representing the tangential contact pressure.
virtual ADReal nodalTangentialPressure(const Node &node, unsigned int direction) const override
LMWeightedVelocitiesUserObject(const InputParameters ¶meters)
const ADTemplateVariableValue< OutputType > & adSlnLower() const
Creates dof object to weighted gap map.
static void addNodalNormalCoupling(InputParameters ¶ms)
Request the secondary face point-neighbor matrix coupling that nodal-normal derivatives need.
Creates dof object to weighted tangential velocities map.
static InputParameters validParams()
virtual void finalize() override
virtual void computeQpIProperties() override
Computes properties that are functions both of _qp and _i, for example the weighted gap.
virtual void initialize() override
SystemBase & _sys
Reference to the EquationSystem object.
VariableShapeValue< true > VariableTestValue
VariableValueTempl< true > ADVariableValue
bool doDerivatives(const SubProblem &subproblem, const SystemBase &sys)
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N > > &derivs, libMesh::dof_id_type index, Real value)