21 params.
set<
bool>(
"_compute_primal_gradients") =
false;
25 "component", component,
"The force component constraint that this object is supplying");
28 MooseEnum direction(
"direction_1 direction_2",
"direction_1");
31 "Tangent direction to compute the residual due to frictional contact");
33 "Used to apply tangential stresses from frictional contact using lagrange multipliers");
35 "The weighted velocities user object.");
36 params.
set<
bool>(
"interpolate_normals") =
false;
37 params.
set<
bool>(
"compute_lm_residual") =
false;
44 _component(getParam<
MooseEnum>(
"component")),
45 _direction(getParam<
MooseEnum>(
"direction")),
48 if (getParam<bool>(
"interpolate_normals"))
50 "Mechanical mortar contact uses tangents derived from normalized secondary nodal "
51 "normals and cannot be combined with quadrature-point normal interpolation.");
65 "'weighted_velocities_uo' must be defined on the same secondary/primary subdomain "
66 "pair as this constraint when nodal-normal derivatives are enabled.");
70 "'weighted_velocities_uo' must use the same displacement variable as this "
71 "constraint's 'variable' when nodal-normal derivatives are enabled.");
73 if (getParam<bool>(
"use_displaced_mesh") !=
76 "'weighted_velocities_uo' must use the same 'use_displaced_mesh' setting as this "
77 "constraint when nodal-normal derivatives are enabled.");
84 const auto direction = cast_int<unsigned int>(
static_cast<int>(
_direction));
92 for (
const auto j : index_range(phi))
104 for (
const auto j : index_range(phi))
109 phi[j][
_qp] * nodal_pressure * nodal_tangents[direction][j](
_component);
119 case Moose::MortarType::Secondary:
130 case Moose::MortarType::Primary:
DualNumber< Real, DNDerivativeType, true > ADReal
This class enforces mortar constraints on lower dimensional domains, skipping interior nodes.
virtual void initialSetup() override
static InputParameters validParams()
std::array< MooseUtils::SemidynamicVector< Point, 9 >, 2 > getNodalTangents(const Elem &secondary_elem) const
const InputParameters & parameters() const
const std::string & type() const
void paramError(const std::string ¶m, Args... args) const
const VariableTestValue & _test_secondary
MooseVariableField< Real > & _secondary_var
const VariableTestValue & _test_primary
SubdomainID primarySubdomain() const
Elem const *const & _lower_secondary_elem
const AutomaticMortarGeneration & amg() const
SubdomainID secondarySubdomain() const
virtual bool usesNodalNormalDerivatives() const =0
Whether this formulation includes displacement derivatives of the secondary nodal normals.
bool shouldRecordNodalNormalDerivatives() const
Whether the current assembly records nodal-normal derivatives for this object's system.
const MooseVariable * dispVar(unsigned int component) const
Creates dof object to weighted tangential velocities map.
const std::array< ADRealVectorValue, 2 > & contactTangents(const Elem &lower_secondary_elem, unsigned int nodal_index) const
Return contact tangents for the supplied lower-dimensional secondary element node.
virtual const VariableTestValue & tangentialTractionBasis(unsigned int) const
virtual ADReal nodalTangentialPressure(const Node &node, unsigned int direction) const