22 "This class transforms the Cartesian Lagrange multiplier vector to local coordinates and " 23 "outputs each individual component along the normal or tangential direction.");
28 "Lagrange multiplier variable along the z direction (only exist for 3D problems).");
31 "The component of the Lagrange multiplier to compute.");
33 "The name of the primary boundary sideset.");
35 "The name of the secondary boundary sideset.");
37 "use_displaced_mesh",
true,
"Whether to use the displaced mesh to get the mortar interface.");
43 _lm_var_x(&coupledValueLower(
"lm_var_x")),
44 _lm_var_y(&coupledValueLower(
"lm_var_y")),
45 _lm_var_z(params.isParamValid(
"lm_var_z") ? &coupledValueLower(
"lm_var_z") : nullptr),
47 _primary_id(_fe_problem.
mesh().
getBoundaryID(getParam<BoundaryName>(
"primary_boundary"))),
48 _secondary_id(_fe_problem.
mesh().
getBoundaryID(getParam<BoundaryName>(
"secondary_boundary"))),
50 _use_displaced_mesh(getParam<bool>(
"use_displaced_mesh"))
54 mooseError(
"MortarPressureComponent auxiliary kernel can only be used with nodal kernels.");
58 "This auxiliary kernel requires the use of displaced meshes to compute the " 59 "frictional pressure vector.");
64 "MortarPressureComponent auxiliary kernel must be restricted to a boundary.");
67 const auto & displaced_mortar_interfaces =
70 if (displaced_mortar_interfaces.size() == 0)
72 "No mortar interface could be identified in this problem. Make sure mortar contact " 78 "The boundary pairs do not correspond to a single mortar contact boundary pair. " 79 "Please revise your input file for proper mortar contact constraints and mortar " 80 "frictional pressure vector auxiliary variable definition.");
91 const Elem * lower_dimensional_element =
95 const auto & nodal_normals =
99 const auto & nodal_tangents =
102 Point normal_vector, tangent1, tangent2;
104 for (
const auto lowerd_node :
make_range(lower_dimensional_element->n_nodes()))
105 if (
_current_node->id() == lower_dimensional_element->node_id(lowerd_node))
107 normal_vector = nodal_normals[lowerd_node];
108 tangent1 = nodal_tangents[0][lowerd_node];
109 tangent2 = nodal_tangents[1][lowerd_node];
113 Point lm_vector_value(
116 Real pressure_component_value = 0.0;
121 pressure_component_value = lm_vector_value * normal_vector;
125 pressure_component_value = lm_vector_value * tangent1;
129 pressure_component_value = lm_vector_value * tangent2;
133 return pressure_component_value;
const BoundaryID _primary_id
Boundary ID for the primary surface.
const Node *const & _current_node
ComponentType
The component of the Lagrange multiplier to compute.
const bool _use_displaced_mesh
Whether to use displaced mesh (required for this auxiliary kernel)
enum MortarPressureComponentAux::ComponentType _component
const MooseArray< Real > *const _lm_var_x
Lagrange multiplier variable along the x direction.
const ExecFlagType EXEC_TIMESTEP_END
std::vector< Point > getNodalNormals(const Elem &secondary_elem) const
const FEProblemBase & _fe_problem
Fe problem to obtain primary/secondary ids.
registerMooseObject("ContactApp", MortarPressureComponentAux)
BoundaryID getBoundaryID(const BoundaryName &boundary_name, const MeshBase &mesh)
const BoundaryID _secondary_id
Boundary ID for the secondary surface.
static InputParameters validParams()
Transforms a Cartesian Lagrange multiplier vector, typically employed for mortar mechanical contact...
std::array< MooseUtils::SemidynamicVector< Point, 9 >, 2 > getNodalTangents(const Elem &secondary_elem) const
void paramError(const std::string ¶m, Args... args) const
const MooseArray< Real > *const _lm_var_z
Lagrange multiplier variable along the z direction (3D)
const std::unordered_map< dof_id_type, std::vector< const Elem *> > & nodesToSecondaryElem() const
MortarPressureComponentAux(const InputParameters ¶meters)
const AutomaticMortarGeneration * _mortar_generation_object
Handle to mortar generation object to obtain mortar geometry.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computeValue() override
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
static InputParameters validParams()
const std::unordered_map< std::pair< BoundaryID, BoundaryID >, AutomaticMortarGeneration > & getMortarInterfaces(bool on_displaced) const
const MooseArray< Real > *const _lm_var_y
Lagrange multiplier variable along the y direction.
const Elem & get(const ElemType type_in)